diff --git a/_maps/map_files/generic/centcomm.dmm b/_maps/map_files/generic/centcomm.dmm index f0648fbd6ca3..99e1bc61ed0e 100644 --- a/_maps/map_files/generic/centcomm.dmm +++ b/_maps/map_files/generic/centcomm.dmm @@ -319,6 +319,10 @@ icon_state = "dark" }, /area/ghost_bar) +"bj" = ( +/obj/effect/landmark/heretic/cosmic, +/turf/simulated/floor/plating/asteroid, +/area/centcom/heretic_sacrifice/cosmic) "bo" = ( /turf/simulated/floor/holofloor{ dir = 4; @@ -340,6 +344,11 @@ }, /turf/simulated/floor/plating/abductor, /area/abductor_ship) +"bs" = ( +/obj/effect/decal/cleanable/dirt, +/obj/item/clothing/mask/gas, +/turf/simulated/floor/indestructible, +/area/centcom/heretic_sacrifice/lock) "bt" = ( /obj/structure/flora/ausbushes/fullgrass, /turf/simulated/floor/holofloor/grass, @@ -362,6 +371,14 @@ /obj/item/hemostat/alien, /turf/simulated/floor/plating/abductor, /area/abductor_ship) +"bx" = ( +/obj/effect/landmark/heretic/ash, +/turf/simulated/floor/grass/jungle, +/area/centcom/heretic_sacrifice/ash) +"by" = ( +/obj/machinery/light/very_dim/directional/east, +/turf/simulated/floor/fakespace, +/area/centcom/heretic_sacrifice/cosmic) "bz" = ( /obj/structure/ninjatele{ pixel_y = 25 @@ -757,6 +774,13 @@ /obj/item/trash/tastybread, /turf/simulated/floor/carpet/purple, /area/wizard_station) +"cV" = ( +/turf/simulated/wall/indestructible, +/area/centcom/heretic_sacrifice/blade) +"cW" = ( +/obj/effect/decal/remains/human, +/turf/simulated/floor/plating/asteroid/snow/atmosphere, +/area/centcom/heretic_sacrifice/void) "cX" = ( /obj/structure/chair/comfy/black{ dir = 4 @@ -791,6 +815,13 @@ /obj/item/camera, /turf/simulated/floor/beach/away/sand, /area/ninja/holding) +"dd" = ( +/obj/machinery/light/floor{ + invisibility = 100 + }, +/obj/structure/decorative_structures/metal/statue/moon, +/turf/simulated/floor/plating/asteroid/basalt, +/area/centcom/heretic_sacrifice/moon) "df" = ( /turf/simulated/wall/indestructible/fakeglass, /area/ninja/outpost) @@ -1135,6 +1166,9 @@ }, /turf/simulated/floor/wood, /area/ghost_bar) +"eu" = ( +/turf/simulated/wall/indestructible/rock, +/area/centcom/heretic_sacrifice/moon) "ev" = ( /turf/simulated/floor/beach/sand, /area/holodeck/source_beach) @@ -1344,6 +1378,11 @@ /obj/machinery/poolcontroller/invisible, /turf/simulated/floor/beach/away/water, /area/ninja/holding) +"ff" = ( +/obj/effect/decal/cleanable/dirt, +/obj/item/clothing/under/color/grey, +/turf/simulated/floor/indestructible, +/area/centcom/heretic_sacrifice/lock) "fg" = ( /turf/simulated/wall/indestructible/wood, /area/ninja/holding) @@ -1571,6 +1610,10 @@ }, /turf/simulated/floor/plasteel, /area/tdome/arena_source) +"fV" = ( +/obj/effect/decal/remains/human, +/turf/simulated/floor/plating/asteroid/basalt, +/area/centcom/heretic_sacrifice/ash) "fX" = ( /obj/structure/table/wood, /obj/item/candle/eternal/wizard{ @@ -1634,6 +1677,12 @@ /obj/effect/baseturf_helper/asteroid/snow, /turf/simulated/wall/indestructible/rock/snow, /area/syndicate_mothership) +"ge" = ( +/obj/structure/stone_tile/block{ + dir = 4 + }, +/turf/simulated/floor/plating/asteroid/basalt, +/area/centcom/heretic_sacrifice/ash) "gf" = ( /obj/docking_port/stationary/transit{ dir = 8; @@ -1870,6 +1919,10 @@ /obj/item/kirbyplants, /turf/simulated/floor/wood, /area/centcom/specops) +"gZ" = ( +/obj/effect/decal/snow/clean/edge, +/turf/simulated/floor/wood, +/area/centcom/heretic_sacrifice/void) "ha" = ( /obj/structure/chair/comfy/shuttle{ dir = 4 @@ -2203,6 +2256,9 @@ }, /turf/simulated/floor/mineral/plastitanium/red, /area/shuttle/syndicate_sit) +"hR" = ( +/turf/simulated/floor/carpet/cyan, +/area/centcom/heretic_sacrifice/moon) "hS" = ( /obj/structure/bookcase/random, /turf/simulated/floor/plasteel{ @@ -2477,6 +2533,12 @@ }, /turf/simulated/wall/mineral/plastitanium, /area/shuttle/syndicate) +"iG" = ( +/obj/machinery/light/floor{ + invisibility = 100 + }, +/turf/simulated/floor/plating/ice/smooth, +/area/centcom/heretic_sacrifice/void) "iI" = ( /obj/structure/table, /obj/item/aicard, @@ -2592,6 +2654,10 @@ }, /turf/simulated/floor/wood, /area/wizard_station) +"jc" = ( +/obj/item/trash/popcorn, +/turf/simulated/floor/plating/asteroid/basalt, +/area/centcom/heretic_sacrifice/moon) "je" = ( /obj/machinery/mech_bay_recharge_port/upgraded/unsimulated{ dir = 8 @@ -2992,6 +3058,10 @@ /obj/item/storage/backpack/industrial, /turf/simulated/floor/plasteel/dark, /area/syndicate_mothership) +"ku" = ( +/obj/effect/decal/remains/human, +/turf/simulated/floor/indestructible/necropolis/normal_air, +/area/centcom/heretic_sacrifice/flesh) "kv" = ( /obj/structure/window/reinforced{ dir = 1 @@ -3307,6 +3377,10 @@ }, /turf/simulated/floor/plasteel/dark, /area/syndicate_mothership/jail) +"lu" = ( +/obj/item/clothing/mask/madness_mask, +/turf/simulated/floor/carpet/cyan, +/area/centcom/heretic_sacrifice/moon) "lv" = ( /obj/structure/chair/stool, /turf/simulated/floor/plasteel/dark, @@ -4226,6 +4300,12 @@ /obj/item/reagent_containers/glass/beaker/bluespace, /turf/simulated/floor/plasteel/freezer, /area/admin) +"nV" = ( +/obj/machinery/light/floor{ + invisibility = 100 + }, +/turf/simulated/floor/plasteel/airless/indestructible, +/area/centcom/heretic_sacrifice/blade) "nW" = ( /obj/item/kirbyplants, /turf/simulated/floor/plasteel{ @@ -4319,6 +4399,11 @@ /obj/structure/reagent_dispensers/watertank, /turf/simulated/floor/mineral/plastitanium/red, /area/shuttle/administration) +"oo" = ( +/obj/item/kitchen/knife, +/obj/structure/table, +/turf/simulated/floor/plasteel/airless/indestructible, +/area/centcom/heretic_sacrifice/blade) "op" = ( /obj/item/surgical_drapes, /obj/machinery/optable, @@ -4327,6 +4412,19 @@ icon_state = "whiteblue" }, /area/centcom/control) +"oq" = ( +/turf/simulated/floor/transparent/glass{ + desc = "A peek into the other side."; + name = "cosmic glass floor" + }, +/area/centcom/heretic_sacrifice/cosmic) +"or" = ( +/turf/simulated/wall/indestructible/syndicate, +/area/space/centcomm) +"os" = ( +/obj/item/instrument/recorder, +/turf/simulated/floor/carpet/cyan, +/area/centcom/heretic_sacrifice/moon) "ot" = ( /obj/effect/turf_decal/stripes/line{ dir = 6 @@ -4516,9 +4614,19 @@ icon_state = "cafeteria" }, /area/tdome/tdomeobserve) +"oZ" = ( +/obj/structure/table, +/turf/simulated/floor/plasteel/airless/indestructible, +/area/centcom/heretic_sacrifice/blade) "pa" = ( /turf/simulated/floor/mineral/titanium, /area/shuttle/trade/sol) +"pb" = ( +/obj/machinery/light/floor{ + invisibility = 100 + }, +/turf/simulated/floor/plating/asteroid/snow/atmosphere, +/area/centcom/heretic_sacrifice/void) "pc" = ( /turf/simulated/floor/mineral/titanium/blue, /area/shuttle/trade/sol) @@ -4559,6 +4667,11 @@ }, /turf/simulated/floor/mineral/titanium/blue, /area/shuttle/trade/sol) +"pk" = ( +/obj/effect/decal/cleanable/dirt, +/obj/effect/spawner/random/blood/often, +/turf/simulated/floor/indestructible, +/area/centcom/heretic_sacrifice/lock) "pl" = ( /obj/structure/chair/stool/bar{ dir = 8 @@ -4618,6 +4731,12 @@ }, /turf/simulated/floor/plating/airless, /area/syndicate_mothership) +"pC" = ( +/obj/effect/decal/snow/clean/edge{ + dir = 1 + }, +/turf/simulated/floor/wood, +/area/centcom/heretic_sacrifice/void) "pD" = ( /obj/structure/reagent_dispensers/fueltank, /turf/simulated/floor/mineral/plastitanium/red, @@ -4665,6 +4784,10 @@ }, /turf/simulated/floor/carpet/black, /area/wizard_station) +"pI" = ( +/obj/effect/decal/remains/human, +/turf/simulated/floor/plating/asteroid, +/area/centcom/heretic_sacrifice/cosmic) "pJ" = ( /obj/structure/flora/junglebush/large, /turf/simulated/floor/grass/jungle, @@ -4687,6 +4810,9 @@ /obj/structure/flora/ausbushes/brflowers, /turf/simulated/floor/grass, /area/centcom/evac) +"pM" = ( +/turf/simulated/wall/indestructible/necropolis, +/area/centcom/heretic_sacrifice/flesh) "pO" = ( /obj/structure/shuttle/engine/propulsion{ dir = 8 @@ -4969,6 +5095,10 @@ }, /turf/simulated/floor/plasteel, /area/admin) +"qM" = ( +/obj/structure/legionnaire_bonfire, +/turf/simulated/floor/plating/asteroid/basalt, +/area/centcom/heretic_sacrifice/ash) "qN" = ( /obj/structure/table/wood, /obj/item/deck/unum, @@ -5244,6 +5374,9 @@ /obj/structure/flora/ausbushes/ppflowers, /turf/simulated/floor/grass, /area/tdome/tdomeobserve) +"rA" = ( +/turf/simulated/floor/plating/asteroid/snow/atmosphere, +/area/centcom/heretic_sacrifice/void) "rB" = ( /obj/machinery/recharger/wallcharger/upgraded{ pixel_x = 4; @@ -5384,6 +5517,10 @@ /obj/structure/closet/crate, /turf/simulated/floor/mineral/titanium, /area/shuttle/transport) +"rX" = ( +/obj/effect/decal/cleanable/dirt, +/turf/simulated/floor/indestructible, +/area/centcom/heretic_sacrifice/lock) "rY" = ( /obj/effect/spawner/random/traders/medical, /obj/structure/closet, @@ -5819,6 +5956,11 @@ }, /turf/simulated/floor/mineral/titanium/blue, /area/shuttle/trade/sol) +"tN" = ( +/obj/effect/decal/cleanable/dirt, +/obj/item/storage/toolbox/mechanical/old, +/turf/simulated/floor/indestructible, +/area/centcom/heretic_sacrifice/lock) "tO" = ( /obj/machinery/atmospherics/unary/vent_pump/high_volume{ dir = 1; @@ -5826,6 +5968,13 @@ }, /turf/simulated/floor/mineral/plastitanium/red, /area/shuttle/syndicate) +"tP" = ( +/obj/effect/decal/snow/clean/edge, +/obj/effect/decal/snow/clean/edge{ + dir = 4 + }, +/turf/simulated/floor/wood, +/area/centcom/heretic_sacrifice/void) "tQ" = ( /obj/machinery/mech_bay_recharge_port/upgraded/unsimulated{ dir = 8; @@ -6040,6 +6189,13 @@ }, /turf/simulated/floor/mineral/plastitanium/red, /area/shuttle/syndicate) +"uv" = ( +/obj/effect/decal/snow/clean/surround, +/obj/effect/decal/snow/clean/edge{ + dir = 1 + }, +/turf/simulated/floor/wood, +/area/centcom/heretic_sacrifice/void) "ux" = ( /turf/simulated/wall/mineral/plastitanium, /area/shuttle/escape) @@ -6090,6 +6246,12 @@ dir = 4 }, /area/space/centcomm) +"uF" = ( +/obj/effect/decal/cleanable/dirt, +/obj/effect/spawner/random/blood/often, +/obj/item/clothing/under/color/grey, +/turf/simulated/floor/indestructible, +/area/centcom/heretic_sacrifice/lock) "uG" = ( /obj/docking_port/stationary/transit{ dir = 8; @@ -6188,6 +6350,13 @@ /obj/structure/statue/uranium/nuke, /turf/simulated/floor/plating/asteroid/snow/airless, /area/syndicate_mothership) +"va" = ( +/obj/effect/decal/snow/clean/edge{ + dir = 4 + }, +/obj/effect/decal/snow/clean/edge, +/turf/simulated/floor/wood, +/area/centcom/heretic_sacrifice/void) "vb" = ( /obj/effect/spawner/random/traders/engineering, /obj/structure/closet, @@ -6206,6 +6375,9 @@ "vd" = ( /turf/simulated/floor/carpet/green, /area/ghost_bar) +"ve" = ( +/turf/simulated/wall/indestructible/titanium/nodiagonal, +/area/centcom/heretic_sacrifice/cosmic) "vf" = ( /obj/effect/landmark/spawner/trader, /obj/structure/chair/comfy/brown, @@ -6472,6 +6644,12 @@ /obj/item/pen, /turf/simulated/floor/carpet, /area/admin) +"vU" = ( +/obj/effect/decal/cleanable/dirt, +/obj/effect/spawner/random/blood/often, +/obj/item/storage/toolbox/mechanical/old, +/turf/simulated/floor/indestructible, +/area/centcom/heretic_sacrifice/lock) "vV" = ( /obj/machinery/kitchen_machine/candy_maker/upgraded, /turf/simulated/floor/plasteel{ @@ -6730,6 +6908,17 @@ icon_state = "cafeteria" }, /area/ghost_bar) +"wO" = ( +/obj/structure/chair/wood{ + dir = 1 + }, +/turf/simulated/floor/plating/asteroid/basalt, +/area/centcom/heretic_sacrifice/moon) +"wQ" = ( +/obj/item/shard, +/obj/effect/spawner/random/blood/often, +/turf/simulated/floor/plasteel/airless/indestructible, +/area/centcom/heretic_sacrifice/blade) "wR" = ( /obj/structure/rack, /obj/item/gun/energy/kinetic_accelerator/crossbow, @@ -6861,6 +7050,17 @@ }, /turf/simulated/floor/plasteel, /area/admin) +"xg" = ( +/obj/structure/decorative_structures/metal/statue/moon, +/obj/machinery/light/floor{ + invisibility = 100 + }, +/turf/simulated/floor/plating/asteroid/basalt, +/area/centcom/heretic_sacrifice/moon) +"xk" = ( +/obj/structure/stone_tile/slab, +/turf/simulated/floor/plating/asteroid/basalt, +/area/centcom/heretic_sacrifice/ash) "xl" = ( /obj/structure/table, /obj/item/card/id/silver{ @@ -6874,6 +7074,10 @@ }, /turf/simulated/floor/plasteel, /area/admin) +"xm" = ( +/obj/effect/landmark/heretic/moon, +/turf/simulated/floor/carpet/cyan, +/area/centcom/heretic_sacrifice/moon) "xo" = ( /turf/simulated/floor/grass/jungle, /area/wizard_station) @@ -6920,6 +7124,9 @@ /obj/structure/flora/rock/pile/largejungle, /turf/simulated/floor/grass/jungle, /area/centcom/evac) +"xA" = ( +/turf/simulated/wall/indestructible/boss, +/area/centcom/heretic_sacrifice/ash) "xB" = ( /obj/machinery/atmospherics/unary/vent_pump/high_volume{ autolink_id = "syndishuttle_vent" @@ -6945,6 +7152,11 @@ }, /turf/simulated/floor/mineral/plastitanium/red, /area/shuttle/syndicate) +"xG" = ( +/obj/structure/table, +/obj/item/kitchen/knife, +/turf/simulated/floor/plasteel/airless/indestructible, +/area/centcom/heretic_sacrifice/blade) "xH" = ( /turf/simulated/wall/indestructible/wood, /area/wizard_station) @@ -6965,6 +7177,10 @@ icon_state = "vault" }, /area/centcom/specops) +"xN" = ( +/obj/effect/landmark/heretic/rust, +/turf/simulated/floor/plating/rust, +/area/centcom/heretic_sacrifice/rust) "xO" = ( /obj/structure/rack, /obj/item/clothing/suit/wizrobe/magusblue, @@ -7047,12 +7263,25 @@ icon_state = "asteroidplating" }, /area/space/nearstation/centcom) +"yf" = ( +/obj/structure/stone_tile/block/cracked, +/turf/simulated/floor/plating/asteroid/basalt, +/area/centcom/heretic_sacrifice/ash) "yg" = ( /mob/living/silicon/decoy{ name = "A.L.I.C.E." }, /turf/simulated/floor/wood, /area/centcom/control) +"yh" = ( +/obj/structure/stone_tile, +/turf/simulated/floor/plating/asteroid/basalt, +/area/centcom/heretic_sacrifice/ash) +"yi" = ( +/obj/effect/spawner/random/blood/often, +/obj/item/kitchen/knife, +/turf/simulated/floor/plasteel/airless/indestructible, +/area/centcom/heretic_sacrifice/blade) "yj" = ( /obj/structure/table/wood/fancy/royalblack, /obj/item/gun/projectile/automatic/pistol, @@ -7087,6 +7316,10 @@ /obj/structure/flora/ausbushes/palebush, /turf/simulated/floor/grass, /area/centcom/control) +"yr" = ( +/obj/effect/decal/cleanable/ash, +/turf/simulated/floor/grass/jungle, +/area/centcom/heretic_sacrifice/ash) "yu" = ( /obj/machinery/economy/vending/snack, /obj/effect/turf_decal/delivery/hollow, @@ -7128,6 +7361,9 @@ }, /turf/simulated/floor/plasteel/freezer, /area/ghost_bar) +"yJ" = ( +/turf/simulated/wall/indestructible/fakedoor, +/area/centcom/heretic_sacrifice/blade) "yK" = ( /turf/simulated/floor/plating/airless{ icon_state = "asteroidplating" @@ -7151,6 +7387,10 @@ /obj/structure/flora/ausbushes/ppflowers, /turf/simulated/floor/grass, /area/centcom/control) +"yS" = ( +/obj/structure/grille, +/turf/simulated/wall/indestructible/riveted, +/area/centcom/heretic_sacrifice/lock) "yZ" = ( /obj/effect/mapping_helpers/airlock/access/all/centcomm/shuttles, /obj/machinery/door/airlock/external{ @@ -7160,6 +7400,17 @@ /obj/structure/fans/tiny, /turf/simulated/floor/plating, /area/centcom/suppy) +"zc" = ( +/obj/structure/barricade/wooden/crude/snow, +/turf/simulated/wall/indestructible/fakedoor, +/area/centcom/heretic_sacrifice/void) +"ze" = ( +/turf/simulated/wall/indestructible/rock/snow, +/area/centcom/heretic_sacrifice/void) +"zf" = ( +/obj/effect/gibspawner/generic, +/turf/simulated/floor/wood, +/area/centcom/heretic_sacrifice/flesh) "zg" = ( /obj/structure/chair/office/dark{ dir = 1 @@ -7356,6 +7607,12 @@ }, /turf/simulated/floor/wood, /area/syndicate_mothership) +"zX" = ( +/obj/effect/decal/cleanable/dirt, +/obj/effect/spawner/random/blood/often, +/obj/effect/landmark/heretic/lock, +/turf/simulated/floor/indestructible, +/area/centcom/heretic_sacrifice/lock) "zY" = ( /obj/machinery/smartfridge/foodcart{ dir = 4 @@ -7526,6 +7783,9 @@ /obj/structure/chair/comfy/black, /turf/simulated/floor/plasteel, /area/admin) +"Az" = ( +/turf/simulated/floor/grass/jungle, +/area/centcom/heretic_sacrifice/ash) "AB" = ( /obj/machinery/computer/arcade/battle{ dir = 4 @@ -7587,6 +7847,9 @@ }, /turf/simulated/floor/plasteel/dark, /area/admin) +"AN" = ( +/turf/simulated/floor/plating/asteroid/basalt, +/area/centcom/heretic_sacrifice/moon) "AO" = ( /turf/space, /area/admin) @@ -7857,6 +8120,9 @@ }, /turf/simulated/floor/mineral/plastitanium, /area/shuttle/supply) +"BP" = ( +/turf/simulated/floor/plating/asteroid, +/area/centcom/heretic_sacrifice/cosmic) "BT" = ( /obj/effect/landmark/spawner/tdomeobserve, /turf/simulated/floor/plasteel/dark, @@ -7975,6 +8241,12 @@ }, /turf/simulated/floor/wood, /area/ghost_bar) +"Co" = ( +/obj/structure/stone_tile/block{ + dir = 1 + }, +/turf/simulated/floor/plating/asteroid/basalt, +/area/centcom/heretic_sacrifice/ash) "Cp" = ( /obj/structure/sink{ dir = 4; @@ -8122,6 +8394,10 @@ }, /turf/simulated/floor/plating, /area/centcom/suppy) +"CN" = ( +/obj/structure/legionnaire_bonfire, +/turf/simulated/floor/wood, +/area/centcom/heretic_sacrifice/flesh) "CO" = ( /turf/simulated/floor/plating, /area/centcom/suppy) @@ -8154,6 +8430,10 @@ /obj/effect/landmark/spawner/roundstart_observer, /turf/simulated/floor/carpet/red, /area/wizard_station) +"CX" = ( +/obj/structure/lattice, +/turf/simulated/floor/indestructible, +/area/centcom/heretic_sacrifice/rust) "CY" = ( /obj/machinery/economy/vending/artvend{ name = "\improper WizArtVend" @@ -8188,6 +8468,9 @@ }, /turf/simulated/floor/plasteel/dark, /area/centcom/suppy) +"Di" = ( +/turf/simulated/floor/indestructible/necropolis/normal_air, +/area/centcom/heretic_sacrifice/flesh) "Dj" = ( /turf/simulated/floor/plasteel{ icon_state = "vault" @@ -8249,6 +8532,14 @@ icon_state = "vault" }, /area/tdome/tdomeadmin) +"Dt" = ( +/obj/structure/decorative_structures/metal/statue/moon, +/obj/structure/decorative_structures/metal/statue/moon, +/obj/machinery/light/floor{ + invisibility = 100 + }, +/turf/simulated/floor/plating/asteroid/basalt, +/area/centcom/heretic_sacrifice/moon) "Dv" = ( /obj/structure/rack, /obj/item/clothing/head/helmet/space/space_ninja, @@ -8484,6 +8775,9 @@ icon_state = "vault" }, /area/shuttle/escape) +"Eg" = ( +/turf/simulated/floor/plasteel/airless/indestructible, +/area/centcom/heretic_sacrifice/blade) "Ei" = ( /obj/structure/holohoop{ dir = 1 @@ -8655,6 +8949,10 @@ /obj/machinery/economy/vending/cola, /turf/simulated/floor/mineral/plastitanium/red, /area/shuttle/administration) +"EO" = ( +/obj/effect/decal/cleanable/ash, +/turf/simulated/floor/plating/asteroid/basalt, +/area/centcom/heretic_sacrifice/ash) "EP" = ( /obj/structure/chair/sofa/corp/corner{ dir = 4 @@ -8667,6 +8965,10 @@ icon_state = "dark" }, /area/ghost_bar) +"ES" = ( +/obj/structure/curtain/open/shower/security, +/turf/simulated/floor/carpet/cyan, +/area/centcom/heretic_sacrifice/moon) "ET" = ( /obj/effect/turf_decal/stripes/line{ dir = 5 @@ -8686,6 +8988,10 @@ /obj/structure/chair/comfy/black, /turf/simulated/floor/carpet, /area/centcom/control) +"EY" = ( +/obj/effect/spawner/random/blood/often, +/turf/simulated/floor/plasteel/airless/indestructible, +/area/centcom/heretic_sacrifice/blade) "EZ" = ( /obj/machinery/computer/bsa_control/admin, /turf/simulated/floor/carpet, @@ -8729,6 +9035,9 @@ icon_state = "darkyellow" }, /area/centcom/suppy) +"Fh" = ( +/turf/simulated/floor/fakespace, +/area/centcom/heretic_sacrifice/cosmic) "Fj" = ( /obj/machinery/computer/med_data{ dir = 8 @@ -8935,12 +9244,20 @@ /obj/structure/flora/ausbushes/palebush, /turf/simulated/floor/grass, /area/tdome/tdomeobserve) +"FT" = ( +/obj/structure/lattice, +/turf/simulated/floor/plating/rust, +/area/centcom/heretic_sacrifice/rust) "FU" = ( /obj/machinery/computer/arcade{ dir = 8 }, /turf/simulated/floor/wood, /area/tdome/tdomeobserve) +"FV" = ( +/obj/effect/landmark/heretic, +/turf/simulated/floor/grass/jungle, +/area/centcom/heretic_sacrifice/ash) "FW" = ( /obj/machinery/computer/card/centcom, /turf/simulated/floor/plasteel/dark, @@ -9032,6 +9349,12 @@ }, /turf/simulated/floor/wood, /area/wizard_station) +"Gm" = ( +/obj/structure/stone_tile/cracked{ + dir = 1 + }, +/turf/simulated/floor/plating/asteroid/basalt, +/area/centcom/heretic_sacrifice/ash) "Gn" = ( /obj/item/gun/projectile/automatic/pistol/m1911, /obj/item/ammo_box/magazine/m45, @@ -9137,6 +9460,10 @@ "GC" = ( /turf/simulated/wall/indestructible/fakeglass, /area/centcom/gamma) +"GD" = ( +/obj/effect/landmark/heretic/blade, +/turf/simulated/floor/plasteel/airless/indestructible, +/area/centcom/heretic_sacrifice/blade) "GE" = ( /obj/machinery/chem_dispenser, /turf/simulated/floor/mineral/titanium, @@ -9361,6 +9688,10 @@ icon_state = "rampbottom" }, /area/holodeck/source_theatre) +"Hq" = ( +/obj/effect/decal/cleanable/dirt, +/turf/simulated/floor/indestructible, +/area/centcom/heretic_sacrifice/rust) "Hr" = ( /obj/machinery/door/airlock/hatch/syndicate{ name = "SIT Ready Room" @@ -9391,6 +9722,15 @@ icon_state = "vault" }, /area/centcom/specops) +"Hw" = ( +/obj/effect/spawner/random/blood/often, +/turf/simulated/floor/plating/asteroid, +/area/centcom/heretic_sacrifice/cosmic) +"Hx" = ( +/obj/structure/lattice, +/obj/machinery/light/floor, +/turf/simulated/floor/plating/rust, +/area/centcom/heretic_sacrifice/rust) "Hy" = ( /obj/structure/toilet{ dir = 8 @@ -9401,6 +9741,10 @@ /obj/structure/railing, /turf/simulated/floor/wood, /area/ghost_bar) +"HA" = ( +/obj/structure/stone_tile/surrounding_tile, +/turf/simulated/floor/plating/asteroid/basalt, +/area/centcom/heretic_sacrifice/ash) "HB" = ( /obj/structure/closet/secure_closet/guncabinet, /obj/machinery/status_display{ @@ -9877,6 +10221,12 @@ }, /turf/simulated/floor/plating, /area/centcom/specops) +"Jg" = ( +/obj/structure/stone_tile/block/cracked{ + dir = 1 + }, +/turf/simulated/floor/plating/asteroid/basalt, +/area/centcom/heretic_sacrifice/ash) "Jh" = ( /turf/simulated/wall/indestructible/riveted, /area/tdome/tdomeadmin) @@ -10141,6 +10491,9 @@ /obj/item/gun/medbeam, /turf/simulated/floor/mineral/plastitanium/red, /area/shuttle/gamma/space) +"JT" = ( +/turf/simulated/floor/plating/asteroid/basalt, +/area/centcom/heretic_sacrifice/ash) "JU" = ( /obj/structure/holowindow{ dir = 1 @@ -10503,6 +10856,11 @@ icon_state = "cafeteria" }, /area/tdome/tdomeobserve) +"Lh" = ( +/obj/structure/legionnaire_bonfire, +/obj/effect/gibspawner/generic, +/turf/simulated/floor/wood, +/area/centcom/heretic_sacrifice/flesh) "Li" = ( /obj/structure/bookcase/random, /obj/machinery/light/small{ @@ -10542,6 +10900,12 @@ "Ln" = ( /turf/simulated/floor/carpet/black, /area/wizard_station) +"Lo" = ( +/obj/structure/stone_tile/block{ + dir = 8 + }, +/turf/simulated/floor/plating/asteroid/basalt, +/area/centcom/heretic_sacrifice/ash) "Lp" = ( /obj/machinery/door/airlock/hatch/syndicate{ autoclose = 0; @@ -10555,6 +10919,11 @@ /obj/machinery/recharge_station, /turf/simulated/floor/plasteel/freezer, /area/ghost_bar) +"Lr" = ( +/obj/effect/decal/cleanable/dirt, +/obj/item/spear, +/turf/simulated/floor/indestructible, +/area/centcom/heretic_sacrifice/lock) "Ls" = ( /obj/machinery/door_control/no_emag{ id = "ASSAULT"; @@ -11066,6 +11435,13 @@ }, /turf/simulated/floor/plating, /area/shuttle/syndicate) +"MT" = ( +/obj/effect/decal/snow/clean/edge{ + dir = 8 + }, +/obj/effect/decal/snow/clean/edge, +/turf/simulated/floor/wood, +/area/centcom/heretic_sacrifice/void) "MU" = ( /obj/machinery/economy/vending/cola/free{ name = "\improper Wizbust Softdrinks" @@ -11269,6 +11645,9 @@ icon_state = "neutral" }, /area/shuttle/escape) +"NJ" = ( +/turf/simulated/wall/indestructible/rock, +/area/centcom/heretic_sacrifice/rust) "NK" = ( /obj/machinery/computer/shuttle/admin{ dir = 8; @@ -11341,6 +11720,9 @@ /obj/machinery/power/port_gen/pacman/super/upgraded, /turf/simulated/floor/plasteel/dark, /area/centcom/specops) +"NV" = ( +/turf/simulated/floor/plating/ice/smooth, +/area/centcom/heretic_sacrifice/void) "NW" = ( /obj/structure/sign/securearea{ pixel_x = 32 @@ -11364,6 +11746,10 @@ /obj/machinery/computer/security/telescreen/entertainment, /turf/simulated/wall/indestructible/riveted, /area/centcom/specops) +"Oa" = ( +/obj/structure/stone_tile/burnt, +/turf/simulated/floor/plating/asteroid/basalt, +/area/centcom/heretic_sacrifice/ash) "Ob" = ( /obj/structure/table, /obj/item/deck/cards, @@ -11720,6 +12106,16 @@ icon_state = "bot" }, /area/shuttle/escape) +"Pc" = ( +/obj/effect/decal/snow/clean/edge{ + dir = 8 + }, +/obj/effect/decal/snow/clean/edge{ + dir = 1 + }, +/obj/effect/landmark/heretic/void, +/turf/simulated/floor/wood, +/area/centcom/heretic_sacrifice/void) "Pd" = ( /obj/machinery/status_display, /turf/simulated/wall/indestructible/riveted, @@ -11847,6 +12243,9 @@ icon_state = "green" }, /area/centcom/evac) +"Pz" = ( +/turf/simulated/wall/indestructible/riveted, +/area/centcom/heretic_sacrifice/lock) "PA" = ( /obj/effect/landmark/shuttle_import, /turf/space, @@ -11899,6 +12298,14 @@ }, /turf/simulated/floor/plating/airless, /area/centcom/control) +"PK" = ( +/obj/effect/decal/cleanable/dirt, +/obj/effect/spawner/random/blood/often, +/obj/machinery/light/floor{ + invisibility = 100 + }, +/turf/simulated/floor/indestructible, +/area/centcom/heretic_sacrifice/lock) "PM" = ( /obj/item/stack/sheet/metal/fifty, /obj/item/stack/sheet/metal/fifty, @@ -11948,6 +12355,10 @@ /obj/item/lighter, /turf/simulated/floor/plasteel/dark, /area/centcom/specops) +"PT" = ( +/obj/machinery/light/very_dim/directional/south, +/turf/simulated/floor/plating/asteroid, +/area/centcom/heretic_sacrifice/cosmic) "PU" = ( /obj/effect/turf_decal/delivery, /turf/simulated/floor/plasteel/dark, @@ -12032,6 +12443,9 @@ }, /turf/simulated/floor/plasteel/dark, /area/centcom/specops) +"Qi" = ( +/turf/simulated/floor/indestructible, +/area/centcom/heretic_sacrifice/rust) "Qj" = ( /obj/structure/chair/sofa{ color = "#63009c" @@ -12060,6 +12474,10 @@ }, /turf/simulated/floor/wood, /area/wizard_station) +"Qq" = ( +/obj/item/whetstone, +/turf/simulated/floor/plasteel/airless/indestructible, +/area/centcom/heretic_sacrifice/blade) "Qr" = ( /obj/item/stack/sheet/glass/fifty, /obj/item/stack/sheet/glass/fifty, @@ -12179,6 +12597,10 @@ }, /turf/simulated/floor/plasteel/dark, /area/centcom/control) +"QJ" = ( +/obj/effect/landmark/heretic/flesh, +/turf/simulated/floor/indestructible/necropolis/normal_air, +/area/centcom/heretic_sacrifice/flesh) "QL" = ( /turf/simulated/floor/plasteel, /area/shuttle/escape) @@ -12698,6 +13120,9 @@ }, /turf/simulated/floor/mineral/plastitanium/red, /area/shuttle/administration) +"SI" = ( +/turf/simulated/wall/indestructible/fakedoor, +/area/centcom/heretic_sacrifice/lock) "SJ" = ( /obj/item/kirbyplants, /turf/simulated/floor/plasteel, @@ -12753,6 +13178,10 @@ "SV" = ( /turf/simulated/wall/indestructible/fakeglass, /area/tdome/tdomeadmin) +"SX" = ( +/obj/item/instrument/trombone, +/turf/simulated/floor/carpet/cyan, +/area/centcom/heretic_sacrifice/moon) "SY" = ( /obj/structure/table/holotable, /obj/item/clothing/suit/armor/riot/knight/blue, @@ -13000,6 +13429,12 @@ icon_state = "whiteblue" }, /area/centcom/control) +"Ub" = ( +/obj/structure/stone_tile/block/cracked{ + dir = 8 + }, +/turf/simulated/floor/plating/asteroid/basalt, +/area/centcom/heretic_sacrifice/ash) "Uc" = ( /obj/structure/rack, /obj/item/clothing/under/plasmaman/wizard, @@ -13184,6 +13619,9 @@ icon_state = "snow" }, /area/holodeck/source_snowfield) +"UN" = ( +/turf/simulated/floor/plating/rust, +/area/centcom/heretic_sacrifice/rust) "UO" = ( /turf/simulated/wall/indestructible/opsglass/limited_smooth, /area/syndicate_mothership) @@ -13356,6 +13794,11 @@ icon_state = "bar" }, /area/tdome/tdomeobserve) +"VA" = ( +/obj/effect/decal/snow/clean/edge, +/obj/effect/decal/snow/clean/edge, +/turf/simulated/floor/wood, +/area/centcom/heretic_sacrifice/void) "VC" = ( /obj/item/rpd/bluespace, /obj/item/rpd/bluespace, @@ -13400,6 +13843,9 @@ icon_state = "vault" }, /area/tdome/tdomeadmin) +"VK" = ( +/turf/simulated/floor/wood, +/area/centcom/heretic_sacrifice/flesh) "VL" = ( /obj/structure/chair{ dir = 8 @@ -13598,6 +14044,11 @@ }, /turf/simulated/floor/plasteel, /area/admin) +"Ww" = ( +/obj/structure/table, +/obj/item/whetstone, +/turf/simulated/floor/plasteel/airless/indestructible, +/area/centcom/heretic_sacrifice/blade) "Wx" = ( /obj/machinery/teleport/station/upgraded, /turf/simulated/floor/plasteel, @@ -13846,6 +14297,10 @@ /obj/item/kirbyplants, /turf/simulated/floor/transparent/glass/reinforced, /area/centcom/control) +"WY" = ( +/obj/machinery/light/very_dim/directional/west, +/turf/simulated/floor/fakespace, +/area/centcom/heretic_sacrifice/cosmic) "WZ" = ( /obj/structure/table/reinforced, /obj/item/crowbar/red, @@ -14113,6 +14568,10 @@ "XU" = ( /turf/simulated/floor/wood, /area/tdome/tdomeobserve) +"XV" = ( +/obj/structure/signpost/void, +/turf/simulated/floor/plating/asteroid, +/area/centcom/heretic_sacrifice/cosmic) "XW" = ( /obj/effect/spawner/window/reinforced, /obj/structure/sign/vacuum, @@ -14224,6 +14683,10 @@ /obj/item/pen/blue, /turf/simulated/floor/wood, /area/centcom/control) +"Ym" = ( +/obj/structure/stone_tile/block, +/turf/simulated/floor/plating/asteroid/basalt, +/area/centcom/heretic_sacrifice/ash) "Yo" = ( /obj/structure/chair/comfy/purp{ name = "wizard council throne" @@ -14371,6 +14834,19 @@ /obj/structure/railing, /turf/simulated/floor/plasteel, /area/centcom/evac) +"YP" = ( +/obj/effect/decal/snow/clean/edge{ + dir = 1 + }, +/obj/effect/decal/snow/clean/edge{ + dir = 4 + }, +/turf/simulated/floor/wood, +/area/centcom/heretic_sacrifice/void) +"YQ" = ( +/obj/item/instrument/saxophone, +/turf/simulated/floor/carpet/cyan, +/area/centcom/heretic_sacrifice/moon) "YR" = ( /obj/structure/railing/corner{ dir = 8 @@ -14526,6 +15002,10 @@ }, /turf/simulated/floor/plasteel/dark, /area/centcom/specops) +"Zo" = ( +/obj/machinery/light/very_dim/directional/north, +/turf/simulated/floor/fakespace, +/area/centcom/heretic_sacrifice/cosmic) "Zp" = ( /obj/structure/shuttle/engine/propulsion, /turf/simulated/floor/plating/airless, @@ -55795,59 +56275,59 @@ aN aN aN aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or aN aN aN @@ -56052,59 +56532,59 @@ aN aN aN aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN +or +ze +ze +ze +ze +ze +zc +zc +ze +ze +ze +ze +ze +or +Pz +Pz +yS +yS +Pz +SI +SI +Pz +yS +yS +Pz +Pz +or +xA +xA +xA +xA +xA +xA +xA +xA +xA +xA +xA +xA +or +ve +ve +ve +ve +ve +ve +ve +ve +ve +ve +ve +ve +or aN aN aN @@ -56309,59 +56789,59 @@ aN aN aN aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN +or +ze +rA +rA +rA +rA +YP +tP +rA +rA +rA +rA +ze +or +Pz +rX +rX +rX +rX +rX +rX +rX +rX +pk +rX +Pz +or +xA +JT +JT +JT +JT +JT +JT +JT +JT +JT +JT +xA +or +ve +Fh +oq +Fh +Fh +WY +Fh +Fh +Fh +oq +BP +ve +or aN aN aN @@ -56566,59 +57046,59 @@ aN aN aN aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN +or +ze +rA +pb +rA +rA +rA +rA +rA +rA +pb +rA +ze +or +yS +rX +pk +uF +rX +rX +vU +pk +rX +Lr +pk +yS +or +xA +JT +qM +JT +JT +JT +JT +JT +yh +qM +JT +xA +or +ve +oq +XV +oq +Fh +Fh +Fh +Fh +Fh +Fh +oq +ve +or aN aN aN @@ -56823,6 +57303,59 @@ aN aN aN aN +or +ze +rA +rA +rA +rA +uv +rA +rA +cW +rA +rA +ze +or +yS +rX +bs +pk +rX +rX +pk +pk +rX +pk +rX +yS +or +xA +JT +EO +JT +JT +JT +JT +JT +JT +EO +JT +xA +or +ve +Fh +oq +Fh +Fh +Fh +Fh +Fh +Fh +Fh +Fh +ve +or aN aN aN @@ -56851,6 +57384,8 @@ aN aN aN aN +"} +(165,1,1) = {" aN aN aN @@ -56859,6 +57394,15 @@ aN aN aN aN +fg +fg +fg +fg +fg +fg +fg +fg +fg aN aN aN @@ -56904,8 +57448,6 @@ aN aN aN aN -"} -(165,1,1) = {" aN aN aN @@ -56914,15 +57456,6 @@ aN aN aN aN -fg -fg -fg -fg -fg -fg -fg -fg -fg aN aN aN @@ -56958,6 +57491,36 @@ aN aN aN aN +DH +De +De +De +De +De +De +De +De +De +De +De +De +De +De +De +De +De +De +De +De +De +De +De +De +De +De +De +De +DH aN aN aN @@ -56997,6 +57560,59 @@ aN aN aN aN +or +ze +rA +cW +rA +rA +rA +rA +rA +rA +rA +rA +ze +or +Pz +rX +pk +pk +rX +rX +pk +rX +rX +pk +rX +Pz +or +xA +JT +JT +JT +JT +Lo +Lo +JT +JT +JT +JT +xA +or +ve +Fh +Fh +Fh +oq +oq +Fh +Fh +Fh +Fh +oq +ve +or aN aN aN @@ -57011,36 +57627,6 @@ aN aN aN aN -DH -De -De -De -De -De -De -De -De -De -De -De -De -De -De -De -De -De -De -De -De -De -De -De -De -De -De -De -De -DH aN aN aN @@ -57055,6 +57641,8 @@ aN aN aN aN +"} +(166,1,1) = {" aN aN aN @@ -57160,9 +57748,37 @@ aN aN aN aN +DH +De +De +De +De +De +De +De +De +De +De +De +De +De +De +De +De +De +De +De +De +De +De +De +De +De +De +De +De +DH aN -"} -(166,1,1) = {" aN aN aN @@ -57201,6 +57817,59 @@ aN aN aN aN +or +ze +NV +NV +NV +rA +rA +rA +rA +rA +rA +rA +ze +or +SI +rX +pk +pk +rX +zX +ff +rX +rX +rX +pk +SI +or +xA +JT +JT +JT +Co +Az +yr +Ym +JT +JT +JT +xA +or +ve +Fh +Fh +oq +bj +BP +oq +Fh +Fh +oq +PT +ve +or aN aN aN @@ -57229,6 +57898,20 @@ aN aN aN aN +"} +(167,1,1) = {" +aN +aN +aN +aN +aN +aN +aN +aN +aN +aN +aN +aN aN aN aN @@ -57268,36 +57951,6 @@ aN aN aN aN -DH -De -De -De -De -De -De -De -De -De -De -De -De -De -De -De -De -De -De -De -De -De -De -De -De -De -De -De -De -DH aN aN aN @@ -57352,6 +58005,37 @@ aN aN aN aN +DH +De +De +De +De +De +De +De +De +De +De +De +De +De +De +De +De +De +De +De +De +De +De +De +De +De +De +De +De +DH +aN aN aN aN @@ -57390,6 +58074,59 @@ aN aN aN aN +or +ze +NV +NV +NV +NV +Pc +MT +rA +rA +rA +rA +ze +or +SI +pk +rX +rX +rX +pk +PK +rX +rX +pk +rX +SI +or +xA +JT +JT +JT +Co +bx +FV +Ym +JT +JT +JT +xA +or +ve +Zo +Fh +oq +Hw +BP +oq +Fh +Fh +oq +BP +ve +or aN aN aN @@ -57419,7 +58156,7 @@ aN aN aN "} -(167,1,1) = {" +(168,1,1) = {" aN aN aN @@ -57594,6 +58331,59 @@ aN aN aN aN +or +ze +rA +rA +rA +NV +pC +VA +NV +rA +rA +rA +ze +or +Pz +rX +rX +pk +rX +pk +rX +pk +rX +rX +pk +Pz +or +xA +JT +JT +JT +JT +ge +ge +JT +JT +JT +JT +xA +or +ve +Fh +Fh +Fh +oq +oq +Fh +Fh +Fh +oq +BP +ve +or aN aN aN @@ -57622,318 +58412,8 @@ aN aN aN aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -"} -(168,1,1) = {" -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -DH -De -De -De -De -De -De -De -De -De -De -De -De -De -De -De -De -De -De -De -De -De -De -De -De -De -De -De -De -DH -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -"} -(169,1,1) = {" +"} +(169,1,1) = {" aN aN aN @@ -58108,59 +58588,59 @@ aN aN aN aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN +or +ze +rA +rA +rA +rA +pC +gZ +NV +NV +NV +NV +ze +or +yS +pk +rX +tN +pk +rX +rX +tN +pk +rX +rX +yS +or +xA +JT +fV +yf +JT +JT +Ub +JT +JT +JT +JT +xA +or +ve +oq +Fh +Fh +Fh +Fh +Fh +Fh +Fh +Fh +oq +ve +or aN aN aN @@ -58365,59 +58845,59 @@ aN aN aN aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN +or +ze +rA +pb +rA +rA +YP +va +rA +NV +iG +NV +ze +or +yS +rX +pk +rX +rX +rX +pk +rX +ff +pk +pk +yS +or +xA +JT +qM +Ym +JT +Jg +xk +Oa +EO +qM +JT +xA +or +ve +BP +oq +Fh +Fh +Fh +Fh +Fh +oq +Fh +Fh +ve +or aN aN aN @@ -58622,59 +59102,59 @@ aN aN aN aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN +or +ze +rA +rA +rA +rA +cW +rA +rA +rA +rA +rA +ze +or +Pz +rX +rX +pk +pk +rX +rX +rX +rX +rX +rX +Pz +or +xA +JT +JT +JT +JT +Gm +HA +JT +JT +EO +JT +xA +or +ve +BP +Hw +oq +Fh +Fh +by +oq +pI +oq +Fh +ve +or aN aN aN @@ -58879,59 +59359,59 @@ aN aN aN aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN +or +ze +ze +ze +ze +ze +ze +ze +ze +ze +ze +ze +ze +or +Pz +Pz +yS +yS +Pz +SI +SI +Pz +yS +yS +Pz +Pz +or +xA +xA +xA +xA +xA +xA +xA +xA +xA +xA +xA +xA +or +ve +ve +ve +ve +ve +ve +ve +ve +ve +ve +ve +ve +or aN aN aN @@ -59136,59 +59616,59 @@ aN aN aN aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or aN aN aN @@ -59393,59 +59873,59 @@ aN aN aN aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN +or +cV +cV +cV +cV +cV +cV +cV +cV +cV +cV +cV +cV +or +eu +eu +eu +eu +eu +eu +eu +eu +eu +eu +eu +eu +or +NJ +NJ +NJ +NJ +NJ +NJ +NJ +NJ +NJ +NJ +NJ +NJ +or +pM +pM +pM +pM +pM +pM +pM +pM +pM +pM +pM +pM +or aN aN aN @@ -59650,59 +60130,59 @@ aN aN aN aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN +or +cV +Eg +Eg +Eg +Eg +xG +Ww +Eg +Eg +Eg +Eg +cV +or +eu +AN +AN +AN +AN +AN +AN +AN +AN +AN +AN +eu +or +NJ +FT +FT +FT +UN +UN +UN +UN +UN +UN +UN +NJ +or +pM +Di +VK +Di +Di +Di +Di +Di +Di +VK +Di +pM +or aN aN aN @@ -59907,59 +60387,59 @@ aN aN aN aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN +or +cV +Eg +nV +wQ +Eg +Qq +Eg +Eg +Eg +nV +Eg +cV +or +eu +AN +xg +AN +AN +AN +AN +AN +AN +dd +AN +eu +or +NJ +FT +Hx +UN +UN +UN +UN +UN +UN +Hx +UN +NJ +or +pM +zf +CN +VK +VK +VK +VK +VK +zf +CN +VK +pM +or aN aN aN @@ -60164,59 +60644,59 @@ aN aN aN aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN +or +cV +Eg +Eg +Eg +EY +EY +Eg +EY +Eg +Qq +Eg +cV +or +eu +AN +hR +hR +ES +AN +wO +wO +wO +AN +AN +eu +or +NJ +UN +UN +UN +Hq +Qi +UN +Qi +FT +FT +UN +NJ +or +pM +Di +VK +ku +VK +Di +Di +VK +Di +VK +Di +pM +or aN aN aN @@ -60421,59 +60901,59 @@ aN aN aN aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN +or +cV +Eg +Eg +Qq +Eg +Eg +Eg +Eg +Eg +Eg +wQ +cV +or +eu +AN +os +lu +ES +AN +wO +wO +wO +AN +AN +eu +or +NJ +Qi +FT +FT +UN +Hq +Qi +Qi +UN +Qi +UN +NJ +or +pM +Di +VK +VK +zf +VK +VK +VK +VK +VK +Di +pM +or aN aN aN @@ -60678,59 +61158,59 @@ aN aN aN aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN +or +cV +oZ +Eg +Eg +Eg +Eg +EY +Eg +EY +Eg +oZ +cV +or +eu +AN +hR +xm +ES +AN +AN +AN +AN +AN +AN +eu +or +NJ +UN +FT +Hq +UN +UN +UN +UN +UN +Hq +Qi +NJ +or +pM +Di +VK +Di +VK +Di +Di +VK +Di +VK +Di +pM +or aN aN aN @@ -60935,59 +61415,59 @@ aN aN aN aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN +or +cV +xG +Eg +EY +EY +EY +GD +EY +EY +Eg +oo +cV +or +eu +AN +hR +hR +ES +AN +AN +AN +AN +AN +AN +eu +or +NJ +Qi +Hq +UN +UN +xN +Qi +Hq +Hq +FT +UN +NJ +or +pM +Di +VK +Di +VK +QJ +Di +VK +ku +VK +Di +pM +or aN aN aN @@ -61192,59 +61672,59 @@ aN aN aN aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN +or +cV +Qq +Eg +Eg +Eg +Eg +Eg +EY +Eg +EY +Eg +cV +or +eu +AN +SX +YQ +ES +AN +wO +wO +wO +AN +AN +eu +or +NJ +UN +UN +UN +UN +UN +UN +UN +UN +UN +UN +NJ +or +pM +Di +VK +VK +VK +VK +VK +VK +VK +VK +Di +pM +or aN aN aN @@ -61449,59 +61929,59 @@ aN aN aN aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN +or +cV +Eg +Eg +wQ +Eg +Eg +Eg +wQ +Eg +Eg +Eg +cV +or +eu +AN +hR +hR +ES +AN +wO +wO +wO +AN +AN +eu +or +NJ +Qi +Hq +Qi +Hq +CX +FT +UN +UN +FT +UN +NJ +or +pM +Di +VK +Di +VK +Di +Di +VK +Di +VK +Di +pM +or aN aN aN @@ -61706,59 +62186,59 @@ aN aN aN aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN +or +cV +Eg +nV +Eg +yi +Eg +Eg +Eg +Qq +nV +Eg +cV +or +eu +AN +xg +AN +AN +AN +jc +AN +AN +Dt +AN +eu +or +NJ +UN +Hx +UN +UN +Hq +UN +UN +UN +Hx +UN +NJ +or +pM +VK +Lh +VK +VK +VK +VK +VK +VK +CN +VK +pM +or aN aN aN @@ -61963,59 +62443,59 @@ aN aN aN aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN +or +cV +Eg +Eg +Eg +Eg +Eg +Eg +Eg +Eg +Eg +Eg +cV +or +eu +AN +AN +AN +AN +AN +AN +AN +AN +AN +AN +eu +or +NJ +UN +FT +UN +UN +UN +Hq +Qi +UN +UN +UN +NJ +or +pM +Di +VK +ku +Di +Di +Di +Di +Di +zf +Di +pM +or aN aN aN @@ -62220,59 +62700,59 @@ aN aN aN aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN +or +cV +cV +cV +cV +cV +yJ +yJ +cV +cV +cV +cV +cV +or +eu +eu +eu +eu +eu +eu +eu +eu +eu +eu +eu +eu +or +NJ +NJ +NJ +NJ +NJ +NJ +NJ +NJ +NJ +NJ +NJ +NJ +or +pM +pM +pM +pM +pM +pM +pM +pM +pM +pM +pM +pM +or aN aN aN @@ -62477,59 +62957,59 @@ aN aN aN aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN -aN +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or +or aN aN aN diff --git a/code/__DEFINES/antag_defines.dm b/code/__DEFINES/antag_defines.dm index e62c0838ee48..8ad37667bc9d 100644 --- a/code/__DEFINES/antag_defines.dm +++ b/code/__DEFINES/antag_defines.dm @@ -23,6 +23,8 @@ /// The name of the strings file containing data to use for contract fluff texts. #define CONTRACT_STRINGS_WANTED "syndicate_wanted_messages.json" +/// JSON string file for all of our heretic influence flavors +#define HERETIC_INFLUENCE_FILE "heretic_influences.json" // UI page numbers. #define HUB_PAGE_CONTRACTS 1 @@ -77,6 +79,57 @@ GLOBAL_LIST(contractors) #define IS_MINDSLAVE(mob) (ishuman(mob) && mob?:mind?:has_antag_datum(/datum/antagonist/mindslave, FALSE)) +/** + * Heretic checks + */ + +/// Checks if the given mob is a heretic. +#define IS_HERETIC(mob) (mob.mind?.has_antag_datum(/datum/antagonist/heretic)) + +/// Check if the given mob is a heretic monster. +#define IS_HERETIC_MONSTER(mob) (mob.mind?.has_antag_datum(/datum/antagonist/heretic_monster)) +/// Check if the given mob is a lunatic +#define IS_LUNATIC(mob) (mob.mind?.has_antag_datum(/datum/antagonist/lunatic)) +/// Checks if the given mob is either a heretic, heretic monster or a lunatic. +#define IS_HERETIC_OR_MONSTER(mob) (IS_HERETIC(mob) || IS_HERETIC_MONSTER(mob)) +/// CHecks if the given mob is in the mansus realm +#define IS_IN_MANSUS(mob) (istype(get_area(mob), /area/centcom/heretic_sacrifice)) + + +// Heretic path defines. +#define PATH_START "Start Path" +#define PATH_SIDE "Side Path" +#define PATH_ASH "Ash Path" +#define PATH_RUST "Rust Path" +#define PATH_FLESH "Flesh Path" +#define PATH_VOID "Void Path" +#define PATH_BLADE "Blade Path" +#define PATH_COSMIC "Cosmic Path" +#define PATH_LOCK "Lock Path" +#define PATH_MOON "Moon Path" + +//Heretic knowledge tree defines +#define HKT_NEXT "next" +#define HKT_BAN "ban" +#define HKT_DEPTH "depth" +#define HKT_ROUTE "route" +#define HKT_UI_BGR "ui_bgr" + + +/// Defines are used in /proc/has_living_heart() to report if the heretic has no heart period, no living heart, or has a living heart. +#define HERETIC_NO_HEART_ORGAN -1 +#define HERETIC_NO_LIVING_HEART 0 +#define HERETIC_HAS_LIVING_HEART 1 + +/// A define used in ritual priority for heretics. +#define MAX_KNOWLEDGE_PRIORITY 100 + +/// Checks if the passed mob can become a heretic ghoul. +/// - Must be a human (type, not species) +/// - Skeletons cannot be husked (they are snowflaked instead of having a trait) +/// - Monkeys are monkeys, not quite human (balance reasons) +#define IS_VALID_GHOUL_MOB(mob) (ishuman(mob) && !isskeleton(mob) && !ismonkeybasic(mob)) + /** * Objective targeting flags */ diff --git a/code/__DEFINES/color_defines.dm b/code/__DEFINES/color_defines.dm index 558dd7d88c9e..a99bdd04a534 100644 --- a/code/__DEFINES/color_defines.dm +++ b/code/__DEFINES/color_defines.dm @@ -12,6 +12,7 @@ #define COLOR_GRAY "#808080" #define COLOR_BLACK "#000000" #define COLOR_HALF_TRANSPARENT_BLACK "#0000007A" +#define COLOR_FULL_TONER_BLACK "#101010" #define COLOR_NAVY_BLUE "#000080" #define COLOR_LIGHT_GREEN "#008000" #define COLOR_DARK_GRAY "#404040" @@ -35,6 +36,7 @@ #define COLOR_WARM_YELLOW "#b3863c" #define COLOR_RED_GRAY "#aa5f61" #define COLOR_BROWN "#b19664" +#define COLOR_CARGO_BROWN "#B18644" #define COLOR_GREEN_GRAY "#8daf6a" #define COLOR_DARK_GREEN_GRAY "#54654c" #define COLOR_BLUE_GRAY "#6a97b0" @@ -43,6 +45,7 @@ #define COLOR_PURPLE_GRAY "#a2819e" #define COLOR_BLUE_LIGHT "#33ccff" #define COLOR_RED_LIGHT "#ff3333" +#define COLOR_VIVID_RED "#FF3232" #define COLOR_BEIGE "#ceb689" #define COLOR_BABY_BLUE "#89cff0" #define COLOR_PALE_GREEN_GRAY "#aed18b" @@ -86,9 +89,15 @@ #define COLOR_DIAMOND "#d8d4ea" #define COLOR_ANCIENT_ROCK "#575757" #define COLOR_COLD_ANCIENT_ROCK "#575764" -#define COLOR_HARD_ROCK "#363636" -#define COLOR_FLOOR_HARD_ROCK "#bdbdbd" +#define COLOR_HARD_ROCK "#363636" +#define COLOR_FLOOR_HARD_ROCK "#bdbdbd" #define COLOR_HEALING_GREEN "#375637" +#define COLOR_VOID_PURPLE "#53277E" +#define COLOR_VERY_PALE_LIME_GREEN "#DDFFD3" +#define COLOR_HERETIC_GREEN COLOR_VERY_PALE_LIME_GREEN +#define COLOR_RUSTED_GLASS "#917c65" +#define COLOR_SOFT_RED "#FA8282" +#define COLOR_CULT_RED "#960000" //Color defines used by the assembly detailer. #define COLOR_ASSEMBLY_BLACK "#545454" @@ -157,3 +166,15 @@ /// Color for dead external organs/zombies #define COLORTONE_DEAD_EXT_ORGAN "#0A3200" + +GLOBAL_LIST_INIT(heretic_path_to_color, list( + PATH_START = COLOR_LIME, + PATH_RUST = COLOR_CARGO_BROWN, + PATH_FLESH = COLOR_SOFT_RED, + PATH_ASH = COLOR_VIVID_RED, + PATH_VOID = COLOR_CYAN, + PATH_BLADE = COLOR_SILVER, + PATH_COSMIC = COLOR_PURPLE, + PATH_LOCK = COLOR_YELLOW, + PATH_MOON = COLOR_BLUE_LIGHT, + )) diff --git a/code/__DEFINES/cult_defines.dm b/code/__DEFINES/cult_defines.dm index e927982e6d17..adc434b37e86 100644 --- a/code/__DEFINES/cult_defines.dm +++ b/code/__DEFINES/cult_defines.dm @@ -17,6 +17,8 @@ #define MAX_BLOODCHARGE 4 /// Maximum number of spells without an empowering rune #define RUNELESS_MAX_BLOODCHARGE 1 +/// Maximum number of spells with enhanced magic +#define ENHANCED_BLOODCHARGE 5 #define BLOOD_SPEAR_COST 150 #define BLOOD_BARRAGE_COST 300 #define BLOOD_ORB_COST 50 @@ -69,3 +71,8 @@ /// Checks that the given element is living an has a cult antag datum #define IS_CULTIST(mob) (isliving(mob) && mob?:mind?:has_antag_datum(/datum/antagonist/cultist)) // for someone TODO, move all antag checks over to TG's `IS_TRAITOR` defines. Also remove `isliving()` from this call someday + +// Used to keep track of items rewarded after a heretic is sacked. +#define CURSED_BLADE_UNLOCKED "Cursed Blade" +#define CRIMSON_MEDALLION_UNLOCKED "Crimson Medallion" +#define PROTEON_ORB_UNLOCKED "Proteon Orb" diff --git a/code/__DEFINES/dcs/heretic_signals.dm b/code/__DEFINES/dcs/heretic_signals.dm new file mode 100644 index 000000000000..51e2f8968684 --- /dev/null +++ b/code/__DEFINES/dcs/heretic_signals.dm @@ -0,0 +1,15 @@ +/// Heretic signals + +/// From /datum/spell/touch/mansus_grasp/cast_on_hand_hit : (mob/living/source, mob/living/target) +#define COMSIG_HERETIC_MANSUS_GRASP_ATTACK "mansus_grasp_attack" + /// Default behavior is to use the hand, so return this to blocks the mansus fist from being consumed after use. + #define COMPONENT_BLOCK_HAND_USE (1<<0) +/// From /datum/spell/touch/mansus_grasp/cast_on_secondary_hand_hit : (mob/living/source, atom/target) +#define COMSIG_HERETIC_MANSUS_GRASP_ATTACK_SECONDARY "mansus_grasp_attack_secondary" + /// Default behavior is to continue attack chain and do nothing else, so return this to use up the hand after use. + #define COMPONENT_USE_HAND (1<<0) + +/// From /obj/item/melee/sickly_blade/afterattack : (mob/living/source, mob/living/target) +#define COMSIG_HERETIC_BLADE_ATTACK "blade_attack" +/// From /obj/item/melee/sickly_blade/ranged_interact_with_atom (without proximity) : (mob/living/source, mob/living/target) +#define COMSIG_HERETIC_RANGED_BLADE_ATTACK "ranged_blade_attack" diff --git a/code/__DEFINES/dcs/item_signals.dm b/code/__DEFINES/dcs/item_signals.dm index 922682352c74..b7f4f4541dce 100644 --- a/code/__DEFINES/dcs/item_signals.dm +++ b/code/__DEFINES/dcs/item_signals.dm @@ -116,3 +116,8 @@ #define COMSIG_SPEED_POTION_APPLIED "speed_potion" #define SPEED_POTION_STOP (1<<0) +// Organ signals +/// Called on the organ when it is implanted into someone (mob/living/carbon/receiver) +#define COMSIG_ORGAN_IMPLANTED "organ_implanted" +/// Called on the organ when it is removed from someone (mob/living/carbon/old_owner) +#define COMSIG_ORGAN_REMOVED "organ_removed" diff --git a/code/__DEFINES/dcs/leash_signals.dm b/code/__DEFINES/dcs/leash_signals.dm new file mode 100644 index 000000000000..d85fdd3e6fa0 --- /dev/null +++ b/code/__DEFINES/dcs/leash_signals.dm @@ -0,0 +1,8 @@ +/// Called when a /datum/component/leash must forcibly teleport the parent to the owner. +/// Fired on the object with the leash component. +#define COMSIG_LEASH_FORCE_TELEPORT "leash_force_teleport" + +/// Called when a /datum/component/leash plans on pathfinding to the target, if out of range. +/// Fired on the object with the leash component. +#define COMSIG_LEASH_PATH_STARTED "leash_path_started" + diff --git a/code/__DEFINES/dcs/mob_signals.dm b/code/__DEFINES/dcs/mob_signals.dm index bcbdc4fbf73c..4538bb0bdcb6 100644 --- a/code/__DEFINES/dcs/mob_signals.dm +++ b/code/__DEFINES/dcs/mob_signals.dm @@ -101,6 +101,12 @@ ///Called when movement intent is toggled. #define COMSIG_MOVE_INTENT_TOGGLED "move_intent_toggled" +///from base of obj/allowed(mob/M): (/obj) returns ACCESS_ALLOWED if mob has id access to the obj +#define COMSIG_MOB_TRIED_ACCESS "tried_access" + #define ACCESS_ALLOWED (1<<0) + #define ACCESS_DISALLOWED (1<<1) + #define LOCKED_ATOM_INCOMPATIBLE (1<<2) + // /mob/living ///from base of mob/living/resist() (/mob/living) @@ -219,6 +225,38 @@ /// from remove_ventcrawler(): (mob/living/crawler) #define COMSIG_LIVING_EXIT_VENTCRAWL "living_exit_ventcrawl" + +///From living/Life(). (seconds, times_fired) +#define COMSIG_LIVING_LIFE "living_life" + /// Block the Life() proc from proceeding... this should really only be done in some really wacky situations. + #define COMPONENT_LIVING_CANCEL_LIFE_PROCESSING (1<<0) + +/// Sent from /datum/action/cooldown/spell/before_cast() to the caster: (datum/action/cooldown/spell/spell, atom/cast_on) +#define COMSIG_MOB_BEFORE_SPELL_CAST "mob_spell_pre_cast" +/// Sent from /datum/action/cooldown/spell/before_cast() to the spell: (atom/cast_on) +#define COMSIG_SPELL_BEFORE_CAST "spell_pre_cast" + /// Return to prevent the spell cast from continuing. + #define SPELL_CANCEL_CAST (1 << 0) + /// Return from before cast signals to prevent the spell from giving off sound or invocation. + #define SPELL_NO_FEEDBACK (1 << 1) + /// Return from before cast signals to prevent the spell from going on cooldown before aftercast. + #define SPELL_NO_IMMEDIATE_COOLDOWN (1 << 2) + +#define COMSIG_TOUCH_HANDLESS_CAST "spell_touch_handless_cast" + /// Return this to prevent the hand spawning/unspawning + #define COMPONENT_CAST_HANDLESS (1<<0) + +///From /obj/effect/rune/convert/do_sacrifice() : (list/invokers) +#define COMSIG_LIVING_CULT_SACRIFICED "living_cult_sacrificed" + /// Return to stop the sac from occurring + #define STOP_SACRIFICE (1<<0) + /// Don't send a message for sacrificing this thing, we have our own + #define SILENCE_SACRIFICE_MESSAGE (1<<1) + /// Don't send a message for sacrificing this thing UNLESS it's the cult target + #define SILENCE_NONTARGET_SACRIFICE_MESSAGE (1<<2) + /// Dusts the target instead of gibbing them (no soulstone) + #define DUST_SACRIFICE (1<<3) + /// From base of /client/Move(): (new_loc, direction) #define COMSIG_MOB_CLIENT_PRE_MOVE "mob_client_pre_move" /// Should always match COMPONENT_MOVABLE_BLOCK_PRE_MOVE as these are interchangeable and used to block movement. diff --git a/code/__DEFINES/dcs/obj_signals.dm b/code/__DEFINES/dcs/obj_signals.dm index 4b138f7146a3..50977c72c93d 100644 --- a/code/__DEFINES/dcs/obj_signals.dm +++ b/code/__DEFINES/dcs/obj_signals.dm @@ -41,3 +41,9 @@ /// from /datum/component/shelver/shelf_items() #define COMSIG_SHELF_ATTEMPT_PICKUP "shelf_attempt_pickup" #define SHELF_PICKUP_FAILURE (1 << 0) + +/// When the lionhunter rifle hits something +#define COMSIG_LIONHUNTER_ON_HIT "lionhunter_on_hit" + +/// When the lionhunter shoots so I can unscope +#define COMSIG_LIONHUNTER_FIRE "lionhunter_fire" diff --git a/code/__DEFINES/flags.dm b/code/__DEFINES/flags.dm index 08c5087b4b09..a2a80b51e20e 100644 --- a/code/__DEFINES/flags.dm +++ b/code/__DEFINES/flags.dm @@ -149,6 +149,8 @@ #define NO_LAVA_GEN (1<<1) //Blocks lava rivers being generated on the turf #define NO_RUINS (1<<2) #define LAVA_BRIDGE (1<<3) //! This turf has already been reserved for a lavaland bridge placement. +/// Blocks this turf from being rusted +#define NO_RUST (1<<4) //ORGAN TYPE FLAGS #define AFFECT_ROBOTIC_ORGAN 1 diff --git a/code/__DEFINES/gamemode.dm b/code/__DEFINES/gamemode.dm index 76332f7fb738..ee9d862d2fdf 100644 --- a/code/__DEFINES/gamemode.dm +++ b/code/__DEFINES/gamemode.dm @@ -58,6 +58,7 @@ #define SPECIAL_ROLE_XENOMORPH_LARVA "Xenomorph Larva" #define SPECIAL_ROLE_ZOMBIE "Zombie" #define SPECIAL_ROLE_TOURIST "Tourist" +#define SPECIAL_ROLE_HERETIC "Heretic" #define SPECIAL_ROLE_EVENTMISC "Event Role" // Constants used by code which checks the status of nuclear blasts during a diff --git a/code/__DEFINES/hud.dm b/code/__DEFINES/hud.dm index 59ab3c75e31e..cc558e66ea49 100644 --- a/code/__DEFINES/hud.dm +++ b/code/__DEFINES/hud.dm @@ -28,6 +28,7 @@ #define GLAND_HUD "23"//Gland indicators for abductors #define JANI_HUD "24" // Sign overlay over cleanable decals #define PRESSURE_HUD "25" // Pressure coloring for tiles +#define HERETIC_HUD "26" // Seeing reality smashes and shit //by default everything in the hud_list of an atom is an image //a value in hud_list with one of these will change that behavior @@ -60,6 +61,10 @@ #define ANTAG_HUD_BLOB 22 #define ANTAG_HUD_ZOMBIE 23 #define ANTAG_HUD_MIND_FLAYER 24 +#define DATA_HUD_HERETIC 25 +#define ANTAG_HUD_HERETIC 26 +#define ANTAG_HUD_HERETIC_BEAST 27 + // Notification action types #define NOTIFY_JUMP "jump" diff --git a/code/__DEFINES/layers.dm b/code/__DEFINES/layers.dm index cfe41cb599e2..e9704d9c49ff 100644 --- a/code/__DEFINES/layers.dm +++ b/code/__DEFINES/layers.dm @@ -16,7 +16,7 @@ #define FLOOR_LIGHTING_LAMPS_SELFGLOW -3 #define FLOOR_LIGHTING_LAMPS_PLANE -2 #define FLOOR_LIGHTING_LAMPS_RENDER_TARGET "*FLOOR_LIGHTING_LAMPS_RENDER_TARGET" - +#define ABOVE_GAME_PLANE -1.5 #define GAME_PLANE -1 #define BLACKNESS_PLANE 0 //To keep from conflicts with SEE_BLACKNESS internals diff --git a/code/__DEFINES/misc_defines.dm b/code/__DEFINES/misc_defines.dm index 17d241fed8bf..3ac915064d0b 100644 --- a/code/__DEFINES/misc_defines.dm +++ b/code/__DEFINES/misc_defines.dm @@ -487,6 +487,8 @@ /// Prepares a text to be used for maptext. Use this so it doesn't look hideous. #define MAPTEXT(text) {"[##text]"} #define MAPTEXT_CENTER(text) {"[##text]"} +/// Small size. (ie: context subtooltips, spell delays) - Size options: 12pt 24pt. +#define MAPTEXT_TINY_UNICODE(text) {"[##text]"} //Fullscreen overlay resolution in tiles. #define FULLSCREEN_OVERLAY_RESOLUTION_X 15 diff --git a/code/__DEFINES/mob_defines.dm b/code/__DEFINES/mob_defines.dm index 92fa20a22f80..6860dbd49fed 100644 --- a/code/__DEFINES/mob_defines.dm +++ b/code/__DEFINES/mob_defines.dm @@ -10,6 +10,8 @@ #define ORGAN_DISFIGURED (1 << 6) #define ORGAN_BURNT (1 << 7) #define ORGAN_SALVED (1 << 8) +/// An organ that is ostensibly dangerous when inside a body +#define ORGAN_HAZARDOUS (1 << 9) // Organ datum defines. Each one of these represents a slot for organ datums in internal_organ_datums #define ORGAN_DATUM_HEART "heart" @@ -384,6 +386,14 @@ #define BRAIN_DAMAGE_RATIO_SEVERE 8 / 12 #define BRAIN_DAMAGE_RATIO_CRITICAL 10 / 12 +//Disgust levels for humans +#define DISGUST_LEVEL_MAXEDOUT 1500 +#define DISGUST_LEVEL_VERYDISGUSTED 1000 +#define DISGUST_LEVEL_DISGUSTED 750 +#define DISGUST_LEVEL_VERYGROSS 500 +#define DISGUST_LEVEL_GROSS 250 + #define GRAB_PIXEL_SHIFT_PASSIVE 6 #define GRAB_PIXEL_SHIFT_AGGRESSIVE 12 #define GRAB_PIXEL_SHIFT_NECK 16 + diff --git a/code/__DEFINES/role_preferences.dm b/code/__DEFINES/role_preferences.dm index db23d9ac73b5..f5609610f5db 100644 --- a/code/__DEFINES/role_preferences.dm +++ b/code/__DEFINES/role_preferences.dm @@ -28,6 +28,7 @@ #define ROLE_TOURIST "Tourist" #define ROLE_VAMPIRE "vampire" #define ROLE_MIND_FLAYER "mindflayer" +#define ROLE_HERETIC "heretic" // Role tags for EVERYONE! #define ROLE_DEMON "demon" #define ROLE_SENTIENT "sentient animal" @@ -70,6 +71,7 @@ GLOBAL_LIST_INIT(special_roles, list( ROLE_ALIEN, // Xenomorph ROLE_WIZARD = /datum/game_mode/wizard, // Wizard ROLE_MIND_FLAYER, + ROLE_HERETIC, // UNUSED/BROKEN ANTAGS // ROLE_HOG_GOD = /datum/game_mode/hand_of_god, // ROLE_HOG_CULTIST = /datum/game_mode/hand_of_god, diff --git a/code/__DEFINES/sound_defines.dm b/code/__DEFINES/sound_defines.dm index eff43522ba33..b75a538e617d 100644 --- a/code/__DEFINES/sound_defines.dm +++ b/code/__DEFINES/sound_defines.dm @@ -91,7 +91,7 @@ -#define CREEPY_SOUNDS list('sound/effects/ghost.ogg', 'sound/effects/ghost2.ogg', 'sound/effects/heart_beat.ogg', 'sound/effects/screech.ogg',\ +#define CREEPY_SOUNDS list('sound/effects/ghost.ogg', 'sound/effects/ghost2.ogg', 'sound/effects/heartbeat.ogg', 'sound/effects/screech.ogg',\ 'sound/hallucinations/behind_you1.ogg', 'sound/hallucinations/behind_you2.ogg', 'sound/hallucinations/far_noise.ogg', 'sound/hallucinations/growl1.ogg', 'sound/hallucinations/growl2.ogg',\ 'sound/hallucinations/growl3.ogg', 'sound/hallucinations/im_here1.ogg', 'sound/hallucinations/im_here2.ogg', 'sound/hallucinations/i_see_you1.ogg', 'sound/hallucinations/i_see_you2.ogg',\ 'sound/hallucinations/look_up1.ogg', 'sound/hallucinations/look_up2.ogg', 'sound/hallucinations/over_here1.ogg', 'sound/hallucinations/over_here2.ogg', 'sound/hallucinations/over_here3.ogg',\ diff --git a/code/__DEFINES/spell_defines.dm b/code/__DEFINES/spell_defines.dm index e23568a6103e..ef982338e451 100644 --- a/code/__DEFINES/spell_defines.dm +++ b/code/__DEFINES/spell_defines.dm @@ -8,3 +8,7 @@ #define SMOKE_HARMLESS 1 #define SMOKE_COUGHING 2 #define SMOKE_SLEEPING 3 + +#define INVOCATION_NONE "none" +#define INVOCATION_WHISPER "whisper" +#define INVOCATION_SHOUT "shout" diff --git a/code/__DEFINES/status_effects.dm b/code/__DEFINES/status_effects.dm index ff56ca0501d8..47867d53afee 100644 --- a/code/__DEFINES/status_effects.dm +++ b/code/__DEFINES/status_effects.dm @@ -185,6 +185,7 @@ #define STATUS_EFFECT_NO_OXY_HEAL /datum/status_effect/transient/no_oxy_heal #define STATUS_EFFECT_JITTER /datum/status_effect/transient/jittery #define STATUS_EFFECT_CULT_SLUR /datum/status_effect/transient/cult_slurring +#define STATUS_EFFECT_HERETIC_SLUR /datum/status_effect/transient/heretic_slurring #define STATUS_EFFECT_STAMMER /datum/status_effect/transient/stammering #define STATUS_EFFECT_SLURRING /datum/status_effect/transient/slurring #define STATUS_EFFECT_LOSE_BREATH /datum/status_effect/transient/lose_breath diff --git a/code/__DEFINES/turfs.dm b/code/__DEFINES/turfs.dm index f383b4d5540c..51b4ffeefb66 100644 --- a/code/__DEFINES/turfs.dm +++ b/code/__DEFINES/turfs.dm @@ -13,3 +13,10 @@ #define MINERAL_PREVENT_DIG 0 //! A mineral turf should not be changed when mined. #define MINERAL_ALLOW_DIG 1 //! A mineral turf should be dug out when mined. + +// Defines for turfs rust resistance +#define RUST_RESISTANCE_BASIC 1 +#define RUST_RESISTANCE_REINFORCED 2 +#define RUST_RESISTANCE_TITANIUM 3 +#define RUST_RESISTANCE_ORGANIC 4 +#define RUST_RESISTANCE_ABSOLUTE 5 diff --git a/code/__HELPERS/_logging.dm b/code/__HELPERS/_logging.dm index 8cef0495e8e0..11cf7d2e7fd8 100644 --- a/code/__HELPERS/_logging.dm +++ b/code/__HELPERS/_logging.dm @@ -236,6 +236,9 @@ GLOBAL_PROTECT(log_end) /proc/start_log(log) rustg_log_write(log, "Starting up. Round ID is [GLOB.round_id ? GLOB.round_id : "NULL"]\n-------------------------[GLOB.log_end]") +/proc/log_heretic_knowledge(log) + rustg_log_write(GLOB.world_game_log, "Heretic knowledge log: [log]") + // Helper procs for building detailed log lines /proc/datum_info_line(datum/d) diff --git a/code/__HELPERS/cmp.dm b/code/__HELPERS/cmp.dm index e8bbb9c728da..b1b45560b3ff 100644 --- a/code/__HELPERS/cmp.dm +++ b/code/__HELPERS/cmp.dm @@ -57,3 +57,7 @@ /proc/cmp_changeling_power_category_asc(datum/changeling_power_category/a, datum/changeling_power_category/b) return initial(a.priority) - initial(b.priority) + +/// Orders heretic knowledge by priority +/proc/cmp_heretic_knowledge(datum/heretic_knowledge/knowledge_a, datum/heretic_knowledge/knowledge_b) + return initial(knowledge_b.priority) - initial(knowledge_a.priority) diff --git a/code/__HELPERS/game.dm b/code/__HELPERS/game.dm index e6f5604890cb..4bf5b2b0c12b 100644 --- a/code/__HELPERS/game.dm +++ b/code/__HELPERS/game.dm @@ -496,3 +496,28 @@ min(list_y), max(list_x), max(list_y)) + +///Checks to see if `atom/source` is behind `atom/target` +/proc/check_behind(atom/source, atom/target) + // Let's see if source is behind target + // "Behind" is defined as 3 tiles directly to the back of the target + // x . . + // x > . + // x . . + + // We'll take "same tile" as "behind" for ease + if(target.loc == source.loc) + return TRUE + + // We'll also assume lying down is behind, as mob directions when lying are unclear + if(isliving(target)) + var/mob/living/living_target = target + if(living_target.body_position == LYING_DOWN) + return TRUE + + // Exceptions aside, let's actually check if they're, yknow, behind + var/dir_target_to_source = get_dir(target, source) + if(target.dir & REVERSE_DIR(dir_target_to_source)) + return TRUE + + return FALSE diff --git a/code/__HELPERS/lists.dm b/code/__HELPERS/lists.dm index 47947cb245f1..5adfb3b58d64 100644 --- a/code/__HELPERS/lists.dm +++ b/code/__HELPERS/lists.dm @@ -965,3 +965,12 @@ /proc/lists_equal_unordered(list/list_one, list/list_two) // This ensures that both lists contain the same elements by checking if the difference between them is empty in both directions. return !length(list_one ^ list_two) + + +///Flattens a keyed list into a list of its contents +/proc/flatten_list(list/key_list) + if(!islist(key_list)) + return null + . = list() + for(var/key in key_list) + . |= LIST_VALUE_WRAP_LISTS(key_list[key]) diff --git a/code/__HELPERS/trait_helpers.dm b/code/__HELPERS/trait_helpers.dm index 824927828226..b10185b62726 100644 --- a/code/__HELPERS/trait_helpers.dm +++ b/code/__HELPERS/trait_helpers.dm @@ -253,8 +253,22 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai #define TRAIT_RECENTLY_BLOCKED_MAGIC "recently_blocked_magic" #define TRAIT_UNKNOWN "unknown" // The person with this trait always appears as 'unknown'. #define TRAIT_CRYO_DESPAWNING "cryo_despawning" // dont adminbus this please + +/// Trait given to anything linked to, not necessarily allied to, the mansus +#define TRAIT_MANSUS_TOUCHED "mansus_touched" +/// This trait makes you immune to baton knockdown. +#define TRAIT_BATON_RESISTANCE "baton_resistance" + #define TRAIT_EXAMINE_HALLUCINATING "examine_hallucinating" +#define TRAIT_BOMBIMMUNE "bombimmune" +/// Trait for when you can no longer gain body heat +#define TRAIT_HYPOTHERMIC "body_hypothermic" + +/// Used to prevent multiple floating blades from triggering over the same target +#define TRAIT_BEING_BLADE_SHIELDED "being_blade_shielded" + + //***** MIND TRAITS *****/ #define TRAIT_HOLY "is_holy" // The mob is holy in regards to religion #define TRAIT_TABLE_LEAP "table_leap" // Lets bartender and chef mount tables faster @@ -286,6 +300,10 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai #define TRAIT_SILENT_INSERTION "silent_insertion" /// Makes an item active, this is generally used by energy based weapons or toggle based items. #define TRAIT_ITEM_ACTIVE "item_active" +/// Allows heretics to cast their spells. +#define TRAIT_ALLOW_HERETIC_CASTING "allow_heretic_casting" +/// Designates a heart as a living heart for a heretic. +#define TRAIT_LIVING_HEART "living_heart" /// A surgical tool; when in hand in help intent (and with a surgery in progress) won't attack the user #define TRAIT_SURGICAL "surgical_tool" @@ -437,10 +455,14 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai // Causes the effect to go through a teleporter instead of being deleted by it. #define TRAIT_EFFECT_CAN_TELEPORT "trait_effect_can_teleport" +/// Trait applied by element +#define ELEMENT_TRAIT(source) "element_trait_[source]" + //***** MOVABLE ATOM TRAITS *****// // Prevents the atom from being transitioned to another Z level when approaching the edge of the map. #define TRAIT_NO_EDGE_TRANSITIONS "trait_no_edge_transitions" + //***** PROC WRAPPERS *****// /// Proc wrapper of add_trait. You should only use this for callback. Otherwise, use the macro. /proc/callback_add_trait(datum/target, trait, source) @@ -449,3 +471,13 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai /// Proc wrapper of remove_trait. You should only use this for callback. Otherwise, use the macro. /proc/callback_remove_trait(datum/target, trait, source) REMOVE_TRAIT(target, trait, source) + +/// Proc that handles adding multiple traits to a target via a list. Must have a common source and target. +/datum/proc/add_traits(list/list_of_traits, source) + for(var/trait in list_of_traits) + ADD_TRAIT(src, trait, source) + +/// Proc that handles removing multiple traits from a target via a list. Must have a common source and target. +/datum/proc/remove_traits(list/list_of_traits, source) + for(var/trait in list_of_traits) + REMOVE_TRAIT(src, trait, source) diff --git a/code/_globalvars/game_modes.dm b/code/_globalvars/game_modes.dm index 664ae5577d2c..575d6e05ba5d 100644 --- a/code/_globalvars/game_modes.dm +++ b/code/_globalvars/game_modes.dm @@ -5,3 +5,6 @@ GLOBAL_VAR_INIT(secret_force_mode, "secret") // if this is anything but "secret" GLOBAL_DATUM(start_state, /datum/station_state) // Used in round-end report. Dont ask why it inits as null GLOBAL_VAR(custom_event_msg) + +/// We want reality_smash_tracker to exist only once and be accessible from anywhere. +GLOBAL_DATUM_INIT(reality_smash_track, /datum/reality_smash_tracker, new) diff --git a/code/_globalvars/mapping_vars.dm b/code/_globalvars/mapping_vars.dm index dc095a33d16d..9857682431f3 100644 --- a/code/_globalvars/mapping_vars.dm +++ b/code/_globalvars/mapping_vars.dm @@ -46,3 +46,10 @@ GLOBAL_LIST_EMPTY(space_ruins_templates) GLOBAL_LIST_EMPTY(lava_ruins_templates) GLOBAL_LIST_EMPTY(shelter_templates) GLOBAL_LIST_EMPTY(shuttle_templates) + +GLOBAL_LIST_INIT(cardinals, list( + NORTH, + SOUTH, + EAST, + WEST, +)) diff --git a/code/_globalvars/traits.dm b/code/_globalvars/traits.dm index c9a69c212ba9..b18919127d22 100644 --- a/code/_globalvars/traits.dm +++ b/code/_globalvars/traits.dm @@ -112,7 +112,11 @@ GLOBAL_LIST_INIT(traits_by_type, list( "TRAIT_ANTIMAGIC_NO_SELFBLOCK" = TRAIT_ANTIMAGIC_NO_SELFBLOCK, "TRAIT_RECENTLY_BLOCKED_MAGIC" = TRAIT_RECENTLY_BLOCKED_MAGIC, "TRAIT_UNKNOWN" = TRAIT_UNKNOWN, - "TRAIT_EXAMINE_HALLUCINATING" = TRAIT_EXAMINE_HALLUCINATING + "TRAIT_MANSUS_TOUCHED" = TRAIT_MANSUS_TOUCHED, + "TRAIT_BATON_RESISTANCE" = TRAIT_BATON_RESISTANCE, + "TRAIT_EXAMINE_HALLUCINATING" = TRAIT_EXAMINE_HALLUCINATING, + "TRAIT_BOMBIMMUNE" = TRAIT_BOMBIMMUNE, + "TRAIT_HYPOTHERMIC" = TRAIT_HYPOTHERMIC ), /datum/mind = list( @@ -140,7 +144,9 @@ GLOBAL_LIST_INIT(traits_by_type, list( "TRAIT_HYPOSPRAY_IMMUNE" = TRAIT_HYPOSPRAY_IMMUNE, "TRAIT_ITEM_ACTIVE" = TRAIT_ITEM_ACTIVE, "TRAIT_NO_STRIP" = TRAIT_NO_STRIP, - "TRAIT_SKIP_EXAMINE" = TRAIT_SKIP_EXAMINE + "TRAIT_SKIP_EXAMINE" = TRAIT_SKIP_EXAMINE, + "TRAIT_ALLOW_HERETIC_CASTING" = TRAIT_ALLOW_HERETIC_CASTING, + "TRAIT_LIVING_HEART" = TRAIT_LIVING_HEART ), /turf = list( diff --git a/code/_onclick/click.dm b/code/_onclick/click.dm index c108b54e38cf..84d9434e48b3 100644 --- a/code/_onclick/click.dm +++ b/code/_onclick/click.dm @@ -52,8 +52,8 @@ return if(client?.click_intercept) - client.click_intercept.InterceptClickOn(src, params, A) - return + if(client.click_intercept.InterceptClickOn(src, params, A)) + return if(next_click > world.time) return diff --git a/code/_onclick/hud/fullscreen.dm b/code/_onclick/hud/fullscreen.dm index d004fe49e2a3..3f77966aa216 100644 --- a/code/_onclick/hud/fullscreen.dm +++ b/code/_onclick/hud/fullscreen.dm @@ -121,6 +121,12 @@ icon_state = "fog" color = "#FF0000" +/atom/movable/screen/fullscreen/stretch/curse + icon = 'icons/mob/screen_fog.dmi' + icon_state = "curse" + layer = CURSE_LAYER + plane = FULLSCREEN_PLANE + /atom/movable/screen/fullscreen/stretch/flash icon = 'icons/mob/screen_gen.dmi' screen_loc = "WEST,SOUTH to EAST,NORTH" diff --git a/code/controllers/subsystem/non_firing/SSmapping.dm b/code/controllers/subsystem/non_firing/SSmapping.dm index a236dabf7f7a..a114d07d473d 100644 --- a/code/controllers/subsystem/non_firing/SSmapping.dm +++ b/code/controllers/subsystem/non_firing/SSmapping.dm @@ -14,6 +14,8 @@ SUBSYSTEM_DEF(mapping) var/list/ghostteleportlocs ///List of areas that exist on the station this shift var/list/existing_station_areas + ///Types of areas that exist on the station this shift + var/list/existing_station_areas_types ///What do we have as the lavaland theme today? var/datum/lavaland_theme/lavaland_theme ///What primary cave theme we have picked for cave generation today. @@ -169,6 +171,7 @@ SUBSYSTEM_DEF(mapping) // Now we make a list of areas that exist on the station. Good for if you don't want to select areas that exist for one station but not others. Directly references existing_station_areas = list() + existing_station_areas_types = list() for(var/area/AR as anything in all_areas) var/list/pickable_turfs = list() for(var/turf/turfs in AR) @@ -177,6 +180,7 @@ SUBSYSTEM_DEF(mapping) var/turf/picked = safepick(pickable_turfs) if(picked && is_station_level(picked.z)) existing_station_areas += AR + existing_station_areas_types += AR.type CHECK_TICK // World name diff --git a/code/datums/atom_hud.dm b/code/datums/atom_hud.dm index 5178b181fbaf..855575fd1c27 100644 --- a/code/datums/atom_hud.dm +++ b/code/datums/atom_hud.dm @@ -26,13 +26,18 @@ GLOBAL_LIST_INIT(huds, list( ANTAG_HUD_EVENTMISC = new/datum/atom_hud/antag/hidden(), ANTAG_HUD_BLOB = new/datum/atom_hud/antag/hidden(), ANTAG_HUD_ZOMBIE = new/datum/atom_hud/antag(), - ANTAG_HUD_MIND_FLAYER = new/datum/atom_hud/antag/hidden() + ANTAG_HUD_MIND_FLAYER = new/datum/atom_hud/antag/hidden(), + DATA_HUD_HERETIC = new/datum/atom_hud/data/heretic(), + ANTAG_HUD_HERETIC = new/datum/atom_hud/antag/hidden(), + ANTAG_HUD_HERETIC_BEAST = new/datum/atom_hud/antag/hidden(), )) /datum/atom_hud var/list/atom/hudatoms = list() //list of all atoms which display this hud var/list/mob/hudusers = list() //list with all mobs who can see the hud var/list/hud_icons = list() //these will be the indexes for the atom's hud_list + /// Do we ignore the invisibility check? Used by heretic huds so we can see our stuff. + var/ignore_invisibility_check = FALSE /datum/atom_hud/New() @@ -85,7 +90,7 @@ GLOBAL_LIST_INIT(huds, list( /datum/atom_hud/proc/add_to_single_hud(mob/M, atom/A) //unsafe, no sanity apart from client if(!M || !M.client || !A) return - if(A.invisibility > M.see_invisible) // yee yee ass snowflake check for our yee yee ass snowflake huds + if((A.invisibility > M.see_invisible) && !ignore_invisibility_check) // yee yee ass snowflake check for our yee yee ass snowflake huds return for(var/i in hud_icons) if(A.hud_list[i]) diff --git a/code/datums/beam.dm b/code/datums/beam.dm index 3f809569965f..119ab8428c92 100644 --- a/code/datums/beam.dm +++ b/code/datums/beam.dm @@ -176,6 +176,23 @@ var/armor = L.run_armor_check(limb_to_hit, LASER) L.apply_damage(damage, BURN, limb_to_hit, armor) +// The beam fireblast spits out, causes people to walk through it to be on fire +/obj/effect/ebeam/fire + name = "fire beam" + +/obj/effect/ebeam/fire/on_atom_entered(datum/source, atom/movable/entered) + if(!isliving(entered)) + return + var/mob/living/living_entered = entered + if(IS_HERETIC_OR_MONSTER(living_entered) || living_entered.has_status_effect(/datum/status_effect/fire_blasted)) + return + living_entered.apply_damage(10, BURN) + living_entered.adjust_fire_stacks(2) + living_entered.IgniteMob() + // Apply the fireblasted effect - no overlay + living_entered.apply_status_effect(/datum/status_effect/fire_blasted) + + /atom/proc/Beam(atom/BeamTarget, icon_state="b_beam", icon='icons/effects/beam.dmi', time = 5 SECONDS, maxdistance = 10, beam_type = /obj/effect/ebeam, beam_sleep_time = 3, beam_color) var/datum/beam/newbeam = new(src, BeamTarget, icon, icon_state, time, maxdistance, beam_type, beam_sleep_time, beam_color) INVOKE_ASYNC(newbeam, TYPE_PROC_REF(/datum/beam, Start)) diff --git a/code/datums/click_intercept.dm b/code/datums/click_intercept.dm index 78e8c8725f7d..fe195a8161f9 100644 --- a/code/datums/click_intercept.dm +++ b/code/datums/click_intercept.dm @@ -44,10 +44,11 @@ * * If the mob's `client.click_intercept` variable is set to something other than null, calls the `InterceptClickOn` proc for that click intercept datum. Aka, this proc. * + * If you return TRUE, click on ends the click. Otherwise, normal clicking happens * Arguments: * * user - the mob which just clicked on something. * * params - the `params` arguemnt passed from the `ClickOn` proc. * * object - the atom that was just clicked. */ /datum/click_intercept/proc/InterceptClickOn(mob/user, params, atom/object) - return + return TRUE diff --git a/code/datums/components/effect_remover.dm b/code/datums/components/effect_remover.dm new file mode 100644 index 000000000000..cb0c12c81b71 --- /dev/null +++ b/code/datums/components/effect_remover.dm @@ -0,0 +1,84 @@ +/* + * Simple component for something that is able to destroy + * certain effects (such as cult runes) in one attack. + */ +/datum/component/effect_remover + dupe_mode = COMPONENT_DUPE_ALLOWED + /// Line sent to the user on successful removal. + var/success_feedback + /// Line forcesaid by the user on successful removal. + var/success_forcesay + /// Callback invoked with removal is done. + var/datum/callback/on_clear_callback + /// A typecache of all effects we can clear with our item. + var/list/obj/effect/effects_we_clear + /// If above 0, how long it takes while standing still to remove the effect. + var/time_to_remove = 0 SECONDS + +/datum/component/effect_remover/Initialize( + success_forcesay, + success_feedback, + on_clear_callback, + effects_we_clear, + time_to_remove, + ) + + . = ..() + if(!isitem(parent)) + return COMPONENT_INCOMPATIBLE + + if(!effects_we_clear) + stack_trace("[type] was instantiated without any valid removable effects!") + return COMPONENT_INCOMPATIBLE + + src.success_feedback = success_feedback + src.success_forcesay = success_forcesay + src.on_clear_callback = on_clear_callback + src.effects_we_clear = typecacheof(effects_we_clear) + src.time_to_remove = time_to_remove + +/datum/component/effect_remover/Destroy(force) + on_clear_callback = null + return ..() + +/datum/component/effect_remover/RegisterWithParent() + RegisterSignal(parent, COMSIG_INTERACTING, PROC_REF(try_remove_effect)) + + + +/datum/component/effect_remover/UnregisterFromParent() + UnregisterSignal(parent, COMSIG_INTERACTING) + +/* + * Signal proc for [COMSIG_ITEM_INTERACTING_WITH_ATOM]. + */ + +/datum/component/effect_remover/proc/try_remove_effect(datum/source, mob/user, atom/target) + SIGNAL_HANDLER + + if(!isliving(user)) + return NONE + + if(is_type_in_typecache(target, effects_we_clear)) // Make sure we get all subtypes and everything + INVOKE_ASYNC(src, PROC_REF(do_remove_effect), target, user) + return ITEM_INTERACT_COMPLETE + +/* + * Actually removes the effect, invoking our on_clear_callback before it's deleted. + */ +/datum/component/effect_remover/proc/do_remove_effect(obj/effect/target, mob/living/user) + if(time_to_remove && !do_after(user, time_to_remove, target = target)) + return + + var/obj/item/item_parent = parent + if(success_forcesay) + user.say(success_forcesay) + if(success_feedback) + var/real_feedback = replacetext(success_feedback, "%THEEFFECT", "\the [target]") + real_feedback = replacetext(real_feedback, "%THEWEAPON", "\the [item_parent]") + to_chat(user, real_feedback) + on_clear_callback?.Invoke(target, user) + + if(!QDELETED(target)) + qdel(target) + diff --git a/code/datums/components/leash.dm b/code/datums/components/leash.dm new file mode 100644 index 000000000000..8fa6e975adde --- /dev/null +++ b/code/datums/components/leash.dm @@ -0,0 +1,176 @@ +/// Keeps the parent within the distance of its owner as naturally as possible, +/// but teleporting if necessary. +/datum/component/leash + /// The owner of the leash. If this is qdeleted, the leash is as well. + var/atom/movable/owner + + /// The maximum distance you can move from your owner + var/distance + + /// The object type to create on the old turf when forcibly teleporting out + var/force_teleport_out_effect + + /// The object type to create on the new turf when forcibly teleporting out + var/force_teleport_in_effect + + VAR_PRIVATE + // Pathfinding can yield, so only move us closer if this is the best one + current_path_tick = 0 + last_completed_path_tick = 0 + + performing_path_move = FALSE + +/datum/component/leash/Initialize( + atom/movable/owner, + distance = 3, + force_teleport_out_effect, + force_teleport_in_effect, +) + . = ..() + + if(!ismovable(parent)) + stack_trace("Parent must be a movable") + return COMPONENT_INCOMPATIBLE + + if(!ismovable(owner)) + stack_trace("[owner] (owner) is not a movable") + return COMPONENT_INCOMPATIBLE + + if(!isnum(distance)) + stack_trace("[distance] (distance) must be a number") + return COMPONENT_INCOMPATIBLE + + if(!isnull(force_teleport_out_effect) && !ispath(force_teleport_out_effect)) + stack_trace("force_teleport_out_effect must be null or a path, not [force_teleport_out_effect]") + return COMPONENT_INCOMPATIBLE + + if(!isnull(force_teleport_in_effect) && !ispath(force_teleport_in_effect)) + stack_trace("force_teleport_in_effect must be null or a path, not [force_teleport_in_effect]") + return COMPONENT_INCOMPATIBLE + + src.owner = owner + src.distance = distance + src.force_teleport_out_effect = force_teleport_out_effect + src.force_teleport_in_effect = force_teleport_in_effect + + RegisterSignal(owner, COMSIG_PARENT_QDELETING, PROC_REF(on_owner_qdel)) + + var/static/list/container_connections = list( + COMSIG_MOVABLE_MOVED = PROC_REF(on_owner_moved), + ) + + AddComponent(/datum/component/connect_containers, owner, container_connections) + RegisterSignal(owner, COMSIG_MOVABLE_MOVED, PROC_REF(on_owner_moved)) + RegisterSignal(parent, COMSIG_MOVABLE_PRE_MOVE, PROC_REF(on_parent_pre_move)) + + check_distance() + +/datum/component/leash/Destroy() + owner = null + return ..() + +/datum/component/leash/proc/set_distance(distance) + ASSERT(isnum(distance)) + src.distance = distance + check_distance() + +/datum/component/leash/proc/on_owner_qdel() + SIGNAL_HANDLER + PRIVATE_PROC(TRUE) + + qdel(src) + +/datum/component/leash/proc/on_owner_moved(atom/movable/source) + SIGNAL_HANDLER + PRIVATE_PROC(TRUE) + + check_distance() + +/datum/component/leash/proc/on_parent_pre_move(atom/movable/source, atom/new_location) + SIGNAL_HANDLER + PRIVATE_PROC(TRUE) + + if(performing_path_move) + return NONE + + var/turf/new_location_turf = get_turf(new_location) + if(get_dist(new_location_turf, owner) <= distance) + return NONE + + if(ismob(source)) + to_chat(source, "You are too far away!") + + return COMPONENT_MOVABLE_BLOCK_PRE_MOVE + +/datum/component/leash/proc/check_distance() + set waitfor = FALSE + PRIVATE_PROC(TRUE) + + if(get_dist(parent, owner) <= distance) + return + + var/atom/movable/atom_parent = parent + if(isnull(owner.loc)) + atom_parent.moveToNullspace() // If our parent is in nullspace I guess we gotta go there too + return + if(isnull(atom_parent.loc)) + force_teleport_back("in nullspace") // If we're in nullspace, get outta there + return + + SEND_SIGNAL(parent, COMSIG_LEASH_PATH_STARTED) + + current_path_tick += 1 + var/our_path_tick = current_path_tick + + var/list/path = get_path_to(parent, owner, mintargetdist = distance) + + if(last_completed_path_tick > our_path_tick) + return + + last_completed_path_tick = our_path_tick + + commit_path(path) + +/datum/component/leash/proc/commit_path(list/turf/path) + SHOULD_NOT_SLEEP(TRUE) + PRIVATE_PROC(TRUE) + + performing_path_move = TRUE + + var/atom/movable/movable_parent = parent + + for(var/turf/to_move as anything in path) + // Could be an older path, don't make us teleport back + if(!to_move.Adjacent(parent)) + continue + + if(!movable_parent.Move(to_move)) + force_teleport_back("bad path step") + performing_path_move = FALSE + return + + if(get_dist(parent, owner) > distance) + force_teleport_back("incomplete path") + + performing_path_move = FALSE + +/datum/component/leash/proc/force_teleport_back(reason) + PRIVATE_PROC(TRUE) + + var/atom/movable/movable_parent = parent + + SSblackbox.record_feedback("tally", "leash_force_teleport_back", 1, reason) + + if(force_teleport_out_effect) + new force_teleport_out_effect(movable_parent.loc) + + movable_parent.forceMove(get_turf(owner)) + + if(force_teleport_in_effect) + new force_teleport_in_effect(movable_parent.loc) + + if(ismob(movable_parent)) + to_chat(movable_parent, "You are too far away!") + + SEND_SIGNAL(parent, COMSIG_LEASH_FORCE_TELEPORT) + diff --git a/code/datums/components/scope.dm b/code/datums/components/scope.dm index 4ad8faa83d65..1ac0eec1c169 100644 --- a/code/datums/components/scope.dm +++ b/code/datums/components/scope.dm @@ -43,6 +43,7 @@ RegisterSignal(parent, COMSIG_PARENT_EXAMINE, PROC_REF(on_examine)) if(istype(parent, /obj/item/gun)) RegisterSignal(parent, COMSIG_GUN_TRY_FIRE, PROC_REF(on_gun_fire)) + RegisterSignal(parent, COMSIG_LIONHUNTER_FIRE, PROC_REF(on_lionhunter_fire)) /datum/component/scope/UnregisterFromParent() if(item_action_type) @@ -55,6 +56,7 @@ SIGNAL_REMOVETRAIT(TRAIT_WIELDED), COMSIG_GUN_TRY_FIRE, COMSIG_PARENT_EXAMINE, + COMSIG_LIONHUNTER_FIRE, )) /datum/component/scope/process() @@ -112,6 +114,13 @@ if(ZOOM_METHOD_WIELD) examine_list += "You can [scope] by wielding it with both hands." +/datum/component/scope/proc/on_lionhunter_fire(obj/item/gun/projectile/shotgun/boltaction/lionhunter/lion) + SIGNAL_HANDLER // COMSIG_LIONHUNTER_FIRE + if(is_zoomed_in()) + var/mob/living/user = lion.loc + stop_zooming(user) + + /** * We find and return the best target to hit on a given turf. * diff --git a/code/datums/elements/corrupt_organ.dm b/code/datums/elements/corrupt_organ.dm new file mode 100644 index 000000000000..88c24c5b37b7 --- /dev/null +++ b/code/datums/elements/corrupt_organ.dm @@ -0,0 +1,57 @@ +/// Component applying shared behaviour by cursed organs granted when sacrificed by a heretic +/// Mostly just does something spooky when it is removed +/datum/element/corrupted_organ + +/datum/element/corrupted_organ/Attach(obj/item/organ/target) + . = ..() + if(!is_internal_organ(target)) + return ELEMENT_INCOMPATIBLE + + RegisterSignal(target, COMSIG_ORGAN_REMOVED, PROC_REF(on_removed)) + + var/atom/atom_parent = target + atom_parent.color = COLOR_VOID_PURPLE + + atom_parent.add_filter(name = "ray", priority = 1, params = list( + type = "rays", + size = 12, + color = COLOR_VOID_PURPLE, + density = 12 + )) + var/ray_filter = atom_parent.get_filter("ray") + animate(ray_filter, offset = 100, time = 2 MINUTES, loop = -1, flags = ANIMATION_PARALLEL) // Absurdly long animate so nobody notices it hitching when it loops + animate(offset = 0, time = 2 MINUTES) // I sure hope duration of animate doesnt have any performance effect + +/datum/element/corrupted_organ/Detach(datum/source) + UnregisterSignal(source, list(COMSIG_ORGAN_REMOVED)) + return ..() + +/// When we're taken out of someone, do something spooky +/datum/element/corrupted_organ/proc/on_removed(obj/item/organ/organ, mob/living/carbon/loser) + SIGNAL_HANDLER // COMSIG_ORGAN_REMOVED + if(loser.reagents?.has_reagent("holywater") || loser.can_block_magic(MAGIC_RESISTANCE|MAGIC_RESISTANCE_HOLY) || prob(20)) + return + var/turf/origin_turf = get_turf(loser) + playsound(loser, 'sound/magic/forcewall.ogg', vol = 100) + new /obj/effect/temp_visual/curse_blast(origin_turf) + loser.visible_message("[organ] explodes in a burst of dark energy!") + for(var/mob/living/target in range(1, origin_turf)) + var/armor = target.run_armor_check(attack_flag = BOMB) + target.apply_damage(30, damagetype = BURN, blocked = armor, spread_damage = TRUE) + qdel(organ) + +/obj/effect/temp_visual/curse_blast + icon = 'icons/effects/64x64.dmi' + pixel_x = -16 + pixel_y = -16 + icon_state = "curse" + duration = 0.3 SECONDS + +/obj/effect/temp_visual/curse_blast/Initialize(mapload) + . = ..() + animate(src, transform = matrix() * 0.2, time = 0, flags = ANIMATION_PARALLEL) + animate(transform = matrix() * 2, time = duration, easing = EASE_IN) + + animate(src, alpha = 255, time = 0, flags = ANIMATION_PARALLEL) + animate(alpha = 255, time = 0.2 SECONDS) + animate(alpha = 0, time = 0.1 SECONDS) diff --git a/code/datums/elements/effect_trail.dm b/code/datums/elements/effect_trail.dm new file mode 100644 index 000000000000..7034c3af307e --- /dev/null +++ b/code/datums/elements/effect_trail.dm @@ -0,0 +1,28 @@ +\ +/* + * An element used for making a trail of effects appear behind a movable atom when it moves. + */ + +/datum/element/effect_trail + element_flags = ELEMENT_BESPOKE + argument_hash_start_idx = 2 + /// The effect used for the trail generation. + var/chosen_effect + +/datum/element/effect_trail/Attach(datum/target, chosen_effect = /obj/effect/forcefield/cosmic_field) + . = ..() + if(!ismovable(target)) + return ELEMENT_INCOMPATIBLE + RegisterSignal(target, COMSIG_MOVABLE_MOVED, PROC_REF(generate_effect)) + src.chosen_effect = chosen_effect + +/datum/element/effect_trail/Detach(datum/target) + . = ..() + UnregisterSignal(target, COMSIG_MOVABLE_MOVED) + +/// Generates an effect +/datum/element/effect_trail/proc/generate_effect(atom/movable/target_object) + SIGNAL_HANDLER + + var/turf/our_turf = get_turf(target_object) + new chosen_effect(our_turf) diff --git a/code/datums/elements/leaching_walk.dm b/code/datums/elements/leaching_walk.dm new file mode 100644 index 000000000000..69b78c675b9c --- /dev/null +++ b/code/datums/elements/leaching_walk.dm @@ -0,0 +1,60 @@ + +/// Buffs and heals the target while standing on rust. +/datum/element/leeching_walk + +/datum/element/leeching_walk/Attach(datum/target) + . = ..() + if(!isliving(target)) + return ELEMENT_INCOMPATIBLE + + RegisterSignal(target, COMSIG_MOVABLE_MOVED, PROC_REF(on_move)) + RegisterSignal(target, COMSIG_LIVING_LIFE, PROC_REF(on_life)) + +/datum/element/leeching_walk/Detach(datum/source) + . = ..() + UnregisterSignal(source, list(COMSIG_MOVABLE_MOVED, COMSIG_LIVING_LIFE)) + +/* + * Signal proc for [COMSIG_MOVABLE_MOVED]. + * + * Checks if we should have baton resistance on the new turf. + */ +/datum/element/leeching_walk/proc/on_move(mob/source, atom/old_loc, dir, forced, list/old_locs) + SIGNAL_HANDLER + + var/turf/mover_turf = get_turf(source) + if(HAS_TRAIT(mover_turf, TRAIT_RUSTY)) + ADD_TRAIT(source, TRAIT_BATON_RESISTANCE, type) + else + REMOVE_TRAIT(source, TRAIT_BATON_RESISTANCE, type) + +/** + * Signal proc for [COMSIG_LIVING_LIFE]. + * + * Gradually heals the heretic ([source]) on rust, + * including baton knockdown and stamina damage. + */ +/datum/element/leeching_walk/proc/on_life(mob/living/source) + SIGNAL_HANDLER + + var/turf/our_turf = get_turf(source) + if(!HAS_TRAIT(our_turf, TRAIT_RUSTY)) + return + + // Heals all damage + Stamina + var/need_mob_update = FALSE + need_mob_update += source.adjustBruteLoss(-3, updating_health = FALSE) + need_mob_update += source.adjustFireLoss(-3, updating_health = FALSE) + need_mob_update += source.adjustToxLoss(-3, updating_health = FALSE) + need_mob_update += source.adjustOxyLoss(-1.5, updating_health = FALSE) + need_mob_update += source.adjustStaminaLoss(-10, updating = FALSE) + if(need_mob_update) + source.updatehealth() + // Reduces duration of stuns/etc + source.AdjustParalysis(-0.5 SECONDS) + source.AdjustStunned(-0.5 SECONDS) + source.AdjustWeakened(-0.5 SECONDS) + source.AdjustKnockDown(-0.5 SECONDS) + // Heals blood loss + if(source.blood_volume < BLOOD_VOLUME_NORMAL) + source.blood_volume += 2.5 diff --git a/code/datums/elements/noticable_organ.dm b/code/datums/elements/noticable_organ.dm new file mode 100644 index 000000000000..e8762785c9ea --- /dev/null +++ b/code/datums/elements/noticable_organ.dm @@ -0,0 +1,60 @@ +/** + * noticable organ element; which makes organs have a special description added to the person with the organ, if certain body zones aren't covered. + * + * Used for infused mutant organs + */ +/datum/element/noticable_organ + element_flags = ELEMENT_BESPOKE + argument_hash_start_idx = 2 + + ///Shows on examining someone with an infused organ. + var/infused_desc + /// Which body zone has to be exposed. If none is set, this is always noticable. + var/body_zone + +/datum/element/noticable_organ/Attach(obj/item/organ/target, infused_desc, body_zone) + . = ..() + + if(!is_organ(target)) + return ELEMENT_INCOMPATIBLE + + src.infused_desc = infused_desc + src.body_zone = body_zone + + RegisterSignal(target, COMSIG_ORGAN_IMPLANTED, PROC_REF(enable_description)) + RegisterSignal(target, COMSIG_ORGAN_REMOVED, PROC_REF(on_removed)) + if(target.owner) + enable_description(target, target.owner) + +/datum/element/noticable_organ/Detach(obj/item/organ/target) + UnregisterSignal(target, list(COMSIG_ORGAN_IMPLANTED, COMSIG_ORGAN_REMOVED)) + if(target.owner) + UnregisterSignal(target.owner, COMSIG_PARENT_EXAMINE) + return ..() + +/// Proc that returns true or false if the organ should show its examine check. +/datum/element/noticable_organ/proc/should_show_text(mob/living/carbon/examined) + //if(body_zone && (body_zone in examined.get_covered_body_zones())) + // return FALSE + return TRUE //Qwertodo: Get this to depend on clothing + +/datum/element/noticable_organ/proc/enable_description(obj/item/organ/target, mob/living/carbon/receiver) + SIGNAL_HANDLER // COMSIG_ORGAN_IMPLANTED + + RegisterSignal(receiver, COMSIG_PARENT_EXAMINE, PROC_REF(on_receiver_examine)) + +/datum/element/noticable_organ/proc/on_removed(obj/item/organ/target, mob/living/carbon/loser) + SIGNAL_HANDLER // COMSIG_ORGAN_REMOVED + + UnregisterSignal(loser, COMSIG_PARENT_EXAMINE) + +/datum/element/noticable_organ/proc/on_receiver_examine(atom/A, mob/user, list/examine_list) + SIGNAL_HANDLER // COMSIG_PARENT_EXAMINE + + if(!should_show_text(A)) + return + + var/examine_text = infused_desc + + + examine_list += examine_text diff --git a/code/datums/elements/rust_element.dm b/code/datums/elements/rust_element.dm index d2464e016df7..d46a8c97b0a4 100644 --- a/code/datums/elements/rust_element.dm +++ b/code/datums/elements/rust_element.dm @@ -95,6 +95,10 @@ if(!isliving(entered)) return var/mob/living/victim = entered + if(IS_HERETIC(victim)) + return + if(victim.can_block_magic(MAGIC_RESISTANCE)) + return if(istype(victim, /mob/living/simple_animal/revenant)) return victim.apply_status_effect(STATUS_EFFECT_RUST_CORRUPTION) diff --git a/code/datums/helper_datums/teleport.dm b/code/datums/helper_datums/teleport.dm index a14b5722e230..588a49a9caab 100644 --- a/code/datums/helper_datums/teleport.dm +++ b/code/datums/helper_datums/teleport.dm @@ -238,3 +238,51 @@ if(random_location.is_safe()) return random_location + +///Returns a random department of areas to pass into get_safe_random_station_turf() for more equal spawning. +/proc/get_safe_random_station_turf_equal_weight() + // Big list of departments, each with lists of each area subtype. + var/static/list/department_areas + if(isnull(department_areas)) + department_areas = list( + subtypesof(/area/station/engineering), \ + subtypesof(/area/station/medical), \ + subtypesof(/area/station/science), \ + subtypesof(/area/station/security), \ + subtypesof(/area/station/service), \ + subtypesof(/area/station/command), \ + subtypesof(/area/station/hallway), \ + subtypesof(/area/station/supply) + ) + + var/list/area/final_department = pick(department_areas) // Pick a department + var/list/area/final_area_list = list() + + for(var/checked_area in final_department) // Check each area to make sure it exists on the station + if(checked_area in SSmapping.existing_station_areas_types) + final_area_list += checked_area + + if(!final_area_list.len) // Failsafe + return get_safe_random_station_turf() + + return get_safe_random_station_turf(final_area_list) + +/proc/get_safe_random_station_turf(list/areas_to_pick_from = SSmapping.existing_station_areas_types) + for(var/i in 1 to 5) + var/list/turf_list = get_area_turfs(pick(areas_to_pick_from)) + var/turf/target + while(turf_list.len && !target) + var/I = rand(1, turf_list.len) + var/turf/checked_turf = turf_list[I] + if(!checked_turf.density) + var/clear = TRUE + for(var/obj/checked_object in checked_turf) + if(checked_object.density) + clear = FALSE + break + if(clear) + target = checked_turf + if(!target) + turf_list.Cut(I, I + 1) + if(target) + return target diff --git a/code/datums/looping_sounds/projectiles_sounds.dm b/code/datums/looping_sounds/projectiles_sounds.dm new file mode 100644 index 000000000000..5850461c62fe --- /dev/null +++ b/code/datums/looping_sounds/projectiles_sounds.dm @@ -0,0 +1,5 @@ +/datum/looping_sound/moon_parade + mid_sounds = list('sound/effects/moon_parade_soundloop.ogg' = 1) + start_sound = 'sound/effects/moon_parade_soundloop.ogg' + mid_length = 1.9 SECONDS + volume = 50 diff --git a/code/datums/looping_sounds/weather_sounds.dm b/code/datums/looping_sounds/weather_sounds.dm index ccd7fa1a5ad2..420dc4722561 100644 --- a/code/datums/looping_sounds/weather_sounds.dm +++ b/code/datums/looping_sounds/weather_sounds.dm @@ -53,3 +53,11 @@ volume = 30 area_sound = TRUE channel = CHANNEL_ASH_STORM + +/datum/looping_sound/void_loop + mid_sounds = list('sound/ambience/antag/heretic/VoidsEmbrace.ogg'=1) + mid_length = 166.9 SECONDS // exact length of the music in ticks + start_sound = 'sound/ambience/antag/heretic/VoidsEmbrace.ogg' + start_length = 166.9 SECONDS + volume = 120 + extra_range = 30 diff --git a/code/datums/mind.dm b/code/datums/mind.dm index b23129559d87..4e32db795ce8 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -400,6 +400,23 @@ . += _memory_edit_role_enabled(ROLE_MIND_FLAYER) +/datum/mind/proc/memory_edit_heretic(mob/living/carbon/human/H) + . = _memory_edit_header("heretic") + if(has_antag_datum(/datum/antagonist/heretic)) + var/datum/antagonist/heretic/wheretic = has_antag_datum(/datum/antagonist/heretic) + . += "HERETIC|no" + switch(wheretic.has_living_heart()) + if(HERETIC_NO_LIVING_HEART) + . += " |
Give Living heart" + if(HERETIC_HAS_LIVING_HEART) + . += " | Add Heart Target (marked mob)" + . += " | Remove A Target" + . += " |
Give focus| or adjust knowledge points.." + else + . += "heretic|NO" + + . += _memory_edit_role_enabled(ROLE_HERETIC) + /datum/mind/proc/memory_edit_nuclear(mob/living/carbon/human/H) . = _memory_edit_header("nuclear") if(src in SSticker.mode.syndicates) @@ -547,6 +564,7 @@ "changeling", "vampire", // "traitorvamp", "mind_flayer", + "heretic", "nuclear", "traitor", // "traitorchan", ) @@ -564,6 +582,8 @@ sections["vampire"] = memory_edit_vampire(H) /** MINDFLAYER ***/ sections["mind_flayer"] = memory_edit_mind_flayer(H) + /** HERETIC ***/ + sections["heretic"] = memory_edit_heretic(H) /** NUCLEAR ***/ sections["nuclear"] = memory_edit_nuclear(H) /** Abductors **/ @@ -1137,6 +1157,59 @@ log_admin("[key_name(usr)] has set [key_name(current)]'s current swarms to [new_swarms].") message_admins("[key_name_admin(usr)] has set [key_name_admin(current)]'s current swarms to [new_swarms].") + else if(href_list["heretic"]) + switch(href_list["heretic"]) + if("clear") + if(has_antag_datum(/datum/antagonist/heretic)) + remove_antag_datum(/datum/antagonist/heretic) + log_admin("[key_name(usr)] has de-heretic'd [key_name(current)].") + message_admins("[key_name(usr)] has de-heretic'd [key_name(current)].") + if("heretic") + make_heretic() + log_admin("[key_name(usr)] has heretic'd [key_name(current)].") + to_chat(current, "You feel a whisper in your head. You are a Heretic!") + message_admins("[key_name(usr)] has heretic'd [key_name(current)].") + if("Target") + var/mob/living/carbon/human/new_target = usr.client?.holder.marked_datum + if(!istype(new_target)) + to_chat(usr, "You need to mark a human to do this!") + return + + if(tgui_alert(usr, "Let them know their targets have been updated?", "Whispers of the Mansus", list("Yes", "No")) == "Yes") + to_chat(current, "The Mansus has modified your targets. Go find them!") + to_chat(current, "[new_target.real_name], the [new_target.mind?.assigned_role || "human"].") + var/datum/antagonist/heretic/hereitic = has_antag_datum(/datum/antagonist/heretic) + hereitic.add_sacrifice_target(new_target) + if("RemoveTarget") + var/datum/antagonist/heretic/thereitic = has_antag_datum(/datum/antagonist/heretic) + var/list/removable = list() + for(var/mob/living/carbon/human/old_target as anything in thereitic.sac_targets) + removable[old_target.name] = old_target + + var/name_of_removed = tgui_input_list(usr, "Choose a human to remove", "Who to Spare", removable) + if(QDELETED(src) || isnull(name_of_removed)) + return + var/mob/living/carbon/human/chosen_target = removable[name_of_removed] + if(QDELETED(chosen_target) || !ishuman(chosen_target)) + return + + if(!thereitic.remove_sacrifice_target(chosen_target)) + to_chat(usr, "Failed to remove [name_of_removed] from [current]'s sacrifice list. Perhaps they're no longer in the list anyways.") + return + + if(tgui_alert(usr, "Let them know their targets have been updated?", "Whispers of the Mansus", list("Yes", "No")) == "Yes") + to_chat(current, "The Mansus has modified your targets.") + if("focus") + current.equip_to_slot_if_possible(new /obj/item/clothing/neck/heretic_focus(get_turf(current)), ITEM_SLOT_NECK, TRUE, TRUE) + to_chat(current, "The Mansus has given you a focus!") + log_and_message_admins("[key_name(usr)] has equipped [key_name(current)] with a heretic focus") + if("knowledge") + var/change_num = tgui_input_number(usr, "Add or remove knowledge points", "Points", 0, 100, -100) + if(!change_num || QDELETED(src)) + return + var/datum/antagonist/heretic/whereitic = has_antag_datum(/datum/antagonist/heretic) + whereitic.knowledge_points += change_num + else if(href_list["nuclear"]) var/mob/living/carbon/human/H = current @@ -1711,6 +1784,11 @@ add_antag_datum(/datum/antagonist/mindflayer) SSticker.mode.mindflayers |= src +/datum/mind/proc/make_heretic() + if(!has_antag_datum(/datum/antagonist/heretic)) + add_antag_datum(/datum/antagonist/heretic) + SSticker.mode.heretics |= src + /datum/mind/proc/make_Abductor() if(alert(usr, "Are you sure you want to turn this person into an abductor? This can't be undone!", "New Abductor?", "Yes", "No") != "Yes") return diff --git a/code/datums/proximity/advanced_proximity_monitor.dm b/code/datums/proximity/advanced_proximity_monitor.dm index bd47bfd6cb90..bbda83554383 100644 --- a/code/datums/proximity/advanced_proximity_monitor.dm +++ b/code/datums/proximity/advanced_proximity_monitor.dm @@ -27,9 +27,11 @@ /datum/proximity_monitor/advanced/proc/cleanup_field() for(var/turf/turf as anything in edge_turfs) cleanup_edge_turf(turf) + let_me_bloody_clean_effects_as_my_sanity_fades(turf) edge_turfs = list() for(var/turf/turf as anything in field_turfs) cleanup_field_turf(turf) + let_me_bloody_clean_effects_as_my_sanity_fades(turf) field_turfs = list() //Call every time the field moves (done automatically if you use update_center) or a setup specification is changed. @@ -48,10 +50,12 @@ if(QDELETED(src)) return cleanup_field_turf(old_turf) + let_me_bloody_clean_effects_as_my_sanity_fades(old_turf) for(var/turf/old_turf as anything in old_edge_turfs - edge_turfs) if(QDELETED(src)) return cleanup_edge_turf(old_turf) + let_me_bloody_clean_effects_as_my_sanity_fades(old_turf) if(full_recalc) old_field_turfs = list() @@ -109,6 +113,10 @@ PRIVATE_PROC(TRUE) return +///This should be changed before this is testmerged I just want this to bloody compile. qwertodo: do this, ask warriorstar about the above since it doesnt do anything? +/datum/proximity_monitor/advanced/proc/let_me_bloody_clean_effects_as_my_sanity_fades(turf/target) + return + /// Called when a turf in the edge of the monitor is linked /datum/proximity_monitor/advanced/proc/setup_edge_turf(turf/target) if(edge_is_a_field) // If the edge is considered a field, set it up like one diff --git a/code/datums/proximity/void_storm_proximity.dm b/code/datums/proximity/void_storm_proximity.dm new file mode 100644 index 000000000000..5451a1d6df94 --- /dev/null +++ b/code/datums/proximity/void_storm_proximity.dm @@ -0,0 +1,38 @@ +/*! + * Void storm for the void heretic ascension + * + * Follows the heretic around and acts like an aura with damaging effects for non-heretics + */ +/datum/proximity_monitor/advanced/void_storm + edge_is_a_field = TRUE + // lazylist that keeps track of the overlays added + var/list/turf_effects + var/static/image/storm_overlay = image('icons/effects/weather_effects.dmi', "snow_storm") + +/datum/proximity_monitor/advanced/void_storm/New(atom/_host, range, _ignore_if_not_on_turf) + . = ..() + recalculate_field(full_recalc = TRUE) + +/datum/proximity_monitor/advanced/void_storm/recalculate_field(full_recalc) + full_recalc = TRUE // We always perform a full recalc because we need to update ALL the sprites + return ..() + +/datum/proximity_monitor/advanced/void_storm/let_me_bloody_clean_effects_as_my_sanity_fades(turf/target) + . = ..() + var/obj/effect/abstract/effect = LAZYACCESS(turf_effects, target) + LAZYREMOVE(turf_effects, target) + if(effect) + qdel(effect) + +/datum/proximity_monitor/advanced/void_storm/setup_field_turf(turf/target) + . = ..() + var/obj/effect/abstract/effect = new(target) // Makes the field visible to players. + effect.alpha = 255 - get_dist(target, host.loc) * 23 + effect.invisibility = 0 + effect.color = COLOR_BLACK + effect.icon = storm_overlay.icon + effect.icon_state = storm_overlay.icon_state + effect.mouse_opacity = MOUSE_OPACITY_TRANSPARENT + effect.layer = ABOVE_ALL_MOB_LAYER + effect.plane = ABOVE_GAME_PLANE + LAZYSET(turf_effects, target, effect) diff --git a/code/datums/spell_targeting/cone.dm b/code/datums/spell_targeting/cone.dm index 7cc9b7a95610..be32cc7810d1 100644 --- a/code/datums/spell_targeting/cone.dm +++ b/code/datums/spell_targeting/cone.dm @@ -72,3 +72,10 @@ /datum/spell_targeting/cone/proc/calculate_cone_shape(current_level) // Default formula: (1 (innate) -> 3 -> 5 -> 5 -> 7 -> 7 -> 9 -> 9 -> ...) return current_level + (current_level % 2) + 1 + +/datum/spell_targeting/cone/InterceptClickOn(mob/user, params, atom/A, datum/spell/spell) + var/list/targets = choose_targets(user, spell, params, A) + if(!length(targets)) + return FALSE // no targets + spell.try_perform(targets, user) + return TRUE diff --git a/code/datums/spell_targeting/spell_targeting.dm b/code/datums/spell_targeting/spell_targeting.dm index 5183dd73fb4f..4182fb2feb4d 100644 --- a/code/datums/spell_targeting/spell_targeting.dm +++ b/code/datums/spell_targeting/spell_targeting.dm @@ -66,7 +66,14 @@ */ /datum/spell_targeting/proc/InterceptClickOn(mob/user, params, atom/A, datum/spell/spell) var/list/targets = choose_targets(user, spell, params, A) + var/list/final_targets + for(var/thing in targets) + if(spell.valid_target(thing, user)) + final_targets += targets + if(!length(final_targets)) + return FALSE // no targets spell.try_perform(targets, user) + return TRUE /** * Checks whether or not the given target is valid. Calls spell.valid_target as well diff --git a/code/datums/spells/charge_up_bounce.dm b/code/datums/spells/charge_up_bounce.dm index 516403313d85..8a97da56195c 100644 --- a/code/datums/spells/charge_up_bounce.dm +++ b/code/datums/spells/charge_up_bounce.dm @@ -3,7 +3,10 @@ * Don't override cast and instead override apply_bounce_effect and the other procs */ /datum/spell/charge_up/bounce + /// Sound we make when we hit a mob var/bounce_hit_sound + /// How much time should be between each bounce? + var/bounce_time = 0 SECONDS /datum/spell/charge_up/bounce/create_new_targeting() var/datum/spell_targeting/click/T = new @@ -53,19 +56,37 @@ return /datum/spell/charge_up/bounce/proc/bounce(mob/origin, mob/target, energy, bounces, mob/user) - SHOULD_CALL_PARENT(TRUE) create_beam(origin, target) apply_bounce_effect(origin, target, energy, user) add_attack_logs(user, target, "Bounce spell '[src]' bounced on") playsound(get_turf(target), bounce_hit_sound, 50, TRUE, -1) if(bounces >= 1) - var/list/possible_targets = list() - for(var/mob/living/M in view(targeting.range, target)) - if(user == M || target == M && targeting.obstacle_check(target, M)) - continue - possible_targets += M - if(!length(possible_targets)) - return - var/mob/living/next = pick(possible_targets) - bounce(target, next, energy, bounces - 1, user) + if(bounce_time) + addtimer(CALLBACK(src, PROC_REF(continue_bounce), target, get_target(target, user), energy, bounces - 1, user), bounce_time, TIMER_DELETE_ME) + else + bounce(target, get_target(target, user), energy, bounces - 1, user) + + +/datum/spell/charge_up/bounce/proc/continue_bounce(mob/origin, mob/target, energy, bounces, mob/user) + // We will only continue the chain if we exist + if(QDELETED(target)) + return + // We fulfilled the conditions, get the next target + var/mob/living/carbon/to_beam_next = get_target(target, user) + if(isnull(to_beam_next)) // No target = no chain + return + + // Chain again! Recursively + bounce(target, to_beam_next, energy, bounces - 1, user) + +/datum/spell/charge_up/bounce/proc/get_target(mob/origin, mob/user) + var/list/possible_targets = list() + for(var/mob/living/M in view(targeting.range, origin)) + if(user == M || origin == M && targeting.obstacle_check(origin, M)) + continue + possible_targets += M + if(!length(possible_targets)) + return + + return pick(possible_targets) diff --git a/code/datums/spells/cones/cone_spell.dm b/code/datums/spells/cones/cone_spell.dm index 11b249c9f0d3..cacf45ddac15 100644 --- a/code/datums/spells/cones/cone_spell.dm +++ b/code/datums/spells/cones/cone_spell.dm @@ -1,8 +1,19 @@ /datum/spell/cone - + create_attack_logs = FALSE + create_custom_logs = TRUE + var/cone_levels = 3 + var/respect_density = TRUE /datum/spell/cone/create_new_targeting() - return new /datum/spell_targeting/cone + var/datum/spell_targeting/cone/C = new() + C.cone_levels = cone_levels + C.respect_density = respect_density + return C + +// Normally, cone spells will generate an attack log for every turf they loop over, while searching for targets. +// With this override, all /aoe type spells will only generate 1 log, saying that the user has cast the spell. +/datum/spell/cone/write_custom_logs(list/targets, mob/user) + add_attack_logs(user, null, "Cast the cone spell [name]", ATKLOG_ALL) /datum/spell/cone/cast(list/targets, mob/user) var/level_counter = 1 diff --git a/code/datums/spells/ethereal_jaunt.dm b/code/datums/spells/ethereal_jaunt.dm index a6b143296907..2b6dd35df7fa 100644 --- a/code/datums/spells/ethereal_jaunt.dm +++ b/code/datums/spells/ethereal_jaunt.dm @@ -10,8 +10,10 @@ nonabstract_req = TRUE centcom_cancast = FALSE //Prevent people from getting to centcom var/sound1 = 'sound/magic/ethereal_enter.ogg' + var/sound2 = 'sound/magic/ethereal_exit.ogg' var/jaunt_duration = 50 //in deciseconds var/jaunt_in_time = 5 + var/jaunt_out_time = null var/jaunt_in_type = /obj/effect/temp_visual/wizard var/jaunt_out_type = /obj/effect/temp_visual/wizard/out var/jaunt_type_path = /obj/effect/dummy/spell_jaunt @@ -54,11 +56,14 @@ jaunt_steam(mobloc) ADD_TRAIT(target, TRAIT_IMMOBILIZED, "jaunt") holder.reappearing = 1 - playsound(get_turf(target), 'sound/magic/ethereal_exit.ogg', 50, TRUE, -1) + playsound(get_turf(target), sound2, 50, TRUE, -1) sleep(jaunt_in_time * 4) new jaunt_in_type(mobloc, holder.dir) target.setDir(holder.dir) - sleep(jaunt_in_time) + var/time_to_jaunt_out = jaunt_in_time + if(jaunt_out_time) + time_to_jaunt_out = jaunt_out_time + sleep(time_to_jaunt_out) qdel(holder) if(!QDELETED(target)) if(is_blocked_turf(mobloc, TRUE)) diff --git a/code/datums/spells/pointed.dm b/code/datums/spells/pointed.dm new file mode 100644 index 000000000000..93180893c294 --- /dev/null +++ b/code/datums/spells/pointed.dm @@ -0,0 +1,9 @@ +// Parent type for easy setup +/datum/spell/pointed + var/cast_range = 7 + +/datum/spell/pointed/create_new_targeting() + var/datum/spell_targeting/clicked_atom/C = new() + C.range = cast_range + C.try_auto_target = FALSE + return C diff --git a/code/datums/spells/spell_base.dm b/code/datums/spells/spell_base.dm index 3604140c8193..1d34e7a91f92 100644 --- a/code/datums/spells/spell_base.dm +++ b/code/datums/spells/spell_base.dm @@ -8,7 +8,7 @@ GLOBAL_LIST_INIT(spells, typesof(/datum/spell)) spell = spell_to_cast /datum/click_intercept/proc_holder/InterceptClickOn(user, params, atom/object) - spell.InterceptClickOn(user, params, object) + return spell.InterceptClickOn(user, params, object) /datum/click_intercept/proc_holder/quit() spell.remove_ranged_ability(spell.ranged_ability_user) @@ -18,11 +18,11 @@ GLOBAL_LIST_INIT(spells, typesof(/datum/spell)) if(user.ranged_ability != src) to_chat(user, "[user.ranged_ability.name] has been disabled.") user.ranged_ability.remove_ranged_ability(user) - return TRUE //TRUE for failed, FALSE for passed. + return FALSE user.face_atom(A) if(targeting) targeting.InterceptClickOn(user, params, A, src) - return FALSE + return TRUE /datum/spell/proc/add_ranged_ability(mob/user, msg) if(!user || !user.client) @@ -38,6 +38,7 @@ GLOBAL_LIST_INIT(spells, typesof(/datum/spell)) if(msg) to_chat(user, msg) update_spell_icon() + return TRUE /datum/spell/proc/update_spell_icon() return @@ -141,6 +142,8 @@ GLOBAL_LIST_INIT(spells, typesof(/datum/spell)) /// If SPELL_REQUIRES_NO_ANTIMAGIC is set in Spell requirements, /// The spell cannot be cast if the caster has any of the antimagic flags set. var/antimagic_flags = MAGIC_RESISTANCE + /// Is it a heretic spell? Used by heretics. + var/is_a_heretic_spell = FALSE /* Checks if the user can cast the spell * @param charge_check If the proc should do the cooldown check @@ -315,7 +318,7 @@ GLOBAL_LIST_INIT(spells, typesof(/datum/spell)) if(!cast_check(TRUE, TRUE, user)) return - perform(targets, should_recharge_after_cast, user) + perform(targets, user) /** * Called in `try_perform` before removing the click interceptor. useful to override if you have a spell that requires more than 1 click @@ -329,10 +332,9 @@ GLOBAL_LIST_INIT(spells, typesof(/datum/spell)) * * Arguments: * * targets - The list of targets the spell is being cast on. Will not be empty or null - * * recharge - Whether or not the spell should go recharge * * user - The caster of the spell */ -/datum/spell/proc/perform(list/targets, recharge = TRUE, mob/user = usr) //if recharge is started is important for the trigger spells +/datum/spell/proc/perform(list/targets, mob/user = usr) //if recharge is started is important for the trigger spells SHOULD_NOT_OVERRIDE(TRUE) before_cast(targets, user) invocation(user) @@ -341,7 +343,8 @@ GLOBAL_LIST_INIT(spells, typesof(/datum/spell)) write_custom_logs(targets, user) if(create_attack_logs) add_attack_logs(user, targets, "cast the spell [name]", ATKLOG_ALL) - if(recharge) + + if(should_recharge_after_cast) cooldown_handler.start_recharge() if(sound) @@ -473,6 +476,11 @@ GLOBAL_LIST_INIT(spells, typesof(/datum/spell)) var/turf/T = get_turf(user) if(T && is_admin_level(T.z)) return FALSE + var/sig_return = FALSE + if(user) + sig_return = SEND_SIGNAL(user, COMSIG_MOB_BEFORE_SPELL_CAST, src) + if(sig_return) + return FALSE // If the spell requires the user has no antimagic equipped, and they're holding antimagic // that corresponds with the spell's antimagic, then they can't actually cast the spell diff --git a/code/datums/spells/touch_attacks.dm b/code/datums/spells/touch_attacks.dm index f3aca8ff3fc0..193e6bce3e8a 100644 --- a/code/datums/spells/touch_attacks.dm +++ b/code/datums/spells/touch_attacks.dm @@ -3,6 +3,8 @@ var/obj/item/melee/touch_attack/attached_hand = null var/on_remove_message = TRUE invocation_type = "none" //you scream on connecting, not summoning + /// Has this spell been boosted by a heretic ascending? + var/ascended = FALSE /datum/spell/touch/create_new_targeting() return new /datum/spell_targeting/self @@ -14,6 +16,9 @@ charge_hand(user) /datum/spell/touch/proc/charge_hand(mob/living/carbon/user) + if(SEND_SIGNAL(user, COMSIG_TOUCH_HANDLESS_CAST, src) & COMPONENT_CAST_HANDLESS) + cooldown_handler.start_recharge(cooldown_handler.recharge_duration) + return var/hand_handled = 1 attached_hand = new hand_path(src) RegisterSignal(user, COMSIG_MOB_WILLINGLY_DROP, PROC_REF(discharge_hand)) diff --git a/code/datums/spells/wizard_spells.dm b/code/datums/spells/wizard_spells.dm index c62f868f4018..bbaf38b6e363 100644 --- a/code/datums/spells/wizard_spells.dm +++ b/code/datums/spells/wizard_spells.dm @@ -337,11 +337,19 @@ selection_deactivated_message = "You extinguish your fireball...for now." var/fireball_type = /obj/item/projectile/magic/fireball - action_icon_state = "fireball0" + var/what_icon_state = "fireball" + action_icon_state = "fireball" sound = 'sound/magic/fireball.ogg' active = FALSE + should_recharge_after_cast = FALSE + + /// How many projectiles we can fire per cast. Not all at once, per click, kinda like charges. Unlike charges, it doesn't share cooldown + var/projectile_amount = 1 + /// How many projectiles we have yet to fire, based on projectile_amount + var/current_amount = 0 + /datum/spell/fireball/apprentice centcom_cancast = FALSE @@ -353,12 +361,12 @@ /datum/spell/fireball/update_spell_icon() if(!action) return - action.button_overlay_icon_state = "fireball[active]" + action.button_overlay_icon_state = "[what_icon_state][active]" action.UpdateButtons() /datum/spell/fireball/cast(list/targets, mob/living/user = usr) var/target = targets[1] //There is only ever one target for fireball - var/turf/T = user.loc + var/turf/T = get_turf(user) var/turf/U = get_step(user, user.dir) // Get the tile infront of the move, based on their direction if(!isturf(U) || !isturf(T)) return FALSE @@ -370,9 +378,23 @@ FB.preparePixelProjectile(target, user) FB.fire() user.newtonian_move(get_dir(U, T)) + if(should_recharge_after_cast) + should_recharge_after_cast = FALSE + remove_ranged_ability(user) return TRUE +/datum/spell/fireball/should_remove_click_intercept() + return FALSE + +/datum/spell/fireball/before_cast(list/targets, mob/user) + . = ..() + current_amount++ + if(current_amount >= projectile_amount) + current_amount = 0 + should_recharge_after_cast = TRUE + + /datum/spell/fireball/toolbox name = "Homing Toolbox" desc = "This spell summons and throws a magical homing toolbox at your opponent." diff --git a/code/datums/status_effects/debuffs.dm b/code/datums/status_effects/debuffs.dm index 2c5acaf69cc0..f6fbb5c5ffd0 100644 --- a/code/datums/status_effects/debuffs.dm +++ b/code/datums/status_effects/debuffs.dm @@ -522,6 +522,9 @@ /datum/status_effect/transient/cult_slurring id = "cult_slurring" +/datum/status_effect/transient/heretic_slurring + id = "heretic_slurring" + /datum/status_effect/incapacitating id = "incapacitating" tick_interval = 0 @@ -885,6 +888,77 @@ /datum/status_effect/transient/drugged/on_remove() owner.update_druggy_effects() +/datum/status_effect/transient/disgust + id = "disgust" + tick_interval = 2 SECONDS + ///How disgusted we were last tick. + var/old_disgust = 0 + +/datum/status_effect/transient/disgust/tick() + . = ..() + if(!.) + return + old_disgust = strength + if(strength) + var/pukeprob = 2.5 + (0.025 * strength / 10) + if(strength >= DISGUST_LEVEL_GROSS) + if(prob(5)) + owner.AdjustStuttering(2 SECONDS) + owner.AdjustConfused(2 SECONDS) + if(prob(5) && !owner.stat) + to_chat(owner, "You feel kind of iffy...") + owner.AdjustJitter(-6 SECONDS) + if(strength >= DISGUST_LEVEL_VERYGROSS) + if(prob(pukeprob)) //iT hAndLeS mOrE ThaN PukInG + owner.AdjustConfused(2.5 SECONDS) + owner.AdjustStuttering(2 SECONDS) + owner.adjust_disgust(- 50 SECONDS) + if(iscarbon(owner)) + var/mob/living/carbon/human/throwing_up = owner + throwing_up.vomit() + owner.KnockDown(8 SECONDS) + + owner.SetDizzy(10 SECONDS) + if(strength >= DISGUST_LEVEL_DISGUSTED) + if(prob(13)) + owner.EyeBlurry(6 SECONDS) + + // I would consider breaking this up into steps matching the disgust levels + // But disgust is used so rarely it wouldn't save a significant amount of time, and it makes the code just way worse + // We're in the same state as the last time we processed, so don't bother + if(old_disgust == strength) + return + + old_disgust = strength + switch(strength) + if(0 to DISGUST_LEVEL_GROSS) + owner.clear_alert("disgust") + if(DISGUST_LEVEL_GROSS to DISGUST_LEVEL_VERYGROSS) + owner.throw_alert("disgust", /atom/movable/screen/alert/gross) + if(DISGUST_LEVEL_VERYGROSS to DISGUST_LEVEL_DISGUSTED) + owner.throw_alert("disgust", /atom/movable/screen/alert/verygross) + if(DISGUST_LEVEL_DISGUSTED to INFINITY) + owner.throw_alert("disgust", /atom/movable/screen/alert/disgusted) + +/datum/status_effect/transient/disgust/calc_decay() + return -1 SECONDS //Yes, this sucks. Unfortunently how transient works, otherwise I need to tweak the prob in strange ways. + +/atom/movable/screen/alert/gross + name = "Grossed out." + desc = "That was kind of gross..." + icon_state = "gross" + +/atom/movable/screen/alert/verygross + name = "Very grossed out." + desc = "You're not feeling very well..." + icon_state = "gross2" + +/atom/movable/screen/alert/disgusted + name = "DISGUSTED" + desc = "ABSOLUTELY DISGUSTIN'" + icon_state = "gross3" + + #define FAKE_COLD 1 #define FAKE_FOOD_POISONING 2 #define FAKE_RETRO_VIRUS 3 @@ -1441,9 +1515,8 @@ if(issilicon(owner)) owner.adjustBruteLoss(10) return - //We don't have disgust, so... if(ishuman(owner)) - owner.adjustBrainLoss(2.5) + owner.adjust_disgust(5 SECONDS) owner.reagents?.remove_all(0.75) else owner.adjustBruteLoss(3) //Weaker than borgs but still constant. diff --git a/code/datums/status_effects/status_effect.dm b/code/datums/status_effects/status_effect.dm index 086a4e218787..9bfa9ed52e95 100644 --- a/code/datums/status_effects/status_effect.dm +++ b/code/datums/status_effects/status_effect.dm @@ -13,6 +13,8 @@ var/examine_text //If defined, this text will appear when the mob is examined - to use he, she etc. use "SUBJECTPRONOUN" and replace it in the examines themselves var/alert_type = /atom/movable/screen/alert/status_effect //the alert thrown by the status effect, contains name and description var/atom/movable/screen/alert/status_effect/linked_alert = null //the alert itself, if it exists + /// Do we show the duration of the status effect on the alert + var/show_duration = FALSE /datum/status_effect/New(list/arguments) if(!id) @@ -37,6 +39,7 @@ var/atom/movable/screen/alert/status_effect/A = owner.throw_alert(id, alert_type) A.attached_effect = src //so the alert can reference us, if it needs to linked_alert = A //so we can reference the alert, if we need to + update_shown_duration() if(duration > 0 || initial(tick_interval) > 0) //don't process if we don't care START_PROCESSING(SSfastprocess, src) return TRUE @@ -57,6 +60,7 @@ if(!owner) qdel(src) return + update_shown_duration() if(tick_interval <= world.time) tick() tick_interval = world.time + initial(tick_interval) @@ -64,6 +68,14 @@ on_timeout() qdel(src) +/// Updates the status effect alert's maptext (if possible) +/datum/status_effect/proc/update_shown_duration() + PRIVATE_PROC(TRUE) + if(!linked_alert || !show_duration) + return + + linked_alert.maptext = MAPTEXT_TINY_UNICODE("[round((duration - world.time)/10, 1)]s") + /datum/status_effect/proc/on_apply() //Called whenever the buff is applied; returning FALSE will cause it to autoremove itself. return TRUE @@ -120,6 +132,7 @@ /// Applies a given status effect to this mob, returning the effect if it was successful or null otherwise /mob/living/proc/apply_status_effect(effect, ...) + RETURN_TYPE(/datum/status_effect) . = null if(QDELETED(src)) return @@ -137,7 +150,7 @@ var/list/arguments = args.Copy() arguments[1] = src S1 = new effect(arguments) - . = S1 + return S1 /// Removes all of a given status effect from this mob, returning TRUE if at least one was removed /mob/living/proc/remove_status_effect(effect, ...) diff --git a/code/datums/weather/weather_datum.dm b/code/datums/weather/weather_datum.dm index adeceb51aba6..79a99b6678ba 100644 --- a/code/datums/weather/weather_datum.dm +++ b/code/datums/weather/weather_datum.dm @@ -40,6 +40,8 @@ var/barometer_predictable = FALSE var/next_hit_time = 0 //For barometers to know when the next storm will hit + /// This causes the weather to only end if forced to + var/perpetual = FALSE /datum/weather/New(z_levels) ..() @@ -85,7 +87,8 @@ to_chat(M, weather_message) if(weather_sound) SEND_SOUND(M, sound(weather_sound)) - addtimer(CALLBACK(src, PROC_REF(wind_down)), weather_duration) + if(!perpetual) + addtimer(CALLBACK(src, PROC_REF(wind_down)), weather_duration) /datum/weather/proc/wind_down() if(stage >= WEATHER_WIND_DOWN_STAGE) diff --git a/code/datums/weather/weather_types/void_storm.dm b/code/datums/weather/weather_types/void_storm.dm new file mode 100644 index 000000000000..7996c66fa93b --- /dev/null +++ b/code/datums/weather/weather_types/void_storm.dm @@ -0,0 +1,20 @@ +/datum/weather/void_storm + name = "void storm" + desc = "A rare and highly anomalous event often accompanied by unknown entities shredding spacetime continouum. We'd advise you to start running." + + telegraph_duration = 2 SECONDS + telegraph_overlay = "light_snow" + + weather_message = "You feel the air around you getting colder... and void's sweet embrace..." + weather_overlay = "light_snow" + weather_color = COLOR_BLACK + weather_duration_lower = 60 SECONDS + weather_duration_upper = 120 SECONDS + + + end_duration = 10 SECONDS + + area_type = /area + target_trait = REACHABLE_SPACE_ONLY + + perpetual = TRUE diff --git a/code/game/atoms.dm b/code/game/atoms.dm index b11e4567c297..dfd8ffa8e92c 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -1439,6 +1439,24 @@ GLOBAL_LIST_EMPTY(blood_splatter_icons) /atom/proc/relaydrive(mob/living/user, direction) return !(SEND_SIGNAL(src, COMSIG_RIDDEN_DRIVER_MOVE, user, direction) & COMPONENT_DRIVER_BLOCK_MOVE) +/** + * Causes effects when the atom gets hit by a rust effect from heretics + * + * Override this if you want custom behaviour in whatever gets hit by the rust + * /turf/rust_turf should be used instead for overriding rust on turfs + */ +/atom/proc/rust_heretic_act() + return + +///wrapper proc that passes our mob's rust_strength to the target we are rusting +/mob/living/proc/do_rust_heretic_act(atom/target) + var/datum/antagonist/heretic/heretic_data = IS_HERETIC(src) + target.rust_heretic_act(heretic_data?.rust_strength) + +/mob/living/basic/heretic_summon/rust_walker/do_rust_heretic_act(atom/target) + target.rust_heretic_act(4) + /// Used with the spawner component to do something when a mob is spawned. /atom/proc/on_mob_spawn(mob/created_mob) return + diff --git a/code/game/data_huds.dm b/code/game/data_huds.dm index 83704a835859..e1af4938aec1 100644 --- a/code/game/data_huds.dm +++ b/code/game/data_huds.dm @@ -63,6 +63,10 @@ /datum/atom_hud/data/pressure hud_icons = list(PRESSURE_HUD) +/datum/atom_hud/data/heretic + hud_icons = list(HERETIC_HUD) + ignore_invisibility_check = TRUE + /// Pressure hud is special, because it doesn't use hudatoms. SSair manages its images, so tell SSair to add the initial set. /datum/atom_hud/data/pressure/add_hud_to(mob/user) ..() @@ -499,6 +503,13 @@ else holder.icon_state = "" +/*~~~~~~~~~~~~~~ + HERETIC HUD +~~~~~~~~~~~~~~~*/ +/obj/effect/heretic_influence/proc/do_hud_stuff() + var/image/holder = hud_list[HERETIC_HUD] + holder.icon_state = "reality_smash" + /*~~~~~~~~~~~~~~ JANI HUD ~~~~~~~~~~~~~~~*/ diff --git a/code/game/dna/mutations/mutation_powers.dm b/code/game/dna/mutations/mutation_powers.dm index e13572621a01..2be223e0eff3 100644 --- a/code/game/dna/mutations/mutation_powers.dm +++ b/code/game/dna/mutations/mutation_powers.dm @@ -997,7 +997,7 @@ return new /datum/spell_targeting/telepathic /datum/spell/remotetalk/cast(list/targets, mob/user = usr) - if(!ishuman(user)) + if(!isliving(user)) return if(user.mind?.miming) // Dont let mimes telepathically talk to_chat(user,"You can't communicate without breaking your vow of silence.") @@ -1033,7 +1033,7 @@ return new /datum/spell_targeting/telepathic /datum/spell/mindscan/cast(list/targets, mob/user = usr) - if(!ishuman(user)) + if(!isliving(user)) return for(var/mob/living/target in targets) var/message = "You feel your mind expand briefly... (Click to send a message.)" diff --git a/code/game/gamemodes/cult/blood_magic.dm b/code/game/gamemodes/cult/blood_magic.dm index 12b80aa8da5d..ac3020179e4b 100644 --- a/code/game/gamemodes/cult/blood_magic.dm +++ b/code/game/gamemodes/cult/blood_magic.dm @@ -6,6 +6,8 @@ default_button_position = DEFAULT_BLOODSPELLS var/list/spells = list() var/channeling = FALSE + /// If the magic has been enhanced somehow, likely due to a crimson medallion. + var/magic_enhanced = FALSE /datum/action/innate/cult/blood_magic/Remove() for(var/X in spells) @@ -17,7 +19,7 @@ var/limit = RUNELESS_MAX_BLOODCHARGE for(var/obj/effect/rune/empower/R in range(1, owner)) rune = TRUE - limit = MAX_BLOODCHARGE + limit = magic_enhanced ? ENHANCED_BLOODCHARGE : MAX_BLOODCHARGE break if(length(spells) >= limit) if(rune) @@ -280,20 +282,21 @@ else add_ranged_ability(user, "You prepare to horrify a target...") -/datum/spell/horror/InterceptClickOn(mob/living/user, params, atom/target) - if(..()) - return +/datum/spell/horror/InterceptClickOn(mob/living/user, params, atom/target) //This should not exist + . = ..() + if(!.) + return FALSE if(ranged_ability_user.incapacitated() || !IS_CULTIST(user)) user.ranged_ability.remove_ranged_ability(user) - return + return TRUE if(user.holy_check()) - return + return TRUE var/turf/T = get_turf(ranged_ability_user) if(!isturf(T)) - return FALSE + return TRUE if(target in view(7, ranged_ability_user)) if(!ishuman(target) || IS_CULTIST(target)) - return + return TRUE var/mob/living/carbon/human/H = target H.Hallucinate(120 SECONDS) attached_action.charges-- @@ -305,6 +308,7 @@ if(attached_action.charges <= 0) to_chat(ranged_ability_user, "You have exhausted the spell's power!") qdel(src) + return TRUE /datum/action/innate/cult/blood_spell/veiling name = "Conceal Presence" @@ -467,7 +471,20 @@ target.visible_message("[target]'s holy weapon absorbs the red light!", \ "Your holy weapon absorbs the blinding light!") else - to_chat(user, "In a brilliant flash of red, [L] falls to the ground!") + if(IS_HERETIC(L)) + L.Stun(0.5 SECONDS) + L.AdjustConfused(3 SECONDS) + L.AdjustDizzy(3 SECONDS) + + var/old_color = target.color + target.color = COLOR_HERETIC_GREEN + animate(target, color = old_color, time = 4 SECONDS, easing = EASE_IN) + L.mob_light(COLOR_HERETIC_GREEN, 1.5, 2.5, 0.5 SECONDS) + playsound(L, 'sound/effects/curse.ogg', 50, TRUE) + + to_chat(user, "An eldritch force intervenes as you touch [target], absorbing most of the effects!") + to_chat(target, "As [user] touches you with vile magicks, the Mansus absorbs most of the effects!") + to_chat(user, "In a brilliant flash of red, [L] falls to the ground!") L.apply_status_effect(STATUS_EFFECT_CULT_STUN) L.Silence(6 SECONDS) diff --git a/code/game/gamemodes/cult/cult_actions.dm b/code/game/gamemodes/cult/cult_actions.dm index 0fc42ddf9feb..53f67e18624d 100644 --- a/code/game/gamemodes/cult/cult_actions.dm +++ b/code/game/gamemodes/cult/cult_actions.dm @@ -119,6 +119,12 @@ ..() /datum/action/innate/cult/use_dagger/Activate() + var/obj/item/melee/sickly_blade/cursed/better_tool = owner.find_item(/obj/item/melee/sickly_blade/cursed) + if(better_tool) + owner.unequip(better_tool) + owner.put_in_hands(better_tool) + better_tool.AltClick(owner) + return var/obj/item/melee/cultblade/dagger/D = owner.find_item(/obj/item/melee/cultblade/dagger) if(D) owner.unequip(D) diff --git a/code/game/gamemodes/cult/cult_datums.dm b/code/game/gamemodes/cult/cult_datums.dm index 827c962e1474..848f29d0fa0b 100644 --- a/code/game/gamemodes/cult/cult_datums.dm +++ b/code/game/gamemodes/cult/cult_datums.dm @@ -5,6 +5,7 @@ var/dagger_icon = "blood_dagger" var/sword_icon = "blood_blade" var/construct_glow = LIGHT_COLOR_BLOOD_MAGIC + var/haunted_longsword = "hauntedblade" //God Entity var/entity_name = "Nar'Sie" diff --git a/code/game/gamemodes/cult/cult_items.dm b/code/game/gamemodes/cult/cult_items.dm index 9e36aeaf9f54..07ea16b17cf3 100644 --- a/code/game/gamemodes/cult/cult_items.dm +++ b/code/game/gamemodes/cult/cult_items.dm @@ -24,6 +24,7 @@ attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut") sprite_sheets_inhand = list("Skrell" = 'icons/mob/clothing/species/skrell/held.dmi') // To stop skrell stabbing themselves in the head new_attack_chain = TRUE + var/free_use = FALSE /obj/item/melee/cultblade/Initialize(mapload) . = ..() @@ -38,7 +39,7 @@ if(..()) return FINISH_ATTACK - if(!IS_CULTIST(user)) + if(!IS_CULTIST(user) && !free_use) user.Weaken(10 SECONDS) user.drop_item_to_ground(src, force = TRUE) user.visible_message("A powerful force shoves [user] away from [target]!", @@ -62,7 +63,7 @@ /obj/item/melee/cultblade/pickup(mob/living/user) . = ..() - if(!IS_CULTIST(user)) + if(!IS_CULTIST(user) && !free_use) to_chat(user, "\"I wouldn't advise that.\"") to_chat(user, "An overwhelming sense of nausea overpowers you!") user.Confused(20 SECONDS) @@ -72,6 +73,372 @@ to_chat(user, "You can't seem to hold the blade properly!") user.drop_item_to_ground(src, force = TRUE) + +#define WIELDER_SPELLS "wielder_spell" +#define SWORD_SPELLS "sword_spell" +#define SWORD_PREFIX "sword_prefix" + +/obj/item/melee/cultblade/haunted + name = "haunted longsword" + desc = "An eerie sword with a blade that is less 'black' than it is 'absolute nothingness'. It glows with furious, restrained green energy." + icon_state = "hauntedblade" + item_state = "hauntedblade" + force = 30 + throwforce = 25 + free_use = TRUE + light_color = COLOR_HERETIC_GREEN + light_range = 3 + light_power = 1 + sprite_sheets_inhand = null + lefthand_file = 'icons/mob/inhands/64x64_lefthand.dmi' + righthand_file = 'icons/mob/inhands/64x64_righthand.dmi' + inhand_x_dimension = 64 + inhand_y_dimension = 64 + /// holder for the actual action when created. + var/list/datum/spell/path_sword_actions + /// holder for the actual action when created. + var/list/datum/spell/path_wielder_actions + var/mob/living/trapped_entity + /// The heretic path that the variable below uses to index abilities. Assigned when the heretic is ensouled. + var/heretic_path + /// If the blade is bound, it cannot utilize its abilities, but neither can its wielder. They must unbind it to use it to its full potential. + var/bound = TRUE + /// Are we in the process of binding the blade? + var/binding = FALSE + /// Nested static list used to index abilities and names. + var/static/list/heretic_paths_to_haunted_sword_abilities = list( + // Ash + PATH_ASH = list( + WIELDER_SPELLS = list(/datum/spell/ethereal_jaunt/ash), + SWORD_SPELLS = list(/datum/spell/pointed/ash_beams), + SWORD_PREFIX = "ashen", + ), + // Flesh + PATH_FLESH = list( + WIELDER_SPELLS = list(/datum/spell/pointed/blood_siphon), + SWORD_SPELLS = list(/datum/spell/pointed/cleave), + SWORD_PREFIX = "sanguine", + ), + // Void + PATH_VOID = list( + WIELDER_SPELLS = list(/datum/spell/pointed/void_phase), + SWORD_SPELLS = list(/datum/spell/pointed/void_prison), + SWORD_PREFIX = "tenebrous", + ), + // Blade + PATH_BLADE = list( + WIELDER_SPELLS = list(/datum/spell/fireball/furious_steel/haunted), + SWORD_SPELLS = list(/datum/spell/fireball/furious_steel/solo), + SWORD_PREFIX = "keen", + ), + // Rust + PATH_RUST = list( + WIELDER_SPELLS = list(/datum/spell/cone/staggered/entropic_plume), + SWORD_SPELLS = list(/datum/spell/aoe/rust_conversion, /datum/spell/pointed/rust_construction), + SWORD_PREFIX = "rusted", + ), + // Cosmic + PATH_COSMIC = list( + WIELDER_SPELLS = list(/datum/spell/aoe/conjure/cosmic_expansion), + SWORD_SPELLS = list(/datum/spell/fireball/star_blast), + SWORD_PREFIX = "astral", + ), + // Lock + PATH_LOCK = list( + WIELDER_SPELLS = list(/datum/spell/pointed/burglar_finesse), + SWORD_SPELLS = list(/datum/spell/pointed/apetra_vulnera), + SWORD_PREFIX = "incisive", + ), + // Moon + PATH_MOON = list( + WIELDER_SPELLS = list(/datum/spell/fireball/moon_parade), + SWORD_SPELLS = list(/datum/spell/pointed/moon_smile), + SWORD_PREFIX = "shimmering", + ), + // Starter + PATH_START = list( + WIELDER_SPELLS = null, + SWORD_SPELLS = null, + SWORD_PREFIX = "stillborn", // lol loser + ) , + ) + actions_types = list(/datum/action/item_action/haunted_blade) + +/obj/item/melee/cultblade/haunted/activate_self(mob/user) //qwertodo: REMOVE THIS HOLY SHIT THIS IS FOR TESTING + if(..()) + return + bind_soul(user) + +/obj/item/melee/cultblade/haunted/examine(mob/user) + . = ..() + + var/examine_text = "" + if(bound) + examine_text = "[src] shines a dull, sickly green, the power emanating from it clearly bound by the runes on its blade. You could unbind it, and wield its fearsome power. But is it worth loosening the bindings of the spirit inside?" + else + examine_text = "[src] flares a bright and malicious pale lime shade. Someone has unbound the spirit within, and power now clearly resonates from inside the blade, barely restrained and brimming with fury. You may attempt to bind it once more, sealing the horror, or try to harness its strength as a blade." + + . += "[examine_text]" + +/datum/action/item_action/haunted_blade + name = "Unseal Spirit" // img is of a chained shade + button_overlay_icon = 'icons/mob/actions/actions_cult.dmi' + button_overlay_icon_state = "spirit_sealed" + +/datum/action/item_action/haunted_blade/UpdateButton(atom/movable/screen/movable/action_button/button, status_only, force) + . = ..() + var/obj/item/melee/cultblade/haunted/blade = target + if(istype(blade)) + button_overlay_icon_state = "spirit_[blade.bound ? "sealed" : "unsealed"]" + name = "[blade.bound ? "Unseal" : "Seal"] Spirit" + + return ..() + +/obj/item/melee/cultblade/haunted/ui_action_click(mob/living/user, actiontype) + if(binding) + return // gtfo + if(bound) + unbind_blade(user) + return + binding = TRUE + if(HAS_MIND_TRAIT(user, TRAIT_HOLY)) + on_priest_handle(user) + else if(IS_CULTIST(user)) + on_cultist_handle(user) + else if(IS_HERETIC_OR_MONSTER(user)) + on_heresy_handle(user) + else if(iswizard(user)) + on_wizard_handle(user) + else + on_normie_handle(user) + return + +/obj/item/melee/cultblade/haunted/proc/on_priest_handle(mob/living/user, actiontype) + user.visible_message("You begin chanting the holy hymns of [GET_CULT_DATA(entity_name, "Nar'Sie")]...",\ + "[user] begins chanting while holding [src] aloft...") + if(!do_after(user, 6 SECONDS, src)) + to_chat(user, "You were interrupted!") + binding = FALSE + return + playsound(user, 'sound/effects/pray_chaplain.ogg',60,TRUE) + return TRUE + +/obj/item/melee/cultblade/haunted/proc/on_cultist_handle(mob/living/user, actiontype) + var/binding_implements = list(/obj/item/melee/cultblade/dagger, /obj/item/melee/sickly_blade/cursed) + if(!user.is_holding_item_of_types(binding_implements)) + to_chat(user, "You need to hold a ritual dagger to bind [src]!") + return + + user.visible_message("You begin slicing open your palm on top of [src]...",\ + "[user] begins slicing open [user.p_their()] palm on top of [src]...") + if(!do_after(user, 6 SECONDS, src)) + binding = FALSE + to_chat(user, "You were interrupted!") + return + playsound(user, 'sound/weapons/bladeslice.ogg', 30, TRUE) + return TRUE + +/obj/item/melee/cultblade/haunted/proc/on_heresy_handle(mob/living/user, actiontype) + var/binding_implements = list(/obj/item/clothing/neck/eldritch_amulet, /obj/item/clothing/neck/heretic_focus) + if(!user.is_holding_item_of_types(binding_implements)) + to_chat(user, "You need to hold a focus to bind [src]!") + return + + user.visible_message("You channel the Mansus through your focus, empowering the sealing runes...", "[user] holds up their eldritch focus on top of [src] and begins concentrating...") + if(!do_after(user, 6 SECONDS, src)) + binding = FALSE + to_chat(user, "You were interrupted!") + return + return TRUE + +/obj/item/melee/cultblade/haunted/proc/on_wizard_handle(mob/living/user, actiontype) + user.visible_message("You begin quickly and nimbly casting the sealing runes.", "[user] begins tracing anti-light runes on [src]...") + if(!do_after(user, 3 SECONDS, src)) + binding = FALSE + to_chat(user, "You were interrupted!") + return + return TRUE + +/obj/item/melee/cultblade/haunted/proc/on_normie_handle(mob/living/user, actiontype) + var/binding_implements = list(/obj/item/storage/bible) + if(!user.is_holding_item_of_types(binding_implements)) + to_chat(user, "You need to wield a bible to bind [src]!") + return + + var/passage = "[pick(GLOB.first_names_male)] [rand(1,9)]:[rand(1,25)]" // Space Bibles will have Alejandro 9:21 passages, as part of the Very New Testament. + user.visible_message("You start reading aloud the passage in [passage]...", "[user] starts reading aloud the passage in [passage]...") + if(!do_after(user, 12 SECONDS, src)) + binding = FALSE + to_chat(user, "You were interrupted!") + return + + rebind_blade(user) + +/obj/item/melee/cultblade/haunted/proc/unbind_blade(mob/user) + var/holup = tgui_alert(user, "Are you sure you wish to unseal the spirit within?", "Sealed Evil In A Jar", list("I need the power!", "Maybe not...")) + if(holup != "I need the power!") + return + to_chat(user, "You start focusing on the power of the blade, letting it guide your fingers along the inscribed runes...") + if(!do_after(user, 5 SECONDS, src)) + to_chat(user, "You were interrupted!") + return + visible_message("[user] has unbound [src]!") + bound = FALSE + for(var/datum/spell/sword_spell as anything in path_sword_actions) + trapped_entity.AddSpell(sword_spell) + for(var/datum/spell/wielder_spell as anything in path_wielder_actions) + user.AddSpell(wielder_spell) + free_use = TRUE + force += 5 + armour_penetration_flat += 10 + light_range += 3 + + playsound(src ,'sound/spookoween/insane_low_laugh.ogg', 200, TRUE) //quiet + binding_filters_update() + +/obj/item/melee/cultblade/haunted/proc/rebind_blade(mob/user) + visible_message("[user] has bound [src]!") + binding = FALSE + bound = TRUE + force -= 5 + armour_penetration_flat -= 10 + free_use = FALSE // it's a cult blade and you sealed away the other power. + light_range -= 3 + for(var/datum/spell/sword_spell as anything in path_sword_actions) + trapped_entity.RemoveSpell(sword_spell) + for(var/datum/spell/wielder_spell as anything in path_wielder_actions) + user.RemoveSpell(wielder_spell) + + playsound(src ,'sound/hallucinations/wail.ogg', 20, TRUE) // add BOUND alert and UNBOUND + binding_filters_update() + +/obj/item/melee/cultblade/haunted/Initialize(mapload, mob/soul_to_bind, mob/awakener, do_bind = TRUE) + . = ..() + icon_state = GET_CULT_DATA(haunted_longsword, "hauntedblade") + item_state = GET_CULT_DATA(haunted_longsword, "hauntedblade") + AddElement(/datum/element/heretic_focus) + if(do_bind && !mapload) + bind_soul(soul_to_bind, awakener) + binding_filters_update() + addtimer(CALLBACK(src, PROC_REF(start_glow_loop)), rand(0.1 SECONDS, 1.9 SECONDS)) + AddComponent(/datum/component/parry, _stamina_constant = 2, _stamina_coefficient = 0.4, _parryable_attack_types = ALL_ATTACK_TYPES, _parry_cooldown = (5 / 3) SECONDS) // 0.666667 seconds for 60% uptime. + +/obj/item/melee/cultblade/haunted/proc/bind_soul(mob/soul_to_bind, mob/awakener) + + var/datum/mind/trapped_mind = soul_to_bind?.mind + + if(!trapped_mind) + return // Can't do anything further down the list + + trapped_entity = new/mob/living/simple_animal/shade/sword/generic_item(src) + trapped_entity.name = soul_to_bind.name + + message_admins("[trapped_mind]") + message_admins("[trapped_mind.current]") + message_admins("[trapped_mind.key]") + // Get the heretic's new body and antag datum. + trapped_entity.key = trapped_mind.key + trapped_entity.mind = trapped_mind + message_admins("[trapped_mind]") + message_admins("[trapped_mind.current]") + message_admins("[trapped_mind.key]") + var/datum/antagonist/heretic/heretic_holder = IS_HERETIC(trapped_entity) + if(!heretic_holder) + stack_trace("[soul_to_bind] in but not a heretic on the heretic soul blade.") + + // Set the sword's path for spell selection. + heretic_path = heretic_holder.heretic_path + + // Copy the objectives to keep for roundend, remove the datum as neither us nor the heretic need it anymore + ///var/list/copied_objectives = heretic_holder.objectives.Copy() //qwertodo: + trapped_entity.mind.remove_antag_datum(/datum/antagonist/heretic) + + // Add the fallen antag datum, give them a heads-up of what's happening. + var/datum/antagonist/soultrapped_heretic/bozo = new() + //bozo.objectives |= copied_objectives //qwertodo: + trapped_entity.mind.add_antag_datum(bozo) + + // Assigning the spells to give to the wielder and spirit. + // Let them cast the given spell. + ADD_TRAIT(trapped_entity, TRAIT_ALLOW_HERETIC_CASTING, INNATE_TRAIT) + + var/list/path_spells = heretic_paths_to_haunted_sword_abilities[heretic_path] + + var/list/wielder_spells = path_spells[WIELDER_SPELLS] + var/list/sword_spells = path_spells[SWORD_SPELLS] + + name = "[path_spells[SWORD_PREFIX]] [name]" + + + // Creating the path spells. + // The sword is created bound - so we do not grant it the spells just yet, but we still create and store them. + + if(sword_spells) + for(var/datum/spell/sword_spell as anything in sword_spells) + var/datum/spell/instanced_spell = new sword_spell(trapped_entity) + LAZYADD(path_sword_actions, instanced_spell) + instanced_spell.overlay_icon_state = "bg_cult_border" // for flavor, and also helps distinguish + + if(wielder_spells) + for(var/datum/spell/wielder_spell as anything in wielder_spells) + var/datum/spell/instanced_spell = new wielder_spell(trapped_entity) + LAZYADD(path_wielder_actions, instanced_spell) + instanced_spell.overlay_icon_state = "bg_cult_border" + + binding_filters_update() + +/obj/item/melee/cultblade/haunted/equipped(mob/user, slot, initial) + . = ..() + if((!(slot & ITEM_SLOT_BOTH_HANDS)) || bound) + return + for(var/datum/spell/wielder_spell in path_wielder_actions) + user.AddSpell(wielder_spell) + binding_filters_update() + +/obj/item/melee/cultblade/haunted/dropped(mob/user, silent) + . = ..() + for(var/datum/spell/wielder_spell in path_wielder_actions) + user.RemoveSpell(wielder_spell) + binding_filters_update() + +/obj/item/melee/cultblade/haunted/proc/binding_filters_update(mob/user) + + var/h_color = heretic_path ? GLOB.heretic_path_to_color[heretic_path] : "#FF00FF" + + // on bound + if(bound) + add_filter("bind_glow", 2, list("type" = "outline", "color" = h_color, "size" = 0.1)) + remove_filter("unbound_ray") + update_filters() + // on unbound + else + // we re-add this every time it's picked up or dropped + remove_filter("unbound_ray") + add_filter(name = "unbound_ray", priority = 1, params = list( + type = "rays", + size = 16, + color = COLOR_HERETIC_GREEN, // the sickly green of the heretic leaking through + density = 16, + )) + // because otherwise the animations stack and it looks ridiculous + var/ray_filter = get_filter("unbound_ray") + animate(ray_filter, offset = 100, time = 2 MINUTES, loop = -1, flags = ANIMATION_PARALLEL) // Absurdly long animate so nobody notices it hitching when it loops + animate(offset = 0, time = 2 MINUTES) // I sure hope duration of animate doesnt have any performance effect + + update_filters() + +/obj/item/melee/cultblade/haunted/proc/start_glow_loop() + var/filter = get_filter("bind_glow") + if(!filter) + return + + animate(filter, alpha = 110, time = 1.5 SECONDS, loop = -1) + animate(alpha = 40, time = 2.5 SECONDS) + +#undef WIELDER_SPELLS +#undef SWORD_SPELLS +#undef SWORD_PREFIX + /obj/item/restraints/legcuffs/bola/cult name = "runed bola" desc = "A strong bola, bound with dark magic. Throw it to trip and slow your victim. Will not hit fellow cultists." diff --git a/code/game/gamemodes/cult/cult_structures.dm b/code/game/gamemodes/cult/cult_structures.dm index 26066e3b5bf1..15d85d9f4da7 100644 --- a/code/game/gamemodes/cult/cult_structures.dm +++ b/code/game/gamemodes/cult/cult_structures.dm @@ -40,6 +40,8 @@ var/creation_delay = 2400 var/list/choosable_items = list("A coder forgot to set this" = /obj/item/grown/bananapeel) var/creation_message = "A dank smoke comes out, and you pass out. When you come to, you notice a %ITEM%!" + /// The dispenser will create this item and then delete itself if it is rust converted. + var/obj/mansus_conversion_path = /obj/item/bikehorn/rubberducky /obj/structure/cult/functional/obj_destruction() visible_message(death_message) @@ -134,6 +136,13 @@ light_power = initial(light_power) update_light() +/obj/structure/cult/functional/rust_heretic_act() + visible_message("[src] crumbles to dust. In its midst, you spot \a [initial(mansus_conversion_path.name)].") + var/turf/turfy = get_turf(src) + new mansus_conversion_path(turfy) + turfy.rust_heretic_act() + return ..() + /obj/structure/cult/functional/altar name = "altar" desc = "A bloodstained altar dedicated to a cult." @@ -147,6 +156,7 @@ creation_message = "You kneel before the altar and your faith is rewarded with a %ITEM%!" choosable_items = list("Eldritch Whetstone" = /obj/item/whetstone/cult, "Flask of Unholy Water" = /obj/item/reagent_containers/drinks/bottle/unholywater, "Construct Shell" = /obj/structure/constructshell) + mansus_conversion_path = /obj/effect/heretic_rune/big /obj/structure/cult/functional/altar/Initialize(mapload) . = ..() @@ -167,6 +177,7 @@ selection_title = "Forge" creation_message = "You work the forge as dark knowledge guides your hands, creating a %ITEM%!" choosable_items = list("Shielded Robe" = /obj/item/clothing/suit/hooded/cultrobes/cult_shield, "Flagellant's Robe" = /obj/item/clothing/suit/hooded/cultrobes/flagellant_robe) + mansus_conversion_path = /obj/structure/eldritch_crucible /obj/structure/cult/functional/forge/get_choosable_items() . = ..() @@ -218,6 +229,7 @@ GLOBAL_LIST_INIT(blacklisted_pylon_turfs, typecacheof(list( /turf/simulated/wall/cult/artificer ))) + //why is this a subtype of the dispenser type /obj/structure/cult/functional/pylon name = "pylon" desc = "A floating crystal that slowly heals those faithful to a cult." @@ -227,6 +239,7 @@ GLOBAL_LIST_INIT(blacklisted_pylon_turfs, typecacheof(list( max_integrity = 50 //Very fragile death_message = "The pylon's crystal vibrates and glows fiercely before violently shattering!" death_sound = 'sound/effects/pylon_shatter.ogg' + mansus_conversion_path = /obj/item/clothing/neck/heretic_focus //I guess the crystal turns into a necklace. Look this shouldnt be a subtype, auugh var/heal_delay = 30 var/last_heal = 0 @@ -319,6 +332,7 @@ GLOBAL_LIST_INIT(blacklisted_pylon_turfs, typecacheof(list( creation_message = "You invoke the dark magic of the tomes creating a %ITEM%!" choosable_items = list("Shuttle Curse" = /obj/item/shuttle_curse, "Zealot's Blindfold" = /obj/item/clothing/glasses/hud/health/night/cultblind, "Veil Shifter" = /obj/item/cult_shift, "Reality sunderer" = /obj/item/portal_amulet, "Blank Tarot Card" = /obj/item/blank_tarot_card) + mansus_conversion_path = /obj/item/codex_cicatrix /obj/structure/cult/functional/archives/Initialize(mapload) . = ..() diff --git a/code/game/gamemodes/cult/ritual.dm b/code/game/gamemodes/cult/ritual.dm index fd1e6f3f1438..95405471dd4f 100644 --- a/code/game/gamemodes/cult/ritual.dm +++ b/code/game/gamemodes/cult/ritual.dm @@ -1,6 +1,3 @@ -#define CULT_ELDERGOD "eldergod" -#define CULT_SLAUGHTER "slaughter" - /obj/item/melee/cultblade/dagger name = "ritual dagger" desc = "A strange dagger said to be used by sinister groups for \"preparing\" a corpse before sacrificing it to their dark gods." @@ -11,14 +8,12 @@ throwforce = 25 armour_penetration_flat = 35 sprite_sheets_inhand = null // Override parent - var/drawing_rune = FALSE - var/scribe_multiplier = 1 // Lower is faster /obj/item/melee/cultblade/dagger/adminbus name = "ritual dagger of scribing, +1" desc = "VERY fast culto scribing at incredible high speed!" force = 16 - scribe_multiplier = 0.1 + toolspeed = 0.1 /obj/item/melee/cultblade/dagger/Initialize(mapload) . = ..() @@ -57,147 +52,3 @@ scribe_rune(user) else to_chat(user, "[src] is covered in unintelligible shapes and markings.") - -/obj/item/melee/cultblade/dagger/proc/narsie_rune_check(mob/living/user, area/A) - var/datum/game_mode/gamemode = SSticker.mode - - if(gamemode.cult_team.cult_status < NARSIE_NEEDS_SUMMONING) - to_chat(user, "[GET_CULT_DATA(entity_name, "Your god")] is not ready to be summoned yet!") - return FALSE - if(gamemode.cult_team.cult_status == NARSIE_HAS_RISEN) - to_chat(user, "\"I am already here. There is no need to try to summon me now.\"") - return FALSE - - var/list/summon_areas = gamemode.cult_team.obj_summon.summon_spots - if(!(A in summon_areas)) - to_chat(user, "[GET_CULT_DATA(entity_name, "Your god")] can only be summoned where the veil is weak - in [english_list(summon_areas)]!") - return FALSE - var/confirm_final = tgui_alert(user, "This is the FINAL step to summon your deities power, it is a long, painful ritual and the crew will be alerted to your presence AND your location!", - "Are you prepared for the final battle?", list("My life for [GET_CULT_DATA(entity_name, "the cult")]!", "No")) - if(user) - if(confirm_final == "No" || confirm_final == null) - to_chat(user, "You decide to prepare further before scribing the rune.") - return FALSE - else - if(locate(/obj/effect/rune) in range(1, user)) - to_chat(user, "You need a space cleared of runes before you can summon [GET_CULT_DATA(entity_title1, "your god")]!") - return FALSE - else - return TRUE - -/obj/item/melee/cultblade/dagger/proc/can_scribe(mob/living/user) - if(!src || !user || loc != user || user.incapacitated()) - return FALSE - if(drawing_rune) - to_chat(user, "You're already drawing a rune!") - return FALSE - - var/turf/T = get_turf(user) - if(isspaceturf(T)) - return FALSE - if((locate(/obj/effect/rune) in T) || (locate(/obj/effect/rune/narsie) in range(1, T))) - to_chat(user, "There's already a rune here!") - return FALSE - return TRUE - -/obj/item/melee/cultblade/dagger/proc/scribe_rune(mob/living/user) - var/list/shields = list() - var/list/possible_runes = list() - var/keyword - - if(!can_scribe(user)) // Check this before anything else - return - - // Choosing a rune - for(var/I in (subtypesof(/obj/effect/rune) - /obj/effect/rune/malformed)) - var/obj/effect/rune/R = I - var/rune_name = initial(R.cultist_name) - if(rune_name) - possible_runes[rune_name] = R - if(!length(possible_runes)) - return - - var/chosen_rune = tgui_input_list(user, "Choose a rite to scribe.", "Sigils of Power", possible_runes) - if(!chosen_rune) - return - var/obj/effect/rune/rune = possible_runes[chosen_rune] - var/narsie_rune = FALSE - if(rune == /obj/effect/rune/narsie) - narsie_rune = TRUE - if(initial(rune.req_keyword)) - keyword = tgui_input_text(user, "Please enter a keyword for the rune.", "Enter Keyword") - if(!keyword) - return - - // Check everything again, in case they moved - if(!can_scribe(user)) - return - - // Check if the rune is allowed - var/area/A = get_area(src) - var/turf/runeturf = get_turf(user) - var/datum/game_mode/gamemode = SSticker.mode - if(ispath(rune, /obj/effect/rune/summon)) - if(!is_station_level(runeturf.z) || isspacearea(A)) - to_chat(user, "The veil is not weak enough here to summon a cultist, you must be on station!") - return - - if(ispath(rune, /obj/effect/rune/teleport)) - if(!is_level_reachable(user.z)) - to_chat(user, "You are too far away from the station to teleport!") - return - - var/old_color = user.color // we'll temporarily redden the user for better feedback to fellow cultists. Store this to revert them back. - if(narsie_rune) - if(!narsie_rune_check(user, A)) - return // don't do shit - var/list/summon_areas = gamemode.cult_team.obj_summon.summon_spots - if(!(A in summon_areas)) // Check again to make sure they didn't move - to_chat(user, "The ritual can only begin where the veil is weak - in [english_list(summon_areas)]!") - return - GLOB.major_announcement.Announce("Figments from an eldritch god are being summoned into the [A.map_name] from an unknown dimension. Disrupt the ritual at all costs, before the station is destroyed! Space Law and SOP are suspended. The entire crew must kill cultists on sight.", "Central Command Higher Dimensional Affairs", 'sound/AI/cult_summon.ogg') - for(var/I in spiral_range_turfs(1, user, 1)) - var/turf/T = I - var/obj/machinery/shield/cult/narsie/N = new(T) - shields |= N - user.color = COLOR_RED - - // Draw the rune - var/mob/living/carbon/human/H = user - H.cult_self_harm(initial(rune.scribe_damage)) - var/others_message - if(!narsie_rune) - others_message = "[user] cuts [user.p_their()] body and begins writing in [user.p_their()] own blood!" - else - others_message = "[user] cuts [user.p_their()] body and begins writing something particularly ominous in [user.p_their()] own blood!" - user.visible_message(others_message, - "You slice open your body and begin drawing a sigil of [GET_CULT_DATA(entity_title3, "your god")].") - - drawing_rune = TRUE // Only one at a time - var/scribe_successful = do_after(user, initial(rune.scribe_delay) * scribe_multiplier, target = runeturf) - for(var/V in shields) // Only used for the 'Tear Veil' rune - var/obj/machinery/shield/S = V - if(S && !QDELETED(S)) - qdel(S) - user.color = old_color - drawing_rune = FALSE - if(!scribe_successful) - return - - user.visible_message("[user] creates a strange circle in [user.p_their()] own blood.", - "You finish drawing the arcane markings of [GET_CULT_DATA(entity_title3, "your god")].") - - var/obj/effect/rune/R = new rune(runeturf, keyword) - if(narsie_rune) - for(var/obj/effect/rune/I in orange(1, R)) - qdel(I) - SSblackbox.record_feedback("tally", "runes_scribed", 1, "[R.cultist_name]") - R.blood_DNA = list() - R.blood_DNA[H.dna.unique_enzymes] = H.dna.blood_type - R.add_hiddenprint(H) - R.color = H.dna.species.blood_color - R.rune_blood_color = H.dna.species.blood_color - to_chat(user, "The [lowertext(initial(rune.cultist_name))] rune [initial(rune.cultist_desc)]") - -#undef CULT_ELDERGOD -#undef CULT_SLAUGHTER diff --git a/code/game/gamemodes/cult/runes.dm b/code/game/gamemodes/cult/runes.dm index 6639c11dcc1e..72993d20527f 100644 --- a/code/game/gamemodes/cult/runes.dm +++ b/code/game/gamemodes/cult/runes.dm @@ -82,7 +82,7 @@ To draw a rune, use a ritual dagger. var/obj/item/melee/cultblade/dagger/D = I user.visible_message("[user] begins to erase [src] with [I].") - if(do_after(user, initial(scribe_delay) * D.scribe_multiplier, target = src)) + if(do_after(user, initial(scribe_delay) * D.toolspeed, target = src)) to_chat(user, "You carefully erase the [lowertext(cultist_name)] rune.") qdel(src) return @@ -372,6 +372,14 @@ structure_check() searches for nearby cultist structures required for the invoca fail_invoke() log_game("Sacrifice rune failed - not enough acolytes and target is living") return + var/mob/living/first_invoker = invokers[1] + var/datum/antagonist/cultist/first_invoker_datum = first_invoker.mind.has_antag_datum(/datum/antagonist/cultist) + var/datum/team/cult/cult_team = first_invoker_datum.get_team() + var/signal_result = SEND_SIGNAL(offering, COMSIG_LIVING_CULT_SACRIFICED, invokers, cult_team) + + var/do_message = TRUE + if(signal_result & SILENCE_SACRIFICE_MESSAGE) + do_message = FALSE var/sacrifice_fulfilled var/worthless = FALSE @@ -392,36 +400,43 @@ structure_check() searches for nearby cultist structures required for the invoca GLOB.sacrificed += offering new /obj/effect/temp_visual/cult/sac(loc) - for(var/M in invokers) - if(sacrifice_fulfilled) - to_chat(M, "\"Yes! This is the one I desire! You have done well.\"") - if(!SSticker.mode.cult_team.mirror_shields_active) // Only show once - to_chat(M, "You are now able to construct mirror shields inside the daemon forge.") - SSticker.mode.cult_team.mirror_shields_active = TRUE - else - if((ishuman(offering) && offering.mind?.offstation_role && offering.mind.special_role != SPECIAL_ROLE_ERT) || HAS_MIND_TRAIT(offering, TRAIT_XENOBIO_SPAWNED_HUMAN)) //If you try it on a ghost role, or an envolved caterpillar/nymph, you get nothing - to_chat(M, "\"This soul is of no use to either of us.\"") - worthless = TRUE - else if(ishuman(offering) || isrobot(offering)) - to_chat(M, "\"I accept this sacrifice.\"") + if(do_message) + for(var/M in invokers) + if(sacrifice_fulfilled) + to_chat(M, "\"Yes! This is the one I desire! You have done well.\"") + if(!SSticker.mode.cult_team.mirror_shields_active) // Only show once + to_chat(M, "You are now able to construct mirror shields inside the daemon forge.") + SSticker.mode.cult_team.mirror_shields_active = TRUE else - to_chat(M, "\"I accept this meager sacrifice.\"") - playsound(offering, 'sound/misc/demon_consume.ogg', 100, TRUE, SOUND_RANGE_SET(10)) - - if(((ishuman(offering) || isrobot(offering) || isbrain(offering)) && offering.mind) && !worthless) - var/obj/item/soulstone/stone = new /obj/item/soulstone(get_turf(src)) - stone.invisibility = INVISIBILITY_MAXIMUM // So it's not picked up during transfer_soul() - stone.transfer_soul("FORCE", offering, user) // If it cannot be added - stone.invisibility = 0 - var/put_in_hands = user.put_in_any_hand_if_possible(stone) - if(put_in_hands) - to_chat(user, "A glowing crimson shard appears in your hand - your new ally contained within.") + if((ishuman(offering) && offering.mind?.offstation_role && offering.mind.special_role != SPECIAL_ROLE_ERT) || HAS_MIND_TRAIT(offering, TRAIT_XENOBIO_SPAWNED_HUMAN)) //If you try it on a ghost role, or an envolved caterpillar/nymph, you get nothing + to_chat(M, "\"This soul is of no use to either of us.\"") + worthless = TRUE + else if(ishuman(offering) || isrobot(offering)) + to_chat(M, "\"I accept this sacrifice.\"") + else + to_chat(M, "\"I accept this meager sacrifice.\"") + // post-message + if(signal_result & STOP_SACRIFICE) + return FALSE + if(offering && (signal_result & DUST_SACRIFICE)) // No soulstone when dusted + playsound(offering, 'sound/magic/teleport_diss.ogg', 100, TRUE) + offering.dust() else - if(isrobot(offering)) - offering.dust() //To prevent the MMI from remaining + playsound(offering, 'sound/misc/demon_consume.ogg', 100, TRUE, SOUND_RANGE_SET(10)) + if(((ishuman(offering) || isrobot(offering) || isbrain(offering)) && offering.mind) && !worthless) + var/obj/item/soulstone/stone = new /obj/item/soulstone(get_turf(src)) + stone.invisibility = INVISIBILITY_MAXIMUM // So it's not picked up during transfer_soul() + stone.transfer_soul("FORCE", offering, user) // If it cannot be added + stone.invisibility = 0 + var/put_in_hands = user.put_in_any_hand_if_possible(stone) + if(put_in_hands) + to_chat(user, "A glowing crimson shard appears in your hand - your new ally contained within.") else - offering.gib() - playsound(offering, 'sound/magic/disintegrate.ogg', 100, TRUE, SOUND_RANGE_SET(10)) + if(isrobot(offering)) + offering.dust() //To prevent the MMI from remaining + else + offering.gib() + playsound(offering, 'sound/magic/disintegrate.ogg', 100, TRUE, SOUND_RANGE_SET(10)) if(sacrifice_fulfilled) SSticker.mode.cult_team.successful_sacrifice() return TRUE diff --git a/code/game/gamemodes/dynamic/antag_rulesets.dm b/code/game/gamemodes/dynamic/antag_rulesets.dm index 500f9aa419f1..0cd12d00510b 100644 --- a/code/game/gamemodes/dynamic/antag_rulesets.dm +++ b/code/game/gamemodes/dynamic/antag_rulesets.dm @@ -172,6 +172,15 @@ traitor_datum.addtimer(CALLBACK(traitor_datum, TYPE_PROC_REF(/datum/antagonist/traitor, reveal_delayed_objectives)), latespawn_time, TIMER_DELETE_ME) antag.add_antag_datum(traitor_datum) +/datum/ruleset/heretic + name = "Heretic" + ruleset_weight = 11 + antag_cost = 10 + antagonist_type = /datum/antagonist/heretic + + banned_jobs = list("Cyborg", "AI") + + /datum/ruleset/vampire name = "Vampire" ruleset_weight = 12 diff --git a/code/game/gamemodes/game_mode.dm b/code/game/gamemodes/game_mode.dm index d072659317c5..c0b714151763 100644 --- a/code/game/gamemodes/game_mode.dm +++ b/code/game/gamemodes/game_mode.dm @@ -58,6 +58,8 @@ var/list/datum/mind/vampire_enthralled = list() /// A list of all minds which have the mindflayer antag datum var/list/datum/mind/mindflayers = list() + /// A list of all minds which have the heretic antag datum + var/list/datum/mind/heretics = list() /// A list containing references to the minds of soon-to-be traitors. This is seperate to avoid duplicate entries in the `traitors` list. var/list/datum/mind/pre_traitors = list() diff --git a/code/game/jobs/access.dm b/code/game/jobs/access.dm index 4bd7839054f2..1aba8ca5f4ae 100644 --- a/code/game/jobs/access.dm +++ b/code/game/jobs/access.dm @@ -1,6 +1,9 @@ //returns 1 if this mob has sufficient access to use this object /obj/proc/allowed(mob/M) //check if we don't require any access at all + var/attempted_access = SEND_SIGNAL(M, COMSIG_MOB_TRIED_ACCESS, src) + if(attempted_access & ACCESS_DISALLOWED) + return FALSE if(check_access()) return 1 diff --git a/code/game/machinery/doors/door.dm b/code/game/machinery/doors/door.dm index c89fff93af6a..da4276e6b277 100644 --- a/code/game/machinery/doors/door.dm +++ b/code/game/machinery/doors/door.dm @@ -54,6 +54,9 @@ /// How much this door reduces superconductivity to when closed. var/superconductivity = DOOR_HEAT_TRANSFER_COEFFICIENT + /// Blocks the door from making sparks when on cooldown. Lag preventor, disabled by disable_door_sparks for 3 seconds + COOLDOWN_DECLARE(spark_block_cooldown) + /obj/machinery/door/Initialize(mapload) . = ..() @@ -278,7 +281,7 @@ /obj/machinery/door/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1, attack_dir) . = ..() if(. && obj_integrity > 0) - if(damage_amount >= 10 && prob(30)) + if(damage_amount >= 10 && prob(30) && COOLDOWN_FINISHED(src, spark_block_cooldown)) spark_system.start() /obj/machinery/door/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0) @@ -611,3 +614,6 @@ blockage.update_icon(UPDATE_ICON_STATE) #undef MAX_FOAM_LEVEL + +/obj/machinery/door/proc/disable_door_sparks() + COOLDOWN_START(src, spark_block_cooldown, 3 SECONDS) diff --git a/code/game/machinery/doors/windowdoor.dm b/code/game/machinery/doors/windowdoor.dm index 3d5bfb36c1ff..e378c1d4afc6 100644 --- a/code/game/machinery/doors/windowdoor.dm +++ b/code/game/machinery/doors/windowdoor.dm @@ -533,3 +533,7 @@ color = "#960000" animate(src, color = previouscolor, time = 8) +/obj/machinery/door/window/rust_heretic_act() + color = COLOR_RUSTED_GLASS + take_damage(obj_integrity * 0.5) + max_integrity = max_integrity * 0.5 diff --git a/code/game/machinery/machinery.dm b/code/game/machinery/machinery.dm index 00fc7a172ce9..6fbec7371c36 100644 --- a/code/game/machinery/machinery.dm +++ b/code/game/machinery/machinery.dm @@ -598,3 +598,6 @@ /obj/machinery/fall_and_crush(turf/target_turf, crush_damage, should_crit, crit_damage_factor, datum/tilt_crit/forced_crit, weaken_time, knockdown_time, ignore_gravity, should_rotate, angle, rightable, block_interactions) . = ..(target_turf, crush_damage, should_crit, crit_damage_factor, forced_crit, weaken_time, knockdown_time, ignore_gravity = FALSE, should_rotate = TRUE, rightable = TRUE, block_interactions_until_righted = TRUE) + +/obj/machinery/rust_heretic_act() + take_damage(500, BRUTE, MELEE, 1) diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm index 4ffdcdd9df4a..cf80c97bce9d 100644 --- a/code/game/mecha/mecha.dm +++ b/code/game/mecha/mecha.dm @@ -1642,4 +1642,7 @@ return FALSE return TRUE +/obj/mecha/rust_heretic_act() + take_damage(500, BRUTE) + #undef OCCUPANT_LOGGING diff --git a/code/game/objects/effects/forcefields.dm b/code/game/objects/effects/forcefields.dm index b86ae670a395..dd539ccff999 100644 --- a/code/game/objects/effects/forcefields.dm +++ b/code/game/objects/effects/forcefields.dm @@ -70,3 +70,38 @@ name = "invisible blockade" desc = "You might be here a while." lifetime = 60 SECONDS + +/// The cosmic heretics forcefield +/obj/effect/forcefield/cosmic_field + name = "Cosmic Field" + desc = "A field that cannot be passed by people marked with a cosmic star." + icon = 'icons/effects/eldritch.dmi' + icon_state = "cosmic_carpet" + anchored = TRUE + density = FALSE + lifetime = 30 SECONDS + /// Flags for what antimagic can just ignore our forcefields + var/antimagic_flags = MAGIC_RESISTANCE + +/obj/effect/forcefield/cosmic_field/Initialize(mapload, flags = MAGIC_RESISTANCE) + . = ..() + antimagic_flags = flags + +/obj/effect/forcefield/cosmic_field/CanAtmosPass(direction) + return FALSE + +/obj/effect/forcefield/cosmic_field/CanPass(atom/movable/mover, border_dir) + if(!isliving(mover)) + return ..() + var/mob/living/living_mover = mover + if(living_mover.can_block_magic(antimagic_flags, charge_cost = 0)) + return ..() + if(living_mover.has_status_effect(/datum/status_effect/star_mark)) + return FALSE + return ..() + +/obj/effect/forcefield/cosmic_field/fast + lifetime = 5 SECONDS + +/obj/effect/forcefield/cosmic_field/extrafast + lifetime = 2.5 SECONDS diff --git a/code/game/objects/effects/spawners/random/engineering_spawners.dm b/code/game/objects/effects/spawners/random/engineering_spawners.dm index eb57cf825cc8..1998d1489a6b 100644 --- a/code/game/objects/effects/spawners/random/engineering_spawners.dm +++ b/code/game/objects/effects/spawners/random/engineering_spawners.dm @@ -28,13 +28,16 @@ /obj/item/stack/sheet/glass, /obj/item/stack/sheet/rglass, /obj/item/stack/sheet/wood, - ) = 8, + ) = 7, list( /obj/item/stack/sheet/plastic, /obj/item/stack/sheet/plasteel, /obj/item/stack/sheet/mineral/plasma, ) = 2, + list( + /obj/item/stack/sheet/mineral/titanium + ) = 1 //Makes the heretic knife path slightly easier. Not as useful as silver, so used in place. ) /obj/effect/spawner/random/engineering/materials/make_item(spawn_loc, type_path_to_make) diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index ab8b3bff5337..7af9e68d689f 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -582,6 +582,7 @@ GLOBAL_DATUM_INIT(welding_sparks, /mutable_appearance, mutable_appearance('icons // Checks before we get to here are: mob is alive, mob is not restrained, paralyzed, asleep, resting, laying, item is on the mob. /obj/item/proc/ui_action_click(mob/user, actiontype) attack_self__legacy__attackchain(user) + activate_self(user) /obj/item/proc/IsReflect(def_zone) // This proc determines if and at what% an object will reflect energy projectiles if it's in l_hand,r_hand or wear_suit return FALSE diff --git a/code/game/objects/items/weapons/batons.dm b/code/game/objects/items/weapons/batons.dm index 2e905ae25409..3193c57b32f8 100644 --- a/code/game/objects/items/weapons/batons.dm +++ b/code/game/objects/items/weapons/batons.dm @@ -98,7 +98,8 @@ add_attack_logs(user, target, "Knocked down with [src]") // Hit 'em target.LAssailant = iscarbon(user) ? user : null - target.KnockDown(knockdown_duration) + if(!HAS_TRAIT(target, TRAIT_BATON_RESISTANCE)) + target.KnockDown(knockdown_duration) on_cooldown = TRUE addtimer(VARSET_CALLBACK(src, on_cooldown, FALSE), cooldown) ADD_TRAIT(target, TRAIT_WAS_BATONNED, user_UID) // so one person cannot hit the same person with two separate batons diff --git a/code/game/objects/items/weapons/holy_weapons.dm b/code/game/objects/items/weapons/holy_weapons.dm index 6f98c58a958b..268cebc50bcb 100644 --- a/code/game/objects/items/weapons/holy_weapons.dm +++ b/code/game/objects/items/weapons/holy_weapons.dm @@ -27,6 +27,12 @@ /obj/item/nullrod/Initialize(mapload) . = ..() AddComponent(/datum/component/anti_magic, antimagic_type) + AddComponent(/datum/component/effect_remover, \ + success_feedback = "You disrupt the magic of %THEEFFECT with %THEWEAPON.", \ + success_forcesay = "BEGONE FOUL MAGIKS!!", \ + effects_we_clear = list(/obj/effect/heretic_rune, /obj/effect/cosmic_rune), \ + time_to_remove = 5 SECONDS, \ + ) if(!length(variant_names)) for(var/I in typesof(/obj/item/nullrod)) var/obj/item/nullrod/rod = I diff --git a/code/game/objects/items/weapons/melee/melee_misc.dm b/code/game/objects/items/weapons/melee/melee_misc.dm index 94f09cd1a0a2..82d4a8fc8355 100644 --- a/code/game/objects/items/weapons/melee/melee_misc.dm +++ b/code/game/objects/items/weapons/melee/melee_misc.dm @@ -3,6 +3,149 @@ lefthand_file = 'icons/mob/inhands/weapons_lefthand.dmi' righthand_file = 'icons/mob/inhands/weapons_righthand.dmi' needs_permit = TRUE + var/drawing_rune = FALSE + +/// Used by cult daggers and the cursed sickly blade. No other melee item can do this, just a universal melee item proc so I don't have to copy paste code +/obj/item/melee/proc/scribe_rune(mob/living/user) + var/list/shields = list() + var/list/possible_runes = list() + var/keyword + + if(!can_scribe(user)) // Check this before anything else + return + + // Choosing a rune + for(var/I in (subtypesof(/obj/effect/rune) - /obj/effect/rune/malformed)) + var/obj/effect/rune/R = I + var/rune_name = initial(R.cultist_name) + if(rune_name) + possible_runes[rune_name] = R + if(!length(possible_runes)) + return + + var/chosen_rune = tgui_input_list(user, "Choose a rite to scribe.", "Sigils of Power", possible_runes) + if(!chosen_rune) + return + var/obj/effect/rune/rune = possible_runes[chosen_rune] + var/narsie_rune = FALSE + if(rune == /obj/effect/rune/narsie) + narsie_rune = TRUE + if(initial(rune.req_keyword)) + keyword = tgui_input_text(user, "Please enter a keyword for the rune.", "Enter Keyword") + if(!keyword) + return + + // Check everything again, in case they moved + if(!can_scribe(user)) + return + + // Check if the rune is allowed + var/area/A = get_area(src) + var/turf/runeturf = get_turf(user) + var/datum/game_mode/gamemode = SSticker.mode + if(ispath(rune, /obj/effect/rune/summon)) + if(!is_station_level(runeturf.z) || isspacearea(A)) + to_chat(user, "The veil is not weak enough here to summon a cultist, you must be on station!") + return + + if(ispath(rune, /obj/effect/rune/teleport)) + if(!is_level_reachable(user.z)) + to_chat(user, "You are too far away from the station to teleport!") + return + + var/old_color = user.color // we'll temporarily redden the user for better feedback to fellow cultists. Store this to revert them back. + if(narsie_rune) + if(!narsie_rune_check(user, A)) + return // don't do shit + var/list/summon_areas = gamemode.cult_team.obj_summon.summon_spots + if(!(A in summon_areas)) // Check again to make sure they didn't move + to_chat(user, "The ritual can only begin where the veil is weak - in [english_list(summon_areas)]!") + return + GLOB.major_announcement.Announce("Figments from an eldritch god are being summoned into the [A.map_name] from an unknown dimension. Disrupt the ritual at all costs, before the station is destroyed! Space Law and SOP are suspended. The entire crew must kill cultists on sight.", "Central Command Higher Dimensional Affairs", 'sound/AI/cult_summon.ogg') + for(var/I in spiral_range_turfs(1, user, 1)) + var/turf/T = I + var/obj/machinery/shield/cult/narsie/N = new(T) + shields |= N + user.color = COLOR_RED + + // Draw the rune + var/mob/living/carbon/human/H = user + H.cult_self_harm(initial(rune.scribe_damage)) + var/others_message + if(!narsie_rune) + others_message = "[user] cuts [user.p_their()] body and begins writing in [user.p_their()] own blood!" + else + others_message = "[user] cuts [user.p_their()] body and begins writing something particularly ominous in [user.p_their()] own blood!" + user.visible_message(others_message, + "You slice open your body and begin drawing a sigil of [GET_CULT_DATA(entity_title3, "your god")].") + + drawing_rune = TRUE // Only one at a time + var/scribe_successful = do_after(user, initial(rune.scribe_delay) * toolspeed, target = runeturf) + for(var/V in shields) // Only used for the 'Tear Veil' rune + var/obj/machinery/shield/S = V + if(S && !QDELETED(S)) + qdel(S) + user.color = old_color + drawing_rune = FALSE + if(!scribe_successful) + return + + user.visible_message("[user] creates a strange circle in [user.p_their()] own blood.", + "You finish drawing the arcane markings of [GET_CULT_DATA(entity_title3, "your god")].") + + var/obj/effect/rune/R = new rune(runeturf, keyword) + if(narsie_rune) + for(var/obj/effect/rune/I in orange(1, R)) + qdel(I) + SSblackbox.record_feedback("tally", "runes_scribed", 1, "[R.cultist_name]") + R.blood_DNA = list() + R.blood_DNA[H.dna.unique_enzymes] = H.dna.blood_type + R.add_hiddenprint(H) + R.color = H.dna.species.blood_color + R.rune_blood_color = H.dna.species.blood_color + to_chat(user, "The [lowertext(initial(rune.cultist_name))] rune [initial(rune.cultist_desc)]") + +/obj/item/melee/proc/narsie_rune_check(mob/living/user, area/A) + var/datum/game_mode/gamemode = SSticker.mode + + if(gamemode.cult_team.cult_status < NARSIE_NEEDS_SUMMONING) + to_chat(user, "[GET_CULT_DATA(entity_name, "Your god")] is not ready to be summoned yet!") + return FALSE + if(gamemode.cult_team.cult_status == NARSIE_HAS_RISEN) + to_chat(user, "\"I am already here. There is no need to try to summon me now.\"") + return FALSE + + var/list/summon_areas = gamemode.cult_team.obj_summon.summon_spots + if(!(A in summon_areas)) + to_chat(user, "[GET_CULT_DATA(entity_name, "Your god")] can only be summoned where the veil is weak - in [english_list(summon_areas)]!") + return FALSE + var/confirm_final = tgui_alert(user, "This is the FINAL step to summon your deities power, it is a long, painful ritual and the crew will be alerted to your presence AND your location!", + "Are you prepared for the final battle?", list("My life for [GET_CULT_DATA(entity_name, "the cult")]!", "No")) + if(user) + if(confirm_final == "No" || confirm_final == null) + to_chat(user, "You decide to prepare further before scribing the rune.") + return FALSE + else + if(locate(/obj/effect/rune) in range(1, user)) + to_chat(user, "You need a space cleared of runes before you can summon [GET_CULT_DATA(entity_title1, "your god")]!") + return FALSE + else + return TRUE + +/obj/item/melee/proc/can_scribe(mob/living/user) + if(!src || !user || loc != user || user.incapacitated()) + return FALSE + if(drawing_rune) + to_chat(user, "You're already drawing a rune!") + return FALSE + + var/turf/T = get_turf(user) + if(isspaceturf(T)) + return FALSE + if((locate(/obj/effect/rune) in T) || (locate(/obj/effect/rune/narsie) in range(1, T))) + to_chat(user, "There's already a rune here!") + return FALSE + return TRUE /obj/item/melee/chainofcommand name = "chain of command" diff --git a/code/game/objects/items/weapons/storage/belt.dm b/code/game/objects/items/weapons/storage/belt.dm index a3c57ce9dccf..10b0a6e735e1 100644 --- a/code/game/objects/items/weapons/storage/belt.dm +++ b/code/game/objects/items/weapons/storage/belt.dm @@ -114,7 +114,8 @@ /obj/item/holosign_creator, /obj/item/stack/nanopaste, /obj/item/robotanalyzer, - /obj/item/rpd/bluespace + /obj/item/rpd/bluespace, + /obj/item/melee/sickly_blade/lock ) /obj/item/storage/belt/utility/full/populate_contents() @@ -852,7 +853,8 @@ /obj/item/wirecutters, /obj/item/wrench, /obj/item/multitool, - /obj/item/handheld_defibrillator + /obj/item/handheld_defibrillator, + /obj/item/melee/sickly_blade/lock ) /obj/item/storage/belt/bluespace/owlman diff --git a/code/game/objects/items/weapons/stunbaton.dm b/code/game/objects/items/weapons/stunbaton.dm index e877bb946940..29ade7621cfd 100644 --- a/code/game/objects/items/weapons/stunbaton.dm +++ b/code/game/objects/items/weapons/stunbaton.dm @@ -228,7 +228,8 @@ H.SetStuttering(10 SECONDS) ADD_TRAIT(L, TRAIT_WAS_BATONNED, user_UID) // so one person cannot hit the same person with two separate batons - L.apply_status_effect(STATUS_EFFECT_DELAYED, knockdown_delay, CALLBACK(L, TYPE_PROC_REF(/mob/living/, KnockDown), knockdown_duration), COMSIG_LIVING_CLEAR_STUNS) + if(!HAS_TRAIT(L, TRAIT_BATON_RESISTANCE)) + L.apply_status_effect(STATUS_EFFECT_DELAYED, knockdown_delay, CALLBACK(L, TYPE_PROC_REF(/mob/living/, KnockDown), knockdown_duration), COMSIG_LIVING_CLEAR_STUNS) addtimer(CALLBACK(src, PROC_REF(baton_delay), L, user_UID), knockdown_delay) SEND_SIGNAL(L, COMSIG_LIVING_MINOR_SHOCK, 33) diff --git a/code/game/objects/structures.dm b/code/game/objects/structures.dm index e1ac0156b718..47f9e2e140d0 100644 --- a/code/game/objects/structures.dm +++ b/code/game/objects/structures.dm @@ -212,3 +212,6 @@ /obj/structure/fall_and_crush(turf/target_turf, crush_damage, should_crit, crit_damage_factor, datum/tilt_crit/forced_crit, weaken_time, knockdown_time, ignore_gravity, should_rotate, angle, rightable, block_interactions) . = ..(target_turf, crush_damage, should_crit, crit_damage_factor, forced_crit, weaken_time, knockdown_time, ignore_gravity, should_rotate, angle, rightable = TRUE, block_interactions_until_righted = FALSE) + +/obj/structure/rust_heretic_act() + take_damage(500, BRUTE, "melee", 1) diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm index a4e8b7452331..666e7f1d62d1 100644 --- a/code/game/objects/structures/window.dm +++ b/code/game/objects/structures/window.dm @@ -522,6 +522,12 @@ explosion_block = 1 glass_type = /obj/item/stack/sheet/rglass +// You can't rust glass! So only reinforced glass can be impacted. +/obj/structure/window/reinforced/rust_heretic_act() + color = COLOR_RUSTED_GLASS + take_damage(obj_integrity * 0.5) + max_integrity = max_integrity * 0.5 + /obj/structure/window/reinforced/tinted name = "tinted window" desc = "It looks rather strong and opaque. Might take a few good hits to shatter it." diff --git a/code/game/turfs/simulated/floor.dm b/code/game/turfs/simulated/floor.dm index a8165ed08823..c1b4ca76bd4e 100644 --- a/code/game/turfs/simulated/floor.dm +++ b/code/game/turfs/simulated/floor.dm @@ -266,3 +266,9 @@ GLOBAL_LIST_INIT(icons_to_ignore_at_floor_init, list("damaged1","damaged2","dama /turf/simulated/floor/proc/get_prying_tools() return list(TOOL_CROWBAR) + +/turf/simulated/floor/magic_rust_turf() + if(HAS_TRAIT(src, TRAIT_RUSTY)) + return + ChangeTurf(/turf/simulated/floor/plating) + return ..() diff --git a/code/game/turfs/simulated/floor/asteroid_floors.dm b/code/game/turfs/simulated/floor/asteroid_floors.dm index 4d093eaf171a..4df890240b53 100644 --- a/code/game/turfs/simulated/floor/asteroid_floors.dm +++ b/code/game/turfs/simulated/floor/asteroid_floors.dm @@ -11,6 +11,7 @@ barefootstep = FOOTSTEP_SAND clawfootstep = FOOTSTEP_SAND heavyfootstep = FOOTSTEP_GENERIC_HEAVY + rust_resistance = RUST_RESISTANCE_ORGANIC var/environment_type = "asteroid" var/turf_type = /turf/simulated/floor/plating/asteroid //Because caves do whacky shit to revert to normal var/floor_variance = 20 //probability floor has a different icon state diff --git a/code/game/turfs/simulated/floor/chasm.dm b/code/game/turfs/simulated/floor/chasm.dm index a4d2da39fadf..954881e77fa0 100644 --- a/code/game/turfs/simulated/floor/chasm.dm +++ b/code/game/turfs/simulated/floor/chasm.dm @@ -11,6 +11,7 @@ density = TRUE //This will prevent hostile mobs from pathing into chasms, while the canpass override will still let it function like an open turf layer = 1.7 intact = 0 + rust_resistance = RUST_RESISTANCE_ABSOLUTE var/static/list/falling_atoms = list() //Atoms currently falling into the chasm var/static/list/forbidden_types = typecacheof(list( /obj/singularity, diff --git a/code/game/turfs/simulated/floor/lava.dm b/code/game/turfs/simulated/floor/lava.dm index f480fbecb7c5..d28d8cae5624 100644 --- a/code/game/turfs/simulated/floor/lava.dm +++ b/code/game/turfs/simulated/floor/lava.dm @@ -24,6 +24,8 @@ intact = FALSE floor_tile = null real_layer = PLATING_LAYER + rust_resistance = RUST_RESISTANCE_ABSOLUTE + /turf/simulated/floor/lava/ex_act() diff --git a/code/game/turfs/simulated/floor/misc_floor.dm b/code/game/turfs/simulated/floor/misc_floor.dm index 9e5a4241d59e..6369189f81c2 100644 --- a/code/game/turfs/simulated/floor/misc_floor.dm +++ b/code/game/turfs/simulated/floor/misc_floor.dm @@ -267,6 +267,7 @@ keep_dir = FALSE intact = FALSE transparent_floor = TRUE + rust_resistance = RUST_RESISTANCE_BASIC /turf/simulated/floor/catwalk/Initialize(mapload) . = ..() @@ -308,7 +309,7 @@ break_tile_to_plating() hotspot_expose(1000,CELL_VOLUME) -/turf/open/floor/plating/rust +/turf/simulated/floor/plating/rust //SDMM supports colors, this is simply for easier mapping //and should be removed on initialize color = COLOR_BROWN @@ -318,7 +319,7 @@ AddElement(/datum/element/rust) color = null -/turf/open/floor/plating/heretic_rust +/turf/simulated/floor/plating/heretic_rust color = COLOR_GREEN_GRAY /turf/simulated/floor/plating/heretic_rust/Initialize(mapload) diff --git a/code/game/turfs/simulated/floor/plasteel_floor.dm b/code/game/turfs/simulated/floor/plasteel_floor.dm index 786514e0e56c..86b03389c68e 100644 --- a/code/game/turfs/simulated/floor/plasteel_floor.dm +++ b/code/game/turfs/simulated/floor/plasteel_floor.dm @@ -1,6 +1,7 @@ /turf/simulated/floor/plasteel icon_state = "floor" floor_tile = /obj/item/stack/tile/plasteel + rust_resistance = RUST_RESISTANCE_BASIC /turf/simulated/floor/plasteel/update_icon_state() if(!broken && !burnt) diff --git a/code/game/turfs/simulated/floor/plating.dm b/code/game/turfs/simulated/floor/plating.dm index 1f75cad5ef91..c25ea7787b1c 100644 --- a/code/game/turfs/simulated/floor/plating.dm +++ b/code/game/turfs/simulated/floor/plating.dm @@ -11,6 +11,7 @@ heavyfootstep = FOOTSTEP_GENERIC_HEAVY smoothing_groups = list(SMOOTH_GROUP_TURF) real_layer = PLATING_LAYER + rust_resistance = RUST_RESISTANCE_BASIC /turf/simulated/floor/plating/Initialize(mapload) . = ..() diff --git a/code/game/turfs/simulated/minerals.dm b/code/game/turfs/simulated/minerals.dm index ce008def807b..e0908d8bde99 100644 --- a/code/game/turfs/simulated/minerals.dm +++ b/code/game/turfs/simulated/minerals.dm @@ -13,6 +13,7 @@ opacity = TRUE density = TRUE blocks_air = TRUE + flags = NO_RUST flags_2 = RAD_PROTECT_CONTENTS_2 | RAD_NO_CONTAMINATE_2 rad_insulation = RAD_MEDIUM_INSULATION layer = EDGED_TURF_LAYER diff --git a/code/game/turfs/simulated/walls.dm b/code/game/turfs/simulated/walls.dm index 422cf388c2df..2a9ba51d46c6 100644 --- a/code/game/turfs/simulated/walls.dm +++ b/code/game/turfs/simulated/walls.dm @@ -29,6 +29,7 @@ thermal_conductivity = WALL_HEAT_TRANSFER_COEFFICIENT heat_capacity = 312500 //a little over 5 cm thick , 312500 for 1 m by 2.5 m by 0.25 m plasteel wall + rust_resistance = RUST_RESISTANCE_BASIC var/heat_resistance = 5000 var/can_dismantle_with_welder = TRUE @@ -552,4 +553,11 @@ /turf/simulated/wall/MouseExited(location, control, params) usr.hud_used.screentip_text.maptext = "" +/turf/simulated/wall/magic_rust_turf() + if(HAS_TRAIT(src, TRAIT_RUSTY)) + ChangeTurf(/turf/simulated/floor/plating)// Did you know most walls baseturf is space? + return + + return ..() + #undef MAX_DENT_DECALS diff --git a/code/game/turfs/simulated/walls_indestructible.dm b/code/game/turfs/simulated/walls_indestructible.dm index 6fdf37f2d1e4..fe0065724b8a 100644 --- a/code/game/turfs/simulated/walls_indestructible.dm +++ b/code/game/turfs/simulated/walls_indestructible.dm @@ -2,6 +2,7 @@ name = "wall" desc = "Effectively impervious to conventional methods of destruction." explosion_block = 50 + rust_resistance = RUST_RESISTANCE_ABSOLUTE /turf/simulated/wall/indestructible/Initialize(mapload) . = ..() diff --git a/code/game/turfs/simulated/walls_mineral.dm b/code/game/turfs/simulated/walls_mineral.dm index 1d9d726abd08..0974685ec073 100644 --- a/code/game/turfs/simulated/walls_mineral.dm +++ b/code/game/turfs/simulated/walls_mineral.dm @@ -6,6 +6,7 @@ canSmoothWith = null var/last_event = 0 var/active = FALSE + rust_resistance = RUST_RESISTANCE_BASIC /turf/simulated/wall/mineral/shuttleRotate(rotation) return //This override is needed to properly rotate the object when on a shuttle that is rotated. @@ -41,6 +42,7 @@ explosion_block = 3 smoothing_groups = list(SMOOTH_GROUP_SIMULATED_TURFS, SMOOTH_GROUP_WALLS, SMOOTH_GROUP_DIAMOND_WALLS) canSmoothWith = list(SMOOTH_GROUP_DIAMOND_WALLS) + rust_resistance = RUST_RESISTANCE_REINFORCED /turf/simulated/wall/mineral/bananium name = "bananium wall" @@ -72,6 +74,7 @@ sheet_type = /obj/item/stack/sheet/mineral/uranium smoothing_groups = list(SMOOTH_GROUP_SIMULATED_TURFS, SMOOTH_GROUP_WALLS, SMOOTH_GROUP_URANIUM_WALLS) canSmoothWith = list(SMOOTH_GROUP_URANIUM_WALLS) + rust_resistance = RUST_RESISTANCE_REINFORCED /turf/simulated/wall/mineral/uranium/proc/radiate() if(!active) @@ -217,6 +220,7 @@ smoothing_flags = SMOOTH_BITMASK | SMOOTH_DIAGONAL_CORNERS smoothing_groups = list(SMOOTH_GROUP_SIMULATED_TURFS, SMOOTH_GROUP_WALLS, SMOOTH_GROUP_ABDUCTOR_WALLS) canSmoothWith = list(SMOOTH_GROUP_ABDUCTOR_WALLS) + rust_resistance = RUST_RESISTANCE_ORGANIC /////////////////////Titanium walls///////////////////// @@ -233,6 +237,14 @@ smoothing_flags = SMOOTH_BITMASK | SMOOTH_DIAGONAL_CORNERS smoothing_groups = list(SMOOTH_GROUP_TITANIUM_WALLS, SMOOTH_GROUP_WINDOW_FULLTILE_SHUTTLE) canSmoothWith = list(SMOOTH_GROUP_TITANIUM_WALLS, SMOOTH_GROUP_AIRLOCK, SMOOTH_GROUP_SHUTTLE_PARTS, SMOOTH_GROUP_WINDOW_FULLTILE_SHUTTLE) + rust_resistance = RUST_RESISTANCE_TITANIUM + +/turf/simulated/wall/mineral/titanium/magic_rust_turf() + if(HAS_TRAIT(src, TRAIT_RUSTY)) + ChangeTurf(/turf/simulated/wall) + rust_turf() //Not magic rusting intentionally + return + return ..() /turf/simulated/wall/mineral/titanium/nodiagonal icon_state = "map-shuttle_nd" @@ -300,6 +312,14 @@ smoothing_flags = SMOOTH_BITMASK | SMOOTH_DIAGONAL_CORNERS smoothing_groups = list(SMOOTH_GROUP_PLASTITANIUM_WALLS) canSmoothWith = list(SMOOTH_GROUP_PLASTITANIUM_WALLS, SMOOTH_GROUP_AIRLOCK, SMOOTH_GROUP_SHUTTLE_PARTS) + rust_resistance = RUST_RESISTANCE_TITANIUM + +/turf/simulated/wall/mineral/plastitanium/magic_rust_turf() + if(HAS_TRAIT(src, TRAIT_RUSTY)) + ChangeTurf(/turf/simulated/wall) + rust_turf() //Not magic rusting intentionally + return + return ..() /turf/simulated/wall/mineral/plastitanium/nodiagonal icon_state = "map-shuttle_nd" diff --git a/code/game/turfs/simulated/walls_reinforced.dm b/code/game/turfs/simulated/walls_reinforced.dm index 56b033487d88..5c266871196c 100644 --- a/code/game/turfs/simulated/walls_reinforced.dm +++ b/code/game/turfs/simulated/walls_reinforced.dm @@ -18,6 +18,7 @@ smoothing_groups = list(SMOOTH_GROUP_SIMULATED_TURFS, SMOOTH_GROUP_WALLS, SMOOTH_GROUP_REINFORCED_WALLS) canSmoothWith = list(SMOOTH_GROUP_WALLS, SMOOTH_GROUP_REGULAR_WALLS, SMOOTH_GROUP_REINFORCED_WALLS) heat_resistance = 20000 // Ain't getting through this soon + rust_resistance = RUST_RESISTANCE_REINFORCED var/d_state = RWALL_INTACT var/can_be_reinforced = 1 @@ -235,3 +236,10 @@ /turf/simulated/wall/r_wall/devastate_wall() new sheet_type(src, sheet_amount) new /obj/item/stack/sheet/metal(src, 2) + +/turf/simulated/wall/r_wall/magic_rust_turf() + if(HAS_TRAIT(src, TRAIT_RUSTY)) + ChangeTurf(/turf/simulated/wall) + rust_turf() //Not magic rusting intentionally + return + return ..() diff --git a/code/game/turfs/space/space_turf.dm b/code/game/turfs/space/space_turf.dm index d0caaaa58b46..2c39a988b48c 100644 --- a/code/game/turfs/space/space_turf.dm +++ b/code/game/turfs/space/space_turf.dm @@ -12,6 +12,7 @@ light_power = 0.25 dynamic_lighting = DYNAMIC_LIGHTING_DISABLED intact = FALSE + rust_resistance = RUST_RESISTANCE_ABSOLUTE var/destination_z var/destination_x diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm index b2c02b58364d..c9b3d2c11f49 100644 --- a/code/game/turfs/turf.dm +++ b/code/game/turfs/turf.dm @@ -1,3 +1,5 @@ +GLOBAL_LIST_EMPTY(station_turfs) + /turf icon = 'icons/turf/floors.dmi' level = 1 @@ -87,6 +89,9 @@ var/list/milla_data = null + ///This turf's resistance to getting rusted QWERTODO: check fucking every floortile + var/rust_resistance = RUST_RESISTANCE_ORGANIC + new_attack_chain = TRUE /turf/Initialize(mapload) @@ -128,6 +133,8 @@ has_opaque_atom = TRUE initialize_milla() + if(is_station_level(z)) + GLOB.station_turfs += src return INITIALIZE_HINT_NORMAL @@ -612,6 +619,12 @@ AddElement(/datum/element/rust/heretic) new /obj/effect/glowing_rune(src) +/// Check if the heretic is strong enough to rust this turf, and if so, rusts the turf with an added visual effect. +/turf/rust_heretic_act(rust_strength = 1) + if((flags & NO_RUST) || (rust_strength < rust_resistance)) + return + magic_rust_turf() + /// Returns a list of all attached /datum/element/decal/ for this turf /turf/proc/get_decals() var/list/datum/element/decals = list() diff --git a/code/modules/admin/player_panel.dm b/code/modules/admin/player_panel.dm index 62c31b5a3dbb..84e752259369 100644 --- a/code/modules/admin/player_panel.dm +++ b/code/modules/admin/player_panel.dm @@ -458,6 +458,9 @@ if(length(SSticker.mode.mindflayers)) dat += check_role_table("Mindflayers", SSticker.mode.mindflayers) + if(length(SSticker.mode.heretics)) + dat += check_role_table("Heretics", SSticker.mode.heretics) + if(length(SSticker.mode.vampire_enthralled)) dat += check_role_table("Vampire Thralls", SSticker.mode.vampire_enthralled) diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index 5781dd6254ad..1f73e223e77a 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -75,6 +75,10 @@ log_admin("[key_name(usr)] has spawned event characters.") if(!makeEventCharacters()) to_chat(usr, "Unfortunately there weren't enough candidates available.") + if("10") + log_admin("[key_name(usr)] has spawned heretics.") + if(!makeHeretics()) + to_chat(usr, "Unfortunately there weren't enough candidates available.") else if(href_list["dbsearchckey"] || href_list["dbsearchadmin"] || href_list["dbsearchip"] || href_list["dbsearchcid"] || href_list["dbsearchbantype"]) var/adminckey = href_list["dbsearchadmin"] diff --git a/code/modules/admin/verbs/one_click_antag.dm b/code/modules/admin/verbs/one_click_antag.dm index 6a8a54778fc5..5332e1931dd5 100644 --- a/code/modules/admin/verbs/one_click_antag.dm +++ b/code/modules/admin/verbs/one_click_antag.dm @@ -22,6 +22,7 @@ Make Abductor Team (Requires Ghosts)
Make Mindflayers
Make Event Characters
+ Make Heretics
"} usr << browse(dat, "window=oneclickantag;size=400x400") return @@ -312,6 +313,37 @@ qdel(temp) return TRUE +/datum/admins/proc/makeHeretics() + var/datum/game_mode/traitor/temp = new + + if(GLOB.configuration.gamemode.prevent_mindshield_antags) + temp.restricted_jobs += temp.protected_jobs + + var/list/mob/living/carbon/human/candidates = list() + var/mob/living/carbon/human/H = null + + var/antnum = input(owner, "How many Heretics you want to create? Enter 0 to cancel","Amount:", 0) as num + if(!antnum || antnum <= 0) + return + log_admin("[key_name(owner)] tried making [antnum] Heretics with One-Click-Antag") + message_admins("[key_name_admin(owner)] tried making [antnum] Heretics with One-Click-Antag") + + for(var/mob/living/carbon/human/applicant in GLOB.player_list) + if(CandCheck(ROLE_HERETIC, applicant, temp)) + candidates += applicant + + if(length(candidates)) + var/numHeretics = min(length(candidates), antnum) + + for(var/i = 0, i knowledge_points) + knowledge_data["bgr"] = GLOB.heretic_research_tree[knowledge][HKT_UI_BGR] + knowledge_data["finished"] = done + knowledge_data["ascension"] = ispath(knowledge,/datum/heretic_knowledge/ultimate) + + //description of a knowledge might change, make sure we are not shown the initial() value in that case + if(done) + var/datum/heretic_knowledge/knowledge_instance = researched_knowledge[knowledge] + knowledge_data["desc"] = knowledge_instance.desc + else + knowledge_data["desc"] = initial(knowledge.desc) + + return knowledge_data + +/datum/antagonist/heretic/ui_data(mob/user) + var/list/data = list() + + data["charges"] = knowledge_points + data["total_sacrifices"] = total_sacrifices + data["ascended"] = ascended + + var/list/tiers = list() + + // This should be cached in some way, but the fact that final knowledge + // has to update its disabled state based on whether all objectives are complete, + // makes this very difficult. I'll figure it out one day maybe + for(var/datum/heretic_knowledge/knowledge as anything in researched_knowledge) + var/list/knowledge_data = get_knowledge_data(knowledge,TRUE) + + while(GLOB.heretic_research_tree[knowledge][HKT_DEPTH] > tiers.len) + tiers += list(list("nodes"=list())) + + tiers[GLOB.heretic_research_tree[knowledge][HKT_DEPTH]]["nodes"] += list(knowledge_data) + + for(var/datum/heretic_knowledge/knowledge as anything in get_researchable_knowledge()) + var/list/knowledge_data = get_knowledge_data(knowledge,FALSE) + + // Final knowledge can't be learned until all objectives are complete. + if(ispath(knowledge, /datum/heretic_knowledge/ultimate)) + knowledge_data["disabled"] ||= !can_ascend() + + while(GLOB.heretic_research_tree[knowledge][HKT_DEPTH] > tiers.len) + tiers += list(list("nodes"=list())) + + tiers[GLOB.heretic_research_tree[knowledge][HKT_DEPTH]]["nodes"] += list(knowledge_data) + + data["knowledge_tiers"] = tiers + + return data + +/datum/antagonist/heretic/ui_interact(mob/user, datum/tgui/ui = null) + ui = SStgui.try_update_ui(user, src, ui) + if(!ui) + ui = new(user, src, "AntagInfoHeretic", name) + ui.open() + +/datum/antagonist/heretic/proc/do_the_thing() + ui_interact(owner.current) + +/datum/antagonist/heretic/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state) + . = ..() + if(.) + return + + switch(action) + if("research") + var/datum/heretic_knowledge/researched_path = text2path(params["path"]) + if(!ispath(researched_path, /datum/heretic_knowledge)) + CRASH("Heretic attempted to learn non-heretic_knowledge path! (Got: [researched_path])") + + if(initial(researched_path.cost) > knowledge_points) + return TRUE + if(!gain_knowledge(researched_path)) + return TRUE + + log_heretic_knowledge("[key_name(owner)] gained knowledge: [initial(researched_path.name)]") + knowledge_points -= initial(researched_path.cost) + return TRUE + +/datum/antagonist/heretic/ui_status(mob/user, datum/ui_state/state) + if(user.stat == DEAD) + return UI_CLOSE + return ..() + +/datum/antagonist/heretic/ui_state(mob/user) + return GLOB.always_state + +/datum/antagonist/heretic/on_gain() + if(!GLOB.heretic_research_tree) + GLOB.heretic_research_tree = generate_heretic_research_tree() + our_menu = new() + our_menu.Grant(owner.current) + + if(give_objectives) + forge_primary_objectives() + + for(var/starting_knowledge in GLOB.heretic_start_knowledge) + gain_knowledge(starting_knowledge) + SEND_SOUND(owner.current, sound('sound/ambience/antag/heretic/heretic_gain.ogg')) + + + addtimer(CALLBACK(src, PROC_REF(passive_influence_gain)), passive_gain_timer) // Gain +1 knowledge every 20 minutes. + return ..() + +/datum/antagonist/heretic/farewell() + if(!silent) + to_chat(owner.current, "Your mind begins to flare as the otherwordly knowledge escapes your grasp!") + for(var/knowledge_index in researched_knowledge) + var/datum/heretic_knowledge/knowledge = researched_knowledge[knowledge_index] + knowledge.on_lose(owner.current, src) + our_menu.Remove(owner.current) + + QDEL_LIST_ASSOC_VAL(researched_knowledge) + + return ..() + +/datum/antagonist/heretic/apply_innate_effects(mob/living/mob_override) + . = ..() + var/mob/living/our_mob = mob_override || owner.current + our_mob.faction |= "heretic" + + if(!issilicon(our_mob)) + GLOB.reality_smash_track.add_tracked_mind(owner) + var/datum/atom_hud/data/heretic/h_hud = GLOB.huds[DATA_HUD_HERETIC] + h_hud.add_hud_to(our_mob) + ADD_TRAIT(our_mob, TRAIT_MANSUS_TOUCHED, src.UID()) + RegisterSignal(our_mob, COMSIG_LIVING_CULT_SACRIFICED, PROC_REF(on_cult_sacrificed)) + RegisterSignal(our_mob, COMSIG_MOB_BEFORE_SPELL_CAST, PROC_REF(on_spell_cast)) + RegisterSignal(our_mob, COMSIG_INTERACT_USER, PROC_REF(on_item_use)) + +/datum/antagonist/heretic/remove_innate_effects(mob/living/mob_override) + . = ..() + var/mob/living/our_mob = mob_override || owner.current + our_mob.faction -= "heretic" + + if(owner in GLOB.reality_smash_track.tracked_heretics) + GLOB.reality_smash_track.remove_tracked_mind(owner) + var/datum/atom_hud/data/heretic/h_hud = GLOB.huds[DATA_HUD_HERETIC] + h_hud.remove_hud_from(our_mob) + + REMOVE_TRAIT(our_mob, TRAIT_MANSUS_TOUCHED, src.UID()) + UnregisterSignal(our_mob, list( + COMSIG_MOB_BEFORE_SPELL_CAST, + COMSIG_INTERACT_USER, + COMSIG_LIVING_CULT_SACRIFICED, + )) + +/datum/antagonist/heretic/on_body_transfer(mob/living/old_body, mob/living/new_body) + . = ..() + if(old_body == new_body) // if they were using a temporary body + return + + for(var/knowledge_index in researched_knowledge) + var/datum/heretic_knowledge/knowledge = researched_knowledge[knowledge_index] + knowledge.on_lose(old_body, src) + knowledge.on_gain(new_body, src) + +/* + * Signal proc for [COMSIG_MOB_BEFORE_SPELL_CAST] and [COMSIG_MOB_SPELL_ACTIVATED]. + * + * Checks if our heretic has [TRAIT_ALLOW_HERETIC_CASTING] or is ascended. + * If so, allow them to cast like normal. + * If not, cancel the cast, and returns [SPELL_CANCEL_CAST]. + */ +/datum/antagonist/heretic/proc/on_spell_cast(mob/living/source, datum/spell/spell) + SIGNAL_HANDLER + + // Heretic spells are of the forbidden school, otherwise we don't care + if(!spell.is_a_heretic_spell) + return FALSE + + // If we've got the trait, we don't care + if(HAS_TRAIT(source, TRAIT_ALLOW_HERETIC_CASTING)) + return FALSE + // All powerful, don't care + if(ascended) + return FALSE + + // We shouldn't be able to cast this! Cancel it. + to_chat(source, "You need a focus to cast this spell!") + return SPELL_CANCEL_CAST + +/* + * Signal proc for [COMSIG_USER_ITEM_INTERACTION]. + * + * If a heretic is holding a pen in their main hand, + * and have mansus grasp active in their offhand, + * they're able to draw a transmutation rune. + */ +/datum/antagonist/heretic/proc/on_item_use(mob/living/source, atom/target, obj/item/tool, list/modifiers) + SIGNAL_HANDLER + if(!is_type_in_typecache(tool, scribing_tools)) + return NONE + if(!isturf(target) || !isliving(source)) + return NONE + + var/obj/item/offhand = source.get_inactive_hand() + if(QDELETED(offhand) || !istype(offhand, /obj/item/melee/touch_attack/mansus_fist)) + return NONE + + try_draw_rune(source, target, additional_checks = CALLBACK(src, PROC_REF(check_mansus_grasp_offhand), source)) + return ITEM_INTERACT_COMPLETE + +/** + * Attempt to draw a rune on [target_turf]. + * + * Arguments + * * user - the mob drawing the rune + * * target_turf - the place the rune's being drawn + * * drawing_time - how long the do_after takes to make the rune + * * additional checks - optional callbacks to be ran while drawing the rune + */ +/datum/antagonist/heretic/proc/try_draw_rune(mob/living/user, turf/target_turf, drawing_time = 20 SECONDS, additional_checks) + for(var/turf/nearby_turf as anything in RANGE_TURFS(1, target_turf)) + if(!isfloorturf(nearby_turf) || is_type_in_typecache(nearby_turf, blacklisted_rune_turfs)) + to_chat(user, "This is not a valid placement for a rune.") + return + + if(locate(/obj/effect/heretic_rune) in range(3, target_turf)) + to_chat(user, "This is too close to another rune.") + return + + if(drawing_rune) + to_chat(user, "You are already drawing a rune.") + return + + INVOKE_ASYNC(src, PROC_REF(draw_rune), user, target_turf, drawing_time, additional_checks) + +/** + * The actual process of drawing a rune. + * + * Arguments + * * user - the mob drawing the rune + * * target_turf - the place the rune's being drawn + * * drawing_time - how long the do_after takes to make the rune + * * additional checks - optional callbacks to be ran while drawing the rune + */ +/datum/antagonist/heretic/proc/draw_rune(mob/living/user, turf/target_turf, drawing_time = 20 SECONDS, additional_checks) + drawing_rune = TRUE + + var/rune_colour = GLOB.heretic_path_to_color[heretic_path] + var/obj/effect/temp_visual/drawing_heretic_rune/drawing_effect + if(drawing_time <= (10 SECONDS)) + drawing_effect = new /obj/effect/temp_visual/drawing_heretic_rune/fast(target_turf, rune_colour) + else + drawing_effect = new(target_turf, rune_colour) + + if(!do_after(user, drawing_time, target_turf, extra_checks = list(additional_checks))) + new /obj/effect/temp_visual/drawing_heretic_rune/fail(target_turf, rune_colour) + qdel(drawing_effect) + drawing_rune = FALSE + return + to_chat(user, "The rune is complete.") + qdel(drawing_effect) + new /obj/effect/heretic_rune/big(target_turf, rune_colour) + drawing_rune = FALSE + +/** + * Callback to check that the user's still got their Mansus Grasp out when drawing a rune. + * + * Arguments + * * user - the mob drawing the rune + */ +/datum/antagonist/heretic/proc/check_mansus_grasp_offhand(mob/living/user) + var/obj/item/offhand = user.get_inactive_hand() + return !(!QDELETED(offhand) && istype(offhand, /obj/item/melee/touch_attack/mansus_fist)) + + +/// Signal proc for [COMSIG_LIVING_CULT_SACRIFICED] to reward cultists for sacrificing a heretic +/datum/antagonist/heretic/proc/on_cult_sacrificed(mob/living/source, list/invokers) + SIGNAL_HANDLER + + for(var/mob/dead/observer/ghost in GLOB.dead_mob_list) // uhh let's find the guy to shove him back in + if((ghost.mind?.current == source) && ghost.client) // is it the same guy and do they have the same client + ghost.reenter_corpse() // shove them in! it doesnt do it automatically + + // Drop all items and splatter them around messily. + var/list/dustee_items = source.unequip_everything() + for(var/obj/item/loot as anything in dustee_items) + loot.throw_at(get_step_rand(source), 2, 4, pick(invokers), TRUE) + + // Create the blade, give it the heretic and a randomly-chosen master for the soul sword component + var/obj/item/melee/cultblade/haunted/haunted_blade = new(get_turf(source), source, pick(invokers)) + + // Cool effect for the rune as well as the item + var/obj/effect/rune/convert/conversion_rune = locate() in get_turf(source) + if(conversion_rune) + conversion_rune.gender_reveal( + outline_color = COLOR_HERETIC_GREEN, + ray_color = null, + do_float = FALSE, + do_layer = FALSE, + ) + + haunted_blade.gender_reveal(outline_color = null, ray_color = COLOR_HERETIC_GREEN) + + for(var/mob/living/culto as anything in invokers) + to_chat(culto, "\"A follower of the forgotten gods! You must be rewarded for such a valuable sacrifice.\"") + + // Locate a cultist team (Is there a better way??) + var/mob/living/random_cultist = pick(invokers) + var/datum/antagonist/cultist/antag = random_cultist.mind.has_antag_datum(/datum/antagonist/cultist) + ASSERT(antag) + var/datum/team/cult/cult_team = antag.get_team() + + // Unlock one of 3 special items! + var/list/possible_unlocks + for(var/i in cult_team.unlocked_heretic_items) + if(cult_team.unlocked_heretic_items[i]) + continue + LAZYADD(possible_unlocks, i) + if(length(possible_unlocks)) + var/result = pick(possible_unlocks) + cult_team.unlocked_heretic_items[result] = TRUE + + for(var/datum/mind/mind as anything in cult_team.members) + if(mind.current) + SEND_SOUND(mind.current, 'sound/magic/narsie_attack.ogg') + to_chat(mind.current, "= 2) + var/datum/objective/major_sacrifice/other_sac_objective = new() + other_sac_objective.owner = owner + add_antag_objective(other_sac_objective) + +/** + * Add [target] as a sacrifice target for the heretic. + * Generates a preview image and associates it with a weakref of the mob. + */ +/datum/antagonist/heretic/proc/add_sacrifice_target(mob/living/carbon/human/target) + + var/image/target_image = image(icon = target.icon, icon_state = target.icon_state) + target_image.overlays = target.overlays + + LAZYSET(sac_targets, target, target_image) + RegisterSignal(target, COMSIG_PARENT_QDELETING, PROC_REF(on_target_deleted)) + all_sac_targets += target.real_name + +/** + * Removes [target] from the heretic's sacrifice list. + * Returns FALSE if no one was removed, TRUE otherwise + */ +/datum/antagonist/heretic/proc/remove_sacrifice_target(mob/living/carbon/human/target) + if(!(target in sac_targets)) + return FALSE + + LAZYREMOVE(sac_targets, target) + UnregisterSignal(target, COMSIG_PARENT_QDELETING) + return TRUE + +/** + * Signal proc for [COMSIG_PARENT_QDELETING] registered on sac targets + * if sacrifice targets are deleted (gibbed, dusted, whatever), free their slot and reference + */ +/datum/antagonist/heretic/proc/on_target_deleted(mob/living/carbon/human/source) + SIGNAL_HANDLER + + remove_sacrifice_target(source) + +/** + * Increments knowledge by one. + * Used in callbacks for passive gain over time. + */ +/datum/antagonist/heretic/proc/passive_influence_gain() + knowledge_points++ + if(owner.current.stat == CONSCIOUS) + to_chat(owner.current, "You hear a whisper... [pick_list(HERETIC_INFLUENCE_FILE, "drain_message")]") + addtimer(CALLBACK(src, PROC_REF(passive_influence_gain)), passive_gain_timer) + +/datum/antagonist/heretic/roundend_report() + var/list/parts = list() //QWERTODO: Bring in line with other antagonists. + + //var/succeeded = TRUE + + parts += printplayer(owner) + parts += "Sacrifices Made: [total_sacrifices]" + parts += "The heretic's sacrifice targets were: [english_list(all_sac_targets, nothing_text = "No one")]." +// if(length(objectives)) +// var/count = 1 +// for(var/datum/objective/objective as anything in get_all_objectives(include_team = FALSE)) +// if(!objective.check_completion()) +// succeeded = FALSE +// parts += "Objective #[count]: [objective.explanation_text] [objective.get_roundend_success_suffix()]" +/// count++ +// if(feast_of_owls) +// parts += "Ascension Forsaken" +// if(ascended) +// parts += "The heretic was successful, but did not ascend!" +// else +// parts += "The heretic has failed." + +// parts += "Knowledge Researched: " + +// var/list/string_of_knowledge = list() + +// for(var/knowledge_index in researched_knowledge) +// var/datum/heretic_knowledge/knowledge = researched_knowledge[knowledge_index] +// string_of_knowledge += knowledge.name + +// parts += english_list(string_of_knowledge) + +// return parts.Join("
") + +///datum/antagonist/heretic/get_admin_commands() //qwertodo: antag panel +// . = ..() +// +// switch(has_living_heart()) +// if(HERETIC_NO_LIVING_HEART) +// .["Give Living Heart"] = CALLBACK(src, PROC_REF(give_living_heart)) +// if(HERETIC_HAS_LIVING_HEART) +// .["Add Heart Target (Marked Mob)"] = CALLBACK(src, PROC_REF(add_marked_as_target)) +// .["Remove Heart Target"] = CALLBACK(src, PROC_REF(remove_target)) +// +// .["Adjust Knowledge Points"] = CALLBACK(src, PROC_REF(admin_change_points)) +// .["Give Focus"] = CALLBACK(src, PROC_REF(admin_give_focus)) + +/** + * Admin proc for giving a heretic a Living Heart easily. + */ +/datum/antagonist/heretic/proc/give_living_heart(mob/admin) + if(!admin.client?.holder) + to_chat(admin, "You shouldn't be using this!") + return + + var/datum/heretic_knowledge/living_heart/heart_knowledge = get_knowledge(/datum/heretic_knowledge/living_heart) + if(!heart_knowledge) + to_chat(admin, "The heretic doesn't have a living heart knowledge for some reason. What?") + return + + heart_knowledge.on_research(owner.current, src) + + +/** + * Admin proc for removing a mob from a heretic's sac list. + */ +/datum/antagonist/heretic/proc/remove_target(mob/admin) + if(!admin.client?.holder) + to_chat(admin, "You shouldn't be using this!") + return + + var/list/removable = list() + for(var/mob/living/carbon/human/old_target as anything in sac_targets) + removable[old_target.name] = old_target + + var/name_of_removed = tgui_input_list(admin, "Choose a human to remove", "Who to Spare", removable) + if(QDELETED(src) || !admin.client?.holder || isnull(name_of_removed)) + return + var/mob/living/carbon/human/chosen_target = removable[name_of_removed] + if(QDELETED(chosen_target) || !ishuman(chosen_target)) + return + + if(!remove_sacrifice_target(chosen_target)) + to_chat(admin, "Failed to remove [name_of_removed] from [owner]'s sacrifice list. Perhaps they're no longer in the list anyways.") + return + + if(tgui_alert(admin, "Let them know their targets have been updated?", "Whispers of the Mansus", list("Yes", "No")) == "Yes") + to_chat(owner.current, "The Mansus has modified your targets.") + +/** + * Admin proc for easily adding / removing knowledge points. + */ +/datum/antagonist/heretic/proc/admin_change_points(mob/admin) + if(!admin.client?.holder) + to_chat(admin, "You shouldn't be using this!") + return + + var/change_num = tgui_input_number(admin, "Add or remove knowledge points", "Points", 0, 100, -100) + if(!change_num || QDELETED(src)) + return + + knowledge_points += change_num + +/** + * Admin proc for giving a heretic a focus. + */ +/datum/antagonist/heretic/proc/admin_give_focus(mob/admin) + if(!admin.client?.holder) + to_chat(admin, "You shouldn't be using this!") + return + + var/mob/living/pawn = owner.current + pawn.equip_to_slot_if_possible(new /obj/item/clothing/neck/heretic_focus(get_turf(pawn)), ITEM_SLOT_NECK, TRUE, TRUE) + to_chat(pawn, "The Mansus has manifested you a focus.") + + +/** + * Learns the passed [typepath] of knowledge, creating a knowledge datum + * and adding it to our researched knowledge list. + * + * Returns TRUE if the knowledge was added successfully. FALSE otherwise. + */ +/datum/antagonist/heretic/proc/gain_knowledge(datum/heretic_knowledge/knowledge_type) + if(!ispath(knowledge_type)) + stack_trace("[type] gain_knowledge was given an invalid path! (Got: [knowledge_type])") + return FALSE + if(get_knowledge(knowledge_type)) + return FALSE + var/datum/heretic_knowledge/initialized_knowledge = new knowledge_type() + researched_knowledge[knowledge_type] = initialized_knowledge + initialized_knowledge.on_research(owner.current, src) + update_static_data(owner.current) + return TRUE + +/** + * Get a list of all knowledge TYPEPATHS that we can currently research. + */ +/datum/antagonist/heretic/proc/get_researchable_knowledge() + var/list/researchable_knowledge = list() + var/list/banned_knowledge = list() + for(var/knowledge_index in researched_knowledge) + var/datum/heretic_knowledge/knowledge = researched_knowledge[knowledge_index] + researchable_knowledge |= GLOB.heretic_research_tree[knowledge_index][HKT_NEXT] + banned_knowledge |= GLOB.heretic_research_tree[knowledge_index][HKT_BAN] + banned_knowledge |= knowledge.type + researchable_knowledge -= banned_knowledge + return researchable_knowledge + +/** + * Check if the wanted type-path is in the list of research knowledge. + */ +/datum/antagonist/heretic/proc/get_knowledge(wanted) + return researched_knowledge[wanted] + +/// Makes our heretic more able to rust things. +/// if side_path_only is set to TRUE, this function does nothing for rust heretics. +/datum/antagonist/heretic/proc/increase_rust_strength(side_path_only=FALSE) + if(side_path_only && get_knowledge(/datum/heretic_knowledge/limited_amount/starting/base_rust)) + return + + rust_strength++ + +/** + * Get a list of all rituals this heretic can invoke on a rune. + * Iterates over all of our knowledge and, if we can invoke it, adds it to our list. + * + * Returns an associated list of [knowledge name] to [knowledge datum] sorted by knowledge priority. + */ +/datum/antagonist/heretic/proc/get_rituals() + var/list/rituals = list() + + for(var/knowledge_index in researched_knowledge) + var/datum/heretic_knowledge/knowledge = researched_knowledge[knowledge_index] + if(!knowledge.can_be_invoked(src)) + continue + rituals[knowledge.name] = knowledge + + return sortTim(rituals, GLOBAL_PROC_REF(cmp_heretic_knowledge), associative = TRUE) + +/** + * Checks to see if our heretic can currently ascend. + * + * Returns FALSE if not all of our objectives are complete, or TRUE otherwise. + */ +/datum/antagonist/heretic/proc/can_ascend() + //qwertodo: hijack chance + if(feast_of_owls) + return FALSE // We sold our ambition for immediate power :/ + for(var/datum/objective/must_be_done as anything in owner.get_all_objectives(include_team = FALSE)) + if(!must_be_done.check_completion()) + return FALSE + return TRUE + +/** + * Helper to determine if a Heretic + * - Has a Living Heart + * - Has a an organ in the correct slot that isn't a living heart + * - Is missing the organ they need in the slot to make a living heart + * + * Returns HERETIC_NO_HEART_ORGAN if they have no heart (organ) at all, + * Returns HERETIC_NO_LIVING_HEART if they have a heart (organ) but it's not a living one, + * and returns HERETIC_HAS_LIVING_HEART if they have a living heart + */ +/datum/antagonist/heretic/proc/has_living_heart() + var/obj/item/organ/our_living_heart = owner.current?.get_organ_slot(living_heart_organ_slot) + if(!our_living_heart) + return HERETIC_NO_HEART_ORGAN + + if(!HAS_TRAIT(our_living_heart, TRAIT_LIVING_HEART)) + return HERETIC_NO_LIVING_HEART + + return HERETIC_HAS_LIVING_HEART + +/// Heretic's minor sacrifice objective. "Minor sacrifices" includes anyone. +/datum/objective/minor_sacrifice + name = "minor sacrifice" + needs_target = FALSE + +/datum/objective/minor_sacrifice/New() + target_amount = rand(3, 4) + update_explanation_text() + . = ..() + +/datum/objective/minor_sacrifice/update_explanation_text() + explanation_text = "Sacrifice at least [target_amount] crewmembers." + +/datum/objective/minor_sacrifice/check_completion() + var/datum/antagonist/heretic/heretic_datum = owner?.has_antag_datum(/datum/antagonist/heretic) + if(!heretic_datum) + return FALSE + return completed || (heretic_datum.total_sacrifices >= target_amount) + +/// Heretic's major sacrifice objective. "Major sacrifices" are heads of staff. +/datum/objective/major_sacrifice + name = "major sacrifice" + target_amount = 1 + explanation_text = "Sacrifice 1 head of staff." + needs_target = FALSE + +/datum/objective/major_sacrifice/check_completion() + var/datum/antagonist/heretic/heretic_datum = owner?.has_antag_datum(/datum/antagonist/heretic) + if(!heretic_datum) + return FALSE + return completed || (heretic_datum.high_value_sacrifices >= target_amount) + +/// Heretic's research objective. "Research" is heretic knowledge nodes (You start with some). +/datum/objective/heretic_research + name = "research" + needs_target = FALSE + /// The length of a main path. Calculated once in New(). + var/static/main_path_length = 0 + +/datum/objective/heretic_research/New() + gen_amount_goal() + . = ..() + +/datum/objective/heretic_research/proc/gen_amount_goal() + if(!main_path_length) + // Let's find the length of a main path. We'll use rust because it's the coolest. + // (All the main paths are (should be) the same length, so it doesn't matter.) + var/rust_paths_found = 0 + for(var/datum/heretic_knowledge/knowledge as anything in subtypesof(/datum/heretic_knowledge)) + if(GLOB.heretic_research_tree[knowledge][HKT_ROUTE] == PATH_RUST) + rust_paths_found++ + + main_path_length = rust_paths_found + + // Factor in the length of the main path first. + target_amount = main_path_length + // Add in the base research we spawn with, otherwise it'd be too easy. + target_amount += length(GLOB.heretic_start_knowledge) + // And add in some buffer, to require some sidepathing, especially since heretics get some free side paths. + target_amount += rand(2, 4) + update_explanation_text() + return target_amount + +/datum/objective/heretic_research/update_explanation_text() + explanation_text = "Research at least [target_amount] knowledge from the Mansus. You start with [length(GLOB.heretic_start_knowledge)] researched." + +/datum/objective/heretic_research/check_completion() + var/datum/antagonist/heretic/heretic_datum = owner?.has_antag_datum(/datum/antagonist/heretic) + if(!heretic_datum) + return FALSE + return completed || (length(heretic_datum.researched_knowledge) >= target_amount) + +/datum/objective/heretic_summon + name = "summon monsters" + target_amount = 2 + explanation_text = "Summon 2 monsters from the Mansus into this realm." + needs_target = FALSE + /// The total number of summons the objective owner has done + var/num_summoned = 0 + +/datum/objective/heretic_summon/check_completion() + return completed || (num_summoned >= target_amount) + +/datum/outfit/heretic + name = "Heretic (Preview only)" + + suit = /obj/item/clothing/suit/hooded/cultrobes/eldritch + head = /obj/item/clothing/head/hooded/cult_hoodie/eldritch + r_hand = /obj/item/melee/touch_attack/mansus_fist + +/datum/action/heretic_menu + name = "Info And Research" + desc = "Learn about the mansus and research your path" + button_overlay_icon = 'icons/mob/actions/actions_ecult.dmi' + button_background_icon = 'icons/mob/actions/actions_ecult.dmi' + button_overlay_icon_state = "book" + button_background_icon = "bg_heretic" + +/datum/action/heretic_menu/Trigger(left_click) + var/mob/living/L = owner + var/datum/antagonist/heretic = IS_HERETIC(L) + if(heretic) + heretic.ui_interact(L) + diff --git a/code/modules/antagonists/heretic/heretic_focus.dm b/code/modules/antagonists/heretic/heretic_focus.dm new file mode 100644 index 000000000000..de6816aa31e0 --- /dev/null +++ b/code/modules/antagonists/heretic/heretic_focus.dm @@ -0,0 +1,61 @@ +/// Heretic focus element, simple element for making an item a heretic focus, +/// allowing heretics to cast advanced spells (examine message included). +/datum/element/heretic_focus + +/datum/element/heretic_focus/Attach(datum/target) + . = ..() + if(!isitem(target)) + return ELEMENT_INCOMPATIBLE + + RegisterSignal(target, COMSIG_PARENT_EXAMINE, PROC_REF(on_examine)) + RegisterSignal(target, COMSIG_ITEM_EQUIPPED, PROC_REF(on_equip)) + RegisterSignal(target, COMSIG_ITEM_DROPPED, PROC_REF(on_drop)) + + var/obj/item/item_target = target + // If our loc is a mob, it's possible we already have it equippied + if(ismob(item_target.loc)) + var/mob/wearer = item_target.loc + if(!item_target.slot_flags || wearer.get_item_by_slot(item_target.slot_flags) == item_target) + ADD_TRAIT(wearer, TRAIT_ALLOW_HERETIC_CASTING, ELEMENT_TRAIT(target)) + +/datum/element/heretic_focus/Detach(obj/item/source) + . = ..() + UnregisterSignal(source, list(COMSIG_PARENT_EXAMINE, COMSIG_ITEM_EQUIPPED, COMSIG_ITEM_DROPPED)) + if(isliving(source.loc)) + REMOVE_TRAIT(source.loc, TRAIT_ALLOW_HERETIC_CASTING, ELEMENT_TRAIT(source)) + +/** + * Signal proc for [COMSIG_PARENT_EXAMINE]. + * Let's the examiner see that this item is a heretic focus + */ +/datum/element/heretic_focus/proc/on_examine(obj/item/source, mob/user, list/examine_list) + SIGNAL_HANDLER + + if(!IS_HERETIC(user)) + return + + examine_list += "Allows you to cast advanced heretic spells when worn." + +/** + * Signal proc for [COMSIG_ITEM_EQUIPPED]. + * When equipped in a right slot, give user our trait + */ +/datum/element/heretic_focus/proc/on_equip(obj/item/source, mob/user, slot) + SIGNAL_HANDLER + + if(!IS_HERETIC(user)) + return + + if(source.slot_flags && !(source.slot_flags & slot)) + return + + ADD_TRAIT(user, TRAIT_ALLOW_HERETIC_CASTING, ELEMENT_TRAIT(source)) + +/** + * Signal proc for [COMSIG_ITEM_DROPPED]. + * Remove our trait when we drop (unequip) our item + */ +/datum/element/heretic_focus/proc/on_drop(obj/item/source, mob/user) + SIGNAL_HANDLER + + REMOVE_TRAIT(user, TRAIT_ALLOW_HERETIC_CASTING, ELEMENT_TRAIT(source)) diff --git a/code/modules/antagonists/heretic/heretic_knowledge.dm b/code/modules/antagonists/heretic/heretic_knowledge.dm new file mode 100644 index 000000000000..7126d4403303 --- /dev/null +++ b/code/modules/antagonists/heretic/heretic_knowledge.dm @@ -0,0 +1,624 @@ + +/** + * # Heretic Knowledge + * + * The datums that allow heretics to progress and learn new spells and rituals. + * + * Heretic Knowledge datums are not singletons - they are instantiated as they + * are given to heretics, and deleted if the heretic antagonist is removed. + * + */ +/datum/heretic_knowledge + /// Name of the knowledge, shown to the heretic. + var/name = "Basic knowledge" + /// Description of the knowledge, shown to the heretic. Describes what it unlocks / does. + var/desc = "Basic knowledge of forbidden arts." + /// What's shown to the heretic when the knowledge is aquired + var/gain_text + /// The abstract parent type of the knowledge, used in determine mutual exclusivity in some cases + var/datum/heretic_knowledge/abstract_parent_type = /datum/heretic_knowledge + /// Assoc list of [typepaths we need] to [amount needed]. + /// If set, this knowledge allows the heretic to do a ritual on a transmutation rune with the components set. + /// If one of the items in the list is a list, it's treated as 'any of these items will work' + var/list/required_atoms + /// Paired with above. If set, the resulting spawned atoms upon ritual completion. + var/list/result_atoms = list() + /// If set, required_atoms checks for these *exact* types and doesn't allow them to be ingredients. + var/list/banned_atom_types = list() + /// Cost of knowledge in knowledge points + var/cost = 0 + /// The priority of the knowledge. Higher priority knowledge appear higher in the ritual list. + /// Number itself is completely arbitrary. Does not need to be set for non-ritual knowledge. + var/priority = 0 + ///If this is considered starting knowledge, TRUE if yes + var/is_starting_knowledge = FALSE + /// In case we want to override the default UI icon getter and plug in our own icon instead. + /// if research_tree_icon_path is not null, research_tree_icon_state must also be specified or things may break + var/research_tree_icon_path + var/research_tree_icon_state + var/research_tree_icon_frame = 1 + var/research_tree_icon_dir = SOUTH + /// A spell we need to add to the mind vs the mob. + var/mind_spell + + +/** Called when the knowledge is first researched. + * This is only ever called once per heretic. + * + * Arguments + * * user - The heretic who researched something + * * our_heretic - The antag datum of who researched us. This should never be null. + */ +/datum/heretic_knowledge/proc/on_research(mob/user, datum/antagonist/heretic/our_heretic) + SHOULD_CALL_PARENT(TRUE) + + if(gain_text) + to_chat(user, "[gain_text]") + on_gain(user, our_heretic) + +/** + * Called when the knowledge is applied to a mob. + * This can be called multiple times per heretic, + * in the case of bodyswap shenanigans. + * + * Arguments + * * user - the heretic which we're applying things to + * * our_heretic - The antag datum of who gained us. This should never be null. + */ +/datum/heretic_knowledge/proc/on_gain(mob/user, datum/antagonist/heretic/our_heretic) + return + +/** + * Called when the knowledge is removed from a mob, + * either due to a heretic being de-heretic'd or bodyswap memery. + * + * Arguments + * * user - the heretic which we're removing things from + * * our_heretic - The antag datum of who is losing us. This should never be null. + */ +/datum/heretic_knowledge/proc/on_lose(mob/user, datum/antagonist/heretic/our_heretic) + return + +/** + * Determines if a heretic can actually attempt to invoke the knowledge as a ritual. + * By default, we can only invoke knowledge with rituals associated. + * + * Return TRUE to have the ritual show up in the rituals list, FALSE otherwise. + */ +/datum/heretic_knowledge/proc/can_be_invoked(datum/antagonist/heretic/invoker) + return !!LAZYLEN(required_atoms) + +/** + * Special check for rituals. + * Called before any of the required atoms are checked. + * + * If you are adding a more complex summoning, + * or something that requires a special check + * that parses through all the atoms, + * you should override this. + * + * Arguments + * * user - the mob doing the ritual + * * atoms - a list of all atoms being checked in the ritual. + * * selected_atoms - an empty list(!) instance passed in by the ritual. You can add atoms to it in this proc. + * * loc - the turf the ritual's occuring on + * + * Returns: TRUE, if the ritual will continue, or FALSE, if the ritual is skipped / cancelled + */ +/datum/heretic_knowledge/proc/recipe_snowflake_check(mob/living/user, list/atoms, list/selected_atoms, turf/loc) + return TRUE + +/** + * Parses specific items into a more readble form. + * Can be overriden by knoweldge subtypes. + */ +/datum/heretic_knowledge/proc/parse_required_item(atom/item_path, number_of_things) + // If we need a human, there is a high likelihood we actually need a (dead) body + if(ispath(item_path, /mob/living/carbon/human)) + return "bod[number_of_things > 1 ? "ies" : "y"]" + if(ispath(item_path, /mob/living)) + return "carcass[number_of_things > 1 ? "es" : ""] of any kind" + if(ispath(item_path, /obj/item/kitchen/knife)) + return "knife[number_of_things > 1 ? "s" : ""] of any kind" + if(ispath(item_path, /obj/item/toy/crayon)) + return "crayon[number_of_things > 1 ? "s" : ""] of any kind" + return "[initial(item_path.name)]\s" +/** + * Called whenever the knowledge's associated ritual is completed successfully. + * + * Creates atoms from types in result_atoms. + * Override this if you want something else to happen. + * This CAN sleep, such as for summoning rituals which poll for ghosts. + * + * Arguments + * * user - the mob who did the ritual + * * selected_atoms - an list of atoms chosen as a part of this ritual. + * * loc - the turf the ritual's occuring on + * + * Returns: TRUE, if the ritual should cleanup afterwards, or FALSE, to avoid calling cleanup after. + */ +/datum/heretic_knowledge/proc/on_finished_recipe(mob/living/user, list/selected_atoms, turf/loc) + if(!length(result_atoms)) + return FALSE + for(var/result in result_atoms) + new result(loc) + return TRUE + +/** + * Called after on_finished_recipe returns TRUE + * and a ritual was successfully completed. + * + * Goes through and cleans up (deletes) + * all atoms in the selected_atoms list. + * + * Remove atoms from the selected_atoms + * (either in this proc or in on_finished_recipe) + * to NOT have certain atoms deleted on cleanup. + * + * Arguments + * * selected_atoms - a list of all atoms we intend on destroying. + */ +/datum/heretic_knowledge/proc/cleanup_atoms(list/selected_atoms) + SHOULD_CALL_PARENT(TRUE) + + for(var/atom/sacrificed as anything in selected_atoms) + if(isliving(sacrificed)) + continue + + if(isstack(sacrificed)) + var/obj/item/stack/sac_stack = sacrificed + var/how_much_to_use = 0 + for(var/requirement in required_atoms) + // If it's not requirement type and type is not a list, skip over this check + if(!istype(sacrificed, requirement) && !islist(requirement)) + continue + // If requirement *is* a list and the stack *is* in the list, skip over this check + if(islist(requirement) && !is_type_in_list(sacrificed, requirement)) + continue + how_much_to_use = min(required_atoms[requirement], sac_stack.amount) + break + sac_stack.use(how_much_to_use) + continue + + selected_atoms -= sacrificed + qdel(sacrificed) + +/** + * A knowledge subtype that grants the heretic a certain spell. + */ +/datum/heretic_knowledge/spell + abstract_parent_type = /datum/heretic_knowledge/spell + /// Spell path we add to the heretic. Type-path. + var/datum/spell/action_to_add + /// The spell we actually created. + var/created_action_ref + +/datum/heretic_knowledge/spell/Destroy() + created_action_ref = null + return ..() + +/datum/heretic_knowledge/spell/on_gain(mob/user, datum/antagonist/heretic/our_heretic) + // Added spells are tracked on the body, and not the mind, + // because we handle heretic mind transfers + // via the antag datum (on_gain and on_lose). + var/datum/spell/created_action = locateUID(created_action_ref) || new action_to_add(user) + user.AddSpell(created_action) + created_action_ref = created_action.UID() + +/datum/heretic_knowledge/spell/on_lose(mob/user, datum/antagonist/heretic/our_heretic) + var/datum/spell/created_action = locateUID(created_action_ref) + user.RemoveSpell(created_action) + +/** + * A knowledge subtype for knowledge that can only + * have a limited amount of its resulting atoms + * created at once. + */ +/datum/heretic_knowledge/limited_amount + abstract_parent_type = /datum/heretic_knowledge/limited_amount + /// The limit to how many items we can create at once. + var/limit = 1 + /// A list of weakrefs to all items we've created. + var/list/created_items + +/datum/heretic_knowledge/limited_amount/Destroy(force) + LAZYCLEARLIST(created_items) + return ..() + +/datum/heretic_knowledge/limited_amount/recipe_snowflake_check(mob/living/user, list/atoms, list/selected_atoms, turf/loc) + for(var/ref as anything in created_items) + var/atom/real_thing = locateUID(ref) + if(QDELETED(real_thing)) + LAZYREMOVE(created_items, ref) + + if(LAZYLEN(created_items) >= limit) + to_chat(user, "The ritual failed, you are at the limit for this item!") + return FALSE + + return TRUE + +/datum/heretic_knowledge/limited_amount/on_finished_recipe(mob/living/user, list/selected_atoms, turf/loc) + for(var/result in result_atoms) + var/atom/created_thing = new result(loc) + LAZYADD(created_items,created_thing.UID()) + return TRUE + +/** + * A knowledge subtype for limited_amount knowledge + * used for base knowledge (the ones that make blades) + * + * A heretic can only learn one /starting type knowledge, + * and their ascension depends on whichever they chose. + */ +/datum/heretic_knowledge/limited_amount/starting + abstract_parent_type = /datum/heretic_knowledge/limited_amount/starting + limit = 2 + cost = 1 + priority = MAX_KNOWLEDGE_PRIORITY - 5 + +/datum/heretic_knowledge/limited_amount/starting/on_research(mob/user, datum/antagonist/heretic/our_heretic) + . = ..() + our_heretic.heretic_path = GLOB.heretic_research_tree[type][HKT_ROUTE] + SSblackbox.record_feedback("tally", "heretic_path_taken", 1, our_heretic.heretic_path) + +/** + * A knowledge subtype for heretic knowledge + * that applies a mark on use. + * + * A heretic can only learn one /mark type knowledge. + */ +/datum/heretic_knowledge/mark + abstract_parent_type = /datum/heretic_knowledge/mark + cost = 2 + /// The status effect typepath we apply on people on mansus grasp. + var/datum/status_effect/eldritch/mark_type + +/datum/heretic_knowledge/mark/on_gain(mob/user, datum/antagonist/heretic/our_heretic) + RegisterSignals(user, list(COMSIG_HERETIC_MANSUS_GRASP_ATTACK, COMSIG_LIONHUNTER_ON_HIT), PROC_REF(on_mansus_grasp)) + RegisterSignal(user, COMSIG_HERETIC_BLADE_ATTACK, PROC_REF(on_eldritch_blade)) + +/datum/heretic_knowledge/mark/on_lose(mob/user, datum/antagonist/heretic/our_heretic) + UnregisterSignal(user, list(COMSIG_HERETIC_MANSUS_GRASP_ATTACK, COMSIG_HERETIC_BLADE_ATTACK)) + +/** + * Signal proc for [COMSIG_HERETIC_MANSUS_GRASP_ATTACK]. + * + * Whenever we cast mansus grasp on someone, apply our mark. + */ +/datum/heretic_knowledge/mark/proc/on_mansus_grasp(mob/living/source, mob/living/target) + SIGNAL_HANDLER + + create_mark(source, target) + +/** + * Signal proc for [COMSIG_HERETIC_BLADE_ATTACK]. + * + * Whenever we attack someone with our blade, attempt to trigger any marks on them. + */ +/datum/heretic_knowledge/mark/proc/on_eldritch_blade(mob/living/source, mob/living/target, obj/item/melee/sickly_blade/blade) + SIGNAL_HANDLER + + if(!isliving(target)) + return + trigger_mark(source, target) + +/** + * Creates the mark status effect on our target. + * This proc handles the instatiate and the application of the station effect, + * and returns the /datum/status_effect instance that was made. + * + * Can be overriden to set or pass in additional vars of the status effect. + */ +/datum/heretic_knowledge/mark/proc/create_mark(mob/living/source, mob/living/target) + if(target.stat == DEAD) + return + return target.apply_status_effect(mark_type) + +/** + * Handles triggering the mark on the target. + * + * If there is no mark, returns FALSE. Returns TRUE if a mark was triggered. + */ +/datum/heretic_knowledge/mark/proc/trigger_mark(mob/living/source, mob/living/target) + var/datum/status_effect/eldritch/mark = target.has_status_effect(/datum/status_effect/eldritch) + if(!istype(mark)) + return FALSE + + mark.on_effect() + return TRUE + +/** + * A knowledge subtype for heretic knowledge that + * upgrades their sickly blade, either on melee or range. + * + * A heretic can only learn one /blade_upgrade type knowledge. + */ +/datum/heretic_knowledge/blade_upgrade + abstract_parent_type = /datum/heretic_knowledge/blade_upgrade + cost = 2 + +/datum/heretic_knowledge/blade_upgrade/on_gain(mob/user, datum/antagonist/heretic/our_heretic) + RegisterSignal(user, COMSIG_HERETIC_BLADE_ATTACK, PROC_REF(on_eldritch_blade_attack)) + RegisterSignal(user, COMSIG_HERETIC_RANGED_BLADE_ATTACK, PROC_REF(on_ranged_eldritch_blade)) + +/datum/heretic_knowledge/blade_upgrade/on_lose(mob/user, datum/antagonist/heretic/our_heretic) + UnregisterSignal(user, list(COMSIG_HERETIC_BLADE_ATTACK, COMSIG_HERETIC_RANGED_BLADE_ATTACK)) + + +/** + * Signal proc for [COMSIG_HERETIC_BLADE_ATTACK]. + * + * Apply any melee effects from hitting someone with our blade. + */ +/datum/heretic_knowledge/blade_upgrade/proc/on_eldritch_blade_attack(mob/living/source, mob/living/target, obj/item/melee/sickly_blade/blade) + SIGNAL_HANDLER + if(isliving(target)) + do_melee_effects(source, target, blade) + +/** + * Signal proc for [COMSIG_HERETIC_RANGED_BLADE_ATTACK]. + * + * Apply any ranged effects from hitting someone with our blade. + */ +/datum/heretic_knowledge/blade_upgrade/proc/on_ranged_eldritch_blade(mob/living/source, mob/living/target, obj/item/melee/sickly_blade/blade) + SIGNAL_HANDLER + + do_ranged_effects(source, target, blade) + +/** + * Overridable proc that invokes special effects + * whenever the heretic attacks someone in melee with their heretic blade. + */ +/datum/heretic_knowledge/blade_upgrade/proc/do_melee_effects(mob/living/source, mob/living/target, obj/item/melee/sickly_blade/blade) + return + +/** + * Overridable proc that invokes special effects + * whenever the heretic clicks on someone at range with their heretic blade. + */ +/datum/heretic_knowledge/blade_upgrade/proc/do_ranged_effects(mob/living/source, mob/living/target, obj/item/melee/sickly_blade/blade) + return + +/** + * A knowledge subtype lets the heretic summon a monster with the ritual. + */ +/datum/heretic_knowledge/summon + abstract_parent_type = /datum/heretic_knowledge/summon + /// Typepath of a mob to summon when we finish the recipe. + var/mob/living/mob_to_summon + +/datum/heretic_knowledge/summon/on_finished_recipe(mob/living/user, list/selected_atoms, turf/loc) + return summon_ritual_mob(user, loc, mob_to_summon) + +/** + * Creates the ritual mob and grabs a ghost for it + * + * * user - the mob doing the summoning + * * loc - where the summon is happening + * * mob_to_summon - either a mob instance or a mob typepath + */ +/datum/heretic_knowledge/proc/summon_ritual_mob(mob/living/user, turf/loc, mob/living/mob_to_summon) + var/mob/living/simple_animal/summoned + if(issimple_animal(mob_to_summon)) + summoned = mob_to_summon + else + summoned = new mob_to_summon(loc) + summoned.AIStatus = AI_OFF + // Fade in the summon while the ghost poll is ongoing. + // Also don't let them mess with the summon while waiting + summoned.alpha = 0 + summoned.notransform = TRUE + summoned.move_resist = MOVE_FORCE_OVERPOWERING + animate(summoned, 10 SECONDS, alpha = 155) + + message_admins("A [summoned.name] is being summoned by [ADMIN_LOOKUPFLW(user)] in [ADMIN_COORDJMP(summoned)].") + var/list/candidates = SSghost_spawns.poll_candidates("Do you want to play as a heretic summon", ROLE_HERETIC, TRUE, 10 SECONDS, source = summoned) + var/mob/chosen_one + if(length(candidates)) + chosen_one = pick(candidates) + if(isnull(chosen_one)) + to_chat(user, "The ritual has failed, no spirits possessed the summon!") + animate(summoned, 0.5 SECONDS, alpha = 0) + QDEL_IN(summoned, 0.6 SECONDS) + return FALSE + + // Ok let's make them an interactable mob now, since we got a ghost + summoned.alpha = 255 + summoned.notransform = FALSE + summoned.move_resist = initial(summoned.move_resist) + + summoned.ghostize(FALSE) + summoned.key = chosen_one.key + + message_admins("[ADMIN_LOOKUPFLW(user)] created a [summoned.name], [ADMIN_LOOKUPFLW(summoned)].") + + var/datum/antagonist/heretic_monster/heretic_monster = summoned.mind.add_antag_datum(/datum/antagonist/heretic_monster) + + var/datum/objective/heretic_summon/summon_objective = locate() in user.mind.get_all_objectives() + summon_objective?.num_summoned++ + heretic_monster.set_owner(user.mind) //qwertodo: sleep / timer before doing this + if(mind_spell) + addtimer(CALLBACK(src, PROC_REF(add_mind_spell), summoned), 1 SECONDS) + return TRUE + +/datum/heretic_knowledge/proc/add_mind_spell(mob/living/summoned) + summoned.mind.AddSpell(mind_spell) + + +/// The amount of knowledge points the knowledge ritual gives on success. +#define KNOWLEDGE_RITUAL_POINTS 4 + +/** + * A subtype of knowledge that generates random ritual components. + */ +/datum/heretic_knowledge/knowledge_ritual + name = "Ritual of Knowledge" + desc = "A randomly generated transmutation ritual that rewards knowledge points and can only be completed once." + gain_text = "Everything can be a key to unlocking the secrets behind the Gates. I must be wary and wise." + abstract_parent_type = /datum/heretic_knowledge/knowledge_ritual + cost = 1 + priority = MAX_KNOWLEDGE_PRIORITY - 10 // A pretty important midgame ritual. + research_tree_icon_path = 'icons/obj/antags/eldritch.dmi' + research_tree_icon_state = "book_open" + /// Whether we've done the ritual. Only doable once. + var/was_completed = FALSE + +/datum/heretic_knowledge/knowledge_ritual/New() + . = ..() + var/static/list/potential_organs = list( + /obj/item/organ/internal/appendix, + /obj/item/organ/internal/eyes, + /obj/item/organ/internal/ears, + /obj/item/organ/internal/heart, + /obj/item/organ/internal/liver, + /obj/item/organ/internal/lungs, + ) + + var/static/list/potential_easy_items = list( + /obj/item/shard, + /obj/item/candle, + /obj/item/book, + /obj/item/pen, + /obj/item/paper, + /obj/item/toy/crayon, + /obj/item/flashlight, + /obj/item/clipboard, + ) + + var/static/list/potential_uncommoner_items = list( + /obj/item/restraints/legcuffs/beartrap, + /obj/item/restraints/handcuffs/cable/zipties, + /obj/item/circular_saw, + /obj/item/scalpel, + /obj/item/clothing/gloves/color/yellow, + /obj/item/melee/baton, + /obj/item/clothing/glasses/sunglasses, + ) + + required_atoms = list() + // 2 organs. Can be the same. + required_atoms[pick(potential_organs)] += 1 + required_atoms[pick(potential_organs)] += 1 + // 2-3 random easy items. + required_atoms[pick(potential_easy_items)] += rand(2, 3) + // 1 uncommon item. + required_atoms[pick(potential_uncommoner_items)] += 1 + +/datum/heretic_knowledge/knowledge_ritual/on_research(mob/user, datum/antagonist/heretic/our_heretic) + . = ..() + + var/list/requirements_string = list() + + to_chat(user, "The [name] requires the following:") + for(var/obj/item/path as anything in required_atoms) + var/amount_needed = required_atoms[path] + to_chat(user, "[amount_needed] [initial(path.name)]\s...") + requirements_string += "[amount_needed == 1 ? "":"[amount_needed] "][initial(path.name)]\s" + + to_chat(user, "Completing it will reward you [KNOWLEDGE_RITUAL_POINTS] knowledge points. You can check the knowledge in your Researched Knowledge to be reminded.") + + desc = "Allows you to transmute [english_list(requirements_string)] for [KNOWLEDGE_RITUAL_POINTS] bonus knowledge points. This can only be completed once." + +/datum/heretic_knowledge/knowledge_ritual/can_be_invoked(datum/antagonist/heretic/invoker) + return !was_completed + +/datum/heretic_knowledge/knowledge_ritual/recipe_snowflake_check(mob/living/user, list/atoms, list/selected_atoms, turf/loc) + return !was_completed + +/datum/heretic_knowledge/knowledge_ritual/on_finished_recipe(mob/living/user, list/selected_atoms, turf/loc) + var/datum/antagonist/heretic/our_heretic = IS_HERETIC(user) + our_heretic.knowledge_points += KNOWLEDGE_RITUAL_POINTS + was_completed = TRUE + + to_chat(user, "[name] completed!") + to_chat(user, "[pick_list(HERETIC_INFLUENCE_FILE, "drain_message")]") + desc += " (Completed!)" + log_heretic_knowledge("[key_name(user)] completed a [name] at [worldtime2text()].") + return TRUE + +#undef KNOWLEDGE_RITUAL_POINTS + +/** + * The special final tier of knowledges that unlocks ASCENSION. + */ +/datum/heretic_knowledge/ultimate + abstract_parent_type = /datum/heretic_knowledge/ultimate + cost = 2 + priority = MAX_KNOWLEDGE_PRIORITY + 1 // Yes, the final ritual should be ABOVE the max priority. + required_atoms = list(/mob/living/carbon/human = 3) + /// The text of the ascension announcement. + /// %NAME% is replaced with the heretic's real name, + /// and %SPOOKY% is replaced with output from [generate_heretic_text] + var/announcement_text + /// The sound that's played for the ascension announcement. + var/announcement_sound + +/datum/heretic_knowledge/ultimate/on_research(mob/user, datum/antagonist/heretic/our_heretic) + . = ..() + var/total_points = 0 + for(var/datum/heretic_knowledge/knowledge as anything in flatten_list(our_heretic.researched_knowledge)) + total_points += knowledge.cost + + log_heretic_knowledge("[key_name(user)] gained knowledge of their final ritual at [worldtime2text()]. \ + They have [length(our_heretic.researched_knowledge)] knowledge nodes researched, totalling [total_points] points \ + and have sacrificed [our_heretic.total_sacrifices] people ([our_heretic.high_value_sacrifices] of which were high value)") + +/datum/heretic_knowledge/ultimate/can_be_invoked(datum/antagonist/heretic/invoker) + if(invoker.ascended) + return FALSE + + if(!invoker.can_ascend()) + return FALSE + + return TRUE + +/datum/heretic_knowledge/ultimate/recipe_snowflake_check(mob/living/user, list/atoms, list/selected_atoms, turf/loc) + var/datum/antagonist/heretic/heretic_datum = IS_HERETIC(user) + if(!can_be_invoked(heretic_datum)) + return FALSE + + // Remove all non-dead humans from the atoms list. + // (We only want to sacrifice dead folk.) + for(var/mob/living/carbon/human/sacrifice in atoms) + if(!is_valid_sacrifice(sacrifice)) + atoms -= sacrifice + + // All the non-dead humans are removed in this proc. + // We handle checking if we have enough humans in the ritual itself. + return TRUE + +/** + * Checks if the passed human is a valid sacrifice for our ritual. + */ +/datum/heretic_knowledge/ultimate/proc/is_valid_sacrifice(mob/living/carbon/human/sacrifice) + return (sacrifice.stat == DEAD) && !ismonkeybasic(sacrifice) + +/datum/heretic_knowledge/ultimate/on_finished_recipe(mob/living/user, list/selected_atoms, turf/loc) + var/datum/antagonist/heretic/heretic_datum = IS_HERETIC(user) + heretic_datum.ascended = TRUE + + // Show the cool red gradiant in our UI + heretic_datum.update_static_data(user) + + if(ishuman(user)) + var/mob/living/carbon/human/human_user = user + human_user.physiology.brute_mod *= 0.5 + human_user.physiology.burn_mod *= 0.5 + + SSblackbox.record_feedback("tally", "heretic_ascended", 1, GLOB.heretic_research_tree[type][HKT_ROUTE]) + log_heretic_knowledge("[key_name(user)] completed their final ritual at [worldtime2text()].") + GLOB.major_announcement.Announce( + message = replacetext(replacetext(announcement_text, "%NAME%", user.real_name), "%SPOOKY%", GLOBAL_PROC_REF(generate_heretic_text)), + new_title = generate_heretic_text(), + new_sound = announcement_sound, + ) + + heretic_datum.increase_rust_strength() + return TRUE + +/datum/heretic_knowledge/ultimate/cleanup_atoms(list/selected_atoms) + for(var/mob/living/carbon/human/sacrifice in selected_atoms) + selected_atoms -= sacrifice + sacrifice.gib() + + return ..() diff --git a/code/modules/antagonists/heretic/heretic_living_heart.dm b/code/modules/antagonists/heretic/heretic_living_heart.dm new file mode 100644 index 000000000000..37241f21d78f --- /dev/null +++ b/code/modules/antagonists/heretic/heretic_living_heart.dm @@ -0,0 +1,191 @@ +/** + * # Living Heart Component + * + * Applied to a heart to turn it into a heretic's 'living heart'. + * The living heart is what they use to track people they need to sacrifice. + * + * This component handles the action associated with it - + * if the organ is removed, the action should be deleted + */ +/datum/component/living_heart + /// The action we create and give to our heart. + var/datum/action/track_target/action + +/datum/component/living_heart/Initialize() + if(!is_internal_organ(parent)) + return COMPONENT_INCOMPATIBLE + + var/obj/item/organ/organ_parent = parent + action = new(src) + action.Grant(organ_parent.owner) + +/datum/component/living_heart/Destroy(force) + QDEL_NULL(action) + return ..() + +/datum/component/living_heart/RegisterWithParent() + ADD_TRAIT(parent, TRAIT_LIVING_HEART, UID(src)) + RegisterSignal(parent, COMSIG_ORGAN_REMOVED, PROC_REF(on_organ_removed)) + +/datum/component/living_heart/UnregisterFromParent() + REMOVE_TRAIT(parent, TRAIT_LIVING_HEART, UID(src)) + UnregisterSignal(parent, COMSIG_ORGAN_REMOVED) + +/datum/component/living_heart/PostTransfer(datum/new_parent) + if(!is_internal_organ(new_parent)) + return COMPONENT_INCOMPATIBLE + +/** + * Signal proc for [COMSIG_ORGAN_REMOVED]. + * + * If the organ is removed, the component will remove itself. + */ +/datum/component/living_heart/proc/on_organ_removed(obj/item/organ/source, mob/living/carbon/old_owner) + SIGNAL_HANDLER + + to_chat(old_owner, "As your living [source.name] leaves your body, you feel less connected to the Mansus!") + qdel(src) + +/** + * The action associated with the living heart. + * Allows a heretic to track sacrifice targets. + */ +/datum/action/track_target + name = "Living Heartbeat" + desc = "LMB: Chose one of your sacrifice targets to track. RMB: Repeats last target you chose to track." + check_flags = AB_CHECK_CONSCIOUS + + button_overlay_icon = 'icons/obj/antags/eldritch.dmi' + button_overlay_icon_state = "living_heart" + + /// Tracks whether we were right clicked or left clicked in our last trigger + var/right_clicked = FALSE + /// The real name of the last mob we tracked + var/last_tracked_name + /// Whether the target radial is currently opened. + var/radial_open = FALSE + +/datum/action/track_target/Grant(mob/granted) + if(!IS_HERETIC(granted)) + return + + return ..() + +/datum/action/track_target/IsAvailable(feedback = FALSE) + . = ..() + if(!.) + return + + if(!IS_HERETIC(owner)) + return FALSE + if(radial_open) + return FALSE + + return TRUE + +/datum/action/track_target/Trigger(left_click) + var/datum/antagonist/heretic/heretic_datum = IS_HERETIC(owner) + var/datum/heretic_knowledge/sac_knowledge = heretic_datum.get_knowledge(/datum/heretic_knowledge/hunt_and_sacrifice) + if(!LAZYLEN(heretic_datum.sac_targets)) + to_chat(owner, "You have no targets, visit a rune!") + return TRUE + + var/list/targets_to_choose = list() + var/list/mob/living/carbon/human/human_targets = list() + for(var/mob/living/carbon/human/sac_target as anything in heretic_datum.sac_targets) + human_targets[sac_target.real_name] = sac_target + targets_to_choose[sac_target.real_name] = heretic_datum.sac_targets[sac_target] + + // If we don't have a last tracked name, open a radial to set one. + // If we DO have a last tracked name, we skip the radial if they right click the action. + if(isnull(last_tracked_name) || !right_clicked) + radial_open = TRUE + last_tracked_name = show_radial_menu( + owner, + owner, + targets_to_choose, + custom_check = CALLBACK(src, PROC_REF(check_menu)), + radius = 40, + require_near = TRUE, + ) + radial_open = FALSE + + // If our last tracked name is still null, skip the trigger + if(isnull(last_tracked_name)) + return FALSE + + var/mob/living/carbon/human/tracked_mob = human_targets[last_tracked_name] + if(QDELETED(tracked_mob)) + last_tracked_name = null + return FALSE + + playsound(owner, 'sound/effects/singlebeat.ogg', 50, TRUE, SILENCED_SOUND_EXTRARANGE) + to_chat(owner, "You're target is [get_distance_message(tracked_mob)]") + + + // Let them know how to sacrifice people if they're able to be sac'd + if(tracked_mob.stat == DEAD) + to_chat(owner, "[tracked_mob] is dead. Bring them to a transmutation rune \ + and invoke \"[sac_knowledge.name]\" to sacrifice them!") + + return TRUE + +/// Callback for the radial to ensure it's closed when not allowed. +/datum/action/track_target/proc/check_menu() + if(QDELETED(src)) + return FALSE + if(!IS_HERETIC(owner)) + return FALSE + return TRUE + +/// Gets the balloon message for who we're tracking. +/datum/action/track_target/proc/get_distance_message(mob/living/carbon/human/tracked_mob) + var/balloon_message = "error text!" + var/turf/their_turf = get_turf(tracked_mob) + var/turf/our_turf = get_turf(owner) + var/their_z = their_turf?.z + var/our_z = our_turf?.z + + // One of us is in somewhere we shouldn't be + if(!our_z || !their_z) + // "Hell if I know" + balloon_message = "on another plane!" + + // They're not on the same z-level as us + else if(our_z != their_z) + // They're on the station + if(is_station_level(their_z)) + + // We're off station, they're not + balloon_message = "on station!" + + // Mining + else if(is_mining_level(their_z)) + balloon_message = "on lavaland!" + + // They're somewhere we probably can't get too - sacrifice z-level, centcom, etc + else + balloon_message = "on another plane!" + + // They're on the same z-level as us! + else + var/dist = get_dist(our_turf, their_turf) + var/dir = get_dir(our_turf, their_turf) + + + switch(dist) + if(0 to 15) + balloon_message = "very near, [dir2text(dir)]!" + if(16 to 31) + balloon_message = "near, [dir2text(dir)]!" + if(32 to 127) + balloon_message = "far, [dir2text(dir)]!" + else + balloon_message = "very far!" + + + if(tracked_mob.stat == DEAD) + balloon_message = "dead, and " + balloon_message + + return balloon_message + diff --git a/code/modules/antagonists/heretic/heretic_monsters.dm b/code/modules/antagonists/heretic/heretic_monsters.dm new file mode 100644 index 000000000000..4a198906bc88 --- /dev/null +++ b/code/modules/antagonists/heretic/heretic_monsters.dm @@ -0,0 +1,40 @@ +///Tracking reasons +/datum/antagonist/heretic_monster + name = "\improper Eldritch Horror" + roundend_category = "Heretics" + job_rank = ROLE_HERETIC + antag_hud_type = ANTAG_HUD_HERETIC_BEAST + antag_hud_name = "heretic_beast" + /// Our master (a heretic)'s mind. + var/datum/mind/master + +/datum/antagonist/heretic_monster/farewell() + if(master?.current) + to_chat(master.current, "The essence of [owner], your servant, fades from your mind.") + if(owner.current) + to_chat(owner.current, "Your mind begins to fill with haze - your master is no longer[master ? " [master]":""], you are free!") + owner.current.visible_message("[owner.current] looks like [owner.current.p_theyve()] been freed from the chains of the Mansus!") + + master = null + return ..() + +/* + * Set our [master] var to a new mind. + */ +/datum/antagonist/heretic_monster/proc/set_owner(datum/mind/master) + src.master = master + //owner.enslave_mind_to_creator(master.current) + + add_antag_objective(/datum/objective/assist_master) + +/datum/objective/assist_master + explanation_text = "Assist your master." + completed = TRUE + needs_target = FALSE + +/datum/antagonist/heretic_monster/greet() + var/list/messages = list() + messages.Add("You are a [ishuman(owner.current) ? "shambling corpse returned":"horrible creation brought"] to this plane through the Gates of the Mansus.") + messages.Add("Your master is [master]. Assist them to all ends.") + SEND_SOUND(owner.current, sound('sound/ambience/antag/heretic/heretic_gain.ogg')) + return messages diff --git a/code/modules/antagonists/heretic/influences.dm b/code/modules/antagonists/heretic/influences.dm new file mode 100644 index 000000000000..60145db0f838 --- /dev/null +++ b/code/modules/antagonists/heretic/influences.dm @@ -0,0 +1,259 @@ + +/// The number of influences spawned per heretic +#define NUM_INFLUENCES_PER_HERETIC 5 + +/** + * #Reality smash tracker + * + * A global singleton data that tracks all the heretic + * influences ("reality smashes") that we've created, + * and all of the heretics (minds) that can see them. + * + * Handles ensuring all minds can see influences, generating + * new influences for new heretic minds, and allowing heretics + * to see new influences that are created. + */ +/datum/reality_smash_tracker + /// The total number of influences that have been drained, for tracking. + var/num_drained = 0 + /// List of tracked influences (reality smashes) + var/list/obj/effect/heretic_influence/smashes = list() + /// List of minds with the ability to see influences + var/list/datum/mind/tracked_heretics = list() + +/datum/reality_smash_tracker/Destroy(force) + if(GLOB.reality_smash_track == src) + stack_trace("[type] was deleted. Heretics may no longer access any influences. Fix it, or call coder support.") + message_admins("The [type] was deleted. Heretics may no longer access any influences. Fix it, or call coder support.") + QDEL_LIST_CONTENTS(smashes) + tracked_heretics.Cut() + return ..() + +/** + * Generates a set amount of reality smashes + * based on the number of already existing smashes + * and the number of minds we're tracking. + */ +/datum/reality_smash_tracker/proc/generate_new_influences() + var/how_many_can_we_make = 0 + for(var/heretic_number in 1 to length(tracked_heretics)) + how_many_can_we_make += max(NUM_INFLUENCES_PER_HERETIC - heretic_number + 1, 1) + + var/location_sanity = 0 + while((length(smashes) + num_drained) < how_many_can_we_make && location_sanity < 100) + var/turf/chosen_location = get_safe_random_station_turf_equal_weight() + + // We don't want them close to each other - at least 1 tile of separation + var/list/nearby_things = range(1, chosen_location) + var/obj/effect/heretic_influence/what_if_i_have_one = locate() in nearby_things + var/obj/effect/visible_heretic_influence/what_if_i_had_one_but_its_used = locate() in nearby_things + if(what_if_i_have_one || what_if_i_had_one_but_its_used) + location_sanity++ + continue + + new /obj/effect/heretic_influence(chosen_location) + +/** + * Adds a mind to the list of people that can see the reality smashes + * + * Use this whenever you want to add someone to the list + */ +/datum/reality_smash_tracker/proc/add_tracked_mind(datum/mind/heretic) + tracked_heretics |= heretic + + // If our heretic's on station, generate some new influences + if(ishuman(heretic.current) && is_teleport_allowed(heretic.current.z)) + generate_new_influences() + +/** + * Removes a mind from the list of people that can see the reality smashes + * + * Use this whenever you want to remove someone from the list + */ +/datum/reality_smash_tracker/proc/remove_tracked_mind(datum/mind/heretic) + tracked_heretics -= heretic + +/obj/effect/visible_heretic_influence + name = "pierced reality" + icon = 'icons/effects/eldritch.dmi' + icon_state = "pierced_illusion" + anchored = TRUE + resistance_flags = FIRE_PROOF | UNACIDABLE | ACID_PROOF + alpha = 0 + invisibility = INVISIBILITY_LEVEL_TWO + new_attack_chain = TRUE + +/obj/effect/visible_heretic_influence/Initialize(mapload) + . = ..() + addtimer(CALLBACK(src, PROC_REF(show_presence)), 15 SECONDS) + + var/image/silicon_image = image('icons/effects/eldritch.dmi', src, null, OBJ_LAYER) + silicon_image.override = TRUE + add_alt_appearance("pierced_reality", silicon_image, GLOB.silicon_mob_list) + +/obj/effect/visible_heretic_influence/add_filter(name, priority, list/params) + return + +/* + * Makes the influence fade in after 15 seconds. + */ +/obj/effect/visible_heretic_influence/proc/show_presence() + invisibility = 0 + animate(src, alpha = 255, time = 15 SECONDS) + +/obj/effect/visible_heretic_influence/attack_hand(mob/living/user, list/modifiers) + . = ..() + if(.) + return + if(!ishuman(user)) + return + + if(IS_HERETIC(user)) + to_chat(user, "You know better than to tempt forces out of your control!") + return TRUE + + var/mob/living/carbon/human/human_user = user + var/obj/item/organ/external/their_poor_arm = human_user.get_active_hand() + if(prob(25)) + to_chat(human_user, "An otherwordly presence tears and atomizes your [their_poor_arm.name] as you try to touch the hole in the very fabric of reality!") + their_poor_arm.droplimb() + qdel(their_poor_arm) + else + to_chat(human_user,"You pull your hand away from the hole as the eldritch energy flails, trying to latch onto existence itself!") + return TRUE + +/obj/effect/visible_heretic_influence/attack_tk(mob/user) + if(!ishuman(user)) + return + + . = COMPONENT_CANCEL_ATTACK_CHAIN + + if(IS_HERETIC(user)) + to_chat(user, "You know better than to tempt forces out of your control!") + return + + var/mob/living/carbon/human/human_user = user + + // A very elaborate way to suicide + to_chat(human_user, "Eldritch energy lashes out, piercing your fragile mind, tearing it to pieces!") + human_user.ghostize() + var/obj/item/organ/external/head/head = locate() in human_user.bodyparts + if(head) + head.droplimb() + qdel(head) + else + human_user.gib() + var/datum/effect_system/reagents_explosion/explosion = new() + explosion.set_up(1, get_turf(human_user), TRUE, 0) + explosion.start(src) + +/obj/effect/visible_heretic_influence/examine(mob/user) + . = ..() + if(IS_HERETIC(user) || !ishuman(user)) + return + + var/mob/living/carbon/human/human_user = user + to_chat(human_user, "Your mind burns as you stare at the tear!") + human_user.adjustBrainLoss(10) + +/obj/effect/heretic_influence + name = "reality smash" + icon = 'icons/effects/eldritch.dmi' + icon_state = "reality_smash" + anchored = TRUE + resistance_flags = FIRE_PROOF | UNACIDABLE | ACID_PROOF + invisibility = INVISIBILITY_LEVEL_TWO + hud_possible = list(HERETIC_HUD) + new_attack_chain = TRUE + /// Whether we're currently being drained or not. + var/being_drained = FALSE + +/obj/effect/heretic_influence/Initialize(mapload) + . = ..() + GLOB.reality_smash_track.smashes += src + generate_name() + prepare_huds() + for(var/datum/atom_hud/data/heretic/h_hud in GLOB.huds) + h_hud.add_to_hud(src) + do_hud_stuff() + + +/obj/effect/heretic_influence/Destroy() + GLOB.reality_smash_track.smashes -= src + return ..() + +/obj/effect/heretic_influence/add_fingerprint(mob/living/M, ignoregloves) + return //No detective you can not scan the fucking influence to find out who touched it + + +/obj/effect/heretic_influence/attack_hand(mob/user) + + if(!IS_HERETIC(user)) // Shouldn't be able to do this, but just in case + return + + else + INVOKE_ASYNC(src, PROC_REF(drain_influence), user, 1) + + return + + +/obj/effect/heretic_influence/attack_by(obj/item/attacking, mob/user, params) + if(..()) + return FINISH_ATTACK + + // Using a codex will give you two knowledge points for draining. + if(drain_influence_with_codex(user, attacking)) + return TRUE + +/obj/effect/heretic_influence/proc/drain_influence_with_codex(mob/user, obj/item/codex_cicatrix/codex) + if(!istype(codex) || being_drained) + return FALSE + if(!codex.book_open) + codex.activate_self(user) // open booke + INVOKE_ASYNC(src, PROC_REF(drain_influence), user, 2) + return TRUE + +/** + * Begin to drain the influence, setting being_drained, + * registering an examine signal, and beginning a do_after. + * + * If successful, the influence is drained and deleted. + */ +/obj/effect/heretic_influence/proc/drain_influence(mob/living/user, knowledge_to_gain) + + being_drained = TRUE + to_chat(user, "You begin to drain the influcence") + + if(!do_after(user, 10 SECONDS, target = src)) + being_drained = FALSE + return + + + var/datum/antagonist/heretic/heretic_datum = IS_HERETIC(user) + heretic_datum.knowledge_points += knowledge_to_gain + + // Aaand now we delete it + after_drain(user) + +/** + * Handle the effects of the drain. + */ +/obj/effect/heretic_influence/proc/after_drain(mob/living/user) + if(user) + to_chat(user, "[pick_list(HERETIC_INFLUENCE_FILE, "drain_message")]") + to_chat(user, "[src] begins to fade into reality!") + + var/obj/effect/visible_heretic_influence/illusion = new /obj/effect/visible_heretic_influence(drop_location()) + illusion.name = "\improper" + pick_list(HERETIC_INFLUENCE_FILE, "drained") + " " + format_text(name) + + GLOB.reality_smash_track.num_drained++ + qdel(src) + +/** + * Generates a random name for the influence. + */ +/obj/effect/heretic_influence/proc/generate_name() + name = "\improper" + pick_list(HERETIC_INFLUENCE_FILE, "prefix") + " " + pick_list(HERETIC_INFLUENCE_FILE, "postfix") + +#undef NUM_INFLUENCES_PER_HERETIC + diff --git a/code/modules/antagonists/heretic/items/corrupted_organs.dm b/code/modules/antagonists/heretic/items/corrupted_organs.dm new file mode 100644 index 000000000000..7b9cb6f2cf01 --- /dev/null +++ b/code/modules/antagonists/heretic/items/corrupted_organs.dm @@ -0,0 +1,139 @@ +/// Renders you unable to see people who were heretics at the time that this organ is gained +/obj/item/organ/internal/eyes/corrupt + name = "corrupt orbs" + desc = "These eyes have seen something they shouldn't have." + status = parent_type::status | ORGAN_HAZARDOUS + /// The override images we are applying + var/list/hallucinations + +/obj/item/organ/internal/eyes/corrupt/Initialize(mapload) + . = ..() + AddElement(/datum/element/corrupted_organ) + AddElement(/datum/element/noticable_organ, "%PRONOUN_Their eyes have wide dilated pupils, and no iris. Something is moving in the darkness.", BODY_ZONE_PRECISE_EYES) + +/obj/item/organ/internal/eyes/corrupt/insert(mob/living/carbon/M, special = 0) + . = ..() + if(!owner.client) + return + + var/list/human_mobs = GLOB.human_list.Copy() + human_mobs -= owner + for(var/mob/living/carbon/human/check_human as anything in human_mobs) + if(!IS_HERETIC(check_human) && !prob(5)) // Throw in some false positives + continue + var/image/invisible_man = image('icons/blanks/32x32.dmi', check_human, "nothing") + invisible_man.override = TRUE + LAZYADD(hallucinations, invisible_man) + + if(LAZYLEN(hallucinations)) + owner.client.images |= hallucinations + +/obj/item/organ/internal/eyes/corrupt/remove(mob/living/carbon/M, special = 0) + . = ..() + if(!LAZYLEN(hallucinations)) + return + owner.client?.images -= hallucinations + QDEL_NULL(hallucinations) + + +/// Randomly secretes alcohol or hallucinogens when you're drinking something +/obj/item/organ/internal/liver/corrupt + name = "corrupt liver" + desc = "After what you've seen you could really go for a drink." + status = parent_type::status | ORGAN_HAZARDOUS + /// How much extra ingredients to add? + var/amount_added = 5 + /// What extra ingredients can we add? + var/list/extra_ingredients = list( + /datum/reagent/consumable/ethanol/demonsblood, + /datum/reagent/consumable/ethanol/rum, + /datum/reagent/consumable/ethanol/thirteenloko, + /datum/reagent/consumable/ethanol/vodka, + /datum/reagent/consumable/ethanol/singulo, + /datum/reagent/consumable/ethanol/hippies_delight, + /datum/reagent/bath_salts, + /datum/reagent/happiness, + /datum/reagent/lsd, + ) + +/obj/item/organ/internal/liver/corrupt/Initialize(mapload) + . = ..() + AddElement(/datum/element/corrupted_organ) + +/obj/item/organ/internal/liver/corrupt/insert(mob/living/carbon/M, special = 0) + . = ..() + RegisterSignal(owner, COMSIG_ATOM_EXPOSE_REAGENTS, PROC_REF(on_drank)) + +/obj/item/organ/internal/liver/corrupt/remove(mob/living/carbon/M, special = 0) + . = ..() + UnregisterSignal(owner, COMSIG_ATOM_EXPOSE_REAGENTS) + +/// If we drank something, add a little extra +/obj/item/organ/internal/liver/corrupt/proc/on_drank(atom/source, list/reagents, datum/reagents/source_reagents, methods) + SIGNAL_HANDLER +// if(!(methods & INGEST)) +// return + var/datum/reagents/extra_reagents = new() + extra_reagents.add_reagent(pick(extra_ingredients), amount_added) +// extra_reagents.trans_to(source, amount_added, transferred_by = src, methods = INJECT) + if(prob(20)) + to_chat(source, "As you take a sip, you feel something bubbling in your stomach...") + // qwertodo: confirm consumption is by drinking + + +/// Occasionally bombards you with spooky hands and lets everyone hear your pulse. +/obj/item/organ/internal/heart/corrupt + name = "corrupt heart" + desc = "What corruption is this spreading along with the blood?" + status = parent_type::status | ORGAN_HAZARDOUS + /// How long until the next heart? + COOLDOWN_DECLARE(hand_cooldown) + +/obj/item/organ/internal/heart/corrupt/Initialize(mapload) + . = ..() + AddElement(/datum/element/corrupted_organ) + +/obj/item/organ/internal/heart/corrupt/on_life() + . = ..() + if(!COOLDOWN_FINISHED(src, hand_cooldown) || IS_IN_MANSUS(owner) || owner.reagents?.has_reagent("holywater")) + return + fire_curse_hand(owner) + COOLDOWN_START(src, hand_cooldown, rand(6 SECONDS, 45 SECONDS)) // Wide variance to put you off guard + + +/// Sometimes cough out some kind of dangerous gas +/obj/item/organ/internal/lungs/corrupt + name = "corrupt lungs" + desc = "Some things SHOULD be drowned in tar." + status = parent_type::status | ORGAN_HAZARDOUS + +/obj/item/organ/internal/lungs/corrupt/Initialize(mapload) + . = ..() + AddElement(/datum/element/corrupted_organ) + +///obj/item/organ/internal/lungs/corrupt/check_breath(datum/gas_mixture/breath, mob/living/carbon/human/breather) +// . = ..() +// if(!. || IS_IN_MANSUS(owner) || breather.reagents?.has_reagent("holywater") || !prob(cough_chance)) +// return +// Qwertodo: tweak this to not be plasma everywhere + + +/// It's full of worms +/obj/item/organ/internal/appendix/corrupt + name = "corrupt appendix" + desc = "What kind of dark, cosmic force is even going to bother to corrupt an appendix?" + status = parent_type::status | ORGAN_HAZARDOUS + /// How likely are we to spawn worms? + var/worm_chance = 2 + +/obj/item/organ/internal/appendix/corrupt/Initialize(mapload) + . = ..() + AddElement(/datum/element/corrupted_organ) + AddElement(/datum/element/noticable_organ, "%PRONOUN_Their abdomen is distended... and wiggling.", BODY_ZONE_PRECISE_GROIN) + +/obj/item/organ/internal/appendix/corrupt/on_life() + . = ..() + if(owner.stat != CONSCIOUS || owner.reagents?.has_reagent("holywater") || IS_IN_MANSUS(owner)) + return +// owner.vomit(MOB_VOMIT_MESSAGE | MOB_VOMIT_HARM, vomit_type = /obj/effect/decal/cleanable/vomit/nebula/worms, distance = 0) + owner.KnockDown(0.5 SECONDS) diff --git a/code/modules/antagonists/heretic/items/eldritch_flask.dm b/code/modules/antagonists/heretic/items/eldritch_flask.dm new file mode 100644 index 000000000000..f55d520e7d04 --- /dev/null +++ b/code/modules/antagonists/heretic/items/eldritch_flask.dm @@ -0,0 +1,8 @@ +// An unholy water flask, but for heretics. +// Heals heretics, hearms non-heretics. Pretty much identical. +/obj/item/reagent_containers/cup/beaker/eldritch + name = "flask of eldritch essence" + desc = "Toxic to the closed minded, yet refreshing to those with knowledge of the beyond." + icon = 'icons/obj/antags/eldritch.dmi' + icon_state = "eldritch_flask" + list_reagents = list("eldritch" = 50) diff --git a/code/modules/antagonists/heretic/items/forbidden_book.dm b/code/modules/antagonists/heretic/items/forbidden_book.dm new file mode 100644 index 000000000000..e228ebf25585 --- /dev/null +++ b/code/modules/antagonists/heretic/items/forbidden_book.dm @@ -0,0 +1,70 @@ +// Ye old forbidden book, the Codex Cicatrix. +/obj/item/codex_cicatrix + name = "Codex Cicatrix" + desc = "This heavy tome is full of cryptic scribbles and impossible diagrams. \ + According to legend, it can be deciphered to reveal the secrets of the veil between worlds." + icon = 'icons/obj/antags/eldritch.dmi' + base_icon_state = "book" + icon_state = "book" + w_class = WEIGHT_CLASS_SMALL + new_attack_chain = TRUE + /// Helps determine the icon state of this item when it's used on self. + var/book_open = FALSE + +/obj/item/codex_cicatrix/Initialize(mapload) + . = ..() + AddComponent(/datum/component/effect_remover, \ + success_feedback = "You remove %THEEFFECT.", \ + on_clear_callback = CALLBACK(src, PROC_REF(after_clear_rune)), \ + effects_we_clear = list(/obj/effect/heretic_rune)) + +/// Callback for effect_remover component after a rune is deleted +/obj/item/codex_cicatrix/proc/after_clear_rune(obj/effect/target, mob/living/user) + if(istype(target, /obj/effect/heretic_rune)) + var/obj/effect/heretic_rune/our_target = target + new /obj/effect/temp_visual/drawing_heretic_rune/fail(target.loc, our_target.greyscale_colours) + +/obj/item/codex_cicatrix/examine(mob/user) + . = ..() + if(!IS_HERETIC(user)) + return + + . += "Can be used to tap influences for additional knowledge points." + . += "Can also be used to draw or remove transmutation runes with ease." + . += "Additionally, it can work as a focus for your spells when held." + +/obj/item/codex_cicatrix/activate_self(mob/user) + if(..()) + return + + if(book_open) + close_animation() + RemoveElement(/datum/element/heretic_focus) + w_class = WEIGHT_CLASS_SMALL + else + open_animation() + AddElement(/datum/element/heretic_focus) + w_class = WEIGHT_CLASS_NORMAL + +/obj/item/codex_cicatrix/interact_with_atom(atom/interacting_with, mob/living/user, list/modifiers) + var/datum/antagonist/heretic/heretic_datum = IS_HERETIC(user) + if(!heretic_datum) + return NONE + if(isfloorturf(interacting_with)) + var/obj/effect/heretic_influence/influence = locate(/obj/effect/heretic_influence) in interacting_with + if(!influence?.drain_influence_with_codex(user, src)) + heretic_datum.try_draw_rune(user, interacting_with, drawing_time = 8 SECONDS) + return ITEM_INTERACT_COMPLETE + return NONE + +/// Plays a little animation that shows the book opening and closing. +/obj/item/codex_cicatrix/proc/open_animation() + icon_state = "[base_icon_state]_open" + flick("[base_icon_state]_opening", src) + book_open = TRUE + +/// Plays a closing animation and resets the icon state. +/obj/item/codex_cicatrix/proc/close_animation() + icon_state = base_icon_state + flick("[base_icon_state]_closing", src) + book_open = FALSE diff --git a/code/modules/antagonists/heretic/items/heretic_armor.dm b/code/modules/antagonists/heretic/items/heretic_armor.dm new file mode 100644 index 000000000000..17599e3ad29e --- /dev/null +++ b/code/modules/antagonists/heretic/items/heretic_armor.dm @@ -0,0 +1,141 @@ +// Eldritch armor. Looks cool, hood lets you cast heretic spells. +/obj/item/clothing/head/hooded/cult_hoodie/eldritch + name = "ominous hood" + icon_state = "eldritch" + desc = "A torn, dust-caked hood. Strange eyes line the inside." + flash_protect = FLASH_PROTECTION_WELDER + +/obj/item/clothing/head/hooded/cult_hoodie/eldritch/Initialize(mapload) + . = ..() + AddElement(/datum/element/heretic_focus) + +/obj/item/clothing/suit/hooded/cultrobes/eldritch + name = "ominous armor" + desc = "A ragged, dusty set of robes. Strange eyes line the inside." + icon_state = "eldritch_armor" + flags_inv = HIDESHOES|HIDEJUMPSUIT + allowed = list(/obj/item/melee/sickly_blade, /obj/item/gun/projectile/shotgun/boltaction/lionhunter) + hoodtype = /obj/item/clothing/head/hooded/cult_hoodie/eldritch + // Quite well armored, though not vs disablers + armor = list(MELEE = 50, BULLET = 40, LASER = 30, ENERGY = 10, BOMB = 15, RAD = 0, FIRE = 5, ACID = 20) + + +/obj/item/clothing/suit/hooded/cultrobes/eldritch/examine(mob/user) + . = ..() + if(!IS_HERETIC(user)) + return + + // Our hood gains the heretic_focus element. + . += "Allows you to cast heretic spells while the hood is up." + +// Void cloak. Turns invisible with the hood up, lets you hide stuff. +// To future coders, if we get atom storage, make it back into a hood again. + +/obj/item/clothing/suit/storage/void_cloak + name = "void cloak" + desc = "Black like tar, reflecting no light. Runic symbols line the outside. \ + With each flash you lose comprehension of what you are seeing." + icon_state = "void_cloak" + new_attack_chain = TRUE + flags_inv = NONE + body_parts_covered = UPPER_TORSO|LOWER_TORSO|ARMS|LEGS + // slightly worse than normal cult robes + armor = list(MELEE = 30, BULLET = 25, LASER = 20, ENERGY = 10, BOMB = 15, RAD = 0, FIRE = 5, ACID = 5) + actions_types = list(/datum/action/item_action/toggle) + pockets = /obj/item/storage/internal/void_cloak + /// Are we invisible? + var/cloak_invisible = FALSE + +/obj/item/clothing/suit/storage/void_cloak/Initialize(mapload) + . = ..() + make_visible() + // We have to overide the initalize from above + pockets.storage_slots = 3 //two slots + pockets.max_w_class = WEIGHT_CLASS_NORMAL + pockets.max_combined_w_class = 5 + +/obj/item/storage/internal/void_cloak + silent = TRUE //Sneaky cloak, sneaky storage + can_hold = list( + /obj/item/ammo_box/lionhunter, + /obj/item/heretic_labyrinth_handbook, + /obj/item/clothing/neck/eldritch_amulet, + /obj/item/clothing/neck/heretic_focus, + /obj/item/codex_cicatrix, + /obj/item/eldritch_potion, + /obj/item/food/grown/poppy, // Used to regain a Living Heart. + /obj/item/food/grown/harebell, // Used to reroll targets + /obj/item/melee/rune_carver, + /obj/item/melee/sickly_blade, + /obj/item/organ, // Organs are also often used in rituals. + /obj/item/reagent_containers/cup/beaker/eldritch, + /obj/item/stack/sheet/glass, // Glass is often used by moon heretics + ) + +/obj/item/clothing/suit/storage/void_cloak/equipped(mob/user, slot) + . = ..() + if(slot & ITEM_SLOT_OUTER_SUIT) + RegisterSignal(user, COMSIG_ITEM_EQUIPPED, PROC_REF(hide_item)) + RegisterSignal(user, COMSIG_ITEM_DROPPED, PROC_REF(show_item)) + +/obj/item/clothing/suit/storage/void_cloak/dropped(mob/user) + . = ..() + UnregisterSignal(user, list(COMSIG_ITEM_EQUIPPED, COMSIG_ITEM_DROPPED)) + +/obj/item/clothing/suit/storage/void_cloak/item_action_slot_check(slot, mob/user) + if(slot == ITEM_SLOT_OUTER_SUIT) //we only give the mob the ability to activate the vest if he's actually wearing it. + return TRUE + +/obj/item/clothing/suit/storage/void_cloak/activate_self(mob/user) + if(..()) + return + if(cloak_invisible) + make_visible() + else + make_invisible() + if(ishuman(loc)) + var/mob/living/carbon/human/C = loc + C.update_inv_wear_suit() + + +/obj/item/clothing/suit/storage/void_cloak/proc/hide_item(atom/movable/source, mob/equipper, slot) + SIGNAL_HANDLER + if(slot & ITEM_SLOT_SUIT_STORE) + ADD_TRAIT(source, TRAIT_SKIP_EXAMINE, UID()) + ADD_TRAIT(source, TRAIT_NO_STRIP, UID()) + +/obj/item/clothing/suit/storage/void_cloak/proc/show_item(atom/movable/source, mob/equipper, slot) + SIGNAL_HANDLER + REMOVE_TRAIT(source, TRAIT_NO_STRIP, UID()) + REMOVE_TRAIT(source, TRAIT_SKIP_EXAMINE, UID()) + +/obj/item/clothing/suit/storage/void_cloak/examine(mob/user) + . = ..() + if(!IS_HERETIC(user)) + return + + // Let examiners know this works as a focus only if the hood is down + . += "Allows you to cast heretic spells while the hood is down." + +/// Makes our cloak "invisible". Not the wearer, the cloak itself. +/obj/item/clothing/suit/storage/void_cloak/proc/make_invisible() + ADD_TRAIT(src, TRAIT_SKIP_EXAMINE, UID()) + ADD_TRAIT(src, TRAIT_NO_STRIP, UID()) + icon_state = "void_cloak_invisible" + cloak_invisible = TRUE + RemoveElement(/datum/element/heretic_focus) + + if(isliving(loc)) + REMOVE_TRAIT(loc, TRAIT_RESISTLOWPRESSURE, UID()) + loc.visible_message("Light shifts around [loc], making the cloak around them invisible!") + +/// Makes our cloak "visible" again. +/obj/item/clothing/suit/storage/void_cloak/proc/make_visible() + REMOVE_TRAIT(src, TRAIT_SKIP_EXAMINE, UID()) + REMOVE_TRAIT(src, TRAIT_NO_STRIP, UID()) + AddElement(/datum/element/heretic_focus) + icon_state = "void_cloak" + cloak_invisible = FALSE + if(isliving(loc)) + ADD_TRAIT(loc, TRAIT_RESISTLOWPRESSURE, UID()) + loc.visible_message("A kaleidoscope of colours collapses around [loc], a cloak appearing suddenly around their person!") diff --git a/code/modules/antagonists/heretic/items/heretic_blades.dm b/code/modules/antagonists/heretic/items/heretic_blades.dm new file mode 100644 index 000000000000..ce436e0e3fcd --- /dev/null +++ b/code/modules/antagonists/heretic/items/heretic_blades.dm @@ -0,0 +1,254 @@ + +/obj/item/melee/sickly_blade + name = "\improper sickly blade" + desc = "A sickly green crescent blade, decorated with an ornamental eye. You feel like you're being watched..." + icon = 'icons/obj/weapons/khopesh.dmi' + icon_state = "eldritch_blade" + item_state = "eldritch_blade" + lefthand_file = 'icons/mob/inhands/64x64_lefthand.dmi' + righthand_file = 'icons/mob/inhands/64x64_righthand.dmi' + inhand_x_dimension = 64 + inhand_y_dimension = 64 + slot_flags = ITEM_SLOT_BELT + sharp = TRUE + w_class = WEIGHT_CLASS_NORMAL + force = 20 + throwforce = 10 + toolspeed = 0.375 + hitsound = 'sound/weapons/bladeslice.ogg' + armour_penetration_percentage = 35 + attack_verb = list("attacks", "slashes", "slices", "tears", "lacerates", "rips", "dices", "rends") + needs_permit = TRUE + new_attack_chain = TRUE + var/after_use_message = "" + +/obj/item/melee/sickly_blade/examine(mob/user) + . = ..() + if(!check_usability(user)) + return + + . += "You can shatter the blade to teleport to a random, (mostly) safe location by activating it in-hand." + +/// Checks if the passed mob can use this blade without being stunned +/obj/item/melee/sickly_blade/proc/check_usability(mob/living/user) + return IS_HERETIC_OR_MONSTER(user) + +/obj/item/melee/sickly_blade/pre_attack(atom/target, mob/living/user, params) + if(..()) + return FINISH_ATTACK + if(!check_usability(user)) + to_chat(user, "You feel a pulse of alien intellect lash out at your mind!") + var/mob/living/carbon/human/human_user = user + human_user.Weaken(5 SECONDS) + return FINISH_ATTACK + + +/obj/item/melee/sickly_blade/activate_self(mob/user) + if(..()) + return + seek_safety(user) + +/// Attempts to teleport the passed mob to somewhere safe on the station, if they can use the blade. +/obj/item/melee/sickly_blade/proc/seek_safety(mob/user) + var/turf/safe_turf = find_safe_turf() + if(check_usability(user)) + if(do_teleport(user, safe_turf)) + to_chat(user, "As you shatter [src], you feel a gust of energy flow through your body. [after_use_message]") + else + to_chat(user, "You shatter [src], but your plea goes unanswered.") + else + to_chat(user,"You shatter [src].") + playsound(src, "shatter", 70, TRUE) //copied from the code for smashing a glass sheet onto the ground to turn it into a shard + qdel(src) + +/obj/item/melee/sickly_blade/after_attack(atom/target, mob/user, proximity_flag, click_parameters) + . = ..() + SEND_SIGNAL(user, COMSIG_HERETIC_BLADE_ATTACK, target, src) + +/obj/item/melee/sickly_blade/ranged_interact_with_atom(atom/interacting_with, mob/living/user, list/modifiers) + SEND_SIGNAL(user, COMSIG_HERETIC_RANGED_BLADE_ATTACK, interacting_with, src) + return ITEM_INTERACT_COMPLETE + +// Path of Rust's blade +/obj/item/melee/sickly_blade/rust + name = "\improper rusted blade" + desc = "This crescent blade is decrepit, wasting to rust. \ + Yet still it bites, ripping flesh and bone with jagged, rotten teeth." + icon_state = "rust_blade" + item_state = "rust_blade" + after_use_message = "The Rusted Hills hear your call..." + +// Path of Ash's blade +/obj/item/melee/sickly_blade/ash + name = "\improper ashen blade" + desc = "Molten and unwrought, a hunk of metal warped to cinders and slag. \ + Unmade, it aspires to be more than it is, and shears soot-filled wounds with a blunt edge." + icon_state = "ash_blade" + item_state = "ash_blade" + after_use_message = "The Nightwatcher hears your call..." + resistance_flags = FIRE_PROOF + +// Path of Flesh's blade +/obj/item/melee/sickly_blade/flesh + name = "\improper bloody blade" + desc = "A crescent blade born from a fleshwarped creature. \ + Keenly aware, it seeks to spread to others the suffering it has endured from its dreadful origins." + icon_state = "flesh_blade" + item_state = "flesh_blade" + after_use_message = "The Marshal hears your call..." + +// Path of Void's blade +/obj/item/melee/sickly_blade/void + name = "\improper void blade" + desc = "Devoid of any substance, this blade reflects nothingness. \ + It is a real depiction of purity, and chaos that ensues after its implementation." + icon_state = "void_blade" + item_state = "void_blade" + after_use_message = "The Aristocrat hears your call..." + +// Path of the Blade's... blade. +// Opting for /dark instead of /blade to avoid "sickly_blade/blade". +/obj/item/melee/sickly_blade/dark + name = "\improper sundered blade" + desc = "A galliant blade, sundered and torn. \ + Furiously, the blade cuts. Silver scars bind it forever to its dark purpose." + icon_state = "dark_blade" + base_icon_state = "dark_blade" + item_state = "dark_blade" + after_use_message = "The Torn Champion hears your call..." + ///If our blade is currently infused with the mansus grasp + var/infused = FALSE + +/obj/item/melee/sickly_blade/dark/after_attack(atom/target, mob/user, proximity_flag, click_parameters) + . = ..() + if(!proximity_flag) + return + if(!infused || target == user || !isliving(target)) + return + var/datum/antagonist/heretic/heretic_datum = IS_HERETIC(user) + var/mob/living/living_target = target + if(!heretic_datum) + return + + //Apply our heretic mark + var/datum/heretic_knowledge/mark/blade_mark/mark_to_apply = heretic_datum.get_knowledge(/datum/heretic_knowledge/mark/blade_mark) + if(!mark_to_apply) + return + mark_to_apply.create_mark(user, living_target) + + //Remove the infusion from any blades we own (and update their sprite) + for(var/obj/item/melee/sickly_blade/dark/to_infuse in user.get_contents()) + to_infuse.infused = FALSE + to_infuse.update_appearance(UPDATE_ICON) + user.update_inv_l_hand() + user.update_inv_r_hand() + + if(!check_behind(user, living_target)) + return + // We're officially behind them, apply effects + living_target.Weaken(1.5 SECONDS) + living_target.apply_damage(10, BRUTE) + playsound(living_target, 'sound/weapons/guillotine.ogg', 100, TRUE) + +/obj/item/melee/sickly_blade/dark/dropped(mob/user, silent) + . = ..() + if(infused) + infused = FALSE + update_appearance(UPDATE_ICON) + +/obj/item/melee/sickly_blade/dark/update_icon_state() + . = ..() + if(infused) + icon_state = base_icon_state + "_infused" + item_state = base_icon_state + "_infused" + else + icon_state = base_icon_state + item_state = base_icon_state + +// Path of Cosmos's blade +/obj/item/melee/sickly_blade/cosmic + name = "\improper cosmic blade" + desc = "A mote of celestial resonance, shaped into a star-woven blade. \ + An iridescent exile, carving radiant trails, desperately seeking unification." + icon_state = "cosmic_blade" + item_state = "cosmic_blade" + after_use_message = "The Stargazer hears your call..." + +// Path of Knock's blade +/obj/item/melee/sickly_blade/lock + name = "\improper key blade" + desc = "A blade and a key, a key to what? \ + What grand gates does it open?" + icon_state = "key_blade" + item_state = "key_blade" + after_use_message = "The Stewards hear your call..." + tool_behaviour = TOOL_CROWBAR + usesound = 'sound/items/crowbar.ogg' //Maybe something else? + toolspeed = 1.3 + +// Path of Moon's blade +/obj/item/melee/sickly_blade/moon + name = "\improper moon blade" + desc = "A blade of iron, reflecting the truth of the earth: All join the troupe one day. \ + A troupe bringing joy, carving smiles on their faces if they want one or not." + icon_state = "moon_blade" + item_state = "moon_blade" + after_use_message = "The Moon hears your call..." + +// Path of Nar'Sie's blade +// What!? This blade is given to cultists as an altar item when they sacrifice a heretic. +// It is also given to the heretic themself if they sacrifice a cultist. +/obj/item/melee/sickly_blade/cursed + name = "\improper cursed blade" + desc = "A dark blade, cursed to bleed forever. In constant struggle between the eldritch and the dark, it is forced to accept any wielder as its master. \ + Its eye's cornea drips blood endlessly into the ground, yet its piercing gaze remains on you. Cultists can scribe runes faster with it." + force = 25 + throwforce = 15 + icon_state = "cursed_blade" + item_state = "cursed_blade" + toolspeed = 0.5 + +/obj/item/melee/sickly_blade/cursed/Initialize(mapload) + . = ..() + AddComponent(/datum/component/parry, _stamina_constant = 2, _stamina_coefficient = 0.5, _parryable_attack_types = ALL_ATTACK_TYPES) + +/obj/item/melee/sickly_blade/cursed/check_usability(mob/living/user) + if(IS_HERETIC_OR_MONSTER(user) || IS_CULTIST(user)) + return TRUE + if(prob(15)) + to_chat(user, "") + user.apply_damage(5, BURN, user.get_active_hand()) + playsound(src, 'sound/weapons/sear.ogg', 25, TRUE) + to_chat(user, "Your hand sizzles.") // Nar nar might not care but their essence still doesn't like you + else if(prob(15)) + to_chat(user, "LW'NAFH'NAHOR UH'ENAH'YMG EPGOKA AH NAFL MGEMPGAH'EHYE") + to_chat(user, "Horrible, unintelligible utterances flood your mind!") + user.adjustBrainLoss(15) // This can kill you if you ignore it + return TRUE + +/obj/item/melee/sickly_blade/cursed/equipped(mob/user, slot) + . = ..() + if(IS_HERETIC_OR_MONSTER(user)) + after_use_message = "The Mansus hears your call..." + else if(IS_CULTIST(user)) + after_use_message = "Nar'Sie hears your call..." + else + after_use_message = null + +/obj/item/melee/sickly_blade/cursed/interact_with_atom(atom/target, mob/living/user, list/modifiers) + . = ..() + + var/datum/antagonist/heretic/heretic_datum = IS_HERETIC(user) + if(!heretic_datum) + return NONE + + // Can only carve runes with it if off combat mode. + if(isfloorturf(target) && user.a_intent == INTENT_HELP) + heretic_datum.try_draw_rune(user, target, drawing_time = 8 SECONDS) + return ITEM_INTERACT_COMPLETE + return NONE + +/obj/item/melee/sickly_blade/cursed/AltClick(mob/user) + . = ..() + if(IS_CULTIST(user)) + scribe_rune(user) diff --git a/code/modules/antagonists/heretic/items/heretic_necks.dm b/code/modules/antagonists/heretic/items/heretic_necks.dm new file mode 100644 index 000000000000..3e83ecc8e066 --- /dev/null +++ b/code/modules/antagonists/heretic/items/heretic_necks.dm @@ -0,0 +1,166 @@ +/obj/item/clothing/neck/heretic_focus + name = "amber focus" + desc = "An amber focusing glass that provides a link to the world beyond. The necklace seems to twitch, but only when you look at it from the corner of your eye." + icon_state = "eldritch_necklace" + w_class = WEIGHT_CLASS_SMALL + resistance_flags = FIRE_PROOF + new_attack_chain = TRUE + +/obj/item/clothing/neck/heretic_focus/Initialize(mapload) + . = ..() + AddElement(/datum/element/heretic_focus) + +/obj/item/clothing/neck/heretic_focus/crimson_medallion + name = "crimson medallion" + desc = "A blood-red focusing glass that provides a link to the world beyond, and worse. Its eye is constantly twitching and gazing in all directions. It almost seems to be silently screaming..." + icon_state = "crimson_medallion" + /// The aura healing component. Used to delete it when taken off. + var/datum/component/component + /// If active or not, used to add and remove its cult and heretic buffs. + var/active = FALSE + +/obj/item/clothing/neck/heretic_focus/crimson_medallion/equipped(mob/living/user, slot) + . = ..() + if(!(slot & ITEM_SLOT_NECK)) + return + + if(IS_CULTIST(user)) + var/datum/action/innate/cult/blood_magic/magic_holder = locate() in user.actions + magic_holder.magic_enhanced = TRUE + else if(IS_HERETIC_OR_MONSTER(user) && !active) + for(var/datum/spell/spell_action in user.mob_spell_list) + spell_action.cooldown_handler.recharge_duration *= 0.5 + active = TRUE + + ADD_TRAIT(user, TRAIT_MANSUS_TOUCHED, UID(src)) + to_chat(user, "Your heart takes on a strange yet soothing irregular rhythm, and your blood feels significantly less viscous than it used to be. You're not sure if that's a good thing.") + // AOE healing here + +/obj/item/clothing/neck/heretic_focus/crimson_medallion/dropped(mob/living/user) + . = ..() + + if(!istype(user)) + return + + if(HAS_TRAIT_FROM(user, TRAIT_MANSUS_TOUCHED, UID(src))) + to_chat(user, "Your heart and blood return to their regular old rhythm and flow.") + + if(IS_HERETIC_OR_MONSTER(user) && active) + for(var/datum/spell/spell_action in user.mob_spell_list) + spell_action.cooldown_handler.recharge_duration *= 2 + active = FALSE + QDEL_NULL(component) + REMOVE_TRAIT(user, TRAIT_MANSUS_TOUCHED, UID(src)) + + // If boosted enable is set, to prevent false dropped() calls from repeatedly nuking the max spells. + var/datum/action/innate/cult/blood_magic/magic_holder = locate() in user.actions + // Remove the last spell if over new limit, as we will reduce our max spell amount. Done beforehand as it causes a index out of bounds runtime otherwise. + if(magic_holder?.magic_enhanced) + QDEL_NULL(magic_holder.spells[ENHANCED_BLOODCHARGE]) + magic_holder?.magic_enhanced = FALSE + + +/obj/item/clothing/neck/heretic_focus/crimson_medallion/activate_self(mob/user) + if(..() || !isliving(user)) + return + var/mob/living/our_user = user + to_chat(our_user, "You start tightly squeezing [src]...") + if(!do_after(user, 1.25 SECONDS, src)) + return + to_chat(our_user, "[src] explodes into a shower of gore and blood, drenching your arm. You can feel the blood seeping into your skin. You inmediately feel better, but soon, the feeling turns hollow as your veins itch.") + new /obj/effect/gibspawner/generic(get_turf(src)) + var/heal_amt = our_user.adjustBruteLoss(-50) + our_user.adjustFireLoss( -(50 - abs(heal_amt)) ) // no double dipping + + // I want it to poison the user but I also think it'd be neat if they got their juice as well. But that cancels most of the damage out. So I dunno. + our_user.reagents?.add_reagent("unholywater", rand(6, 10)) + our_user.reagents?.add_reagent("eldritch", rand(6, 10)) + qdel(src) + +/obj/item/clothing/neck/heretic_focus/crimson_medallion/examine(mob/user) + . = ..() + + var/magic_dude + if(IS_CULTIST(user)) + . += "This focus will allow you to store one extra spell and halve the empowering time, alongside providing a small regenerative effect." + magic_dude = TRUE + if(IS_HERETIC_OR_MONSTER(user)) + . += "This focus will halve your spell cooldowns, alongside granting a small regenerative effect to any nearby heretics or monsters, including you." + magic_dude = TRUE + + if(magic_dude) + . += "You can also squeeze it to recover a large amount of health quickly, at a cost..." + +/obj/item/clothing/neck/eldritch_amulet + name = "warm eldritch medallion" + desc = "A strange medallion. Peering through the crystalline surface, the world around you melts away. You see your own beating heart, and the pulsing of a thousand others." + icon = 'icons/obj/antags/eldritch.dmi' + icon_state = "eye_medalion" + w_class = WEIGHT_CLASS_SMALL + resistance_flags = FIRE_PROOF | UNACIDABLE | ACID_PROOF + /// A secondary clothing trait only applied to heretics. + var/heretic_only_trait = TRAIT_THERMAL_VISION + +/obj/item/clothing/neck/eldritch_amulet/Initialize(mapload) + . = ..() + AddElement(/datum/element/heretic_focus) + +/obj/item/clothing/neck/eldritch_amulet/equipped(mob/user, slot) + . = ..() + if(!(slot & ITEM_SLOT_NECK)) + return + if(!ishuman(user) || !IS_HERETIC_OR_MONSTER(user)) + return + + ADD_TRAIT(user, heretic_only_trait, "[CLOTHING_TRAIT]_[UID(src)]") + user.update_sight() + +/obj/item/clothing/neck/eldritch_amulet/dropped(mob/user) + . = ..() + REMOVE_TRAIT(user, heretic_only_trait, "[CLOTHING_TRAIT]_[UID(src)]") + user.update_sight() + +/obj/item/clothing/neck/eldritch_amulet/piercing + name = "piercing eldritch medallion" + desc = "A strange medallion. Peering through the crystalline surface, the light refracts into new and terrifying spectrums of color. You see yourself, reflected off cascading mirrors, warped into impossible shapes." + heretic_only_trait = TRAIT_XRAY_VISION + +// Cosmetic-only version +/obj/item/clothing/neck/fake_heretic_amulet + name = "religious icon" + desc = "A strange medallion, which makes its wearer look like they're part of some cult." + icon = 'icons/obj/antags/eldritch.dmi' + icon_state = "eye_medalion" + w_class = WEIGHT_CLASS_SMALL + + +// The amulet conversion tool used by moon heretics +/obj/item/clothing/neck/heretic_focus/moon_amulet + name = "moonlight amulet" + desc = "A piece of the mind, the soul and the moon. Gazing into it makes your head spin and hear whispers of laughter and joy." + icon = 'icons/obj/antags/eldritch.dmi' + icon_state = "moon_amulette" + w_class = WEIGHT_CLASS_SMALL + // How much brain damage does this item do? + var/brain_damage = 5 + +/obj/item/clothing/neck/heretic_focus/moon_amulet/attack(mob/living/target, mob/living/user, params) + if(!ishuman(target)) + return . = ..() + var/mob/living/carbon/human/hit = target + if(!IS_HERETIC_OR_MONSTER(user)) + to_chat(user, "You feel a presence watching you!") + user.adjustBrainLoss(30) + return + if(hit.can_block_magic(MAGIC_RESISTANCE|MAGIC_RESISTANCE_MIND)) + return + if(hit.getBrainLoss() < 80) + to_chat(user, "Their mind is too strong!") + hit.adjustBrainLoss(brain_damage) + else + to_chat(user, "Their mind has bent to see the truth!") + hit.apply_status_effect(/datum/status_effect/moon_converted) + add_attack_logs(user, target, "[target] was driven insane by [user]([src])") + log_game("[target] was driven insane by [user]") + + . = ..() diff --git a/code/modules/antagonists/heretic/items/hunter_rifle.dm b/code/modules/antagonists/heretic/items/hunter_rifle.dm new file mode 100644 index 000000000000..72b565d9e9fa --- /dev/null +++ b/code/modules/antagonists/heretic/items/hunter_rifle.dm @@ -0,0 +1,200 @@ +/// The max range we can zoom in on people from. +#define MAX_LIONHUNTER_RANGE 30 + +// The Lionhunter, a gun for heretics +// The ammo it uses takes time to "charge" before firing, +// releasing a homing, very damaging projectile +/obj/item/gun/projectile/shotgun/boltaction/lionhunter + name = "\improper Lionhunter's Rifle" + desc = "An antique looking rifle that looks immaculate despite being clearly very old." + icon = 'icons/obj/weapons/wide_guns.dmi' + slot_flags = ITEM_SLOT_BACK + icon_state = "lionhunter" + item_state = "lionhunter" + mag_type = /obj/item/ammo_box/magazine/internal/boltaction/lionhunter + fire_sound = 'sound/weapons/gunshots/gunshot_sniper.ogg' + pixel_x = -8 + +/obj/item/gun/projectile/shotgun/boltaction/lionhunter/process_fire(atom/target, mob/living/user, message, params, zone_override, bonus_spread) + . = ..() + SEND_SIGNAL(src, COMSIG_LIONHUNTER_FIRE) + +/obj/item/gun/projectile/shotgun/boltaction/lionhunter/Initialize(mapload) + . = ..() + AddComponent(/datum/component/scope, range_modifier = 3.2, flags = SCOPE_TURF_ONLY | SCOPE_NEED_ACTIVE_HAND) + +/obj/item/ammo_box/magazine/internal/boltaction/lionhunter + name = "lionhunter rifle internal magazine" + icon_state = "310_strip" + ammo_type = /obj/item/ammo_casing/lionhunter + caliber = "a762-H" + max_ammo = 3 + multiload = TRUE + multi_sprite_step = 1 + +/obj/item/ammo_casing/lionhunter + icon_state = "310-casing" + caliber = "a762-H" + projectile_type = /obj/item/projectile/homing/lionhunter + /// Whether we're currently aiming this casing at something + var/currently_aiming = FALSE + /// How many seconds it takes to aim per tile of distance between the target + var/seconds_per_distance = 0.2 SECONDS + /// The minimum distance required to gain a damage bonus from aiming + var/min_distance = 4 + +/obj/item/ammo_casing/lionhunter/fire(atom/target, mob/living/user, params, distro, quiet, zone_override = "", spread, atom/firer_source_atom) + if(!BB) + return + if(!check_fire(target, user)) + return + return ..() + +/// Checks if we can successfully fire our projectile. +/obj/item/ammo_casing/lionhunter/proc/check_fire(atom/target, mob/living/user) + // In case someone puts this in turrets or something wacky, just fire like normal + if(!iscarbon(user) || !istype(loc, /obj/item/ammo_box/magazine/internal/boltaction/lionhunter)) + return TRUE + + if(currently_aiming) + to_chat(user, "You are already aiming!") + return FALSE + + var/distance = get_dist(user, target) + if(target.z != user.z || distance > MAX_LIONHUNTER_RANGE) + return FALSE + + var/fire_time = min(distance * seconds_per_distance, 10 SECONDS) + + if(distance <= min_distance || !isliving(target)) + return TRUE + + to_chat(user, "Taking aim...") + user.playsound_local(get_turf(user), 'sound/weapons/gun_interactions/rifle_load.ogg', 100, TRUE) + + var/image/reticle = image( + icon = 'icons/mob/actions/actions.dmi', + icon_state = "sniper_zoom", + layer = ABOVE_MOB_LAYER, + loc = target, + ) + reticle.alpha = 0 + + var/list/mob/viewers = viewers(target) + // The shooter might be out of view, but they should be included + viewers |= user + + for(var/mob/viewer as anything in viewers) + viewer.client?.images |= reticle + + // Animate the fade in + animate(reticle, fire_time * 0.5, alpha = 255, transform = turn(reticle.transform, 180)) + animate(reticle, fire_time * 0.5, transform = turn(reticle.transform, 180)) + + currently_aiming = TRUE + var/output = do_after(user, fire_time, target = target, extra_checks = list(CALLBACK(src, PROC_REF(check_fire_callback), target, user)), allow_moving_target = TRUE) + animate(reticle, 0.5 SECONDS, alpha = 0) + for(var/mob/viewer as anything in viewers) + viewer.client?.images -= reticle + if(!output) + currently_aiming = FALSE + to_chat(user, "You were interrupted!") + return FALSE + + return TRUE + +/// Callback for the do_after within the check_fire proc to see if something will prevent us from firing while aiming +/obj/item/ammo_casing/lionhunter/proc/check_fire_callback(mob/living/target, mob/living/user) + if(!isturf(target.loc)) + return TRUE + + return FALSE + +/obj/item/ammo_casing/lionhunter/ready_proj(atom/target, mob/living/user, quiet, zone_override, atom/fired_from) + if(!BB) + return + + var/distance = get_dist(user, target) + // If we're close range, or the target's not a living, OR for some reason a non-carbon is firing the gun + // The projectile is dry-fired, and gains no buffs + // BUT, if we're at a decent range and the target's a living mob, + // the projectile's been channel fired. It has full effects and homes in. + if(distance > min_distance && isliving(target) && iscarbon(user)) + BB.stamina *= 2 + BB.knockdown = 0.5 SECONDS + BB.stutter = 6 SECONDS + BB.forcedodge = -1 + BB.armour_penetration_flat = 100 //No parrying this bad boy + if(istype(BB, /obj/item/projectile/homing/lionhunter)) + var/obj/item/projectile/homing/lionhunter/if_an_admin_var_edits_another_projectile_inside_an_ammo_casing_ill_be_very_mad = BB + if_an_admin_var_edits_another_projectile_inside_an_ammo_casing_ill_be_very_mad.homing_active = TRUE + + return ..() + +/obj/item/projectile/homing/lionhunter + name = "hunter's .310 bullet" + // These stats are only applied if the weapon is fired unscoped + // If fired without aiming or at someone too close, it will do this much + damage = 30 + stamina = 30 + homing_active = FALSE + ///The mob that is currently inside the bullet + var/mob/stored_mob + +/obj/item/projectile/homing/lionhunter/fire(angle, atom/direct_target) + . = ..() + if(QDELETED(src) || !isliving(firer) || !isliving(original)) + return + var/mob/living/living_firer = firer + if(IS_HERETIC(living_firer)) + living_firer.forceMove(src) + stored_mob = living_firer + + +/obj/item/projectile/homing/lionhunter/Exited(atom/movable/gone) + if(gone == stored_mob) + stored_mob = null + return ..() + +/obj/item/projectile/homing/lionhunter/on_range() + stored_mob?.forceMove(loc) + return ..() + +/obj/item/projectile/homing/lionhunter/on_hit(atom/target, blocked, pierce_hit) + . = ..() + if(target != original) + return + stored_mob?.forceMove(loc) //Pretty important to get our mob out of the bullet once we hit our target + var/mob/living/victim = target + var/mob/firing_mob = firer + if(IS_HERETIC_OR_MONSTER(victim) || !IS_HERETIC(firing_mob)) + qdel(src) + return + + SEND_SIGNAL(firer, COMSIG_LIONHUNTER_ON_HIT, victim) + qdel(src) + return + +/obj/item/projectile/homing/lionhunter/Destroy() + if(stored_mob) + stack_trace("Lionhunter bullet qdel'd with its firer still inside!") + stored_mob.forceMove(loc) + return ..() + +// Extra ammunition can be made with a heretic ritual. +/obj/item/ammo_box/lionhunter + name = "stripper clip (.310 hunter)" + desc = "A stripper clip of mysterious, atypical ammo. It doesn't fit into normal ballistic rifles." + icon_state = "310_strip" + ammo_type = /obj/item/ammo_casing/lionhunter + max_ammo = 3 + multi_sprite_step = 1 + +/obj/effect/temp_visual/bullet_target + icon = 'icons/mob/actions/actions.dmi' + icon_state = "sniper_zoom" + layer = BELOW_MOB_LAYER + plane = GAME_PLANE + light_range = 2 + +#undef MAX_LIONHUNTER_RANGE diff --git a/code/modules/antagonists/heretic/items/keyring.dm b/code/modules/antagonists/heretic/items/keyring.dm new file mode 100644 index 000000000000..5fe770a828ae --- /dev/null +++ b/code/modules/antagonists/heretic/items/keyring.dm @@ -0,0 +1,221 @@ +/obj/effect/lock_portal + name = "crack in reality" + desc = "A crack in space, impossibly deep and painful to the eyes. Definitely not safe." + icon = 'icons/effects/eldritch.dmi' + icon_state = "realitycrack" + light_power = 1 + light_color = COLOR_GREEN + light_range = 3 + opacity = TRUE + density = FALSE //so we dont block doors closing + layer = OBJ_LAYER //under doors + ///The knock portal we teleport to + var/obj/effect/lock_portal/destination + ///The airlock we are linked to, we delete if it is destroyed + var/obj/machinery/door/our_airlock + /// if true the heretic is teleported to a random airlock, nonheretics are sent to the target + var/inverted = FALSE + +/obj/effect/lock_portal/Initialize(mapload, target, invert = FALSE) + . = ..() + if(target) + our_airlock = target + RegisterSignal(target, COMSIG_PARENT_QDELETING, PROC_REF(delete_on_door_delete)) + + var/static/list/loc_connections = list( + COMSIG_ATOM_ENTERED = PROC_REF(on_entered), + ) + AddElement(/datum/element/connect_loc, loc_connections) + inverted = invert + +///Deletes us and our destination portal if our_airlock is destroyed +/obj/effect/lock_portal/proc/delete_on_door_delete(datum/source) + SIGNAL_HANDLER + qdel(src) + +///Signal handler for when our location is entered, calls teleport on the victim, if their old_loc didnt contain a portal already (to prevent loops) +/obj/effect/lock_portal/proc/on_entered(datum/source, mob/living/loser, atom/old_loc) + SIGNAL_HANDLER + if(istype(loser) && !(locate(type) in old_loc)) + teleport(loser) + +/obj/effect/lock_portal/Destroy() + if(!isnull(destination) && !QDELING(destination)) + QDEL_NULL(destination) + + destination = null + our_airlock = null + return ..() + +///Teleports the teleportee, to a random airlock if the teleportee isnt a heretic, or the other portal if they are one +/obj/effect/lock_portal/proc/teleport(mob/living/teleportee) + if(isnull(destination)) //dumbass + qdel(src) + return + + if(!is_teleport_allowed(destination.z) || !is_teleport_allowed(z)) + qdel(src) + return + + //get it? + var/obj/machinery/door/doorstination = (inverted ? !IS_HERETIC_OR_MONSTER(teleportee) : IS_HERETIC_OR_MONSTER(teleportee)) ? destination.our_airlock : find_random_airlock() + if(SEND_SIGNAL(teleportee, COMSIG_MOVABLE_TELEPORTING, get_turf(doorstination)) & COMPONENT_BLOCK_TELEPORT) + return FALSE + teleportee.forceMove(get_turf(doorstination)) + + teleportee.client?.move_delay = 0 //make moving through smoother + + if(!IS_HERETIC_OR_MONSTER(teleportee)) + teleportee.apply_damage(20, BRUTE) //so they dont roll it like a jackpot machine to see if they can land in the armory + to_chat(teleportee, "You stumble through [src], battered by forces beyond your comprehension, landing anywhere but where you thought you were going.") + + INVOKE_ASYNC(src, PROC_REF(async_opendoor), doorstination) + +///Returns a random airlock on the same Z level as our portal, that isnt our airlock +/obj/effect/lock_portal/proc/find_random_airlock() + var/list/turf/possible_destinations = list() + for(var/obj/machinery/door/airlock/ourlock in GLOB.airlocks) + if(ourlock.z != z) + continue + if(ourlock.loc == loc) + continue + var/area/airlock_area = get_area(ourlock) + if(airlock_area.tele_proof) + continue + possible_destinations += ourlock + return pick(possible_destinations) + +///Asynchronous proc to unbolt, then open the passed door +/obj/effect/lock_portal/proc/async_opendoor(obj/machinery/door/door) + if(istype(door, /obj/machinery/door/airlock)) //they can create portals on ANY door, but we should unlock airlocks so they can actually open + var/obj/machinery/door/airlock/as_airlock = door + as_airlock.unlock(TRUE) + door.open() + +///An ID card capable of shapeshifting to other IDs given by the Key Keepers Burden knowledge +/obj/item/card/id/heretic + ///List of IDs this card consumed + var/list/obj/item/card/id/fused_ids = list() + ///The first portal in the portal pair, so we can clear it later + var/obj/effect/lock_portal/portal_one + ///The second portal in the portal pair, so we can clear it later + var/obj/effect/lock_portal/portal_two + ///The first door we are linking in the pair, so we can create a portal pair + var/link + /// are our created portals inverted? (heretics get sent to a random airlock, crew get sent to the target) + var/inverted = FALSE + can_id_flash = FALSE + +/obj/item/card/id/heretic/examine(mob/user) + . = ..() + if(!IS_HERETIC_OR_MONSTER(user)) + return + . += "Enchanted by the Mansus!" + . += "Using an ID on this or using this ID on another ID will consume it and allow you to copy its accesses." + . += "Using this in-hand allows you to change its appearance." + . += "Using this on a pair of doors, allows you to link them together. Entering one door will transport you to the other, while heathens are instead teleported to a random airlock." + . += "Ctrl-clicking the ID, makes the ID make inverted portals instead, which teleport you onto a random airlock onstation, while heathens are teleported to the destination." + +/obj/item/card/id/heretic/activate_self(mob/user) + if(..()) + return + if(!IS_HERETIC(user)) + return flash_card() + var/cardname = tgui_input_list(user, "Shapeshift into?", "Shapeshift", fused_ids) + if(!cardname) + to_chat(user, "There is no ID to shapeshift into!") + return ..() + var/obj/item/card/id/card = fused_ids[cardname] + shapeshift(card) + +/obj/item/card/id/heretic/CtrlClick(mob/user) + . = ..() + if(loc != user) // Not being held + return + if(!IS_HERETIC(user)) + return + inverted = !inverted + to_chat(user, "[inverted ? "now" : "no longer"] creating inverted rifts.") + +///Changes our appearance to the passed ID card +/obj/item/card/id/heretic/proc/shapeshift(obj/item/card/id/card) + icon_state = card.icon_state + assignment = card.assignment + age = card.age + sex = card.sex + registered_name = card.registered_name + name = card.name + update_icon() + //Qwertodo: not done here + +///Deletes and nulls our portal pair +/obj/item/card/id/heretic/proc/clear_portals() + QDEL_NULL(portal_one) + QDEL_NULL(portal_two) + +///Clears portal references +/obj/item/card/id/heretic/proc/clear_portal_refs() + SIGNAL_HANDLER + portal_one = null + portal_two = null + +///Creates a portal pair at door1 and door2, displays a balloon alert to user +/obj/item/card/id/heretic/proc/make_portal(mob/user, obj/machinery/door/door1, obj/machinery/door/door2) + var/message = "Door linked" + if(portal_one || portal_two) + clear_portals() + message += ", previous cleared" + + portal_one = new(get_turf(door2), door2, inverted) + portal_two = new(get_turf(door1), door1, inverted) + portal_one.destination = portal_two + RegisterSignal(portal_one, COMSIG_PARENT_QDELETING, PROC_REF(clear_portal_refs)) //we only really need to register one because they already qdel both portals if one is destroyed + portal_two.destination = portal_one + to_chat(user, "[message].") + +/obj/item/card/id/heretic/item_interaction(mob/living/user, obj/item/tool, list/modifiers) + if(!istype(tool, /obj/item/card/id) || !IS_HERETIC(user)) + return ..() + eat_card(tool, user) + return ITEM_INTERACT_COMPLETE + +/obj/item/card/id/heretic/proc/eat_card(obj/item/card/id/card, mob/user) + if(card == src) + return //no self vore + fused_ids[card.name] = card + card.moveToNullspace() + playsound(drop_location(), 'sound/items/eatfood.ogg', rand(10,30), TRUE) + access += card.access + +/obj/item/card/id/heretic/interact_with_atom(atom/target, mob/living/user, list/modifiers) + if(!IS_HERETIC(user)) + return NONE + if(istype(target, /obj/item/card/id)) + eat_card(target, user) + return ITEM_INTERACT_COMPLETE + if(istype(target, /obj/effect/lock_portal)) + clear_portals() + return ITEM_INTERACT_COMPLETE + if(!istype(target, /obj/machinery/door)) + return NONE + if(!is_teleport_allowed(z)) + return NONE + var/reference_resolved = locateUID(link) + if(reference_resolved == target) + return ITEM_INTERACT_COMPLETE + + if(reference_resolved) + make_portal(user, reference_resolved, target) + to_chat(user, "You use [src], to link [reference_resolved] and [target] together.") + link = null + to_chat(user, "Link 2/2.") + else + link = target.UID() + to_chat(user, "Link 1/2.") + return ITEM_INTERACT_COMPLETE + +/obj/item/card/id/heretic/Destroy() + QDEL_LIST_ASSOC(fused_ids) + link = null + clear_portals() + return ..() diff --git a/code/modules/antagonists/heretic/items/labyrinth_handbook.dm b/code/modules/antagonists/heretic/items/labyrinth_handbook.dm new file mode 100644 index 000000000000..0a17be6a16f0 --- /dev/null +++ b/code/modules/antagonists/heretic/items/labyrinth_handbook.dm @@ -0,0 +1,77 @@ +/obj/effect/forcefield/wizard/heretic + name = "labyrinth pages" + desc = "A field of papers flying in the air, repulsing heathens with impossible force." + icon_state = "lintel" + lifetime = 10 SECONDS + +/obj/effect/forcefield/wizard/heretic/Bumped(mob/living/bumpee) + . = ..() + if(!istype(bumpee) || IS_HERETIC_OR_MONSTER(bumpee)) + return + var/throwtarget = get_edge_target_turf(loc, get_dir(loc, get_step_away(bumpee, loc))) + bumpee.throw_at(throwtarget, 10, 1) + visible_message("[src] repulses [bumpee] in a storm of paper!") + +///A heretic item that spawns a barrier at the clicked turf, 3 uses +/obj/item/heretic_labyrinth_handbook + name = "labyrinth handbook" + desc = "A book containing the laws and regulations of the Locked Labyrinth, penned on an unknown substance. Its pages squirm and strain, looking to lash out and escape." + icon = 'icons/obj/library.dmi' + icon_state = "heretichandbook" + force = 10 + damtype = BURN + throw_speed = 1 + throw_range = 5 + w_class = WEIGHT_CLASS_NORMAL + attack_verb = list("bashes", "curses") + resistance_flags = FLAMMABLE + drop_sound = 'sound/items/handling/book_drop.ogg' + pickup_sound = 'sound/items/handling/book_pickup.ogg' + new_attack_chain = TRUE + ///what type of barrier do we spawn when used + var/barrier_type = /obj/effect/forcefield/wizard/heretic + ///how many uses do we have left + var/uses = 3 + +/obj/item/heretic_labyrinth_handbook/examine(mob/user) + . = ..() + if(!IS_HERETIC_OR_MONSTER(user)) + return + . += "Materializes a barrier upon any tile in sight, which only you can pass through. Lasts 8 seconds." + . += "It has [uses] uses left." + +/obj/item/heretic_labyrinth_handbook/ranged_interact_with_atom(atom/target, mob/living/user, list/modifiers) + if(!IS_HERETIC(user)) + if(ishuman(user)) + var/mob/living/carbon/human/human_user = user + to_chat(human_user, "Your mind burns as you stare deep into the book, a headache setting in like your brain is on fire!") + human_user.adjustBrainLoss(30) + human_user.drop_item() + return ITEM_INTERACT_COMPLETE + + var/turf/turf_target = get_turf(target) + if(locate(barrier_type) in turf_target) + to_chat(user, "This turf already has a barrier!") + return ITEM_INTERACT_COMPLETE + turf_target.visible_message("A storm of paper materializes!") + new /obj/effect/temp_visual/paper_scatter(turf_target) + playsound(turf_target, 'sound/magic/smoke.ogg', 30) + new barrier_type(turf_target, user) + uses-- + if(uses <= 0) + to_chat(user, "[src] falls apart, turning into ash and dust!") + qdel(src) + return ITEM_INTERACT_COMPLETE + + +//fancy effects +/obj/effect/temp_visual/paper_scatter + name = "scattering paper" + desc = "Pieces of paper scattering to the wind." + layer = ABOVE_NORMAL_TURF_LAYER + plane = GAME_PLANE + icon = 'icons/effects/effects.dmi' + icon_state = "paper_scatter" + anchored = TRUE + duration = 0.5 SECONDS + randomdir = FALSE diff --git a/code/modules/antagonists/heretic/items/madness_mask.dm b/code/modules/antagonists/heretic/items/madness_mask.dm new file mode 100644 index 000000000000..fe3dcf0e8802 --- /dev/null +++ b/code/modules/antagonists/heretic/items/madness_mask.dm @@ -0,0 +1,75 @@ +// The spooky "void" / "abyssal" / "madness" mask for heretics. +/obj/item/clothing/mask/madness_mask + name = "abyssal mask" + desc = "A mask created from suffering. When you look into its eyes, it looks back." + icon_state = "mad_mask" + item_state = null + w_class = WEIGHT_CLASS_SMALL + flags_cover = MASKCOVERSEYES + resistance_flags = FLAMMABLE + flags_inv = HIDEEARS|HIDEEYES|HIDEFACE + flags_cover = MASKCOVERSMOUTH | MASKCOVERSEYES + ///Who is wearing this + var/mob/living/carbon/human/local_user + +/obj/item/clothing/mask/madness_mask/Destroy() + local_user = null + return ..() + +/obj/item/clothing/mask/madness_mask/examine(mob/user) + . = ..() + if(IS_HERETIC_OR_MONSTER(user)) + . += "Actively drains the sanity and stamina of nearby non-heretics when worn." + . += "If forced onto the face of a non-heretic, they will be unable to remove it willingly." + else + . += "The eyes fill you with dread... You best avoid it." + +/obj/item/clothing/mask/madness_mask/equipped(mob/user, slot) + . = ..() + if(!(slot & ITEM_SLOT_MASK)) + return + if(!ishuman(user) || !user.mind) + return + + local_user = user + START_PROCESSING(SSobj, src) + + if(IS_HERETIC_OR_MONSTER(user)) + return + + flags |= NODROP + to_chat(user, "[src] clamps tightly to your face as you feel your soul draining away!") + +/obj/item/clothing/mask/madness_mask/dropped(mob/M) + local_user = null + STOP_PROCESSING(SSobj, src) + flags &= ~NODROP + return ..() + +/obj/item/clothing/mask/madness_mask/process() + if(!local_user) + return PROCESS_KILL + + if(IS_HERETIC_OR_MONSTER(local_user) && (flags & NODROP)) + flags &= ~NODROP + + for(var/mob/living/carbon/human/human_in_range in view(local_user)) //QWERTYTODO:WHAT THE FUCK THIS IS STUPID + if(IS_HERETIC_OR_MONSTER(human_in_range) || HAS_TRAIT(human_in_range, TRAIT_BLIND)) + continue + + if(human_in_range.can_block_magic(MAGIC_RESISTANCE|MAGIC_RESISTANCE_MIND)) + continue + + + if(prob(60)) + human_in_range.SetHallucinate(30 SECONDS) + + if(prob(40)) + human_in_range.AdjustJitter(10 SECONDS) + + if(human_in_range.getStaminaLoss() <= 85 && prob(30)) + human_in_range.emote(pick("giggle", "laugh")) + human_in_range.adjustStaminaLoss(10) + + if(prob(25)) + human_in_range.AdjustDizzy(10 SECONDS) diff --git a/code/modules/antagonists/heretic/items/unfathomable_curio.dm b/code/modules/antagonists/heretic/items/unfathomable_curio.dm new file mode 100644 index 000000000000..377beeb8bbb0 --- /dev/null +++ b/code/modules/antagonists/heretic/items/unfathomable_curio.dm @@ -0,0 +1,89 @@ +//Item for knock/moon heretic sidepath, it can block 5 hits of damage, acts as storage and if the heretic is examined the examiner suffers brain damage and blindness + +/obj/item/storage/belt/unfathomable_curio + name = "Unfathomable Curio" + desc = "It. It looks backs. It looks past. It looks in. It sees. It hides. It opens." + icon_state = "unfathomable_curio" + item_state = "unfathomable_curio" + drop_sound = 'sound/items/handling/toolbelt_drop.ogg' + pickup_sound = 'sound/items/handling/toolbelt_pickup.ogg' + max_w_class = WEIGHT_CLASS_NORMAL + max_combined_w_class = 21 + can_hold = list( + /obj/item/ammo_box/lionhunter, + /obj/item/heretic_labyrinth_handbook, + /obj/item/clothing/neck/eldritch_amulet, + /obj/item/clothing/neck/heretic_focus, + /obj/item/codex_cicatrix, + /obj/item/eldritch_potion, + /obj/item/food/grown/poppy, // Used to regain a Living Heart. + /obj/item/food/grown/harebell, // Used to reroll targets + /obj/item/melee/rune_carver, + /obj/item/melee/sickly_blade, + /obj/item/organ, // Organs are also often used in rituals. + /obj/item/reagent_containers/cup/beaker/eldritch, + /obj/item/stack/sheet/glass, // Glass is often used by moon heretics + ) + //Vars used for the shield component + var/heretic_shield_icon = "unfathomable_shield" + var/max_charges = 1 + var/recharge_start_delay = 30 SECONDS + var/charge_increment_delay = 30 SECONDS + var/charge_recovery = 1 + +/obj/item/storage/belt/unfathomable_curio/Initialize(mapload) + . = ..() + + AddComponent(/datum/component/shielded, max_charges = max_charges, recharge_start_delay = recharge_start_delay, charge_increment_delay = charge_increment_delay, \ + charge_recovery = charge_recovery, shield_icon = heretic_shield_icon, run_hit_callback = CALLBACK(src, PROC_REF(shield_damaged))) + + +/obj/item/storage/belt/unfathomable_curio/equipped(mob/user, slot, initial) + . = ..() + if(!(slot & slot_flags)) + return + + RegisterSignal(user, COMSIG_HUMAN_CHECK_SHIELDS, PROC_REF(shield_reaction)) + + if(!IS_HERETIC(user)) + to_chat(user, "The curio wraps around you, and you feel the beating of something dark inside it...") + +/obj/item/storage/belt/unfathomable_curio/dropped(mob/user) + . = ..() + UnregisterSignal(user, COMSIG_HUMAN_CHECK_SHIELDS) + +// Here we make sure our curio is only able to block while worn on the belt slot +/obj/item/storage/belt/unfathomable_curio/proc/shield_reaction(mob/living/carbon/human/owner, + atom/movable/hitby, + attack_text = "the attack", + final_block_chance = 0, + damage = 0, + attack_type = MELEE_ATTACK, + damage_type = BRUTE +) + SIGNAL_HANDLER + + if(hit_reaction(owner, hitby, attack_text, 0, damage, attack_type) && (owner.belt == src)) + return TRUE + return NONE + +// Our on hit effect +/obj/item/storage/belt/unfathomable_curio/proc/shield_damaged(mob/living/carbon/wearer, attack_text, new_current_charges) + wearer.visible_message("[wearer]'s veil makes [attack_text] miss, but the force behind the blow causes it to disperse!") + if(IS_HERETIC(wearer)) + return + + to_chat(wearer, "Laughter echoes in your mind....") + wearer.adjustBrainLoss(80) + + +/obj/item/storage/belt/unfathomable_curio/examine(mob/living/carbon/user) + . = ..() + if(IS_HERETIC(user)) + return + + user.adjustBrainLoss(10) + user.EyeBlind(5 SECONDS) + . += "It. It looked. IT WRAPS ITSELF AROUND ME." + + diff --git a/code/modules/antagonists/heretic/knife_effect.dm b/code/modules/antagonists/heretic/knife_effect.dm new file mode 100644 index 000000000000..29fdd3a405e5 --- /dev/null +++ b/code/modules/antagonists/heretic/knife_effect.dm @@ -0,0 +1,16 @@ +// "Floating ghost blade" effect for blade heretics +/obj/effect/floating_blade + name = "knife" + icon = 'icons/effects/eldritch.dmi' + icon_state = "dio_knife" + layer = 3.75 + /// The color the knife glows around it. + var/glow_color = "#ececff" + +/obj/effect/floating_blade/Initialize(mapload) + . = ..() + add_filter("dio_knife", 2, list("type" = "outline", "color" = glow_color, "size" = 1)) + +/obj/effect/floating_blade/haunted + icon = 'icons/obj/weapons/khopesh.dmi' + icon_state = "render" diff --git a/code/modules/antagonists/heretic/knowledge/_heretic_paths.dm b/code/modules/antagonists/heretic/knowledge/_heretic_paths.dm new file mode 100644 index 000000000000..5e3583e14b38 --- /dev/null +++ b/code/modules/antagonists/heretic/knowledge/_heretic_paths.dm @@ -0,0 +1,199 @@ +//Global typecache of all heretic knowledges -> instantiate the tree columns -> make them link themselves -> replace the old heretic stuff + +//heretic research tree is a directional graph so we can use some basic graph stuff to make internally handling it easier +GLOBAL_LIST(heretic_research_tree) + +//HKT = Heretic Knowledge Tree (Heretic Research Tree :3) these objects really only exist for a short period of time at startup and then get deleted +/datum/heretic_knowledge_tree_column + ///Route that symbolizes what path this is + var/route + ///Used to determine if this is a side path or a main path + var/abstract_parent_type = /datum/heretic_knowledge_tree_column + ///IDs od neighbours (to left and right) + var/neighbour_type_left + var/neighbour_type_right + ///Tier1 knowledge (or knowledges) + var/tier1 + ///Tier2 knowledge (or knowledges) + var/tier2 + ///Tier3 knowledge (or knowledges) + var/tier3 + ///UI background + var/ui_bgr = "node_side" + +/datum/heretic_knowledge_tree_column/main + abstract_parent_type = /datum/heretic_knowledge_tree_column/main + + ///Starting knowledge - first thing you pick + var/start + ///Grasp upgrade + var/grasp + ///Mark upgrade + var/mark + ///Unique ritual of knoweldge + var/ritual_of_knowledge + ///Path specific unique ability + var/unique_ability + ///Blade upgrade + var/blade + ///Ascension + var/ascension + +/proc/generate_heretic_research_tree() + var/list/heretic_research_tree = list() + + //Initialize the data structure + for(var/type in subtypesof(/datum/heretic_knowledge)) + heretic_research_tree[type] = list() + heretic_research_tree[type][HKT_NEXT] = list() + heretic_research_tree[type][HKT_BAN] = list() + heretic_research_tree[type][HKT_DEPTH] = 1 + heretic_research_tree[type][HKT_UI_BGR] = "node_side" + + var/datum/heretic_knowledge/knowledge = type + if(initial(knowledge.is_starting_knowledge)) + heretic_research_tree[type][HKT_ROUTE] = PATH_START + continue + + heretic_research_tree[type][HKT_ROUTE] = null + + var/list/paths = list() + for(var/type in subtypesof(/datum/heretic_knowledge_tree_column)) + var/datum/heretic_knowledge_tree_column/column_path = type + if(initial(column_path.abstract_parent_type) == column_path) + continue + + var/datum/heretic_knowledge_tree_column/column = new type() + paths[column.type] = column + + var/list/start_blacklist = list() + var/list/grasp_blacklist = list() + var/list/mark_blacklist = list() + var/list/blade_blacklist = list() + var/list/asc_blacklist = list() + + for(var/id in paths) + if(!istype(paths[id],/datum/heretic_knowledge_tree_column/main)) + continue + var/datum/heretic_knowledge_tree_column/main/column = paths[id] + + start_blacklist += column.start + grasp_blacklist += column.grasp + mark_blacklist += column.mark + blade_blacklist += column.blade + asc_blacklist += column.ascension + + heretic_research_tree[/datum/heretic_knowledge/spell/basic][HKT_NEXT] += start_blacklist + + for(var/id in paths) + var/datum/heretic_knowledge_tree_column/this_column = paths[id] + var/datum/heretic_knowledge_tree_column/neighbour_0 = paths[this_column.neighbour_type_left] + var/datum/heretic_knowledge_tree_column/neighbour_1 = paths[this_column.neighbour_type_right] + //horizontal (two way) + var/list/tier1 = this_column.tier1 + var/list/tier2 = this_column.tier2 + var/list/tier3 = this_column.tier3 + + //Tier1, 2 and 3 can technically be lists so we handle them here + if(!islist(this_column.tier1)) + tier1 = list(this_column.tier1) + + if(!islist(this_column.tier2)) + tier2 = list(this_column.tier2) + + if(!islist(this_column.tier3)) + tier3 = list(this_column.tier3) + + for(var/t1_knowledge in tier1) + heretic_research_tree[t1_knowledge][HKT_NEXT] += neighbour_0.tier1 + heretic_research_tree[t1_knowledge][HKT_NEXT] += neighbour_1.tier1 + heretic_research_tree[t1_knowledge][HKT_ROUTE] = this_column.route + heretic_research_tree[t1_knowledge][HKT_UI_BGR] = this_column.ui_bgr + heretic_research_tree[t1_knowledge][HKT_DEPTH] = 4 + + for(var/t2_knowledge in tier2) + heretic_research_tree[t2_knowledge][HKT_NEXT] += neighbour_0.tier2 + heretic_research_tree[t2_knowledge][HKT_NEXT] += neighbour_1.tier2 + heretic_research_tree[t2_knowledge][HKT_ROUTE] = this_column.route + heretic_research_tree[t2_knowledge][HKT_UI_BGR] = this_column.ui_bgr + heretic_research_tree[t2_knowledge][HKT_DEPTH] = 8 + + for(var/t3_knowledge in tier3) + heretic_research_tree[t3_knowledge][HKT_NEXT] += neighbour_0.tier3 + heretic_research_tree[t3_knowledge][HKT_NEXT] += neighbour_1.tier3 + heretic_research_tree[t3_knowledge][HKT_ROUTE] = this_column.route + heretic_research_tree[t3_knowledge][HKT_UI_BGR] = this_column.ui_bgr + heretic_research_tree[t3_knowledge][HKT_DEPTH] = 10 + + //Everything below this line is considered to be a "main path" and not a side path + //Since we are handling the heretic research tree column by column this is required + if(this_column.abstract_parent_type != /datum/heretic_knowledge_tree_column/main) + continue + + var/datum/heretic_knowledge_tree_column/main/main_column = this_column + //vertical (one way) + heretic_research_tree[/datum/heretic_knowledge/spell/basic] += main_column.start + heretic_research_tree[main_column.start][HKT_NEXT] += main_column.grasp + heretic_research_tree[main_column.grasp][HKT_NEXT] += main_column.tier1 + //t1 handling + for(var/t1_knowledge in tier1) + heretic_research_tree[t1_knowledge][HKT_NEXT] += main_column.mark + + heretic_research_tree[main_column.mark][HKT_NEXT] += main_column.ritual_of_knowledge + heretic_research_tree[main_column.ritual_of_knowledge][HKT_NEXT] += main_column.unique_ability + heretic_research_tree[main_column.unique_ability][HKT_NEXT] += main_column.tier2 + //t2 handling + for(var/t2_knowledge in tier2) + heretic_research_tree[t2_knowledge][HKT_NEXT] += main_column.blade + + heretic_research_tree[main_column.blade][HKT_NEXT] += main_column.tier3 + //t3 handling + for(var/t3_knowledge in tier3) + heretic_research_tree[t3_knowledge][HKT_NEXT] += main_column.ascension + + //blacklist + heretic_research_tree[main_column.start][HKT_BAN] += (start_blacklist - main_column.start) + (asc_blacklist - main_column.ascension) + heretic_research_tree[main_column.grasp][HKT_BAN] += (grasp_blacklist - main_column.grasp) + heretic_research_tree[main_column.mark][HKT_BAN] += (mark_blacklist - main_column.mark) + heretic_research_tree[main_column.blade][HKT_BAN] += (blade_blacklist - main_column.blade) + + //route stuff + heretic_research_tree[main_column.start][HKT_ROUTE] = main_column.route + heretic_research_tree[main_column.grasp][HKT_ROUTE] = main_column.route + heretic_research_tree[main_column.mark][HKT_ROUTE] = main_column.route + heretic_research_tree[main_column.ritual_of_knowledge][HKT_ROUTE] = main_column.route + heretic_research_tree[main_column.unique_ability][HKT_ROUTE] = main_column.route + heretic_research_tree[main_column.blade][HKT_ROUTE] = main_column.route + heretic_research_tree[main_column.ascension][HKT_ROUTE] = main_column.route + + heretic_research_tree[main_column.start][HKT_UI_BGR] = main_column.ui_bgr + heretic_research_tree[main_column.grasp][HKT_UI_BGR] = main_column.ui_bgr + heretic_research_tree[main_column.mark][HKT_UI_BGR] = main_column.ui_bgr + heretic_research_tree[main_column.ritual_of_knowledge][HKT_UI_BGR] = main_column.ui_bgr + heretic_research_tree[main_column.unique_ability][HKT_UI_BGR] = main_column.ui_bgr + heretic_research_tree[main_column.blade][HKT_UI_BGR] = main_column.ui_bgr + heretic_research_tree[main_column.ascension][HKT_UI_BGR] = main_column.ui_bgr + //depth stuff + heretic_research_tree[main_column.start][HKT_DEPTH] = 2 + heretic_research_tree[main_column.grasp][HKT_DEPTH] = 3 + heretic_research_tree[main_column.mark][HKT_DEPTH] = 5 + heretic_research_tree[main_column.ritual_of_knowledge][HKT_DEPTH] = 6 + heretic_research_tree[main_column.unique_ability][HKT_DEPTH] = 7 + heretic_research_tree[main_column.blade][HKT_DEPTH] = 9 + heretic_research_tree[main_column.ascension][HKT_DEPTH] = 11 + + //Per path bullshit goes here \/\/\/ + for(var/t2_knowledge in tier2) + heretic_research_tree[t2_knowledge][HKT_NEXT] += /datum/heretic_knowledge/reroll_targets + + // If you want to do any custom bullshit put it here \/\/\/ + heretic_research_tree[/datum/heretic_knowledge/reroll_targets][HKT_ROUTE] = PATH_SIDE + heretic_research_tree[/datum/heretic_knowledge/reroll_targets][HKT_DEPTH] = 8 + + heretic_research_tree[/datum/heretic_knowledge/rifle][HKT_NEXT] += /datum/heretic_knowledge/rifle_ammo + heretic_research_tree[/datum/heretic_knowledge/rifle_ammo][HKT_ROUTE] = PATH_SIDE + heretic_research_tree[/datum/heretic_knowledge/rifle_ammo][HKT_DEPTH] = heretic_research_tree[/datum/heretic_knowledge/rifle][HKT_DEPTH] + + //and we're done + QDEL_LIST_ASSOC_VAL(paths) + return heretic_research_tree diff --git a/code/modules/antagonists/heretic/knowledge/ash_lore.dm b/code/modules/antagonists/heretic/knowledge/ash_lore.dm new file mode 100644 index 000000000000..eae9ba7111ef --- /dev/null +++ b/code/modules/antagonists/heretic/knowledge/ash_lore.dm @@ -0,0 +1,209 @@ + +/datum/heretic_knowledge_tree_column/main/ash + neighbour_type_left = /datum/heretic_knowledge_tree_column/cosmic_to_ash + neighbour_type_right = /datum/heretic_knowledge_tree_column/ash_to_moon + + route = PATH_ASH + ui_bgr = "node_ash" + start = /datum/heretic_knowledge/limited_amount/starting/base_ash + grasp = /datum/heretic_knowledge/ashen_grasp + tier1 = /datum/heretic_knowledge/spell/ash_passage + mark = /datum/heretic_knowledge/mark/ash_mark + ritual_of_knowledge = /datum/heretic_knowledge/knowledge_ritual/ash + unique_ability = /datum/heretic_knowledge/spell/fire_blast + tier2 = /datum/heretic_knowledge/mad_mask + blade = /datum/heretic_knowledge/blade_upgrade/ash + tier3 = /datum/heretic_knowledge/spell/flame_birth + ascension = /datum/heretic_knowledge/ultimate/ash_final + +/datum/heretic_knowledge/limited_amount/starting/base_ash + name = "Nightwatcher's Secret" + desc = "Opens up the Path of Ash to you. \ + Allows you to transmute a match and a knife into an Ashen Blade. \ + You can only create two at a time." + gain_text = "The City Guard know their watch. If you ask them at night, they may tell you about the ashy lantern." + required_atoms = list( + /obj/item/kitchen/knife = 1, + /obj/item/match = 1, + ) + result_atoms = list(/obj/item/melee/sickly_blade/ash) + research_tree_icon_path = 'icons/obj/weapons/khopesh.dmi' + research_tree_icon_state = "ash_blade" + +/datum/heretic_knowledge/ashen_grasp + name = "Grasp of Ash" + desc = "Your Mansus Grasp will burn the eyes of the victim, damaging them and blurring their vision." + gain_text = "The Nightwatcher was the first of them, his treason started it all. \ + Their lantern, expired to ash - their watch, absent." + cost = 1 + research_tree_icon_path = 'icons/ui_icons/antags/heretic/knowledge.dmi' + research_tree_icon_state = "grasp_ash" + +/datum/heretic_knowledge/ashen_grasp/on_gain(mob/user, datum/antagonist/heretic/our_heretic) + RegisterSignal(user, COMSIG_HERETIC_MANSUS_GRASP_ATTACK, PROC_REF(on_mansus_grasp)) + +/datum/heretic_knowledge/ashen_grasp/on_lose(mob/user, datum/antagonist/heretic/our_heretic) + UnregisterSignal(user, COMSIG_HERETIC_MANSUS_GRASP_ATTACK) + +/datum/heretic_knowledge/ashen_grasp/proc/on_mansus_grasp(mob/living/source, mob/living/target) + SIGNAL_HANDLER + + if(HAS_TRAIT(target, TRAIT_BLIND)) + return + + var/obj/item/organ/internal/eyes/E = target.get_int_organ(/obj/item/organ/internal/eyes) + if(!E) + return + + to_chat(target, "A bright green light burns your eyes horrifically!") + E.receive_damage(9) + target.EyeBlurry(20 SECONDS) + +/datum/heretic_knowledge/spell/ash_passage + name = "Ashen Passage" + desc = "Grants you Ashen Passage, a spell that lets you phase out of reality and traverse a short distance, passing though any walls." + gain_text = "He knew how to walk between the planes." + + action_to_add = /datum/spell/ethereal_jaunt/ash + cost = 1 + + +/datum/heretic_knowledge/mark/ash_mark + name = "Mark of Ash" + desc = "Your Mansus Grasp now applies the Mark of Ash. The mark is triggered from an attack with your Ashen Blade. \ + When triggered, the victim takes additional stamina and burn damage, and the mark is transferred to a nearby heathen. \ + Damage dealt is decreased with each transfer. \ + Triggering the mark will also greatly reduce the cooldown of your Mansus Grasp." + gain_text = "He was a very particular man, always watching in the dead of night. \ + But in spite of his duty, he regularly tranced through the Manse with his blazing lantern held high. \ + He shone brightly in the darkness, until the blaze begin to die." + mark_type = /datum/status_effect/eldritch/ash + +/datum/heretic_knowledge/mark/ash_mark/trigger_mark(mob/living/source, mob/living/target) + . = ..() + if(!.) + return + + // Also refunds 75% of charge! + var/datum/spell/touch/mansus_grasp/grasp = locate() in source.actions + if(grasp && grasp.cooldown_handler.is_on_cooldown()) + grasp.cooldown_handler.start_recharge(grasp.cooldown_handler.recharge_duration * 0.25) + +/datum/heretic_knowledge/knowledge_ritual/ash + + + +/datum/heretic_knowledge/spell/fire_blast + name = "Volcano Blast" + desc = "Grants you Volcano Blast, a spell that - after a short charge - fires off a beam of energy \ + at a nearby enemy, setting them on fire and burning them. If they do not extinguish themselves, \ + the beam will continue to another target." + gain_text = "No fire was hot enough to rekindle them. No fire was bright enough to save them. No fire is eternal." + action_to_add = /datum/spell/charge_up/bounce/fire_blast + cost = 1 + research_tree_icon_frame = 7 + + +/datum/heretic_knowledge/mad_mask + name = "Mask of Madness" + desc = "Allows you to transmute any mask, four candles, a stun baton, and a liver to create a Mask of Madness. \ + The mask instills fear into heathens who witness it, causing stamina damage, hallucinations, and insanity. \ + It can also be forced onto a heathen, to make them unable to take it off..." + gain_text = "The Nightwatcher was lost. That's what the Watch believed. Yet he walked the world, unnoticed by the masses." + required_atoms = list( + /obj/item/organ/internal/liver = 1, + /obj/item/melee/baton = 1, // Technically means a cattleprod is valid + /obj/item/clothing/mask = 1, + /obj/item/candle = 4, + ) + result_atoms = list(/obj/item/clothing/mask/madness_mask) + cost = 1 + research_tree_icon_path = 'icons/obj/clothing/masks.dmi' + research_tree_icon_state = "mad_mask" + +/datum/heretic_knowledge/blade_upgrade/ash + name = "Fiery Blade" + desc = "Your blade now lights enemies ablaze on attack." + gain_text = "He returned, blade in hand, he swung and swung as the ash fell from the skies. \ + His city, the people he swore to watch... and watch he did, as they all burnt to cinders." + + + research_tree_icon_path = 'icons/ui_icons/antags/heretic/knowledge.dmi' + research_tree_icon_state = "blade_upgrade_ash" + +/datum/heretic_knowledge/blade_upgrade/ash/do_melee_effects(mob/living/source, mob/living/target, obj/item/melee/sickly_blade/blade) + if(source == target || !isliving(target)) + return + + target.adjust_fire_stacks(1) + target.IgniteMob() + +/datum/heretic_knowledge/spell/flame_birth + name = "Nightwatcher's Rebirth" + desc = "Grants you Nightwatcher's Rebirth, a spell that extinguishes you and \ + burns all nearby heathens who are currently on fire, healing you for every victim afflicted. \ + If any victims afflicted are in critical condition, they will also instantly die." + gain_text = "The fire was inescapable, and yet, life remained in his charred body. \ + The Nightwatcher was a particular man, always watching." + action_to_add = /datum/spell/aoe/fiery_rebirth + cost = 1 + research_tree_icon_frame = 5 + +/datum/heretic_knowledge/ultimate/ash_final + name = "Ashlord's Rite" + desc = "The ascension ritual of the Path of Ash. \ + Bring 3 burning or husked corpses to a transmutation rune to complete the ritual. \ + When completed, you become a harbinger of flames, gaining two abilites. \ + Cascade, which causes a massive, growing ring of fire around you, \ + and Oath of Flame, causing you to passively create a ring of flames as you walk. \ + Some ashen spells you already knew will be empowered as well. \ + You will also become immune to flames, space, and similar environmental hazards." + gain_text = "The Watch is dead, the Nightwatcher burned with it. Yet his fire burns evermore, \ + for the Nightwatcher brought forth the rite to mankind! His gaze continues, as now I am one with the flames, \ + WITNESS MY ASCENSION, THE ASHY LANTERN BLAZES ONCE MORE!" + + announcement_text = "%SPOOKY% Fear the blaze, for the Ashlord, %NAME% has ascended! The flames shall consume all! %SPOOKY%" + announcement_sound = 'sound/ambience/antag/heretic/ascend_ash.ogg' + research_tree_icon_path = 'icons/ui_icons/antags/heretic/ascension.dmi' + research_tree_icon_state = "ashascend" + /// A static list of all traits we apply on ascension. + var/static/list/traits_to_apply = list( + TRAIT_BOMBIMMUNE, + TRAIT_NOBREATH, + TRAIT_NOFIRE, + TRAIT_RESISTCOLD, + TRAIT_RESISTHEAT, + TRAIT_RESISTHIGHPRESSURE, + TRAIT_RESISTLOWPRESSURE, + TRAIT_NOSLIP, // so pressure doesn't meme them + ) + +/datum/heretic_knowledge/ultimate/ash_final/is_valid_sacrifice(mob/living/carbon/human/sacrifice) + . = ..() + if(!.) + return + + if(sacrifice.on_fire) + return TRUE + if(HAS_TRAIT_FROM(sacrifice, TRAIT_HUSK, BURN)) + return TRUE + return FALSE + +/datum/heretic_knowledge/ultimate/ash_final/on_finished_recipe(mob/living/user, list/selected_atoms, turf/loc) + . = ..() + var/datum/spell/fire_sworn/circle_spell = new(user.mind) + user.AddSpell(circle_spell) + + var/datum/spell/fire_cascade/big/screen_wide_fire_spell = new(user.mind) + user.AddSpell(screen_wide_fire_spell) + + var/datum/spell/charge_up/bounce/fire_blast/existing_beam_spell = locate() in user.mob_spell_list + if(existing_beam_spell) + existing_beam_spell.max_beam_bounces *= 2 // Double beams + existing_beam_spell.bounce_time *= 0.66 // Faster beams + existing_beam_spell.cooldown_handler.recharge_duration *= 0.66 // Lower cooldown + + var/datum/spell/aoe/fiery_rebirth/fiery_rebirth = locate() in user.mob_spell_list + fiery_rebirth?.base_cooldown *= 0.16 + + user.add_traits(traits_to_apply, type) diff --git a/code/modules/antagonists/heretic/knowledge/blade_lore.dm b/code/modules/antagonists/heretic/knowledge/blade_lore.dm new file mode 100644 index 000000000000..136facc6c84b --- /dev/null +++ b/code/modules/antagonists/heretic/knowledge/blade_lore.dm @@ -0,0 +1,421 @@ + +/datum/heretic_knowledge_tree_column/main/blade + neighbour_type_left = /datum/heretic_knowledge_tree_column/void_to_blade + neighbour_type_right = /datum/heretic_knowledge_tree_column/blade_to_rust + + route = PATH_BLADE + ui_bgr = "node_blade" + + start = /datum/heretic_knowledge/limited_amount/starting/base_blade + grasp = /datum/heretic_knowledge/blade_grasp + tier1 = /datum/heretic_knowledge/blade_dance + mark = /datum/heretic_knowledge/mark/blade_mark + ritual_of_knowledge = /datum/heretic_knowledge/knowledge_ritual/blade + unique_ability = /datum/heretic_knowledge/spell/realignment + tier2 = /datum/heretic_knowledge/duel_stance + blade = /datum/heretic_knowledge/blade_upgrade/blade + tier3 = /datum/heretic_knowledge/spell/furious_steel + ascension = /datum/heretic_knowledge/ultimate/blade_final + +/datum/heretic_knowledge/limited_amount/starting/base_blade + name = "The Cutting Edge" + desc = "Opens up the Path of Blades to you. \ + Allows you to transmute a knife with one bar of silver or titanium to create a Sundered Blade. \ + You can create up to four at a time." + gain_text = "Our great ancestors forged swords and practiced sparring on the eve of great battles." + required_atoms = list( + /obj/item/kitchen/knife = 1, + list(/obj/item/stack/sheet/mineral/silver, /obj/item/stack/sheet/mineral/titanium) = 1, + ) + result_atoms = list(/obj/item/melee/sickly_blade/dark) + limit = 4 // It's the blade path, it's a given + research_tree_icon_path = 'icons/obj/weapons/khopesh.dmi' + research_tree_icon_state = "dark_blade" + +/datum/heretic_knowledge/blade_grasp + name = "Grasp of the Blade" + desc = "Your Mansus Grasp will cause a short stun when used on someone lying down or facing away from you." + gain_text = "The story of the footsoldier has been told since antiquity. It is one of blood and valor, \ + and is championed by sword, steel and silver." + cost = 1 + research_tree_icon_path = 'icons/ui_icons/antags/heretic/knowledge.dmi' + research_tree_icon_state = "grasp_blade" + +/datum/heretic_knowledge/blade_grasp/on_gain(mob/user, datum/antagonist/heretic/our_heretic) + RegisterSignal(user, COMSIG_HERETIC_MANSUS_GRASP_ATTACK, PROC_REF(on_mansus_grasp)) + +/datum/heretic_knowledge/blade_grasp/on_lose(mob/user, datum/antagonist/heretic/our_heretic) + UnregisterSignal(user, COMSIG_HERETIC_MANSUS_GRASP_ATTACK) + +/datum/heretic_knowledge/blade_grasp/proc/on_mansus_grasp(mob/living/source, mob/living/target) + SIGNAL_HANDLER + + if(!check_behind(source, target)) + return + + // We're officially behind them, apply effects + target.Weaken(1.5 SECONDS) + target.apply_damage(10, BRUTE) + playsound(target, 'sound/weapons/guillotine.ogg', 100, TRUE) + +/// The cooldown duration between triggers of blade dance +#define BLADE_DANCE_COOLDOWN (20 SECONDS) + +/datum/heretic_knowledge/blade_dance + name = "Dance of the Brand" + desc = "Being attacked while wielding a Heretic Blade in either hand will deliver a riposte \ + towards your attacker. This effect can only trigger once every 20 seconds." + gain_text = "The footsoldier was known to be a fearsome duelist. \ + Their general quickly appointed them as their personal Champion." + cost = 1 + research_tree_icon_path = 'icons/mob/actions/actions_ecult.dmi' + research_tree_icon_state = "shatter" + /// Whether the counter-attack is ready or not. + /// Used instead of cooldowns, so we can give feedback when it's ready again + var/riposte_ready = TRUE + +/datum/heretic_knowledge/blade_dance/on_gain(mob/user, datum/antagonist/heretic/our_heretic) + RegisterSignal(user, COMSIG_HUMAN_CHECK_SHIELDS, PROC_REF(on_shield_reaction)) + +/datum/heretic_knowledge/blade_dance/on_lose(mob/user, datum/antagonist/heretic/our_heretic) + UnregisterSignal(user, COMSIG_HUMAN_CHECK_SHIELDS) + +/datum/heretic_knowledge/blade_dance/proc/on_shield_reaction( + mob/living/carbon/human/source, + atom/movable/hitby, + attack_text = "the attack", + final_block_chance = 0, + damage = 0, + attack_type = MELEE_ATTACK, + damage_type = BRUTE +) + + SIGNAL_HANDLER + + if(attack_type != MELEE_ATTACK && attack_type != UNARMED_ATTACK) + return + + if(!riposte_ready) + return + + if(HAS_TRAIT(source, TRAIT_HANDS_BLOCKED)) + return + + var/mob/living/attacker = hitby.loc + if(!istype(attacker)) + attacker = hitby + + if(!istype(attacker)) + return + + if(!source.Adjacent(attacker)) + return + + // Let's check their held items to see if we can do a riposte + var/obj/item/main_hand = source.l_hand + var/obj/item/off_hand = source.r_hand + // This is the item that ends up doing the "blocking" (flavor) + var/obj/item/striking_with + + // First we'll check if the offhand is valid + if(!QDELETED(off_hand) && istype(off_hand, /obj/item/melee/sickly_blade)) + striking_with = off_hand + + // Then we'll check the mainhand + // We do mainhand second, because we want to prioritize it over the offhand + if(!QDELETED(main_hand) && istype(main_hand, /obj/item/melee/sickly_blade)) + striking_with = main_hand + + // No valid item in either slot? No riposte + if(!striking_with) + return + + // If we made it here, deliver the strike + INVOKE_ASYNC(src, PROC_REF(counter_attack), source, attacker, striking_with, attack_text) + + // And reset after a bit + riposte_ready = FALSE + addtimer(CALLBACK(src, PROC_REF(reset_riposte), source), BLADE_DANCE_COOLDOWN) + +/datum/heretic_knowledge/blade_dance/proc/counter_attack(mob/living/carbon/human/source, mob/living/target, obj/item/melee/sickly_blade/weapon, attack_text) + playsound(get_turf(source), 'sound/weapons/parry.ogg', 100, TRUE) + source.visible_message( + "[source] leans into [attack_text] and delivers a sudden riposte back at [target]!", + "You lean into [attack_text] and deliver a sudden riposte back at [target]!", + "You hear a clink, followed by a stab.", + ) + weapon.melee_attack_chain(source, target) + +/datum/heretic_knowledge/blade_dance/proc/reset_riposte(mob/living/carbon/human/source) + riposte_ready = TRUE + to_chat(source, "Your riposte is ready.") + +#undef BLADE_DANCE_COOLDOWN + +/datum/heretic_knowledge/mark/blade_mark + name = "Mark of the Blade" + desc = "Your Mansus Grasp now applies the Mark of the Blade. While marked, \ + the victim will be unable to leave their current room until it expires or is triggered. \ + Triggering the mark will summon a knife that will orbit you for a short time. \ + The knife will block any attack directed towards you, but is consumed on use." + gain_text = "His general wished to end the war, but the Champion knew there could be no life without death. \ + He would slay the coward himself, and anyone who tried to run." + mark_type = /datum/status_effect/eldritch/blade + +/datum/heretic_knowledge/mark/blade_mark/create_mark(mob/living/source, mob/living/target) + var/datum/status_effect/eldritch/blade/blade_mark = ..() + if(istype(blade_mark)) + var/area/to_lock_to = get_area(target) + blade_mark.locked_to = to_lock_to + to_chat(target, "An otherworldly force is compelling you to stay in [get_area_name(to_lock_to)]!") + return blade_mark + +/datum/heretic_knowledge/mark/blade_mark/trigger_mark(mob/living/source, mob/living/target) + . = ..() + if(!.) + return + source.apply_status_effect(/datum/status_effect/protective_blades, 60 SECONDS, 1, 20, 0 SECONDS) + +/datum/heretic_knowledge/knowledge_ritual/blade + + + +/datum/heretic_knowledge/spell/realignment + name = "Realignment" + desc = "Grants you Realignment a spell that wil realign your body rapidly for a short period. \ + During this process, you will rapidly regenerate stamina and quickly recover from stuns, however, you will be unable to attack. \ + This spell can be cast in rapid succession, but doing so will increase the cooldown." + gain_text = "In the flurry of death, he found peace within himself. Despite insurmountable odds, he forged on." + action_to_add = /datum/spell/realignment + cost = 1 + + +/// The amount of blood flow reduced per level of severity of gained bleeding wounds for Stance of the Torn Champion. +#define BLOOD_FLOW_PER_SEVEIRTY -1 + +/datum/heretic_knowledge/duel_stance + name = "Stance of the Torn Champion" + desc = "Grants immunity to having your limbs dismembered. \ + Additionally, when damaged below 50% of your maximum health, \ + you gain resistance to batons." + gain_text = "In time, it was he who stood alone among the bodies of his former comrades, awash in blood, none of it his own. \ + He was without rival, equal, or purpose." + cost = 1 + research_tree_icon_path = 'icons/effects/blood.dmi' + research_tree_icon_state = "u_madman" + research_tree_icon_dir = SOUTH + /// Whether we're currently in duelist stance, gaining certain buffs (low health) + var/in_duelist_stance = FALSE + +/datum/heretic_knowledge/duel_stance/on_gain(mob/living/carbon/human/user, datum/antagonist/heretic/our_heretic) + for(var/obj/item/organ/external/current_organ in user.bodyparts) + current_organ.limb_flags |= CANNOT_DISMEMBER //you can't chop of the limbs of a ghost, silly + RegisterSignal(user, COMSIG_PARENT_EXAMINE, PROC_REF(on_examine)) + RegisterSignal(user, COMSIG_LIVING_HEALTH_UPDATE, PROC_REF(on_health_update)) + + on_health_update(user) // Run this once, so if the knowledge is learned while hurt it activates properly + +/datum/heretic_knowledge/duel_stance/on_lose(mob/living/carbon/human/user, datum/antagonist/heretic/our_heretic) + for(var/obj/item/organ/external/current_organ in user.bodyparts) + current_organ.limb_flags &= ~CANNOT_DISMEMBER //you can't chop of the limbs of a ghost, silly + if(in_duelist_stance) + REMOVE_TRAIT(user, TRAIT_BATON_RESISTANCE, type) + + UnregisterSignal(user, list(COMSIG_PARENT_EXAMINE, COMSIG_LIVING_HEALTH_UPDATE)) + +/datum/heretic_knowledge/duel_stance/proc/on_examine(mob/living/carbon/human/source, mob/user, list/examine_list) + SIGNAL_HANDLER + + var/obj/item/held_item = user.get_active_hand() + if(in_duelist_stance) + examine_list += "[user] looks unnaturally poised[held_item?.force >= 15 ? " and ready to strike out":""]." + +/datum/heretic_knowledge/duel_stance/proc/on_health_update(mob/living/source) + SIGNAL_HANDLER + + if(in_duelist_stance && source.health > source.maxHealth * 0.5) + in_duelist_stance = FALSE + REMOVE_TRAIT(source, TRAIT_BATON_RESISTANCE, type) + return + + if(!in_duelist_stance && source.health <= source.maxHealth * 0.5) + in_duelist_stance = TRUE + ADD_TRAIT(source, TRAIT_BATON_RESISTANCE, type) + SEND_SIGNAL(source, COMSIG_LIVING_CLEAR_STUNS) + return + +#undef BLOOD_FLOW_PER_SEVEIRTY + +/datum/heretic_knowledge/blade_upgrade/blade + name = "Empowered Blades" + desc = "Attacking someone with a Sundered Blade in both hands \ + will now deliver a blow with both at once, dealing two attacks in rapid succession. \ + The second blow will be slightly weaker. \ + You are able to infuse your mansus grasp directly into your blades." + gain_text = "I found him cleaved in twain, halves locked in a duel without end; \ + a flurry of blades, neither hitting their mark, for the Champion was indomitable." + research_tree_icon_path = 'icons/ui_icons/antags/heretic/knowledge.dmi' + research_tree_icon_state = "blade_upgrade_blade" + /// How much force do we apply to the offhand? + var/offand_force_decrement = 0 + /// How much force was the last weapon we offhanded with? If it's different, we need to re-calculate the decrement + var/last_weapon_force = -1 + +/datum/heretic_knowledge/blade_upgrade/blade/on_gain(mob/user, datum/antagonist/heretic/our_heretic) + . = ..() + RegisterSignal(user, COMSIG_TOUCH_HANDLESS_CAST, PROC_REF(on_grasp_cast)) + RegisterSignal(user, COMSIG_HERETIC_BLADE_ATTACK, PROC_REF(do_melee_effects)) + +/datum/heretic_knowledge/blade_upgrade/blade/on_lose(mob/user, datum/antagonist/heretic/our_heretic) + . = ..() + UnregisterSignal(user, list(COMSIG_TOUCH_HANDLESS_CAST, COMSIG_HERETIC_BLADE_ATTACK)) + +///Tries to infuse our held blade with our mansus grasp +/datum/heretic_knowledge/blade_upgrade/blade/proc/on_grasp_cast(mob/living/carbon/cast_on) + SIGNAL_HANDLER + + var/held_item = cast_on.get_active_hand() + if(!istype(held_item, /obj/item/melee/sickly_blade/dark)) + return NONE + var/obj/item/melee/sickly_blade/dark/held_blade = held_item + if(held_blade.infused) + return NONE + held_blade.infused = TRUE + held_blade.update_appearance(UPDATE_ICON) + + //Infuse our off-hand blade just so it's nicer visually + var/obj/item/melee/sickly_blade/dark/off_hand_blade = cast_on.get_inactive_hand() + if(istype(off_hand_blade, /obj/item/melee/sickly_blade/dark)) + off_hand_blade.infused = TRUE + off_hand_blade.update_appearance(UPDATE_ICON) + + return COMPONENT_CAST_HANDLESS + +/datum/heretic_knowledge/blade_upgrade/blade/do_melee_effects(mob/living/carbon/human/source, atom/target, obj/item/melee/sickly_blade/blade) + if(target == source) + return + + var/obj/item/off_hand = source.get_inactive_hand() + if(QDELETED(off_hand) || !istype(off_hand, /obj/item/melee/sickly_blade)) + return + // If our off-hand is the blade that's attacking, + // quit out now to avoid an infinite stab combo + if(off_hand == blade) + return + + // Give it a short delay (for style, also lets people dodge it I guess) + addtimer(CALLBACK(src, PROC_REF(follow_up_attack), source, target, off_hand), 0.25 SECONDS) + +/datum/heretic_knowledge/blade_upgrade/blade/proc/follow_up_attack(mob/living/carbon/human/source, atom/target, obj/item/melee/sickly_blade/blade) + if(QDELETED(source) || QDELETED(target) || QDELETED(blade)) + return + // Sanity to ensure that the blade we're delivering an offhand attack with is ACTUALLY our offhand + if(blade != source.get_inactive_hand()) + return + // And we easily could've moved away + if(!source.Adjacent(target)) + return + + // Check if we need to recaclulate our offhand force + // This is just so we don't run this block every attack, that's wasteful + if(last_weapon_force != blade.force) + offand_force_decrement = 0 + // We want to make sure that the offhand blade increases their hits to crit by one, just about + // So, let's do some quick math. Yes this'll be inaccurate if their mainhand blade is modified (whetstone), no I don't care + // Find how much force we need to detract from the second blade + var/hits_to_crit_on_average = ROUND_UP(100 / (blade.force * 2)) + while(hits_to_crit_on_average <= 3) // 3 hits and beyond is a bit too absurd + if(offand_force_decrement + 2 > blade.force * 0.5) // But also cutting the force beyond half is absurd + break + + offand_force_decrement += 2 + hits_to_crit_on_average = ROUND_UP(100 / (blade.force * 2 - offand_force_decrement)) + + // Save the force as our last weapon force + last_weapon_force = blade.force + // Subtract the decrement, but only if the target is living + if(isliving(target)) + blade.force -= offand_force_decrement + // Perform the offhand attack + blade.melee_attack_chain(source, target) + // Restore the force. + blade.force = last_weapon_force + +/datum/heretic_knowledge/spell/furious_steel + name = "Furious Steel" + desc = "Grants you Furious Steel, a targeted spell. Using it will summon three \ + orbiting blades around you. These blades will protect you from all attacks, \ + but are consumed on use. Additionally, you can click to fire the blades \ + at a target, dealing damage and causing bleeding." + gain_text = "Without thinking, I took the knife of a fallen soldier and threw with all my might. My aim was true! \ + The Torn Champion smiled at their first taste of agony, and with a nod, their blades became my own." + action_to_add = /datum/spell/fireball/furious_steel + cost = 1 + +/datum/heretic_knowledge/ultimate/blade_final + name = "Maelstrom of Silver" + desc = "The ascension ritual of the Path of Blades. \ + Bring 3 corpses with either no head to a transmutation rune to complete the ritual. \ + When completed, you will be surrounded in a constant, regenerating orbit of blades. \ + These blades will protect you from all attacks, but are consumed on use. \ + Your Furious Steel spell will also have a shorter cooldown. \ + Additionally, you become a master of combat, gaining full wound immunity and the ability to shrug off short stuns. \ + Your Sundered Blades deal bonus damage and heal you on attack for a portion of the damage dealt." + gain_text = "The Torn Champion is freed! I will become the blade reunited, and with my greater ambition, \ + I AM UNMATCHED! A STORM OF STEEL AND SILVER IS UPON US! WITNESS MY ASCENSION!" + + announcement_text = "%SPOOKY% Master of blades, the Torn Champion's disciple, %NAME% has ascended! Their steel is that which will cut reality in a maelstom of silver! %SPOOKY%" + announcement_sound = 'sound/ambience/antag/heretic/ascend_blade.ogg' + research_tree_icon_path = 'icons/ui_icons/antags/heretic/ascension.dmi' + research_tree_icon_state = "bladeascend" + +/datum/heretic_knowledge/ultimate/blade_final/is_valid_sacrifice(mob/living/carbon/human/sacrifice) + . = ..() + if(!.) + return FALSE + var/obj/item/organ/external/head/head = sacrifice.get_organ("head") + if(!head) + return TRUE + return FALSE + +/datum/heretic_knowledge/ultimate/blade_final/on_finished_recipe(mob/living/user, list/selected_atoms, turf/loc) + . = ..() + RegisterSignal(user, COMSIG_HERETIC_BLADE_ATTACK, PROC_REF(on_eldritch_blade_final)) + user.apply_status_effect(/datum/status_effect/protective_blades/recharging, null, 8, 30, 0.25 SECONDS, /obj/effect/floating_blade, 1 MINUTES) + user.add_stun_absorption( + key = name, + duration = INFINITY, + message = "%EFFECT_OWNER throws off the stun!", + self_message = "You throw off the stun!", + examine_message = "%EFFECT_OWNER_THEYRE standing stalwartly.", + ) + var/datum/spell/fireball/furious_steel/steel_spell = locate() in user.actions + steel_spell?.cooldown_handler.recharge_duration *= 0.5 + + var/mob/living/carbon/human/heretic = user + ADD_TRAIT(heretic, TRAIT_NO_BONES, name) + ADD_TRAIT(heretic, TRAIT_STURDY_LIMBS, name) + ADD_TRAIT(heretic, TRAIT_BURN_WOUND_IMMUNE, name) + ADD_TRAIT(heretic, TRAIT_IB_IMMUNE, name) + for(var/obj/item/organ/external/limb in heretic.bodyparts) + limb.add_limb_flags() // Otherwise knockdowns would probably overpower the stun absorption effect. + +/datum/heretic_knowledge/ultimate/blade_final/proc/on_eldritch_blade_final(mob/living/source, mob/living/target, obj/item/melee/sickly_blade/blade) + SIGNAL_HANDLER + + if(target == source) + return + + // Turns your heretic blades into eswords, pretty much. + var/bonus_damage = clamp(30 - blade.force, 0, 12) + + target.apply_damage( + damage = bonus_damage, + damagetype = BRUTE, + spread_damage = TRUE, + sharp = TRUE, + ) + + if(target.stat != DEAD) + // And! Get some free healing for a portion of the bonus damage dealt. + source.heal_overall_damage(bonus_damage / 2, bonus_damage / 2) diff --git a/code/modules/antagonists/heretic/knowledge/cosmic_lore.dm b/code/modules/antagonists/heretic/knowledge/cosmic_lore.dm new file mode 100644 index 000000000000..f82e30fc0312 --- /dev/null +++ b/code/modules/antagonists/heretic/knowledge/cosmic_lore.dm @@ -0,0 +1,261 @@ + +/datum/heretic_knowledge_tree_column/main/cosmic + neighbour_type_left = /datum/heretic_knowledge_tree_column/rust_to_cosmic + neighbour_type_right = /datum/heretic_knowledge_tree_column/cosmic_to_ash + + route = PATH_COSMIC + ui_bgr = "node_cosmos" + + start = /datum/heretic_knowledge/limited_amount/starting/base_cosmic + grasp = /datum/heretic_knowledge/cosmic_grasp + tier1 = /datum/heretic_knowledge/spell/cosmic_runes + mark = /datum/heretic_knowledge/mark/cosmic_mark + ritual_of_knowledge = /datum/heretic_knowledge/knowledge_ritual/cosmic + unique_ability = /datum/heretic_knowledge/spell/star_touch + tier2 = /datum/heretic_knowledge/spell/star_blast + blade = /datum/heretic_knowledge/blade_upgrade/cosmic + tier3 = /datum/heretic_knowledge/spell/cosmic_expansion + ascension = /datum/heretic_knowledge/ultimate/cosmic_final + +/datum/heretic_knowledge/limited_amount/starting/base_cosmic + name = "Eternal Gate" + desc = "Opens up the Path of Cosmos to you. \ + Allows you to transmute a sheet of plasma and a knife into an Cosmic Blade. \ + You can only create two at a time." + gain_text = "A nebula appeared in the sky, its infernal birth shone upon me. This was the start of a great transcendence." + required_atoms = list( + /obj/item/kitchen/knife = 1, + /obj/item/stack/sheet/mineral/plasma = 1, + ) + result_atoms = list(/obj/item/melee/sickly_blade/cosmic) + research_tree_icon_path = 'icons/obj/weapons/khopesh.dmi' + research_tree_icon_state = "cosmic_blade" + +/datum/heretic_knowledge/cosmic_grasp + name = "Grasp of Cosmos" + desc = "Your Mansus Grasp will give people a star mark (cosmic ring) and create a cosmic field where you stand. \ + People with a star mark can not pass cosmic fields." + gain_text = "Some stars dimmed, others' magnitude increased. \ + With newfound strength I could channel the nebula's power into myself." + cost = 1 + research_tree_icon_path = 'icons/ui_icons/antags/heretic/knowledge.dmi' + research_tree_icon_state = "grasp_cosmos" + +/datum/heretic_knowledge/cosmic_grasp/on_gain(mob/user, datum/antagonist/heretic/our_heretic) + RegisterSignal(user, COMSIG_HERETIC_MANSUS_GRASP_ATTACK, PROC_REF(on_mansus_grasp)) + +/datum/heretic_knowledge/cosmic_grasp/on_lose(mob/user, datum/antagonist/heretic/our_heretic) + UnregisterSignal(user, COMSIG_HERETIC_MANSUS_GRASP_ATTACK) + +/// Aplies the effect of the mansus grasp when it hits a target. +/datum/heretic_knowledge/cosmic_grasp/proc/on_mansus_grasp(mob/living/source, mob/living/target) + SIGNAL_HANDLER + + to_chat(target, "A cosmic ring appeared above your head!") + target.apply_status_effect(/datum/status_effect/star_mark, source) + new /obj/effect/forcefield/cosmic_field(get_turf(source)) + +/datum/heretic_knowledge/spell/cosmic_runes + name = "Cosmic Runes" + desc = "Grants you Cosmic Runes, a spell that creates two runes linked with each other for easy teleportation. \ + Only the entity activating the rune will get transported, and it can be used by anyone without a star mark. \ + However, people with a star mark will get transported along with another person using the rune." + gain_text = "The distant stars crept into my dreams, roaring and screaming without reason. \ + I spoke, and heard my own words echoed back." + action_to_add = /datum/spell/cosmic_rune + cost = 1 + + +/datum/heretic_knowledge/mark/cosmic_mark + name = "Mark of Cosmos" + desc = "Your Mansus Grasp now applies the Mark of Cosmos. The mark is triggered from an attack with your Cosmic Blade. \ + When triggered, the victim is returned to the location where the mark was originally applied to them, \ + leaving a cosmic field in their place. \ + They will then be paralyzed for 2 seconds." + gain_text = "The Beast now whispered to me occasionally, only small tidbits of their circumstances. \ + I can help them, I have to help them." + mark_type = /datum/status_effect/eldritch/cosmic + +/datum/heretic_knowledge/knowledge_ritual/cosmic + +/datum/heretic_knowledge/spell/star_touch + name = "Star Touch" + desc = "Grants you Star Touch, a spell which places a star mark upon your target \ + and creates a cosmic field at your feet and to the turfs next to you. Targets which already have a star mark \ + will be forced to sleep for 4 seconds. When the victim is hit it also creates a beam that burns them. \ + The beam lasts a minute, until the beam is obstructed or until a new target has been found." + gain_text = "After waking in a cold sweat I felt a palm on my scalp, a sigil burned onto me. \ + My veins now emitted a strange purple glow, the Beast knows I will surpass its expectations." + action_to_add = /datum/spell/touch/star_touch + cost = 1 + +/datum/heretic_knowledge/spell/star_blast + name = "Star Blast" + desc = "Fires a projectile that moves very slowly, raising a short-lived wall of cosmic fields where it goes. \ + Anyone hit by the projectile will receive burn damage, a knockdown, and give people in a three tile range a star mark." + gain_text = "The Beast was behind me now at all times, with each sacrifice words of affirmation coursed through me." + action_to_add = /datum/spell/fireball/star_blast + cost = 1 + +/datum/heretic_knowledge/blade_upgrade/cosmic + name = "Cosmic Blade" + desc = "Your blade now deals damage to people's organs through cosmic radiation. \ + Your attacks will chain bonus damage to up to two previous victims. \ + The combo is reset after two seconds without making an attack, \ + or if you attack someone already marked. If you combo more than four attacks you will receive, \ + a cosmic trail and increase your combo timer up to ten seconds." + gain_text = "The Beast took my blades in their hand, I kneeled and felt a sharp pain. \ + The blades now glistened with fragmented power. I fell to the ground and wept at the beast's feet." + research_tree_icon_path = 'icons/ui_icons/antags/heretic/knowledge.dmi' + research_tree_icon_state = "blade_upgrade_cosmos" + /// Storage for the second target. + var/second_target + /// Storage for the third target. + var/third_target + /// When this timer completes we reset our combo. + var/combo_timer + /// The active duration of the combo. + var/combo_duration = 3 SECONDS + /// The duration of a combo when it starts. + var/combo_duration_amount = 3 SECONDS + /// The maximum duration of the combo. + var/max_combo_duration = 10 SECONDS + /// The amount the combo duration increases. + var/increase_amount = 0.5 SECONDS + /// The hits we have on a mob with a mind. + var/combo_counter = 0 + +/datum/heretic_knowledge/blade_upgrade/cosmic/do_melee_effects(mob/living/source, mob/living/target, obj/item/melee/sickly_blade/blade) + var/static/list/valid_organ_slots = list( + /obj/item/organ/internal/heart, + /obj/item/organ/internal/lungs, + /obj/item/organ/internal/eyes, + /obj/item/organ/internal/ears, + /obj/item/organ/internal/liver, + /obj/item/organ/internal/brain + ) + if(source == target || !isliving(target)) + return + if(combo_timer) + deltimer(combo_timer) + combo_timer = addtimer(CALLBACK(src, PROC_REF(reset_combo), source), combo_duration, TIMER_STOPPABLE) + var/mob/living/second_target_resolved = locateUID(second_target) + var/mob/living/third_target_resolved = locateUID(third_target) + var/need_mob_update = FALSE + need_mob_update += target.adjustFireLoss(5, updating_health = FALSE) + var/obj/item/organ/internal/organ_to_stab = target.get_int_organ(/obj/item/organ/internal/liver) + if(organ_to_stab) + organ_to_stab.receive_damage(8, TRUE) + if(need_mob_update) + target.updatehealth() + if(target == second_target_resolved || target == third_target_resolved) + reset_combo(source) + return + if(target.mind && target.stat != DEAD) + combo_counter += 1 + if(second_target_resolved) + new /obj/effect/temp_visual/cosmic_explosion(get_turf(second_target_resolved)) + playsound(get_turf(second_target_resolved), 'sound/magic/cosmic_energy.ogg', 25, FALSE) + need_mob_update = FALSE + need_mob_update += second_target_resolved.adjustFireLoss(14, updating_health = FALSE) + var/obj/item/organ/internal/second_organ_to_stab = second_target_resolved.get_int_organ(/obj/item/organ/internal/liver) + if(second_organ_to_stab) + second_organ_to_stab.receive_damage(12, TRUE) + if(need_mob_update) + second_target_resolved.updatehealth() + if(third_target_resolved) + new /obj/effect/temp_visual/cosmic_domain(get_turf(third_target_resolved)) + playsound(get_turf(third_target_resolved), 'sound/magic/cosmic_energy.ogg', 50, FALSE) + need_mob_update = FALSE + need_mob_update += third_target_resolved.adjustFireLoss(28, updating_health = FALSE) + var/obj/item/organ/internal/third_organ_to_stab = third_target_resolved.get_int_organ(/obj/item/organ/internal/liver) + if(third_organ_to_stab) + third_organ_to_stab.receive_damage(14, TRUE) + if(need_mob_update) + third_target_resolved.updatehealth() + if(combo_counter > 3) + target.apply_status_effect(/datum/status_effect/star_mark, source) + if(target.mind && target.stat != DEAD) + increase_combo_duration() + if(combo_counter == 4) + source.AddElement(/datum/element/effect_trail, /obj/effect/forcefield/cosmic_field/fast) + third_target = second_target + second_target = target.UID() + +/// Resets the combo. +/datum/heretic_knowledge/blade_upgrade/cosmic/proc/reset_combo(mob/living/source) + second_target = null + third_target = null + if(combo_counter > 3) + source.RemoveElement(/datum/element/effect_trail, /obj/effect/forcefield/cosmic_field/fast) + combo_duration = combo_duration_amount + combo_counter = 0 + new /obj/effect/temp_visual/cosmic_cloud(get_turf(source)) + if(combo_timer) + deltimer(combo_timer) + +/// Increases the combo duration. +/datum/heretic_knowledge/blade_upgrade/cosmic/proc/increase_combo_duration() + if(combo_duration < max_combo_duration) + combo_duration += increase_amount + +/datum/heretic_knowledge/spell/cosmic_expansion + name = "Cosmic Expansion" + desc = "Grants you Cosmic Expansion, a spell that creates a 3x3 area of cosmic fields around you. \ + Nearby beings will also receive a star mark." + gain_text = "The ground now shook beneath me. The Beast inhabited me, and their voice was intoxicating." + action_to_add = /datum/spell/aoe/conjure/cosmic_expansion + cost = 1 + +/datum/heretic_knowledge/ultimate/cosmic_final + name = "Creators's Gift" + desc = "The ascension ritual of the Path of Cosmos. \ + Bring 3 corpses with bluespace dust in their body to a transmutation rune to complete the ritual. \ + When completed, you become the owner of a Star Gazer. \ + You will be able to command the Star Gazer with Alt+click. \ + You can also give it commands through speech. \ + The Star Gazer is a strong ally who can even break down reinforced walls. \ + The Star Gazer has an aura that will heal you and damage opponents. \ + Star Touch can now teleport you to the Star Gazer when activated in your hand. \ + Your cosmic expansion spell and your blades also become greatly empowered." + gain_text = "The Beast held out its hand, I grabbed hold and they pulled me to them. Their body was towering, but it seemed so small and feeble after all their tales compiled in my head. \ + I clung on to them, they would protect me, and I would protect it. \ + I closed my eyes with my head laid against their form. I was safe. \ + WITNESS MY ASCENSION!" + + + announcement_text = "%SPOOKY% A Star Gazer has arrived into the station, %NAME% has ascended! This station is the domain of the Cosmos! %SPOOKY%" + announcement_sound = 'sound/ambience/antag/heretic/ascend_cosmic.ogg' + research_tree_icon_path = 'icons/ui_icons/antags/heretic/ascension.dmi' + research_tree_icon_state = "comsicascend" + /// A static list of command we can use with our mob. +// var/static/list/star_gazer_commands = list( +// /datum/pet_command/idle, +// /datum/pet_command/free, +// /datum/pet_command/follow, +// /datum/pet_command/attack/star_gazer +// ) + +/datum/heretic_knowledge/ultimate/cosmic_final/is_valid_sacrifice(mob/living/carbon/human/sacrifice) + . = ..() + if(!.) + return FALSE + + return sacrifice.reagents.has_reagent(/datum/reagent/bluespace) + +/datum/heretic_knowledge/ultimate/cosmic_final/on_finished_recipe(mob/living/user, list/selected_atoms, turf/loc) + . = ..() + var/datum/spell/touch/star_touch/star_touch_spell = locate() in user.actions + if(star_touch_spell) + //star_touch_spell.set_star_gazer(star_gazer_mob) + star_touch_spell.ascended = TRUE + + var/datum/antagonist/heretic/heretic_datum = user.mind.has_antag_datum(/datum/antagonist/heretic) + var/datum/heretic_knowledge/blade_upgrade/cosmic/blade_upgrade = heretic_datum.get_knowledge(/datum/heretic_knowledge/blade_upgrade/cosmic) + blade_upgrade.combo_duration = 10 SECONDS + blade_upgrade.combo_duration_amount = 10 SECONDS + blade_upgrade.max_combo_duration = 30 SECONDS + blade_upgrade.increase_amount = 2 SECONDS + + var/datum/spell/aoe/conjure/cosmic_expansion/cosmic_expansion_spell = locate() in user.actions + cosmic_expansion_spell?.ascended = TRUE diff --git a/code/modules/antagonists/heretic/knowledge/flesh_lore.dm b/code/modules/antagonists/heretic/knowledge/flesh_lore.dm new file mode 100644 index 000000000000..24db31ed0e1c --- /dev/null +++ b/code/modules/antagonists/heretic/knowledge/flesh_lore.dm @@ -0,0 +1,309 @@ +/// The max amount of health a ghoul has. +#define GHOUL_MAX_HEALTH 25 +/// The max amount of health a voiceless dead has. +#define MUTE_MAX_HEALTH 50 + +/datum/heretic_knowledge_tree_column/main/flesh + neighbour_type_left = /datum/heretic_knowledge_tree_column/lock_to_flesh + neighbour_type_right = /datum/heretic_knowledge_tree_column/flesh_to_void + + route = PATH_FLESH + ui_bgr = "node_flesh" + + start = /datum/heretic_knowledge/limited_amount/starting/base_flesh + grasp = /datum/heretic_knowledge/limited_amount/flesh_grasp + tier1 = /datum/heretic_knowledge/limited_amount/flesh_ghoul + mark = /datum/heretic_knowledge/mark/flesh_mark + ritual_of_knowledge = /datum/heretic_knowledge/knowledge_ritual/flesh + unique_ability = /datum/heretic_knowledge/spell/flesh_surgery + tier2 = /datum/heretic_knowledge/summon/raw_prophet + blade = /datum/heretic_knowledge/blade_upgrade/flesh + tier3 = /datum/heretic_knowledge/summon/stalker + ascension = /datum/heretic_knowledge/ultimate/flesh_final + +/datum/heretic_knowledge/limited_amount/starting/base_flesh + name = "Principle of Hunger" + desc = "Opens up the Path of Flesh to you. \ + Allows you to transmute a knife and a pool of blood into a Bloody Blade. \ + You can only create three at a time." + gain_text = "Hundreds of us starved, but not me... I found strength in my greed." + required_atoms = list( + /obj/item/kitchen/knife = 1, + /obj/effect/decal/cleanable/blood = 1, + ) + result_atoms = list(/obj/item/melee/sickly_blade/flesh) + limit = 3 // Bumped up so they can arm up their ghouls too. + research_tree_icon_path = 'icons/obj/weapons/khopesh.dmi' + research_tree_icon_state = "flesh_blade" + +/datum/heretic_knowledge/limited_amount/starting/base_flesh/on_research(mob/user, datum/antagonist/heretic/our_heretic) + . = ..() +// var/datum/objective/heretic_summon/summon_objective = new() qwertodo + //summon_objective.owner = our_heretic.owner + //our_heretic.objectives += summon_objective + + to_chat(user, "Undertaking the Path of Flesh, you are given another objective.") + //our_heretic.owner.announce_objectives() + +/datum/heretic_knowledge/limited_amount/flesh_grasp + name = "Grasp of Flesh" + desc = "Your Mansus Grasp gains the ability to create a ghoul out of corpse with a soul. \ + Ghouls have only 25 health and look like husks to the heathens' eyes, but can use Bloody Blades effectively. \ + You can only create one at a time by this method." + gain_text = "My new found desires drove me to greater and greater heights." + + limit = 1 + cost = 1 + + + research_tree_icon_path = 'icons/ui_icons/antags/heretic/knowledge.dmi' + research_tree_icon_state = "grasp_flesh" + +/datum/heretic_knowledge/limited_amount/flesh_grasp/on_gain(mob/user, datum/antagonist/heretic/our_heretic) + RegisterSignal(user, COMSIG_HERETIC_MANSUS_GRASP_ATTACK, PROC_REF(on_mansus_grasp)) + +/datum/heretic_knowledge/limited_amount/flesh_grasp/on_lose(mob/user, datum/antagonist/heretic/our_heretic) + UnregisterSignal(user, COMSIG_HERETIC_MANSUS_GRASP_ATTACK) + +/datum/heretic_knowledge/limited_amount/flesh_grasp/proc/on_mansus_grasp(mob/living/source, mob/living/target) + SIGNAL_HANDLER + + if(target.stat != DEAD) + return + + if(LAZYLEN(created_items) >= limit) + to_chat(source, "The ritual has failed, you are at your ghoul limit.") + return COMPONENT_BLOCK_HAND_USE + + if(HAS_TRAIT(target, TRAIT_HUSK)) + to_chat(source, "The ritual has failed, the target is husked.") + return COMPONENT_BLOCK_HAND_USE + + if(!IS_VALID_GHOUL_MOB(target)) + to_chat(source, "The ritual has failed, the target not valid.") + return COMPONENT_BLOCK_HAND_USE + + target.grab_ghost() + + // The grab failed, so they're mindless or playerless. We can't continue + if(!target.mind || !target.client) + to_chat(source, "The ritual has failed, the target has no soul.") + return COMPONENT_BLOCK_HAND_USE + + make_ghoul(source, target) + +/// Makes [victim] into a ghoul. +/datum/heretic_knowledge/limited_amount/flesh_grasp/proc/make_ghoul(mob/living/user, mob/living/carbon/human/victim) + message_admins("[ADMIN_LOOKUPFLW(user)] created a ghoul, [ADMIN_LOOKUPFLW(victim)].") + + victim.apply_status_effect( + /datum/status_effect/ghoul, + GHOUL_MAX_HEALTH, + user.mind, + CALLBACK(src, PROC_REF(apply_to_ghoul)), + CALLBACK(src, PROC_REF(remove_from_ghoul)), + ) + +/// Callback for the ghoul status effect - Tracking all of our ghouls +/datum/heretic_knowledge/limited_amount/flesh_grasp/proc/apply_to_ghoul(mob/living/ghoul) + LAZYADD(created_items, ghoul.UID()) + +/// Callback for the ghoul status effect - Tracking all of our ghouls +/datum/heretic_knowledge/limited_amount/flesh_grasp/proc/remove_from_ghoul(mob/living/ghoul) + LAZYREMOVE(created_items, ghoul.UID()) + +/datum/heretic_knowledge/limited_amount/flesh_ghoul + name = "Imperfect Ritual" + desc = "Allows you to transmute a corpse and a poppy to create a Voiceless Dead. \ + The corpse does not need to have a soul. \ + Voiceless Dead are mute ghouls and only have 50 health, but can use Bloody Blades effectively. \ + You can only create two at a time." + gain_text = "I found notes of a dark ritual, unfinished... yet still, I pushed forward." + required_atoms = list( + /mob/living/carbon/human = 1, + /obj/item/food/grown/poppy = 1, + ) + limit = 2 + cost = 1 + research_tree_icon_path = 'icons/ui_icons/antags/heretic/knowledge.dmi' + research_tree_icon_state = "ghoul_voiceless" + + + +/datum/heretic_knowledge/limited_amount/flesh_ghoul/recipe_snowflake_check(mob/living/user, list/atoms, list/selected_atoms, turf/loc) + . = ..() + if(!.) + return FALSE + + for(var/mob/living/carbon/human/body in atoms) + if(body.stat != DEAD) + continue + if(!IS_VALID_GHOUL_MOB(body) || HAS_TRAIT(body, TRAIT_HUSK)) + to_chat(user, "[body] is not in a valid state to be made into a ghoul.") + continue + + // We'll select any valid bodies here. If they're clientless, we'll give them a new one. + selected_atoms += body + return TRUE + + to_chat(user, "The ritual has failed, there is no valid body.") + return FALSE + +/datum/heretic_knowledge/limited_amount/flesh_ghoul/on_finished_recipe(mob/living/user, list/selected_atoms, turf/loc) + var/mob/living/carbon/human/soon_to_be_ghoul = locate() in selected_atoms + if(QDELETED(soon_to_be_ghoul)) // No body? No ritual + stack_trace("[type] reached on_finished_recipe without a human in selected_atoms to make a ghoul out of.") + to_chat(user, "The ritual has failed, there is no valid body.") + return FALSE + + soon_to_be_ghoul.grab_ghost() + + if(!soon_to_be_ghoul.mind || !soon_to_be_ghoul.client) + message_admins("[ADMIN_LOOKUPFLW(user)] is creating a voiceless dead of a body with no player.") + var/list/possible_ones = SSghost_spawns.poll_candidates("Do you want to play as [soon_to_be_ghoul.real_name], a voiceless dead?", ROLE_HERETIC, TRUE, 10 SECONDS, source = soon_to_be_ghoul) + if(!length(possible_ones)) + to_chat(user, "The ritual has failed, no spirits possessed the summon!") + return FALSE + var/mob/chosen_one = pick(possible_ones) + message_admins("[key_name_admin(chosen_one)] has taken control of ([key_name_admin(soon_to_be_ghoul)]) to replace an AFK player.") + soon_to_be_ghoul.ghostize(FALSE) + soon_to_be_ghoul.key = chosen_one.key + + selected_atoms -= soon_to_be_ghoul + make_ghoul(user, soon_to_be_ghoul) + return TRUE + +/// Makes [victim] into a ghoul. +/datum/heretic_knowledge/limited_amount/flesh_ghoul/proc/make_ghoul(mob/living/user, mob/living/carbon/human/victim) + message_admins("[ADMIN_LOOKUPFLW(user)] created a voiceless dead, [ADMIN_LOOKUPFLW(victim)].") + + victim.apply_status_effect( + /datum/status_effect/ghoul, + MUTE_MAX_HEALTH, + user.mind, + CALLBACK(src, PROC_REF(apply_to_ghoul)), + CALLBACK(src, PROC_REF(remove_from_ghoul)), + ) + +/// Callback for the ghoul status effect - Tracks all of our ghouls and applies effects +/datum/heretic_knowledge/limited_amount/flesh_ghoul/proc/apply_to_ghoul(mob/living/ghoul) + LAZYADD(created_items, ghoul.UID()) + ADD_TRAIT(ghoul, TRAIT_MUTE, MAGIC_TRAIT) + +/// Callback for the ghoul status effect - Tracks all of our ghouls and applies effects +/datum/heretic_knowledge/limited_amount/flesh_ghoul/proc/remove_from_ghoul(mob/living/ghoul) + LAZYREMOVE(created_items, ghoul.UID()) + REMOVE_TRAIT(ghoul, TRAIT_MUTE, MAGIC_TRAIT) + +/datum/heretic_knowledge/mark/flesh_mark + name = "Mark of Flesh" + desc = "Your Mansus Grasp now applies the Mark of Flesh. The mark is triggered from an attack with your Bloody Blade. \ + When triggered, the victim begins to bleed significantly." + gain_text = "That's when I saw them, the marked ones. They were out of reach. They screamed, and screamed." + + + mark_type = /datum/status_effect/eldritch/flesh + +/datum/heretic_knowledge/knowledge_ritual/flesh + +/datum/heretic_knowledge/spell/flesh_surgery + name = "Knitting of Flesh" + desc = "Grants you the spell Knit Flesh. This spell allows you to remove organs from victims \ + without requiring a lengthy surgery. This process is much longer if the target is not dead. \ + This spell also allows you to heal your minions and summons, or restore failing organs to acceptable status." + gain_text = "But they were not out of my reach for long. With every step, the screams grew, until at last \ + I learned that they could be silenced." + action_to_add = /datum/spell/touch/flesh_surgery + cost = 1 + +/datum/heretic_knowledge/summon/raw_prophet + name = "Raw Ritual" + desc = "Allows you to transmute a pair of eyes, a left arm, and a pool of blood to create a Raw Prophet. \ + Raw Prophets have a greatly increased sight range and x-ray vision, as well as a long range jaunt, \ + but are very fragile and weak in combat." + gain_text = "I could not continue alone. I was able to summon The Uncanny Man to help me see more. \ + The screams... once constant, now silenced by their wretched appearance. Nothing was out of reach." + required_atoms = list( + /obj/item/organ/internal/eyes = 1, + /obj/effect/decal/cleanable/blood = 1, + /obj/item/organ/external/arm = 1, + ) + banned_atom_types = list( + /obj/item/organ/external/arm/right + ) + + mob_to_summon = /mob/living/simple_animal/hostile/heretic_summon/raw_prophet + cost = 1 + + +/datum/heretic_knowledge/blade_upgrade/flesh + name = "Bleeding Steel" + desc = "Your Bloody Blade now causes enemies to bleed heavily on attack." + gain_text = "The Uncanny Man was not alone. They led me to the Marshal. \ + I finally began to understand. And then, blood rained from the heavens." + research_tree_icon_path = 'icons/ui_icons/antags/heretic/knowledge.dmi' + research_tree_icon_state = "blade_upgrade_flesh" + ///What type of wound do we apply on hit + +/datum/heretic_knowledge/blade_upgrade/flesh/do_melee_effects(mob/living/source, mob/living/target, obj/item/melee/sickly_blade/blade) + if(!iscarbon(target) || source == target) + return + + var/mob/living/carbon/carbon_target = target + carbon_target.bleed(50) + +/datum/heretic_knowledge/summon/stalker + name = "Lonely Ritual" + desc = "Allows you to transmute eyes, an arm, a pair of lungs, a pen and a piece of paper to create a Stalker. \ + Stalkers can jaunt, release EMPs, shapeshift into animals or automatons, and are strong in combat." + gain_text = "I was able to combine my greed and desires to summon an eldritch beast I had never seen before. \ + An ever shapeshifting mass of flesh, it knew well my goals. The Marshal approved." + + required_atoms = list( + /obj/item/organ/internal/eyes = 1, + /obj/item/organ/external/arm = 1, + /obj/item/organ/internal/lungs = 1, + /obj/item/pen = 1, + /obj/item/paper = 1, + ) + mob_to_summon = /mob/living/simple_animal/hostile/heretic_summon/stalker + mind_spell = /datum/spell/shapeshift/eldritch + cost = 1 + + + +/datum/heretic_knowledge/ultimate/flesh_final + name = "Priest's Final Hymn" + desc = "The ascension ritual of the Path of Flesh. \ + Bring 4 corpses to a transmutation rune to complete the ritual. \ + When completed, you gain the ability to shed your human form \ + and become the Lord of the Night, a supremely powerful creature. \ + Just the act of transforming causes nearby heathens great fear and trauma. \ + While in the Lord of the Night form, you can consume arms to heal and regain segments. \ + Additionally, you can summon three times as many Ghouls and Voiceless Dead, \ + and can create unlimited blades to arm them all." + gain_text = "With the Marshal's knowledge, my power had peaked. The throne was open to claim. \ + Men of this world, hear me, for the time has come! The Marshal guides my army! \ + Reality will bend to THE LORD OF THE NIGHT or be unraveled! WITNESS MY ASCENSION!" + required_atoms = list(/mob/living/carbon/human = 4) + + announcement_text = "%SPOOKY% Ever coiling vortex. Reality unfolded. ARMS OUTREACHED, THE LORD OF THE NIGHT, %NAME% has ascended! Fear the ever twisting hand! %SPOOKY%" + announcement_sound = 'sound/ambience/antag/heretic/ascend_flesh.ogg' + research_tree_icon_path = 'icons/ui_icons/antags/heretic/ascension.dmi' + research_tree_icon_state = "fleshascend" + +/datum/heretic_knowledge/ultimate/flesh_final/on_finished_recipe(mob/living/user, list/selected_atoms, turf/loc) + . = ..() + var/datum/spell/shapeshift/shed_human_form/worm_spell = new(user.mind) + user.AddSpell(worm_spell) + + var/datum/antagonist/heretic/heretic_datum = IS_HERETIC(user) + var/datum/heretic_knowledge/limited_amount/flesh_grasp/grasp_ghoul = heretic_datum.get_knowledge(/datum/heretic_knowledge/limited_amount/flesh_grasp) + grasp_ghoul.limit *= 3 + var/datum/heretic_knowledge/limited_amount/flesh_ghoul/ritual_ghoul = heretic_datum.get_knowledge(/datum/heretic_knowledge/limited_amount/flesh_ghoul) + ritual_ghoul.limit *= 3 + var/datum/heretic_knowledge/limited_amount/starting/base_flesh/blade_ritual = heretic_datum.get_knowledge(/datum/heretic_knowledge/limited_amount/starting/base_flesh) + blade_ritual.limit = 999 + +#undef GHOUL_MAX_HEALTH +#undef MUTE_MAX_HEALTH diff --git a/code/modules/antagonists/heretic/knowledge/general_side.dm b/code/modules/antagonists/heretic/knowledge/general_side.dm new file mode 100644 index 000000000000..19317e8b9af5 --- /dev/null +++ b/code/modules/antagonists/heretic/knowledge/general_side.dm @@ -0,0 +1,42 @@ +// Some general sidepath options. + +/datum/heretic_knowledge/reroll_targets + name = "The Relentless Heartbeat" + desc = "Allows you transmute a harebell, a book, and a jumpsuit while standing over a rune \ + to reroll your sacrifice targets." + gain_text = "The heart is the principle that continues and preserves." + required_atoms = list( + /obj/item/food/grown/harebell = 1, + /obj/item/book = 1, + /obj/item/clothing/under = 1, + ) + cost = 1 + research_tree_icon_path = 'icons/mob/actions/actions_animal.dmi' + research_tree_icon_state = "gaze" + +/datum/heretic_knowledge/reroll_targets/recipe_snowflake_check(mob/living/user, list/atoms, list/selected_atoms, turf/loc) + + var/datum/antagonist/heretic/heretic_datum = IS_HERETIC(user) + // Check first if they have a Living Heart. If it's missing, we should + // throw a fail to show the heretic that there's no point in rerolling + // if you don't have a heart to track the targets in the first place. + if(heretic_datum.has_living_heart() != HERETIC_HAS_LIVING_HEART) + to_chat(user, "The ritual failed, you have no living heart!") + return FALSE + + return TRUE + +/datum/heretic_knowledge/reroll_targets/on_finished_recipe(mob/living/user, list/selected_atoms, turf/loc) + var/datum/antagonist/heretic/heretic_datum = IS_HERETIC(user) + for(var/mob/living/carbon/human/target as anything in heretic_datum.sac_targets) + heretic_datum.remove_sacrifice_target(target) + + var/datum/heretic_knowledge/hunt_and_sacrifice/target_finder = heretic_datum.get_knowledge(/datum/heretic_knowledge/hunt_and_sacrifice) + if(!target_finder) + CRASH("Heretic datum didn't have a hunt_and_sacrifice knowledge learned, what?") + + if(!target_finder.obtain_targets(user, heretic_datum = heretic_datum)) + to_chat(user, "The ritual failed, there were no targets found!") + return FALSE + + return TRUE diff --git a/code/modules/antagonists/heretic/knowledge/lock_lore.dm b/code/modules/antagonists/heretic/knowledge/lock_lore.dm new file mode 100644 index 000000000000..b4da70a73dda --- /dev/null +++ b/code/modules/antagonists/heretic/knowledge/lock_lore.dm @@ -0,0 +1,217 @@ + +/datum/heretic_knowledge_tree_column/main/lock + neighbour_type_left = /datum/heretic_knowledge_tree_column/moon_to_lock + neighbour_type_right = /datum/heretic_knowledge_tree_column/lock_to_flesh + + route = PATH_LOCK + ui_bgr = "node_lock" + + start = /datum/heretic_knowledge/limited_amount/starting/base_knock + grasp = /datum/heretic_knowledge/lock_grasp + tier1 = /datum/heretic_knowledge/key_ring + mark = /datum/heretic_knowledge/mark/lock_mark + ritual_of_knowledge = /datum/heretic_knowledge/knowledge_ritual/lock + unique_ability = /datum/heretic_knowledge/limited_amount/concierge_rite + tier2 = /datum/heretic_knowledge/spell/burglar_finesse + blade = /datum/heretic_knowledge/blade_upgrade/flesh/lock + tier3 = /datum/heretic_knowledge/spell/caretaker_refuge + ascension = /datum/heretic_knowledge/ultimate/lock_final + +/datum/heretic_knowledge/limited_amount/starting/base_knock + name = "A Steward's Secret" + desc = "Opens up the Path of Lock to you. \ + Allows you to transmute a knife and a crowbar into a Key Blade. \ + You can only create two at a time and they function as fast crowbars. \ + In addition, they can fit into utility belts." + gain_text = "The Locked Labyrinth leads to freedom. But only the trapped Stewards know the correct path." + required_atoms = list( + /obj/item/kitchen/knife = 1, + /obj/item/crowbar = 1, + ) + result_atoms = list(/obj/item/melee/sickly_blade/lock) + limit = 2 + research_tree_icon_path = 'icons/obj/weapons/khopesh.dmi' + research_tree_icon_state = "key_blade" + +/datum/heretic_knowledge/lock_grasp + name = "Grasp of Lock" + desc = "Your mansus grasp allows you to access *mostly* anything! Alt click on an airlock or a locker to force it open. \ + DNA locks on mechs will be removed, and any pilot will be ejected. \ + Makes a distinctive knocking sound on use." + gain_text = "Nothing may remain closed from my touch." + cost = 1 + research_tree_icon_path = 'icons/ui_icons/antags/heretic/knowledge.dmi' + research_tree_icon_state = "grasp_lock" + +/datum/heretic_knowledge/lock_grasp/on_gain(mob/user, datum/antagonist/heretic/our_heretic) + RegisterSignal(user, COMSIG_HERETIC_MANSUS_GRASP_ATTACK_SECONDARY, PROC_REF(on_secondary_mansus_grasp)) + +/datum/heretic_knowledge/lock_grasp/on_lose(mob/user, datum/antagonist/heretic/our_heretic) + UnregisterSignal(user, COMSIG_HERETIC_MANSUS_GRASP_ATTACK_SECONDARY) + + +/datum/heretic_knowledge/lock_grasp/proc/on_secondary_mansus_grasp(mob/living/source, atom/target) + SIGNAL_HANDLER + + if(ismecha(target)) + var/obj/mecha/mecha = target + mecha.dna = null + mecha.operation_req_access = list() + for(var/mob/living/occupant as anything in mecha.occupant) + if(issilicon(occupant)) + continue + INVOKE_ASYNC(src, PROC_REF(try_kick_out), mecha, occupant) + else if(istype(target, /obj/machinery/door/airlock)) + INVOKE_ASYNC(src, PROC_REF(try_open_airlock), target) + else if(istype(target, /obj/structure/closet)) + INVOKE_ASYNC(src, PROC_REF(try_open_closet), target) + + + playsound(target, 'sound/magic/hereticknock.ogg', 100, TRUE, -1) + + return COMPONENT_USE_HAND + +/datum/heretic_knowledge/lock_grasp/proc/try_open_airlock(obj/machinery/door/airlock/ourlock) + ourlock.unlock() + ourlock.open() + +/datum/heretic_knowledge/lock_grasp/proc/try_open_closet(obj/structure/closet/C) + if(istype(C, /obj/structure/closet/secure_closet)) + var/obj/structure/closet/secure_closet/SC = C + SC.locked = FALSE + C.open() + +/datum/heretic_knowledge/lock_grasp/proc/try_kick_out(obj/mecha/mecha, mob/living/occupant) + mecha.go_out(1) + occupant.Weaken(5 SECONDS) + + +/datum/heretic_knowledge/key_ring + name = "Key Keeper’s Burden" + desc = "Allows you to transmute a wallet, an iron rod, and an ID card to create an Eldritch Card. \ + Hit a pair of airlocks with it to create a pair of portals, which will teleport you between them, but teleport non-heretics randomly. \ + You can ctrl-click the card to invert this behavior for created portals. \ + Each card may only sustain a single pair of portals at the same time. \ + It also functions and appears the same as a regular ID Card. \ + Attacking it with a normal ID card consumes it and gains its access, and you can use it in-hand to change its appearance to a card you fused. \ + Does not preserve the card originally used in the ritual." + gain_text = "The Keeper sneered. \"These plastic rectangles are a mockery of keys, and I curse every door that desires them.\"" + required_atoms = list( + /obj/item/storage/wallet = 1, + /obj/item/stack/rods = 1, + /obj/item/card/id = 1, + ) + result_atoms = list(/obj/item/card/id/heretic) + cost = 1 + research_tree_icon_path = 'icons/obj/card.dmi' + research_tree_icon_state = "card_gold" + + +/datum/heretic_knowledge/mark/lock_mark + name = "Mark of Lock" + desc = "Your Mansus Grasp now applies the Mark of Lock. \ + Attack a marked person to bar them from all passages for the duration of the mark. \ + This will make it so that they have no access whatsoever, even public access doors will reject them." + gain_text = "The Gatekeeper was a corrupt Steward. She hindered her fellows for her own twisted amusement." + mark_type = /datum/status_effect/eldritch/lock + +/datum/heretic_knowledge/knowledge_ritual/lock + +/datum/heretic_knowledge/limited_amount/concierge_rite // item that creates 3 max at a time heretic only barriers, probably should limit to 1 only, holy people can also pass + name = "Concierge's Rite" + desc = "Allows you to transmute a crayon, a wooden plank, and a multitool to create a Labyrinth Handbook. \ + It can materialize a barricade at range that only you and people resistant to magic can pass. 3 uses." + gain_text = "The Concierge scribbled my name into the Handbook. \"Welcome to your new home, fellow Steward.\"" + required_atoms = list( + /obj/item/toy/crayon = 1, + /obj/item/stack/sheet/wood = 1, + /obj/item/multitool = 1, + ) + result_atoms = list(/obj/item/heretic_labyrinth_handbook) + limit = 2 + cost = 1 + research_tree_icon_path = 'icons/obj/library.dmi' + research_tree_icon_state = "heretichandbook" + +/datum/heretic_knowledge/spell/burglar_finesse + name = "Burglar's Finesse" + desc = "Grants you Burglar's Finesse, a single-target spell \ + that puts a random item from the victims backpack into your hand." + gain_text = "Consorting with Burglar spirits is frowned upon, but a Steward will always want to learn about new doors." + + action_to_add = /datum/spell/pointed/burglar_finesse + cost = 1 + +/datum/heretic_knowledge/blade_upgrade/flesh/lock //basically a chance-based limb opening + name = "Opening Blade" + desc = "Your blade has a chance to open an limb on attack." + gain_text = "The Pilgrim-Surgeon was not an Steward. Nonetheless, its blades and sutures proved a match for their keys." + research_tree_icon_path = 'icons/ui_icons/antags/heretic/knowledge.dmi' + research_tree_icon_state = "blade_upgrade_lock" + var/chance = 35 + +/datum/heretic_knowledge/blade_upgrade/flesh/lock/do_melee_effects(mob/living/source, mob/living/target, obj/item/melee/sickly_blade/blade) + if(prob(chance) && ishuman(target)) + var/obj/item/organ/external/lockbox = target.get_organ(source.zone_selected) + lockbox.open = ORGAN_ORGANIC_VIOLENT_OPEN + return ..() + +/datum/heretic_knowledge/spell/caretaker_refuge + name = "Caretaker’s Last Refuge" + desc = "Gives you a spell that makes you transparent and not dense. Cannot be used near living sentient beings. \ + While in refuge, you cannot use your hands or spells, and you are immune to slowdown. \ + You are invincible but unable to harm anything. Cancelled by being hit with an anti-magic item." + gain_text = "Jealously, the Guard and the Hound hunted me. But I unlocked my form, and was but a haze, untouchable." + action_to_add = /datum/spell/caretaker + cost = 1 + +/datum/heretic_knowledge/ultimate/lock_final + name = "Unlock the Labyrinth" + desc = "The ascension ritual of the Path of Knock. \ + Bring 3 corpses without organs in their torso to a transmutation rune to complete the ritual. \ + When completed, you gain the ability to transform into empowered eldritch creatures \ + and your keyblades will become even deadlier. \ + In addition, you will create a tear to the Labyrinth's heart; \ + a tear in reality located at the site of this ritual. \ + Eldritch creatures will endlessly pour from this rift \ + who are bound to obey your instructions." + gain_text = "The Stewards guided me, and I guided them. \ + My foes were the Locks and my blades were the Key! \ + The Labyrinth will be Locked no more, and freedom will be ours! WITNESS US!" + required_atoms = list(/mob/living/carbon/human = 3) + + announcement_text = "Delta-class dimensional anomaly detec%SPOOKY% Reality rended, torn. Gates open, doors open, %NAME% has ascended! Fear the tide! %SPOOKY%" + announcement_sound = 'sound/ambience/antag/heretic/ascend_knock.ogg' + research_tree_icon_path = 'icons/ui_icons/antags/heretic/ascension.dmi' + research_tree_icon_state = "lockascend" + +/datum/heretic_knowledge/ultimate/lock_final/recipe_snowflake_check(mob/living/user, list/atoms, list/selected_atoms, turf/loc) + . = ..() + if(!.) + return FALSE + + for(var/mob/living/carbon/human/body in atoms) + if(body.stat != DEAD) + continue + var/obj/item/organ/external/affecting = body.get_organ(BODY_ZONE_CHEST) + if(length(affecting.contents)) + to_chat(user, "[body] has organs in their chest.") + continue + + selected_atoms += body + + if(!LAZYLEN(selected_atoms)) + to_chat(user, "The ritual has failed, you do not have enough valid bodies.") + return FALSE + return TRUE + +/datum/heretic_knowledge/ultimate/lock_final/on_finished_recipe(mob/living/user, list/selected_atoms, turf/loc) + . = ..() + // buffs + var/datum/spell/shapeshift/eldritch/ascension/transform_spell = new(user.mind) + user.AddSpell(transform_spell) + + var/datum/antagonist/heretic/heretic_datum = IS_HERETIC(user) + var/datum/heretic_knowledge/blade_upgrade/flesh/lock/blade_upgrade = heretic_datum.get_knowledge(/datum/heretic_knowledge/blade_upgrade/flesh/lock) + blade_upgrade.chance += 30 + new /obj/structure/lock_tear(loc, user.mind) diff --git a/code/modules/antagonists/heretic/knowledge/moon_lore.dm b/code/modules/antagonists/heretic/knowledge/moon_lore.dm new file mode 100644 index 000000000000..0b70abdcd6cf --- /dev/null +++ b/code/modules/antagonists/heretic/knowledge/moon_lore.dm @@ -0,0 +1,179 @@ + +/datum/heretic_knowledge_tree_column/main/moon + neighbour_type_left = /datum/heretic_knowledge_tree_column/ash_to_moon + neighbour_type_right = /datum/heretic_knowledge_tree_column/moon_to_lock + + route = PATH_MOON + ui_bgr = "node_moon" + + start = /datum/heretic_knowledge/limited_amount/starting/base_moon + grasp = /datum/heretic_knowledge/moon_grasp + tier1 = /datum/heretic_knowledge/spell/moon_smile + mark = /datum/heretic_knowledge/mark/moon_mark + ritual_of_knowledge = /datum/heretic_knowledge/knowledge_ritual/moon + unique_ability = /datum/heretic_knowledge/spell/moon_parade + tier2 = /datum/heretic_knowledge/moon_amulet + blade = /datum/heretic_knowledge/blade_upgrade/moon + tier3 = /datum/heretic_knowledge/spell/moon_ringleader + ascension = /datum/heretic_knowledge/ultimate/moon_final + +/datum/heretic_knowledge/limited_amount/starting/base_moon + name = "Moonlight Troupe" + desc = "Opens up the Path of Moon to you. \ + Allows you to transmute 2 sheets of iron and a knife into an Lunar Blade. \ + You can only create two at a time." + gain_text = "Under the light of the moon the laughter echoes." + required_atoms = list( + /obj/item/kitchen/knife = 1, + /obj/item/stack/sheet/metal = 2, + ) + result_atoms = list(/obj/item/melee/sickly_blade/moon) + research_tree_icon_path = 'icons/obj/weapons/khopesh.dmi' + research_tree_icon_state = "moon_blade" + +/datum/heretic_knowledge/moon_grasp + name = "Grasp of Lunacy" + desc = "Your Mansus Grasp will cause your victims to hallucinate everyone as lunar mass, \ + and hides your identity for a short duration." + gain_text = "The troupe on the side of the moon showed me truth, and I took it." + cost = 1 + research_tree_icon_path = 'icons/ui_icons/antags/heretic/knowledge.dmi' + research_tree_icon_state = "grasp_moon" + +/datum/heretic_knowledge/moon_grasp/on_gain(mob/user, datum/antagonist/heretic/our_heretic) + RegisterSignal(user, COMSIG_HERETIC_MANSUS_GRASP_ATTACK, PROC_REF(on_mansus_grasp)) + +/datum/heretic_knowledge/moon_grasp/on_lose(mob/user, datum/antagonist/heretic/our_heretic) + UnregisterSignal(user, COMSIG_HERETIC_MANSUS_GRASP_ATTACK) + +/datum/heretic_knowledge/moon_grasp/proc/on_mansus_grasp(mob/living/source, mob/living/target) + SIGNAL_HANDLER + if(target.can_block_magic(MAGIC_RESISTANCE_MIND)) + to_chat(target, "You hear echoing laughter from above..but it is dull and distant.") + return + + source.apply_status_effect(/datum/status_effect/moon_grasp_hide) + + if(!iscarbon(target)) + return + var/mob/living/carbon/carbon_target = target + to_chat(carbon_target, "You hear echoing laughter from above") + new /obj/effect/hallucination/delusion(get_turf(carbon_target), carbon_target, 'icons/effects/eldritch.dmi', "heretic") + carbon_target.adjustBrainLoss(15) + +/datum/heretic_knowledge/spell/moon_smile + name = "Smile of the moon" + desc = "Grants you Smile of the moon, a ranged spell muting, blinding, deafening and knocking down the target for a\ + duration based on their sanity." + gain_text = "The moon smiles upon us all and those who see its true side can bring its joy." + + action_to_add = /datum/spell/pointed/moon_smile + cost = 1 + +/datum/heretic_knowledge/mark/moon_mark + name = "Mark of Moon" + desc = "Your Mansus Grasp now applies the Mark of Moon, pacifying the victim until attacked. \ + The mark can also be triggered from an attack with your Moon Blade, leaving the victim confused." + gain_text = "The troupe on the moon would dance all day long \ + and in that dance the moon would smile upon us \ + but when the night came its smile would dull forced to gaze on the earth." + mark_type = /datum/status_effect/eldritch/moon + +/datum/heretic_knowledge/knowledge_ritual/moon + +/datum/heretic_knowledge/spell/moon_parade + name = "Lunar Parade" + desc = "Grants you Lunar Parade, a spell that - after a short charge - sends a carnival forward \ + when hitting someone they are forced to join the parade and suffer hallucinations." + gain_text = "The music like a reflection of the soul compelled them, like moths to a flame they followed" + action_to_add = /datum/spell/fireball/moon_parade + cost = 1 + +/datum/heretic_knowledge/moon_amulet + name = "Moonlight Amulet" + desc = "Allows you to transmute 2 sheets of glass, a heart and a tie to create a Moonlight Amulet. \ + If the item is used on someone with low sanity they go berserk attacking everyone, \ + if their sanity isn't low enough it decreases their mood." + gain_text = "At the head of the parade he stood, the moon condensed into one mass, a reflection of the soul." + + required_atoms = list( + /obj/item/organ/internal/heart = 1, + /obj/item/stack/sheet/glass = 2, + /obj/item/clothing/neck/tie = 1, + ) + result_atoms = list(/obj/item/clothing/neck/heretic_focus/moon_amulet) + cost = 1 + + + research_tree_icon_path = 'icons/obj/antags/eldritch.dmi' + research_tree_icon_state = "moon_amulette" + research_tree_icon_frame = 9 + +/datum/heretic_knowledge/blade_upgrade/moon + name = "Moonlight Blade" + desc = "Your blade now deals brain damage, causes random hallucinations and does sanity damage." + gain_text = "His wit was sharp as a blade, cutting through the lie to bring us joy." + + + research_tree_icon_path = 'icons/ui_icons/antags/heretic/knowledge.dmi' + research_tree_icon_state = "blade_upgrade_moon" + +/datum/heretic_knowledge/blade_upgrade/moon/do_melee_effects(mob/living/source, mob/living/target, obj/item/melee/sickly_blade/blade) + if(source == target || !isliving(target)) + return + + if(target.can_block_magic(MAGIC_RESISTANCE_MIND)) + return + + target.adjustBrainLoss(10) + target.Hallucinate(10 SECONDS) + target.emote(pick("giggle", "laugh")) + +/datum/heretic_knowledge/spell/moon_ringleader + name = "Ringleaders Rise" + desc = "Grants you Ringleaders Rise, an AoE spell that deals more brain damage the lower the sanity of everyone in the AoE \ + and causes hallucinations, with those who have less sanity getting more. \ + If their sanity is low enough this turns them insane, the spell then halves their sanity." + gain_text = "I grabbed his hand and we rose, those who saw the truth rose with us. \ + The ringleader pointed up and the dim light of truth illuminated us further." + + action_to_add = /datum/spell/aoe/moon_ringleader + cost = 1 + + + research_tree_icon_frame = 5 + +/datum/heretic_knowledge/ultimate/moon_final + name = "The Last Act" + desc = "The ascension ritual of the Path of Moon. \ + Bring 3 corpses with more than 50 brain damage to a transmutation rune to complete the ritual. \ + When completed, you become a harbinger of madness gaining and aura of passive sanity decrease, \ + confusion increase and, if their sanity is low enough, brain damage and blindness. \ + 1/5th of the crew will turn into acolytes and follow your command, they will all receive moonlight amulets." + gain_text = "We dived down towards the crowd, his soul splitting off in search of greater venture \ + for where the Ringleader had started the parade, I shall continue it unto the suns demise \ + WITNESS MY ASCENSION, THE MOON SMILES ONCE MORE AND FOREVER MORE IT SHALL!" + + announcement_text = "%SPOOKY% Laugh, for the ringleader %NAME% has ascended! \ + The truth shall finally devour the lie! %SPOOKY%" + announcement_sound = 'sound/ambience/antag/heretic/ascend_moon.ogg' + research_tree_icon_path = 'icons/ui_icons/antags/heretic/ascension.dmi' + research_tree_icon_state = "moonascend" + +/datum/heretic_knowledge/ultimate/moon_final/is_valid_sacrifice(mob/living/sacrifice) +//Qwertodo: redo this entire ultimate lmaoooo + var/brain_damage = sacrifice.getBrainLoss() + // Checks if our target has enough brain damage + if(brain_damage < 50) + return FALSE + + return ..() + +/datum/heretic_knowledge/ultimate/moon_final/on_finished_recipe(mob/living/user, list/selected_atoms, turf/loc) + . = ..() + message_admins("QWERTODO: THIS") + +/datum/heretic_knowledge/ultimate/moon_final/proc/on_life(mob/living/source, seconds_per_tick, times_fired) + var/obj/effect/moon_effect = /obj/effect/temp_visual/moon_ringleader + SIGNAL_HANDLER + message_admins("QWERTODO: THIS") diff --git a/code/modules/antagonists/heretic/knowledge/rust_lore.dm b/code/modules/antagonists/heretic/knowledge/rust_lore.dm new file mode 100644 index 000000000000..bfc0a3466c9e --- /dev/null +++ b/code/modules/antagonists/heretic/knowledge/rust_lore.dm @@ -0,0 +1,293 @@ + +/datum/heretic_knowledge_tree_column/main/rust + neighbour_type_left = /datum/heretic_knowledge_tree_column/blade_to_rust + neighbour_type_right = /datum/heretic_knowledge_tree_column/rust_to_cosmic + + route = PATH_RUST + ui_bgr = "node_rust" + + start = /datum/heretic_knowledge/limited_amount/starting/base_rust + grasp = /datum/heretic_knowledge/rust_fist + tier1 = /datum/heretic_knowledge/rust_regen + mark = /datum/heretic_knowledge/mark/rust_mark + ritual_of_knowledge = /datum/heretic_knowledge/knowledge_ritual/rust + unique_ability = /datum/heretic_knowledge/spell/rust_construction + tier2 = /datum/heretic_knowledge/spell/area_conversion + blade = /datum/heretic_knowledge/blade_upgrade/rust + tier3 = /datum/heretic_knowledge/spell/entropic_plume + ascension = /datum/heretic_knowledge/ultimate/rust_final + +/datum/heretic_knowledge/limited_amount/starting/base_rust + name = "Blacksmith's Tale" + desc = "Opens up the Path of Rust to you. \ + Allows you to transmute a knife with any trash item into a Rusty Blade. \ + You can only create two at a time." + gain_text = "\"Let me tell you a story\", said the Blacksmith, as he gazed deep into his rusty blade." + required_atoms = list( + /obj/item/kitchen/knife = 1, + /obj/item/trash = 1, + ) + result_atoms = list(/obj/item/melee/sickly_blade/rust) + research_tree_icon_path = 'icons/obj/weapons/khopesh.dmi' + research_tree_icon_state = "rust_blade" + +/datum/heretic_knowledge/rust_fist + name = "Grasp of Rust" + desc = "Your Mansus Grasp will deal 500 damage to non-living matter and rust any surface it touches. \ + Already rusted surfaces are destroyed. Surfaces and structures can only be rusted by using Alt-Click. \ + Allows you to rust basic iron walls and floors." + gain_text = "On the ceiling of the Mansus, rust grows as moss does on a stone." + cost = 1 + research_tree_icon_path = 'icons/ui_icons/antags/heretic/knowledge.dmi' + research_tree_icon_state = "grasp_rust" + +/datum/heretic_knowledge/rust_fist/on_gain(mob/user, datum/antagonist/heretic/our_heretic) + RegisterSignal(user, COMSIG_HERETIC_MANSUS_GRASP_ATTACK, PROC_REF(on_mansus_grasp)) + RegisterSignal(user, COMSIG_HERETIC_MANSUS_GRASP_ATTACK_SECONDARY, PROC_REF(on_secondary_mansus_grasp)) + our_heretic.increase_rust_strength() + +/datum/heretic_knowledge/rust_fist/on_lose(mob/user, datum/antagonist/heretic/our_heretic) + UnregisterSignal(user, list(COMSIG_HERETIC_MANSUS_GRASP_ATTACK, COMSIG_HERETIC_MANSUS_GRASP_ATTACK_SECONDARY)) + +/datum/heretic_knowledge/rust_fist/proc/on_mansus_grasp(mob/living/source, mob/living/target) + SIGNAL_HANDLER + + if(!issilicon(target) && !(target.mob_biotypes & MOB_ROBOTIC)) + return + + source.do_rust_heretic_act(target) + +/datum/heretic_knowledge/rust_fist/proc/on_secondary_mansus_grasp(mob/living/source, atom/target) + SIGNAL_HANDLER + + // Rusting an airlock causes it to lose power, mostly to prevent the airlock from shocking you. + // This is a bit of a hack, but fixing this would require the entire wire cut/pulse system to be reworked. + if(istype(target, /obj/machinery/door/airlock)) + var/obj/machinery/door/airlock/airlock = target + airlock.loseMainPower() + + source.do_rust_heretic_act(target) + return COMPONENT_USE_HAND + +/datum/heretic_knowledge/rust_regen + name = "Leeching Walk" + desc = "Grants you passive healing and resistance to batons while standing over rust." + gain_text = "The speed was unparalleled, the strength unnatural. The Blacksmith was smiling." + cost = 1 + research_tree_icon_path = 'icons/effects/eldritch.dmi' + research_tree_icon_state = "cloud_swirl" + + +/datum/heretic_knowledge/rust_regen/on_gain(mob/user, datum/antagonist/heretic/our_heretic) + user.AddElement(/datum/element/leeching_walk) + +/datum/heretic_knowledge/rust_regen/on_lose(mob/user, datum/antagonist/heretic/our_heretic) + user.RemoveElement(/datum/element/leeching_walk) + +/datum/heretic_knowledge/mark/rust_mark + name = "Mark of Rust" + desc = "Your Mansus Grasp now applies the Mark of Rust. The mark is triggered from an attack with your Rusty Blade. \ + When triggered, your victim will suffer heavy disgust and confusion. \ + Allows you to rust reinforced walls and floors as well as plasteel." + gain_text = "The Blacksmith looks away. To a place lost long ago. \"Rusted Hills help those in dire need... at a cost.\"" + mark_type = /datum/status_effect/eldritch/rust + +/datum/heretic_knowledge/mark/rust_mark/on_gain(mob/user, datum/antagonist/heretic/our_heretic) + . = ..() + our_heretic.increase_rust_strength() + +/datum/heretic_knowledge/knowledge_ritual/rust + +/datum/heretic_knowledge/spell/rust_construction + name = "Rust Construction" + desc = "Grants you Rust Construction, a spell that allows you to raise a wall out of a rusted floor. \ + Anyone overtop the wall will be throw aside (or upwards) and sustain damage." + gain_text = "Images of foreign and ominous structures began to dance in my mind. Covered head to toe in thick rust, \ + they no longer looked man made. Or perhaps they never were in the first place." + action_to_add = /datum/spell/pointed/rust_construction + cost = 1 + +/datum/heretic_knowledge/spell/area_conversion + name = "Aggressive Spread" + desc = "Grants you Aggressive Spread, a spell that spreads rust to nearby surfaces. \ + Already rusted surfaces are destroyed \ Also improves the rusting abilities of non rust-heretics." + gain_text = "All wise men know well not to visit the Rusted Hills... Yet the Blacksmith's tale was inspiring." + action_to_add = /datum/spell/aoe/rust_conversion + cost = 1 + research_tree_icon_frame = 5 + +/datum/heretic_knowledge/spell/area_conversion/on_gain(mob/user, datum/antagonist/heretic/our_heretic) + . = ..() + our_heretic.increase_rust_strength(TRUE) + +/datum/heretic_knowledge/blade_upgrade/rust + name = "Toxic Blade" + desc = "Your Rusty Blade now disgusts enemies on attack \ Allows you to rust Titanium and Plastitanium.." + gain_text = "The Blacksmith hands you their blade. \"The Blade will guide you through the flesh, should you let it.\" \ + The heavy rust weights it down. You stare deeply into it. The Rusted Hills call for you, now." + research_tree_icon_path = 'icons/ui_icons/antags/heretic/knowledge.dmi' + research_tree_icon_state = "blade_upgrade_rust" + +/datum/heretic_knowledge/blade_upgrade/rust/on_gain(mob/user, datum/antagonist/heretic/our_heretic) + . = ..() + our_heretic.increase_rust_strength() + +/datum/heretic_knowledge/blade_upgrade/rust/do_melee_effects(mob/living/source, mob/living/target, obj/item/melee/sickly_blade/blade) + if(source == target || !isliving(target)) + return + target.adjust_disgust(50 SECONDS) + +/datum/heretic_knowledge/spell/area_conversion/on_gain(mob/user, datum/antagonist/heretic/our_heretic) + . = ..() +/datum/heretic_knowledge/spell/entropic_plume + name = "Entropic Plume" + desc = "Grants you Entropic Plume, a spell that releases a vexing wave of Rust. \ + Blinds, poisons, and inflicts Amok on any heathen it hits, causing them to strike \ + at friend or foe wildly. Also rusts and destroys and surfaces it hits and improves the rusting abilities of non-rust heretics." + gain_text = "The corrosion was unstoppable. The rust was unpleasable. \ + The Blacksmith was gone, and you hold their blade. Champions of hope, the Rustbringer is nigh!" + + action_to_add = /datum/spell/cone/staggered/entropic_plume + cost = 1 + + + +/datum/heretic_knowledge/spell/entropic_plume/on_gain(mob/user) + . = ..() + var/datum/antagonist/heretic/our_heretic = IS_HERETIC(user) + our_heretic.increase_rust_strength(TRUE) + +/datum/heretic_knowledge/ultimate/rust_final + name = "Rustbringer's Oath" + desc = "The ascension ritual of the Path of Rust. \ + Bring 3 corpses to a transmutation rune on the bridge of the station to complete the ritual. \ + When completed, the ritual site will endlessly spread rust onto any surface, stopping for nothing. \ + Additionally, you will become extremely resilient on rust, healing at triple the rate \ + and becoming immune to many effects and dangers \ You will be able to rust almost anything upon ascending." + gain_text = "Champion of rust. Corruptor of steel. Fear the dark, for the RUSTBRINGER has come! \ + The Blacksmith forges ahead! Rusted Hills, CALL MY NAME! WITNESS MY ASCENSION!" + + announcement_text = "%SPOOKY% Fear the decay, for the Rustbringer, %NAME% has ascended! None shall escape the corrosion! %SPOOKY%" + announcement_sound = 'sound/ambience/antag/heretic/ascend_rust.ogg' + research_tree_icon_path = 'icons/ui_icons/antags/heretic/ascension.dmi' + research_tree_icon_state = "rustascend" + /// If TRUE, then immunities are currently active. + var/immunities_active = FALSE + /// A typepath to an area that we must finish the ritual in. + var/area/ritual_location = /area/station/command/bridge + /// A static list of traits we give to the heretic when on rust. + var/static/list/conditional_immunities = list( + TRAIT_BOMBIMMUNE, + TRAIT_IGNORESLOWDOWN, + TRAIT_NOSLIP, + TRAIT_NOBREATH, + TRAIT_PIERCEIMMUNE, + TRAIT_RADIMMUNE, + TRAIT_RESISTCOLD, + TRAIT_RESISTHEAT, + TRAIT_RESISTHIGHPRESSURE, + TRAIT_RESISTLOWPRESSURE, + TRAIT_SHOCKIMMUNE, + TRAIT_IGNOREDAMAGESLOWDOWN, + ) //QWERTODO: STUN IMMUNITY ON RUST + +/datum/heretic_knowledge/ultimate/rust_final/on_research(mob/user, datum/antagonist/heretic/our_heretic) + . = ..() + // This map doesn't have a Bridge, for some reason?? + // Let them complete the ritual anywhere + //if(!GLOB.areas_by_type[ritual_location]) + //ritual_location = null + +/datum/heretic_knowledge/ultimate/rust_final/recipe_snowflake_check(mob/living/user, list/atoms, list/selected_atoms, turf/loc) + if(ritual_location) + var/area/our_area = get_area(loc) + if(!istype(our_area, ritual_location)) + to_chat(user, "The ritual has failed, it must be done in [initial(ritual_location.name)]!") + return FALSE + + return ..() + +/datum/heretic_knowledge/ultimate/rust_final/on_finished_recipe(mob/living/user, list/selected_atoms, turf/loc) + . = ..() + trigger(loc) + RegisterSignal(user, COMSIG_MOVABLE_MOVED, PROC_REF(on_move)) + RegisterSignal(user, COMSIG_LIVING_LIFE, PROC_REF(on_life)) + var/datum/spell/aoe/rust_conversion/rust_spread_spell = locate() in user.actions + rust_spread_spell?.base_cooldown /= 2 + +/datum/heretic_knowledge/ultimate/rust_final/proc/trigger(turf/center) + var/greatest_dist = 0 + var/list/turfs_to_transform = list() + for(var/turf/transform_turf as anything in GLOB.station_turfs) + if(transform_turf.flags & NO_RUST) + continue + var/dist = get_dist(center, transform_turf) + if(dist > greatest_dist) + greatest_dist = dist + if(!turfs_to_transform["[dist]"]) + turfs_to_transform["[dist]"] = list() + turfs_to_transform["[dist]"] += transform_turf + + for(var/iterator in 1 to greatest_dist) + if(!turfs_to_transform["[iterator]"]) + continue + addtimer(CALLBACK(src, PROC_REF(transform_area), turfs_to_transform["[iterator]"]), (5 SECONDS) * iterator) + +/datum/heretic_knowledge/ultimate/rust_final/proc/transform_area(list/turfs) + turfs = shuffle(turfs) + var/numturfs = length(turfs) + var/first_third = turfs.Copy(1, round(numturfs * 0.33)) + var/second_third = turfs.Copy(round(numturfs * 0.33), round(numturfs * 0.66)) + var/third_third = turfs.Copy(round(numturfs * 0.66), numturfs) + addtimer(CALLBACK(src, PROC_REF(delay_transform_turfs), first_third), 5 SECONDS) + addtimer(CALLBACK(src, PROC_REF(delay_transform_turfs), second_third), 5 SECONDS * 0.33) + addtimer(CALLBACK(src, PROC_REF(delay_transform_turfs), third_third), 5 SECONDS * 0.66) + +/datum/heretic_knowledge/ultimate/rust_final/proc/delay_transform_turfs(list/turfs) + for(var/turf/turf as anything in turfs) + turf.rust_heretic_act(5) + CHECK_TICK + +/** + * Signal proc for [COMSIG_MOVABLE_MOVED]. + * + * Gives our heretic ([source]) buffs if they stand on rust. + */ +/datum/heretic_knowledge/ultimate/rust_final/proc/on_move(mob/living/source, atom/old_loc, dir, forced, list/old_locs) + SIGNAL_HANDLER + + // If we're on a rusty turf, and haven't given out our traits, buff our guy + var/turf/our_turf = get_turf(source) + if(HAS_TRAIT(our_turf, TRAIT_RUSTY)) + if(!immunities_active) + source.add_traits(conditional_immunities, type) + immunities_active = TRUE + + // If we're not on a rust turf, and we have given out our traits, nerf our guy + else + if(immunities_active) + source.remove_traits(conditional_immunities, type) + immunities_active = FALSE + +/** + * Signal proc for [COMSIG_LIVING_LIFE]. + * + * Gradually heals the heretic ([source]) on rust. + */ +/datum/heretic_knowledge/ultimate/rust_final/proc/on_life(mob/living/source, seconds_per_tick, times_fired) + SIGNAL_HANDLER + //qwertodo: nerf this to the ground lmao + var/turf/our_turf = get_turf(source) + if(!HAS_TRAIT(our_turf, TRAIT_RUSTY)) + return + var/base_heal_amt = 2.5 + var/need_mob_update = FALSE + need_mob_update += source.adjustBruteLoss(-base_heal_amt, updating_health = FALSE) + need_mob_update += source.adjustFireLoss(-base_heal_amt, updating_health = FALSE) + need_mob_update += source.adjustToxLoss(-base_heal_amt, updating_health = FALSE) + need_mob_update += source.adjustOxyLoss(-base_heal_amt, updating_health = FALSE) + need_mob_update += source.adjustStaminaLoss(-base_heal_amt * 4, updating = FALSE) + if(source.blood_volume < BLOOD_VOLUME_NORMAL) + source.blood_volume += base_heal_amt + if(need_mob_update) + source.updatehealth() diff --git a/code/modules/antagonists/heretic/knowledge/sacrifice_knowledge/sacrifice_buff.dm b/code/modules/antagonists/heretic/knowledge/sacrifice_knowledge/sacrifice_buff.dm new file mode 100644 index 000000000000..30ee20c85d22 --- /dev/null +++ b/code/modules/antagonists/heretic/knowledge/sacrifice_knowledge/sacrifice_buff.dm @@ -0,0 +1,80 @@ +// A buff given to people sacrificed to help them survive. + +/// Screen alert for the below status effect. +/atom/movable/screen/alert/status_effect/unholy_determination + name = "Unholy Determination" + desc = "You appear in a unfamiliar room. The darkness begins to close in. Panic begins to set in. There is no time. Fight on, or die!" + icon_state = "wounded" + +/// The buff given to people within the shadow realm to assist them in surviving. +/datum/status_effect/unholy_determination + id = "unholy_determination" + duration = 3 MINUTES // Given a default duration so no one gets to hold onto this buff forever by accident. + tick_interval = 1 SECONDS + alert_type = /atom/movable/screen/alert/status_effect/unholy_determination + /// How much to heal every second + var/heal_per_second = 0.25 + +/datum/status_effect/unholy_determination/on_creation(mob/living/new_owner, set_duration) + if(isnum(set_duration)) + duration = set_duration + return ..() + + +/datum/status_effect/unholy_determination/tick() + // The amount we heal of each damage type per tick. + var/healing_amount = heal_per_second + + // In softcrit you're, strong enough to stay up. + if(owner.health <= 0 && owner.health >= -100) + if(prob(5)) + to_chat(owner, "Your body feels like giving up, but you fight on!") + healing_amount *= 2 + // ...But reach hardcrit and you're done. You now die faster. + if(owner.health < -100) + if(prob(5)) + to_chat(owner, "You can't hold on for much longer...") + healing_amount *= -0.5 + + if(owner.health > 0 && prob(4)) + owner.AdjustJitter(20 SECONDS) + owner.AdjustDizzy(10 SECONDS) + owner.AdjustHallucinate(10 SECONDS) + + if(prob(2)) + playsound(owner, pick(CREEPY_SOUNDS), 50, TRUE) + + adjust_all_damages(healing_amount) + +/* + * Heals up all the owner a bit, fire stacks and losebreath included. + */ +/datum/status_effect/unholy_determination/proc/adjust_all_damages(amount) + + owner.adjust_fire_stacks(-1) + if(ishuman(owner)) + var/mob/living/carbon/human/our_human = owner + + var/damage_healed = 0 + damage_healed += our_human.adjustToxLoss(-amount, updating_health = FALSE) + damage_healed += our_human.adjustOxyLoss(-amount, updating_health = FALSE) + damage_healed += our_human.adjustBruteLoss(-amount, updating_health = FALSE, robotic = TRUE) + damage_healed += our_human.adjustFireLoss(-amount, updating_health = FALSE, robotic = TRUE) + if(damage_healed > 0) + owner.updatehealth() + + +/// Torment the target with a frightening hand +/proc/fire_curse_hand(mob/living/carbon/victim, turf/forced_turf) + var/grab_dir = turn(victim.dir, pick(-90, 90, 180, 180)) // Not in front, favour behind + var/turf/spawn_turf = get_ranged_target_turf(victim, grab_dir, 8) + spawn_turf = forced_turf ? forced_turf : spawn_turf + if(isnull(spawn_turf)) + return + new /obj/effect/temp_visual/dir_setting/curse/grasp_portal(spawn_turf, victim.dir) + playsound(spawn_turf, 'sound/effects/curse/curse2.ogg', 80, TRUE, -1) + var/obj/item/projectile/curse_hand/hel/hand = new (spawn_turf) + hand.preparePixelProjectile(victim, spawn_turf) + if(QDELETED(hand)) // safety check if above fails - above has a stack trace if it does fail + return + hand.fire() diff --git a/code/modules/antagonists/heretic/knowledge/sacrifice_knowledge/sacrifice_curse.dm b/code/modules/antagonists/heretic/knowledge/sacrifice_knowledge/sacrifice_curse.dm new file mode 100644 index 000000000000..dc4cc91b986b --- /dev/null +++ b/code/modules/antagonists/heretic/knowledge/sacrifice_knowledge/sacrifice_curse.dm @@ -0,0 +1,23 @@ +/// A curse given to people to disencourage them from retaliating against someone who sacrificed them +/datum/status_effect/heretic_curse + id = "heretic_curse" + alert_type = null + status_type = STATUS_EFFECT_MULTIPLE // In case several different people sacrifice you, unlucky + /// Who cursed us? + var/mob/living/the_curser + /// Don't experience bad things too often + COOLDOWN_DECLARE(consequence_cooldown) + +/datum/status_effect/heretic_curse/on_creation(mob/living/new_owner, mob/living/the_curser) + src.the_curser = the_curser + return ..() + +/datum/status_effect/heretic_curse/Destroy() + the_curser = null + return ..() + +/datum/status_effect/heretic_curse/on_apply() + if(isnull(the_curser) || !iscarbon(owner)) + return FALSE + message_admins(" QWERTODO: MAKE THIS CURSE DO SOMETHING THIS IS TOO MANY SIGNALS") + diff --git a/code/modules/antagonists/heretic/knowledge/sacrifice_knowledge/sacrifice_knowledge.dm b/code/modules/antagonists/heretic/knowledge/sacrifice_knowledge/sacrifice_knowledge.dm new file mode 100644 index 000000000000..b5ae54f820b6 --- /dev/null +++ b/code/modules/antagonists/heretic/knowledge/sacrifice_knowledge/sacrifice_knowledge.dm @@ -0,0 +1,607 @@ +// The knowledge and process of heretic sacrificing. + +/// How long we put the target so sleep for during sacrifice. +#define SACRIFICE_SLEEP_DURATION (12 SECONDS) +/// How long sacrifices must stay in the shadow realm to survive. +#define SACRIFICE_REALM_DURATION (2.5 MINUTES) + +/** + * Allows the heretic to sacrifice living heart targets. + */ +/datum/heretic_knowledge/hunt_and_sacrifice + name = "Heartbeat of the Mansus" + desc = "Allows you to sacrifice targets to the Mansus by bringing them to a rune in critical (or worse) condition. \ + If you have no targets, stand on a transmutation rune and invoke it to acquire some." + required_atoms = list(/mob/living/carbon/human = 1) + cost = 0 + priority = MAX_KNOWLEDGE_PRIORITY // Should be at the top + is_starting_knowledge = TRUE + research_tree_icon_path = 'icons/effects/eldritch.dmi' + research_tree_icon_state = "eye_close" + research_tree_icon_frame = 1 + /// How many targets do we generate? + var/num_targets_to_generate = 5 + /// Whether we've generated a heretic sacrifice z-level yet, from any heretic. + var/static/heretic_level_generated = FALSE + /// A weakref to the mind of our heretic. + var/datum/mind/heretic_mind + /// Lazylist of minds that we won't pick as targets. + var/list/datum/mind/target_blacklist + /// An assoc list of [uif] to [timers] - a list of all the timers of people in the shadow realm currently + var/list/return_timers + /// Evil organs we can put in people + var/static/list/grantable_organs = list( + /obj/item/organ/internal/appendix/corrupt, + /obj/item/organ/internal/eyes/corrupt, + /obj/item/organ/internal/heart/corrupt, + /obj/item/organ/internal/liver/corrupt, + /obj/item/organ/internal/lungs/corrupt, + ) + +/datum/heretic_knowledge/hunt_and_sacrifice/Destroy(force) + heretic_mind = null + LAZYCLEARLIST(target_blacklist) + return ..() + +/datum/heretic_knowledge/hunt_and_sacrifice/on_research(mob/user, datum/antagonist/heretic/our_heretic) + . = ..() + obtain_targets(user, silent = TRUE, heretic_datum = our_heretic) + heretic_mind = our_heretic.owner + +/datum/heretic_knowledge/hunt_and_sacrifice/recipe_snowflake_check(mob/living/user, list/atoms, list/selected_atoms, turf/loc) + var/datum/antagonist/heretic/heretic_datum = IS_HERETIC(user) + // First we have to check if the heretic has a Living Heart. + // You may wonder why we don't straight up prevent them from invoking the ritual if they don't have one - + // Hunt and sacrifice should always be invokable for clarity's sake, even if it'll fail immediately. + if(heretic_datum.has_living_heart() != HERETIC_HAS_LIVING_HEART) + to_chat(user, "The ritual failed, you have no living heart!") + return FALSE + + // We've got no targets set, let's try to set some. + // If we recently failed to acquire targets, we will be unable to acquire any. + if(!LAZYLEN(heretic_datum.sac_targets)) + atoms += user + return TRUE + + // If we have targets, we can check to see if we can do a sacrifice + // Let's remove any humans in our atoms list that aren't a sac target + for(var/mob/living/carbon/human/sacrifice in atoms) + // If the mob's not in soft crit or worse, remove from list + if(sacrifice.health > 0) + atoms -= sacrifice + // Otherwise if it's neither a target nor a cultist, remove it + else if(!(sacrifice in heretic_datum.sac_targets) && !IS_CULTIST(sacrifice)) + atoms -= sacrifice + + // Finally, return TRUE if we have a target in the list + if(locate(/mob/living/carbon/human) in atoms) + return TRUE + + // or FALSE if we don't + to_chat(user, "The ritual failed, no valid sacrifice was found!") + return FALSE + +/datum/heretic_knowledge/hunt_and_sacrifice/on_finished_recipe(mob/living/user, list/selected_atoms, turf/loc) + var/datum/antagonist/heretic/heretic_datum = IS_HERETIC(user) + // Force it to work if the sacrifice is a cultist, even if there's no targets. + var/mob/living/carbon/human/sac = selected_atoms[1] + if(!LAZYLEN(heretic_datum.sac_targets) && !IS_CULTIST(sac)) + if(obtain_targets(user, heretic_datum = heretic_datum)) + return TRUE + else + to_chat(user, "The ritual failed, no valid sacrifice was found!") + return FALSE + + sacrifice_process(user, selected_atoms, loc) + return TRUE + + +/** + * Obtain a list of targets for the user to hunt down and sacrifice. + * Tries to get four targets (minds) with living human currents. + * + * Returns FALSE if no targets are found, TRUE if the targets list was populated. + */ +/datum/heretic_knowledge/hunt_and_sacrifice/proc/obtain_targets(mob/living/user, silent = FALSE, datum/antagonist/heretic/heretic_datum) + + // First construct a list of minds that are valid objective targets. + var/list/datum/mind/valid_targets = list() + for(var/datum/mind/possible_target as anything in SSticker.minds) + if(possible_target == user.mind) + continue + if(is_invalid_target(possible_target)) + continue + if(possible_target in target_blacklist) + continue + if(!ishuman(possible_target.current)) + continue + if(possible_target.current.stat == DEAD) + continue + + valid_targets += possible_target + + if(!length(valid_targets)) + if(!silent) + to_chat(user, "No sacrifice targets could be found!") + return FALSE + + // Now, let's try to get five targets. + // - Two are completely random + // - One from your department + // - One from security + // - One from heads of staff ("high value") + var/list/datum/mind/final_targets = list() //Qwertodo: Figure out how the fuck to make this work after roundstart. Look at traitor objectives? + + // First target, any command. + //for(var/datum/mind/head_mind as anything in shuffle(valid_targets)) + // if(head_mind.assigned_role?.job_flags & JOB_HEAD_OF_STAFF) + // final_targets += head_mind + // valid_targets -= head_mind + // break + + // Second target, any security + //for(var/datum/mind/sec_mind as anything in shuffle(valid_targets)) + // if(sec_mind.assigned_role?.departments_bitflags & DEPARTMENT_BITFLAG_SECURITY) + // final_targets += sec_mind + // valid_targets -= sec_mind + // break + + // Third target, someone in their department. + //for(var/datum/mind/department_mind as anything in shuffle(valid_targets)) + // if(department_mind.assigned_role?.departments_bitflags & user.mind.assigned_role?.departments_bitflags) + // final_targets += department_mind + // valid_targets -= department_mind + // break + + // Now grab completely random targets until we'll full + var/target_sanity = 0 + while(length(final_targets) < num_targets_to_generate && length(valid_targets) > num_targets_to_generate && target_sanity < 25) + final_targets += pick_n_take(valid_targets) + target_sanity++ + + if(!silent) + to_chat(user, "Your targets have been determined. Your Living Heart will allow you to track their position. Go and sacrifice them!") + + for(var/datum/mind/chosen_mind as anything in final_targets) + heretic_datum.add_sacrifice_target(chosen_mind.current) + if(!silent) + to_chat(user, "[chosen_mind.current.real_name], the [chosen_mind.assigned_role].") + + return TRUE + +/** + * Begin the process of sacrificing the target. + * + * Arguments + * * user - the mob doing the sacrifice (a heretic) + * * selected_atoms - a list of all atoms chosen. Should be (at least) one human. + * * loc - the turf the sacrifice is occurring on + */ +/datum/heretic_knowledge/hunt_and_sacrifice/proc/sacrifice_process(mob/living/user, list/selected_atoms, turf/loc) + + var/datum/antagonist/heretic/heretic_datum = IS_HERETIC(user) + var/mob/living/carbon/human/sacrifice = locate() in selected_atoms + if(!sacrifice) + CRASH("[type] sacrifice_process didn't have a human in the atoms list. How'd it make it so far?") + if(!(sacrifice in heretic_datum.sac_targets) && !IS_CULTIST(sacrifice)) + CRASH("[type] sacrifice_process managed to get a non-target, non-cult human. This is incorrect.") + + if(sacrifice.mind) + LAZYADD(target_blacklist, sacrifice.mind) + heretic_datum.remove_sacrifice_target(sacrifice) + + + var/feedback = "Your patrons accept your offer" + var/sac_job = sacrifice.mind?.assigned_role + var/datum/antagonist/cultist/cultist_datum = IS_CULTIST(sacrifice) + // Heads give 3 points, cultists give 1 point (and a special reward), normal sacrifices give 2 points. + heretic_datum.total_sacrifices++ + if(sac_job in GLOB.command_head_positions) + heretic_datum.knowledge_points += 3 + heretic_datum.high_value_sacrifices++ + feedback += " graciously" + if(cultist_datum) + heretic_datum.knowledge_points += 1 + grant_reward(user, sacrifice, loc) + // easier to read + var/rewards_given = heretic_datum.rewards_given + // Chance for it to send a warning to cultists, higher with each reward. Stops after 5 because they probably got the hint by then. + if(prob(min(15 * rewards_given)) && (rewards_given <= 5)) + for(var/datum/mind/mind as anything in cultist_datum.get_team()) + if(mind.current) + SEND_SOUND(mind.current, 'sound/magic/narsie_attack.ogg') + var/message = "A vile heretic has " + \ + "sacrificed" + \ + " one of our own. Destroy and sacrifice the infidel before it claims more!" + to_chat(mind.current, message) + // he(retic) gets a warn too + to_chat(user, "How DARE you!? I will see you destroyed for this.") + var/non_flavor_warning = "You feel that your action has attracted + attention." + to_chat(user, non_flavor_warning) + return + else + heretic_datum.knowledge_points += 2 + + to_chat(user, "[feedback].") + if(!begin_sacrifice(sacrifice)) + disembowel_target(sacrifice) + return + + sacrifice.apply_status_effect(/datum/status_effect/heretic_curse, user) + + +/datum/heretic_knowledge/hunt_and_sacrifice/proc/grant_reward(mob/living/user, mob/living/sacrifice, turf/loc) + + // Visible and audible encouragement! + to_chat(user, "A servant of the Sanguine Apostate!") + to_chat(user, "Your patrons are rapturous!") + playsound(sacrifice, 'sound/magic/disintegrate.ogg', 75, TRUE) + + // Drop all items and splatter them around messily. + var/list/dustee_items = sacrifice.unequip_everything() + for(var/obj/item/loot as anything in dustee_items) + loot.throw_at(get_step_rand(sacrifice), 2, 4, user, TRUE) + + // The loser is DUSTED. + sacrifice.dust(TRUE, TRUE) + + // Increase reward counter + var/datum/antagonist/heretic/antag = IS_HERETIC(user) + antag.rewards_given++ + + // Cool effect for the rune as well as the item + var/obj/effect/heretic_rune/rune = locate() in range(2, user) + if(rune) + rune.gender_reveal( + outline_color = COLOR_RED_LIGHT, + ray_color = null, + do_float = FALSE, + do_layer = FALSE, + ) + + addtimer(CALLBACK(src, PROC_REF(deposit_reward), user, loc, null, rune), 5 SECONDS) + + +/datum/heretic_knowledge/hunt_and_sacrifice/proc/deposit_reward(mob/user, turf/loc, loop = 0, obj/rune) + if(loop > 5) // Max limit for retrying a reward + return + // Remove the outline, we don't need it anymore. + rune?.remove_filter("reward_outline") + playsound(loc, 'sound/magic/repulse.ogg', 75, TRUE) + var/datum/antagonist/heretic/heretic_datum = IS_HERETIC(user) + ASSERT(heretic_datum) + // This list will be almost identical to unlocked_heretic_items, with the same keys, the difference being the values will be 1 to 5. + var/list/rewards = heretic_datum.unlocked_heretic_items.Copy() + // We will make it increasingly less likely to get a reward if you've already got it + for(var/possible_reward in heretic_datum.unlocked_heretic_items) + var/amount_already_awarded = heretic_datum.unlocked_heretic_items[possible_reward] + rewards[possible_reward] = min(5 - (amount_already_awarded * 2), 1) + + var/atom/reward = pickweight(rewards) + reward = new reward(loc) + + if(isliving(reward)) + if(summon_ritual_mob(user, loc, reward) == FALSE) + qdel(reward) + deposit_reward(user, loc, loop++, rune) // If no ghosts, try again until limit is hit + return + + else if(isitem(reward)) + var/obj/item/item_reward = reward + item_reward.gender_reveal(outline_color = null, ray_color = COLOR_RED_LIGHT) + + ASSERT(reward) + + return reward + +/** + * This proc is called from [proc/sacrifice_process] after the heretic successfully sacrifices [sac_target].) + * + * Sets off a chain that sends the person sacrificed to the shadow realm to dodge hands to fight for survival. + * + * Arguments + * * sac_target - the mob being sacrificed. + */ +/datum/heretic_knowledge/hunt_and_sacrifice/proc/begin_sacrifice(mob/living/carbon/human/sac_target) + . = FALSE + + var/datum/antagonist/heretic/our_heretic = heretic_mind?.has_antag_datum(/datum/antagonist/heretic) + if(!our_heretic) + CRASH("[type] - begin_sacrifice was called, and no heretic [heretic_mind ? "antag datum":"mind"] could be found!") + + if(!LAZYLEN(GLOB.heretic_sacrifice_landmarks)) + CRASH("[type] - begin_sacrifice was called, but no heretic sacrifice landmarks were found!") + + var/obj/effect/landmark/heretic/destination_landmark = GLOB.heretic_sacrifice_landmarks[our_heretic.heretic_path] || GLOB.heretic_sacrifice_landmarks[PATH_START] + if(!destination_landmark) + CRASH("[type] - begin_sacrifice could not find a destination landmark OR default landmark to send the sacrifice! (Heretic's path: [our_heretic.heretic_path])") + + var/turf/destination = get_turf(destination_landmark) + + sac_target.visible_message("[sac_target] begins to shudder violenty as dark tendrils begin to drag them into thin air!") + sac_target.handcuffed = new /obj/item/restraints/handcuffs/cult(sac_target) + sac_target.update_handcuffed() + if(sac_target.legcuffed) + sac_target.clear_legcuffs(TRUE) + + sac_target.setBrainLoss(40) + sac_target.do_jitter_animation() + + addtimer(CALLBACK(sac_target, TYPE_PROC_REF(/mob/living/carbon, do_jitter_animation)), SACRIFICE_SLEEP_DURATION * (1/3)) + addtimer(CALLBACK(sac_target, TYPE_PROC_REF(/mob/living/carbon, do_jitter_animation)), SACRIFICE_SLEEP_DURATION * (2/3)) + + // If our target is dead, try to revive them + // and if we fail to revive them, don't proceede the chain + sac_target.adjustOxyLoss(-100, FALSE) + if(!sac_target.heal_and_revive(50, "[sac_target]'s heart begins to beat with an unholy force as they return from death!")) + return + + if(sac_target.AdjustSleeping(SACRIFICE_SLEEP_DURATION)) + to_chat(sac_target, "Your mind feels torn apart as you fall into a shallow slumber...") + else + to_chat(sac_target, "Your mind begins to tear apart as you watch dark tendrils envelop you.") + + sac_target.AdjustWeakened(SACRIFICE_SLEEP_DURATION * 1.2) + sac_target.AdjustImmobilized(SACRIFICE_SLEEP_DURATION * 1.2) + + addtimer(CALLBACK(src, PROC_REF(after_target_sleeps), sac_target, destination), SACRIFICE_SLEEP_DURATION * 0.5) // Teleport to the minigame + + return TRUE + +/** + * This proc is called from [proc/begin_sacrifice] after the [sac_target] falls asleep), shortly after the sacrifice occurs. + * + * Teleports the [sac_target] to the heretic room, asleep. + * If it fails to teleport, they will be disemboweled and stop the chain. + * + * Arguments + * * sac_target - the mob being sacrificed. + * * destination - the spot they're being teleported to. + */ +/datum/heretic_knowledge/hunt_and_sacrifice/proc/after_target_sleeps(mob/living/carbon/human/sac_target, turf/destination) + if(QDELETED(sac_target)) + return + + // The target disconnected or something, we shouldn't bother sending them along. + if(!sac_target.client || !sac_target.mind) + disembowel_target(sac_target) + return + + curse_organs(sac_target) + + // Send 'em to the destination. If the teleport fails, just disembowel them and stop the chain + if(!destination || SEND_SIGNAL(sac_target, COMSIG_MOVABLE_TELEPORTING, destination) & COMPONENT_BLOCK_TELEPORT) + disembowel_target(sac_target) + return + sac_target.forceMove(destination) + // If our target died during the (short) wait timer, + // and we fail to revive them (using a lower number than before), + // just disembowel them and stop the chain + sac_target.adjustOxyLoss(-100, FALSE) //Qwertodo: (after tm progress), if people just stab people trying to kill them as they revive, give them damage resistance + if(!sac_target.heal_and_revive(60, "[sac_target]'s heart begins to beat with an unholy force as they return from death!")) + disembowel_target(sac_target) + return + + to_chat(sac_target, "Unnatural forces begin to claw at your every being from beyond the veil.") + + playsound(sac_target, 'sound/ambience/antag/heretic/heretic_sacrifice.ogg', 50, FALSE) // play theme + + sac_target.apply_status_effect(/datum/status_effect/unholy_determination, SACRIFICE_REALM_DURATION) + addtimer(CALLBACK(src, PROC_REF(after_target_wakes), sac_target), SACRIFICE_SLEEP_DURATION * 0.5) // Begin the minigame + + RegisterSignal(sac_target, COMSIG_MOVABLE_Z_CHANGED, PROC_REF(on_target_escape)) // Cheese condition + RegisterSignal(sac_target, COMSIG_MOB_DEATH, PROC_REF(on_target_death)) // Loss condition + +/// Apply a sinister curse to some of the target's organs as an incentive to leave us alone +/datum/heretic_knowledge/hunt_and_sacrifice/proc/curse_organs(mob/living/carbon/human/sac_target) + var/usable_organs = grantable_organs.Copy() + if(isplasmaman(sac_target) || isvox(sac_target)) + usable_organs -= /obj/item/organ/internal/lungs/corrupt // Their lungs are already more cursed than anything I could give them + + var/total_implant = rand(2, 4) + + for(var/i in 1 to total_implant) + if(!length(usable_organs)) + return + var/organ_path = pick_n_take(usable_organs) + var/obj/item/organ/internal/to_give = new organ_path + var/obj/item/organ/internal/to_eject = sac_target.get_int_organ(organ_path) + if(to_eject) + to_eject.remove(sac_target, TRUE) + to_eject.forceMove(get_turf(sac_target)) + to_give.insert(sac_target) + + new /obj/effect/gibspawner/generic(get_turf(sac_target)) + sac_target.visible_message("Several organs force themselves out of [sac_target]!") + +/** + * This proc is called from [proc/after_target_sleeps] when the [sac_target] should be waking up.) + * + * Begins the survival minigame, featuring the sacrifice targets. + * Gives them Helgrasp, throwing cursed hands towards them that they must dodge to survive. + * Also gives them a status effect, Unholy Determination, to help them in this endeavor. + * + * Then applies some miscellaneous effects. + */ +/datum/heretic_knowledge/hunt_and_sacrifice/proc/after_target_wakes(mob/living/carbon/human/sac_target) + if(QDELETED(sac_target)) + return + + // About how long should the helgrasp last? (1 metab a tick = helgrasp_time / 2 ticks (so, 1 minute = 60 seconds = 30 ticks)) + var/helgrasp_time = 1 MINUTES + + sac_target.reagents?.add_reagent("mansusgrasp", helgrasp_time / 20) + sac_target.apply_status_effect(/datum/status_effect/necropolis_curse) + + sac_target.EyeBlurry(30 SECONDS) + sac_target.AdjustJitter(20 SECONDS) + sac_target.AdjustDizzy(20 SECONDS) + sac_target.emote("scream") + + to_chat(sac_target, "The grasp of the Mansus reveal themselves to you!") + to_chat(sac_target, "You feel invigorated! Fight to survive!") + // When it runs out, let them know they're almost home free + addtimer(CALLBACK(src, PROC_REF(after_helgrasp_ends), sac_target), helgrasp_time) + // Win condition + var/win_timer = addtimer(CALLBACK(src, PROC_REF(return_target), sac_target), SACRIFICE_REALM_DURATION, TIMER_STOPPABLE) + LAZYSET(return_timers, UID(sac_target), win_timer) + +/** + * This proc is called from [proc/after_target_wakes] after the helgrasp runs out in the [sac_target].) + * + * It gives them a message letting them know it's getting easier and they're almost free. + */ +/datum/heretic_knowledge/hunt_and_sacrifice/proc/after_helgrasp_ends(mob/living/carbon/human/sac_target) + if(QDELETED(sac_target) || sac_target.stat == DEAD) + return + + to_chat(sac_target, "The worst is behind you... Not much longer! Hold fast, or expire!") + +/** + * This proc is called from [proc/begin_sacrifice] if the target survived the shadow realm), or [COMSIG_MOB_DEATH] if they don't. + * + * Teleports [sac_target] back to a random safe turf on the station (or observer spawn if it fails to find a safe turf). + * Also clears their status effects, unregisters any signals associated with the shadow realm, and sends a message + * to the heretic who did the sacrificed about whether they survived, and where they ended up. + * + * Arguments + * * sac_target - the mob being sacrificed + * * heretic - the heretic who originally did the sacrifice. + */ +/datum/heretic_knowledge/hunt_and_sacrifice/proc/return_target(mob/living/carbon/human/sac_target) + if(QDELETED(sac_target)) + return + + var/current_timer = LAZYACCESS(return_timers, UID(sac_target)) + if(current_timer) + deltimer(current_timer) + LAZYREMOVE(return_timers, UID(sac_target)) + + UnregisterSignal(sac_target, COMSIG_MOVABLE_Z_CHANGED) + UnregisterSignal(sac_target, COMSIG_MOB_DEATH) + sac_target.remove_status_effect(/datum/status_effect/necropolis_curse) + sac_target.remove_status_effect(/datum/status_effect/unholy_determination) + sac_target.reagents?.del_reagent("mansusgrasp") + sac_target.clear_restraints() + if(IS_HERETIC(sac_target)) + var/datum/antagonist/heretic/victim_heretic = sac_target.mind?.has_antag_datum(/datum/antagonist/heretic) + victim_heretic.knowledge_points -= 3 + + // Wherever we end up, we sure as hell won't be able to explain + sac_target.HereticSlur(40 SECONDS) + sac_target.AdjustStuttering(40 SECONDS) + + // They're already back on the station for some reason, don't bother teleporting + var/turf/below_target = get_turf(sac_target) + // is_station_level runtimes when passed z = 0, so I'm being very explicit here about checking for nullspace until fixed + // otherwise, we really don't want this to runtime error, as it'll get people stuck in hell forever - not ideal! + if(below_target && below_target.z != 0 && is_station_level(below_target.z)) + return + + // Teleport them to a random safe coordinate on the station z level. + var/turf/simulated/floor/safe_turf = find_safe_turf() + if(!safe_turf) + safe_turf = sac_target.forceMove(pick(GLOB.latejoin)) + stack_trace("[type] - return_target was unable to find a safe turf for [sac_target] to return to. Defaulting to arrivals.") + sac_target.forceMove(safe_turf) + + if(sac_target.stat == DEAD) + after_return_dead_target(sac_target) + else + after_return_live_target(sac_target) + + if(heretic_mind?.current) + var/composed_return_message = "" + composed_return_message += "Your victim, [sac_target], was returned to the station - " + if(sac_target.stat == DEAD) + composed_return_message += "dead. " + else + composed_return_message += "alive, but with a shattered mind. " + + composed_return_message += "You hear a whisper... " + composed_return_message += "[get_area_name(safe_turf, TRUE)]" + to_chat(heretic_mind.current, composed_return_message) + +/** + * If they die in the shadow realm, they lost. Send them back. + */ +/datum/heretic_knowledge/hunt_and_sacrifice/proc/on_target_death(mob/living/carbon/human/sac_target, gibbed) + SIGNAL_HANDLER + + if(gibbed) // Nothing to return + return + + return_target(sac_target) + +/** + * If they somehow cheese the shadow realm by teleporting out, they are disemboweled and killed. + */ +/datum/heretic_knowledge/hunt_and_sacrifice/proc/on_target_escape(mob/living/carbon/human/sac_target, old_z, new_z) + SIGNAL_HANDLER + + to_chat(sac_target, "Your attempt to escape the Mansus is not taken kindly!") + // Ends up calling return_target() via death signal to clean up. + disembowel_target(sac_target) + +/** + * This proc is called from [proc/return_target] if the [sac_target] survives the shadow realm.) + * + * Gives the sacrifice target some after effects upon ariving back to reality. + */ +/datum/heretic_knowledge/hunt_and_sacrifice/proc/after_return_live_target(mob/living/carbon/human/sac_target) + to_chat(sac_target, "The fight is over, but at great cost. You have been returned to the station in one piece.") + if(IS_HERETIC(sac_target)) + to_chat(sac_target, "You don't remember anything leading up to the experience, but you feel your connection with the Mansus weakened - Knowledge once known, forgotten...") + else + to_chat(sac_target, "You don't remember anything leading up to the experience - All you can think about are those horrific hands...") + + // Oh god where are we? + sac_target.AdjustConfused(60 SECONDS) + sac_target.AdjustJitter(120 SECONDS) + sac_target.EyeBlurry(100 SECONDS) + sac_target.AdjustDizzy(1 MINUTES) + sac_target.AdjustKnockDown(8 SECONDS) + sac_target.adjustStaminaLoss(120) + + + // Could use a little pick-me-up... + sac_target.reagents?.add_reagent("atropine", 8) + sac_target.reagents?.add_reagent("epinephrine", 8) + +/** + * This proc is called from [proc/return_target] if the target dies in the shadow realm.) + * + * After teleporting the target back to the station (dead), + * it spawns a special red broken illusion on their spot, for style. + */ +/datum/heretic_knowledge/hunt_and_sacrifice/proc/after_return_dead_target(mob/living/carbon/human/sac_target) + to_chat(sac_target, "You failed to resist the horrors of the Mansus! Your ruined body has been returned to the station.") + to_chat(sac_target, "The experience leaves your mind torn and memories tattered. You will not remember anything leading up to the experience if revived.") + + var/obj/effect/visible_heretic_influence/illusion = new(get_turf(sac_target)) + illusion.name = "\improper weakened rift in reality" + illusion.desc = "A rift wide enough for something... or someone... to come through." + illusion.color = COLOR_RED + +/** + * "Fuck you" proc that gets called if the chain is interrupted at some points. + * Disembowels the [sac_target] and brutilizes their body. Throws some gibs around for good measure. + */ +/datum/heretic_knowledge/hunt_and_sacrifice/proc/disembowel_target(mob/living/carbon/human/sac_target) + if(heretic_mind) + add_attack_logs(src, sac_target, "disemboweled via sacrifice") + var/obj/item/organ/external/chest = sac_target.get_organ(BODY_ZONE_CHEST) + chest.fracture() + chest.droplimb() + sac_target.apply_damage(250, BRUTE) + if(sac_target.stat != DEAD) + sac_target.death() + sac_target.visible_message( + "[sac_target]'s organs are pulled out of [sac_target.p_their()] chest by shadowy hands!", + "Your organs are violently pulled out of your chest by shadowy hands!" + ) + + new /obj/effect/gibspawner/human(get_turf(sac_target)) + +#undef SACRIFICE_SLEEP_DURATION +#undef SACRIFICE_REALM_DURATION diff --git a/code/modules/antagonists/heretic/knowledge/sacrifice_knowledge/sacrifice_map.dm b/code/modules/antagonists/heretic/knowledge/sacrifice_knowledge/sacrifice_map.dm new file mode 100644 index 000000000000..3774b26f6cdb --- /dev/null +++ b/code/modules/antagonists/heretic/knowledge/sacrifice_knowledge/sacrifice_map.dm @@ -0,0 +1,144 @@ +// Some various defines used in the heretic sacrifice map. + +/// A global assoc list of all landmarks that denote a heretic sacrifice location. [string heretic path] = [landmark]. +GLOBAL_LIST_EMPTY(heretic_sacrifice_landmarks) + +/// Lardmarks meant to designate where heretic sacrifices are sent. +/obj/effect/landmark/heretic + name = "default heretic sacrifice landmark" + icon_state = "x" + /// What path this landmark is intended for. + var/for_heretic_path = PATH_START + +/obj/effect/landmark/heretic/Initialize(mapload) + . = ..() + GLOB.heretic_sacrifice_landmarks[for_heretic_path] = src + +/obj/effect/landmark/heretic/Destroy() + GLOB.heretic_sacrifice_landmarks[for_heretic_path] = null + return ..() + +/obj/effect/landmark/heretic/ash + name = "ash heretic sacrifice landmark" + for_heretic_path = PATH_ASH + +/obj/effect/landmark/heretic/flesh + name = "flesh heretic sacrifice landmark" + for_heretic_path = PATH_FLESH + +/obj/effect/landmark/heretic/void + name = "void heretic sacrifice landmark" + for_heretic_path = PATH_VOID + +/obj/effect/landmark/heretic/rust + name = "rust heretic sacrifice landmark" + for_heretic_path = PATH_RUST + +/obj/effect/landmark/heretic/lock + name = "lock heretic sacrifice landmark" + for_heretic_path = PATH_LOCK + +/obj/effect/landmark/heretic/moon + name = "moon heretic sacrifice landmark" + for_heretic_path = PATH_MOON + +/obj/effect/landmark/heretic/cosmic + name = "cosmic heretic sacrifice landmark" + for_heretic_path = PATH_COSMIC + +/obj/effect/landmark/heretic/blade + name = "blade heretic sacrifice landmark" + for_heretic_path = PATH_BLADE + + +/obj/structure/signpost/void + name = "signpost at the edge of the universe" + desc = "A direction in the directionless cosmos." + density = FALSE + /// Brightness of the signpost. + var/range = 2 + /// Light power of the signpost. + var/power = 0.8 + +/obj/structure/signpost/void/Initialize(mapload) + . = ..() + set_light(range, power) + +// Some VERY dim lights, used for the void sacrifice realm. +/obj/machinery/light/very_dim + nightshift_allowed = FALSE + brightness_color = "#d6b6a6ff" + brightness_range = 3 + brightness_power = 0.5 + +/obj/machinery/light/very_dim/directional/north + dir = NORTH + +/obj/machinery/light/very_dim/directional/south + dir = SOUTH + +/obj/machinery/light/very_dim/directional/east + dir = EAST + +/obj/machinery/light/very_dim/directional/west + dir = WEST + +// Rooms for where heretic sacrifices send people. +/area/centcom/heretic_sacrifice + name = "Mansus" + icon_state = "heretic" + sound_environment = SOUND_ENVIRONMENT_CAVE + dynamic_lighting = DYNAMIC_LIGHTING_FORCED + +/area/centcom/heretic_sacrifice/Initialize(mapload) + ambientsounds = list('sound/ambience/ambireebe1.ogg', + 'sound/ambience/ambireebe2.ogg', + 'sound/ambience/ambireebe3.ogg',) + return ..() + +/area/centcom/heretic_sacrifice/ash //also, the default + name = "Mansus Ash Gate" + +/area/centcom/heretic_sacrifice/void + name = "Mansus Void Gate" + sound_environment = SOUND_ENVIRONMENT_UNDERWATER + +/area/centcom/heretic_sacrifice/void/Initialize(mapload) + ambientsounds = list('sound/ambience/ambireebe1.ogg', + 'sound/ambience/ambireebe2.ogg', + 'sound/ambience/ambireebe3.ogg', + 'sound/ambience/antag/heretic/VoidsEmbrace.ogg' //a little void, in the end... + ) + return ..() + +/area/centcom/heretic_sacrifice/flesh + name = "Mansus Flesh Gate" + sound_environment = SOUND_ENVIRONMENT_STONEROOM + +/area/centcom/heretic_sacrifice/rust + name = "Mansus Rust Gate" + sound_environment = SOUND_ENVIRONMENT_SEWER_PIPE + +/area/centcom/heretic_sacrifice/lock + name = "Mansus Lock Gate" + sound_environment = SOUND_ENVIRONMENT_PSYCHOTIC + +/area/centcom/heretic_sacrifice/cosmic + name = "Mansus Cosmic Gate" + sound_environment = SOUND_ENVIRONMENT_UNDERWATER + +/area/centcom/heretic_sacrifice/blade + name = "Mansus Blade Gate" + sound_environment = SOUND_ENVIRONMENT_ARENA + +/area/centcom/heretic_sacrifice/moon + name = "Mansus Moon Gate" + sound_environment = SOUND_ENVIRONMENT_AUDITORIUM + +/area/centcom/heretic_sacrifice/moon/Initialize(mapload) + ambientsounds = list('sound/ambience/ambireebe1.ogg', + 'sound/ambience/ambireebe2.ogg', + 'sound/ambience/ambireebe3.ogg', + 'sound/effects/moon_parade.ogg' //a little moon, why not + ) + return ..() diff --git a/code/modules/antagonists/heretic/knowledge/side_ash_moon.dm b/code/modules/antagonists/heretic/knowledge/side_ash_moon.dm new file mode 100644 index 000000000000..dccf65604783 --- /dev/null +++ b/code/modules/antagonists/heretic/knowledge/side_ash_moon.dm @@ -0,0 +1,51 @@ +/datum/heretic_knowledge_tree_column/ash_to_moon + neighbour_type_left = /datum/heretic_knowledge_tree_column/main/ash + neighbour_type_right = /datum/heretic_knowledge_tree_column/main/moon + + route = PATH_SIDE + + tier1 = /datum/heretic_knowledge/medallion + tier2 = /datum/heretic_knowledge/dummy_ash_to_moon + tier3 = /datum/heretic_knowledge/summon/ashy + +// Sidepaths for knowledge between Ash and Flesh. + +/datum/heretic_knowledge/dummy_ash_to_moon + name = "Ash and Moon ways" + desc = "Research this to gain access to the other path" + gain_text = "Madness leads to decay, and the fire is as great show for the soul." + cost = 1 + + +/datum/heretic_knowledge/medallion + name = "Ashen Eyes" + desc = "Allows you to transmute a pair of eyes, a candle, and a glass shard into an Eldritch Medallion. \ + The Eldritch Medallion grants you thermal vision while worn, and also functions as a focus." + gain_text = "Piercing eyes guided them through the mundane. Neither darkness nor terror could stop them." + + required_atoms = list( + /obj/item/organ/internal/eyes = 1, + /obj/item/shard = 1, + /obj/item/candle = 1, + ) + result_atoms = list(/obj/item/clothing/neck/eldritch_amulet) + cost = 1 + research_tree_icon_path = 'icons/obj/antags/eldritch.dmi' + research_tree_icon_state = "eye_medalion" + +/datum/heretic_knowledge/summon/ashy + name = "Ashen Ritual" + desc = "Allows you to transmute a head, a pile of ash, and a book to create an Ash Spirit. \ + Ash Spirits have a short range jaunt and the ability to cause bleeding in foes at range. \ + They also have the ability to create a ring of fire around themselves for a length of time." + gain_text = "I combined my principle of hunger with my desire for destruction. The Marshal knew my name, and the Nightwatcher gazed on." + + required_atoms = list( + /obj/effect/decal/cleanable/ash = 1, + /obj/item/organ/external/head = 1, + /obj/item/book = 1, + ) + mob_to_summon = /mob/living/simple_animal/hostile/heretic_summon/ash_spirit + cost = 1 + + diff --git a/code/modules/antagonists/heretic/knowledge/side_blade_rust.dm b/code/modules/antagonists/heretic/knowledge/side_blade_rust.dm new file mode 100644 index 000000000000..339302d51b81 --- /dev/null +++ b/code/modules/antagonists/heretic/knowledge/side_blade_rust.dm @@ -0,0 +1,98 @@ +/datum/heretic_knowledge_tree_column/blade_to_rust + neighbour_type_left = /datum/heretic_knowledge_tree_column/main/blade + neighbour_type_right = /datum/heretic_knowledge_tree_column/main/rust + + route = PATH_SIDE + + tier1 = /datum/heretic_knowledge/armor + tier2 = list(/datum/heretic_knowledge/crucible, /datum/heretic_knowledge/rifle) + tier3 = /datum/heretic_knowledge/spell/rust_charge + +// Sidepaths for knowledge between Rust and Blade. +/datum/heretic_knowledge/armor + name = "Armorer's Ritual" + desc = "Allows you to transmute a table and a gas mask to create Eldritch Armor. \ + Eldritch Armor provides great protection while also acting as a focus when hooded." + gain_text = "The Rusted Hills welcomed the Blacksmith in their generosity. And the Blacksmith \ + returned their generosity in kind." + + required_atoms = list( + /obj/structure/table = 1, + /obj/item/clothing/mask/gas = 1, + ) + result_atoms = list(/obj/item/clothing/suit/hooded/cultrobes/eldritch) + cost = 1 + + research_tree_icon_path = 'icons/obj/clothing/suits.dmi' + research_tree_icon_state = "eldritch_armor" + research_tree_icon_frame = 12 + + +/datum/heretic_knowledge/crucible + name = "Mawed Crucible" + desc = "Allows you to transmute a portable water tank and a table to create a Mawed Crucible. \ + The Mawed Crucible can brew powerful potions for combat and utility, but must be fed bodyparts and organs between uses." + gain_text = "This is pure agony. I wasn't able to summon the figure of the Aristocrat, \ + but with the Priest's attention I stumbled upon a different recipe..." + + required_atoms = list( + /obj/structure/reagent_dispensers/watertank = 1, + /obj/structure/table = 1, + ) + result_atoms = list(/obj/structure/eldritch_crucible) + cost = 1 + + research_tree_icon_path = 'icons/obj/antags/eldritch.dmi' + research_tree_icon_state = "crucible" + + +/datum/heretic_knowledge/rifle + name = "Lionhunter's Rifle" + desc = "Allows you to transmute a piece of wood, with hide \ + from any animal,and a camera to create the Lionhunter's rifle. \ + The Lionhunter's Rifle is a long ranged ballistic weapon with three shots. \ + These shots function as normal, albeit weak high-caliber munitions when fired from \ + close range or at inanimate objects. You can aim the rifle at distant foes, \ + causing the shot to mark your victim with your grasp and teleport you directly to them." + gain_text = "I met an old man in an antique shop who wielded a very unusual weapon. \ + I could not purchase it at the time, but they showed me how they made it ages ago." + + required_atoms = list( + /obj/item/stack/sheet/wood = 1, + /obj/item/stack/sheet/animalhide = 1, + /obj/item/camera = 1, + ) + result_atoms = list(/obj/item/gun/projectile/shotgun/boltaction/lionhunter) + cost = 1 + + + research_tree_icon_path = 'icons/obj/weapons/wide_guns.dmi' + research_tree_icon_state = "lionhunter" + +/datum/heretic_knowledge/rifle_ammo + name = "Lionhunter Rifle Ammunition" + desc = "Allows you to transmute 3 ballistic ammo casings (used or unused) of any caliber, \ + including shotgun shells to create an extra clip of ammunition for the Lionhunter Rifle." + gain_text = "The weapon came with three rough iron balls, intended to be used as ammunition. \ + They were very effective, for simple iron, but used up quickly. I soon ran out. \ + No replacement munitions worked in their stead. It was peculiar in what it wanted." + required_atoms = list( + /obj/item/ammo_casing = 3, + ) + banned_atom_types = list(/obj/item/ammo_casing/lionhunter) // The gods are very generous with ingredients, but not *that* generous + result_atoms = list(/obj/item/ammo_box/lionhunter) + cost = 0 + + research_tree_icon_path = 'icons/obj/ammo.dmi' + research_tree_icon_state = "310_strip" + + +/datum/heretic_knowledge/spell/rust_charge + name = "Rust Charge" + desc = "A charge that must be started on a rusted tile and will destroy any rusted objects you come into contact with, will deal high damage to others and rust around you during the charge." + gain_text = "The hills sparkled now, as I neared them my mind began to wander. I quickly regained my resolve and pushed forward, this last leg would be the most treacherous." + + action_to_add = /datum/action/cooldown/mob_cooldown/charge/rust + cost = 1 + + diff --git a/code/modules/antagonists/heretic/knowledge/side_cosmos_ash.dm b/code/modules/antagonists/heretic/knowledge/side_cosmos_ash.dm new file mode 100644 index 000000000000..a938faac5464 --- /dev/null +++ b/code/modules/antagonists/heretic/knowledge/side_cosmos_ash.dm @@ -0,0 +1,62 @@ +/datum/heretic_knowledge_tree_column/cosmic_to_ash + neighbour_type_left = /datum/heretic_knowledge_tree_column/main/cosmic + neighbour_type_right = /datum/heretic_knowledge_tree_column/main/ash + + route = PATH_SIDE + + tier1 = /datum/heretic_knowledge/summon/fire_shark + tier2 = /datum/heretic_knowledge/spell/space_phase + tier3 = /datum/heretic_knowledge/eldritch_coin + + +// Sidepaths for knowledge between Cosmos and Ash. + +/datum/heretic_knowledge/summon/fire_shark + name = "Scorching Shark" + desc = "Allows you to transmute a pool of ash, a liver, and a sheet of plasma into a Fire Shark. \ + Fire Sharks are fast and strong in groups, but die quickly. They are also highly resistant against fire attacks. \ + Fire Sharks inject phlogiston into its victims and spawn plasma once they die." + gain_text = "The cradle of the nebula was cold, but not dead. Light and heat flits even through the deepest darkness, and is hunted by its own predators." + + required_atoms = list( + /obj/effect/decal/cleanable/ash = 1, + /obj/item/organ/internal/liver = 1, + /obj/item/stack/sheet/mineral/plasma = 1, + ) + //mob_to_summon = /mob/living/basic/heretic_summon/fire_shark + mob_to_summon = /mob/living/simple_animal/bunny + cost = 1 + + + research_tree_icon_dir = EAST + +/datum/heretic_knowledge/spell/space_phase + name = "Space Phase" + desc = "Grants you Space Phase, a spell that allows you to move freely through space. \ + You can only phase in and out when you are on a space or misc turf." + gain_text = "You feel like your body can move through space as if you where dust." + + action_to_add = /datum/spell/bloodcrawl/space_crawl + cost = 1 + + + research_tree_icon_frame = 6 + +/datum/heretic_knowledge/eldritch_coin + name = "Eldritch Coin" + desc = "Allows you to transmute a sheet of plasma and a diamond to create an Eldritch Coin. \ + The coin will open or close nearby doors when landing on heads and toggle their bolts \ + when landing on tails. If you insert the coin into an airlock, it will be consumed \ + to fry its electronics, opening the airlock permanently unless bolted. " + gain_text = "The Mansus is a place of all sorts of sins. But greed held a special role." + + required_atoms = list( + /obj/item/stack/sheet/mineral/diamond = 1, + /obj/item/stack/sheet/mineral/plasma = 1, + ) + result_atoms = list(/obj/item/coin/eldritch) + cost = 1 + + research_tree_icon_path = 'icons/obj/economy.dmi' + research_tree_icon_state = "coin_heretic_heretic" + diff --git a/code/modules/antagonists/heretic/knowledge/side_flesh_void.dm b/code/modules/antagonists/heretic/knowledge/side_flesh_void.dm new file mode 100644 index 000000000000..0e4050883ddf --- /dev/null +++ b/code/modules/antagonists/heretic/knowledge/side_flesh_void.dm @@ -0,0 +1,63 @@ +/datum/heretic_knowledge_tree_column/flesh_to_void + neighbour_type_left = /datum/heretic_knowledge_tree_column/main/flesh + neighbour_type_right = /datum/heretic_knowledge_tree_column/main/void + + route = PATH_SIDE + + tier1 = /datum/heretic_knowledge/void_cloak + tier2 = /datum/heretic_knowledge/spell/blood_siphon + tier3 = list(/datum/heretic_knowledge/spell/void_prison, /datum/heretic_knowledge/spell/cleave) + +// Sidepaths for knowledge between Flesh and Void. + +/datum/heretic_knowledge/void_cloak + name = "Void Cloak" + desc = "Allows you to transmute a glass shard, a bedsheet, and any outer clothing item (such as armor or a suit jacket) \ + to create a Void Cloak. While the hood is down, the cloak functions as a focus, \ + and while the hood is up, the cloak is completely invisible. It also provide decent armor and \ + has pockets which can hold one of your blades, various ritual components (such as organs), and small heretical trinkets." + gain_text = "The Owl is the keeper of things that are not quite in practice, but in theory are. Many things are." + + required_atoms = list( + /obj/item/shard = 1, + /obj/item/clothing/suit = 1, + /obj/item/bedsheet = 1, + ) + result_atoms = list(/obj/item/clothing/suit/storage/void_cloak) + cost = 1 + + research_tree_icon_path = 'icons/obj/clothing/suits.dmi' + research_tree_icon_state = "void_cloak" + +/datum/heretic_knowledge/spell/blood_siphon + name = "Blood Siphon" + desc = "Grants you Blood Siphon, a spell that drains a victim of blood and health, transferring it to you. \ + Also has a chance to transfer wounds from you to the victim." + gain_text = "\"No matter the man, we bleed all the same.\" That's what the Marshal told me." + + action_to_add = /datum/spell/pointed/blood_siphon + cost = 1 + +/datum/heretic_knowledge/spell/void_prison + name = "Void Prison" + desc = "Grants you Void Prison, a spell that places your victim into ball, making them unable to do anything or speak. \ + Applies void chill afterwards." + gain_text = "At first, I see myself, waltzing along a snow-laden street. \ + I try to yell, grab hold of this fool and tell them to run. \ + But the only welts made are on my own beating fist. \ + My smiling face turns to regard me, reflecting back in glassy eyes the empty path I have been lead down." + + action_to_add = /datum/spell/pointed/void_prison + cost = 1 + +/datum/heretic_knowledge/spell/cleave + name = "Blood Cleave" + desc = "Grants you Cleave, an area-of-effect targeted spell \ + that causes heavy bleeding and blood loss to anyone afflicted." + gain_text = "At first I didn't understand these instruments of war, but the Priest \ + told me to use them regardless. Soon, he said, I would know them well." + + action_to_add = /datum/spell/pointed/cleave + cost = 1 + + diff --git a/code/modules/antagonists/heretic/knowledge/side_lock_flesh.dm b/code/modules/antagonists/heretic/knowledge/side_lock_flesh.dm new file mode 100644 index 000000000000..7130c30a3384 --- /dev/null +++ b/code/modules/antagonists/heretic/knowledge/side_lock_flesh.dm @@ -0,0 +1,38 @@ +/datum/heretic_knowledge_tree_column/lock_to_flesh + neighbour_type_left = /datum/heretic_knowledge_tree_column/main/lock + neighbour_type_right = /datum/heretic_knowledge_tree_column/main/flesh + + route = PATH_SIDE + + tier1 = /datum/heretic_knowledge/dummy_lock_to_flesh + tier2 = /datum/heretic_knowledge/spell/opening_blast + tier3 = /datum/heretic_knowledge/spell/apetra_vulnera + +/datum/heretic_knowledge/dummy_lock_to_flesh + name = "Flesh and Lock ways" + desc = "Research this to gain access to the other path" + gain_text = "There are ways from feasting to wounding, the power of birth is close to the power of opening." + cost = 1 + +// Sidepaths for knowledge between Knock and Flesh. +/datum/heretic_knowledge/spell/opening_blast + name = "Wave Of Desperation" + desc = "Grants you Wave Of Desparation, a spell which can only be cast while restrained. \ + It removes your restraints, repels and knocks down adjacent people, and applies the Mansus Grasp to everything nearby. \ + However, you will fall unconscious a short time after casting this spell." + gain_text = "My shackles undone in dark fury, their feeble bindings crumble before my power." + + action_to_add = /datum/spell/aoe/wave_of_desperation + cost = 1 + +/datum/heretic_knowledge/spell/apetra_vulnera + name = "Apetra Vulnera" + desc = "Grants you Apetra Vulnera, a spell \ + which causes heavy bleeding on all bodyparts of the victim that have more than 15 brute damage. \ + Wounds a random limb if no limb is sufficiently damaged." + gain_text = "Flesh opens, and blood spills. My master seeks sacrifice, and I shall appease." + + action_to_add = /datum/spell/pointed/apetra_vulnera + cost = 1 + + diff --git a/code/modules/antagonists/heretic/knowledge/side_lock_moon.dm b/code/modules/antagonists/heretic/knowledge/side_lock_moon.dm new file mode 100644 index 000000000000..3ce6e8f0f532 --- /dev/null +++ b/code/modules/antagonists/heretic/knowledge/side_lock_moon.dm @@ -0,0 +1,49 @@ +/datum/heretic_knowledge_tree_column/moon_to_lock + neighbour_type_left = /datum/heretic_knowledge_tree_column/main/moon + neighbour_type_right = /datum/heretic_knowledge_tree_column/main/lock + + route = PATH_SIDE + + tier1 = /datum/heretic_knowledge/spell/mind_gate + tier2 = /datum/heretic_knowledge/unfathomable_curio + tier3 = /datum/heretic_knowledge/dummy_moon_to_lock + +// Sidepaths for knowledge between Knock and Moon. + +/datum/heretic_knowledge/dummy_moon_to_lock + name = "Lock and Moon ways" + desc = "Research this to gain access to the other path" + gain_text = "The powers of Madness are like a wound in one's soul, and every wound can be opened and closed." + cost = 1 + + + +/datum/heretic_knowledge/spell/mind_gate + name = "Mind Gate" + desc = "Grants you Mind Gate, a spell which inflicts hallucinations, \ + confusion, oxygen loss and brain damage to its target over 10 seconds.\ + The caster takes 20 brain damage per use." + gain_text = "My mind swings open like a gate, and its insight will let me perceive the truth." + + action_to_add = /datum/spell/mind_gate + cost = 1 + +/datum/heretic_knowledge/unfathomable_curio + name = "Unfathomable Curio" + desc = "Allows you to transmute 3 rods, lungs and any belt into an Unfathomable Curio, \ + a belt that can hold blades and items for rituals. Whilst worn it will also \ + veil you, allowing you to take 5 hits without suffering damage, this veil will recharge very slowly \ + outside of combat." + gain_text = "The mansus holds many a curio, some are not meant for the mortal eye." + + required_atoms = list( + /obj/item/organ/internal/lungs = 1, + /obj/item/stack/rods = 3, + /obj/item/storage/belt = 1, + ) + result_atoms = list(/obj/item/storage/belt/unfathomable_curio) + cost = 1 + + research_tree_icon_path = 'icons/obj/clothing/belts.dmi' + research_tree_icon_state = "unfathomable_curio" + diff --git a/code/modules/antagonists/heretic/knowledge/side_rust_cosmos.dm b/code/modules/antagonists/heretic/knowledge/side_rust_cosmos.dm new file mode 100644 index 000000000000..80dfbbeeba19 --- /dev/null +++ b/code/modules/antagonists/heretic/knowledge/side_rust_cosmos.dm @@ -0,0 +1,74 @@ +/datum/heretic_knowledge_tree_column/rust_to_cosmic + neighbour_type_left = /datum/heretic_knowledge_tree_column/main/rust + neighbour_type_right = /datum/heretic_knowledge_tree_column/main/cosmic + + route = PATH_SIDE + + tier1 = /datum/heretic_knowledge/essence + tier2 = /datum/heretic_knowledge/entropy_pulse + tier3 = /datum/heretic_knowledge/summon/rusty + + +// Sidepaths for knowledge between Rust and Cosmos. + +/datum/heretic_knowledge/essence + name = "Priest's Ritual" + desc = "Allows you to transmute a tank of water and a glass shard into a Flask of Eldritch Essence. \ + Eldritch water can be consumed for potent healing, or given to heathens for deadly poisoning." + gain_text = "This is an old recipe. The Owl whispered it to me. \ + Created by the Priest - the Liquid that both was and is not." + + required_atoms = list( + /obj/structure/reagent_dispensers/watertank = 1, + /obj/item/shard = 1, + ) + result_atoms = list(/obj/item/reagent_containers/cup/beaker/eldritch) + cost = 1 + + + research_tree_icon_path = 'icons/obj/antags/eldritch.dmi' + research_tree_icon_state = "eldritch_flask" + +/datum/heretic_knowledge/entropy_pulse + name = "Pulse of Entropy" + desc = "Allows you to transmute 10 iron sheets and a garbage item to fill the surrounding vicinity of the rune with rust." + gain_text = "Reality begins to whisper to me. To give it its entropic end." + required_atoms = list( + /obj/item/stack/sheet/metal = 10, + /obj/item/trash = 1, + ) + cost = 0 + + research_tree_icon_path = 'icons/mob/actions/actions_ecult.dmi' + research_tree_icon_state = "corrode" + research_tree_icon_frame = 10 + + var/rusting_range = 8 + +/datum/heretic_knowledge/entropy_pulse/on_finished_recipe(mob/living/user, list/selected_atoms, turf/loc) + for(var/turf/nearby_turf in view(rusting_range, loc)) + if(get_dist(nearby_turf, loc) <= 1) //tiles on rune should always be rusted + nearby_turf.rust_heretic_act() + //we exclude closed turf to avoid exposing cultist bases + if(prob(10) || iswallturf(nearby_turf)) + continue + nearby_turf.rust_heretic_act() + return TRUE + + +/datum/heretic_knowledge/summon/rusty + name = "Rusted Ritual" + desc = "Allows you to transmute a pool of vomit, some cable coil, and 10 sheets of iron into a Rust Walker. \ + Rust Walkers excel at spreading rust and are moderately strong in combat." + gain_text = "I combined my knowledge of creation with my desire for corruption. The Marshal knew my name, and the Rusted Hills echoed out." + + required_atoms = list( + /obj/effect/decal/cleanable/vomit = 1, + /obj/item/stack/sheet/metal = 10, + /obj/item/stack/cable_coil = 15, + ) + mob_to_summon = /mob/living/simple_animal/hostile/heretic_summon/rust_spirit + cost = 1 + + + diff --git a/code/modules/antagonists/heretic/knowledge/side_void_blade.dm b/code/modules/antagonists/heretic/knowledge/side_void_blade.dm new file mode 100644 index 000000000000..f5985834f786 --- /dev/null +++ b/code/modules/antagonists/heretic/knowledge/side_void_blade.dm @@ -0,0 +1,153 @@ +// Sidepaths for knowledge between Void and Blade. + +/datum/heretic_knowledge_tree_column/void_to_blade + neighbour_type_left = /datum/heretic_knowledge_tree_column/main/void + neighbour_type_right = /datum/heretic_knowledge_tree_column/main/blade + + route = PATH_SIDE + + tier1 = /datum/heretic_knowledge/limited_amount/risen_corpse + tier2 = /datum/heretic_knowledge/rune_carver + tier3 = /datum/heretic_knowledge/summon/maid_in_mirror + + + +/// The max health given to Shattered Risen +#define RISEN_MAX_HEALTH 125 + +/datum/heretic_knowledge/limited_amount/risen_corpse + name = "Shattered Ritual" + desc = "Allows you to transmute a corpse with a soul, a pair of latex or nitrile gloves, and \ + and any exosuit clothing (such as armor) to create a Shattered Risen. \ + Shattered Risen are strong ghouls that have 125 health, but cannot hold items, \ + instead having two brutal weapons for hands. You can only create one at a time." + gain_text = "I witnessed a cold, rending force drag this corpse back to near-life. \ + When it moves, it crunches like broken glass. Its hands are no longer recognizable as human - \ + each clenched fist contains a brutal nest of sharp bone-shards instead." + + required_atoms = list( + /obj/item/clothing/suit = 1, + /obj/item/clothing/gloves/color/latex = 1, + ) + limit = 1 + cost = 1 + + research_tree_icon_path = 'icons/ui_icons/antags/heretic/knowledge.dmi' + research_tree_icon_state = "ghoul_shattered" + + +/datum/heretic_knowledge/limited_amount/risen_corpse/recipe_snowflake_check(mob/living/user, list/atoms, list/selected_atoms, turf/loc) + . = ..() + if(!.) + return FALSE + + for(var/mob/living/carbon/human/body in atoms) + if(body.stat != DEAD) + continue + if(!IS_VALID_GHOUL_MOB(body) || HAS_TRAIT(body, TRAIT_HUSK)) + to_chat(user, "[body] is not in a valid state to be made into a ghoul.") + continue + if(!body.mind) + to_chat(user, "[body] is mindless and cannot be made into a ghoul.") + continue + if(!body.client && !body.mind.get_ghost()) + to_chat(user, "[body] is soulless and cannot be made into a ghoul.") + continue + + // We will only accept valid bodies with a mind, or with a ghost connected that used to control the body + selected_atoms += body + return TRUE + + to_chat(user, "The ritual has failed, there is no valid body.") + return FALSE + +/datum/heretic_knowledge/limited_amount/risen_corpse/on_finished_recipe(mob/living/user, list/selected_atoms, turf/loc) + var/mob/living/carbon/human/soon_to_be_ghoul = locate() in selected_atoms + if(QDELETED(soon_to_be_ghoul)) // No body? No ritual + stack_trace("[type] reached on_finished_recipe without a human in selected_atoms to make a ghoul out of.") + to_chat(user, "The ritual has failed, there is no valid body.") + return FALSE + + soon_to_be_ghoul.grab_ghost() + if(!soon_to_be_ghoul.mind || !soon_to_be_ghoul.client) + stack_trace("[type] reached on_finished_recipe without a minded / cliented human in selected_atoms to make a ghoul out of.") + to_chat(user, "The ritual has failed, there is no valid body.") + return FALSE + + selected_atoms -= soon_to_be_ghoul + make_risen(user, soon_to_be_ghoul) + return TRUE + +/// Make [victim] into a shattered risen ghoul. +/datum/heretic_knowledge/limited_amount/risen_corpse/proc/make_risen(mob/living/user, mob/living/carbon/human/victim) + message_admins("[ADMIN_LOOKUPFLW(user)] created a shattered risen, [ADMIN_LOOKUPFLW(victim)].") + + victim.apply_status_effect( + /datum/status_effect/ghoul, + RISEN_MAX_HEALTH, + user.mind, + CALLBACK(src, PROC_REF(apply_to_risen)), + CALLBACK(src, PROC_REF(remove_from_risen)), + ) + +/// Callback for the ghoul status effect - what effects are applied to the ghoul. +/datum/heretic_knowledge/limited_amount/risen_corpse/proc/apply_to_risen(mob/living/risen) + LAZYADD(created_items, risen.UID()) + //risen.AddComponent(/datum/component/mutant_hands, mutant_hand_path = /obj/item/mutant_hand/shattered_risen) + +/// Callback for the ghoul status effect - cleaning up effects after the ghoul status is removed. +/datum/heretic_knowledge/limited_amount/risen_corpse/proc/remove_from_risen(mob/living/risen) + LAZYREMOVE(created_items, risen.UID()) + //qdel(risen.GetComponent(/datum/component/mutant_hands)) + +#undef RISEN_MAX_HEALTH + +/// The "hand" "weapon" used by shattered risen +/obj/item/mutant_hand/shattered_risen + name = "bone-shards" + desc = "What once appeared to be a normal human fist, now holds a maulled nest of sharp bone-shards." + color = "#001aff" + hitsound = "shatter" + force = 16 + sharp = TRUE + +/datum/heretic_knowledge/rune_carver + name = "Carving Knife" + desc = "Allows you to transmute a knife, a shard of glass, and a piece of paper to create a Carving Knife. \ + The Carving Knife allows you to etch difficult to see traps that trigger on heathens who walk overhead. \ + Also makes for a handy throwing weapon." + gain_text = "Etched, carved... eternal. There is power hidden in everything. I can unveil it! \ + I can carve the monolith to reveal the chains!" + + required_atoms = list( + /obj/item/kitchen/knife = 1, + /obj/item/shard = 1, + /obj/item/paper = 1, + ) + result_atoms = list(/obj/item/melee/rune_carver) + cost = 1 + + + research_tree_icon_path = 'icons/obj/antags/eldritch.dmi' + research_tree_icon_state = "rune_carver" + +/datum/heretic_knowledge/summon/maid_in_mirror + name = "Maid in the Mirror" + desc = "Allows you to transmute five sheets of titanium, a flash, a suit of armor, and a pair of lungs \ + to create a Maid in the Mirror. Maid in the Mirrors are decent combatants that can become incorporeal by \ + phasing in and out of the mirror realm, serving as powerful scouts and ambushers. \ + However, they are weak to mortal gaze and take damage by being examined." + gain_text = "Within each reflection, lies a gateway into an unimaginable world of colors never seen and \ + people never met. The ascent is glass, and the walls are knives. Each step is blood, if you do not have a guide." + + required_atoms = list( + /obj/item/stack/sheet/mineral/titanium = 5, + /obj/item/clothing/suit/armor = 1, + /obj/item/flash = 1, + /obj/item/organ/internal/lungs = 1, + ) + cost = 1 + + //mob_to_summon = /mob/living/basic/heretic_summon/maid_in_the_mirror + mob_to_summon = /mob/living/simple_animal/bunny + diff --git a/code/modules/antagonists/heretic/knowledge/starting_lore.dm b/code/modules/antagonists/heretic/knowledge/starting_lore.dm new file mode 100644 index 000000000000..8b2ab897b707 --- /dev/null +++ b/code/modules/antagonists/heretic/knowledge/starting_lore.dm @@ -0,0 +1,333 @@ +// Heretic starting knowledge. + +/// Global list of all heretic knowledge that have is_starting_knowledge = TRUE. List of PATHS. +GLOBAL_LIST_INIT(heretic_start_knowledge, initialize_starting_knowledge()) + +/** + * Returns a list of all heretic knowledge TYPEPATHS + * that have route set to PATH_START. + */ +/proc/initialize_starting_knowledge() + . = list() + for(var/datum/heretic_knowledge/knowledge as anything in subtypesof(/datum/heretic_knowledge)) + if(initial(knowledge.is_starting_knowledge) == TRUE) + . += knowledge + +/* + * The base heretic knowledge. Grants the Mansus Grasp spell. + */ +/datum/heretic_knowledge/spell/basic + name = "Break of Dawn" + desc = "Starts your journey into the Mansus. \ + Grants you the Mansus Grasp, a powerful and upgradable \ + disabling spell that can be cast regardless of having a focus." + action_to_add = /datum/spell/touch/mansus_grasp + cost = 0 + is_starting_knowledge = TRUE + +/** + * The Living Heart heretic knowledge. + * + * Gives the heretic a living heart. + * Also includes a ritual to turn their heart into a living heart. + */ +/datum/heretic_knowledge/living_heart + name = "The Living Heart" + desc = "Grants you a Living Heart, allowing you to track sacrifice targets. \ + Should you lose your heart, you can transmute a poppy and a pool of blood \ + to awaken your heart into a Living Heart. If your heart is cybernetic, \ + you will additionally require a usable organic heart in the transmutation." + required_atoms = list( + /obj/effect/decal/cleanable/blood = 1, + /obj/item/food/grown/poppy = 1, + ) + cost = 0 + priority = MAX_KNOWLEDGE_PRIORITY - 1 // Knowing how to remake your heart is important + is_starting_knowledge = TRUE + research_tree_icon_path = 'icons/obj/antags/eldritch.dmi' + research_tree_icon_state = "living_heart" + research_tree_icon_frame = 1 + /// The typepath of the organ type required for our heart. + var/required_organ_type = /obj/item/organ/internal/heart + +/datum/heretic_knowledge/living_heart/on_research(mob/user, datum/antagonist/heretic/our_heretic) + . = ..() + + var/obj/item/organ/where_to_put_our_heart = user.get_organ_slot(our_heretic.living_heart_organ_slot) + // Our heart slot is not valid to put a heart + if(!is_valid_heart(where_to_put_our_heart)) + where_to_put_our_heart = null + + // If a heretic is made from a species without a heart, we need to find a backup. + if(!where_to_put_our_heart) + var/static/list/backup_organs = list( + ORGAN_SLOT_LUNGS = /obj/item/organ/internal/lungs, + ORGAN_SLOT_LIVER = /obj/item/organ/internal/liver + ) + + for(var/backup_slot in backup_organs) + var/obj/item/organ/look_for_backup = user.get_organ_slot(backup_slot) + // This backup slot is not a valid slot to put a heart + if(!is_valid_heart(look_for_backup)) + continue + + // We found a replacement place to put our heart + where_to_put_our_heart = look_for_backup + our_heretic.living_heart_organ_slot = backup_slot + required_organ_type = backup_organs[backup_slot] + to_chat(user, "As your species does not have a heart, your Living Heart is located in your [look_for_backup.name].") + break + + if(where_to_put_our_heart) + where_to_put_our_heart.AddComponent(/datum/component/living_heart) + desc = "Grants you a Living Heart, tied to your [where_to_put_our_heart.name], \ + allowing you to track sacrifice targets. \ + Should you lose your [where_to_put_our_heart.name], you can transmute a poppy and a pool of blood \ + to awaken your replacement [where_to_put_our_heart.name] into a Living Heart. \ + If your [where_to_put_our_heart.name] is cybernetic, \ + you will additionally require a usable organic [where_to_put_our_heart.name] in the transmutation." + + else + to_chat(user, "You don't have a heart, or any chest organs for that matter. You didn't get a Living Heart because of it.") + message_admins("Oh fuck me, [user] did not have a heart, lungs, or liver. give [user] some organic lungs or something, then have them use the ritual again, then report this to me") + +/datum/heretic_knowledge/living_heart/on_lose(mob/user, datum/antagonist/heretic/our_heretic) + var/obj/item/organ/our_living_heart = user.get_organ_slot(our_heretic.living_heart_organ_slot) + if(our_living_heart) + qdel(our_living_heart.GetComponent(/datum/component/living_heart)) + +// Don't bother letting them invoke this ritual if they have a Living Heart already in their chest +/datum/heretic_knowledge/living_heart/can_be_invoked(datum/antagonist/heretic/invoker) + if(invoker.has_living_heart() == HERETIC_HAS_LIVING_HEART) + return FALSE + return TRUE + +/datum/heretic_knowledge/living_heart/recipe_snowflake_check(mob/living/user, list/atoms, list/selected_atoms, turf/loc) + var/datum/antagonist/heretic/our_heretic = IS_HERETIC(user) + var/obj/item/organ/our_living_heart = user.get_organ_slot(our_heretic.living_heart_organ_slot) + // For sanity's sake, check if they've got a living heart - + // even though it's not invokable if you already have one, + // they may have gained one unexpectantly in between now and then + if(!QDELETED(our_living_heart)) + if(HAS_TRAIT(our_living_heart, TRAIT_LIVING_HEART)) + to_chat(user, "The ritual failed, you already have a living heart!") + return FALSE + + // By this point they are making a new heart + // If their current heart is organic / not synthetic, we can continue the ritual as normal + if(is_valid_heart(our_living_heart)) + return TRUE + + + // Otherwise, seek out a replacement in our atoms + for(var/obj/item/organ/nearby_organ in atoms) + if(!istype(nearby_organ, required_organ_type)) + continue + if(!is_valid_heart(nearby_organ)) + continue + + selected_atoms += nearby_organ + return TRUE + + to_chat(user, "The ritual failed, you need a replacement [our_heretic.living_heart_organ_slot]!") // "need a replacement heart!" + return FALSE + +/datum/heretic_knowledge/living_heart/on_finished_recipe(mob/living/user, list/selected_atoms, turf/loc) + var/datum/antagonist/heretic/our_heretic = IS_HERETIC(user) + var/obj/item/organ/internal/our_new_heart = user.get_organ_slot(our_heretic.living_heart_organ_slot) + + // Our heart is robotic or synthetic - we need to replace it, and we fortunately should have one by here + if(!is_valid_heart(our_new_heart)) + var/obj/item/organ/internal/our_replacement_heart = locate(required_organ_type) in selected_atoms + if(!our_replacement_heart) + CRASH("[type] required a replacement organic heart in on_finished_recipe, but did not find one.") + // Repair the organic heart, if needed, to just below the high threshold + if(our_replacement_heart.damage >= our_replacement_heart.min_broken_damage) + our_replacement_heart.damage = our_replacement_heart.min_broken_damage - 1 + // And now, put our organic heart in its place + our_replacement_heart.insert(user, TRUE) + if(our_new_heart) + // Throw our current heart out of our chest, violently + user.visible_message("[user]'s [our_new_heart.name] bursts suddenly out of [user.p_their()] chest!") + INVOKE_ASYNC(user, TYPE_PROC_REF(/mob, emote), "scream") + user.apply_damage(20, BRUTE, BODY_ZONE_CHEST) + selected_atoms -= our_new_heart // so we don't delete our old heart while we dramatically toss is out + our_new_heart.throw_at(get_edge_target_turf(user, pick(GLOB.alldirs)), 2, 2) + our_new_heart = our_replacement_heart + + if(!our_new_heart) + CRASH("[type] somehow made it to on_finished_recipe without a heart. What?") + + // Snowflakey, but if the user used a heart that wasn't beating + // they'll immediately collapse into a heart attack. Funny but not ideal. + if(ishuman(user)) + var/mob/living/carbon/human/human_user = user + human_user.set_heartattack(FALSE) + + // Don't delete our shiny new heart + selected_atoms -= our_new_heart + // Make it the living heart + our_new_heart.AddComponent(/datum/component/living_heart) + to_chat(user, "You feel your [our_new_heart.name] begin pulse faster and faster as it awakens!") + playsound(user, 'sound/misc/demon_consume.ogg', 50, TRUE) + return TRUE + +/// Checks if the passed heart is a valid heart to become a living heart +/datum/heretic_knowledge/living_heart/proc/is_valid_heart(obj/item/organ/new_heart) + if(QDELETED(new_heart)) + return FALSE + if(new_heart.status & (ORGAN_ROBOT|ORGAN_DEAD)) + return FALSE + + return TRUE + +/** + * Allows the heretic to craft a spell focus. + * They require a focus to cast advanced spells. + */ +/datum/heretic_knowledge/amber_focus + name = "Amber Focus" + desc = "Allows you to transmute a sheet of glass and a pair of eyes to create an Amber Focus. \ + A focus must be worn in order to cast more advanced spells." + required_atoms = list( + /obj/item/organ/internal/eyes = 1, + /obj/item/stack/sheet/glass = 1, + ) + result_atoms = list(/obj/item/clothing/neck/heretic_focus) + cost = 0 + priority = MAX_KNOWLEDGE_PRIORITY - 2 // Not as important as making a heart or sacrificing, but important enough. + is_starting_knowledge = TRUE + research_tree_icon_path = 'icons/obj/clothing/neck.dmi' + research_tree_icon_state = "eldritch_necklace" + +/datum/heretic_knowledge/spell/cloak_of_shadows + name = "Cloak of Shadow" + desc = "Grants you the spell Cloak of Shadow. This spell will completely conceal your identity in a purple smoke \ + for three minutes, assisting you in keeping secrecy. Requires a focus to cast." + action_to_add = /datum/spell/shadow_cloak + cost = 0 + is_starting_knowledge = TRUE + +/** + * Codex Cicatrixi is available at the start: + * This allows heretics to choose if they want to rush all the influences and take them stealthily, or + * Construct a codex and take what's left with more points. + * Another downside to having the book is strip searches, which means that it's not just a free nab, at least until you get exposed - and when you do, you'll probably need the faster drawing speed. + * Overall, it's a tradeoff between speed and stealth or power. + */ +/datum/heretic_knowledge/codex_cicatrix + name = "Codex Cicatrix" + desc = "Allows you to transmute a book, any unique pen (anything but a generic pen, blue pen, or red pen), and your pick from any carcass (animal or human), leather, or hide to create a Codex Cicatrix. \ + The Codex Cicatrix can be used when draining influences to gain additional knowledge, but comes at greater risk of being noticed. \ + It can also be used to draw and remove transmutation runes easier, and as a spell focus in a pinch." + gain_text = "The occult leaves fragments of knowledge and power anywhere and everywhere. The Codex Cicatrix is one such example. \ + Within the leather-bound faces and age old pages, a path into the Mansus is revealed." + required_atoms = list( + /obj/item/book = 1, + /obj/item/pen = 1, + list(/mob/living, /obj/item/stack/sheet/leather, /obj/item/stack/sheet/animalhide) = 1, + ) + banned_atom_types = list(/obj/item/pen, /obj/item/pen/blue, /obj/item/pen/red) + result_atoms = list(/obj/item/codex_cicatrix) + cost = 1 + is_starting_knowledge = TRUE + priority = MAX_KNOWLEDGE_PRIORITY - 3 // Least priority out of the starting knowledges, as it's an optional boon. + var/static/list/non_mob_bindings = typecacheof(list(/obj/item/stack/sheet/leather, /obj/item/stack/sheet/animalhide)) + research_tree_icon_path = 'icons/obj/antags/eldritch.dmi' + research_tree_icon_state = "book" + +/datum/heretic_knowledge/codex_cicatrix/parse_required_item(atom/item_path, number_of_things) + if(item_path == /obj/item/pen || item_path == /obj/item/pen/blue || item_path == /obj/item/pen/red) + return "unique type of pen" + return ..() + +/datum/heretic_knowledge/codex_cicatrix/recipe_snowflake_check(mob/living/user, list/atoms, list/selected_atoms, turf/loc) + . = ..() + if(!.) + return FALSE + + for(var/thingy in atoms) + if(is_type_in_typecache(thingy, non_mob_bindings)) + selected_atoms += thingy + return TRUE + else if(isliving(thingy)) + var/mob/living/body = thingy + if(body.stat != DEAD) + continue + selected_atoms += body + return TRUE + return FALSE + +/datum/heretic_knowledge/codex_cicatrix/cleanup_atoms(list/selected_atoms) + var/mob/living/body = locate() in selected_atoms + if(!body) + return ..() + var/exterior_text = "skin" + // If human, it's the limb. If not, it's the body. + var/atom/movable/ripped_thing = body + + // We will check if it's a humann's body. + // If it is, we will damage a random bodypart, and check that bodypart for its body type, to select between 'skin' or 'exterior'. + if(ishuman(body)) + var/mob/living/carbon/human/carbody = body + var/obj/item/organ/external/bodypart = pick(carbody.bodyparts) + ripped_thing = bodypart + carbody.apply_damage(25, BRUTE, bodypart, sharp = TRUE) + else + body.apply_damage(25, BRUTE, sharp = TRUE) + // If it is not a carbon mob, we will just check biotypes and damage it directly. + if(body.mob_biotypes & (MOB_MINERAL|MOB_ROBOTIC)) + exterior_text = "exterior" + + // Procure book for flavor text. This is why we call parent at the end. + var/obj/item/book/le_book = locate() in selected_atoms + if(!le_book) + stack_trace("Somehow, no book in codex cicatrix selected atoms! [english_list(selected_atoms)]") + playsound(body, 'sound/items/poster_ripped.ogg', 100, TRUE) + body.do_jitter_animation() + var/turf/our_turf = get_turf(body) + our_turf.visible_message("An awful ripping sound is heard as [ripped_thing]'s [exterior_text] is ripped straight out, wrapping around [le_book || "the book"], turning into an eldritch shade of blue!") + return ..() + +/datum/heretic_knowledge/feast_of_owls + name = "Feast of Owls" + desc = "Allows you to undergo a ritual that gives you 5 knowledge points but locks you out of ascension. This can only be done once and cannot be reverted." + gain_text = "Under the soft glow of unreason there is a beast that stalks the night. I shall bring it forth and let it enter my presence. It will feast upon my amibitions and leave knowledge in its wake." + is_starting_knowledge = TRUE + required_atoms = list() + research_tree_icon_path = 'icons/mob/actions/actions_animal.dmi' + research_tree_icon_state = "god_transmit" + /// amount of research points granted + var/reward = 5 + +/datum/heretic_knowledge/feast_of_owls/can_be_invoked(datum/antagonist/heretic/invoker) + return !invoker.feast_of_owls + +/datum/heretic_knowledge/feast_of_owls/on_finished_recipe(mob/living/user, list/selected_atoms, turf/loc) + var/alert = tgui_alert(user,"Do you really want to forsake your ascension? This action cannot be reverted.", "Feast of Owls", list("Yes I'm sure", "No"), 30 SECONDS) + if(alert != "Yes I'm sure" || QDELETED(user) || QDELETED(src) || get_dist(user, loc) > 2) + return FALSE + var/datum/antagonist/heretic/heretic_datum = IS_HERETIC(user) + if(QDELETED(heretic_datum) || heretic_datum.feast_of_owls) + return FALSE + + . = TRUE + + heretic_datum.feast_of_owls = TRUE + user.playsound_local(get_turf(user), 'sound/ambience/antag/heretic/heretic_gain_intense.ogg', 100, FALSE, pressure_affected = FALSE, use_reverb = FALSE) + user.EyeBlind(reward * 1 SECONDS) + user.Weaken(reward * 1 SECONDS) + for(var/i in 1 to reward) + user.emote("scream") + playsound(loc, 'sound/items/eatfood.ogg', 100, TRUE) + heretic_datum.knowledge_points++ + to_chat(user, "You feel something invisible tearing away at your very essence!") + user.do_jitter_animation() + sleep(1 SECONDS) + if(QDELETED(user) || QDELETED(heretic_datum)) + return FALSE + + to_chat(user, "Your ambition is ravaged, but something powerful remains in its wake...") + var/drain_message = pick_list(HERETIC_INFLUENCE_FILE, "drain_message") + to_chat(user, "[drain_message]") + return . diff --git a/code/modules/antagonists/heretic/knowledge/void_lore.dm b/code/modules/antagonists/heretic/knowledge/void_lore.dm new file mode 100644 index 000000000000..206aea5508a9 --- /dev/null +++ b/code/modules/antagonists/heretic/knowledge/void_lore.dm @@ -0,0 +1,324 @@ + +/datum/heretic_knowledge_tree_column/main/void + neighbour_type_left = /datum/heretic_knowledge_tree_column/flesh_to_void + neighbour_type_right = /datum/heretic_knowledge_tree_column/void_to_blade + + route = PATH_VOID + ui_bgr = "node_void" + + start = /datum/heretic_knowledge/limited_amount/starting/base_void + grasp = /datum/heretic_knowledge/void_grasp + tier1 = /datum/heretic_knowledge/cold_snap + mark = /datum/heretic_knowledge/mark/void_mark + ritual_of_knowledge = /datum/heretic_knowledge/knowledge_ritual/void + unique_ability = /datum/heretic_knowledge/spell/void_conduit + tier2 = /datum/heretic_knowledge/spell/void_phase + blade = /datum/heretic_knowledge/blade_upgrade/void + tier3 = /datum/heretic_knowledge/spell/void_pull + ascension = /datum/heretic_knowledge/ultimate/void_final + +/datum/heretic_knowledge/limited_amount/starting/base_void + name = "Glimmer of Winter" + desc = "Opens up the Path of Void to you. \ + Allows you to transmute a knife in sub-zero temperatures into a Void Blade. \ + You can only create two at a time." + gain_text = "I feel a shimmer in the air, the air around me gets colder. \ + I start to realize the emptiness of existence. Something's watching me." + required_atoms = list(/obj/item/kitchen/knife = 1) + result_atoms = list(/obj/item/melee/sickly_blade/void) + research_tree_icon_path = 'icons/obj/weapons/khopesh.dmi' + research_tree_icon_state = "void_blade" + +/datum/heretic_knowledge/limited_amount/starting/base_void/recipe_snowflake_check(mob/living/user, list/atoms, list/selected_atoms, turf/loc) + if(!isfloorturf(loc)) + to_chat(user, "The ritual failed, this is not a valid location!") + return FALSE + + var/turf/simulated/our_turf = loc + var/datum/gas_mixture/G = our_turf.get_readonly_air() + var/turf_hotness = G.temperature() + if(turf_hotness > T0C) + to_chat(user, "The ritual failed, it is too hot for the ritual!") + return FALSE + + return ..() + +/datum/heretic_knowledge/void_grasp + name = "Grasp of Void" + desc = "Your Mansus Grasp will temporarily mute and chill the victim." + gain_text = "I saw the cold watcher who observes me. The chill mounts within me. \ + They are quiet. This isn't the end of the mystery." + cost = 1 + research_tree_icon_path = 'icons/ui_icons/antags/heretic/knowledge.dmi' + research_tree_icon_state = "grasp_void" + +/datum/heretic_knowledge/void_grasp/on_gain(mob/user, datum/antagonist/heretic/our_heretic) + RegisterSignal(user, COMSIG_HERETIC_MANSUS_GRASP_ATTACK, PROC_REF(on_mansus_grasp)) + +/datum/heretic_knowledge/void_grasp/on_lose(mob/user, datum/antagonist/heretic/our_heretic) + UnregisterSignal(user, COMSIG_HERETIC_MANSUS_GRASP_ATTACK) + +/datum/heretic_knowledge/void_grasp/proc/on_mansus_grasp(mob/living/source, mob/living/target) + SIGNAL_HANDLER + + if(!iscarbon(target)) + return + + var/mob/living/carbon/carbon_target = target + carbon_target.Silence(10 SECONDS) + carbon_target.apply_status_effect(/datum/status_effect/void_chill, 2) + +/datum/heretic_knowledge/cold_snap + name = "Aristocrat's Way" + desc = "Grants you immunity to cold temperatures, and removes your need to breathe. \ + You can still take damage due to a lack of pressure." + gain_text = "I found a thread of cold breath. It lead me to a strange shrine, all made of crystals. \ + Translucent and white, a depiction of a nobleman stood before me." + cost = 1 + research_tree_icon_path = 'icons/effects/effects.dmi' + research_tree_icon_state = "the_freezer" + + /// How many life cycles have we failed? After 3, remove the buff + var/failed_life_cycles = 0 + /// Traits we apply to become immune to the environment + var/static/list/gain_traits = list(TRAIT_NOSLIP) + +/datum/heretic_knowledge/cold_snap/on_gain(mob/user, datum/antagonist/heretic/our_heretic) + user.add_traits(list(TRAIT_NOBREATH, TRAIT_RESISTCOLD), type) + RegisterSignal(user, COMSIG_LIVING_LIFE, PROC_REF(check_environment)) + +/datum/heretic_knowledge/cold_snap/on_lose(mob/user, datum/antagonist/heretic/our_heretic) + user.remove_traits(list(TRAIT_RESISTCOLD, TRAIT_NOBREATH), type) + UnregisterSignal(user, COMSIG_LIVING_LIFE) + +///Checks if our traits should be active +/datum/heretic_knowledge/cold_snap/proc/check_environment(mob/living/user) + SIGNAL_HANDLER + var/turf/simulated/our_turf = get_turf(user) + var/datum/gas_mixture/G = our_turf.get_readonly_air() + var/turf_hotness = G.temperature() + var/turf_pressure = G.return_pressure() + if(turf_hotness <= T0C || turf_pressure < ONE_ATMOSPHERE) + user.add_traits(gain_traits, type) + failed_life_cycles = 0 + else + if(failed_life_cycles >= 3) + failed_life_cycles = 0 + user.remove_traits(gain_traits, type) + return + failed_life_cycles++ + +/datum/heretic_knowledge/mark/void_mark + name = "Mark of Void" + desc = "Your Mansus Grasp now applies the Mark of Void. The mark is triggered from an attack with your Void Blade. \ + When triggered, further silences the victim and swiftly lowers the temperature of their body and the air around them." + gain_text = "A gust of wind? A shimmer in the air? The presence is overwhelming, \ + my senses began to betray me. My mind is my own enemy." + mark_type = /datum/status_effect/eldritch/void + +/datum/heretic_knowledge/knowledge_ritual/void + +/datum/heretic_knowledge/spell/void_conduit + name = "Void Conduit" + desc = "Grants you Void Conduit, a spell which summons a pulsing gate to the Void itself. Every pulse breaks windows and airlocks, while afflicting Heathens with an eldritch chill and shielding Heretics against low pressure." + gain_text = "The hum in the still, cold air turns to a cacophonous rattle. \ + Over the noise, there is no distinction to the clattering of window panes and the yawning knowledge that ricochets through my skull. \ + The doors won't close. I can't keep the cold out now." + action_to_add = /datum/spell/aoe/conjure/void_conduit + cost = 1 + +/datum/heretic_knowledge/spell/void_phase + name = "Void Phase" + desc = "Grants you Void Phase, a long range targeted teleport spell. \ + Additionally causes damage to heathens around your original and target destination." + gain_text = "The entity calls themself the Aristocrat. They effortlessly walk through air like \ + nothing - leaving a harsh, cold breeze in their wake. They disappear, and I am left in the blizzard." + action_to_add = /datum/spell/pointed/void_phase + cost = 1 + research_tree_icon_frame = 7 + +/datum/heretic_knowledge/blade_upgrade/void + name = "Seeking Blade" + desc = "Your blade now freezes enemies. Additionally, you can now attack distant marked targets with your Void Blade, teleporting directly next to them." + gain_text = "Fleeting memories, fleeting feet. I mark my way with frozen blood upon the snow. Covered and forgotten." + + + research_tree_icon_path = 'icons/ui_icons/antags/heretic/knowledge.dmi' + research_tree_icon_state = "blade_upgrade_void" + +/datum/heretic_knowledge/blade_upgrade/void/do_melee_effects(mob/living/source, mob/living/target, obj/item/melee/sickly_blade/blade) + if(source == target || !isliving(target)) + return + + target.apply_status_effect(/datum/status_effect/void_chill, 2) + +/datum/heretic_knowledge/blade_upgrade/void/do_ranged_effects(mob/living/user, mob/living/target, obj/item/melee/sickly_blade/blade) + if(!isliving(target)) + return + if(!target.has_status_effect(/datum/status_effect/eldritch)) + return + + var/dir = angle2dir(dir2angle(get_dir(user, target)) + 180) + user.forceMove(get_step(target, dir)) + + INVOKE_ASYNC(src, PROC_REF(follow_up_attack), user, target, blade) + +/datum/heretic_knowledge/blade_upgrade/void/proc/follow_up_attack(mob/living/user, mob/living/target, obj/item/melee/sickly_blade/blade) + blade.melee_attack_chain(user, target) + +/datum/heretic_knowledge/spell/void_pull + name = "Void Pull" + desc = "Grants you Void Pull, a spell that pulls all nearby heathens towards you, stunning them briefly." + gain_text = "All is fleeting, but what else stays? I'm close to ending what was started. \ + The Aristocrat reveals themselves to me again. They tell me I am late. Their pull is immense, I cannot turn back." + + action_to_add = /datum/spell/aoe/void_pull + cost = 1 + + + research_tree_icon_frame = 6 + +/datum/heretic_knowledge/ultimate/void_final + name = "Waltz at the End of Time" + desc = "The ascension ritual of the Path of Void. \ + Bring 3 corpses to a transmutation rune in sub-zero temperatures to complete the ritual. \ + When completed, causes a violent storm of void snow \ + to assault the station, freezing and damaging heathens. Those nearby will be silenced and frozen even quicker. \ + Additionally, you will become immune to the effects of space." + gain_text = "The world falls into darkness. I stand in an empty plane, small flakes of ice fall from the sky. \ + The Aristocrat stands before me, beckoning. We will play a waltz to the whispers of dying reality, \ + as the world is destroyed before our eyes. The void will return all to nothing, WITNESS MY ASCENSION!" + + announcement_text = "%SPOOKY% The nobleman of void %NAME% has arrived, stepping along the Waltz that ends worlds! %SPOOKY%" + announcement_sound = 'sound/ambience/antag/heretic/ascend_void.ogg' + research_tree_icon_path = 'icons/ui_icons/antags/heretic/ascension.dmi' + research_tree_icon_state = "voidascend" + ///soundloop for the void theme + var/datum/looping_sound/void_loop/sound_loop + ///Reference to the ongoing voidstrom that surrounds the heretic + var/datum/weather/void_storm/storm + ///The storm where there are actual effects + var/datum/proximity_monitor/advanced/void_storm/heavy_storm + +/datum/heretic_knowledge/ultimate/void_final/recipe_snowflake_check(mob/living/user, list/atoms, list/selected_atoms, turf/loc) + if(!isfloorturf(loc)) + to_chat(user, "The ritual failed, this is not a valid location!") + return FALSE + + var/datum/gas_mixture/G = loc.get_readonly_air() + var/turf_hotness = G.temperature() + if(turf_hotness > T0C) + to_chat(user, "The ritual failed, it is too hot for the ritual!") + return FALSE + + return ..() + +/datum/heretic_knowledge/ultimate/void_final/on_finished_recipe(mob/living/user, list/selected_atoms, turf/loc) + . = ..() + user.add_traits(list(TRAIT_RESISTLOWPRESSURE, TRAIT_FLYING), type) + + // Let's get this show on the road! + sound_loop = new(user, TRUE, TRUE) + RegisterSignal(user, COMSIG_LIVING_LIFE, PROC_REF(on_life)) + RegisterSignal(user, COMSIG_ATOM_PREHIT, PROC_REF(hit_by_projectile)) + RegisterSignals(user, list(COMSIG_MOB_DEATH, COMSIG_PARENT_QDELETING), PROC_REF(on_death)) + heavy_storm = new(user, 10) + user.lighting_alpha = LIGHTING_PLANE_ALPHA_VISIBLE + user.update_sight() + +/datum/heretic_knowledge/ultimate/void_final/on_lose(mob/user, datum/antagonist/heretic/our_heretic) + on_death() // Losing is pretty much dying. I think + +/** + * Signal proc for [COMSIG_LIVING_LIFE]. + * + * Any non-heretics nearby the heretic ([source]) + * are constantly silenced and battered by the storm. + * + * Also starts storms in any area that doesn't have one. + */ +/datum/heretic_knowledge/ultimate/void_final/proc/on_life(mob/living/source, seconds_per_tick, times_fired) + SIGNAL_HANDLER + + for(var/atom/thing_in_range as anything in range(10, source)) + if(iscarbon(thing_in_range)) + var/mob/living/carbon/close_carbon = thing_in_range + if(IS_HERETIC_OR_MONSTER(close_carbon)) + close_carbon.apply_status_effect(/datum/status_effect/void_conduit) + continue + close_carbon.Silence(2 SECONDS) + close_carbon.apply_status_effect(/datum/status_effect/void_chill, 1) + close_carbon.EyeBlurry(rand(0, 2 SECONDS)) + close_carbon.adjust_bodytemperature(-30 * TEMPERATURE_DAMAGE_COEFFICIENT) + + if(istype(thing_in_range, /obj/machinery/door)) + var/obj/machinery/door/affected_door = thing_in_range + affected_door.disable_door_sparks() //Sparks are the majority of the lag from this ascension, let us kill that off. + affected_door.take_damage(rand(60, 80)) + + if(istype(thing_in_range, /obj/structure/window) || istype(thing_in_range, /obj/structure/grille) || istype(thing_in_range, /obj/structure/door_assembly) || istype(thing_in_range, /obj/structure/firelock_frame)) + var/obj/structure/affected_structure = thing_in_range + affected_structure.take_damage(rand(20, 40)) + + if(isturf(thing_in_range)) + var/datum/milla_safe/void_cool/milla = new() + milla.invoke_async(thing_in_range) + + // Telegraph the storm in every area on the station. + var/list/station_levels = levels_by_trait(STATION_LEVEL) + if(!storm) + storm = new /datum/weather/void_storm(station_levels) + storm.telegraph() + + +/datum/milla_safe/void_cool + +/datum/milla_safe/void_cool/on_run(turf/T) + var/datum/gas_mixture/air = get_turf_air(T) + if(air.temperature() < T0C - 100) + return + air.set_temperature(air.temperature() * 0.9) + air.react() + +/** + * Signal proc for [COMSIG_MOB_DEATH]. + * + * Stop the storm when the heretic passes away. + */ +/datum/heretic_knowledge/ultimate/void_final/proc/on_death(datum/source) + SIGNAL_HANDLER + + if(sound_loop) + sound_loop.stop() + if(storm) + storm.end() + QDEL_NULL(storm) + if(heavy_storm) + QDEL_NULL(heavy_storm) + UnregisterSignal(source, list(COMSIG_LIVING_LIFE, COMSIG_ATOM_PREHIT, COMSIG_MOB_DEATH, COMSIG_PARENT_QDELETING)) + +///Few checks to determine if we can deflect bullets +/datum/heretic_knowledge/ultimate/void_final/proc/can_deflect(mob/living/ascended_heretic) + if(!(ascended_heretic.mobility_flags & MOBILITY_USE)) + return FALSE + if(!isturf(ascended_heretic.loc)) + return FALSE + return TRUE + +/datum/heretic_knowledge/ultimate/void_final/proc/hit_by_projectile(mob/living/ascended_heretic, obj/item/projectile/hitting_projectile, def_zone) + SIGNAL_HANDLER + + if(!can_deflect(ascended_heretic)) + return NONE + + ascended_heretic.visible_message( + "The void storm surrounding [ascended_heretic] deflects [hitting_projectile]!", + "The void storm protects you from [hitting_projectile]!", + ) + playsound(ascended_heretic, "void_deflect", 75, TRUE) + hitting_projectile.firer = ascended_heretic + if(prob(75)) + hitting_projectile.reflect_back(src) + else + hitting_projectile.set_angle(rand(0, 360))//SHING + return ATOM_PREHIT_FAILURE diff --git a/code/modules/antagonists/heretic/magic/aggressive_spread.dm b/code/modules/antagonists/heretic/magic/aggressive_spread.dm new file mode 100644 index 000000000000..b660ce92707c --- /dev/null +++ b/code/modules/antagonists/heretic/magic/aggressive_spread.dm @@ -0,0 +1,48 @@ +/datum/spell/aoe/rust_conversion + name = "Aggressive Spread" + desc = "Spreads rust onto nearby surfaces." + + + action_background_icon = 'icons/mob/actions/actions_ecult.dmi' + action_background_icon_state = "bg_heretic" + action_icon_state = "corrode" + action_icon = 'icons/mob/actions/actions_ecult.dmi' + sound = 'sound/items/welder.ogg' + + is_a_heretic_spell = TRUE + clothes_req = FALSE + base_cooldown = 30 SECONDS + + invocation = "A'GRSV SPR'D" + invocation_type = INVOCATION_WHISPER + spell_requirements = SPELL_REQUIRES_NO_ANTIMAGIC + aoe_range = 2 + + +/datum/spell/aoe/rust_conversion/create_new_targeting() + var/datum/spell_targeting/aoe/turf/targeting = new() + targeting.range = aoe_range + return targeting + +/datum/spell/aoe/rust_conversion/cast(list/targets, mob/living/user = usr) + for(var/turf/target_turfs in targets) + // We have less chance of rusting stuff that's further + var/distance_to_caster = get_dist(target_turfs, user) + var/chance_of_not_rusting = (max(distance_to_caster, 1) - 1) * 100 / (aoe_range + 1) + + if(prob(chance_of_not_rusting)) + continue + for(var/atom/victim in target_turfs) + if(isliving(user)) + user.do_rust_heretic_act(victim) + else + victim.rust_heretic_act() + if(isliving(user)) + user.do_rust_heretic_act(target_turfs) + else + target_turfs.rust_heretic_act() + + +/datum/spell/aoe/rust_conversion/construct + name = "Construct Spread" + base_cooldown = 15 SECONDS diff --git a/code/modules/antagonists/heretic/magic/apetravulnera.dm b/code/modules/antagonists/heretic/magic/apetravulnera.dm new file mode 100644 index 000000000000..19e853c30834 --- /dev/null +++ b/code/modules/antagonists/heretic/magic/apetravulnera.dm @@ -0,0 +1,59 @@ +/datum/spell/pointed/apetra_vulnera + name = "Apetra Vulnera" + desc = "Causes severe bleeding and opens every limb of a target which has more than 15 brute damage. \ + Opens a random limb if no limb is sufficiently damaged." + + + action_background_icon = 'icons/mob/actions/actions_ecult.dmi' + action_background_icon_state = "bg_heretic" + action_icon_state = "apetra_vulnera" + action_icon = 'icons/mob/actions/actions_ecult.dmi' + + is_a_heretic_spell = TRUE + clothes_req = FALSE + base_cooldown = 45 SECONDS + + invocation = "AP'TRA VULN'RA!" + invocation_type = INVOCATION_WHISPER + spell_requirements = SPELL_REQUIRES_NO_ANTIMAGIC + + cast_range = 4 + +/datum/spell/pointed/apetra_vulnera/valid_target(target, user) + return ..() && ishuman(target) + +/datum/spell/pointed/apetra_vulnera/cast(list/targets, mob/user) + . = ..() + var/mob/living/carbon/human/cast_on = targets[1] + if(IS_HERETIC_OR_MONSTER(cast_on)) + return FALSE + + if(!cast_on.blood_volume) + return FALSE + + if(cast_on.can_block_magic(antimagic_flags)) + cast_on.visible_message( + "[cast_on]'s bruises briefly glow, but repels the effect!", + "Your bruises sting a little, but you are protected!" + ) + return FALSE + + var/a_limb_got_damaged = FALSE + for(var/obj/item/organ/external/bodypart in cast_on.bodyparts) + if(bodypart.brute_dam < 15) + continue + a_limb_got_damaged = TRUE + bodypart.open = ORGAN_ORGANIC_VIOLENT_OPEN + + if(!a_limb_got_damaged) + var/obj/item/organ/external/other_bodypart = (pick(cast_on.bodyparts)) + other_bodypart.open = ORGAN_ORGANIC_VIOLENT_OPEN + + cast_on.visible_message( + "[cast_on]'s scratches and bruises are torn open by an unholy force!", + "Your scratches and bruises are torn open by some horrible unholy force!" + ) + + new /obj/effect/temp_visual/cleave(get_turf(cast_on)) + + return TRUE diff --git a/code/modules/antagonists/heretic/magic/ascended_shapeshift.dm b/code/modules/antagonists/heretic/magic/ascended_shapeshift.dm new file mode 100644 index 000000000000..026f82b9e0ae --- /dev/null +++ b/code/modules/antagonists/heretic/magic/ascended_shapeshift.dm @@ -0,0 +1,8 @@ +// Given to ascended knock heretics, is a form of shapeshift that can turn into all 4 common heretic summons, and is not limited to 1 selection. +/datum/spell/shapeshift/eldritch/ascension + name = "Ascended Shapechange" + desc = "A spell that allows you to take on the form of another eldritch creature, gaining their abilities. \ + You can change your choice at any time, and if your form dies, you dont die." + base_cooldown = 20 SECONDS + clothes_req = FALSE +//qwertodo fuck me do this diff --git a/code/modules/antagonists/heretic/magic/ash_ascension.dm b/code/modules/antagonists/heretic/magic/ash_ascension.dm new file mode 100644 index 000000000000..dcf80ed16e73 --- /dev/null +++ b/code/modules/antagonists/heretic/magic/ash_ascension.dm @@ -0,0 +1,176 @@ +/// Creates a constant Ring of Fire around the caster for a set duration of time, which follows them. +/datum/spell/fire_sworn + name = "Oath of Flame" + desc = "For a minute, you will passively create a ring of fire around you." + + + action_background_icon = 'icons/mob/actions/actions_ecult.dmi' + action_background_icon_state = "bg_heretic" + action_icon_state = "fire_ring" + action_icon = 'icons/mob/actions/actions_ecult.dmi' + + is_a_heretic_spell = TRUE + clothes_req = FALSE + base_cooldown = 70 SECONDS + + invocation = "FL'MS" + invocation_type = INVOCATION_WHISPER + spell_requirements = SPELL_REQUIRES_NO_ANTIMAGIC + + /// The radius of the fire ring + var/fire_radius = 1 + /// How long it the ring lasts + var/duration = 1 MINUTES + + +/datum/spell/fire_sworn/create_new_targeting() + return new /datum/spell_targeting/self + +/datum/spell/fire_sworn/cast(list/targets, mob/user) + . = ..() + if(isliving(user)) + var/mob/living/living_user = user + living_user.apply_status_effect(/datum/status_effect/fire_ring, duration, fire_radius) + +/// Simple status effect for adding a ring of fire around a mob. +/datum/status_effect/fire_ring + id = "fire_ring" + tick_interval = 0.2 SECONDS + status_type = STATUS_EFFECT_REFRESH + alert_type = null + /// The radius of the ring around us. + var/ring_radius = 1 + +/datum/status_effect/fire_ring/on_creation(mob/living/new_owner, duration = 1 MINUTES, radius = 1) + src.duration = duration + src.ring_radius = radius + return ..() + +/datum/status_effect/fire_ring/tick() + if(QDELETED(owner) || owner.stat == DEAD) + qdel(src) + return + + if(!isturf(owner.loc)) + return + + for(var/turf/nearby_turf as anything in RANGE_TURFS(1, owner)) + fireflash(nearby_turf, 0, 750) + for(var/mob/living/fried_living in nearby_turf.contents - owner) + fried_living.apply_damage(1.5, BURN) + for(var/obj/effect/hotspot/flame_tile in range(2, owner)) //Extra range for if they are moving about since there is async shit going on + flame_tile.alpha = 125 + +/// Creates one, large, expanding ring of fire around the caster, which does not follow them. +/datum/spell/fire_cascade + name = "Lesser Fire Cascade" + desc = "Heats the air around you." + + + action_background_icon = 'icons/mob/actions/actions_ecult.dmi' + action_background_icon_state = "bg_heretic" + action_icon_state = "fire_ring" + action_icon = 'icons/mob/actions/actions_ecult.dmi' + sound = 'sound/items/welder.ogg' + + is_a_heretic_spell = TRUE + clothes_req = FALSE + base_cooldown = 30 SECONDS + + invocation = "C'SC'DE" + invocation_type = INVOCATION_WHISPER + spell_requirements = SPELL_REQUIRES_NO_ANTIMAGIC + + /// The radius the flames will go around the caster. + var/flame_radius = 4 + +/datum/spell/fire_cascade/create_new_targeting() + return new /datum/spell_targeting/self + +/datum/spell/fire_cascade/cast(list/targets, mob/user) + . = ..() + INVOKE_ASYNC(src, PROC_REF(fire_cascade), get_turf(user), user, flame_radius) + +/// Spreads a huge wave of fire in a radius around us, staggered between levels +/datum/spell/fire_cascade/proc/fire_cascade(atom/centre, mob/user, flame_radius = 1) + for(var/i in 0 to flame_radius) + for(var/turf/nearby_turf as anything in spiral_range_turfs(i + 1, centre)) + fireflash(nearby_turf, 0, 750) + for(var/mob/living/fried_living in nearby_turf.contents - user) + fried_living.apply_damage(5, BURN) + + stoplag(0.3 SECONDS) + for(var/obj/effect/hotspot/flame_tile in range(i + 2, user)) //Extra range for if they are moving about since there is async shit going on + flame_tile.alpha = 125 + +/datum/spell/fire_cascade/big + name = "Greater Fire Cascade" + flame_radius = 6 + +// Currently used only by the funny haunted longsword +/datum/spell/pointed/ash_beams + name = "Nightwatcher's Rite" + desc = "A powerful spell that releases five streams of eldritch fire towards the target." + + + ranged_mousepointer = 'icons/effects/mouse_pointers/throw_target.dmi' + action_background_icon = 'icons/mob/actions/actions_ecult.dmi' + action_background_icon_state = "bg_heretic" + action_icon = 'icons/mob/actions/actions_ecult.dmi' + action_icon_state = "flames" + + is_a_heretic_spell = TRUE + clothes_req = FALSE + base_cooldown = 300 + + invocation = "F'RE" + invocation_type = INVOCATION_WHISPER + spell_requirements = SPELL_REQUIRES_NO_ANTIMAGIC + + /// The length of the flame line spit out. + var/flame_line_length = 15 + +/datum/spell/pointed/ash_beams/cast(list/targets, mob/user) + . = ..() + var/target = targets[1] + var/static/list/offsets = list(-25, -10, 0, 10, 25) + for(var/offset in offsets) + INVOKE_ASYNC(src, PROC_REF(fire_line), user, line_target(offset, flame_line_length, target, user)) + +/datum/spell/pointed/ash_beams/proc/line_target(offset, range, atom/at, atom/user) + var/turf/user_loc = get_turf(user) + if(!at) + return + var/angle = ATAN2(at.x - user_loc.x, at.y - user_loc.y) + offset + var/turf/T = get_turf(user) + for(var/i in 1 to range) + var/turf/check = locate(user_loc.x + cos(angle) * i, user_loc.y + sin(angle) * i, user_loc.z) + if(!check) + break + T = check + return (get_line(user_loc, T) - user_loc) + +/datum/spell/pointed/ash_beams/proc/fire_line(atom/source, list/turfs) + var/list/hit_list = list() + for(var/turf/T in turfs) + if(iswallturf(T)) + break + + for(var/mob/living/L in T.contents) + if(L.can_block_magic()) + L.visible_message("The spell bounces off of [L]!", "The spell bounces off of you!") + continue + if((L in hit_list) || L == source) + continue + hit_list += L + L.adjustFireLoss(20) + to_chat(L, "You're hit by [source]'s eldritch flames!") + + fireflash(T, 0, 750) + // deals damage to mechs + for(var/obj/mecha/M in T.contents) + if(M in hit_list) + continue + hit_list += M + M.take_damage(45, BURN, MELEE, 1) + sleep(0.15 SECONDS) diff --git a/code/modules/antagonists/heretic/magic/ash_jaunt.dm b/code/modules/antagonists/heretic/magic/ash_jaunt.dm new file mode 100644 index 000000000000..9690a6ca0382 --- /dev/null +++ b/code/modules/antagonists/heretic/magic/ash_jaunt.dm @@ -0,0 +1,43 @@ +/datum/spell/ethereal_jaunt/ash + name = "Ashen Passage" + desc = "A short range spell that allows you to pass unimpeded through walls." + + + action_background_icon = 'icons/mob/actions/actions_ecult.dmi' + action_background_icon_state = "bg_heretic" + action_icon_state = "ash_shift" + action_icon = 'icons/mob/actions/actions_ecult.dmi' + sound = null + + is_a_heretic_spell = TRUE + clothes_req = FALSE + base_cooldown = 30 SECONDS + + invocation = "ASH'N P'SSG'" + invocation_type = INVOCATION_WHISPER + spell_requirements = SPELL_REQUIRES_NO_ANTIMAGIC + + sound1 = null + sound2 = null + jaunt_duration = 1.1 SECONDS + jaunt_in_time = 0.35 SECONDS //Did you know it sleeps 4x this number? So you have to make it 1/4th of what it actually is? + jaunt_out_time = 0.6 SECONDS + jaunt_in_type = /obj/effect/temp_visual/dir_setting/ash_shift + jaunt_out_type = /obj/effect/temp_visual/dir_setting/ash_shift/out + + +/datum/spell/ethereal_jaunt/ash/jaunt_steam() + return + +/datum/spell/ethereal_jaunt/ash/long + name = "Ashen Walk" + desc = "A long range spell that allows you pass unimpeded through multiple walls." + jaunt_duration = 5 SECONDS + +/obj/effect/temp_visual/dir_setting/ash_shift + name = "ash_shift" + icon_state = "ash_shift2" + duration = 1.3 SECONDS + +/obj/effect/temp_visual/dir_setting/ash_shift/out + icon_state = "ash_shift" diff --git a/code/modules/antagonists/heretic/magic/blood_cleave.dm b/code/modules/antagonists/heretic/magic/blood_cleave.dm new file mode 100644 index 000000000000..22c448ee0862 --- /dev/null +++ b/code/modules/antagonists/heretic/magic/blood_cleave.dm @@ -0,0 +1,60 @@ +/datum/spell/pointed/cleave + name = "Cleave" + desc = "Causes severe bleeding on a target and several targets around them." + + + action_background_icon = 'icons/mob/actions/actions_ecult.dmi' + action_background_icon_state = "bg_heretic" + action_icon_state = "cleave" + ranged_mousepointer = 'icons/effects/mouse_pointers/throw_target.dmi' + + is_a_heretic_spell = TRUE + clothes_req = FALSE + base_cooldown = 45 SECONDS + + invocation = "CL'VE!" + invocation_type = INVOCATION_WHISPER + spell_requirements = SPELL_REQUIRES_NO_ANTIMAGIC + + cast_range = 4 + + /// The radius of the cleave effect + var/cleave_radius = 1 + + +/datum/spell/pointed/cleave/cast(list/targets, mob/user) + . = ..() + for(var/mob/living/carbon/human/victim in range(cleave_radius, user)) + if(victim == user || IS_HERETIC_OR_MONSTER(victim)) + continue + if(victim.can_block_magic(antimagic_flags)) + victim.visible_message( + "[victim]'s flashes in a firey glow, but repels the blaze!", + "Your body begins to flash a firey glow, but you are protected!!" + ) + continue + + if(!victim.blood_volume) + continue + + victim.visible_message( + "[victim]'s veins are shredded from within as an unholy blaze erupts from [victim.p_their()] blood!", + "Your veins burst from within and unholy flame erupts from your blood!" + ) + + var/obj/item/organ/external/bodypart = pick(victim.bodyparts) + bodypart.cause_internal_bleeding() + victim.apply_damage(20, BURN) + + new /obj/effect/temp_visual/cleave(get_turf(victim)) + + return TRUE + +/datum/spell/pointed/cleave/long + name = "Lesser Cleave" + base_cooldown = 90 SECONDS + +/obj/effect/temp_visual/cleave + icon = 'icons/effects/eldritch.dmi' + icon_state = "cleave" + duration = 6 diff --git a/code/modules/antagonists/heretic/magic/blood_siphon.dm b/code/modules/antagonists/heretic/magic/blood_siphon.dm new file mode 100644 index 000000000000..381c5065923e --- /dev/null +++ b/code/modules/antagonists/heretic/magic/blood_siphon.dm @@ -0,0 +1,79 @@ +/datum/spell/pointed/blood_siphon + name = "Blood Siphon" + desc = "A targeted spell that heals your wounds while damaging the enemy. \ + It has a chance to transfer wounds between you and your enemy." + + + action_background_icon = 'icons/mob/actions/actions_ecult.dmi' + action_background_icon_state = "bg_heretic" + action_icon_state = "blood_siphon" + ranged_mousepointer = 'icons/effects/mouse_pointers/throw_target.dmi' + action_icon = 'icons/mob/actions/actions_ecult.dmi' + + is_a_heretic_spell = TRUE + clothes_req = FALSE + base_cooldown = 15 SECONDS + + invocation = "FL'MS O'ET'RN'ITY." + invocation_type = INVOCATION_WHISPER + spell_requirements = SPELL_REQUIRES_NO_ANTIMAGIC + + cast_range = 6 + + +/datum/spell/pointed/blood_siphon/cast(list/targets, mob/user) + . = ..() + var/mob/living/cast_on = targets[1] + playsound(user, 'sound/misc/demon_attack1.ogg', 75, TRUE) + if(cast_on.can_block_magic()) + cast_on.visible_message( + "The spell bounces off of [cast_on]!", + "The spell bounces off of you!", + ) + return FALSE + + cast_on.visible_message( + "[cast_on] turns pale as a red glow envelops [cast_on.p_them()]!", + "You pale as a red glow enevelops you!", + ) + + var/mob/living/living_owner = user + cast_on.adjustBruteLoss(20) + living_owner.adjustBruteLoss(-20) + + if(!cast_on.blood_volume || !living_owner.blood_volume) + return TRUE + + cast_on.blood_volume -= 20 + if(living_owner.blood_volume < BLOOD_VOLUME_MAXIMUM) // we dont want to explode from casting + living_owner.blood_volume += 20 + + if(!ishuman(cast_on) || !ishuman(living_owner)) + return TRUE + + var/mob/living/carbon/human/carbon_target = cast_on + var/mob/living/carbon/human/carbon_user = living_owner + for(var/obj/item/organ/external/E in carbon_user.bodyparts) + if(E.status & ORGAN_INT_BLEEDING) + if(prob(50)) + var/obj/item/organ/external/target_bodypart = locate(E.type) in carbon_target.bodyparts + if(!target_bodypart) + continue + E.fix_internal_bleeding() + target_bodypart.cause_internal_bleeding() + if(E.status & ORGAN_BROKEN) + if(prob(50)) + var/obj/item/organ/external/target_bodypart = locate(E.type) in carbon_target.bodyparts + if(!target_bodypart) + continue + E.mend_fracture() + target_bodypart.fracture() + if(E.status & ORGAN_BURNT) + if(prob(50)) + var/obj/item/organ/external/target_bodypart = locate(E.type) in carbon_target.bodyparts + if(!target_bodypart) + continue + E.fix_burn_wound() + target_bodypart.cause_burn_wound() + + return TRUE diff --git a/code/modules/antagonists/heretic/magic/burglar_finesse.dm b/code/modules/antagonists/heretic/magic/burglar_finesse.dm new file mode 100644 index 000000000000..bf3cafa1fe22 --- /dev/null +++ b/code/modules/antagonists/heretic/magic/burglar_finesse.dm @@ -0,0 +1,57 @@ +/datum/spell/pointed/burglar_finesse + name = "Burglar's Finesse" + desc = "Steal a random item from the victim's backpack." + + + action_background_icon = 'icons/mob/actions/actions_ecult.dmi' + action_background_icon_state = "bg_heretic" + action_icon_state = "burglarsfinesse" + action_icon = 'icons/mob/actions/actions_ecult.dmi' + + is_a_heretic_spell = TRUE + clothes_req = FALSE + base_cooldown = 40 SECONDS + + invocation = "Y'O'K!" + invocation_type = INVOCATION_WHISPER + spell_requirements = SPELL_REQUIRES_NO_ANTIMAGIC + + cast_range = 6 + + +/datum/spell/pointed/burglar_finesse/valid_target(target, user) + if(!ishuman(target)) + return FALSE + var/mob/living/carbon/human/human_target = target + if(locate(/obj/item/storage/backpack) in human_target.contents) + return TRUE + if(locate(/obj/item/mod/control) in human_target.contents) + return TRUE + return FALSE + +/datum/spell/pointed/burglar_finesse/cast(list/targets, mob/user) + . = ..() + var/mob/living/carbon/cast_on = targets[1] + if(cast_on.can_block_magic(antimagic_flags)) + to_chat(cast_on, "You feel a light tug, but are otherwise fine, you were protected by magical forces!") + to_chat(user, "[cast_on] is protected by magical forces!") + return FALSE + + var/obj/storage_item = locate(/obj/item/storage/backpack) in cast_on.contents + + if(isnull(storage_item)) + if(locate(/obj/item/mod/control) in cast_on.contents) + var/obj/item/mod/control/temp_item = locate(/obj/item/mod/control) in cast_on.contents + if(temp_item.bag) + storage_item = temp_item.bag + + if(isnull(storage_item)) + return FALSE + if(isnull(storage_item.contents)) + return FALSE + var/item = pick(storage_item.contents) + if(isnull(item)) + return FALSE + to_chat(cast_on, "Your [storage_item] feels lighter...") + to_chat(user, "With a blink, you pull [item] out of [cast_on][p_s()] [storage_item].") + user.put_in_active_hand(item) diff --git a/code/modules/antagonists/heretic/magic/caretaker.dm b/code/modules/antagonists/heretic/magic/caretaker.dm new file mode 100644 index 000000000000..5a3a030e2dd4 --- /dev/null +++ b/code/modules/antagonists/heretic/magic/caretaker.dm @@ -0,0 +1,42 @@ +/datum/spell/caretaker + name = "Caretaker’s Last Refuge" + desc = "Shifts you into the Caretaker's Refuge, rendering you translucent and intangible. \ + While in the Refuge your movement is unrestricted, but you cannot use your hands or cast any spells. \ + You cannot enter the Refuge while near other sentient beings, \ + and you can be removed from it upon contact with antimagical artifacts." + + + action_background_icon = 'icons/mob/actions/actions_ecult.dmi' + action_background_icon_state = "bg_heretic" + action_icon_state = "caretaker" + action_icon = 'icons/mob/actions/actions_ecult.dmi' + sound = 'sound/effects/curse/curse2.ogg' + + is_a_heretic_spell = TRUE + clothes_req = FALSE + base_cooldown = 1 MINUTES + + invocation_type = INVOCATION_NONE + spell_requirements = SPELL_REQUIRES_NO_ANTIMAGIC + + +/datum/spell/caretaker/create_new_targeting() + return new /datum/spell_targeting/self + +/datum/spell/caretaker/valid_target(target, user) + for(var/mob/living/alive in orange(5, user)) + if(alive.stat != DEAD && alive.client) + to_chat(user, "There are sentient beings blocking you from shifting!") + return FALSE + return TRUE + +/datum/spell/caretaker/cast(list/targets, mob/user) + . = ..() + + var/mob/living/carbon/carbon_user = user + if(carbon_user.has_status_effect(/datum/status_effect/caretaker_refuge)) + carbon_user.remove_status_effect(/datum/status_effect/caretaker_refuge) + else + carbon_user.apply_status_effect(/datum/status_effect/caretaker_refuge) + cooldown_handler.start_recharge(cooldown_handler.recharge_duration * 0.1) //Cooldown activates primarly when you leave + return TRUE diff --git a/code/modules/antagonists/heretic/magic/cosmic_expansion.dm b/code/modules/antagonists/heretic/magic/cosmic_expansion.dm new file mode 100644 index 000000000000..b8a59079345b --- /dev/null +++ b/code/modules/antagonists/heretic/magic/cosmic_expansion.dm @@ -0,0 +1,49 @@ +/datum/spell/aoe/conjure/cosmic_expansion + name = "Cosmic Expansion" + desc = "This spell generates a 3x3 domain of cosmic fields. \ + Creatures up to 7 tiles away will also receive a star mark." + + + action_background_icon = 'icons/mob/actions/actions_ecult.dmi' + action_background_icon_state = "bg_heretic" + action_icon_state = "cosmic_domain" + action_icon = 'icons/mob/actions/actions_ecult.dmi' + + sound = 'sound/magic/cosmic_expansion.ogg' + is_a_heretic_spell = TRUE + clothes_req = FALSE + base_cooldown = 45 SECONDS + + invocation = "C'SM'S 'XP'ND" + invocation_type = INVOCATION_SHOUT + spell_requirements = SPELL_REQUIRES_NO_ANTIMAGIC + + summon_amt = 9 + summon_type = list(/obj/effect/forcefield/cosmic_field) + summon_ignore_density = TRUE + summon_ignore_prev_spawn_points = TRUE + aoe_range = 1 + /// The range at which people will get marked with a star mark. + var/star_mark_range = 7 + /// Effect for when the spell triggers + var/obj/effect/expansion_effect = /obj/effect/temp_visual/cosmic_domain + /// If the heretic is ascended or not + var/ascended = FALSE + +/datum/spell/aoe/conjure/cosmic_expansion/cast(list/targets, mob/user) + new expansion_effect(get_turf(user)) + for(var/mob/living/nearby_mob in range(star_mark_range, user)) + if(user == nearby_mob || user.buckled == nearby_mob) + continue + nearby_mob.apply_status_effect(/datum/status_effect/star_mark, user) + if(ascended) + for(var/turf/cast_turf as anything in get_turfs(get_turf(user))) + new /obj/effect/forcefield/cosmic_field(cast_turf) + return ..() + +/datum/spell/aoe/conjure/cosmic_expansion/proc/get_turfs(turf/target_turf) + var/list/target_turfs = list() + for(var/direction as anything in GLOB.cardinals) + target_turfs += get_ranged_target_turf(target_turf, direction, 2) + target_turfs += get_ranged_target_turf(target_turf, direction, 3) + return target_turfs diff --git a/code/modules/antagonists/heretic/magic/cosmic_runes.dm b/code/modules/antagonists/heretic/magic/cosmic_runes.dm new file mode 100644 index 000000000000..2118e2b4d78d --- /dev/null +++ b/code/modules/antagonists/heretic/magic/cosmic_runes.dm @@ -0,0 +1,167 @@ +/datum/spell/cosmic_rune + name = "Cosmic Rune" + desc = "Creates a cosmic rune at your position, only two can exist at a time. Invoking one rune transports you to the other. \ + Anyone with a star mark gets transported along with you." + + + action_background_icon = 'icons/mob/actions/actions_ecult.dmi' + action_background_icon_state = "bg_heretic" + action_icon_state = "cosmic_rune" + action_icon = 'icons/mob/actions/actions_ecult.dmi' + + sound = 'sound/magic/forcewall.ogg' + is_a_heretic_spell = TRUE + clothes_req = FALSE + base_cooldown = 15 SECONDS + + invocation = "ST'R R'N'" + invocation_type = INVOCATION_WHISPER + spell_requirements = SPELL_REQUIRES_NO_ANTIMAGIC + + /// Storage for the first rune. + var/first_rune + /// Storage for the second rune. + var/second_rune + /// Rune removal effect. + var/obj/effect/rune_remove_effect = /obj/effect/temp_visual/cosmic_rune_fade + +/datum/spell/cosmic_rune/create_new_targeting() + var/datum/spell_targeting/aoe/turf/targeting = new() + targeting.range = 0 + return targeting + +/datum/spell/cosmic_rune/cast(list/targets, mob/user) + . = ..() + var/obj/effect/cosmic_rune/first_rune_resolved = locateUID(first_rune) + var/obj/effect/cosmic_rune/second_rune_resolved = locateUID(second_rune) + if(first_rune_resolved && second_rune_resolved) + var/obj/effect/cosmic_rune/new_rune = new /obj/effect/cosmic_rune(get_turf(user)) + new rune_remove_effect(get_turf(first_rune_resolved)) + QDEL_NULL(first_rune_resolved) + first_rune = second_rune_resolved.UID() + second_rune = new_rune.UID() + second_rune_resolved.link_rune(new_rune) + new_rune.link_rune(second_rune_resolved) + return + if(!first_rune_resolved) + first_rune = make_new_rune(get_turf(user), second_rune_resolved) + return + if(!second_rune_resolved) + second_rune = make_new_rune(get_turf(user), first_rune_resolved) + +/// Returns a weak reference to a new rune, linked to an existing rune if provided +/datum/spell/cosmic_rune/proc/make_new_rune(turf/target_turf, obj/effect/cosmic_rune/other_rune) + var/obj/effect/cosmic_rune/new_rune = new /obj/effect/cosmic_rune(target_turf) + if(other_rune) + other_rune.link_rune(new_rune) + new_rune.link_rune(other_rune) + return new_rune.UID() + +/// A rune that allows you to teleport to the location of a linked rune. +/obj/effect/cosmic_rune + name = "cosmic rune" + desc = "A strange rune, that can instantly transport people to another location." + anchored = TRUE + icon = 'icons/obj/antags/eldritch.dmi' + icon_state = "cosmic_rune" + resistance_flags = FIRE_PROOF | UNACIDABLE | ACID_PROOF + plane = FLOOR_PLANE + layer = SIGIL_LAYER + /// The other rune this rune is linked with + var/linked_rune + /// Effect for when someone teleports + var/obj/effect/rune_effect = /obj/effect/temp_visual/rune_light + +/obj/effect/cosmic_rune/Initialize(mapload) + . = ..() + var/image/silicon_image = image(icon = 'icons/effects/eldritch.dmi', icon_state = null, loc = src) + silicon_image.override = TRUE + add_alt_appearance("cosmic_rune", silicon_image, GLOB.silicon_mob_list) + +/obj/effect/cosmic_rune/attack_animal(mob/living/simple_animal/M) + return attack_hand(M) + +/obj/effect/cosmic_rune/attack_hand(mob/living/user, list/modifiers) + . = ..() + if(.) + return + if(!linked_rune) + to_chat(user, "There is no linked rune!") + fail_invoke() + return + if(!(user in get_turf(src))) + to_chat(user, "You must be on the rune to teleport!") + fail_invoke() + return + if(user.has_status_effect(/datum/status_effect/star_mark)) + to_chat(user, "The mark blocks you from using the rune!") + fail_invoke() + return + invoke(user) + +/// For invoking the rune +/obj/effect/cosmic_rune/proc/invoke(mob/living/user) + var/obj/effect/cosmic_rune/linked_rune_resolved = locateUID(linked_rune) + new rune_effect(get_turf(src)) + if(!(SEND_SIGNAL(user, COMSIG_MOVABLE_TELEPORTING, get_turf(linked_rune_resolved)) & COMPONENT_BLOCK_TELEPORT)) + user.forceMove(get_turf(linked_rune_resolved)) + for(var/mob/living/person_on_rune in get_turf(src)) + if(person_on_rune.has_status_effect(/datum/status_effect/star_mark)) + if(SEND_SIGNAL(person_on_rune, COMSIG_MOVABLE_TELEPORTING, get_turf(linked_rune_resolved)) & COMPONENT_BLOCK_TELEPORT) + continue + person_on_rune.forceMove(get_turf(linked_rune_resolved)) + playsound(src, 'sound/magic/cosmic_energy.ogg', 100, TRUE) + playsound(user, 'sound/magic/cosmic_energy.ogg', 100, TRUE) + new rune_effect(get_turf(linked_rune_resolved)) + +/// For if someone failed to invoke the rune +/obj/effect/cosmic_rune/proc/fail_invoke() + visible_message("The rune pulses with a small flash of purple light, then returns to normal.") + var/oldcolor = rgb(255, 255, 255) + color = rgb(150, 50, 200) + animate(src, color = oldcolor, time = 5) + addtimer(CALLBACK(src, TYPE_PROC_REF(/atom, update_atom_colour)), 0.5 SECONDS) + +/// For linking a new rune +/obj/effect/cosmic_rune/proc/link_rune(obj/effect/cosmic_rune/new_rune) + linked_rune = new_rune.UID() + +/obj/effect/cosmic_rune/Destroy() + var/obj/effect/cosmic_rune/linked_rune_resolved = locateUID(linked_rune) + if(linked_rune_resolved) + linked_rune_resolved.unlink_rune() + return ..() + +/// Used for unlinking the other rune if this rune gets destroyed +/obj/effect/cosmic_rune/proc/unlink_rune() + linked_rune = null + +/obj/effect/temp_visual/cosmic_rune_fade + name = "cosmic rune" + icon = 'icons/obj/antags/eldritch.dmi' + icon_state = "cosmic_rune_fade" + plane = FLOOR_PLANE + layer = SIGIL_LAYER + anchored = TRUE + duration = 5 + +/obj/effect/temp_visual/cosmic_rune_fade/Initialize(mapload) + . = ..() + var/image/silicon_image = image(icon = 'icons/obj/antags/eldritch.dmi', icon_state = null, loc = src) + silicon_image.override = TRUE + add_alt_appearance("cosmic", silicon_image, GLOB.silicon_mob_list) + +/obj/effect/temp_visual/rune_light + name = "cosmic rune" + icon = 'icons/obj/antags/eldritch.dmi' + icon_state = "cosmic_rune_light" + plane = FLOOR_PLANE + layer = SIGIL_LAYER + anchored = TRUE + duration = 5 + +/obj/effect/temp_visual/rune_light/Initialize(mapload) + . = ..() + var/image/silicon_image = image(icon = 'icons/obj/antags/eldritch.dmi', icon_state = null, loc = src) + silicon_image.override = TRUE + add_alt_appearance("cosmic", silicon_image, GLOB.silicon_mob_list) diff --git a/code/modules/antagonists/heretic/magic/eldritch_blind.dm b/code/modules/antagonists/heretic/magic/eldritch_blind.dm new file mode 100644 index 000000000000..a92718d283a7 --- /dev/null +++ b/code/modules/antagonists/heretic/magic/eldritch_blind.dm @@ -0,0 +1,11 @@ +// Given to heretic monsters. +/datum/spell/blind/eldritch + name = "Eldritch Blind" + + + + is_a_heretic_spell = TRUE + clothes_req = FALSE + invocation = "E'E'S" + spell_requirements = SPELL_REQUIRES_NO_ANTIMAGIC + diff --git a/code/modules/antagonists/heretic/magic/eldritch_emplosion.dm b/code/modules/antagonists/heretic/magic/eldritch_emplosion.dm new file mode 100644 index 000000000000..e3e1ae64fb22 --- /dev/null +++ b/code/modules/antagonists/heretic/magic/eldritch_emplosion.dm @@ -0,0 +1,17 @@ +// Given to heretic monsters. +/datum/spell/emplosion/heretic + name = "Energetic Pulse" + desc = "A spell that causes a large EMP around you, disabling electronics." + + + + is_a_heretic_spell = TRUE + clothes_req = FALSE + base_cooldown = 30 SECONDS + + invocation = "E'P" + invocation_type = INVOCATION_WHISPER + spell_requirements = SPELL_REQUIRES_NO_ANTIMAGIC + + emp_heavy = 6 + emp_light = 10 diff --git a/code/modules/antagonists/heretic/magic/eldritch_shapeshift.dm b/code/modules/antagonists/heretic/magic/eldritch_shapeshift.dm new file mode 100644 index 000000000000..55bac0ad29ee --- /dev/null +++ b/code/modules/antagonists/heretic/magic/eldritch_shapeshift.dm @@ -0,0 +1,22 @@ +// Given to heretic monsters. +/datum/spell/shapeshift/eldritch + name = "Shapechange" + desc = "A spell that allows you to take on the form of another creature, gaining their abilities. \ + After making your choice, you will be unable to change to another." + + + + is_a_heretic_spell = TRUE + clothes_req = FALSE + invocation = "SH'PE" + invocation_type = INVOCATION_WHISPER + spell_requirements = SPELL_REQUIRES_NO_ANTIMAGIC + + possible_shapes = list( + /mob/living/simple_animal/hostile/carp, + /mob/living/simple_animal/mouse, + /mob/living/simple_animal/pet/cat, + /mob/living/simple_animal/pet/dog/corgi, + /mob/living/simple_animal/pet/dog/fox, + /mob/living/simple_animal/bot/secbot, + ) diff --git a/code/modules/antagonists/heretic/magic/eldritch_telepathy.dm b/code/modules/antagonists/heretic/magic/eldritch_telepathy.dm new file mode 100644 index 000000000000..59df3056e272 --- /dev/null +++ b/code/modules/antagonists/heretic/magic/eldritch_telepathy.dm @@ -0,0 +1,8 @@ +// Given to heretic monsters. +/datum/spell/remotetalk/eldritch + name = "Eldritch Telepathy" + is_a_heretic_spell = TRUE + + clothes_req = FALSE + invocation_type = INVOCATION_NONE + antimagic_flags = MAGIC_RESISTANCE|MAGIC_RESISTANCE_MIND diff --git a/code/modules/antagonists/heretic/magic/fire_blast.dm b/code/modules/antagonists/heretic/magic/fire_blast.dm new file mode 100644 index 000000000000..df525323e35d --- /dev/null +++ b/code/modules/antagonists/heretic/magic/fire_blast.dm @@ -0,0 +1,159 @@ +/datum/spell/charge_up/bounce/fire_blast + name = "Volcano Blast" + desc = "Charge up a blast of fire that chains between nearby targets, setting them ablaze. \ + Targets already on fire will take priority. If the target fails to catch ablaze, or \ + extinguishes themselves before it bounces, the chain will stop." + + + action_background_icon = 'icons/mob/actions/actions_ecult.dmi' + action_background_icon_state = "bg_heretic" + action_icon_state = "flames" + action_icon = 'icons/mob/actions/actions_ecult.dmi' + sound = 'sound/magic/fireball.ogg' + + is_a_heretic_spell = TRUE + clothes_req = FALSE + base_cooldown = 45 SECONDS + + invocation = "V'LC'N!" + invocation_type = INVOCATION_SHOUT + spell_requirements = SPELL_REQUIRES_NO_ANTIMAGIC + max_charge_time = 5 SECONDS + charge_sound = new /sound('sound/magic/fireball.ogg', channel = 7) + var/max_beam_bounces = 4 + + /// How long the beam visual lasts, also used to determine time between jumps + bounce_time = 2 SECONDS + +/datum/spell/charge_up/bounce/fire_blast/cast(list/targets, mob/user) + if(isliving(user)) + var/mob/living/living_user = user + living_user.apply_status_effect(/datum/status_effect/fire_blasted, bounce_time, -2) + return ..() + +/datum/spell/charge_up/bounce/fire_blast/bounce(mob/origin, mob/living/target, energy, bounces, mob/user) + + // Send a beam from the origin to the hit mob + origin.Beam(target, icon_state = "solar_beam", time = bounce_time, beam_type = /obj/effect/ebeam/fire) + + // If they block the magic, the chain wont necessarily stop, + // but likely will (due to them not catching on fire) + if(target.can_block_magic(antimagic_flags)) + target.visible_message( + "[target] absorbs the spell, remaining unharmed!", + "You absorb the spell, remaining unharmed!", + ) + // Apply status effect but with no overlay + target.apply_status_effect(/datum/status_effect/fire_blasted) + + // Otherwise, if unblocked apply the damage and set them up + else + target.apply_damage(20, BURN) + target.adjust_fire_stacks(3) + target.IgniteMob() + // Apply the fire blast status effect to show they got blasted + target.apply_status_effect(/datum/status_effect/fire_blasted, bounce_time * 0.5) + + // We can keep bouncing, try to continue the chain + if(bounces >= 1) + playsound(target, sound, 50, vary = TRUE, extrarange = -1) + // Chain continues shortly after. If they extinguish themselves in this time, the chain will stop anyways. + addtimer(CALLBACK(src, PROC_REF(continue_beam), target, bounces, user), bounce_time * 0.5) + + else + playsound(target, sound, 50, vary = TRUE, frequency = 12000) + // We hit the maximum chain length, apply a bonus for managing it + new /obj/effect/temp_visual/fire_blast_bonus(target.loc) + for(var/mob/living/nearby_living in range(1, target)) + if(IS_HERETIC_OR_MONSTER(nearby_living) || nearby_living == user) + continue + nearby_living.KnockDown(0.8 SECONDS) + nearby_living.apply_damage(15, BURN) + nearby_living.adjust_fire_stacks(2) + nearby_living.IgniteMob() + +/// Timer callback to continue the chain, calling send_fire_bream recursively. +/datum/spell/charge_up/bounce/fire_blast/proc/continue_beam(mob/living/carbon/beamed, bounces, mob/user) + // We will only continue the chain if we exist, are still on fire, and still have the status effect + if(QDELETED(beamed) || !beamed.on_fire || !beamed.has_status_effect(/datum/status_effect/fire_blasted)) + return + // We fulfilled the conditions, get the next target + var/mob/living/carbon/to_beam_next = get_target(beamed) + if(isnull(to_beam_next)) // No target = no chain + return + + // Chain again! Recursively + bounce(beamed, to_beam_next, 1, bounces - 1, user) + +/datum/spell/charge_up/bounce/fire_blast/get_bounce_amount() + return max_beam_bounces + +/// Pick a carbon mob in a radius around us that we can reach. +/// Mobs on fire will have priority and be targeted over others. +/// Returns null or a carbon mob. +/datum/spell/charge_up/bounce/fire_blast/get_target(mob/origin, mob/user) + var/list/possibles = list() + var/list/priority_possibles = list() + for(var/mob/living/carbon/to_check in view(5, origin)) + if(to_check == origin || to_check == user) + continue + if(to_check.has_status_effect(/datum/status_effect/fire_blasted)) // Already blasted + continue + if(IS_HERETIC_OR_MONSTER(to_check)) + continue + if(!length(get_path_to(origin, to_check, max_distance = 5, simulated_only = FALSE))) + continue + + possibles += to_check + if(to_check.on_fire && to_check.stat != DEAD) + priority_possibles += to_check + + if(!length(possibles)) + return null + + return length(priority_possibles) ? pick(priority_possibles) : pick(possibles) + +/** + * Status effect applied when someone's hit by the fire blast. + * + * Applies an overlay, then causes a damage over time (or heal over time) + */ +/datum/status_effect/fire_blasted + id = "fire_blasted" + alert_type = null + duration = 5 SECONDS + tick_interval = 0.5 SECONDS + /// How much fire / stam to do per tick (stamina damage is doubled this) + var/tick_damage = 1 + /// How long does the animation of the appearance last? If 0 or negative, we make no overlay + var/animate_duration = 0.75 SECONDS + ///This overlay is applied to the owner for the duration of the effect. + var/mutable_appearance/mob_overlay + +/datum/status_effect/fire_blasted/on_creation(mob/living/new_owner, animate_duration = -1, tick_damage = 1) + src.animate_duration = animate_duration + src.tick_damage = tick_damage + return ..() + +/datum/status_effect/fire_blasted/on_apply() + if(owner.on_fire && animate_duration > 0 SECONDS) + mob_overlay = mutable_appearance('icons/effects/effects.dmi', "blessed", BELOW_MOB_LAYER) + mob_overlay.alpha = 50 + owner.add_overlay(mob_overlay) + + return TRUE + +/datum/status_effect/fire_blasted/on_remove() + owner.cut_overlay(mob_overlay) + + +/datum/status_effect/fire_blasted/tick() + owner.adjustFireLoss(tick_damage) + owner.adjustStaminaLoss(2 * tick_damage) + +// Visual effect played when we hit the max bounces +/obj/effect/temp_visual/fire_blast_bonus + name = "fire blast" + icon = 'icons/effects/effects.dmi' + icon_state = "explosion" + duration = 1 SECONDS diff --git a/code/modules/antagonists/heretic/magic/flesh_ascension.dm b/code/modules/antagonists/heretic/magic/flesh_ascension.dm new file mode 100644 index 000000000000..6569506de24b --- /dev/null +++ b/code/modules/antagonists/heretic/magic/flesh_ascension.dm @@ -0,0 +1,19 @@ +/datum/spell/shapeshift/shed_human_form + name = "Shed form" + desc = "Shed your fragile form, become one with the arms, become one with the emperor. \ + Causes heavy amounts of brain damage and sanity loss to nearby mortals." + + + action_background_icon = 'icons/mob/actions/actions_ecult.dmi' + action_background_icon_state = "bg_heretic" + action_icon_state = "worm_ascend" + action_icon = 'icons/mob/actions/actions_ecult.dmi' + + is_a_heretic_spell = TRUE + clothes_req = FALSE + + invocation = "REALITY UNCOIL!" + invocation_type = INVOCATION_SHOUT + spell_requirements = SPELL_REQUIRES_NO_ANTIMAGIC + +//qwertodo: and this diff --git a/code/modules/antagonists/heretic/magic/flesh_surgery.dm b/code/modules/antagonists/heretic/magic/flesh_surgery.dm new file mode 100644 index 000000000000..165bdb48de99 --- /dev/null +++ b/code/modules/antagonists/heretic/magic/flesh_surgery.dm @@ -0,0 +1,33 @@ +/datum/spell/touch/flesh_surgery + name = "Knit Flesh" + desc = "A touch spell that allows you to either harvest or restore flesh of target. \ + Left-clicking will extract the organs of a victim without needing to complete surgery or disembowel. \ + Right-clicking, if done on summons or minions, will restore health. Can also be used to heal damaged organs." + + + action_background_icon = 'icons/mob/actions/actions_ecult.dmi' + action_background_icon_state = "bg_heretic" + action_icon_state = "mad_touch" + action_icon = 'icons/mob/actions/actions_ecult.dmi' + sound = null + + is_a_heretic_spell = TRUE + clothes_req = FALSE + base_cooldown = 20 SECONDS + invocation = "CL'M M'N!" // "CLAIM MINE", but also almost "KALI MA" + invocation_type = INVOCATION_SHOUT + spell_requirements = SPELL_REQUIRES_NO_ANTIMAGIC + + hand_path = /obj/item/melee/touch_attack/flesh_surgery + + /// If used on an organ, how much percent of the organ's HP do we restore + var/organ_percent_healing = 0.5 + /// If used on a heretic mob, how much brute do we heal + var/monster_brute_healing = 10 + /// If used on a heretic mob, how much burn do we heal + var/monster_burn_healing = 5 + +/obj/item/melee/touch_attack/flesh_surgery + name = "\improper knit flesh" + desc = "Let's go practice medicine." +//qwertodo: this had 99 errors and I am very close. We can do this later (before tm) diff --git a/code/modules/antagonists/heretic/magic/furious_steel.dm b/code/modules/antagonists/heretic/magic/furious_steel.dm new file mode 100644 index 000000000000..b94cfde556f1 --- /dev/null +++ b/code/modules/antagonists/heretic/magic/furious_steel.dm @@ -0,0 +1,168 @@ +/datum/spell/fireball/furious_steel + name = "Furious Steel" + desc = "Summon three silver blades which orbit you. \ + While orbiting you, these blades will protect you from from attacks, but will be consumed on use. \ + Additionally, you can click to fire the blades at a target, dealing damage and causing bleeding." + + + action_background_icon = 'icons/mob/actions/actions_ecult.dmi' + action_background_icon_state = "bg_heretic" + action_icon_state = "furious_steel" + what_icon_state = "furious_steel" + action_icon = 'icons/mob/actions/actions_ecult.dmi' + sound = 'sound/weapons/guillotine.ogg' + + is_a_heretic_spell = TRUE + base_cooldown = 60 SECONDS + invocation = "F'LSH'NG S'LV'R!" + invocation_type = INVOCATION_SHOUT + clothes_req = FALSE + spell_requirements = SPELL_REQUIRES_NO_ANTIMAGIC + + selection_activated_message = "You summon forth three blades of furious silver." + selection_deactivated_message = "You conceal the blades of furious silver." + fireball_type = /obj/item/projectile/magic/floating_blade + projectile_amount = 3 + + ///Effect of the projectile that surrounds us while the spell is active + var/projectile_effect = /obj/effect/floating_blade + /// A ref to the status effect surrounding our heretic on activation. + var/datum/status_effect/protective_blades/blade_effect + +/datum/spell/fireball/furious_steel/InterceptClickOn(mob/user, params, atom/A) + // Let the caster prioritize using items like guns over blade casts + if(user.get_active_hand()) + return FALSE + // Let the caster prioritize melee attacks like punches and shoves over blade casts + if(get_dist(user, A) <= 1) + return FALSE + + return ..() + +/datum/spell/fireball/furious_steel/add_ranged_ability(mob/user, msg) + . = ..() + if(!.) + return + + if(!isliving(user)) + return + // Delete existing + if(blade_effect) + stack_trace("[type] had an existing blade effect in on_activation. This might be an exploit, and should be investigated.") + UnregisterSignal(blade_effect, COMSIG_PARENT_QDELETING) + QDEL_NULL(blade_effect) + + var/mob/living/living_user = user + blade_effect = living_user.apply_status_effect(/datum/status_effect/protective_blades, null, projectile_amount, 25, 0.66 SECONDS, projectile_effect) + RegisterSignal(blade_effect, COMSIG_PARENT_QDELETING, PROC_REF(on_status_effect_deleted)) + +/datum/spell/fireball/furious_steel/remove_ranged_ability(mob/user, msg) + . = ..() + if(isnull(blade_effect)) + cooldown_handler.start_recharge() + else if(length(blade_effect.blades) != projectile_amount) + cooldown_handler.start_recharge() //No free magic + current_amount = 0 + QDEL_NULL(blade_effect) + +/datum/spell/fireball/furious_steel/cast(list/targets, mob/living/user) + if(isnull(blade_effect) || !length(blade_effect.blades)) + current_amount = 0 + cooldown_handler.start_recharge() + return FALSE + . = ..() + if(!isnull(blade_effect) && length(blade_effect.blades)) + qdel(blade_effect.blades[1]) + + +/datum/spell/fireball/furious_steel/proc/on_status_effect_deleted(datum/status_effect/protective_blades/source) + SIGNAL_HANDLER + + blade_effect = null + remove_ranged_ability(action.owner) //there has to be a better way to get this + + +/obj/item/projectile/magic/floating_blade + name = "blade" + icon = 'icons/effects/eldritch.dmi' + icon_state = "dio_knife" + speed = 2 + damage = 25 + damage_type = BRUTE + pass_flags = PASSTABLE + nodamage = FALSE + /// Color applied as an outline filter on init + var/outline_color = "#f8f8ff" + +/obj/item/projectile/magic/floating_blade/Initialize(mapload) + . = ..() + add_filter("dio_knife", 2, list("type" = "outline", "color" = outline_color, "size" = 1)) + +/obj/item/projectile/magic/floating_blade/prehit(atom/target) + if(isliving(target) && isliving(firer)) + var/mob/living/caster = firer + var/mob/living/victim = target + if(caster == victim) + damage = 0 + nodamage = TRUE + return FALSE + + if(caster.mind) + var/datum/antagonist/heretic_monster/monster = victim.mind?.has_antag_datum(/datum/antagonist/heretic_monster) + if(monster?.master == caster.mind) + visible_message("[src] fizzles on contact with [victim]!") + damage = 0 + nodamage = TRUE + return FALSE + + return ..() + + +/obj/item/projectile/magic/floating_blade/on_hit(atom/target, blocked, hit_zone) + if(isliving(target) && isliving(firer)) + var/mob/living/caster = firer + var/mob/living/victim = target + if(caster == victim) + return FALSE + + if(caster.mind) + var/datum/antagonist/heretic_monster/monster = victim.mind?.has_antag_datum(/datum/antagonist/heretic_monster) + if(monster?.master == caster.mind) + visible_message("[src] fizzles on contact with [victim]!") + return FALSE + + return ..() + +/obj/item/projectile/magic/floating_blade/haunted + name = "ritual blade" + icon = 'icons/obj/weapons/khopesh.dmi' + icon_state = "render" + damage = 35 + outline_color = "#D7CBCA" + +/datum/spell/fireball/furious_steel/solo + name = "Lesser Furious Steel" + base_cooldown = 20 SECONDS + projectile_amount = 1 + selection_activated_message = "You summon forth a blade of furious silver." + selection_deactivated_message = "You conceal the blade of furious silver." + +/datum/spell/fireball/furious_steel/haunted + name = "Cursed Steel" + desc = "Summon two cursed blades which orbit you. \ + While orbiting you, these blades will protect you from attacks, but will be consumed on use. \ + Additionally, you can click to fire the blades at a target, dealing damage and causing bleeding." + action_icon_state = "cursed_steel" + what_icon_state = "cursed_steel" + + base_cooldown = 40 SECONDS + invocation = "IA!" + invocation_type = INVOCATION_SHOUT + clothes_req = FALSE + spell_requirements = SPELL_REQUIRES_NO_ANTIMAGIC + + selection_activated_message = "You summon forth two cursed blades." + selection_deactivated_message = "You conceal the cursed blades." + projectile_amount = 2 + fireball_type = /obj/item/projectile/magic/floating_blade/haunted + projectile_effect = /obj/effect/floating_blade/haunted diff --git a/code/modules/antagonists/heretic/magic/mansus_grasp.dm b/code/modules/antagonists/heretic/magic/mansus_grasp.dm new file mode 100644 index 000000000000..482d9ddff2ab --- /dev/null +++ b/code/modules/antagonists/heretic/magic/mansus_grasp.dm @@ -0,0 +1,111 @@ +/datum/spell/touch/mansus_grasp + name = "Mansus Grasp" + desc = "A touch spell that lets you channel the power of the Old Gods through your grip." + + action_background_icon = 'icons/mob/actions/actions_ecult.dmi' + action_background_icon_state = "bg_heretic" + action_icon_state = "mansus_grasp" + sound = 'sound/items/welder.ogg' + action_icon = 'icons/mob/actions/actions_ecult.dmi' + + base_cooldown = 10 SECONDS + clothes_req = FALSE + + invocation = "R'CH T'H TR'TH!" + invocation_type = INVOCATION_SHOUT + // Mimes can cast it. Chaplains can cast it. Anyone can cast it, so long as they have a hand. + spell_requirements = SPELL_REQUIRES_NO_ANTIMAGIC + + hand_path = /obj/item/melee/touch_attack/mansus_fist + +/obj/item/melee/touch_attack/mansus_fist + name = "Mansus Grasp" + desc = "A sinister looking aura that distorts the flow of reality around it. \ + Causes knockdown, minor bruises, and major stamina damage. \ + It gains additional beneficial effects as you expand your knowledge of the Mansus." + icon_state = "mansus" + item_state = "mansus" + catchphrase = null + +/obj/item/melee/touch_attack/mansus_fist/Initialize(mapload) + . = ..() + AddComponent(/datum/component/effect_remover, \ + success_feedback = "You remove %THEEFFECT.", \ + on_clear_callback = CALLBACK(src, PROC_REF(after_clear_rune)), \ + effects_we_clear = list(/obj/effect/heretic_rune), \ + time_to_remove = 0.4 SECONDS) + addtimer(CALLBACK(src, PROC_REF(setup_signal)), 0.1 SECONDS) + +/obj/item/melee/touch_attack/mansus_fist/proc/setup_signal() + RegisterSignal(loc, COMSIG_MOB_ALTCLICKON, PROC_REF(on_special_click)) + +/obj/item/melee/touch_attack/mansus_fist/Destroy() + UnregisterSignal(loc, COMSIG_MOB_ALTCLICKON) + return ..() + + +/* + * Callback for effect_remover component. + */ +/obj/item/melee/touch_attack/mansus_fist/proc/after_clear_rune(obj/effect/target, mob/living/user) + if(istype(target, /obj/effect/heretic_rune)) + var/obj/effect/heretic_rune/our_target = target + new /obj/effect/temp_visual/drawing_heretic_rune/fail(target.loc, our_target.greyscale_colours) + qdel(src) + +/obj/item/melee/touch_attack/mansus_fist/after_attack(atom/target, mob/user, proximity_flag, click_parameters) + . = ..() + if(user == target || blocked_by_antimagic) + return + if(!isliving(target)) + return + else + if(SEND_SIGNAL(user, COMSIG_HERETIC_MANSUS_GRASP_ATTACK, target) & COMPONENT_BLOCK_HAND_USE) + handle_delete(user) + return + + var/mob/living/living_hit = target + living_hit.apply_damage(10, BRUTE) + if(!iscarbon(target)) + handle_delete(user) + return + + var/mob/living/carbon/carbon_hit = target + + // Cultists are momentarily disoriented by the stunning aura. Enough for both parties to go 'oh shit' but only a mild combat ability. + // Cultists have an identical effect on their stun hand. The heretic's faster spell charge time is made up for by their lack of teammates. + if(IS_CULTIST(carbon_hit)) + carbon_hit.Stun(0.5 SECONDS) + carbon_hit.AdjustConfused(3 SECONDS) + carbon_hit.AdjustDizzy(3 SECONDS) + + var/old_color = carbon_hit.color + carbon_hit.color = COLOR_CULT_RED + animate(carbon_hit, color = old_color, time = 4 SECONDS, easing = EASE_IN) + playsound(carbon_hit, 'sound/effects/curse.ogg', 50, TRUE) + + to_chat(user, "An unholy force intervenes as you grasp [carbon_hit], absorbing most of the effects!") + to_chat(carbon_hit, "As [user] grasps you with eldritch forces, your blood magic absorbs most of the effects!") + handle_delete(user) + return + + //This doesn't mute for very long (by default), but does block AI tracking! + ADD_TRAIT(carbon_hit, TRAIT_AI_UNTRACKABLE, "mansus_grasp") + addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(callback_remove_trait), carbon_hit, TRAIT_AI_UNTRACKABLE, "mansus_grasp"), 15 SECONDS) + carbon_hit.HereticSlur(15 SECONDS) + carbon_hit.Silence(3 SECONDS) + carbon_hit.KnockDown(5 SECONDS) + carbon_hit.apply_damage(80, STAMINA) + handle_delete(user) + return + +/// Called when someone alt clicks with a grasp on something. +/obj/item/melee/touch_attack/mansus_fist/proc/on_special_click(mob/source, atom/target) //QWERTODO: BLOCK THIS IF THEY HAVE ANTITELEPORT AND NO FOCUS SO YOU CAN PERMA RUST / LOCK + SIGNAL_HANDLER + if(!source.Adjacent(target)) + return + if(SEND_SIGNAL(source, COMSIG_HERETIC_MANSUS_GRASP_ATTACK_SECONDARY, target) & COMPONENT_USE_HAND) + INVOKE_ASYNC(src, PROC_REF(handle_delete), source) + return COMSIG_MOB_CANCEL_CLICKON + + diff --git a/code/modules/antagonists/heretic/magic/mind_gate.dm b/code/modules/antagonists/heretic/magic/mind_gate.dm new file mode 100644 index 000000000000..7210cecccae2 --- /dev/null +++ b/code/modules/antagonists/heretic/magic/mind_gate.dm @@ -0,0 +1,44 @@ +/datum/spell/mind_gate + name = "Mind Gate" + desc = "Deals you 20 brain damage and the target suffers a hallucination, \ + is left confused for 10 seconds, and suffers oxygen loss and brain damage." + + + action_background_icon = 'icons/mob/actions/actions_ecult.dmi' + action_background_icon_state = "bg_heretic" + action_icon_state = "mind_gate" + action_icon = 'icons/mob/actions/actions_ecult.dmi' + + sound = 'sound/effects/curse.ogg' + is_a_heretic_spell = TRUE + clothes_req = FALSE + base_cooldown = 20 SECONDS + + invocation = "Op' 'oY 'Mi'd" + invocation_type = INVOCATION_WHISPER + spell_requirements = SPELL_REQUIRES_NO_ANTIMAGIC + +/datum/spell/mind_gate/create_new_targeting() + var/datum/spell_targeting/click/C = new() + C.selection_type = SPELL_SELECTION_RANGE + C.allowed_type = /mob/living/carbon/human + return C + +/datum/spell/mind_gate/cast(list/targets, mob/user) + if(!length(targets)) + to_chat(user, "No target found in range.") + return + + var/mob/living/target = targets[1] + if(target.can_block_magic(antimagic_flags)) + to_chat(target, "Your mind feels closed.") + to_chat(user, "Their mind doesn't swing open, but neither does yours.") + return FALSE + + target.AdjustConfused(10 SECONDS) + target.adjustOxyLoss(30) + new /obj/effect/hallucination/delusion(get_turf(target), target, 'icons/effects/eldritch.dmi', "heretic") + target.adjustBrainLoss(25) + + var/mob/living/living_owner = user + living_owner.adjustBrainLoss(16.5) diff --git a/code/modules/antagonists/heretic/magic/mirror_walk.dm b/code/modules/antagonists/heretic/magic/mirror_walk.dm new file mode 100644 index 000000000000..4201a5a95ca7 --- /dev/null +++ b/code/modules/antagonists/heretic/magic/mirror_walk.dm @@ -0,0 +1,28 @@ +/datum/spell/jaunt/mirror_walk + name = "Mirror Walk" + desc = "Allows you to traverse invisibly and freely across the station within the realm of the mirror. \ + You can only enter and exit the realm of mirrors when nearby reflective surfaces and items, \ + such as windows, mirrors, and reflective walls or equipment." + + + //button_overlay_icon = 'icons/mob/actions/actions_minor_antag.dmi' + action_icon_state = "ninja_cloak" + + base_cooldown = 6 SECONDS + //jaunt_type = /obj/effect/dummy/phased_mob/mirror_walk + spell_requirements = SPELL_REQUIRES_NO_ANTIMAGIC + clothes_req = FALSE + + /// The time it takes to enter the mirror / phase out / enter jaunt. + var/phase_out_time = 1.5 SECONDS + /// The time it takes to exit a mirror / phase in / exit jaunt. + var/phase_in_time = 2 SECONDS + /// Static typecache of types that are counted as reflective. + var/static/list/special_reflective_surfaces = typecacheof(list( + /obj/structure/window, + /obj/structure/mirror, + )) + +//qwertodo: this needs to be a subtype of bloodcrawl +/obj/effect/dummy/phased_mob/mirror_walk + name = "reflection" diff --git a/code/modules/antagonists/heretic/magic/moon_parade.dm b/code/modules/antagonists/heretic/magic/moon_parade.dm new file mode 100644 index 000000000000..4b4902f54729 --- /dev/null +++ b/code/modules/antagonists/heretic/magic/moon_parade.dm @@ -0,0 +1,111 @@ +/datum/spell/fireball/moon_parade + name = "Lunar parade" + desc = "This unleashes the parade, making everyone in its way join it and suffer hallucinations." + + + action_background_icon = 'icons/mob/actions/actions_ecult.dmi' + action_background_icon_state = "bg_heretic" + action_icon_state = "moon_parade" + what_icon_state = "moon_parade" + action_icon = 'icons/mob/actions/actions_ecult.dmi' + ranged_mousepointer = 'icons/effects/mouse_pointers/moon_target.dmi' + + sound = 'sound/magic/cosmic_energy.ogg' + is_a_heretic_spell = TRUE + clothes_req = FALSE + base_cooldown = 30 SECONDS + + invocation = "L'N'R P'RAD" + invocation_type = INVOCATION_SHOUT + spell_requirements = SPELL_REQUIRES_NO_ANTIMAGIC + + selection_activated_message = "You prepare to make them join the parade!" + selection_deactivated_message = "You stop the music and halt the parade... for now." + fireball_type = /obj/item/projectile/moon_parade + + +/obj/item/projectile/moon_parade + name = "Lunar parade" + icon_state = "lunar_parade" + damage = 0 + damage_type = BURN + speed = 5 + range = 75 + ricochets_max = 40 + ricochet_chance = 500 + ricochet_incidence_leeway = 0 + always_nonmob_ricochet = TRUE + forcedodge = -1 //Only mobs, not walls or structures + force_no_hit_message_or_sound = TRUE + ///looping sound datum for our projectile. + var/datum/looping_sound/moon_parade/soundloop + // A list of the people we hit + var/list/mobs_hit = list() + +/obj/item/projectile/moon_parade/Initialize(mapload) + . = ..() + soundloop = new(list(src), TRUE) + +/obj/item/projectile/moon_parade/prehit(atom/target) + if(!isliving(firer) || !isliving(target)) + return ..() + var/mob/living/caster = firer + var/mob/living/victim = target + + if(caster == victim) + return + + if(!caster.mind) + return + + var/datum/antagonist/heretic_monster/monster = victim.mind?.has_antag_datum(/datum/antagonist/heretic_monster) + if(monster?.master == caster.mind) + return + + // Anti-magic destroys the projectile for consistency and counterplay + if(victim.can_block_magic(MAGIC_RESISTANCE|MAGIC_RESISTANCE_MIND)) + visible_message("The parade hits [victim] and a sudden wave of clarity comes over you!") + qdel(src) + return + + return ..() + +/obj/item/projectile/moon_parade/on_hit(atom/target, blocked = 0, pierce_hit) + . = ..() + if(!isliving(target)) + qdel(src) + return + + var/mob/living/victim = target + var/mob/living/caster = firer + if(caster == victim) + return + + if(!caster.mind) + return + + var/datum/antagonist/heretic_monster/monster = victim.mind?.has_antag_datum(/datum/antagonist/heretic_monster) + if(monster?.master == caster.mind) + return + if(!(victim in mobs_hit)) + RegisterSignal(victim, COMSIG_PARENT_QDELETING, PROC_REF(clear_mob)) + victim.AddComponent(/datum/component/leash, src, distance = 1) + to_chat(victim, "You feel unable to move away from the parade!") + mobs_hit += victim + new /obj/effect/hallucination/delusion(get_turf(victim), victim, 'icons/effects/eldritch.dmi', "heretic") + victim.adjustBrainLoss(15) + log_override = TRUE + +/obj/item/projectile/moon_parade/Destroy() + for(var/mob/living/leftover_mob as anything in mobs_hit) + clear_mob(leftover_mob) + mobs_hit.Cut() // You never know + soundloop.stop() + return ..() + + +/obj/item/projectile/moon_parade/proc/clear_mob(datum/source) + SIGNAL_HANDLER + UnregisterSignal(source, COMSIG_PARENT_QDELETING) + mobs_hit -= source + diff --git a/code/modules/antagonists/heretic/magic/moon_ringleader.dm b/code/modules/antagonists/heretic/magic/moon_ringleader.dm new file mode 100644 index 000000000000..1aee1c79ef98 --- /dev/null +++ b/code/modules/antagonists/heretic/magic/moon_ringleader.dm @@ -0,0 +1,61 @@ +/datum/spell/aoe/moon_ringleader + name = "Ringleaders Rise" + desc = "Big AoE spell that deals brain damage and causes hallucinations to everyone in the AoE. \ + The worse their sanity, the stronger this spell becomes. \ + If their sanity is low enough, they even snap and go insane, and the spell then further halves their sanity." + + + action_background_icon = 'icons/mob/actions/actions_ecult.dmi' + action_background_icon_state = "bg_heretic" + action_icon_state = "moon_ringleader" + action_icon = 'icons/mob/actions/actions_ecult.dmi' + sound = 'sound/effects/moon_parade.ogg' + + is_a_heretic_spell = TRUE + clothes_req = FALSE + base_cooldown = 1 MINUTES + antimagic_flags = MAGIC_RESISTANCE|MAGIC_RESISTANCE_MIND + invocation = "R''S 'E" + invocation_type = INVOCATION_SHOUT + spell_requirements = SPELL_REQUIRES_NO_ANTIMAGIC + + aoe_range = 5 + /// Effect for when the spell triggers + var/obj/effect/moon_effect = /obj/effect/temp_visual/moon_ringleader + +/datum/spell/aoe/moon_ringleader/create_new_targeting() + var/datum/spell_targeting/aoe/targeting = new() + targeting.range = aoe_range + return targeting + +/datum/spell/aoe/moon_ringleader/cast(list/targets, mob/user) + new moon_effect(get_turf(user)) + for(var/mob/living/carbon/human/human_target in targets) + if(human_target.stat == DEAD) + continue + if(IS_HERETIC_OR_MONSTER(human_target)) + continue + if(human_target.can_block_magic(antimagic_flags)) + continue + var/drain_bamage = human_target.getBrainLoss() + human_target.Hallucinate(max((drain_bamage *= 0.5) SECONDS, 40 SECONDS)) + human_target.AdjustConfused(10 SECONDS) + if(drain_bamage >= 80) + human_target.apply_status_effect(/datum/status_effect/moon_converted) + add_attack_logs(user, human_target, "[human_target] was driven insane by [user]([src])") + log_game("[human_target] was driven insane by [user]") + else + human_target.adjustBrainLoss(25) + + return ..() + + +/obj/effect/temp_visual/moon_ringleader + icon = 'icons/effects/eldritch.dmi' + icon_state = "ring_leader_effect" + alpha = 180 + duration = 6 + +/obj/effect/temp_visual/moon_ringleader/ringleader/Initialize(mapload) + . = ..() + transform = transform.Scale(10) diff --git a/code/modules/antagonists/heretic/magic/moon_smile.dm b/code/modules/antagonists/heretic/magic/moon_smile.dm new file mode 100644 index 000000000000..457462eb9460 --- /dev/null +++ b/code/modules/antagonists/heretic/magic/moon_smile.dm @@ -0,0 +1,55 @@ +/datum/spell/pointed/moon_smile + name = "Smile of the moon" + desc = "Lets you turn the gaze of the moon on someone \ + temporarily blinding, muting, deafening and knocking down a single target if their sanity is low enough." + + + action_background_icon = 'icons/mob/actions/actions_ecult.dmi' + action_background_icon_state = "bg_heretic" + action_icon_state = "moon_smile" + action_icon = 'icons/mob/actions/actions_ecult.dmi' + ranged_mousepointer = 'icons/effects/mouse_pointers/moon_target.dmi' + + sound = 'sound/magic/blind.ogg' + is_a_heretic_spell = TRUE + clothes_req = FALSE + base_cooldown = 20 SECONDS + antimagic_flags = MAGIC_RESISTANCE|MAGIC_RESISTANCE_MIND + invocation = "Mo'N S'M'LE" + invocation_type = INVOCATION_SHOUT + spell_requirements = SPELL_REQUIRES_NO_ANTIMAGIC + cast_range = 6 + + //active_msg = "You prepare to let them see the true face..." + + +/datum/spell/pointed/moon_smile/create_new_targeting() + var/datum/spell_targeting/click/C = new() + C.selection_type = SPELL_SELECTION_RANGE + C.allowed_type = /mob/living/carbon/human + return C + +/datum/spell/pointed/moon_smile/cast(list/targets, mob/user) + . = ..() + var/mob/living/cast_on = targets[1] + /// The duration of these effects are based on sanity, mainly for flavor but also to make it a weaker alpha strike + var/maximum_duration = 15 SECONDS + var/moon_smile_duration = ((cast_on.getBrainLoss() + 1) / 100) * maximum_duration + if(cast_on.can_block_magic(antimagic_flags)) + to_chat(cast_on, "The moon turns, its smile no longer set on you.") + to_chat(user, "The moon does not smile upon them.") + return FALSE + + playsound(cast_on, 'sound/hallucinations/i_see_you1.ogg', 50, 1) + to_chat(cast_on, "Your eyes cry out in pain, your ears bleed and your lips seal! THE MOON SMILES UPON YOU!") + cast_on.EyeBlind(moon_smile_duration / 2 + (1 SECONDS)) + cast_on.EyeBlurry(moon_smile_duration + (2 SECONDS)) + + cast_on.Deaf(moon_smile_duration + (2 SECONDS)) + + cast_on.Silence(moon_smile_duration + (1 SECONDS)) + + // Only knocksdown if the target has a low enough sanity + if(cast_on.getBrainLoss() > 40) + cast_on.KnockDown(2 SECONDS) + return TRUE diff --git a/code/modules/antagonists/heretic/magic/nightwatcher_rebirth.dm b/code/modules/antagonists/heretic/magic/nightwatcher_rebirth.dm new file mode 100644 index 000000000000..fb8c90618b64 --- /dev/null +++ b/code/modules/antagonists/heretic/magic/nightwatcher_rebirth.dm @@ -0,0 +1,61 @@ +/datum/spell/aoe/fiery_rebirth + name = "Nightwatcher's Rebirth" + desc = "A spell that extinguishes you and drains nearby heathens engulfed in flames of their life force, \ + healing you for each victim drained. Those in critical condition \ + will have the last of their vitality drained, killing them." + + + action_background_icon = 'icons/mob/actions/actions_ecult.dmi' + action_background_icon_state = "bg_heretic" + action_icon_state = "smoke" + action_icon = 'icons/mob/actions/actions_ecult.dmi' + + is_a_heretic_spell = TRUE + clothes_req = FALSE + base_cooldown = 1 MINUTES + + invocation = "GL'RY T' TH' N'GHT'W'TCH'ER" + invocation_type = INVOCATION_WHISPER + +/datum/spell/aoe/fiery_rebirth/create_new_targeting() + var/datum/spell_targeting/aoe/A = new() + A.include_user = FALSE + A.range = 7 + A.allowed_type = /mob/living/carbon + return A + +/datum/spell/aoe/fiery_rebirth/cast(list/targets, mob/living/carbon/user) + user.ExtinguishMob() + for(var/mob/living/carbon/nearby_mob in targets) + if(nearby_mob == user) + continue + if(!nearby_mob.mind || !nearby_mob.client) + continue + if(IS_HERETIC_OR_MONSTER(nearby_mob)) + continue + if(nearby_mob.stat == DEAD || !nearby_mob.on_fire) + continue + + + new /obj/effect/temp_visual/eldritch_smoke(get_turf(nearby_mob)) + nearby_mob.Beam(user, icon_state = "r_beam", time = 2 SECONDS) + + //This is essentially a death mark, use this to finish your opponent quicker. + if(nearby_mob.health <= 0) + nearby_mob.death() + nearby_mob.apply_damage(20, BURN) + + // Heal the caster for every victim damaged + var/need_mob_update = FALSE + need_mob_update += user.adjustBruteLoss(-10, updating_health = FALSE) + need_mob_update += user.adjustFireLoss(-10, updating_health = FALSE) + need_mob_update += user.adjustToxLoss(-10, updating_health = FALSE) + need_mob_update += user.adjustOxyLoss(-10, updating_health = FALSE) + need_mob_update += user.adjustStaminaLoss(-10) + if(need_mob_update) + user.updatehealth() + +/obj/effect/temp_visual/eldritch_smoke + icon = 'icons/effects/eldritch.dmi' + icon_state = "smoke" + duration = 10 diff --git a/code/modules/antagonists/heretic/magic/realignment.dm b/code/modules/antagonists/heretic/magic/realignment.dm new file mode 100644 index 000000000000..4374fd0e305d --- /dev/null +++ b/code/modules/antagonists/heretic/magic/realignment.dm @@ -0,0 +1,121 @@ +// Realignment. It's like Fleshmend but solely for stamina damage and stuns. Sec meta +/datum/spell/realignment + name = "Realignment" + desc = "Realign yourself, rapidly regenerating stamina and reducing any stuns or knockdowns. \ + You cannot attack while realigning. Can be casted multiple times in short succession, but each cast lengthens the cooldown." + + + action_background_icon = 'icons/mob/actions/actions_ecult.dmi' + action_background_icon_state = "bg_heretic" + action_icon_state = "adrenal" + action_icon = 'icons/mob/actions/actions_ecult.dmi' + + is_a_heretic_spell = TRUE + clothes_req = FALSE + base_cooldown = 6 SECONDS + var/cooldown_reduction_per_rank = -6 SECONDS // we're not a wizard spell but we use the levelling mechanic + level_max = 10 // we can get up to / over a minute duration cd time + + invocation = "R'S'T." + invocation_type = INVOCATION_SHOUT + spell_requirements = SPELL_REQUIRES_NO_ANTIMAGIC + +/datum/spell/realignment/create_new_targeting() + return new /datum/spell_targeting/self + +/datum/spell/realignment/cast(list/targets, mob/user) + . = ..() + if(!isliving(user)) + return + var/mob/living/living_user = user + living_user.apply_status_effect(/datum/status_effect/realignment) + to_chat(user, "We begin to realign ourselves.") + +/datum/spell/realignment/after_cast(atom/cast_on) + . = ..() + // With every cast, our spell level increases for a short time, which goes back down after a period + // and with every spell level, the cooldown duration of the spell goes up + if(level_spell()) + var/reduction_timer = max(base_cooldown * level_max * 0.5, 1.5 MINUTES) + addtimer(CALLBACK(src, PROC_REF(delevel_spell)), reduction_timer) + +/datum/spell/realignment/proc/level_spell(bypass_cap = FALSE) + // Spell cannot be levelled + if(level_max <= 1) + return FALSE + + // Spell is at cap, and we will not bypass it + if(spell_level >= level_max) + return FALSE + + spell_level++ + cooldown_handler.recharge_duration = max(cooldown_handler.recharge_duration - cooldown_reduction_per_rank, 0.25 SECONDS) // 0 second CD starts to break things. + name = "[get_spell_title()][initial(name)]" + return TRUE + +/datum/spell/realignment/proc/delevel_spell() + // Spell cannot be levelled + if(level_max <= 1) + return FALSE + + if(spell_level <= 1) + return FALSE + + spell_level-- + if(cooldown_reduction_per_rank > 0 SECONDS) + cooldown_handler.recharge_duration = min(cooldown_handler.recharge_duration + cooldown_reduction_per_rank, initial(cooldown_handler.recharge_duration)) + else + cooldown_handler.recharge_duration = max(cooldown_handler.recharge_duration + cooldown_reduction_per_rank, initial(cooldown_handler.recharge_duration)) + + name = "[get_spell_title()][initial(name)]" + return TRUE + +/datum/spell/realignment/proc/get_spell_title() + switch(spell_level) + if(1, 2) + return "Hasty " // Hasty Realignment + if(3, 4) + return "" // Realignment + if(5, 6, 7) + return "Slowed " // Slowed Realignment + if(8, 9, 10) + return "Laborious " // Laborious Realignment (don't reach here) + + return "" + +/datum/status_effect/realignment + id = "realigment" + status_type = STATUS_EFFECT_REFRESH + duration = 8 SECONDS + alert_type = /atom/movable/screen/alert/status_effect/realignment + tick_interval = 0.5 SECONDS + show_duration = TRUE + ///Traits to add/remove + var/list/realignment_traits = list(TRAIT_BATON_RESISTANCE, TRAIT_PACIFISM) + +/datum/status_effect/realignment/on_apply() + ADD_TRAIT(owner, TRAIT_BATON_RESISTANCE, "[id]") + ADD_TRAIT(owner, TRAIT_PACIFISM, "[id]") + owner.add_filter(id, 2, list("type" = "outline", "color" = "#d6e3e7", "size" = 2)) + var/filter = owner.get_filter(id) + animate(filter, alpha = 127, time = 1 SECONDS, loop = -1) + animate(alpha = 63, time = 2 SECONDS) + SEND_SIGNAL(owner, COMSIG_LIVING_CLEAR_STUNS) + return TRUE + +/datum/status_effect/realignment/on_remove() + REMOVE_TRAIT(owner, TRAIT_BATON_RESISTANCE, "[id]") + REMOVE_TRAIT(owner, TRAIT_PACIFISM, "[id]") + owner.remove_filter(id) + +/datum/status_effect/realignment/tick(seconds_between_ticks) + owner.adjustStaminaLoss(-10) + owner.AdjustParalysis(-1 SECONDS) + owner.AdjustStunned(-1 SECONDS) + owner.AdjustWeakened(-1 SECONDS) + owner.AdjustKnockDown(-1 SECONDS) + +/atom/movable/screen/alert/status_effect/realignment + name = "Realignment" + desc = "You're realigning yourself. You cannot attack, but are rapidly regenerating stamina." + icon_state = "realignment" diff --git a/code/modules/antagonists/heretic/magic/rust_charge.dm b/code/modules/antagonists/heretic/magic/rust_charge.dm new file mode 100644 index 000000000000..0d3d7a289c53 --- /dev/null +++ b/code/modules/antagonists/heretic/magic/rust_charge.dm @@ -0,0 +1,11 @@ +// Rust charge, a charge action that can only be started on rust (and only destroys rust tiles) +/datum/action/cooldown/mob_cooldown/charge/rust + name = "Rust Charge" + desc = "A charge that must be started on a rusted tile and will destroy any rusted objects you come into contact with, \ + will deal high damage to others and rust around you during the charge. \ + As it is the rust that empowers you with this ability, no focus is needed." + //charge_distance = 10 +// charge_damage = 50 +// base_cooldown = 45 SECONDS + +///qwertodo: WHY ISN'T THIS A SPELL. LEET ME COMPILE AUUGH diff --git a/code/modules/antagonists/heretic/magic/rust_construction.dm b/code/modules/antagonists/heretic/magic/rust_construction.dm new file mode 100644 index 000000000000..78052857a7b0 --- /dev/null +++ b/code/modules/antagonists/heretic/magic/rust_construction.dm @@ -0,0 +1,126 @@ +/datum/spell/pointed/rust_construction + name = "Rust Formation" + desc = "Transforms a rusted floor into a full wall of rust. Creating a wall underneath a mob will harm it." + + action_background_icon = 'icons/mob/actions/actions_ecult.dmi' + action_background_icon_state = "bg_heretic" + action_icon_state = "shield" + action_icon = 'icons/mob/actions/actions_ecult.dmi' + ranged_mousepointer = 'icons/effects/mouse_pointers/throw_target.dmi' + + is_a_heretic_spell = TRUE + clothes_req = FALSE + base_cooldown = 8 SECONDS + + invocation_type = "none" + spell_requirements = SPELL_REQUIRES_NO_ANTIMAGIC + + cast_range = 4 + + /// How long does the filter last on walls we make? + var/filter_duration = 2 MINUTES + +/datum/spell/pointed/rust_construction/create_new_targeting() + var/datum/spell_targeting/click/T = new + T.click_radius = 0 + T.range = cast_range + T.allowed_type = /turf/simulated + return T + +/datum/spell/pointed/rust_construction/valid_target(target, user) + if(!isliving(user)) + return + + var/mob/living/living_owner = user + var/turf/cast_on = target + if(!isturf(cast_on)) + to_chat(living_owner, "That is not a wall or a floor!") + return FALSE + + if(!HAS_TRAIT(cast_on, TRAIT_RUSTY)) + if(living_owner) + to_chat(living_owner, "The target is not rusted!") + return + living_owner.visible_message("[living_owner] drags [living_owner.p_their()] hand upwards as a wall of rust rises out of [cast_on]!", + "You drag a hand upwards as a wall of rust rises out of [cast_on].") + return TRUE + +/datum/spell/pointed/rust_construction/cast(list/targets, mob/user) + . = ..() + var/turf/cast_on = targets[1] + var/rises_message = "rises out of [cast_on]" + + // If we casted at a wall we'll try to rust it. In the case of an enchanted wall it'll deconstruct it + if(iswallturf(cast_on)) + cast_on.visible_message("\The [cast_on] quakes as the rust causes it to crumble!") + var/mob/living/living_owner = user + living_owner?.do_rust_heretic_act(cast_on) + // ref transfers to floor + cast_on.Shake(duration = 0.5 SECONDS) + // which we need to re-rust + living_owner?.do_rust_heretic_act(cast_on) + playsound(cast_on, 'sound/effects/bang.ogg', 50, vary = TRUE) + return + + var/turf/simulated/wall/new_wall = cast_on.ChangeTurf(/turf/simulated/wall) + if(!istype(new_wall)) + return + + playsound(new_wall, 'sound/effects/constructform.ogg', 50, TRUE) + new_wall.rust_heretic_act() + new_wall.name = "\improper enchanted [new_wall.name]" + new_wall.hardness = 60 + new_wall.sheet_amount = 0 + new_wall.girder_type = null + + // I wanted to do a cool animation of a wall raising from the ground + // but I guess a fading filter will have to do for now as walls have 0 depth (currently) + new_wall.add_filter("rust_wall", 2, list("type" = "outline", "color" = "#85be299c", "size" = 2)) + addtimer(CALLBACK(src, PROC_REF(fade_wall_filter), new_wall), filter_duration * 0.5) + addtimer(CALLBACK(src, PROC_REF(remove_wall_filter), new_wall), filter_duration) + + var/message_shown = FALSE + for(var/mob/living/living_mob in cast_on) + message_shown = TRUE + if(IS_HERETIC_OR_MONSTER(living_mob) || living_mob == user) + living_mob.visible_message( + "\A [new_wall] [rises_message] and pushes along [living_mob]!", + "\A [new_wall] [rises_message] beneath your feet and pushes you along!", + ) + else + living_mob.visible_message( + "\A [new_wall] [rises_message] and slams into [living_mob]!", + "\A [new_wall] [rises_message] beneath your feet and slams into you!", + ) + living_mob.apply_damage(10, BRUTE) + living_mob.KnockDown(5 SECONDS) + living_mob.SpinAnimation(5, 1) + + // If we're not throw them to a nearby (open) turf + var/list/turfs_by_us = get_adjacent_open_turfs(cast_on) + // If there is no side by us, hardstun them + if(!length(turfs_by_us)) + living_mob.Weaken(3 SECONDS) + continue + + // If there's an open turf throw them to the side + living_mob.throw_at(pick(turfs_by_us), 1, 3, spin = FALSE) + + if(!message_shown) + new_wall.visible_message("\A [new_wall] [rises_message]!") + +/datum/spell/pointed/rust_construction/proc/fade_wall_filter(turf/simulated/wall) + if(QDELETED(wall)) + return + + var/rust_filter = wall.get_filter("rust_wall") + if(!rust_filter) + return + + animate(rust_filter, alpha = 0, time = filter_duration * (9/20)) + +/datum/spell/pointed/rust_construction/proc/remove_wall_filter(turf/simulated/wall) + if(QDELETED(wall)) + return + + wall.remove_filter("rust_wall") diff --git a/code/modules/antagonists/heretic/magic/rust_wave.dm b/code/modules/antagonists/heretic/magic/rust_wave.dm new file mode 100644 index 000000000000..0a0c98c99635 --- /dev/null +++ b/code/modules/antagonists/heretic/magic/rust_wave.dm @@ -0,0 +1,134 @@ +// Shoots out in a wave-like, what rust heretics themselves get +/datum/spell/cone/staggered/entropic_plume + name = "Entropic Plume" + desc = "Spews forth a disorienting plume that causes enemies to strike each other, \ + briefly blinds them (increasing with range) and poisons them (decreasing with range). \ + Also spreads rust in the path of the plume." + + + action_background_icon = 'icons/mob/actions/actions_ecult.dmi' + action_background_icon_state = "bg_heretic" + action_icon_state = "entropic_plume" + action_icon = 'icons/mob/actions/actions_ecult.dmi' + sound = 'sound/magic/forcewall.ogg' + + is_a_heretic_spell = TRUE + clothes_req = FALSE + base_cooldown = 30 SECONDS + + invocation = "'NTR'P'C PL'M'" + invocation_type = INVOCATION_WHISPER + spell_requirements = SPELL_REQUIRES_NO_ANTIMAGIC + cone_levels = 5 + respect_density = TRUE + +/datum/spell/cone/staggered/entropic_plume/create_new_targeting() + var/datum/spell_targeting/cone/entropic/E = new() + E.cone_levels = cone_levels + E.respect_density = respect_density + return E + +/datum/spell_targeting/cone/entropic + +/datum/spell_targeting/cone/entropic/calculate_cone_shape(current_level) + // At the first level (that isn't level 1) we will be small + if(current_level == 2) + return 3 + // At the max level, we turn small again + if(current_level == cone_levels) + return 3 + // Otherwise, all levels in between will be wider + return 5 + +/datum/spell/cone/staggered/entropic_plume/cast(list/targets, mob/user) + . = ..() + new /obj/effect/temp_visual/dir_setting/entropic(get_step(user, user.dir), user.dir) + +/datum/spell/cone/staggered/entropic_plume/do_turf_cone_effect(turf/target_turf, mob/living/caster, level) + if(ismob(caster)) + caster.do_rust_heretic_act(target_turf) + else + target_turf.rust_heretic_act() + +/datum/spell/cone/staggered/entropic_plume/do_mob_cone_effect(mob/living/victim, atom/caster, level) + if(victim.can_block_magic(antimagic_flags) || IS_HERETIC_OR_MONSTER(victim) || victim == caster) + return + victim.apply_status_effect(/datum/status_effect/amok) + victim.apply_status_effect(/datum/status_effect/cloudstruck, level * 1 SECONDS) + victim.adjust_disgust(100 SECONDS) + + +/obj/effect/temp_visual/dir_setting/entropic + icon = 'icons/effects/160x160.dmi' + icon_state = "entropic_plume" + duration = 3 SECONDS + +/obj/effect/temp_visual/dir_setting/entropic/setDir(dir) + . = ..() + switch(dir) + if(NORTH) + pixel_x = -64 + if(SOUTH) + pixel_x = -64 + pixel_y = -128 + if(EAST) + pixel_y = -64 + if(WEST) + pixel_y = -64 + pixel_x = -128 + +// Shoots a straight line of rusty stuff ahead of the caster, what rust monsters get +/datum/spell/fireball/rust_wave //qwertodo make this work dipshit + name = "Patron's Reach" + desc = "Channels energy into your hands to release a wave of rust." + + + action_background_icon = 'icons/mob/actions/actions_ecult.dmi' + action_background_icon_state = "bg_heretic" + action_icon_state = "rust_wave" + action_icon = 'icons/mob/actions/actions_ecult.dmi' + + is_a_heretic_spell = TRUE + clothes_req = FALSE + base_cooldown = 35 SECONDS + + invocation = "SPR'D TH' WO'D" + invocation_type = INVOCATION_WHISPER + spell_requirements = SPELL_REQUIRES_NO_ANTIMAGIC + + fireball_type = /obj/item/projectile/magic/rust_wave + +/obj/item/projectile/magic/rust_wave + name = "Patron's Reach" + icon_state = "eldritch_projectile" + alpha = 180 + damage = 30 + damage_type = TOX + hitsound = 'sound/weapons/punch3.ogg' + range = 15 + speed = 1 + +/obj/item/projectile/magic/rust_wave/Moved(atom/old_loc, movement_dir, forced, list/old_locs, momentum_change = TRUE) + . = ..() + playsound(src, 'sound/items/welder.ogg', 75, TRUE) + var/list/turflist = list() + var/turf/T1 + turflist += get_turf(src) + T1 = get_step(src,turn(movement_dir,90)) + turflist += T1 + turflist += get_step(T1,turn(movement_dir,90)) + T1 = get_step(src,turn(movement_dir,-90)) + turflist += T1 + turflist += get_step(T1,turn(movement_dir,-90)) + for(var/turf/T as anything in turflist) + if(!T || prob(25)) + continue + T.rust_heretic_act() + +/datum/spell/fireball/rust_wave/short + name = "Lesser Patron's Reach" + fireball_type = /obj/item/projectile/magic/rust_wave/short + +/obj/item/projectile/magic/rust_wave/short + range = 7 + speed = 0.5 diff --git a/code/modules/antagonists/heretic/magic/shadow_cloak.dm b/code/modules/antagonists/heretic/magic/shadow_cloak.dm new file mode 100644 index 000000000000..b10f61a82985 --- /dev/null +++ b/code/modules/antagonists/heretic/magic/shadow_cloak.dm @@ -0,0 +1,205 @@ +/datum/spell/shadow_cloak + name = "Cloak of Shadow" + desc = "Completely conceals your identity, but does not make you invisible. Can be activated early to disable it. \ + While cloaked, you move faster, but undergo actions much slower. \ + Taking damage while cloaked may cause it to lift suddenly, causing negative effects. " + + action_background_icon = 'icons/mob/actions/actions_ecult.dmi' + action_background_icon_state = "bg_heretic" + action_icon = 'icons/mob/actions/actions_minor_antag.dmi' + action_icon_state = "ninja_cloak" + sound = 'sound/effects/curse/curse2.ogg' + + is_a_heretic_spell = TRUE + clothes_req = FALSE + base_cooldown = 6 SECONDS + + invocation_type = INVOCATION_NONE + spell_requirements = SPELL_REQUIRES_NO_ANTIMAGIC + + /// How long before we automatically uncloak? + var/uncloak_time = 3 MINUTES + /// The cloak currently active + var/datum/status_effect/shadow_cloak/active_cloak + COOLDOWN_DECLARE(uncloak_timer) + + +/datum/spell/shadow_cloak/before_cast(mob/living/cast_on) + . = ..() + sound = pick( + 'sound/effects/curse/curse1.ogg', + 'sound/effects/curse/curse2.ogg', + 'sound/effects/curse/curse3.ogg', + 'sound/effects/curse/curse4.ogg', + 'sound/effects/curse/curse5.ogg', + 'sound/effects/curse/curse6.ogg', + ) + +/datum/spell/shadow_cloak/create_new_targeting() + return new /datum/spell_targeting/self + +/datum/spell/shadow_cloak/cast(list/targets, mob/user) + . = ..() + if(active_cloak) + var/new_cd = max((uncloak_time - COOLDOWN_TIMELEFT(src,uncloak_timer)) / 3, base_cooldown) + uncloak_mob(user) + cooldown_handler.start_recharge(new_cd) + + else + COOLDOWN_START(src,uncloak_timer, 3 MINUTES) + cloak_mob(user) + cooldown_handler.start_recharge(1 SECONDS) + +/datum/spell/shadow_cloak/proc/cloak_mob(mob/living/cast_on) + playsound(cast_on, 'sound/effects/ahaha.ogg', 50, TRUE, -1, extrarange = SILENCED_SOUND_EXTRARANGE, frequency = 0.5) + cast_on.visible_message( + "[cast_on] disappears into the shadows!", + "You disappear into the shadows, becoming unidentifiable.", + ) + + active_cloak = cast_on.apply_status_effect(/datum/status_effect/shadow_cloak) + RegisterSignal(active_cloak, COMSIG_PARENT_QDELETING, PROC_REF(on_early_cloak_loss)) + RegisterSignal(cast_on, SIGNAL_REMOVETRAIT(TRAIT_ALLOW_HERETIC_CASTING), PROC_REF(on_focus_lost)) + +/datum/spell/shadow_cloak/proc/uncloak_mob(mob/living/cast_on, show_message = TRUE) + if(!QDELETED(active_cloak)) + UnregisterSignal(active_cloak, COMSIG_PARENT_QDELETING) + qdel(active_cloak) + active_cloak = null + + UnregisterSignal(cast_on, SIGNAL_REMOVETRAIT(TRAIT_ALLOW_HERETIC_CASTING)) + playsound(cast_on, 'sound/effects/curse/curseattack.ogg', 50) + if(show_message) + cast_on.visible_message( + "[cast_on] appears from the shadows!", + "You appear from the shadows, identifiable once more.", + ) + COOLDOWN_START(src, uncloak_timer, 5 SECONDS) + + +/// Signal proc for [COMSIG_PARENT_QDELETING], if our cloak is deleted early, impart negative effects +/datum/spell/shadow_cloak/proc/on_early_cloak_loss(datum/status_effect/source) + SIGNAL_HANDLER + + var/mob/living/removed = source.owner + uncloak_mob(removed, show_message = FALSE) + removed.visible_message( + "[removed] is pulled from the shadows!", + "You are pulled out of the shadows!", + ) + + removed.KnockDown(0.5 SECONDS) + removed.Slowed(2 MINUTES, 0.5) // jesus + cooldown_handler.start_recharge(uncloak_time * 2/3) + +/// Signal proc for [SIGNAL_REMOVETRAIT] via [TRAIT_ALLOW_HERETIC_CASTING], losing our focus midcast will throw us out. +/datum/spell/shadow_cloak/proc/on_focus_lost(mob/living/source) + SIGNAL_HANDLER + + uncloak_mob(source, show_message = FALSE) + source.visible_message( + "[source] suddenly appears from the shadows!", + "As you lose your focus, you are pulled out of the shadows!", + ) + cooldown_handler.start_recharge(uncloak_time / 3) + +/// Shadow cloak effect. Conceals the owner in a cloud of purple smoke, making them unidentifiable. +/// Also comes with some other buffs and debuffs - faster movespeed, slower actionspeed, etc. +/datum/status_effect/shadow_cloak + id = "shadow_cloak" + alert_type = null + tick_interval = 0 + /// How much damage we've been hit with + var/damage_sustained = 0 + /// How much damage we can be hit with before it starts rolling reveal chances + var/damage_before_reveal = 25 + /// Method to track plant overlay on mob for later removal + var/mutable_appearance/cloak_image + +/datum/status_effect/shadow_cloak/on_apply() + hide_user(owner) + // Add the relevant traits and modifiers + ADD_TRAIT(owner, TRAIT_GOTTAGONOTSOFAST, id) + ADD_TRAIT(owner, TRAIT_UNKNOWN, id) + ADD_TRAIT(owner, TRAIT_SILENT_FOOTSTEPS, id) + // Register signals to cause effects + RegisterSignal(owner, COMSIG_ATOM_DIR_CHANGE, PROC_REF(on_dir_change)) + RegisterSignal(owner, COMSIG_MOB_STATCHANGE, PROC_REF(on_stat_change)) + RegisterSignal(owner, COMSIG_MOB_APPLY_DAMAGE, PROC_REF(on_damaged)) + RegisterSignal(owner, COMSIG_MOVABLE_MOVED, PROC_REF(on_movement)) + return TRUE + +/datum/status_effect/shadow_cloak/on_remove() + // Remove image + QDEL_NULL(cloak_image) + owner.remove_alt_appearance(id) + // Remove traits and modifiers + REMOVE_TRAIT(owner, TRAIT_GOTTAGONOTSOFAST, id) + REMOVE_TRAIT(owner, TRAIT_UNKNOWN, id) + REMOVE_TRAIT(owner, TRAIT_SILENT_FOOTSTEPS, id) + // Clear signals + UnregisterSignal(owner, list( + COMSIG_ATOM_DIR_CHANGE, + COMSIG_MOB_STATCHANGE, + COMSIG_MOB_APPLY_DAMAGE, + COMSIG_MOVABLE_MOVED, + )) + +/// Signal proc for [COMSIG_ATOM_DIR_CHANGE], handles turning the effect as we turn +/datum/status_effect/shadow_cloak/proc/on_dir_change(datum/source, old_dir, new_dir) + SIGNAL_HANDLER + + cloak_image.dir = new_dir + +/// Signal proc for [COMSIG_MOB_STATCHANGE], going past soft crit will stop the effect +/datum/status_effect/shadow_cloak/proc/on_stat_change(datum/source, new_stat, old_stat) + SIGNAL_HANDLER + + // Going above unconscious will self-delete + if(new_stat >= UNCONSCIOUS) + qdel(src) + +/// Signal proc for [COMSIG_MOB_APPLY_DAMAGE], being damaged past a threshold will roll a chance to stop the effect +/datum/status_effect/shadow_cloak/proc/on_damaged(datum/source, damage, damagetype, ...) + SIGNAL_HANDLER + + // Stam damage is generally bursty, so we'll half it + if(damagetype == STAMINA) + damage *= 0.5 + + // Add incoming damage to the total damage sustained + damage_sustained += damage + // If we're not past the threshold, return + if(damage_sustained < damage_before_reveal) + return + + // Otherwise, we have a probability based on how much damage sustained to self delete + if(prob(damage_sustained)) + qdel(src) + +/// Signal proc for [COMSIG_MOVABLE_MOVED], leaves a cool looking trail behind us as we walk +/datum/status_effect/shadow_cloak/proc/on_movement(mob/living/carbon/L, atom/old_loc) + SIGNAL_HANDLER + var/obj/effect/temp_visual/dir_setting/cloak_walk/trail = new (old_loc, owner.dir) + if(owner.body_position == LYING_DOWN) + trail.transform = turn(trail.transform, 90) + +/datum/status_effect/shadow_cloak/proc/hide_user(mob/living/carbon/user) + cloak_image = image('icons/effects/effects.dmi', owner, "curse", dir = owner.dir) + cloak_image.dir = owner.dir + cloak_image.override = TRUE + cloak_image.alpha = 0 + animate(cloak_image, alpha = 255, 0.2 SECONDS) + owner.add_alt_appearance(id, cloak_image, GLOB.player_list) + + +// Visual effect for the shadow cloak "trail" +/obj/effect/temp_visual/dir_setting/cloak_walk + duration = 0.75 SECONDS + icon_state = "curse" + +/obj/effect/temp_visual/dir_setting/cloak_walk/Initialize(mapload, set_dir) + . = ..() + animate(src, alpha = 0, time = duration - 1) + + diff --git a/code/modules/antagonists/heretic/magic/space_crawl.dm b/code/modules/antagonists/heretic/magic/space_crawl.dm new file mode 100644 index 000000000000..12267950066a --- /dev/null +++ b/code/modules/antagonists/heretic/magic/space_crawl.dm @@ -0,0 +1,52 @@ +#define SPACE_PHASING "space-phasing" + +/** + * ### Space Crawl + * + * Lets the caster enter and exit tiles of space or misc turfs. + */ +/datum/spell/bloodcrawl/space_crawl + name = "Space Phase" + desc = "Allows you to phase in and out of existence while in space or misc tiles." + + + + action_background_icon = 'icons/mob/actions/actions_ecult.dmi' + action_background_icon_state = "bg_heretic" + action_icon_state = "space_crawl" + action_icon = 'icons/mob/actions/actions_ecult.dmi' + + is_a_heretic_spell = TRUE + clothes_req = FALSE + + invocation_type = INVOCATION_NONE + spell_requirements = SPELL_REQUIRES_NO_ANTIMAGIC + allowed_type = /turf + +/datum/spell/bloodcrawl/space_crawl/valid_target(turf/target, user) + if(isspaceturf(get_turf(user))) //qwertodo: make this work on basalt / asteroid turf, if we get a planet map + return TRUE + to_chat(user, "You must stand on a space or misc turf!") + return FALSE + +/datum/spell/bloodcrawl/space_crawl/rise_message(atom/A) + return + +/datum/spell/bloodcrawl/space_crawl/rise_animation(turf/tele_loc, mob/living/L, atom/A) + new /obj/effect/temp_visual/space_explosion(tele_loc) + REMOVE_TRAIT(L, TRAIT_RESISTLOWPRESSURE, SPACE_PHASING) + REMOVE_TRAIT(L, TRAIT_RESISTLOWPRESSURE, TRAIT_RESISTCOLD) + REMOVE_TRAIT(L, TRAIT_RESISTLOWPRESSURE, TRAIT_NOBREATH) + +/datum/spell/bloodcrawl/space_crawl/handle_consumption(mob/living/L, mob/living/victim, atom/A, obj/effect/dummy/slaughter/holder) + return + +/datum/spell/bloodcrawl/space_crawl/sink_animation(atom/A, mob/living/L) + A.visible_message("[L] sinks into [A]...") + new /obj/effect/temp_visual/space_explosion(A) + ADD_TRAIT(L, TRAIT_RESISTLOWPRESSURE, SPACE_PHASING) + ADD_TRAIT(L, TRAIT_RESISTLOWPRESSURE, TRAIT_RESISTCOLD) + ADD_TRAIT(L, TRAIT_RESISTLOWPRESSURE, TRAIT_NOBREATH) + + +#undef SPACE_PHASING diff --git a/code/modules/antagonists/heretic/magic/star_blast.dm b/code/modules/antagonists/heretic/magic/star_blast.dm new file mode 100644 index 000000000000..b259c178b1bb --- /dev/null +++ b/code/modules/antagonists/heretic/magic/star_blast.dm @@ -0,0 +1,60 @@ +/datum/spell/fireball/star_blast + name = "Star Blast" + desc = "This spell fires a disk with cosmic energies at a target, spreading the star mark." + + + action_background_icon = 'icons/mob/actions/actions_ecult.dmi' + action_background_icon_state = "bg_heretic" + action_icon_state = "star_blast" + what_icon_state = "star_blast" + action_icon = 'icons/mob/actions/actions_ecult.dmi' + + sound = 'sound/magic/cosmic_energy.ogg' + is_a_heretic_spell = TRUE + base_cooldown = 20 SECONDS + + invocation = "R'T'T' ST'R!" + invocation_type = INVOCATION_SHOUT + spell_requirements = SPELL_REQUIRES_NO_ANTIMAGIC + clothes_req = FALSE + selection_activated_message = "You prepare to cast your star blast!" + selection_deactivated_message = "You stop swirling cosmic energies from the palm of your hand... for now." + fireball_type = /obj/item/projectile/magic/star_ball + +/obj/item/projectile/magic/star_ball + name = "star ball" + icon_state = "star_ball" + damage = 20 + damage_type = BURN + speed = 5 + range = 100 + knockdown = 4 SECONDS + /// Effect for when the ball hits something + var/obj/effect/explosion_effect = /obj/effect/temp_visual/cosmic_explosion + /// The range at which people will get marked with a star mark. + var/star_mark_range = 3 + +/obj/item/projectile/magic/star_ball/Initialize(mapload) + . = ..() + AddElement(/datum/element/effect_trail, /obj/effect/forcefield/cosmic_field/fast) + +/obj/item/projectile/magic/star_ball/on_hit(atom/target, blocked = 0, pierce_hit) + . = ..() + var/mob/living/cast_on = firer + var/pins_hit = 0 + for(var/mob/living/nearby_mob in range(star_mark_range, target)) + if(cast_on == nearby_mob || cast_on.buckled == nearby_mob) + continue + nearby_mob.apply_status_effect(/datum/status_effect/star_mark, cast_on) + pins_hit++ + if(pins_hit >= 10) + playsound(get_turf(src), 'sound/effects/bowling_strike.ogg', 100, FALSE) + for(var/mob/nearby_mob in range(9, target)) + to_chat(nearby_mob, "STRIKE!") + +/obj/item/projectile/magic/star_ball/Destroy() + playsound(get_turf(src), 'sound/magic/cosmic_energy.ogg', 50, FALSE) + for(var/turf/cast_turf in RANGE_TURFS(1, src)) + new /obj/effect/forcefield/cosmic_field(cast_turf) + return ..() + diff --git a/code/modules/antagonists/heretic/magic/star_touch.dm b/code/modules/antagonists/heretic/magic/star_touch.dm new file mode 100644 index 000000000000..6791d19885ef --- /dev/null +++ b/code/modules/antagonists/heretic/magic/star_touch.dm @@ -0,0 +1,208 @@ +/datum/spell/touch/star_touch + name = "Star Touch" + desc = "Manifests cosmic fields on tiles next to you while marking the victim with a star mark \ + or consuming an already present star mark to put them to sleep for 4 seconds. \ + They will then be linked to you with a cosmic ray, burning them for up to a minute, or \ + until they can escape your sight. Star Touch can also remove Cosmic Runes, or teleport you \ + to your Star Gazer when used on yourself." + + + action_background_icon = 'icons/mob/actions/actions_ecult.dmi' + action_background_icon_state = "bg_heretic" + action_icon_state = "star_touch" + action_icon = 'icons/mob/actions/actions_ecult.dmi' + + sound = 'sound/items/welder.ogg' + is_a_heretic_spell = TRUE + clothes_req = FALSE + base_cooldown = 15 SECONDS + invocation = "ST'R 'N'RG'!" + invocation_type = INVOCATION_SHOUT + spell_requirements = SPELL_REQUIRES_NO_ANTIMAGIC + antimagic_flags = MAGIC_RESISTANCE + + hand_path = /obj/item/melee/touch_attack/star_touch + /// Stores the weakref for the Star Gazer after ascending + var/atom/star_gazer + +/obj/item/melee/touch_attack/star_touch/after_attack(atom/target, mob/living/user, proximity_flag, click_parameters) + . = ..() + + if(!proximity_flag || target == user || blocked_by_antimagic || !isliving(target) || !iscarbon(user) || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED)) //There are better ways to get a good nights sleep in a bed. + return + var/mob/living/living_target = target + if(living_target.has_status_effect(/datum/status_effect/star_mark)) + living_target.Paralyse(4 SECONDS) + living_target.remove_status_effect(/datum/status_effect/star_mark) + else + living_target.apply_status_effect(/datum/status_effect/star_mark, user) + for(var/turf/cast_turf as anything in get_turfs(living_target)) + new /obj/effect/forcefield/cosmic_field(cast_turf) + user.apply_status_effect(/datum/status_effect/cosmic_beam, living_target) + handle_delete(user) + +/obj/item/melee/touch_attack/star_touch/proc/get_turfs(mob/living/victim) + var/list/target_turfs = list(get_turf(loc)) + var/range = attached_spell.ascended ? 2 : 1 + var/list/directions = list(turn(loc.dir, 90), turn(loc.dir, 270)) + for(var/direction as anything in directions) + for(var/i in 1 to range) + target_turfs += get_ranged_target_turf(loc, direction, i) + return target_turfs + +/// To set the star gazer +///datum/spell/touch/star_touch/proc/set_star_gazer(mob/living/basic/heretic_summon/star_gazer/star_gazer_mob) + //star_gazer = WEAKREF(star_gazer_mob) + +/// To obtain the star gazer if there is one +///datum/spell/touch/star_touch/proc/get_star_gazer() +// var/mob/living/basic/heretic_summon/star_gazer/star_gazer_resolved = star_gazer?.resolve() +// if(star_gazer_resolved) +// return star_gazer_resolved +// return FALSE + +/obj/item/melee/touch_attack/star_touch + name = "Star Touch" + desc = "A sinister looking aura that distorts the flow of reality around it. \ + Causes people with a star mark to sleep for 4 seconds, and causes people without a star mark to get one." + icon_state = "star" + item_state = "star" + catchphrase = null + +/obj/item/melee/touch_attack/star_touch/Initialize(mapload) + . = ..() + AddComponent(\ + /datum/component/effect_remover, \ + success_feedback = "You remove %THEEFFECT.", \ + on_clear_callback = CALLBACK(src, PROC_REF(after_clear_rune)), \ + effects_we_clear = list(/obj/effect/cosmic_rune), \ + ) + +/* + * Callback for effect_remover component. + */ +/obj/item/melee/touch_attack/star_touch/proc/after_clear_rune(obj/effect/target, mob/living/user) + new /obj/effect/temp_visual/cosmic_rune_fade(get_turf(target)) + qdel(src) + +///obj/item/melee/touch_attack/star_touch/activate_self(mob/user) +// if(..()) +// return +// var/datum/spell/touch/star_touch/star_touch_spell = spell_which_made_us?.resolve() +// var/mob/living/basic/heretic_summon/star_gazer/star_gazer_mob = star_touch_spell?.get_star_gazer() +// if(!star_gazer_mob) +// balloon_alert(user, "no linked star gazer!") +// return ..() +// new /obj/effect/temp_visual/cosmic_explosion(get_turf(user)) +// do_teleport( +// user, +// get_turf(star_gazer_mob), +// no_effects = TRUE, +// channel = TELEPORT_CHANNEL_MAGIC, +// asoundin = 'sound/magic/cosmic_energy.ogg', +// asoundout = 'sound/magic/cosmic_energy.ogg', +// ) +// remove_hand_with_no_refund(user) + +/obj/effect/ebeam/cosmic + name = "cosmic beam" + +/datum/status_effect/cosmic_beam + id = "cosmic_beam" + tick_interval = 0.2 SECONDS + duration = 1 MINUTES + status_type = STATUS_EFFECT_REPLACE + alert_type = null + /// Stores the current beam target + var/mob/living/current_target + /// Checks the time of the last check + var/last_check = 0 + /// The delay of when the beam gets checked + var/check_delay = 10 //Check los as often as possible, max resolution is SSobj tick though + /// The maximum range of the beam + var/max_range = 8 + /// Wether the beam is active or not + var/active = FALSE + /// The storage for the beam + var/datum/beam/current_beam = null + +/datum/status_effect/cosmic_beam/on_creation(mob/living/new_owner, mob/living/current_target) + src.current_target = current_target + start_beam(current_target, new_owner) + return ..() + +/datum/status_effect/cosmic_beam/be_replaced() + if(active) + qdel(current_beam) + active = FALSE + return ..() + +/datum/status_effect/cosmic_beam/tick(seconds_between_ticks) + if(!current_target) + lose_target() + return + + if(world.time <= last_check+check_delay) + return + + last_check = world.time + + if(!can_see(owner, current_target)) + qdel(current_beam)//this will give the target lost message + return + + if(current_target) + on_beam_tick(current_target) + +/** + * Proc that always is called when we want to end the beam and makes sure things are cleaned up, see beam_died() + */ +/datum/status_effect/cosmic_beam/proc/lose_target() + if(active) + qdel(current_beam) + active = FALSE + if(current_target) + on_beam_release(current_target) + current_target = null + +/** + * Proc that is only called when the beam fails due to something, so not when manually ended. + * manual disconnection = lose_target, so it can silently end + * automatic disconnection = beam_died, so we can give a warning message first + */ +/datum/status_effect/cosmic_beam/proc/beam_died() + SIGNAL_HANDLER + to_chat(owner, "You lose control of the beam!") + lose_target() + duration = 0 + +/// Used for starting the beam when a target has been acquired +/datum/status_effect/cosmic_beam/proc/start_beam(atom/target, mob/living/user) + + if(current_target) + lose_target() + if(!isliving(target)) + return + + current_target = target + active = TRUE + current_beam = user.Beam(current_target, icon_state="cosmic_beam", time = 1 MINUTES, maxdistance = max_range, beam_type = /obj/effect/ebeam/cosmic) + RegisterSignal(current_beam, COMSIG_PARENT_QDELETING, PROC_REF(beam_died)) + + if(current_target) + on_beam_hit(current_target) + +/// What to add when the beam connects to a target +/datum/status_effect/cosmic_beam/proc/on_beam_hit(mob/living/target) + //if(!istype(target, /mob/living/basic/heretic_summon/star_gazer)) + target.AddElement(/datum/element/effect_trail, /obj/effect/forcefield/cosmic_field/fast) + +/// What to process when the beam is connected to a target +/datum/status_effect/cosmic_beam/proc/on_beam_tick(mob/living/target) + if(target.adjustFireLoss(3, updating_health = FALSE)) + target.updatehealth() + +/// What to remove when the beam disconnects from a target +/datum/status_effect/cosmic_beam/proc/on_beam_release(mob/living/target) + //if(!istype(target, /mob/living/basic/heretic_summon/star_gazer)) + target.RemoveElement(/datum/element/effect_trail, /obj/effect/forcefield/cosmic_field/fast) diff --git a/code/modules/antagonists/heretic/magic/void_cold_cone.dm b/code/modules/antagonists/heretic/magic/void_cold_cone.dm new file mode 100644 index 000000000000..e575d5ad6f5e --- /dev/null +++ b/code/modules/antagonists/heretic/magic/void_cold_cone.dm @@ -0,0 +1,99 @@ +/datum/spell/cone/staggered/cone_of_cold + name = "Cone of Cold" + desc = "Shoots out a freezing cone in front of you." + + base_cooldown = 30 SECONDS + cooldown_min = 14 SECONDS + + invocation = "ISAGE!" // What killed the dinosaurs? THE ICE AGE + invocation_type = INVOCATION_SHOUT + + cone_levels = 4 + respect_density = TRUE + delay_between_level = 0.05 SECONDS + + /// What flags do we pass to MakeSlippery when affecting turfs? + /// null / NONE / TURF_DRY means the turf is unaffected + var/turf_freeze_type = TURF_WET_PERMAFROST + /// How long do turfs remain slippery / frozen for? + /// 0 seconds means the turf is unaffected, INFINITY means it's made perma-wet + var/unfreeze_turf_duration = 45 SECONDS + + /// What status effect do we apply when affecting mobs? + /// null means no status effect is applied + var/datum/status_effect/frozen_status_effect_path = /datum/status_effect/freon + /// How long do mobs remain frozen for? + /// 0 seconds means no status effect is applied, INFINITY means infinite duration (or default duration of the status effect) + var/unfreeze_mob_duration = 20 SECONDS + /// How much brute do we apply on freeze? + var/on_freeze_brute_damage = 10 + /// How much burn do we apply on freeze? + var/on_freeze_burn_damage = 20 + + /// How long do objects remain frozen for? + /// 0 seconds mean no objects are frozen, INFINITY means infinite duration freeze + var/unfreeze_object_duration = 20 SECONDS + + + +/datum/spell/cone/staggered/cone_of_cold/do_turf_cone_effect(turf/target_turf, atom/caster, level) + if(!turf_freeze_type || unfreeze_turf_duration <= 0 SECONDS) // 0 duration = don't apply the slip + return + if(!isfloorturf(target_turf)) + return + var/turf/simulated/frozen_floor = target_turf + frozen_floor.MakeSlippery(turf_freeze_type, unfreeze_turf_duration) + +/datum/spell/cone/staggered/cone_of_cold/do_mob_cone_effect(mob/living/target_mob, atom/caster, level) + if(target_mob.can_block_magic(antimagic_flags) || target_mob == caster || HAS_TRAIT(target_mob, TRAIT_RESISTCOLD)) + return + + if(ispath(frozen_status_effect_path) && unfreeze_mob_duration > 0 SECONDS) // 0 duration = don't apply the status effect + var/datum/status_effect/freeze = target_mob.apply_status_effect(frozen_status_effect_path) + if(unfreeze_mob_duration != INFINITY) + freeze.duration = world.time + unfreeze_mob_duration + + if(on_freeze_brute_damage || on_freeze_burn_damage) + target_mob.take_overall_damage(on_freeze_brute_damage, on_freeze_burn_damage) + + to_chat(target_mob, "You feel a bitter cold!") + + + +/datum/spell/cone/staggered/cone_of_cold/void + name = "Void Blast" + desc = "Fires a cone of chilling void in front of you, freezing everything in its path. \ + Enemies in the cone of the blast will be damaged slightly, slowed, and chilled overtime. \ + Additionally, objects hit will be frozen and can shatter, and ground hit will be iced over and slippery - \ + though they may thaw shortly if used in room temperature." + + + action_icon_state = "icebeam" + + is_a_heretic_spell = TRUE + clothes_req = FALSE + base_cooldown = 30 SECONDS + + invocation = "FR'ZE!" + invocation_type = INVOCATION_SHOUT + spell_requirements = SPELL_REQUIRES_NO_ANTIMAGIC + + //In room temperature, the ice won't last very long + //...but in space / freezing rooms, it will stick around + turf_freeze_type = TURF_WET_ICE + unfreeze_turf_duration = 1 MINUTES + // Applies an "infinite" version of basic void chill + // (This stacks with mansus grasp's void chill) + frozen_status_effect_path = /datum/status_effect/void_chill/lasting + unfreeze_mob_duration = 30 SECONDS + // Does a smidge of damage + on_freeze_brute_damage = 12 + on_freeze_burn_damage = 10 + // Also freezes stuff (Which will likely be unfrozen similarly to turfs) + unfreeze_object_duration = 30 SECONDS + +/datum/spell/cone/staggered/cone_of_cold/void/do_mob_cone_effect(mob/living/target_mob, atom/caster, level) + if(IS_HERETIC_OR_MONSTER(target_mob)) + return + + return ..() diff --git a/code/modules/antagonists/heretic/magic/void_conduit.dm b/code/modules/antagonists/heretic/magic/void_conduit.dm new file mode 100644 index 000000000000..9598909c05d9 --- /dev/null +++ b/code/modules/antagonists/heretic/magic/void_conduit.dm @@ -0,0 +1,168 @@ +/datum/spell/aoe/conjure/void_conduit + name = "Void Conduit" + desc = "Opens a gate to the Void; it releases an intermittent pulse that damages windows and airlocks, \ + while afflicting Heathens with void chill. \ + Affected Heretics instead receive low pressure resistance." + + + action_background_icon = 'icons/mob/actions/actions_ecult.dmi' + action_background_icon_state = "bg_heretic" + action_icon_state = "void_rift" + action_icon = 'icons/mob/actions/actions_ecult.dmi' + + base_cooldown = 2 MINUTES + + sound = null + is_a_heretic_spell = TRUE + clothes_req = FALSE + invocation = "MBR'C' TH' V''D!" + invocation_type = INVOCATION_SHOUT + spell_requirements = SPELL_REQUIRES_NO_ANTIMAGIC + aoe_range = 0 + + summon_type = list(/obj/structure/void_conduit) + +/obj/structure/void_conduit + name = "Void Conduit" + desc = "An open gate which leads to nothingness. Releases pulses which you do not want to get hit by." + icon = 'icons/effects/effects.dmi' + icon_state = "void_conduit" + anchored = TRUE + density = TRUE + obj_integrity = 150 + ///Overlay to apply to the tiles in range of the conduit + /// List of possible overlays to apply to the tiles in range of the conduit + var/static/list/overlay_list = list() + ///List of tiles that we added an overlay to, so we can clear them when the conduit is deleted + var/list/overlayed_turfs = list() + ///How many tiles far our effect is + var/effect_range = 8 + ///id of the deletion timer + var/timerid + ///Audio loop for the rift being alive + var/datum/looping_sound/void_conduit/soundloop + +/obj/structure/void_conduit/Initialize(mapload) + . = ..() + soundloop = new(src, start_immediately = TRUE) + timerid = QDEL_IN(src, 1 MINUTES) + START_PROCESSING(SSobj, src) + if(!length(overlay_list)) + overlay_list += image(icon = 'icons/turf/overlays.dmi', icon_state = "voidtile_1") + overlay_list += image(icon = 'icons/turf/overlays.dmi', icon_state = "voidtile_2") + overlay_list += image(icon = 'icons/turf/overlays.dmi', icon_state = "voidtile_3") + build_view_turfs() + +/obj/structure/void_conduit/proc/build_view_turfs() + for(var/turf/affected_turf as anything in overlayed_turfs) + affected_turf.cut_overlay(overlay_list) + + for(var/turf/affected_turf as anything in view(effect_range, src)) + if(!isfloorturf(affected_turf)) + continue + var/image/void_overlay = pick(overlay_list) + void_overlay.mouse_opacity = MOUSE_OPACITY_TRANSPARENT + void_overlay.alpha = 180 + + affected_turf.add_overlay(void_overlay) + overlayed_turfs += affected_turf + +/obj/structure/void_conduit/Destroy(force) + QDEL_NULL(soundloop) + deltimer(timerid) + STOP_PROCESSING(SSobj, src) + for(var/turf/affected_turf as anything in overlayed_turfs) // If the portal is moved, the overlays don't stick around + affected_turf.cut_overlay(overlay_list) + var/turf/extra_overlay = get_turf(src) + extra_overlay.cut_overlay(overlay_list) + return ..() + +/obj/structure/void_conduit/process(seconds_per_tick) + build_view_turfs() + do_conduit_pulse() + +///Sends out a pulse +/obj/structure/void_conduit/proc/do_conduit_pulse() + var/list/turfs_to_affect = list() + for(var/turf/affected_turf as anything in view(effect_range, loc)) + var/distance = get_dist(loc, affected_turf) + if(!turfs_to_affect["[distance]"]) + turfs_to_affect["[distance]"] = list() + turfs_to_affect["[distance]"] += affected_turf + + for(var/distance in 0 to effect_range) + if(!turfs_to_affect["[distance]"]) + continue + addtimer(CALLBACK(src, PROC_REF(handle_effects), turfs_to_affect["[distance]"]), (1 SECONDS) * distance) + + new /obj/effect/temp_visual/circle_wave/void_conduit(get_turf(src)) + +///Applies the effects of the pulse "hitting" something. Freezes non-heretic, destroys airlocks/windows +/obj/structure/void_conduit/proc/handle_effects(list/turfs) + for(var/turf/affected_turf as anything in turfs) + for(var/atom/thing_to_affect as anything in affected_turf.contents) + + if(isliving(thing_to_affect)) + var/mob/living/affected_mob = thing_to_affect + if(affected_mob.can_block_magic(MAGIC_RESISTANCE)) + continue + if(IS_HERETIC_OR_MONSTER(affected_mob) || HAS_TRAIT(affected_mob, TRAIT_MANSUS_TOUCHED)) + affected_mob.apply_status_effect(/datum/status_effect/void_conduit) + else + affected_mob.apply_status_effect(/datum/status_effect/void_chill, 1) + + if(istype(thing_to_affect, /obj/machinery/door)) + var/obj/machinery/door/affected_door = thing_to_affect + affected_door.disable_door_sparks() + affected_door.take_damage(rand(15, 30)) + + if(istype(thing_to_affect, /obj/structure/window) || istype(thing_to_affect, /obj/structure/grille) || istype(thing_to_affect, /obj/structure/door_assembly) || istype(thing_in_range, /obj/structure/firelock_frame)) + var/obj/structure/affected_structure = thing_to_affect + affected_structure.take_damage(rand(10, 20)) + +/datum/looping_sound/void_conduit + mid_sounds = 'sound/ambience/ambiatm1.ogg' + mid_length = 1 SECONDS + extra_range = 10 + volume = 40 + falloff_distance = 5 + falloff_exponent = 20 + +/datum/status_effect/void_conduit + id = "void_conduit" + duration = 15 SECONDS + status_type = STATUS_EFFECT_REPLACE + alert_type = null + +/datum/status_effect/void_conduit/on_apply() + ADD_TRAIT(owner, TRAIT_RESISTLOWPRESSURE, type) + return TRUE + +/datum/status_effect/void_conduit/on_remove() + REMOVE_TRAIT(owner, TRAIT_RESISTLOWPRESSURE, type) + + +/// Visual effect from tg's bioscrambler anomaly +/obj/effect/temp_visual/circle_wave + icon = 'icons/effects/64x64.dmi' + icon_state = "circle_wave" + pixel_x = -16 + pixel_y = -16 + duration = 0.5 SECONDS + color = COLOR_LIME + var/max_alpha = 255 + ///How far the effect would scale in size + var/amount_to_scale = 2 + +/obj/effect/temp_visual/circle_wave/Initialize(mapload) + transform = matrix().Scale(0.1) + animate(src, transform = matrix().Scale(amount_to_scale), time = duration, flags = ANIMATION_PARALLEL) + animate(src, alpha = max_alpha, time = duration * 0.6, flags = ANIMATION_PARALLEL) + animate(alpha = 0, time = duration * 0.4) + apply_wibbly_filters(src) + return ..() + +/obj/effect/temp_visual/circle_wave/void_conduit + color = COLOR_FULL_TONER_BLACK + duration = 12 SECONDS + amount_to_scale = 12 diff --git a/code/modules/antagonists/heretic/magic/void_phase.dm b/code/modules/antagonists/heretic/magic/void_phase.dm new file mode 100644 index 000000000000..843ef93f962a --- /dev/null +++ b/code/modules/antagonists/heretic/magic/void_phase.dm @@ -0,0 +1,74 @@ +/datum/spell/pointed/void_phase + name = "Void Phase" + desc = "Lets you blink to your pointed destination, causes 3x3 aoe damage bubble \ + around your pointed destination and your current location. \ + It has a minimum range of 3 tiles and a maximum range of 9 tiles." + + + action_background_icon = 'icons/mob/actions/actions_ecult.dmi' + action_background_icon_state = "bg_heretic" + action_icon_state = "voidblink" + ranged_mousepointer = 'icons/effects/mouse_pointers/throw_target.dmi' + action_icon = 'icons/mob/actions/actions_ecult.dmi' + + is_a_heretic_spell = TRUE + clothes_req = FALSE + base_cooldown = 25 SECONDS + + invocation = "RE'L'TY PH'S'E." + invocation_type = INVOCATION_WHISPER + spell_requirements = SPELL_REQUIRES_NO_ANTIMAGIC + + cast_range = 9 + /// The minimum range to cast the phase. + var/min_cast_range = 3 + /// The radius of damage around the void bubble + var/damage_radius = 1 + + +/datum/spell/pointed/void_phase/valid_target(target, user) + if(get_dist(target, user) < 3) + var/mob/living/living_owner = user + to_chat(living_owner, "That is too close to teleport to!") + return FALSE + return TRUE + + +/datum/spell/pointed/void_phase/cast(list/targets, mob/user) + . = ..() + var/turf/source_turf = get_turf(user) + var/cast_on = targets[1] + var/turf/targeted_turf = get_turf(cast_on) + + cause_aoe(source_turf, /obj/effect/temp_visual/voidin, user) + cause_aoe(targeted_turf, /obj/effect/temp_visual/voidout, user) + + user.forceMove(targeted_turf) + +/// Does the AOE effect of the blinka t the passed turf +/datum/spell/pointed/void_phase/proc/cause_aoe(turf/target_turf, effect_type = /obj/effect/temp_visual/voidin, mob/user) + new effect_type(target_turf) + playsound(target_turf, 'sound/magic/voidblink.ogg', 60, FALSE) + for(var/mob/living/living_mob in range(damage_radius, target_turf)) + if(IS_HERETIC_OR_MONSTER(living_mob) || living_mob == user) + continue + if(living_mob.can_block_magic(antimagic_flags)) + continue + living_mob.apply_damage(20, BRUTE) + living_mob.apply_status_effect(/datum/status_effect/void_chill, 1) + +/obj/effect/temp_visual/voidin + icon = 'icons/effects/96x96.dmi' + icon_state = "void_blink_in" + alpha = 150 + duration = 6 + pixel_x = -32 + pixel_y = -32 + +/obj/effect/temp_visual/voidout + icon = 'icons/effects/96x96.dmi' + icon_state = "void_blink_out" + alpha = 150 + duration = 6 + pixel_x = -32 + pixel_y = -32 diff --git a/code/modules/antagonists/heretic/magic/void_prison.dm b/code/modules/antagonists/heretic/magic/void_prison.dm new file mode 100644 index 000000000000..c5beadd6bc4d --- /dev/null +++ b/code/modules/antagonists/heretic/magic/void_prison.dm @@ -0,0 +1,101 @@ +/datum/spell/pointed/void_prison + name = "Void Prison" + desc = "Sends a heathen into the void for 10 seconds. \ + They will be unable to perform any actions for the duration. \ + Afterwards, they will be chilled and returned to the mortal plane." + + + action_background_icon = 'icons/mob/actions/actions_ecult.dmi' + action_background_icon_state = "bg_heretic" + action_icon_state = "voidball" + ranged_mousepointer = 'icons/effects/mouse_pointers/throw_target.dmi' + sound = 'sound/magic/voidblink.ogg' + action_icon = 'icons/mob/actions/actions_ecult.dmi' + + base_cooldown = 1 MINUTES + cast_range = 3 + + sound = null + is_a_heretic_spell = TRUE + clothes_req = FALSE + invocation = "V''D PR'S'N!" + invocation_type = INVOCATION_SHOUT + spell_requirements = SPELL_REQUIRES_NO_ANTIMAGIC + +/datum/spell/pointed/void_prison/valid_target(target, user) + if(!ismob(target)) + return FALSE + return TRUE + +/datum/spell/pointed/void_prison/cast(list/targets, mob/user) + . = ..() + var/mob/living/carbon/human/cast_on = targets[1] + if(cast_on.can_block_magic(antimagic_flags)) + cast_on.visible_message( + "A swirling, cold void wraps around [cast_on], but they burst free in a wave of heat!", + "A yawning void begins to open before you, but a great wave of heat bursts it apart! You are protected!!" + ) + return + cast_on.apply_status_effect(/datum/status_effect/void_prison, "void_stasis") + +/datum/status_effect/void_prison + id = "void_prison" + duration = 10 SECONDS + alert_type = /atom/movable/screen/alert/status_effect/void_prison + ///The overlay that gets applied to whoever has this status active + var/obj/effect/abstract/voidball/stasis_overlay + +/datum/status_effect/void_prison/on_creation(mob/living/new_owner, set_duration) + . = ..() + stasis_overlay = new /obj/effect/abstract/voidball(new_owner) + RegisterSignal(stasis_overlay, COMSIG_PARENT_QDELETING, PROC_REF(clear_overlay)) + new_owner.vis_contents += stasis_overlay + stasis_overlay.animate_opening() + addtimer(CALLBACK(src, PROC_REF(enter_prison), new_owner), 1 SECONDS) + +/datum/status_effect/void_prison/on_remove() + if(!IS_HERETIC(owner)) + owner.apply_status_effect(/datum/status_effect/void_chill, 3) + if(stasis_overlay) + //Free our prisoner + owner.forceMove(get_turf(stasis_overlay)) + stasis_overlay.forceMove(owner) + owner.vis_contents += stasis_overlay + //Animate closing the ball + stasis_overlay.animate_closing() + stasis_overlay.icon_state = "voidball_closed" + QDEL_IN(stasis_overlay, 1.1 SECONDS) + stasis_overlay = null + return ..() + +///Freezes our prisoner in place +/datum/status_effect/void_prison/proc/enter_prison(mob/living/prisoner) + stasis_overlay.forceMove(prisoner.loc) + prisoner.forceMove(stasis_overlay) + +///Makes sure to clear the ref in case the voidball ever suddenly disappears +/datum/status_effect/void_prison/proc/clear_overlay() + SIGNAL_HANDLER + stasis_overlay = null + +//----Voidball effect +/obj/effect/abstract/voidball + icon = 'icons/mob/actions/actions_ecult.dmi' + icon_state = "voidball_effect" + layer = ABOVE_ALL_MOB_LAYER + vis_flags = VIS_INHERIT_ID + +///Plays a opening animation +/obj/effect/abstract/voidball/proc/animate_opening() + flick("voidball_opening", src) + +///Plays a closing animation +/obj/effect/abstract/voidball/proc/animate_closing() + flick("voidball_closing", src) + +//---- Screen alert +/atom/movable/screen/alert/status_effect/void_prison + name = "Void Prison" + desc = "A Yawning void encases your mortal coil." //Go straight to jail, do not pass GO, do not collect 200$ + icon = 'icons/mob/actions/actions_ecult.dmi' + icon_state = "voidball_effect" diff --git a/code/modules/antagonists/heretic/magic/void_pull.dm b/code/modules/antagonists/heretic/magic/void_pull.dm new file mode 100644 index 000000000000..0325f1cd32b5 --- /dev/null +++ b/code/modules/antagonists/heretic/magic/void_pull.dm @@ -0,0 +1,65 @@ +/datum/spell/aoe/void_pull + name = "Void Pull" + desc = "Calls the void, damaging, knocking down, and stunning people nearby. \ + Distant foes are also pulled closer to you (but not damaged)." + + + action_background_icon = 'icons/mob/actions/actions_ecult.dmi' + action_background_icon_state = "bg_heretic" + action_icon_state = "voidpull" + action_icon = 'icons/mob/actions/actions_ecult.dmi' + sound = 'sound/magic/voidblink.ogg' + + is_a_heretic_spell = TRUE + clothes_req = FALSE + base_cooldown = 30 SECONDS + + invocation = "BR'NG F'RTH TH'M T' M'." + invocation_type = INVOCATION_WHISPER + spell_requirements = SPELL_REQUIRES_NO_ANTIMAGIC + + aoe_range = 7 + /// The radius of the actual damage circle done before cast + var/damage_radius = 1 + /// The radius of the stun applied to nearby people on cast + var/stun_radius = 4 + +/datum/spell/aoe/void_pull/create_new_targeting() + var/datum/spell_targeting/aoe/targeting = new() + targeting.range = aoe_range + return targeting + +// Before the cast, we do some small AOE damage around the caster +/datum/spell/aoe/void_pull/cast(list/targets, mob/user) + . = ..() + new /obj/effect/temp_visual/voidin(get_turf(user)) + + // Before we cast the actual effects, deal AOE damage to anyone adjacent to us + for(var/mob/living/nearby_living as anything in get_things_to_cast_on(user, damage_radius)) + nearby_living.apply_damage(30, BRUTE) + nearby_living.apply_status_effect(/datum/status_effect/void_chill, 1) + + // Otherwise, they take a few steps closer + for(var/mob/living/living_target in targets) + if(get_dist(living_target, user) < stun_radius) + living_target.KnockDown(3 SECONDS) + for(var/i in 1 to 3) + living_target.forceMove(get_step_towards(living_target, user)) + return TRUE + +/datum/spell/aoe/void_pull/proc/get_things_to_cast_on(atom/center, radius_override = 1) + var/list/things = list() + for(var/mob/living/nearby_mob in view(radius_override || aoe_range, center)) + if(nearby_mob == center) + continue + // Don't grab people who are tucked away or something + if(!isturf(nearby_mob.loc)) + continue + if(IS_HERETIC_OR_MONSTER(nearby_mob)) + continue + if(nearby_mob.can_block_magic(antimagic_flags)) + continue + + things += nearby_mob + + return things diff --git a/code/modules/antagonists/heretic/magic/wave_of_desperation.dm b/code/modules/antagonists/heretic/magic/wave_of_desperation.dm new file mode 100644 index 000000000000..22a3cf797446 --- /dev/null +++ b/code/modules/antagonists/heretic/magic/wave_of_desperation.dm @@ -0,0 +1,82 @@ +/datum/spell/aoe/wave_of_desperation + name = "Wave Of Desperation" + desc = "Removes your restraints, repels and knocks down adjacent people, and applies certain effects of the Mansus Grasp upon everything nearby. \ + Cannot be cast unless you are restrained, and the stress renders you unconscious 12 seconds later!" + + + action_background_icon = 'icons/mob/actions/actions_ecult.dmi' + action_background_icon_state = "bg_heretic" + action_icon_state = "uncuff" + action_icon = 'icons/mob/actions/actions_ecult.dmi' + sound = 'sound/magic/swap.ogg' + + is_a_heretic_spell = TRUE + clothes_req = FALSE + base_cooldown = 5 MINUTES + + invocation = "F'K 'FF." + invocation_type = INVOCATION_WHISPER + spell_requirements = SPELL_REQUIRES_NO_ANTIMAGIC + + aoe_range = 3 + +/datum/spell/aoe/wave_of_desperation/create_new_targeting() + var/datum/spell_targeting/aoe/targeting = new() + targeting.range = aoe_range + return targeting + + +// Before the cast, we do some small AOE damage around the caster +/datum/spell/aoe/wave_of_desperation/valid_target(target, user) + if(!ishuman(user)) + return FALSE + var/mob/living/carbon/human/human_user = user + if(!(human_user.handcuffed || human_user.legcuffed)) + return FALSE + return TRUE + +/datum/spell/aoe/wave_of_desperation/cast(list/targets, mob/user) + var/mob/living/carbon/human/human_user = user + if(human_user.handcuffed) + human_user.visible_message("[human_user.handcuffed] on [human_user] shatter!") + QDEL_NULL(human_user.handcuffed) + if(human_user.legcuffed) + user.visible_message("[human_user.legcuffed] on [human_user] shatters!") + QDEL_NULL(human_user.legcuffed) + + human_user.apply_status_effect(/datum/status_effect/heretic_lastresort) + new /obj/effect/temp_visual/knockblast(get_turf(human_user)) + + for(var/mob/living/victim in get_things_to_cast_on(human_user)) + victim.KnockDown(3 SECONDS) + victim.AdjustWeakened(0.5 SECONDS) + var/our_turf = get_turf(user) + var/throwtarget = get_edge_target_turf(our_turf, get_dir(our_turf, get_step_away(victim, our_turf))) + victim.throw_at(throwtarget, 3, 1) + SEND_SIGNAL(user, COMSIG_HERETIC_MANSUS_GRASP_ATTACK, victim) + +/datum/spell/aoe/wave_of_desperation/proc/get_things_to_cast_on(atom/center, radius_override) + . = list() + for(var/atom/nearby in orange(center, radius_override ? radius_override : aoe_range)) + if(nearby == center) + continue + if(!ismob(nearby)) + SEND_SIGNAL(center, COMSIG_HERETIC_MANSUS_GRASP_ATTACK_SECONDARY, nearby) + continue + var/mob/living/nearby_mob = nearby + if(!isturf(nearby_mob.loc)) + continue + if(IS_HERETIC_OR_MONSTER(nearby_mob)) + continue + if(nearby_mob.can_block_magic(antimagic_flags)) + continue + + . += nearby_mob + + + +/obj/effect/temp_visual/knockblast + icon = 'icons/effects/effects.dmi' + icon_state = "shield-flash" + alpha = 180 + duration = 1 SECONDS diff --git a/code/modules/antagonists/heretic/soultrapped_heretic.dm b/code/modules/antagonists/heretic/soultrapped_heretic.dm new file mode 100644 index 000000000000..ae4d5f5f17d6 --- /dev/null +++ b/code/modules/antagonists/heretic/soultrapped_heretic.dm @@ -0,0 +1,32 @@ +///a heretic that got soultrapped by cultists. does nothing, other than signify they suck +/datum/antagonist/soultrapped_heretic + name = "\improper Soultrapped Heretic" + roundend_category = "Heretics" + job_rank = ROLE_HERETIC + antag_hud_name = "heretic" + + +// always failure obj +/datum/objective/heretic_trapped + +/datum/objective/heretic_trapped/New(text, datum/team/team_to_join, datum/mind/_owner) + name = "soultrapped failure" + explanation_text = "Help the cult. Kill the cult. Help the crew. Kill the crew. Help your wielder. Kill your wielder. Kill everyone. Rattle your chains. Break your bindings." + ..() + +/datum/antagonist/soultrapped_heretic/on_gain() + ..() + addtimer(CALLBACK(src, PROC_REF(do_objective)), 2 SECONDS) + +/datum/antagonist/soultrapped_heretic/proc/do_objective() + var/datum/objective/epic_fail = new /datum/objective/heretic_trapped() + epic_fail.completed = FALSE + epic_fail.needs_target = FALSE + add_antag_objective(epic_fail) + + +/datum/antagonist/soultrapped_heretic/greet() + var/list/messages = list() + messages.Add("You are the trapped soul of the Heretic you once were. You may attempt to convince your wielders to unbind you, granting you some degree of freedom, and them access to some of your powers. \ + You were enslaved by the cult, but are not a member of it, and retain what remains of your free will. Besides this, there is little to be done but commentary. Try not to get trapped in a locker.") + return messages diff --git a/code/modules/antagonists/heretic/status_effects/ghoul.dm b/code/modules/antagonists/heretic/status_effects/ghoul.dm new file mode 100644 index 000000000000..4d2ccc0b16dc --- /dev/null +++ b/code/modules/antagonists/heretic/status_effects/ghoul.dm @@ -0,0 +1,99 @@ +/datum/status_effect/ghoul + id = "ghoul" + status_type = STATUS_EFFECT_UNIQUE + alert_type = /atom/movable/screen/alert/status_effect/ghoul + /// The new max health value set for the ghoul, if supplied + var/new_max_health + /// What, if any, stamina modifier we applied to the ghoul mob + var/stamina_mod_applied + /// Reference to the master of the ghoul's mind + var/datum/mind/master_mind + /// An optional callback invoked when a ghoul is made (on_apply) + var/datum/callback/on_made_callback + /// An optional callback invoked when a goul is unghouled (on_removed) + var/datum/callback/on_lost_callback + +/datum/status_effect/ghoul/Destroy() + master_mind = null + on_made_callback = null + on_lost_callback = null + return ..() + +/datum/status_effect/ghoul/on_creation( + mob/living/new_owner, + new_max_health, + datum/mind/master_mind, + datum/callback/on_made_callback, + datum/callback/on_lost_callback, +) + + src.new_max_health = new_max_health + src.master_mind = master_mind + src.on_made_callback = on_made_callback + src.on_lost_callback = on_lost_callback + + . = ..() + +/datum/status_effect/ghoul/on_apply() + if(!ishuman(owner)) + return FALSE + + var/mob/living/carbon/human/human_target = owner + + RegisterSignal(human_target, COMSIG_MOB_DEATH, PROC_REF(remove_ghoul_status)) + human_target.revive() // Have to do an admin heal here, otherwise they'll likely just die due to missing organs or limbs + + if(new_max_health) + if(new_max_health < human_target.maxHealth) + stamina_mod_applied = (new_max_health / human_target.maxHealth) + human_target.physiology.stamina_mod *= stamina_mod_applied + human_target.setMaxHealth(new_max_health) + human_target.health = new_max_health + + on_made_callback?.Invoke(human_target) + ADD_TRAIT(human_target, TRAIT_FAKEDEATH, UID(src)) + human_target.become_husk(MAGIC_TRAIT) + human_target.faction |= "heretic" + + if(human_target.mind) + var/datum/antagonist/heretic_monster/heretic_monster = human_target.mind.add_antag_datum(/datum/antagonist/heretic_monster) + heretic_monster.set_owner(master_mind) + human_target.mind.remove_antag_datum(/datum/antagonist/cultist) + return TRUE + +/datum/status_effect/ghoul/on_creation(mob/living/new_owner, new_max_health, datum/mind/master_mind, datum/callback/on_made_callback, datum/callback/on_lost_callback) + . = ..() + if(master_mind) + linked_alert.desc += " You are an eldritch monster reanimated to serve its master, [master_mind]." + +/datum/status_effect/ghoul/on_remove() + remove_ghoul_status() + return ..() + +/// Removes the ghoul effects from our owner and returns them to normal. +/datum/status_effect/ghoul/proc/remove_ghoul_status(datum/source) + SIGNAL_HANDLER + + if(!ishuman(owner)) + return + var/mob/living/carbon/human/human_target = owner + + if(new_max_health) + if(isnum(stamina_mod_applied)) + human_target.physiology.stamina_mod /= stamina_mod_applied + human_target.setMaxHealth(initial(human_target.maxHealth)) + + on_lost_callback?.Invoke(human_target) + REMOVE_TRAIT(human_target, TRAIT_FAKEDEATH, UID(src)) + human_target.cure_husk(MAGIC_TRAIT) + human_target.faction -= "heretic" + human_target.mind?.remove_antag_datum(/datum/antagonist/heretic_monster) + + UnregisterSignal(human_target, COMSIG_MOB_DEATH) + if(!QDELETED(src)) + qdel(src) + +/atom/movable/screen/alert/status_effect/ghoul + name = "Flesh Servant" + desc = "You are a Ghoul!" + icon_state = "mind_control" diff --git a/code/modules/antagonists/heretic/status_effects/heretic_buffs.dm b/code/modules/antagonists/heretic/status_effects/heretic_buffs.dm new file mode 100644 index 000000000000..8164a6abe294 --- /dev/null +++ b/code/modules/antagonists/heretic/status_effects/heretic_buffs.dm @@ -0,0 +1,286 @@ +// POTIONS + +// DUSK AND DAWN +/datum/status_effect/duskndawn + id = "Blessing of Dusk and Dawn" + status_type = STATUS_EFFECT_REFRESH + duration = 90 SECONDS + show_duration = TRUE + alert_type = /atom/movable/screen/alert/status_effect/duskndawn + +/datum/status_effect/duskndawn/on_apply() + ADD_TRAIT(owner, TRAIT_XRAY_VISION, id) + owner.update_sight() + return TRUE + +/datum/status_effect/duskndawn/on_remove() + REMOVE_TRAIT(owner, TRAIT_XRAY_VISION, id) + owner.update_sight() + +// WOUNDED SOLDIER +/datum/status_effect/marshal + id = "Blessing of Wounded Soldier" + status_type = STATUS_EFFECT_REFRESH + duration = 60 SECONDS + tick_interval = 1 SECONDS + show_duration = TRUE + alert_type = /atom/movable/screen/alert/status_effect/marshal + +/datum/status_effect/marshal/on_apply() + ADD_TRAIT(owner, TRAIT_IGNOREDAMAGESLOWDOWN, id) + return TRUE + +/datum/status_effect/marshal/on_remove() + REMOVE_TRAIT(owner, TRAIT_IGNOREDAMAGESLOWDOWN, id) + if(!iscarbon(owner)) + return + var/mob/living/carbon/human/drinker = owner + for(var/obj/item/organ/external/E in drinker.bodyparts) + E.fix_internal_bleeding() + E.fix_burn_wound() + E.mend_fracture() + //to_chat(drinker, "The mansus has given you new limbs.") qwertodo new limbs later + playsound(drinker, 'sound/effects/ahaha.ogg', 50, TRUE, -1, extrarange = SILENCED_SOUND_EXTRARANGE, frequency = 0.5) + +/datum/status_effect/marshal/tick() + if(!iscarbon(owner)) + return + var/mob/living/carbon/human/carbie = owner + + carbie.adjustBruteLoss(-0.5,updating_health = FALSE, robotic = TRUE) + carbie.adjustFireLoss(-0.5, updating_health = FALSE, robotic = TRUE) + for(var/obj/item/organ/external/E in carbie.bodyparts) + if(E.status & ORGAN_BROKEN | ORGAN_BURNT | ORGAN_INT_BLEEDING) + carbie.adjustBruteLoss(-0.5,updating_health = FALSE, robotic = TRUE) + carbie.adjustFireLoss(-0.5, updating_health = FALSE, robotic = TRUE) + carbie.updatehealth("marshal status effect") + + +/atom/movable/screen/alert/status_effect/duskndawn + name = "Blessing of Dusk and Dawn" + desc = "Many things hide beyond the horizon. With Owl's help I managed to slip past Sun's guard and Moon's watch." + icon_state = "duskndawn" + +/atom/movable/screen/alert/status_effect/marshal + name = "Blessing of Wounded Soldier" + desc = "Some people seek power through redemption. One thing many people don't know is that battle \ + is the ultimate redemption, and wounds let you bask in eternal glory." + icon_state = "wounded_soldier" + +// BLADES + +/// Summons multiple foating knives around the owner. +/// Each knife will block an attack straight up. +/datum/status_effect/protective_blades + id = "Silver Knives" + alert_type = null + status_type = STATUS_EFFECT_MULTIPLE + tick_interval = 0 + /// The number of blades we summon up to. + var/max_num_blades = 4 + /// The radius of the blade's orbit. + var/blade_orbit_radius = 20 + /// The time between spawning blades. + var/time_between_initial_blades = 0.25 SECONDS + /// If TRUE, we self-delete our status effect after all the blades are deleted. + var/delete_on_blades_gone = TRUE + /// What blade type to create + var/obj/effect/floating_blade/blade_type + /// A list of blade effects orbiting / protecting our owner + var/list/obj/effect/floating_blade/blades = list() + +/datum/status_effect/protective_blades/on_creation( + mob/living/new_owner, + new_duration = -1, + max_num_blades = 4, + blade_orbit_radius = 20, + time_between_initial_blades = 0.25 SECONDS, + blade_type = /obj/effect/floating_blade, +) + + src.duration = new_duration + src.max_num_blades = max_num_blades + src.blade_orbit_radius = blade_orbit_radius + src.time_between_initial_blades = time_between_initial_blades + src.blade_type = blade_type + return ..() + +/datum/status_effect/protective_blades/on_apply() + RegisterSignal(owner, COMSIG_HUMAN_CHECK_SHIELDS, PROC_REF(on_shield_reaction)) + for(var/blade_num in 1 to max_num_blades) + var/time_until_created = (blade_num - 1) * time_between_initial_blades + if(time_until_created <= 0) + create_blade() + else + addtimer(CALLBACK(src, PROC_REF(create_blade)), time_until_created) + + return TRUE + +/datum/status_effect/protective_blades/on_remove() + UnregisterSignal(owner, COMSIG_HUMAN_CHECK_SHIELDS) + QDEL_LIST_CONTENTS(blades) + + return ..() + +/// Creates a floating blade, adds it to our blade list, and makes it orbit our owner. +/datum/status_effect/protective_blades/proc/create_blade() + if(QDELETED(src) || QDELETED(owner)) + return + + var/obj/effect/floating_blade/blade = new blade_type(get_turf(owner)) + blades += blade + blade.orbit(owner, blade_orbit_radius) + RegisterSignal(blade, COMSIG_PARENT_QDELETING, PROC_REF(remove_blade)) + playsound(get_turf(owner), 'sound/items/unsheath.ogg', 33, TRUE) + +/// Signal proc for [COMSIG_LIVING_CHECK_BLOCK]. +/// If we have a blade in our list, consume it and block the incoming attack (shield it) +/datum/status_effect/protective_blades/proc/on_shield_reaction( + mob/living/carbon/human/source, + atom/movable/hitby, + attack_text = "the attack", + final_block_chance = 0, + damage = 0, + attack_type = MELEE_ATTACK, + damage_type = BRUTE +) + SIGNAL_HANDLER + + if(!length(blades)) + return + + if(HAS_TRAIT(source, TRAIT_BEING_BLADE_SHIELDED)) + return SHIELD_BLOCK + + ADD_TRAIT(source, TRAIT_BEING_BLADE_SHIELDED, type) + + var/obj/effect/floating_blade/to_remove = blades[1] + + playsound(get_turf(source), 'sound/weapons/parry.ogg', 100, TRUE) + source.visible_message( + "[to_remove] orbiting [source] snaps in front of [attack_text], blocking it before vanishing!", + "[to_remove] orbiting you snaps in front of [attack_text], blocking it before vanishing!", + "You hear a clink.", + ) + + qdel(to_remove) + + addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(callback_remove_trait), source, TRAIT_BEING_BLADE_SHIELDED, type), 0.1 SECONDS) + + return SHIELD_BLOCK + +/// Remove deleted blades from our blades list properly. +/datum/status_effect/protective_blades/proc/remove_blade(obj/effect/floating_blade/to_remove) + SIGNAL_HANDLER + + if(!(to_remove in blades)) + CRASH("[type] called remove_blade() with a blade that was not in its blades list.") + + to_remove.stop_orbit(owner.get_orbiters()) + blades -= to_remove + + if(!length(blades) && !QDELETED(src) && delete_on_blades_gone) + qdel(src) + + return SHIELD_BLOCK + +/// A subtype that doesn't self-delete / disappear when all blades are gone +/// It instead regenerates over time back to the max after blades are consumed +/datum/status_effect/protective_blades/recharging + delete_on_blades_gone = FALSE + /// The amount of time it takes for a blade to recharge + var/blade_recharge_time = 1 MINUTES + +/datum/status_effect/protective_blades/recharging/on_creation( + mob/living/new_owner, + new_duration = -1, + max_num_blades = 4, + blade_orbit_radius = 20, + time_between_initial_blades = 0.25 SECONDS, + blade_type = /obj/item/projectile/magic/floating_blade, + blade_recharge_time = 1 MINUTES, +) + + src.blade_recharge_time = blade_recharge_time + return ..() + +/datum/status_effect/protective_blades/recharging/remove_blade(obj/effect/floating_blade/to_remove) + . = ..() + if(!.) + return + + addtimer(CALLBACK(src, PROC_REF(create_blade)), blade_recharge_time) + + +/datum/status_effect/caretaker_refuge + id = "Caretaker’s Last Refuge" + status_type = STATUS_EFFECT_REFRESH + duration = -1 + alert_type = null + +/datum/status_effect/caretaker_refuge/on_apply() + animate(owner, alpha = 45,time = 0.5 SECONDS) + owner.set_density(FALSE) + owner.status_flags |= GODMODE + RegisterSignal(owner, SIGNAL_REMOVETRAIT(TRAIT_ALLOW_HERETIC_CASTING), PROC_REF(on_focus_lost)) + RegisterSignal(owner, COMSIG_MOB_BEFORE_SPELL_CAST, PROC_REF(prevent_spell_usage)) + RegisterSignal(owner, COMSIG_ATOM_HOLY_ATTACK, PROC_REF(nullrod_handler)) + + ADD_TRAIT(owner, TRAIT_HANDS_BLOCKED, id) + ADD_TRAIT(owner, TRAIT_IGNORESLOWDOWN, id) + return TRUE + +/datum/status_effect/caretaker_refuge/on_remove() + owner.alpha = initial(owner.alpha) + owner.density = initial(owner.density) + owner.status_flags &= ~GODMODE + UnregisterSignal(owner, SIGNAL_REMOVETRAIT(TRAIT_ALLOW_HERETIC_CASTING)) + UnregisterSignal(owner, COMSIG_MOB_BEFORE_SPELL_CAST) + UnregisterSignal(owner, COMSIG_ATOM_HOLY_ATTACK) + REMOVE_TRAIT(owner, TRAIT_HANDS_BLOCKED, id) + REMOVE_TRAIT(owner, TRAIT_IGNORESLOWDOWN, id) + owner.visible_message( + "The haze around [owner] disappears, leaving them materialized!", + "You exit the refuge.", + ) + +/datum/status_effect/caretaker_refuge/proc/nullrod_handler(datum/source, obj/item/weapon) + SIGNAL_HANDLER + playsound(get_turf(owner), 'sound/effects/curse/curse1.ogg', 80, TRUE) + owner.visible_message("[weapon] repels the haze around [owner]!") + owner.remove_status_effect(type) + +/datum/status_effect/caretaker_refuge/proc/on_focus_lost() + SIGNAL_HANDLER + to_chat(owner, "Without a focus, your refuge weakens and dissipates!") + qdel(src) + +/datum/status_effect/caretaker_refuge/proc/prevent_spell_usage(datum/source, datum/spell) + SIGNAL_HANDLER + if(!istype(spell, /datum/spell/caretaker)) + to_chat(owner, "You can not cast a spell in refuge!") + return SPELL_CANCEL_CAST + + +// Path Of Moon status effect which hides the identity of the heretic +/datum/status_effect/moon_grasp_hide + id = "Moon Grasp Hide Identity" + status_type = STATUS_EFFECT_REFRESH + duration = 15 SECONDS + show_duration = TRUE + alert_type = /atom/movable/screen/alert/status_effect/moon_grasp_hide + +/datum/status_effect/moon_grasp_hide/on_apply() + ADD_TRAIT(owner, TRAIT_UNKNOWN, id) + ADD_TRAIT(owner, TRAIT_SILENT_FOOTSTEPS, id) + return ..() + +/datum/status_effect/moon_grasp_hide/on_remove() + REMOVE_TRAIT(owner, TRAIT_UNKNOWN, id) + REMOVE_TRAIT(owner, TRAIT_SILENT_FOOTSTEPS, id) + +/atom/movable/screen/alert/status_effect/moon_grasp_hide + name = "Blessing of The Moon" + desc = "The Moon clouds their vision, as the sun always has yours." + icon_state = "moon_hide" + diff --git a/code/modules/antagonists/heretic/status_effects/heretic_debuffs.dm b/code/modules/antagonists/heretic/status_effects/heretic_debuffs.dm new file mode 100644 index 000000000000..64430662299c --- /dev/null +++ b/code/modules/antagonists/heretic/status_effects/heretic_debuffs.dm @@ -0,0 +1,314 @@ +// AMOK +/datum/status_effect/amok + id = "amok" + status_type = STATUS_EFFECT_REPLACE + alert_type = null + duration = 10 SECONDS + tick_interval = 1 SECONDS + +/datum/status_effect/amok/on_apply(mob/living/afflicted) + to_chat(owner, "You feel filled with a rage that is not your own!") + return TRUE + +/datum/status_effect/amok/tick(seconds_between_ticks) + var/last_intent = owner.a_intent + owner.a_intent = INTENT_HARM + + // If we're holding a gun, expand the range a bit. + // Otherwise, just look for adjacent targets + var/search_radius = isgun(owner.get_active_hand()) ? 3 : 1 + + var/list/mob/living/targets = list() + for(var/mob/living/potential_target in oview(owner, search_radius)) + if(IS_HERETIC_OR_MONSTER(potential_target)) + continue + targets += potential_target + + if(LAZYLEN(targets)) + var/poor_smuck = pick(targets) + add_attack_logs(owner, poor_smuck, "attacked [poor_smuck] due to the amok debuff.", ATKLOG_FEW) + owner.ClickOn(poor_smuck) + owner.a_intent = last_intent + +/datum/status_effect/cloudstruck + id = "cloudstruck" + status_type = STATUS_EFFECT_REPLACE + alert_type = null + duration = 3 SECONDS + on_remove_on_mob_delete = TRUE + ///This overlay is applied to the owner for the duration of the effect. + var/static/mutable_appearance/mob_overlay + +/datum/status_effect/cloudstruck/on_creation(mob/living/new_owner, duration = 10 SECONDS) + src.duration = duration + if(!mob_overlay) + mob_overlay = mutable_appearance('icons/effects/eldritch.dmi', "cloud_swirl", ABOVE_MOB_LAYER) + return ..() + +/datum/status_effect/cloudstruck/on_apply() + owner.add_overlay(mob_overlay) + owner.become_blind(id) + return TRUE + +/datum/status_effect/cloudstruck/on_remove() + owner.cure_blind(id) + owner.cut_overlay(mob_overlay) + +/datum/status_effect/corrosion_curse + id = "corrosion_curse" + status_type = STATUS_EFFECT_REPLACE + alert_type = null + tick_interval = 1 SECONDS + +/datum/status_effect/corrosion_curse/on_apply() + to_chat(owner, "Your body starts to break apart!") + return TRUE + +/datum/status_effect/corrosion_curse/tick(seconds_between_ticks) + . = ..() + if(!ishuman(owner)) + return + var/mob/living/carbon/human/human_owner = owner + var/chance = rand(0, 100) + switch(chance) + if(0 to 10) + human_owner.vomit() + if(20 to 30) + human_owner.Dizzy(10 SECONDS) + human_owner.Jitter(10 SECONDS) + if(30 to 40) + // Don't fully kill liver that's important + message_admins("do something here") + if(40 to 50) + // Don't fully kill heart that's important + //human_owner.adjustOrganLoss("heart", 10, 90) + message_admins("do something here") + if(50 to 60) + // You can fully kill the stomach that's not crucial + //human_owner.adjustOrganLoss(ORGAN_SLOT_STOMACH, 10) + message_admins("do something here") + if(60 to 70) + // Same with eyes + //human_owner.adjustOrganLoss(ORGAN_SLOT_EYES, 5) + message_admins("do something here") + if(70 to 80) + // And same with ears + //human_owner.adjustOrganLoss(ORGAN_SLOT_EARS, 10) + message_admins("do something here") + if(80 to 90) + // But don't fully kill lungs that's usually important + //human_owner.adjustOrganLoss(ORGAN_SLOT_LUNGS, 10, 90) + message_admins("do something here") + if(90 to 95) + // And definitely don't fully kil brains + //human_owner.adjustOrganLoss(ORGAN_SLOT_BRAIN, 20, 190) + message_admins("do something here") + if(95 to 100) + human_owner.Confused(12 SECONDS) + +/datum/status_effect/star_mark + id = "star_mark" + alert_type = /atom/movable/screen/alert/status_effect/star_mark + duration = 30 SECONDS + status_type = STATUS_EFFECT_REPLACE + ///overlay used to indicate that someone is marked + var/mutable_appearance/cosmic_overlay + /// icon file for the overlay + var/effect_icon = 'icons/effects/eldritch.dmi' + /// icon state for the overlay + var/effect_icon_state = "cosmic_ring" + /// Storage for the spell caster + var/spell_caster + +/atom/movable/screen/alert/status_effect/star_mark + name = "Star Mark" + desc = "A ring above your head prevents you from entering cosmic fields or teleporting through cosmic runes..." + icon_state = "star_mark" + +/datum/status_effect/star_mark/on_creation(mob/living/new_owner, mob/living/new_spell_caster) + cosmic_overlay = mutable_appearance(effect_icon, effect_icon_state, BELOW_MOB_LAYER) + if(new_spell_caster) + spell_caster = new_spell_caster.UID() + return ..() + +/datum/status_effect/star_mark/Destroy() + return ..() + +/datum/status_effect/star_mark/on_apply() + //if(istype(owner, /mob/living/basic/heretic_summon/star_gazer)) + // return FALSE + var/mob/living/spell_caster_resolved = locateUID(spell_caster) + var/datum/antagonist/heretic_monster/monster = owner.mind?.has_antag_datum(/datum/antagonist/heretic_monster) + if(spell_caster_resolved && monster) + if(monster.master?.current == spell_caster_resolved) + return FALSE + RegisterSignal(owner, COMSIG_ATOM_UPDATE_OVERLAYS, PROC_REF(update_owner_overlay)) + owner.update_appearance(UPDATE_OVERLAYS) + return TRUE + +/// Updates the overlay of the owner +/datum/status_effect/star_mark/proc/update_owner_overlay(atom/source, list/overlays) + SIGNAL_HANDLER + + source.add_overlay(cosmic_overlay) + +/datum/status_effect/star_mark/on_remove() + UnregisterSignal(owner, COMSIG_ATOM_UPDATE_OVERLAYS) + owner.cut_overlay(cosmic_overlay) + owner.update_appearance(UPDATE_OVERLAYS) + QDEL_NULL(cosmic_overlay) + return ..() + +/datum/status_effect/star_mark/extended + duration = 3 MINUTES + +// Last Resort +/datum/status_effect/heretic_lastresort + id = "heretic_lastresort" + alert_type = /atom/movable/screen/alert/status_effect/heretic_lastresort + duration = 12 SECONDS + status_type = STATUS_EFFECT_REPLACE + tick_interval = 0 + +/atom/movable/screen/alert/status_effect/heretic_lastresort + name = "Last Resort" + desc = "Your head spins, heart pumping as fast as it can, losing the fight with the ground. Run to safety!" + icon_state = "lastresort" + +/datum/status_effect/heretic_lastresort/on_apply() + ADD_TRAIT(owner, TRAIT_IGNORESLOWDOWN, id) + to_chat(owner, "You are on the brink of losing consciousness, run!") + return TRUE + +/datum/status_effect/heretic_lastresort/on_remove() + REMOVE_TRAIT(owner, TRAIT_IGNORESLOWDOWN, id) + owner.Paralyse(20 SECONDS, TRUE) //Stun immunity will not save you, pay the price of magic + + + +/// Used by moon heretics to make people mad +/datum/status_effect/moon_converted + id = "moon converted" + alert_type = /atom/movable/screen/alert/status_effect/moon_converted + status_type = STATUS_EFFECT_REPLACE + ///used to track damage + var/damage_sustained = 0 + ///overlay used to indicate that someone is marked + var/mutable_appearance/moon_insanity_overlay + /// icon file for the overlay + var/effect_icon = 'icons/effects/eldritch.dmi' + /// icon state for the overlay + var/effect_icon_state = "moon_insanity_overlay" + +/atom/movable/screen/alert/status_effect/moon_converted + name = "Moon Converted" + desc = "THEY LIE, THEY ALL LIE!!! SLAY THEM!!! BURN THEM!!! MAKE THEM SEE THE TRUTH!!!" + icon_state = "lastresort" + +/datum/status_effect/moon_converted/on_creation() + moon_insanity_overlay = mutable_appearance(effect_icon, effect_icon_state, ABOVE_MOB_LAYER) + . = ..() + +/datum/status_effect/moon_converted/Destroy() + return ..() + +/datum/status_effect/moon_converted/on_apply() + RegisterSignal(owner, COMSIG_MOB_APPLY_DAMAGE, PROC_REF(on_damaged)) + // Heals them so people who are in crit can have this affect applied on them and still be of some use for the heretic + owner.adjustBruteLoss(-100) + owner.adjustFireLoss(-100) + + to_chat(owner, "THE MOON SHOWS YOU THE TRUTH AND THE LIARS WISH TO COVER IT, SLAY THEM ALL!!!") + owner.Paralyse(7 SECONDS) + ADD_TRAIT(owner, TRAIT_MUTE, src.UID()) + RegisterSignal(owner, COMSIG_ATOM_UPDATE_OVERLAYS, PROC_REF(update_owner_overlay)) + owner.update_appearance(UPDATE_OVERLAYS) + return TRUE + +/datum/status_effect/moon_converted/proc/on_damaged(datum/source, damage, damagetype) + SIGNAL_HANDLER + + // Stamina damage is funky so we will ignore it + if(damagetype == STAMINA) + return + + damage_sustained += damage + + if(damage_sustained < 75) + return + + qdel(src) + +/datum/status_effect/moon_converted/proc/update_owner_overlay(atom/source, list/overlays) + SIGNAL_HANDLER + source.add_overlay(moon_insanity_overlay) + +/datum/status_effect/moon_converted/on_remove() + // Span warning and unconscious so they realize they aren't evil anymore + to_chat(owner, "Your mind is cleared from the effect of the mansus, your alligiences are as they were before") + REMOVE_TRAIT(owner, TRAIT_MUTE, src.UID()) + UnregisterSignal(owner, COMSIG_ATOM_UPDATE_OVERLAYS) + UnregisterSignal(owner, COMSIG_MOB_APPLY_DAMAGE, PROC_REF(on_damaged)) + owner.update_appearance(UPDATE_OVERLAYS) + owner.cut_overlay(moon_insanity_overlay) + QDEL_NULL(moon_insanity_overlay) + return ..() + + +/atom/movable/screen/alert/status_effect/moon_converted + name = "Moon Converted" + desc = "They LIE, SLAY ALL OF THE THEM!!! THE LIARS OF THE SUN MUST FALL!!!" + icon_state = "moon_insanity" + +/mob/living/proc/apply_necropolis_curse(set_curse) + var/datum/status_effect/necropolis_curse/C = has_status_effect(/datum/status_effect/necropolis_curse) + if(QDELETED(C)) + apply_status_effect(/datum/status_effect/necropolis_curse, set_curse) + else + C.duration += 3000 //time added by additional curses + return C + +/datum/status_effect/necropolis_curse + id = "necrocurse" + duration = 10 MINUTES //you're cursed for 10 minutes have fun + tick_interval = 5 SECONDS + alert_type = null + var/curse_flags = NONE + var/effect_last_activation = 0 + var/effect_cooldown = 100 + var/obj/effect/temp_visual/curse/wasting_effect = new + +/datum/status_effect/necropolis_curse/on_creation(mob/living/new_owner, set_curse) + . = ..() + owner.overlay_fullscreen("curse", /atom/movable/screen/fullscreen/stretch/curse, 1) + + +/datum/status_effect/necropolis_curse/on_remove() + owner.clear_fullscreen("curse", 50) + +/datum/status_effect/necropolis_curse/tick(seconds_between_ticks) + if(owner.stat == DEAD) + return + if(effect_last_activation <= world.time) + effect_last_activation = world.time + effect_cooldown + var/grab_dir = turn(owner.dir, pick(-90, 90, 180, 180)) //grab them from a random direction other than the one faced, favoring grabbing from behind + var/turf/spawn_turf = get_ranged_target_turf(owner, grab_dir, 5) + if(spawn_turf) + grasp(spawn_turf) + +/datum/status_effect/necropolis_curse/proc/grasp(turf/spawn_turf) + set waitfor = FALSE + new/obj/effect/temp_visual/dir_setting/curse/grasp_portal(spawn_turf, owner.dir) + playsound(spawn_turf, 'sound/effects/curse/curse2.ogg', 80, TRUE, -1) + var/obj/item/projectile/curse_hand/C = new (spawn_turf) + C.preparePixelProjectile(owner, spawn_turf) + if(QDELETED(C)) // safety check if above fails - above has a stack trace if it does fail + return + C.fire() + +/obj/effect/temp_visual/curse + icon_state = "curse" + +/obj/effect/temp_visual/curse/Initialize(mapload) + . = ..() + deltimer(timerid) diff --git a/code/modules/antagonists/heretic/status_effects/mark_effects.dm b/code/modules/antagonists/heretic/status_effects/mark_effects.dm new file mode 100644 index 000000000000..68ab6ed0fa38 --- /dev/null +++ b/code/modules/antagonists/heretic/status_effects/mark_effects.dm @@ -0,0 +1,271 @@ +/datum/status_effect/eldritch + id = "heretic_mark" + duration = 15 SECONDS + status_type = STATUS_EFFECT_REPLACE + alert_type = null + on_remove_on_mob_delete = TRUE + ///underlay used to indicate that someone is marked + var/mutable_appearance/marked_underlay + /// icon file for the underlay + var/effect_icon = 'icons/effects/eldritch.dmi' + /// icon state for the underlay + var/effect_icon_state = "" + +/datum/status_effect/eldritch/on_creation(mob/living/new_owner, ...) + marked_underlay = mutable_appearance(effect_icon, effect_icon_state, BELOW_MOB_LAYER) + return ..() + +/datum/status_effect/eldritch/Destroy() + return ..() + +/datum/status_effect/eldritch/on_apply() + if(owner.mob_size >= MOB_SIZE_HUMAN) + RegisterSignal(owner, COMSIG_ATOM_UPDATE_OVERLAYS, PROC_REF(update_owner_underlay)) + owner.update_icon(UPDATE_OVERLAYS) + return TRUE + return FALSE + +/datum/status_effect/eldritch/on_remove() + UnregisterSignal(owner, COMSIG_ATOM_UPDATE_OVERLAYS) + owner.cut_overlay(marked_underlay) + owner.update_icon(UPDATE_OVERLAYS) + QDEL_NULL(marked_underlay) + return ..() + +/** + * Signal proc for [COMSIG_ATOM_UPDATE_OVERLAYS]. + * + * Adds the generated mark overlay to the afflicted. + */ +/datum/status_effect/eldritch/proc/update_owner_underlay(atom/source, list/overlays) + SIGNAL_HANDLER + + source.add_overlay(marked_underlay) + +/** + * Called when the mark is activated by the heretic. + */ +/datum/status_effect/eldritch/proc/on_effect() + SHOULD_CALL_PARENT(TRUE) + + playsound(owner, 'sound/magic/repulse.ogg', 75, TRUE) + qdel(src) //what happens when this is procced. + +//Each mark has different effects when it is destroyed that combine with the mansus grasp effect. + +// MARK OF FLESH + +/datum/status_effect/eldritch/flesh + effect_icon_state = "emark1" + +/datum/status_effect/eldritch/flesh/on_effect() + if(ishuman(owner)) + var/mob/living/carbon/human/human_owner = owner + human_owner.bleed(75) + + return ..() + +// MARK OF ASH + +/datum/status_effect/eldritch/ash + effect_icon_state = "emark2" + /// Dictates how much stamina and burn damage the mark will cause on trigger. + var/repetitions = 1 + +/datum/status_effect/eldritch/ash/on_creation(mob/living/new_owner, repetition = 5) + . = ..() + src.repetitions = max(1, repetition) + +/datum/status_effect/eldritch/ash/on_effect() + if(iscarbon(owner)) + var/mob/living/carbon/carbon_owner = owner + carbon_owner.apply_damage(6 * repetitions, STAMINA)// first one = 30 stam + carbon_owner.adjustFireLoss(3 * repetitions) // first one = 15 burn + for(var/mob/living/carbon/victim in shuffle(range(1, carbon_owner))) + if(IS_HERETIC(victim) || victim == carbon_owner) + continue + victim.apply_status_effect(type, repetitions - 1) + break + + return ..() + +// MARK OF RUST + +/datum/status_effect/eldritch/rust + effect_icon_state = "emark3" + +/datum/status_effect/eldritch/rust/on_effect() + owner.adjust_disgust(100 SECONDS) + owner.AdjustConfused(10 SECONDS) + return ..() + +// MARK OF VOID + +/datum/status_effect/eldritch/void + effect_icon_state = "emark4" + +/datum/status_effect/eldritch/void/on_effect() + owner.apply_status_effect(/datum/status_effect/void_chill, 3) + owner.Silence(10 SECONDS) + return ..() + +// MARK OF BLADES + +/datum/status_effect/eldritch/blade + effect_icon_state = "emark5" + /// If set, the owner of the status effect will not be able to leave this area. + var/area/locked_to + +/datum/status_effect/eldritch/blade/Destroy() + locked_to = null + return ..() + +/datum/status_effect/eldritch/blade/on_apply() + . = ..() + RegisterSignal(owner, COMSIG_MOVABLE_TELEPORTING, PROC_REF(on_teleport)) + RegisterSignal(owner, COMSIG_MOVABLE_MOVED, PROC_REF(on_move)) + +/datum/status_effect/eldritch/blade/on_remove() + UnregisterSignal(owner, list( + COMSIG_MOVABLE_TELEPORTING, + COMSIG_MOVABLE_MOVED, + )) + + return ..() + +/// Checks if the movement from moving_from to going_to leaves our [var/locked_to] area. Returns TRUE if so. +/datum/status_effect/eldritch/blade/proc/is_escaping_locked_area(atom/moving_from, atom/going_to) + if(!locked_to) + return FALSE + + // If moving_from isn't in our locked area, it means they've + // somehow completely escaped, so we'll opt not to act on them. + if(get_area(moving_from) != locked_to) + return FALSE + + // If going_to is in our locked area, + // they're just moving within the area like normal. + if(get_area(going_to) == locked_to) + return FALSE + + return TRUE + + +/// Signal proc for [COMSIG_MOVABLE_TELEPORTED] that blocks any teleports from our locked area. +/datum/status_effect/eldritch/blade/proc/on_teleport(mob/living/source, atom/destination, channel) + SIGNAL_HANDLER + + if(!is_escaping_locked_area(source, destination)) + return + + to_chat(source, "An otherworldly force prevents your escape from [get_area_name(locked_to)]!") + + source.Stun(1 SECONDS) + return COMPONENT_BLOCK_TELEPORT + +/// Signal proc for [COMSIG_MOVABLE_MOVED] that blocks any movement out of our locked area +/datum/status_effect/eldritch/blade/proc/on_move(mob/living/source, turf/old_loc, movement_dir, forced) + SIGNAL_HANDLER + + // Let's not mess with heretics dragging a potential victim. + if(ismob(source.pulledby) && IS_HERETIC(source.pulledby)) + return + + // If the movement's forced, just let it happen regardless. + if(forced || !is_escaping_locked_area(old_loc, source)) + return + + to_chat(source, "An otherworldly force prevents your escape from [get_area_name(locked_to)]!") + + var/turf/further_behind_old_loc = get_edge_target_turf(old_loc, REVERSE_DIR(movement_dir)) + + source.Stun(1 SECONDS) + source.throw_at(further_behind_old_loc, 3, 1) // Keeping this gentle so they don't smack into the heretic max speed + +/datum/status_effect/eldritch/cosmic + effect_icon_state = "emark6" + /// For storing the location when the mark got applied. + var/obj/effect/cosmic_diamond/cosmic_diamond + /// Effect when triggering mark. + var/obj/effect/teleport_effect = /obj/effect/temp_visual/cosmic_cloud + +/datum/status_effect/eldritch/cosmic/on_creation(mob/living/new_owner) + . = ..() + cosmic_diamond = new(get_turf(owner)) + +/datum/status_effect/eldritch/cosmic/Destroy() + QDEL_NULL(cosmic_diamond) + return ..() + +/datum/status_effect/eldritch/cosmic/on_effect() + new teleport_effect(get_turf(owner)) + new /obj/effect/forcefield/cosmic_field(get_turf(owner)) + owner.forceMove(get_turf(cosmic_diamond)) + new teleport_effect(get_turf(owner)) + owner.Weaken(2 SECONDS) + return ..() + +// MARK OF LOCK + +/datum/status_effect/eldritch/lock + effect_icon_state = "emark7" + duration = 10 SECONDS + +/datum/status_effect/eldritch/lock/on_apply() + . = ..() + RegisterSignal(owner, COMSIG_MOB_TRIED_ACCESS, PROC_REF(attempt_access)) + +/datum/status_effect/eldritch/lock/on_remove() + UnregisterSignal(owner, COMSIG_MOB_TRIED_ACCESS) + return ..() + +/datum/status_effect/eldritch/lock/proc/attempt_access(datum/source, obj/door_attempt) + SIGNAL_HANDLER + return ACCESS_DISALLOWED + +// MARK OF MOON + +/datum/status_effect/eldritch/moon + effect_icon_state = "emark8" + ///Used for checking if the pacifism effect should end early + var/damage_sustained = 0 + +/datum/status_effect/eldritch/moon/on_apply() + . = ..() + if(owner.can_block_magic(MAGIC_RESISTANCE_MIND)) + return FALSE + ADD_TRAIT(owner, TRAIT_PACIFISM, id) + owner.emote(pick("giggle", "laugh")) + to_chat(owner, "You feel unable to hurt a soul!") + RegisterSignal (owner, COMSIG_MOB_APPLY_DAMAGE, PROC_REF(on_damaged)) + return TRUE + +/// Checks for damage so the heretic can't just attack them with another weapon whilst they are unable to fight back +/datum/status_effect/eldritch/moon/proc/on_damaged(datum/source, damage, damagetype) + SIGNAL_HANDLER + + // The grasp itself deals stamina damage so we will ignore it + if(damagetype == STAMINA) + return + + damage_sustained += damage + + if(damage_sustained < 15) + return + + // Removes the trait in here since we don't wanna destroy the mark before its detonated or allow detonation triggers with other weapons + REMOVE_TRAIT(owner, TRAIT_PACIFISM, id) + to_chat(owner, "You feel your pacifism has left!") + +/datum/status_effect/eldritch/moon/on_effect() + owner.AdjustConfused(30 SECONDS) + owner.adjustBrainLoss(20) + owner.emote(pick("giggle", "laugh")) + return ..() + +/datum/status_effect/eldritch/moon/on_remove() + . = ..() + UnregisterSignal (owner, COMSIG_MOB_APPLY_DAMAGE) + + // In case the trait was not removed earlier + REMOVE_TRAIT(owner, TRAIT_PACIFISM, id) diff --git a/code/modules/antagonists/heretic/status_effects/void_chill.dm b/code/modules/antagonists/heretic/status_effects/void_chill.dm new file mode 100644 index 000000000000..97a1b9527797 --- /dev/null +++ b/code/modules/antagonists/heretic/status_effects/void_chill.dm @@ -0,0 +1,106 @@ +/*! + * Contains the "Void Chill" status effect. Harmful debuff which freezes and slows down non-heretics + * Cannot affect silicons (How are you gonna freeze a robot?) + */ +/datum/status_effect/void_chill + id = "void_chill" + duration = 30 SECONDS + alert_type = /atom/movable/screen/alert/status_effect/void_chill + status_type = STATUS_EFFECT_REFRESH //Custom code + on_remove_on_mob_delete = TRUE + ///Current amount of stacks we have + var/stacks + ///Maximum of stacks that we could possibly get + var/stack_limit = 5 + ///icon for the overlay + var/image/stacks_overlay + +/datum/status_effect/void_chill/on_creation(mob/living/new_owner, new_stacks, ...) + . = ..() + RegisterSignal(owner, COMSIG_ATOM_UPDATE_OVERLAYS, PROC_REF(update_stacks_overlay)) + set_stacks(new_stacks) + owner.add_atom_colour(COLOR_BLUE_LIGHT, TEMPORARY_COLOUR_PRIORITY) + owner.update_icon(UPDATE_OVERLAYS) + +/datum/status_effect/void_chill/on_apply() + if(issilicon(owner)) + return FALSE + return TRUE + +/datum/status_effect/void_chill/on_remove() + owner.update_icon(UPDATE_OVERLAYS) + owner.remove_atom_colour(TEMPORARY_COLOUR_PRIORITY, COLOR_BLUE_LIGHT) + owner.remove_alt_appearance("heretic_status") + REMOVE_TRAIT(owner, TRAIT_HYPOTHERMIC, src.UID()) + UnregisterSignal(owner, COMSIG_ATOM_UPDATE_OVERLAYS) + +/datum/status_effect/void_chill/tick(seconds_between_ticks) + owner.adjust_bodytemperature(-12 * stacks * seconds_between_ticks) + +/datum/status_effect/void_chill/refresh(mob/living/new_owner, new_stacks, forced = FALSE) + . = ..() + if(forced) + set_stacks(new_stacks) + else + adjust_stacks(new_stacks) + owner.update_icon(UPDATE_OVERLAYS) + +///Updates the overlay that gets applied on our victim +/datum/status_effect/void_chill/proc/update_stacks_overlay(atom/parent_atom, list/overlays) + SIGNAL_HANDLER + + linked_alert?.update_appearance(UPDATE_ICON_STATE|UPDATE_DESC) + owner.remove_alt_appearance("heretic_status") + stacks_overlay = image('icons/effects/effects.dmi', owner, "void_chill_partial") + if(stacks >= 5) + stacks_overlay = image('icons/effects/effects.dmi', owner, "void_chill_oh_fuck") + owner.add_alt_appearance("heretic_status", stacks_overlay, owner) + +/** + * Setter and adjuster procs for stacks + * + * Arguments: + * - new_stacks + * + */ + +/datum/status_effect/void_chill/proc/set_stacks(new_stacks) + stacks = max(0, min(stack_limit, new_stacks)) + update_movespeed(stacks) + +/datum/status_effect/void_chill/proc/adjust_stacks(new_stacks) + stacks = max(0, min(stack_limit, stacks + new_stacks)) + update_movespeed(stacks) + if(stacks >= 5) + ADD_TRAIT(owner, TRAIT_HYPOTHERMIC, src.UID()) + +///Updates the movespeed of owner based on the amount of stacks of the debuff +/datum/status_effect/void_chill/proc/update_movespeed(stacks) + ///owner.add_movespeed_modifier(/datum/movespeed_modifier/void_chill, update = TRUE) //qwertodo: slowdown from this + ///owner.add_or_update_variable_movespeed_modifier(/datum/movespeed_modifier/void_chill, update = TRUE, multiplicative_slowdown = (0.5 * stacks)) + linked_alert.maptext = MAPTEXT_TINY_UNICODE("[stacks]") + +/datum/status_effect/void_chill/lasting + id = "lasting_void_chill" + +//---- Screen alert +/atom/movable/screen/alert/status_effect/void_chill + name = "Void Chill" + desc = "There's something freezing you from within and without. You've never felt cold this oppressive before..." + icon_state = "void_chill_minor" + +/atom/movable/screen/alert/status_effect/void_chill/update_icon_state() + . = ..() + if(!istype(attached_effect, /datum/status_effect/void_chill)) + return + var/datum/status_effect/void_chill/chill_effect = attached_effect + if(chill_effect.stacks >= 5) + icon_state = "void_chill_oh_fuck" + +/atom/movable/screen/alert/status_effect/void_chill/update_desc(updates) + . = ..() + if(!istype(attached_effect, /datum/status_effect/void_chill)) + return + var/datum/status_effect/void_chill/chill_effect = attached_effect + if(chill_effect.stacks >= 5) + desc = "You had your chance to run, now it's too late. You may never feel warmth again..." diff --git a/code/modules/antagonists/heretic/structures/carving_knife.dm b/code/modules/antagonists/heretic/structures/carving_knife.dm new file mode 100644 index 000000000000..7ac5af1428a5 --- /dev/null +++ b/code/modules/antagonists/heretic/structures/carving_knife.dm @@ -0,0 +1,326 @@ +// The rune carver, a heretic knife that can draw rune traps. +/obj/item/melee/rune_carver + name = "carving knife" + desc = "A small knife made of cold steel, pure and perfect. Its sharpness can carve into titanium itself - \ + but only few can evoke the dangers that lurk beneath reality." + icon = 'icons/obj/antags/eldritch.dmi' + icon_state = "rune_carver" + sharp = TRUE + w_class = WEIGHT_CLASS_SMALL + force = 10 + throwforce = 20 + hitsound = 'sound/weapons/bladeslice.ogg' + attack_verb = list("attacks", "slashes", "slices", "tears", "lacerates", "rips", "dices", "rends") + actions_types = list(/datum/action/item_action/rune_shatter) + throw_speed = 4 + embedded_pain_multiplier = 5 + w_class = WEIGHT_CLASS_SMALL + embed_chance = 75 + embedded_fall_chance = 2 + new_attack_chain = TRUE + + /// Whether we're currently drawing a rune + var/drawing = FALSE + /// Max amount of runes that can be drawn + var/max_rune_amt = 3 + /// A list of uid's to all of ourc urrent runes + var/list/current_runes = list() + + +/obj/item/melee/rune_carver/examine(mob/user) + . = ..() + if(!IS_HERETIC_OR_MONSTER(user) && !isobserver(user)) + return + + . += "[length(current_runes)] / [max_rune_amt] total carvings have been drawn." + . += "The following runes can be carved:" + for(var/obj/structure/trap/eldritch/trap as anything in subtypesof(/obj/structure/trap/eldritch)) + var/potion_string = "\tThe " + initial(trap.name) + " - " + initial(trap.carver_tip) + "" + . += potion_string + +/obj/item/melee/rune_carver/interact_with_atom(atom/interacting_with, mob/living/user, list/modifiers) + if(!IS_HERETIC_OR_MONSTER(user)) + return NONE + if(!isfloorturf(interacting_with)) + return NONE + + INVOKE_ASYNC(src, PROC_REF(try_carve_rune), interacting_with, user) + return ITEM_INTERACT_COMPLETE + +/* + * Begin trying to carve a rune. Go through a few checks, then call do_carve_rune if successful. + */ +/obj/item/melee/rune_carver/proc/try_carve_rune(turf/target_turf, mob/user) + if(drawing) + to_chat(user, "You are already carving.") + return + + if(locate(/obj/structure/trap/eldritch) in range(1, target_turf)) + to_chat(user, "You are too close to another carving!") + return + + for(var/rune_ref as anything in current_runes) + if(!locateUID(rune_ref)) + current_runes -= rune_ref + + if(length(current_runes) >= max_rune_amt) + to_chat(user, "This knife has too many active carvings!") + return + + drawing = TRUE + do_carve_rune(target_turf, user) + drawing = FALSE + +/* + * The actual proc that handles selecting the rune to draw and creating it. + */ +/obj/item/melee/rune_carver/proc/do_carve_rune(turf/target_turf, mob/user) + // Assoc list of [name] to [image] for the radial (to show tooltips) + var/static/list/choices = list() + // Assoc list of [name] to [path] for after the radial + var/static/list/names_to_path = list() + if(!choices.len || !names_to_path.len) + for(var/obj/structure/trap/eldritch/trap as anything in subtypesof(/obj/structure/trap/eldritch)) + names_to_path[initial(trap.name)] = trap + choices[initial(trap.name)] = image(icon = initial(trap.icon), icon_state = initial(trap.icon_state)) + + var/picked_choice = show_radial_menu( + user, + user, + choices, + require_near = TRUE, + ) + + if(isnull(picked_choice)) + return + + var/to_make = names_to_path[picked_choice] + if(!ispath(to_make, /obj/structure/trap/eldritch)) + CRASH("[type] attempted to create a rune of incorrect type! (got: [to_make])") + to_chat(user, "Carving [picked_choice]...") + user.playsound_local(target_turf, 'sound/weapons/blade_sheath.ogg', 50, TRUE) + if(!do_after(user, 5 SECONDS, target = target_turf)) + return + var/obj/structure/trap/eldritch/new_rune = new to_make(target_turf, user) + current_runes += new_rune.UID() + +/datum/action/item_action/rune_shatter + name = "Rune Break" + desc = "Destroys all runes carved by this blade." + button_overlay_icon = 'icons/mob/actions/actions_ecult.dmi' + button_background_icon = 'icons/mob/actions/actions_ecult.dmi' + button_overlay_icon_state = "rune_break" + button_background_icon = "bg_heretic" + +/datum/action/item_action/rune_shatter/New(Target) + . = ..() + if(!istype(Target, /obj/item/melee/rune_carver)) + qdel(src) + return + +/datum/action/item_action/rune_shatter/Grant(mob/granted) + if(!IS_HERETIC_OR_MONSTER(granted)) + return + + return ..() + +/datum/action/item_action/rune_shatter/IsAvailable(feedback = FALSE) + . = ..() + if(!.) + return + if(!IS_HERETIC_OR_MONSTER(owner)) + return FALSE + var/obj/item/melee/rune_carver/target_sword = target + if(!length(target_sword.current_runes)) + return FALSE + +/datum/action/item_action/rune_shatter/Trigger(trigger_flags) + . = ..() + if(!.) + return + + owner.playsound_local(get_turf(owner), 'sound/magic/blind.ogg', 50, TRUE) + var/obj/item/melee/rune_carver/target_sword = target + for(var/rune_ref as anything in target_sword.current_runes) + if(locateUID(rune_ref)) + var/rune_to_kill = locateUID(rune_ref) + qdel(rune_to_kill) + target_sword.current_runes = list() + target_sword.SpinAnimation(5, 1) + return TRUE + +//General trap +/obj/structure/trap + name = "IT'S A TRAP" + desc = "Stepping on me is a guaranteed bad day." + icon = 'icons/obj/antags/eldritch.dmi' + icon_state = "trap" + density = FALSE + anchored = TRUE + alpha = 30 //initially quite hidden when not "recharging" + flags = NO_SCREENTIPS //fuck you + var/flare_message = "The trap flares brightly!" + var/last_trigger = 0 + var/time_between_triggers = 1 MINUTES + var/charges = INFINITY + var/antimagic_flags = MAGIC_RESISTANCE + + var/static/list/ignore_typecache + var/list/mob/immune_minds = list() + + var/sparks = TRUE + var/datum/effect_system/spark_spread/spark_system + +/obj/structure/trap/Initialize(mapload) + . = ..() + flare_message = "[src] flares brightly!" + spark_system = new + spark_system.set_up(4,1,src) + spark_system.attach(src) + + var/static/list/loc_connections = list( + COMSIG_ATOM_ENTERED = PROC_REF(on_entered) + ) + AddElement(/datum/element/connect_loc, loc_connections) + + if(isnull(ignore_typecache)) + ignore_typecache = typecacheof(list( + /obj/effect, + /mob/dead, + )) + +/obj/structure/trap/Destroy() + qdel(spark_system) + spark_system = null + . = ..() + +/obj/structure/trap/examine(mob/user) + . = ..() + if(!isliving(user)) + return + if(user.mind && (user.mind in immune_minds)) + return + if(get_dist(user, src) <= 1) + . += "You reveal [src]!" + flare() + +/obj/structure/trap/proc/flare() + // Makes the trap visible, and starts the cooldown until it's + // able to be triggered again. + visible_message("[flare_message]") + if(sparks) + spark_system.start() + alpha = 200 + last_trigger = world.time + charges-- + if(charges <= 0) + animate(src, alpha = 0, time = 1 SECONDS) + QDEL_IN(src, 1 SECONDS) + else + animate(src, alpha = initial(alpha), time = time_between_triggers) + +/obj/structure/trap/proc/on_entered(datum/source, atom/movable/victim) + SIGNAL_HANDLER + if(last_trigger + time_between_triggers > world.time) + return + // Don't want the traps triggered by sparks, ghosts or projectiles. + if(is_type_in_typecache(victim, ignore_typecache)) + return + if(ismob(victim)) + var/mob/mob_victim = victim + if(mob_victim.mind in immune_minds) + return + if(mob_victim.can_block_magic(antimagic_flags)) + flare() + return + if(charges <= 0) + return + flare() + if(isliving(victim)) + trap_effect(victim) + +/obj/structure/trap/proc/trap_effect(mob/living/victim) + return + + +// The actual rune traps the knife draws. +/obj/structure/trap/eldritch + name = "elder carving" + desc = "Collection of unknown symbols, they remind you of days long gone..." + max_integrity = 60 + /// A tip displayed to heretics who examine the rune carver. Explains what the rune does. + var/carver_tip + /// Reference to trap owner mob + var/owner + +/obj/structure/trap/eldritch/Initialize(mapload, atom/new_owner) + . = ..() + if(new_owner) + owner = new_owner.UID() + +/obj/structure/trap/eldritch/on_entered(datum/source, atom/movable/entering_atom) + if(!isliving(entering_atom)) + return + var/mob/living/living_mob = entering_atom + if(living_mob.UID() == owner) + return + if(IS_HERETIC_OR_MONSTER(living_mob)) + return + return ..() + +/obj/structure/trap/eldritch/attacked_by(obj/item/weapon, mob/living/user) + if(istype(weapon, /obj/item/melee/rune_carver) || istype(weapon, /obj/item/nullrod)) + playsound(src, 'sound/weapons/blade_sheath.ogg', 50, TRUE, SHORT_RANGE_SOUND_EXTRARANGE, ignore_walls = FALSE) + qdel(src) + + return ..() + +/obj/structure/trap/eldritch/alert + name = "alert carving" + icon_state = "alert_rune" + alpha = 10 + time_between_triggers = 5 SECONDS + sparks = FALSE + carver_tip = "A nearly invisible rune that, when stepped on, alerts the carver who triggered it and where." + +/obj/structure/trap/eldritch/alert/trap_effect(mob/living/victim) + var/mob/living/real_owner = locateUID(owner) + if(real_owner) + to_chat(real_owner, "[victim.real_name] has stepped foot on the alert rune in [get_area(src)]!") + real_owner.playsound_local(get_turf(real_owner), 'sound/effects/curse.ogg', 50, TRUE) + +/obj/structure/trap/eldritch/tentacle + name = "grasping carving" + icon_state = "tentacle_rune" + time_between_triggers = 45 SECONDS + charges = 1 + carver_tip = "When stepped on, causes heavy damage leg damage and immobilizes the victim for 5 seconds. Has 1 charge." + +/obj/structure/trap/eldritch/tentacle/trap_effect(mob/living/victim) + if(!iscarbon(victim)) + return + var/mob/living/carbon/carbon_victim = victim + carbon_victim.Immobilize(5 SECONDS) + carbon_victim.apply_damage(20, BRUTE, BODY_ZONE_R_LEG) + carbon_victim.apply_damage(20, BRUTE, BODY_ZONE_L_LEG) + playsound(src, 'sound/misc/demon_attack1.ogg', 75, TRUE) + +/obj/structure/trap/eldritch/mad + name = "mad carving" + icon_state = "madness_rune" + time_between_triggers = 20 SECONDS + charges = 2 + carver_tip = "When stepped on, causes heavy stamina damage, blindness, and a variety of ailments to the victim. Has 2 charges." + +/obj/structure/trap/eldritch/mad/trap_effect(mob/living/victim) + if(!iscarbon(victim)) + return + var/mob/living/carbon/carbon_victim = victim + carbon_victim.apply_damage(80, STAMINA) + carbon_victim.Silence(20 SECONDS) + carbon_victim.Stuttering(1 MINUTES) + carbon_victim.Confused(5 SECONDS) + carbon_victim.Jitter(20 SECONDS) + carbon_victim.Dizzy(40 SECONDS) + carbon_victim.EyeBlind(4 SECONDS) + playsound(src, 'sound/magic/blind.ogg', 75, TRUE) diff --git a/code/modules/antagonists/heretic/structures/lock_final.dm b/code/modules/antagonists/heretic/structures/lock_final.dm new file mode 100644 index 000000000000..70ae60292140 --- /dev/null +++ b/code/modules/antagonists/heretic/structures/lock_final.dm @@ -0,0 +1,113 @@ +/obj/structure/lock_tear + name = "???" + desc = "It stares back. There's no reason to remain. Run." + max_integrity = INFINITY + resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF + icon = 'icons/effects/effects.dmi' + icon_state = "bhole3" + color = COLOR_VOID_PURPLE + light_color = COLOR_VOID_PURPLE + light_range = 20 + anchored = TRUE + density = FALSE + layer = HIGH_SIGIL_LAYER //0.01 above sigil layer used by heretic runes + move_resist = INFINITY + /// Who is our daddy? + var/datum/mind/ascendee + /// True if we're currently checking for ghost opinions + var/gathering_candidates = TRUE + ///a static list of heretic summons we cam create, automatically populated from heretic monster subtypes + var/static/list/monster_types + /// A static list of heretic summons which we should not create + var/static/list/monster_types_blacklist = list( + ///mob/living/basic/heretic_summon/armsy, + ///mob/living/basic/heretic_summon/star_gazer, + /mob/living/simple_animal/bunny + ) + +/obj/structure/lock_tear/Initialize(mapload, datum/mind/ascendant_mind) + . = ..() + transform *= 3 + if(isnull(monster_types)) + monster_types = subtypesof(/mob/living/basic/heretic_summon) - monster_types_blacklist + if(!isnull(ascendant_mind)) + ascendee = ascendant_mind + RegisterSignals(ascendant_mind.current, list(COMSIG_MOB_DEATH, COMSIG_PARENT_QDELETING), PROC_REF(end_madness)) + GLOB.poi_list += src + INVOKE_ASYNC(src, PROC_REF(poll_ghosts)) + +/// Ask ghosts if they want to make some noise +/obj/structure/lock_tear/proc/poll_ghosts() + var/list/candidates = SSghost_spawns.poll_candidates("Would you like to be a random eldritch monster attacking the crew?", ROLE_HERETIC, TRUE, 10 SECONDS, source = src) + while(LAZYLEN(candidates)) + var/mob/dead/observer/candidate = pick_n_take(candidates) + ghost_to_monster(candidate, should_ask = FALSE) + gathering_candidates = FALSE + +/// Destroy the rift if you kill the heretic +/obj/structure/lock_tear/proc/end_madness(datum/former_master) + SIGNAL_HANDLER + var/turf/our_turf = get_turf(src) + playsound(our_turf, 'sound/magic/castsummon.ogg', vol = 100, vary = TRUE) + visible_message("The rip in space spasms and disappears!") + UnregisterSignal(former_master, list(COMSIG_MOB_DEATH, COMSIG_PARENT_QDELETING)) // Just in case they die THEN delete + new /obj/effect/temp_visual/destabilising_tear(our_turf) + qdel(src) + +/obj/structure/lock_tear/attack_ghost(mob/user) + . = ..() + if(. || gathering_candidates) + return + ghost_to_monster(user) + +/obj/structure/lock_tear/examine(mob/user) + . = ..() + if(!isobserver(user) || gathering_candidates) + return + . += "You can use this to enter the world as a foul monster." + +/// Turn a ghost into an 'orrible beast +/obj/structure/lock_tear/proc/ghost_to_monster(mob/dead/observer/user, should_ask = TRUE) + if(should_ask) + var/ask = tgui_alert(user, "Become a monster?", "Ascended Rift", list("Yes", "No")) + if(ask != "Yes" || QDELETED(src) || QDELETED(user)) + return FALSE + var/monster_type = pick(monster_types) + var/mob/living/monster = new monster_type(loc) + monster.key = user.key + var/datum/antagonist/heretic_monster/woohoo_free_antag = new(src) + monster.mind.add_antag_datum(woohoo_free_antag) + if(ascendee) + monster.faction = ascendee.current.faction + woohoo_free_antag.set_owner(ascendee) + var/datum/objective/kill_all_your_friends = new() + kill_all_your_friends.owner = monster.mind + kill_all_your_friends.explanation_text = "The station's crew must be culled." + kill_all_your_friends.completed = TRUE + woohoo_free_antag.add_antag_objective(kill_all_your_friends) + +/obj/structure/lock_tear/move_crushed(atom/movable/pusher, force = MOVE_FORCE_DEFAULT, direction) + return FALSE + +/obj/structure/lock_tear/Destroy(force) + if(ascendee) + ascendee = null + return ..() + +/obj/effect/temp_visual/destabilising_tear + name = "destabilised tear" + icon_state = "bhole3" + color = COLOR_VOID_PURPLE + light_color = COLOR_VOID_PURPLE + light_range = 20 + layer = HIGH_SIGIL_LAYER + duration = 1 SECONDS + +/obj/effect/temp_visual/destabilising_tear/Initialize(mapload) + . = ..() + transform *= 3 + animate(src, transform = matrix().Scale(3.2), time = 0.15 SECONDS) + animate(transform = matrix().Scale(0.2), time = 0.75 SECONDS) + animate(transform = matrix().Scale(3, 0), time = 0.1 SECONDS) + animate(src, color = COLOR_WHITE, time = 0.25 SECONDS, flags = ANIMATION_PARALLEL) + animate(color = COLOR_VOID_PURPLE, time = 0.3 SECONDS) diff --git a/code/modules/antagonists/heretic/structures/mawed_crucible.dm b/code/modules/antagonists/heretic/structures/mawed_crucible.dm new file mode 100644 index 000000000000..6121f6f76958 --- /dev/null +++ b/code/modules/antagonists/heretic/structures/mawed_crucible.dm @@ -0,0 +1,292 @@ +// The mawed crucible, a heretic structure that can create potions from bodyparts and organs. +/obj/structure/eldritch_crucible + name = "mawed crucible" + desc = "A deep basin made of cast iron, immortalized by steel-like teeth holding it in place. \ + Staring at the vile extract within fills your mind with terrible ideas." + icon = 'icons/obj/antags/eldritch.dmi' + icon_state = "crucible" + base_icon_state = "crucible" + light_power = 1 + anchored = TRUE + density = TRUE + ///How much mass this currently holds + var/current_mass = 3 + ///Maximum amount of mass + var/max_mass = 3 + ///Check to see if it is currently being used. + in_use = FALSE + ///Cooldown for the crucible to create mass from the eldritch + COOLDOWN_DECLARE(refill_cooldown) + +/obj/structure/eldritch_crucible/Initialize(mapload) + . = ..() + START_PROCESSING(SSobj, src) + +/obj/structure/eldritch_crucible/process(seconds_per_tick) + if(COOLDOWN_TIMELEFT(src, refill_cooldown)) + return + if(current_mass >= max_mass) + return + COOLDOWN_START(src, refill_cooldown, 30 SECONDS) + current_mass++ + playsound(src, 'sound/items/eatfood.ogg', 100, TRUE) + update_appearance(UPDATE_ICON_STATE) + +/obj/structure/eldritch_crucible/obj_destruction() + // Create a spillage if we were destroyed with leftover mass + if(current_mass) + visible_message("[src] falls apart with a thud, spilling shining extract everywhere!") + var/turf/our_turf = get_turf(src) + + new /obj/effect/decal/cleanable/greenglow(our_turf) + for(var/turf/nearby_turf as anything in get_adjacent_open_turfs(our_turf)) + if(prob(10 * current_mass)) + new /obj/effect/decal/cleanable/greenglow(nearby_turf) + playsound(our_turf, 'sound/effects/bubbles.ogg', 50, TRUE) + else + visible_message("[src] falls apart with a thud!") + playsound(src, 'sound/hallucinations/wail.ogg', 100, TRUE) + + return ..() + +/obj/structure/eldritch_crucible/examine(mob/user) + . = ..() + if(!IS_HERETIC_OR_MONSTER(user) && !isobserver(user)) + return + + if(current_mass > 0) + . += "You can refill an eldritch flask with this" + + if(current_mass < max_mass) + var/to_fill = max_mass - current_mass + . += "[src] requires [to_fill] more organ[to_fill == 1 ? "":"s"] or bodypart[to_fill == 1 ? "":"s"]." + else + . += "[src] is bubbling to the brim with viscous liquid, and is ready to use." + + . += "You can [anchored ? "unanchor and move":"anchor in place"] [src] with a Codex Cicatrix or Mansus Grasp." + . += "The following potions can be brewed:" + for(var/obj/item/eldritch_potion/potion as anything in subtypesof(/obj/item/eldritch_potion)) + var/potion_string = "\tThe " + initial(potion.name) + " - " + initial(potion.crucible_tip) + "" + . += potion_string + +/obj/structure/eldritch_crucible/examine_status(mob/user) + if(IS_HERETIC_OR_MONSTER(user) || isobserver(user)) + return "It's at [round(obj_integrity * 100 / max_integrity)]% stability." + return ..() + +// no breaky herety thingy +/obj/structure/eldritch_crucible/rust_heretic_act() + return + +/obj/structure/eldritch_crucible/attacked_by(obj/item/weapon, mob/living/user) + if(!iscarbon(user)) + return ..() + + if(!IS_HERETIC_OR_MONSTER(user)) + bite_the_hand(user) + return TRUE + + if(is_organ(weapon)) + var/obj/item/organ/consumed = weapon + if(consumed.status & ORGAN_ROBOT) + to_chat(user, "This organ isnot organic!") + return + if(consumed.vital) // Basically, don't eat organs like brains + to_chat(user, "This organ is invalid!") + return + + consume_fuel(user, consumed) + return TRUE + + return ..() + +/obj/structure/eldritch_crucible/item_interaction(mob/living/user, obj/item/tool, list/modifiers) + if(istype(tool, /obj/item/codex_cicatrix) || istype(tool, /obj/item/melee/touch_attack/mansus_fist)) + playsound(src, 'sound/items/deconstruct.ogg', 30, TRUE, ignore_walls = FALSE) + anchored = !anchored + to_chat(user, "[anchored ? "":"un"]anchored.") + return ITEM_INTERACT_COMPLETE + if(istype(tool, /obj/item/reagent_containers/cup/beaker/eldritch)) + if(current_mass < max_mass) + to_chat(user, "We are not full enough!") + return ITEM_INTERACT_COMPLETE + var/obj/item/reagent_containers/cup/beaker/eldritch/to_fill = tool + if(to_fill.reagents.total_volume >= to_fill.reagents.maximum_volume) + to_chat(user, "Your flask is full!") + return ITEM_INTERACT_COMPLETE + to_fill.reagents.add_reagent("eldritch", 50) + do_item_attack_animation(src, used_item = tool) + current_mass-- + to_chat(user, "Your flask has been refilled.") + return ITEM_INTERACT_COMPLETE + +/obj/structure/eldritch_crucible/attack_hand(mob/user, list/modifiers) + . = ..() + if(.) + return + + if(!isliving(user)) + return + + if(!IS_HERETIC_OR_MONSTER(user)) + if(iscarbon(user)) + bite_the_hand(user) + return TRUE + + if(in_use) + to_chat(user, "We are in use!") + return TRUE + + if(current_mass < max_mass) + to_chat(user, "We are not full enough!") + return TRUE + + INVOKE_ASYNC(src, PROC_REF(show_radial), user) + return TRUE + +/* + * Wrapper for show_radial() to ensure in_use is enabled and disabled correctly. + */ +/obj/structure/eldritch_crucible/proc/show_radial(mob/living/user) + in_use = TRUE + create_potion(user) + in_use = FALSE + +/* + * Shows the user of radial of possible potions, + * and create the potion they chose. + */ +/obj/structure/eldritch_crucible/proc/create_potion(mob/living/user) + + // Assoc list of [name] to [image] for the radial + var/static/list/choices = list() + // Assoc list of [name] to [path] for after the radial, to spawn it + var/static/list/names_to_path = list() + if(!choices.len || !names_to_path.len) + for(var/obj/item/eldritch_potion/potion as anything in subtypesof(/obj/item/eldritch_potion)) + names_to_path[initial(potion.name)] = potion + choices[initial(potion.name)] = image(icon = initial(potion.icon), icon_state = initial(potion.icon_state)) + + var/picked_choice = show_radial_menu( + user, + src, + choices, + require_near = TRUE, + ) + + if(isnull(picked_choice)) + return + + var/spawned_type = names_to_path[picked_choice] + if(!ispath(spawned_type, /obj/item/eldritch_potion)) + CRASH("[type] attempted to create a potion that wasn't an eldritch potion! (got: [spawned_type])") + + var/obj/item/spawned_pot = new spawned_type(drop_location()) + + playsound(src, 'sound/effects/desecration/desecration-02.ogg', 75, TRUE) + visible_message("[src]'s shining liquid drains into a flask, creating a [spawned_pot.name]!") + + current_mass = 0 + update_appearance(UPDATE_ICON_STATE) + +/* + * "Bites the hand that feeds it", except more literally. + * Called when a non-heretic interacts with the crucible, + * causing them to lose their active hand to it. + */ +/obj/structure/eldritch_crucible/proc/bite_the_hand(mob/living/carbon/user) + var/obj/item/organ/external/affecting = user.get_organ("[user.hand ? "l" : "r" ]_hand") + if(QDELETED(affecting)) + return + if(affecting.limb_flags & CANNOT_DISMEMBER) + return + + to_chat(user, "[src] grabs your [affecting.name]!") + affecting.droplimb(FALSE, DROPLIMB_SHARP) + consume_fuel(consumed = affecting) + +/* + * Consumes an organ or bodypart and increases the mass of the crucible. + * If feeder is supplied, gives some feedback. + */ +/obj/structure/eldritch_crucible/proc/consume_fuel(mob/living/feeder, obj/item/consumed) + if(current_mass >= max_mass) + if(feeder) + to_chat(feeder, "We are full.") + return + + current_mass++ + playsound(src, 'sound/items/eatfood.ogg', 100, TRUE) + visible_message("[src] devours [consumed] and fills itself with a little bit of liquid!") + + if(feeder) + to_chat(feeder, "We are this filled. ([current_mass] / [max_mass])") + + qdel(consumed) + update_appearance(UPDATE_ICON_STATE) + +/obj/structure/eldritch_crucible/update_icon_state() + icon_state = "[base_icon_state][(current_mass == max_mass) ? null : "_empty"]" + return ..() + +// Potions created by the mawed crucible. +/obj/item/eldritch_potion + name = "brew of day and night" + desc = "You should never see this" + icon = 'icons/obj/antags/eldritch.dmi' + w_class = WEIGHT_CLASS_SMALL + new_attack_chain = TRUE + /// When a heretic examines a mawed crucible, shows a list of possible potions by name + includes this tip to explain what it does. + var/crucible_tip = "Doesn't do anything." + /// Typepath to the status effect this applies + var/status_effect + +/obj/item/eldritch_potion/examine(mob/user) + . = ..() + if(!IS_HERETIC_OR_MONSTER(user) && !isobserver(user)) + return + + . += "[crucible_tip]" + +/obj/item/eldritch_potion/activate_self(mob/user) + if(..() || !iscarbon(user)) + return + + playsound(src, 'sound/effects/bubbles.ogg', 50, TRUE) + + if(!IS_HERETIC_OR_MONSTER(user)) + to_chat(user, "You down some of the liquid from [src]. The taste causes you to retch, and the glass vanishes.") + user.reagents?.add_reagent("eldritch", 10) + user.adjust_disgust(50 SECONDS) + qdel(src) + return TRUE + + to_chat(user, "You drink the viscous liquid from [src], causing the glass to dematerialize.") + potion_effect(user) + qdel(src) + return TRUE + +/** + * The effect of the potion, if it has any special one. + * In general try not to override this + * and utilize the status_effect var to make custom effects. + */ +/obj/item/eldritch_potion/proc/potion_effect(mob/user) + var/mob/living/carbon/carbon_user = user + carbon_user.apply_status_effect(status_effect) + +/obj/item/eldritch_potion/duskndawn + name = "brew of dusk and dawn" + desc = "A glass bottle contianing a dull yellow liquid. It seems to fade in and out with regularity." + icon_state = "clarity" + status_effect = /datum/status_effect/duskndawn + crucible_tip = "Allows you to see through walls and objects. Lasts 90 seconds." + +/obj/item/eldritch_potion/wounded + name = "brew of the wounded soldier" + desc = "A glass bottle contianing a colorless, dark liquid." + icon_state = "marshal" + status_effect = /datum/status_effect/marshal + crucible_tip = "Causes all wounds you are experiencing to begin to heal you. Fractures, sprains, cuts, and punctures will heal bruises, \ + and flesh damage will heal burns. The more severe the wounds, the stronger the healing. Additionally, prevents slowdown from damage. \ + Lasts 60 seconds. " diff --git a/code/modules/antagonists/heretic/transmutation_rune.dm b/code/modules/antagonists/heretic/transmutation_rune.dm new file mode 100644 index 000000000000..452db9827cdd --- /dev/null +++ b/code/modules/antagonists/heretic/transmutation_rune.dm @@ -0,0 +1,256 @@ +/// The heretic's rune, which they use to complete transmutation rituals. +/obj/effect/heretic_rune + name = "transmutation rune" + desc = "A flowing circle of shapes and runes is etched into the floor, filled with a thick black tar-like fluid." + icon = 'icons/effects/cult_effects.dmi' + icon_state = "shield-cult" + anchored = TRUE + mouse_opacity = MOUSE_OPACITY_OPAQUE + resistance_flags = FIRE_PROOF | UNACIDABLE | ACID_PROOF + plane = FLOOR_PLANE + layer = SIGIL_LAYER + /// What is the colour of the runes visual effects? + var/greyscale_colours = COLOR_LIME + ///Used mainly for summoning ritual to prevent spamming the rune to create millions of monsters. + var/is_in_use = FALSE + +/obj/effect/heretic_rune/Initialize(mapload, path_colour = COLOR_LIME) + . = ..() + var/image/silicon_image = image(icon = 'icons/effects/eldritch.dmi', icon_state = null, loc = src) + silicon_image.override = TRUE + add_alt_appearance("heretic_rune", silicon_image, GLOB.silicon_mob_list) + +/obj/effect/heretic_rune/examine(mob/user) + . = ..() + if(!IS_HERETIC(user)) + return + + . += "Allows you to transmute objects by invoking the rune after collecting the prerequisites overhead." + . += "You can use your Mansus Grasp on the rune to remove it." + +/obj/effect/heretic_rune/attack_animal(mob/living/simple_animal/M) + . = ..() + return attack_hand(M) + + +/obj/effect/heretic_rune/attack_hand(mob/living/user) + . = ..() + INVOKE_ASYNC(src, PROC_REF(try_rituals), user) + return TRUE + +/** + * Attempt to begin a ritual, giving them an input list to chose from. + * Also ensures is_in_use is enabled and disabled before and after. + */ +/obj/effect/heretic_rune/proc/try_rituals(mob/living/user) + if(!IS_HERETIC(user)) + return FALSE + if(is_in_use) + return FALSE + is_in_use = TRUE + + var/datum/antagonist/heretic/heretic_datum = IS_HERETIC(user) + var/list/rituals = heretic_datum.get_rituals() + if(!length(rituals)) + to_chat(user, "You have no rituals avalible?") + is_in_use = FALSE + return + + var/chosen = tgui_input_list(user, "Chose a ritual to attempt.", "Chose a Ritual", rituals) + if(!chosen || !istype(rituals[chosen], /datum/heretic_knowledge) || QDELETED(src) || QDELETED(user) || QDELETED(heretic_datum)) + is_in_use = FALSE + return + + do_ritual(user, rituals[chosen]) + is_in_use = FALSE + +/** + * Attempt to invoke a ritual from the past list of knowledges. + * + * Arguments + * * user - the heretic / the person who invoked the rune + * * knowledge_list - a non-assoc list of heretic_knowledge datums. + * + * returns TRUE if any rituals passed succeeded, FALSE if they all failed. + */ +/obj/effect/heretic_rune/proc/do_ritual(mob/living/user, datum/heretic_knowledge/ritual) + + // Collect all nearby valid atoms over the rune for processing in rituals. + var/list/atom/movable/atoms_in_range = list() + for(var/atom/close_atom as anything in range(1, src)) + if(!ismovable(close_atom)) + continue + if(isitem(close_atom)) + var/obj/item/close_item = close_atom + if(close_item.flags & ABSTRACT) //woops sacrificed your own head + continue + if(close_atom.invisibility) + continue + if(close_atom == user) + continue + + atoms_in_range += close_atom + + // A copy of our requirements list. + // We decrement the values of to determine if enough of each key is present. + var/list/requirements_list = ritual.required_atoms.Copy() + var/list/banned_atom_types = ritual.banned_atom_types.Copy() + // A list of all atoms we've selected to use in this recipe. + var/list/selected_atoms = list() + + // Do the snowflake check to see if we can continue or not. + // selected_atoms is passed and can be modified by this proc. + if(!ritual.recipe_snowflake_check(user, atoms_in_range, selected_atoms, loc)) + return FALSE + + // Now go through all our nearby atoms and see which are good for our ritual. + for(var/atom/nearby_atom as anything in atoms_in_range) + // Go through all of our required atoms + for(var/req_type in requirements_list) + // We already have enough of this type, skip + if(requirements_list[req_type] <= 0) + continue + // If req_type is a list of types, check all of them for one match. + if(islist(req_type)) + if(!(is_type_in_list(nearby_atom, req_type))) + continue + else if(!istype(nearby_atom, req_type)) + continue + // if list has items, check if the strict type is banned. + if(length(banned_atom_types)) + if(nearby_atom.type in banned_atom_types) + continue + // This item is a valid type. Add it to our selected atoms list. + selected_atoms |= nearby_atom + // If it's a stack, we gotta see if it has more than one inside, + // as our requirements may want more than one item of a stack + if(isstack(nearby_atom)) + var/obj/item/stack/picked_stack = nearby_atom + requirements_list[req_type] -= picked_stack.amount // Can go negative, but doesn't matter. Negative = fulfilled + + // Otherwise, just add the mark down the item as fulfilled x1 + else + requirements_list[req_type]-- + + // All of the atoms have been checked, let's see if the ritual was successful + var/list/what_are_we_missing = list() + for(var/req_type in requirements_list) + var/number_of_things = requirements_list[req_type] + // <= 0 means it's fulfilled, skip + if(number_of_things <= 0) + continue + + // > 0 means it's unfilfilled - the ritual has failed, we should tell them why + // Lets format the thing they're missing and put it into our list + var/formatted_thing = "[number_of_things] " + if(islist(req_type)) + var/list/req_type_list = req_type + var/list/req_text_list = list() + for(var/atom/possible_type as anything in req_type_list) + req_text_list += ritual.parse_required_item(possible_type) + formatted_thing += english_list(req_text_list, and_text = "or") + + else + formatted_thing = ritual.parse_required_item(req_type) + + what_are_we_missing += formatted_thing + + if(length(what_are_we_missing)) + // Let them know it screwed up + // Then let them know what they're missing + to_chat(user, "You are missing [english_list(what_are_we_missing)] in order to complete the ritual \"[ritual.name]\".") + return FALSE + + // If we made it here, the ritual had all necessary components, and we can try to cast it. + // This doesn't necessarily mean the ritual will succeed, but it's valid! + // Do the animations and associated feedback. + do_animation(TRUE) + playsound(user, 'sound/magic/castsummon.ogg', 75, TRUE, extrarange = SILENCED_SOUND_EXTRARANGE, falloff_exponent = 10) + + // - We temporarily make all of our chosen atoms invisible, as some rituals may sleep, + // and we don't want people to be able to run off with ritual items. + // - We make a duplicate list here to ensure that all atoms are correctly un-invisibled by the end. + // Some rituals may remove atoms from the selected_atoms list, and not consume them. + var/list/initial_selected_atoms = selected_atoms.Copy() + for(var/atom/to_disappear as anything in selected_atoms) + to_disappear.invisibility =INVISIBILITY_ABSTRACT + + // All the components have been invisibled, time to actually do the ritual. Call on_finished_recipe + // (Note: on_finished_recipe may sleep in the case of some rituals like summons, which expect ghost candidates.) + // - If the ritual was success (Returned TRUE), proceede to clean up the atoms involved in the ritual. The result has already been spawned by this point. + // - If the ritual failed for some reason (Returned FALSE), likely due to no ghosts taking a role or an error, we shouldn't clean up anything, and reset. + var/ritual_result = ritual.on_finished_recipe(user, selected_atoms, loc) + + if(ritual_result) + ritual.cleanup_atoms(selected_atoms) + + // Clean up done, re-appear anything that hasn't been deleted. + for(var/atom/to_appear as anything in initial_selected_atoms) + if(QDELETED(to_appear)) + continue + to_appear.invisibility = 0 + + // And finally, give some user feedback + // No feedback is given on failure here - + // the ritual itself should handle it (providing specifics as to why it failed) + if(ritual_result) + to_chat(user, "The ritual was successful.") + + return ritual_result + +/obj/effect/heretic_rune/proc/do_animation(do_flick = FALSE) + if(do_flick) + flick("[icon_state]_activate_colour", src) + var/mutable_appearance/theme_icon = mutable_appearance('icons/effects/96x96.dmi', "transmutation_rune_activate_white", FLOAT_LAYER - 1, appearance_flags = appearance_flags | RESET_TRANSFORM, color = greyscale_colours) + theme_icon.blend_mode = BLEND_MULTIPLY + add_overlay(theme_icon) + + +/// A 3x3 heretic rune. The kind heretics actually draw in game. +/obj/effect/heretic_rune/big + icon = 'icons/effects/96x96.dmi' + icon_state = "transmutation_rune" + pixel_x = -30 + pixel_y = 18 + pixel_z = -48 + +/obj/effect/heretic_rune/big/Initialize(mapload, path_colour) + . = ..() + if(path_colour) + greyscale_colours = path_colour + do_animation() //Needed so the colour applies right the first time it is used. Don't ask + +/obj/effect/temp_visual/drawing_heretic_rune + duration = 30 SECONDS + icon = 'icons/effects/96x96.dmi' + icon_state = null + pixel_x = -30 + pixel_y = 18 + pixel_z = -48 + plane = FLOOR_PLANE + layer = SIGIL_LAYER + /// We only set this state after setting the colour, otherwise the animation doesn't colour correctly + var/animation_state = "transmutation_rune_draw_colour" + /// What the blend state is + var/blend_state = "transmutation_rune_draw_white" + +/obj/effect/temp_visual/drawing_heretic_rune/Initialize(mapload, path_colour = COLOR_LIME) + icon_state = animation_state + var/mutable_appearance/theme_icon = mutable_appearance('icons/effects/96x96.dmi', blend_state, FLOAT_LAYER - 1, appearance_flags = appearance_flags | RESET_TRANSFORM, color = path_colour) + theme_icon.blend_mode = BLEND_MULTIPLY + add_overlay(theme_icon) + var/image/silicon_image = image(icon = 'icons/effects/eldritch.dmi', icon_state = null, loc = src) + silicon_image.override = TRUE + add_alt_appearance("heretic_rune", silicon_image, GLOB.silicon_mob_list) + . = ..() + + +/obj/effect/temp_visual/drawing_heretic_rune/fast + duration = 12 SECONDS + animation_state = "transmutation_rune_fast_colour" + blend_state = "transmutation_rune_fast_white" + +/obj/effect/temp_visual/drawing_heretic_rune/fail + duration = 0.25 SECONDS + animation_state = "transmutation_rune_fail_colour" + blend_state = "transmutation_rune_fail_white" diff --git a/code/modules/asset_cache/validate_assets.html b/code/modules/asset_cache/validate_assets.html index 9728bb5c285b..4254e28b85c7 100644 --- a/code/modules/asset_cache/validate_assets.html +++ b/code/modules/asset_cache/validate_assets.html @@ -15,9 +15,9 @@ xhr.open('GET', 'asset_data.json', true); xhr.responseType = 'text'; xhr.onreadystatechange = function () { - if (xhr.readyState === 4) { + if(xhr.readyState === 4) { var status = xhr.status; - if (status >= 200 && status < 400) { + if(status >= 200 && status < 400) { sendbyond('asset_cache_preload_data=' + encodeURIComponent(xhr.responseText)); } } diff --git a/code/modules/atmospherics/environmental/LINDA_fire.dm b/code/modules/atmospherics/environmental/LINDA_fire.dm index 234aa4a500d7..4b96e88e0171 100644 --- a/code/modules/atmospherics/environmental/LINDA_fire.dm +++ b/code/modules/atmospherics/environmental/LINDA_fire.dm @@ -107,7 +107,7 @@ if(burn_time) QDEL_IN(src, burn_time) -/proc/fireflash(atom/center, radius, temp) +/proc/fireflash(atom/center, radius, temp, faker) if(!temp) temp = rand(2800, 3200) for(var/turf/T in view(radius, get_turf(center))) diff --git a/code/modules/buildmode/bm_mode.dm b/code/modules/buildmode/bm_mode.dm index 4f1d185532b8..78cb4cbf4971 100644 --- a/code/modules/buildmode/bm_mode.dm +++ b/code/modules/buildmode/bm_mode.dm @@ -24,7 +24,7 @@ /datum/buildmode_mode/proc/exit_mode(datum/click_intercept/buildmode/BM) return -/datum/buildmode_mode/proc/get_button_iconstate() +/datum/buildmode_mode/proc/get_button_overlay_iconstate() return "buildmode_[key]" /datum/buildmode_mode/proc/show_help(mob/user) diff --git a/code/modules/buildmode/buildmode.dm b/code/modules/buildmode/buildmode.dm index 0035bfbb491a..0dfe04f90433 100644 --- a/code/modules/buildmode/buildmode.dm +++ b/code/modules/buildmode/buildmode.dm @@ -108,6 +108,7 @@ /datum/click_intercept/buildmode/InterceptClickOn(user, params, atom/object) mode.handle_click(user, params, object) + return TRUE /proc/togglebuildmode(mob/M in GLOB.player_list) set name = "Toggle Build Mode" diff --git a/code/modules/buildmode/buildmode_hud.dm b/code/modules/buildmode/buildmode_hud.dm index 3c26c03be6cc..cf8852c5d8e8 100644 --- a/code/modules/buildmode/buildmode_hud.dm +++ b/code/modules/buildmode/buildmode_hud.dm @@ -27,7 +27,7 @@ return TRUE /atom/movable/screen/buildmode/mode/update_icon_state() - icon_state = bd.mode.get_button_iconstate() + icon_state = bd.mode.get_button_overlay_iconstate() /atom/movable/screen/buildmode/help icon_state = "buildhelp" diff --git a/code/modules/clothing/suits/hood.dm b/code/modules/clothing/suits/hood.dm index 0647bd233e6d..88748d526329 100644 --- a/code/modules/clothing/suits/hood.dm +++ b/code/modules/clothing/suits/hood.dm @@ -59,6 +59,8 @@ /obj/item/clothing/suit/hooded/proc/ToggleHood() if(!suit_adjusted) if(ishuman(loc)) + if(!try_to_deploy()) + return var/mob/living/carbon/human/H = loc if(H.wear_suit != src) to_chat(H,"You must be wearing [src] to put up the hood!") @@ -73,6 +75,8 @@ for(var/X in actions) var/datum/action/A = X A.UpdateButtons() + on_hood_deploy() + else if((hood?.flags & NODROP) && respects_nodrop) if(ishuman(loc)) @@ -81,6 +85,12 @@ return RemoveHood() +/obj/item/clothing/suit/hooded/proc/try_to_deploy() + return TRUE + +/obj/item/clothing/suit/hooded/proc/on_hood_deploy() + return + /obj/item/clothing/head/hooded var/obj/item/clothing/suit/hooded/suit diff --git a/code/modules/clothing/suits/suit_storage.dm b/code/modules/clothing/suits/suit_storage.dm index 2e1839c32b76..c13c09f863b3 100644 --- a/code/modules/clothing/suits/suit_storage.dm +++ b/code/modules/clothing/suits/suit_storage.dm @@ -1,10 +1,10 @@ /obj/item/clothing/suit/storage - var/obj/item/storage/internal/pockets + var/obj/item/storage/internal/pockets = /obj/item/storage/internal w_class = WEIGHT_CLASS_NORMAL //we don't want these to be able to fit in their own pockets. /obj/item/clothing/suit/storage/Initialize(mapload) . = ..() - pockets = new/obj/item/storage/internal(src) + pockets = new pockets(src) pockets.storage_slots = 2 //two slots pockets.max_w_class = WEIGHT_CLASS_SMALL //fit only pocket sized items pockets.max_combined_w_class = 4 diff --git a/code/modules/mining/ores_coins.dm b/code/modules/mining/ores_coins.dm index 6c794e4b8d5b..6c4195347256 100644 --- a/code/modules/mining/ores_coins.dm +++ b/code/modules/mining/ores_coins.dm @@ -345,12 +345,15 @@ GLOBAL_LIST_INIT(sand_recipes, list(\ force = 1 throwforce = 2 w_class = WEIGHT_CLASS_TINY + new_attack_chain = TRUE var/string_attached var/list/sideslist = list("heads","tails") var/cmineral = null var/name_by_cmineral = TRUE var/cooldown = 0 var/credits = 10 + var/has_action = FALSE + var/heads_name = "heads" /obj/item/coin/Initialize(mapload) . = ..() @@ -395,10 +398,10 @@ GLOBAL_LIST_INIT(sand_recipes, list(\ if(!QDELETED(src) && !P.nodamage && (P.damage_type == BURN)) log_and_set_aflame(P.firer, P) -/obj/item/coin/plasma/attackby__legacy__attackchain(obj/item/I, mob/living/user, params) - if(!I.get_heat()) - return ..() - log_and_set_aflame(user, I) +/obj/item/coin/plasma/attack_by(obj/item/attacking, mob/user, params) + if(..() || !attacking.get_heat()) + return FINISH_ATTACK + log_and_set_aflame(user, attacking) /obj/item/coin/plasma/proc/log_and_set_aflame(mob/user, obj/item/I) var/turf/T = get_turf(src) @@ -421,8 +424,9 @@ GLOBAL_LIST_INIT(sand_recipes, list(\ credits = 160 COOLDOWN_DECLARE(radiation_cooldown) -/obj/item/coin/uranium/attack_self__legacy__attackchain(mob/user) - ..() +/obj/item/coin/uranium/activate_self(mob/user) + if(..()) + return if(!COOLDOWN_FINISHED(src, radiation_cooldown)) return radiation_pulse(src, 50) @@ -469,14 +473,17 @@ GLOBAL_LIST_INIT(sand_recipes, list(\ sideslist = list("valid", "salad") credits = 20 name_by_cmineral = FALSE + heads_name = "valid" /obj/item/coin/antagtoken/syndicate name = "syndicate coin" credits = 160 -/obj/item/coin/attackby__legacy__attackchain(obj/item/W as obj, mob/user as mob, params) - if(istype(W, /obj/item/stack/cable_coil)) - var/obj/item/stack/cable_coil/CC = W +/obj/item/coin/attack_by(obj/item/attacking, mob/user, params) + if(..()) + return FINISH_ATTACK + if(istype(attacking, /obj/item/stack/cable_coil)) + var/obj/item/stack/cable_coil/CC = attacking if(string_attached) to_chat(user, "There already is a string attached to this coin.") return @@ -489,7 +496,7 @@ GLOBAL_LIST_INIT(sand_recipes, list(\ to_chat(user, "You need one length of cable to attach a string to the coin.") return - else if(istype(W,/obj/item/wirecutters)) + else if(istype(attacking, /obj/item/wirecutters)) if(!string_attached) ..() return @@ -521,8 +528,13 @@ GLOBAL_LIST_INIT(sand_recipes, list(\ user.put_in_hands(ring) -/obj/item/coin/attack_self__legacy__attackchain(mob/user as mob) +/obj/item/coin/activate_self(mob/user) + if(..()) + return if(cooldown < world.time - 15) + if(string_attached) //does the coin have a wire attached + to_chat(user, "The coin won't flip very well with something attached!" ) + return FALSE//do not flip the coin var/coinflip = pick(sideslist) cooldown = world.time flick("coin_[cmineral]_flip", src) @@ -535,6 +547,76 @@ GLOBAL_LIST_INIT(sand_recipes, list(\ user.visible_message("[user] has flipped [src]. It lands on [coinflip].", \ "You flip [src]. It lands on [coinflip].", \ blind_sound) + if(has_action) + if(coinflip == heads_name) + heads_action(user) + else + tails_action(user) + +/obj/item/coin/proc/heads_action(mob/user) + return + +/obj/item/coin/proc/tails_action(mob/user) + return + +/obj/item/coin/eldritch + name = "eldritch coin" + desc = "A surprisingly heavy, ornate coin. Its sides seem to depict a different image each time you look." + icon_state = "coin_heretic_heretic" + cmineral = "heretic" + materials = list(MAT_DIAMOND = 1000, MAT_PLASMA = 1000) + sideslist = list("heretic", "blade") + heads_name = "heretic" + has_action = TRUE + /// The range at which airlocks are effected. + var/airlock_range = 5 + +/obj/item/coin/eldritch/heads_action(mob/user) + var/mob/living/living_user = user + if(!IS_HERETIC(user)) + living_user.adjustBruteLoss(5) + if(prob(90)) + return + for(var/obj/machinery/door/airlock/target_airlock in range(airlock_range, user)) + if(target_airlock.density) + INVOKE_ASYNC(src, PROC_REF(try_open_airlock), target_airlock) + continue + INVOKE_ASYNC(src, PROC_REF(try_close_airlock), target_airlock) + +/obj/item/coin/eldritch/proc/try_open_airlock(obj/machinery/door/airlock/ourlock) + ourlock.open() + +/obj/item/coin/eldritch/proc/try_close_airlock(obj/machinery/door/airlock/ourlock) + if(ourlock.safe) + ourlock.safe = FALSE + ourlock.close() + ourlock.safe = TRUE + +/obj/item/coin/eldritch/tails_action(mob/user) + var/mob/living/living_user = user + if(!IS_HERETIC(user)) + living_user.adjustFireLoss(5) + if(prob(90)) + return + for(var/obj/machinery/door/airlock/target_airlock in range(airlock_range, user)) + if(target_airlock.locked) + target_airlock.unlock() + continue + target_airlock.lock() + +/obj/item/coin/eldritch/interact_with_atom(atom/target, mob/living/user, list/modifiers) + if(!istype(target, /obj/machinery/door/airlock)) + return NONE + if(!IS_HERETIC(user)) + user.adjustBruteLoss(5) + user.adjustFireLoss(5) + return ITEM_INTERACT_COMPLETE + var/obj/machinery/door/airlock/target_airlock = target + to_chat(user, "You insert [src] into the airlock.") + target_airlock.emag_act(user, src) + qdel(src) + return ITEM_INTERACT_COMPLETE + #undef GIBTONITE_QUALITY_LOW #undef GIBTONITE_QUALITY_MEDIUM diff --git a/code/modules/mob/dead/observer/orbit.dm b/code/modules/mob/dead/observer/orbit.dm index 53bb48cb309e..6457f45fc80e 100644 --- a/code/modules/mob/dead/observer/orbit.dm +++ b/code/modules/mob/dead/observer/orbit.dm @@ -108,6 +108,7 @@ GLOBAL_DATUM_INIT(orbit_menu, /datum/orbit_menu, new) - changelings - revolutionaries/headrevs - event + - Heretic (I think?) */ for(var/_A in mind.antag_datums) var/datum/antagonist/A = _A diff --git a/code/modules/mob/inventory_procs.dm b/code/modules/mob/inventory_procs.dm index 6f886977818d..08dcfc3d6154 100644 --- a/code/modules/mob/inventory_procs.dm +++ b/code/modules/mob/inventory_procs.dm @@ -40,6 +40,13 @@ if(istype(r_hand, typepath)) return r_hand +// List version of above proc +// Returns ret_item, which is either the successfully located item or null +/mob/proc/is_holding_item_of_types(list/typepaths) + for(var/typepath in typepaths) + var/ret_item = is_holding_item_of_type(typepath) + return ret_item + //Returns the thing in our inactive hand /mob/proc/get_inactive_hand() if(hand) return r_hand diff --git a/code/modules/mob/living/carbon/alien/alien_base.dm b/code/modules/mob/living/carbon/alien/alien_base.dm index 557757b751e7..086bc81b3114 100644 --- a/code/modules/mob/living/carbon/alien/alien_base.dm +++ b/code/modules/mob/living/carbon/alien/alien_base.dm @@ -60,10 +60,10 @@ return speech_verb -/mob/living/carbon/alien/adjustToxLoss(amount) +/mob/living/carbon/alien/adjustToxLoss(amount, updating_health = TRUE) return STATUS_UPDATE_NONE -/mob/living/carbon/alien/adjustFireLoss(amount) // Weak to Fire +/mob/living/carbon/alien/adjustFireLoss(amount, updating_health = TRUE) // Weak to Fire if(amount > 0) return ..(amount * 1.5) else diff --git a/code/modules/mob/living/carbon/carbon_status_procs.dm b/code/modules/mob/living/carbon/carbon_status_procs.dm index 7448ec8262ab..8222b2c453b8 100644 --- a/code/modules/mob/living/carbon/carbon_status_procs.dm +++ b/code/modules/mob/living/carbon/carbon_status_procs.dm @@ -17,3 +17,11 @@ ADD_TRAIT(src, TRAIT_HANDS_BLOCKED, STAM_CRIT) if(!prev && getStaminaLoss() < 120) // Puts you a little further into the initial stamcrit, makes stamcrit harder to outright counter with chems. adjustStaminaLoss(30, FALSE) + +/mob/living/carbon/adjust_disgust(amount, max = DISGUST_LEVEL_MAXEDOUT) + var/datum/status_effect/transient/disgust/D = has_status_effect(/datum/status_effect/transient/disgust) + if(!D) + D = apply_status_effect(/datum/status_effect/transient/disgust, amount) + if(D) + D.strength += amount + return D diff --git a/code/modules/mob/living/carbon/carbon_update_status.dm b/code/modules/mob/living/carbon/carbon_update_status.dm index 5b1d89a4da6c..c90867962292 100644 --- a/code/modules/mob/living/carbon/carbon_update_status.dm +++ b/code/modules/mob/living/carbon/carbon_update_status.dm @@ -7,7 +7,7 @@ death() create_debug_log("died of damage, trigger reason: [reason]") return - if(HAS_TRAIT(src, TRAIT_KNOCKEDOUT) || (check_death_method() && getOxyLoss() > 50) || HAS_TRAIT(src, TRAIT_FAKEDEATH) || health < HEALTH_THRESHOLD_KNOCKOUT && check_death_method() || health <= HEALTH_THRESHOLD_DEAD) // In case anyone is wondering where oldcrit is handled, it's here. + if(HAS_TRAIT(src, TRAIT_KNOCKEDOUT) || (check_death_method() && getOxyLoss() > 50) || ((HAS_TRAIT(src, TRAIT_FAKEDEATH) && !has_status_effect(/datum/status_effect/ghoul))) || health < HEALTH_THRESHOLD_KNOCKOUT && check_death_method() || health <= HEALTH_THRESHOLD_DEAD) // In case anyone is wondering where oldcrit is handled, it's here. if(stat == CONSCIOUS) KnockOut() create_debug_log("fell unconscious, trigger reason: [reason]") diff --git a/code/modules/mob/living/carbon/give.dm b/code/modules/mob/living/carbon/give.dm index 2b79b1f307d4..d1dc273d281c 100644 --- a/code/modules/mob/living/carbon/give.dm +++ b/code/modules/mob/living/carbon/give.dm @@ -85,24 +85,25 @@ /datum/click_intercept/give/InterceptClickOn(mob/user, params, atom/object) if(user == object || !ishuman(object)) - return + return TRUE var/mob/living/carbon/human/receiver = object if(receiver.stat != CONSCIOUS) to_chat(user, "[receiver] can't accept any items because they're not conscious!") - return + return TRUE var/obj/item/I = user.get_active_hand() if(!user.Adjacent(receiver)) to_chat(user, "You need to be closer to [receiver] to offer them [I].") - return + return TRUE if(!receiver.client) to_chat(user, "You offer [I] to [receiver], but they don't seem to respond...") - return + return TRUE // We use UID() here so that the receiver can have more then one give request at one time. // Otherwise, throwing a new "take item" alert would override any current one also named "take item". receiver.throw_alert("take item [I.UID()]", /atom/movable/screen/alert/take_item, alert_args = list(user, receiver, I)) item_offered = TRUE // TRUE so we don't give them the default chat message in Destroy. to_chat(user, "You offer [I] to [receiver].") qdel(src) + return TRUE /** diff --git a/code/modules/mob/living/carbon/human/human_damage.dm b/code/modules/mob/living/carbon/human/human_damage.dm index e0f3c1d304f3..f3720287fc32 100644 --- a/code/modules/mob/living/carbon/human/human_damage.dm +++ b/code/modules/mob/living/carbon/human/human_damage.dm @@ -185,7 +185,7 @@ unmutateAllBodyparts() // Defined here solely to take species flags into account without having to recast at mob/living level. -/mob/living/carbon/human/adjustOxyLoss(amount) +/mob/living/carbon/human/adjustOxyLoss(amount, updating_health) if(dna.species && amount > 0) amount *= dna.species.oxy_mod . = ..() @@ -195,7 +195,7 @@ amount *= dna.species.oxy_mod . = ..() -/mob/living/carbon/human/adjustToxLoss(amount) +/mob/living/carbon/human/adjustToxLoss(amount, updating_health = TRUE) if(dna.species && amount > 0) amount *= dna.species.tox_mod . = ..() diff --git a/code/modules/mob/living/carbon/human/human_life.dm b/code/modules/mob/living/carbon/human/human_life.dm index 83785afae091..30fe4ac7fa56 100644 --- a/code/modules/mob/living/carbon/human/human_life.dm +++ b/code/modules/mob/living/carbon/human/human_life.dm @@ -198,7 +198,7 @@ var/loc_temp = get_temperature(readonly_environment) //Body temperature is adjusted in two steps. Firstly your body tries to stabilize itself a bit. - if(stat != DEAD) + if(stat != DEAD || !HAS_TRAIT(src, TRAIT_HYPOTHERMIC)) stabilize_temperature_from_calories() //After then, it reacts to the surrounding atmosphere based on your thermal protection @@ -208,7 +208,7 @@ var/thermal_protection = get_cold_protection(loc_temp) //This returns a 0 - 1 value, which corresponds to the percentage of protection based on what you're wearing and what you're exposed to. if(thermal_protection < 1) bodytemperature += min((1-thermal_protection) * ((loc_temp - bodytemperature) / BODYTEMP_COLD_DIVISOR), BODYTEMP_COOLING_MAX) - else + else if(!HAS_TRAIT(src, TRAIT_HYPOTHERMIC)) //Place is hotter than we are var/thermal_protection = get_heat_protection(loc_temp) //This returns a 0 - 1 value, which corresponds to the percentage of protection based on what you're wearing and what you're exposed to. if(thermal_protection < 1) diff --git a/code/modules/mob/living/carbon/human/human_mob.dm b/code/modules/mob/living/carbon/human/human_mob.dm index debe4bc06aab..0dae106b673f 100644 --- a/code/modules/mob/living/carbon/human/human_mob.dm +++ b/code/modules/mob/living/carbon/human/human_mob.dm @@ -209,6 +209,8 @@ /mob/living/carbon/human/ex_act(severity) if(status_flags & GODMODE) return FALSE + if(HAS_TRAIT(src, TRAIT_BOMBIMMUNE)) + return var/brute_loss = 0 var/burn_loss = 0 @@ -981,6 +983,29 @@ ..() + +/mob/living/carbon/human/heal_and_revive(heal_to = 75, revive_message) + // We can't heal them if they're missing a heart + if(!get_int_organ_datum(ORGAN_DATUM_HEART) && can_heartattack()) + return FALSE + + // We can't heal them if they're missing their lungs + if(!HAS_TRAIT(src, TRAIT_NOBREATH) && !get_int_organ_datum(ORGAN_DATUM_LUNGS)) + return FALSE + + . = ..() + if(.) // if revived successfully + set_heartattack(FALSE) + SetLoseBreath(0) + + return . + +/mob/living/carbon/can_be_revived() + if(!get_int_organ(/obj/item/organ/internal/brain) && (!IS_CHANGELING(src)) || HAS_TRAIT(src, TRAIT_HUSK) && !ismachineperson(src)) + return FALSE + return ..() + + /mob/living/carbon/human/proc/is_lung_ruptured() var/datum/organ/lungs/L = get_int_organ_datum(ORGAN_DATUM_LUNGS) diff --git a/code/modules/mob/living/init_signals.dm b/code/modules/mob/living/init_signals.dm index adf03cbff7e4..9e061adf04e4 100644 --- a/code/modules/mob/living/init_signals.dm +++ b/code/modules/mob/living/init_signals.dm @@ -153,7 +153,9 @@ /// Called when [TRAIT_FAKEDEATH] is added to the mob. /mob/living/proc/on_fakedeath_trait_gain(datum/source) SIGNAL_HANDLER - ADD_TRAIT(src, TRAIT_KNOCKEDOUT, TRAIT_FAKEDEATH) + if(!has_status_effect(/datum/status_effect/ghoul)) + ADD_TRAIT(src, TRAIT_KNOCKEDOUT, TRAIT_FAKEDEATH) //Let us not make ghouls sleep forever + apply_status_effect(STATUS_EFFECT_REVIVABLE) /mob/living/carbon/human/on_fakedeath_trait_gain(datum/source) diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 61aa7959a246..e7b0eca1a561 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -580,6 +580,58 @@ stand_up() // wake the fuck up badmin, we've got an "event" to burn return +/** + * Heals up the mob up to [heal_to] of the main damage types. + * EX: If heal_to is 50, and they have 150 brute damage, they will heal 100 brute (up to 50 brute damage) + * + * If the target is dead, also revives them and heals their organs / restores blood. + * If we have a [revive_message], play a visible message if the revive was successful. + * + * Arguments + * * heal_to - the health threshold to heal the mob up to for each of the main damage types. + * * revive_message - if provided, a visible message to show on a successful revive. + * + * Returns TRUE if the mob is alive afterwards, or FALSE if they're still dead (revive failed). + */ +/mob/living/proc/heal_and_revive(heal_to = 50, revive_message) + + // Heal their brute and burn up to the threshold we're looking for + var/brute_to_heal = heal_to - getBruteLoss() + var/burn_to_heal = heal_to - getFireLoss() + var/oxy_to_heal = heal_to - getOxyLoss() + var/tox_to_heal = heal_to - getToxLoss() + if(brute_to_heal < 0) + adjustBruteLoss(brute_to_heal, updating_health = FALSE) + if(burn_to_heal < 0) + adjustFireLoss(burn_to_heal, updating_health = FALSE) + if(oxy_to_heal < 0) + adjustOxyLoss(oxy_to_heal, updating_health = FALSE) + if(tox_to_heal < 0) + adjustToxLoss(tox_to_heal, updating_health = FALSE) + + // Run updatehealth once to set health for the revival check + updatehealth() + + // We've given them a decent heal. + // If they happen to be dead too, try to revive them - if possible. + if(stat == DEAD && can_be_revived()) + // If the revive is successful, show our revival message (if present). + if(update_revive()) + visible_message(revive_message) + + // Finally update health again after we're all done + updatehealth() + + return stat != DEAD + + +/// Checks if we are actually able to ressuscitate this mob. +/// (We don't want to revive then to have them instantly die again) +/mob/living/proc/can_be_revived() + if(health <= HEALTH_THRESHOLD_DEAD) + return FALSE + return TRUE + /mob/living/proc/remove_CC() SetWeakened(0) SetKnockDown(0) diff --git a/code/modules/mob/living/living_life.dm b/code/modules/mob/living/living_life.dm index ebd0c6781e5f..702f427795ac 100644 --- a/code/modules/mob/living/living_life.dm +++ b/code/modules/mob/living/living_life.dm @@ -2,6 +2,11 @@ set waitfor = FALSE set invisibility = 0 + var/signal_result = SEND_SIGNAL(src, COMSIG_LIVING_LIFE, seconds, times_fired) + + if(signal_result & COMPONENT_LIVING_CANCEL_LIFE_PROCESSING) // mmm less work + return + if(HAS_TRAIT(src, TRAIT_FLYING) && !floating) //TODO: Better floating float(TRUE) diff --git a/code/modules/mob/living/living_say.dm b/code/modules/mob/living/living_say.dm index a501a7e75087..4ee3b1b8c058 100644 --- a/code/modules/mob/living/living_say.dm +++ b/code/modules/mob/living/living_say.dm @@ -86,6 +86,10 @@ GLOBAL_LIST_EMPTY(channel_to_radio_key) S.message = cultslur(S.message) verb = "slurs" + if(AmountHereticSlurring()) + S.message = hereticslur(S.message) + verb = "slurs" + if(!IsVocal() || HAS_TRAIT(src, TRAIT_MUTE)) S.message = "" return list("verb" = verb) diff --git a/code/modules/mob/living/living_status_procs.dm b/code/modules/mob/living/living_status_procs.dm index 97433d8b3fda..2f66b9cb86b3 100644 --- a/code/modules/mob/living/living_status_procs.dm +++ b/code/modules/mob/living/living_status_procs.dm @@ -571,6 +571,20 @@ STATUS EFFECTS /mob/living/proc/AdjustCultSlur(amount, bound_lower = 0, bound_upper = 5 MINUTES) SetCultSlur(directional_bounded_sum(AmountCultSlurring(), amount, bound_lower, bound_upper)) +// Hereticslurring +/mob/living/proc/AmountHereticSlurring() + RETURN_STATUS_EFFECT_STRENGTH(STATUS_EFFECT_HERETIC_SLUR) + +/mob/living/proc/HereticSlur(amount) + SetHereticSlur(max(AmountHereticSlurring(), amount)) + +/mob/living/proc/SetHereticSlur(amount) + SET_STATUS_EFFECT_STRENGTH(STATUS_EFFECT_HERETIC_SLUR, amount) + +/mob/living/proc/AdjustHereticSlur(amount, bound_lower = 0, bound_upper = 5 MINUTES) + SetHereticSlur(directional_bounded_sum(AmountHereticSlurring(), amount, bound_lower, bound_upper)) + + /* STUN */ /mob/living/proc/IsStunned() //If we're stunned return has_status_effect(STATUS_EFFECT_STUN) @@ -910,6 +924,11 @@ STATUS EFFECTS /mob/living/proc/reset_shocked() flags_2 &= ~ SHOCKED_2 +///Adjust the disgust level of a mob +/mob/proc/adjust_disgust(amount) + return + + #undef RETURN_STATUS_EFFECT_STRENGTH #undef SET_STATUS_EFFECT_STRENGTH diff --git a/code/modules/mob/living/silicon/decoy/decoy.dm b/code/modules/mob/living/silicon/decoy/decoy.dm index 9e589873c6e7..1e5a28a6d362 100644 --- a/code/modules/mob/living/silicon/decoy/decoy.dm +++ b/code/modules/mob/living/silicon/decoy/decoy.dm @@ -45,12 +45,12 @@ raise_alert() . = ..(pass) -/mob/living/silicon/decoy/syndicate/depot/adjustBruteLoss(dmg) - . = ..(dmg) +/mob/living/silicon/decoy/syndicate/depot/adjustBruteLoss(ammount, updating_health) + . = ..(ammount) updatehealth() -/mob/living/silicon/decoy/syndicate/depot/adjustFireLoss(dmg) - . = ..(dmg) +/mob/living/silicon/decoy/syndicate/depot/adjustFireLoss(ammount, updating_health) + . = ..(ammount) updatehealth() /mob/living/silicon/decoy/syndicate/depot/ex_act(severity) diff --git a/code/modules/mob/living/silicon/robot/robot_mob.dm b/code/modules/mob/living/silicon/robot/robot_mob.dm index 40e5b89fe362..11a0fc7d1740 100644 --- a/code/modules/mob/living/silicon/robot/robot_mob.dm +++ b/code/modules/mob/living/silicon/robot/robot_mob.dm @@ -1512,7 +1512,7 @@ GLOBAL_LIST_INIT(robot_verbs_default, list( module.rebuild_modules() //This way, if a borg gets linked to a malf AI that has upgrades, they get their upgrades. sync() -/mob/living/silicon/robot/adjustOxyLoss(amount) +/mob/living/silicon/robot/adjustOxyLoss(amount, updating_health) if(suiciding) return ..() else diff --git a/code/modules/mob/living/silicon/silicon_mob.dm b/code/modules/mob/living/silicon/silicon_mob.dm index d4d5dca09d37..ab00c3039ff2 100644 --- a/code/modules/mob/living/silicon/silicon_mob.dm +++ b/code/modules/mob/living/silicon/silicon_mob.dm @@ -439,7 +439,7 @@ if("None") to_chat(src, "Sensor augmentations disabled.") -/mob/living/silicon/adjustToxLoss(amount) +/mob/living/silicon/adjustToxLoss(amount, updating_health = TRUE) return STATUS_UPDATE_NONE /mob/living/silicon/get_access() @@ -596,3 +596,6 @@ /mob/living/silicon/plushify(plushie_override, curse_time) . = ..(/obj/item/toy/plushie/borgplushie, curse_time) + +/mob/living/silicon/rust_heretic_act() + adjustBruteLoss(500) diff --git a/code/modules/mob/living/simple_animal/constructs.dm b/code/modules/mob/living/simple_animal/constructs.dm index 32838493cf25..73c818d5ad5c 100644 --- a/code/modules/mob/living/simple_animal/constructs.dm +++ b/code/modules/mob/living/simple_animal/constructs.dm @@ -327,6 +327,47 @@ AIStatus = AI_ON environment_smash = 1 //only token destruction, don't smash the cult wall NO STOP +/mob/living/simple_animal/hostile/construct/harvester/heretic + name = "Rusted Harvester" + real_name = "Rusted Harvester" + desc = "A long, thin, decrepit construct originally built to herald Nar'Sie's rise, corrupted and rusted by the forces of the Mansus to spread its will instead." + playstyle_string = "You are a Rusted Harvester, built to serve the Sanguine Apostate, twisted to work the will of the Mansus. You are fragile and weak, but you rend cultists (only) apart on each attack. Follow your Master's orders!" + faction = list("heretic") + construct_spells = list( + /datum/spell/aoe/rust_conversion, + /datum/spell/pointed/rust_construction, + ) + +/mob/living/simple_animal/hostile/construct/harvester/heretic/Initialize(mapload) + . = ..() + AddElement(/datum/element/leeching_walk) + ADD_TRAIT(src, TRAIT_MANSUS_TOUCHED, UID()) + add_filter("rusted_harvester", 3, list("type" = "outline", "color" = COLOR_GREEN, "size" = 2, "alpha" = 40)) + + +/mob/living/simple_animal/hostile/construct/harvester/heretic/attack_animal(mob/living/simple_animal/user, list/modifiers) + // They're pretty fragile so this is probably necessary to prevent bullshit deaths. + if(user == src) + return + return ..() + + +/mob/living/simple_animal/hostile/construct/harvester/heretic/Life(seconds, times_fired) + . = ..() + + for(var/mob/living/living_victims in range(3, src)) + if(IS_HERETIC_OR_MONSTER(living_victims)) + continue + living_victims.adjustBruteLoss(0.5, FALSE) + living_victims.adjustFireLoss(0.5, FALSE) + living_victims.adjustToxLoss(0.5, FALSE) + living_victims.apply_damage(4, STAMINA) + var/turf/adjacent = get_step(src, pick(GLOB.alldirs)) + // 90% chance to be directional, otherwise what we're on top of + var/turf/simulated/land = (issimulatedturf(adjacent) && prob(90)) ? adjacent : get_turf(src) + do_rust_heretic_act(land) + + /mob/living/simple_animal/hostile/construct/proteon name = "Proteon" real_name = "Proteon" diff --git a/code/modules/mob/living/simple_animal/hostile/heretic_monsters.dm b/code/modules/mob/living/simple_animal/hostile/heretic_monsters.dm new file mode 100644 index 000000000000..e860c9b0d999 --- /dev/null +++ b/code/modules/mob/living/simple_animal/hostile/heretic_monsters.dm @@ -0,0 +1,162 @@ +/mob/living/simple_animal/hostile/heretic_summon + name = "Eldritch Demon" + real_name = "Eldritch Demon" + desc = "A horror from beyond this realm." + icon = 'icons/mob/eldritch_mobs.dmi' + gender = NEUTER + mob_biotypes = NONE + attack_sound = 'sound/weapons/punch1.ogg' + response_help = "thinks better of touching" + response_disarm = "flails at" + response_harm = "reaps" + speak_emote = list("screams") + speak_chance = 1 + speed = 0 + stop_automated_movement = TRUE + a_intent = INTENT_HARM + AIStatus = AI_OFF + damage_coeff = list(BRUTE = 1, BURN = 1, TOX = 0, CLONE = 0, STAMINA = 0, OXY = 0) + atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_plas" = 0, "max_plas" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0) + minbodytemp = 0 + maxbodytemp = INFINITY + pressure_resistance = 100 + del_on_death = TRUE + deathmessage = "implodes into itself." + loot = list(/obj/effect/gibspawner/human) + faction = list("heretic") + + /// Innate spells that are added when a beast is created. + var/list/actions_to_add + +/mob/living/simple_animal/hostile/heretic_summon/Initialize(mapload) + . = ..() + for(var/spell in actions_to_add) + var/datum/spell/new_spell = new spell(src) + AddSpell(new_spell) + +/mob/living/simple_animal/hostile/heretic_summon/rust_spirit + name = "Rust Walker" + real_name = "Rusty" + desc = "An incomprehensible abomination. Everywhere it steps, it appears to be actively seeping life out of its surroundings." + icon_state = "rust_walker_s" + icon_living = "rust_walker_s" + status_flags = CANPUSH + maxHealth = 75 + health = 75 + melee_damage_lower = 15 + melee_damage_upper = 20 + sight = SEE_TURFS + actions_to_add = list( + /datum/spell/aoe/rust_conversion/construct, + /datum/spell/fireball/rust_wave/short, + ) + +/mob/living/simple_animal/hostile/heretic_summon/rust_spirit/setDir(newdir) + . = ..() + if(newdir == NORTH) + icon_state = "rust_walker_n" + else if(newdir == SOUTH) + icon_state = "rust_walker_s" + update_appearance(UPDATE_ICON_STATE) + +/mob/living/simple_animal/hostile/heretic_summon/rust_spirit/Moved(atom/old_loc, movement_dir, forced, list/old_locs, momentum_change = TRUE) + . = ..() + playsound(src, 'sound/effects/footstep/rustystep1.ogg', 100, TRUE) + +/mob/living/simple_animal/hostile/heretic_summon/rust_spirit/Life(seconds, times_fired) + if(stat == DEAD) + return ..() + + var/turf/our_turf = get_turf(src) + if(HAS_TRAIT(our_turf, TRAIT_RUSTY)) + adjustBruteLoss(-1.5) + adjustFireLoss(-1.5) + + return ..() + +/mob/living/simple_animal/hostile/heretic_summon/ash_spirit + name = "Ash Man" + real_name = "Ashy" + desc = "An incomprehensible abomination. As it moves, a thin trail of ash follows, appearing from seemingly nowhere." + icon_state = "ash_walker" + icon_living = "ash_walker" + status_flags = CANPUSH + maxHealth = 75 + health = 75 + melee_damage_lower = 15 + melee_damage_upper = 20 + sight = SEE_TURFS + actions_to_add = list( + /datum/spell/ethereal_jaunt/ash, + /datum/spell/pointed/cleave, + /datum/spell/fire_sworn, + ) + +/mob/living/simple_animal/hostile/heretic_summon/stalker + name = "Flesh Stalker" + real_name = "Flesh Stalker" + desc = "An abomination made from several limbs and organs. Every moment you stare at it, it appears to shift and change unnaturally." + icon_state = "stalker" + icon_living = "stalker" + status_flags = CANPUSH + maxHealth = 150 + health = 150 + melee_damage_lower = 15 + melee_damage_upper = 20 + sight = SEE_MOBS + actions_to_add = list( + /datum/spell/ethereal_jaunt/ash, + /datum/spell/emplosion/heretic, + ) + +/mob/living/simple_animal/hostile/heretic_summon/raw_prophet + name = "Raw Prophet" + real_name = "Raw Prophet" + desc = "An abomination stitched together from a few severed arms and one lost eye." + icon_state = "raw_prophet" + icon_living = "raw_prophet" + status_flags = CANPUSH + melee_damage_lower = 5 + melee_damage_upper = 10 + maxHealth = 65 + health = 65 + sight = SEE_MOBS|SEE_OBJS|SEE_TURFS + loot = list(/obj/effect/gibspawner/human, /obj/item/organ/external/arm, /obj/item/organ/internal/eyes) + actions_to_add = list( + /datum/spell/ethereal_jaunt/ash/long, + /datum/spell/remotetalk/eldritch, + /datum/spell/blind/eldritch, + ) + /// The UID to the last target we smacked. Hitting targets consecutively does more damage. + var/last_target + +/mob/living/simple_animal/hostile/heretic_summon/raw_prophet/attack_animal(mob/living/simple_animal/user, list/modifiers) + if(user == src) // Easy to hit yourself + very fragile = accidental suicide, prevent that + return + + return ..() + +/mob/living/simple_animal/hostile/heretic_summon/raw_prophet/AttackingTarget() + if(target.UID() == last_target) + melee_damage_lower = min(melee_damage_lower + 5, 30) + melee_damage_upper = min(melee_damage_upper + 5, 35) + else + melee_damage_lower = initial(melee_damage_lower) + melee_damage_upper = initial(melee_damage_upper) + + . = ..() + if(!.) + return + + SpinAnimation(5, 1) + last_target = target.UID() + +/mob/living/simple_animal/hostile/heretic_summon/raw_prophet/Moved(atom/old_loc, movement_dir, forced, list/old_locs, momentum_change = TRUE) + . = ..() + var/rotation_degree = (360 / 3) + if(movement_dir & WEST || movement_dir & SOUTH) + rotation_degree *= -1 + + var/matrix/to_turn = matrix(transform) + to_turn = turn(transform, rotation_degree) + animate(src, transform = to_turn, time = 0.1 SECONDS) diff --git a/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_ai.dm b/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_ai.dm index 63f606f8293b..76be091c88ee 100644 --- a/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_ai.dm +++ b/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_ai.dm @@ -160,12 +160,12 @@ spider_special_action() ..() -/mob/living/simple_animal/hostile/poison/terror_spider/adjustBruteLoss(damage) - . = ..(damage) +/mob/living/simple_animal/hostile/poison/terror_spider/adjustBruteLoss(ammount, updating_health) + . = ..(ammount) Retaliate() -/mob/living/simple_animal/hostile/poison/terror_spider/adjustFireLoss(damage) - . = ..(damage) +/mob/living/simple_animal/hostile/poison/terror_spider/adjustFireLoss(ammount, updating_health) + . = ..(ammount) Retaliate() /mob/living/simple_animal/hostile/poison/terror_spider/proc/Retaliate() diff --git a/code/modules/mob/living/simple_animal/simple_animal_damage.dm b/code/modules/mob/living/simple_animal/simple_animal_damage.dm index d2ddc3c894f3..1ff15426357c 100644 --- a/code/modules/mob/living/simple_animal/simple_animal_damage.dm +++ b/code/modules/mob/living/simple_animal/simple_animal_damage.dm @@ -35,6 +35,6 @@ if(damage_coeff[CLONE]) return adjustHealth(amount * damage_coeff[CLONE], updating_health) -/mob/living/simple_animal/adjustStaminaLoss(amount, updating_health = TRUE) +/mob/living/simple_animal/adjustStaminaLoss(amount, updating = TRUE) if(damage_coeff[STAMINA]) - return ..(amount*damage_coeff[STAMINA], updating_health) + return ..(amount*damage_coeff[STAMINA], updating) diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 0062176085c7..9478f86bc4a1 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -76,6 +76,7 @@ IMPCHEM_HUD = 'icons/mob/hud/sechud.dmi', IMPTRACK_HUD = 'icons/mob/hud/sechud.dmi', PRESSURE_HUD = 'icons/effects/effects.dmi', + HERETIC_HUD = 'icons/effects/eldritch.dmi', ) for(var/hud in hud_possible) diff --git a/code/modules/mob/mob_misc_procs.dm b/code/modules/mob/mob_misc_procs.dm index 9ffcbc99bc47..39b01f2af755 100644 --- a/code/modules/mob/mob_misc_procs.dm +++ b/code/modules/mob/mob_misc_procs.dm @@ -747,6 +747,47 @@ counter -= 1 return newphrase.Join("") +/proc/hereticslur(phrase) + phrase = html_decode(phrase) + var/leng = length_char(phrase) + var/counter = length_char(phrase) + var/list/newphrase = list() + var/newletter + while(counter >= 1) + newletter = copytext_char(phrase, (leng - counter) + 1, (leng - counter) + 2) + if(prob(50)) + if(lowertext(newletter) == "o") + newletter = "u" + if(lowertext(newletter) == "t") + newletter = "ch" + if(lowertext(newletter) == "a") + newletter = "ah" + if(lowertext(newletter) == "i") + newletter = "ks" + if(lowertext(newletter) == "c") + newletter = "th" + if(lowertext(newletter) == "m") + newletter = "nth" + if(prob(25)) + if(newletter == " ") + newletter = " endless... " + if(newletter == "H") + newletter = " THE HANDS... " + if(newletter == "h") + newletter = " BRIGHT " + if(newletter == "s") + newletter = " LEAK " + if(newletter == "r") + newletter = " CRACK " + + if(prob(33.33)) + newletter = pick("'", "br", "th", "see", "etch") + + newphrase += newletter + counter -= 1 + return newphrase.Join("") + + // Why does this exist? /mob/proc/get_preference(toggleflag) if(!client) diff --git a/code/modules/projectiles/projectile/special_projectiles.dm b/code/modules/projectiles/projectile/special_projectiles.dm index 4e2aa0d68876..b822189f38ff 100644 --- a/code/modules/projectiles/projectile/special_projectiles.dm +++ b/code/modules/projectiles/projectile/special_projectiles.dm @@ -366,3 +366,109 @@ var/mob/living/simple_animal/hostile/mimic/copy/ranged/R = new /mob/living/simple_animal/hostile/mimic/copy/ranged(T, G, firer) if(ismob(target)) R.target = target + +/obj/effect/ebeam/curse_arm + name = "curse arm" + +/obj/item/projectile/curse_hand + name = "curse hand" + icon_state = "cursehand0" + base_icon_state = "cursehand" + hitsound = 'sound/effects/curse/curse4.ogg' + layer = LARGE_MOB_LAYER + damage = 0 + speed = 0.5 + range = 16 + forcedodge = -1 + var/burn_damage = 10 + var/weaken_damage = 2 SECONDS + var/datum/beam/arm + var/handedness = 0 + +/obj/item/projectile/curse_hand/Initialize(mapload) + . = ..() + handedness = prob(50) + icon_state = "[base_icon_state][handedness]" + +/obj/item/projectile/curse_hand/Destroy() + QDEL_NULL(arm) + return ..() + +/obj/item/projectile/curse_hand/update_icon_state() + icon_state = "[base_icon_state]0[handedness]" + return ..() + +/obj/item/projectile/curse_hand/fire(setAngle) + if(QDELETED(src)) //I'm going to try returning nothing because if it's being deleted, surely we don't want anything to happen? + return + if(starting) + arm = Beam(starting, icon_state = "curse[handedness]", beam_type=/obj/effect/ebeam/curse_arm, maxdistance = 20) + ..() + +/obj/item/projectile/curse_hand/on_range() + finale() //qwertodo low priority: this isn't working right? + . = ..() + +/// The visual effect for the hand disappearing +/obj/item/projectile/curse_hand/proc/finale() + if(arm) + QDEL_NULL(arm) + playsound(src, 'sound/effects/curse/curse3.ogg', 25, TRUE, -1) + var/turf/T = get_turf(src) + var/obj/effect/temp_visual/dir_setting/curse/hand/leftover = new(T, get_dir(starting, T)) + leftover.icon_state = icon_state + for(var/obj/effect/temp_visual/dir_setting/curse/grasp_portal/G in starting) + qdel(G) + if(!T) //T can be in nullspace when src is set to QDEL + return + new /obj/effect/temp_visual/dir_setting/curse/grasp_portal/fading(starting, get_dir(starting, T)) + var/datum/beam/D = starting.Beam(T, icon_state = "curse[handedness]", time = 32, beam_type=/obj/effect/ebeam/curse_arm, maxdistance = 20) + for(var/obj/effect/every in D.elements) + animate(every, alpha = 0, time = 32) + qdel(src) + +/obj/item/projectile/curse_hand/on_hit(atom/target, blocked, pierce_hit) + . = ..() + if(target == original) + if(isliving(target)) + var/mob/living/out_target = target + out_target.apply_damage(burn_damage, BURN) + out_target.Weaken(weaken_damage) + finale() + +/obj/item/projectile/curse_hand/hel //Used in helbital's impure reagent + name = "Hel's grasp" + speed = 1 + range = 20 + color = "#ff7e7e"//Tint it slightly + burn_damage = 5 + weaken_damage = 0 //Lets not stun people! + + +/obj/effect/temp_visual/dir_setting/curse + icon_state = "curse" + duration = 32 + var/fades = TRUE + +/obj/effect/temp_visual/dir_setting/curse/Initialize(mapload, set_dir) + . = ..() + if(fades) + animate(src, alpha = 0, time = 32) + + +/obj/effect/temp_visual/dir_setting/curse/grasp_portal + icon = 'icons/effects/64x64.dmi' + layer = ABOVE_ALL_MOB_LAYER + pixel_y = -16 + pixel_x = -16 + duration = 32 + fades = FALSE + +/obj/effect/temp_visual/dir_setting/curse/grasp_portal/fading + duration = 32 + fades = TRUE + + +/obj/effect/temp_visual/dir_setting/curse/hand + icon_state = "cursehand1" + diff --git a/code/modules/projectiles/projectile_base.dm b/code/modules/projectiles/projectile_base.dm index 57d2a23083ea..b288b330d751 100644 --- a/code/modules/projectiles/projectile_base.dm +++ b/code/modules/projectiles/projectile_base.dm @@ -91,6 +91,9 @@ /// Does this projectile hit living non dense mobs? var/always_hit_living_nondense = FALSE + /// Is this projectile forced to not make hit messages or sound to avoid spam? + var/force_no_hit_message_or_sound = FALSE + //Hitscan var/hitscan = FALSE //Whether this is hitscan. If it is, speed is basically ignored. var/list/beam_segments //assoc list of datum/point_precise or datum/point_precise/vector, start = end. Used for hitscan effect generation. @@ -134,6 +137,8 @@ var/ricochet_incidence_leeway = 40 /// Can our ricochet autoaim hit our firer? var/ricochet_shoots_firer = TRUE + /// Do we always bounce off non mobs? + var/always_nonmob_ricochet = FALSE /obj/item/projectile/New() return ..() @@ -219,15 +224,16 @@ var/organ_hit_text = "" if(L.has_limbs) organ_hit_text = " in \the [parse_zone(def_zone)]" - if(suppressed) - playsound(loc, hitsound, 5, TRUE, -1) - to_chat(L, "You're shot by \a [src][organ_hit_text]!") - else - if(hitsound) - var/volume = vol_by_damage() - playsound(loc, hitsound, volume, TRUE, -1) - L.visible_message("[L] is hit by \a [src][organ_hit_text]!", \ - "[L] is hit by \a [src][organ_hit_text]!") //X has fired Y is now given by the guns so you cant tell who shot you if you could not see the shooter + if(!force_no_hit_message_or_sound) + if(suppressed) + playsound(loc, hitsound, 5, TRUE, -1) + to_chat(L, "You're shot by \a [src][organ_hit_text]!") + else + if(hitsound) + var/volume = vol_by_damage() + playsound(loc, hitsound, volume, TRUE, -1) + L.visible_message("[L] is hit by \a [src][organ_hit_text]!", \ + "[L] is hit by \a [src][organ_hit_text]!") //X has fired Y is now given by the guns so you cant tell who shot you if you could not see the shooter if(immolate) L.adjust_fire_stacks(immolate) L.IgniteMob() @@ -274,6 +280,7 @@ if(hitscan && ricochets_max > 10) ricochets_max = 10 //I do not want a chucklefuck editing this higher, sorry. ricochets++ + ricochet_chance *= ricochet_decay_chance // Note: I should impliment ricohet decay damage. I'm not doing that during heretic as balance scope if(A.handle_ricochet(src)) on_ricochet(A) ignore_source_check = TRUE @@ -474,6 +481,7 @@ /obj/item/projectile/proc/check_ricochet() if(prob(ricochet_chance)) + return TRUE return FALSE @@ -484,6 +492,9 @@ if((flag in list(BOMB, BULLET)) && (A.flags_ricochet & RICOCHET_HARD)) return TRUE + if(!ismob(A) && always_nonmob_ricochet) + return TRUE + return FALSE /obj/item/projectile/set_angle(new_angle) diff --git a/code/modules/reagents/chemistry/machinery/reagentgrinder.dm b/code/modules/reagents/chemistry/machinery/reagentgrinder.dm index 77cbb7b36112..b6bc5a563a09 100644 --- a/code/modules/reagents/chemistry/machinery/reagentgrinder.dm +++ b/code/modules/reagents/chemistry/machinery/reagentgrinder.dm @@ -30,6 +30,7 @@ /obj/item/stack/sheet/mineral/silver = list("silver" = 20), /obj/item/stack/sheet/mineral/gold = list("gold" = 20), /obj/item/stack/sheet/saltpetre_crystal = list("saltpetre" = 8), + /obj/item/stack/ore/bluespace_crystal = list("bluespace_dust" = 20), // Blender Stuff /obj/item/food/grown/tomato = list("ketchup" = 0), diff --git a/code/modules/reagents/chemistry/reagents/misc_reagents.dm b/code/modules/reagents/chemistry/reagents/misc_reagents.dm index f39583d7136f..95b8cbbc80a8 100644 --- a/code/modules/reagents/chemistry/reagents/misc_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/misc_reagents.dm @@ -855,5 +855,24 @@ if(method == REAGENT_TOUCH) M.dust() +/datum/reagent/bluespace + name = "Bluespace Dust" + id = "bluespace_dust" + description = "A dust composed of microscopic bluespace crystals, with minor space-warping properties." + color = "#0000CC" + taste_description = "fizzling blue" + +/datum/reagent/bluespace/reaction_mob(mob/living/M, method, volume, show_message) //Qwertodo after heretic: I wanted to do more with this + . = ..() + if(method == REAGENT_TOUCH) + do_teleport(M, get_turf(M), (volume / 5), sound_in = 'sound/effects/phasein.ogg') //4 tiles per crystal +/datum/reagent/bluespace/on_mob_life(mob/living/M) + if(current_cycle > 10 && prob(10)) + to_chat(M, "You feel unstable...") + M.Jitter(2 SECONDS) + current_cycle = 1 + addtimer(CALLBACK(M, TYPE_PROC_REF(/mob/living, bluespace_shuffle)), 3 SECONDS) +/mob/living/proc/bluespace_shuffle() + do_teleport(src, get_turf(src), 5, sound_in = 'sound/effects/phasein.ogg') diff --git a/code/modules/reagents/chemistry/reagents/water.dm b/code/modules/reagents/chemistry/reagents/water.dm index 83956eb56c9d..95e184d60ce0 100644 --- a/code/modules/reagents/chemistry/reagents/water.dm +++ b/code/modules/reagents/chemistry/reagents/water.dm @@ -396,6 +396,78 @@ M.AdjustCultSlur(20 SECONDS) //CUASE WHY THE HELL NOT return ..() | update_flags +// unholy water, but for heretics. +// why couldn't they have both just used the same reagent? +// who knows. +// maybe nar'sie is considered to be too "mainstream" of a god to worship in the heretic community. +/datum/reagent/eldritch + name = "Eldritch Essence" + id = "eldritch" + description = "A strange liquid that defies the laws of physics. \ + It re-energizes and heals those who can see beyond this fragile reality, \ + but is incredibly harmful to the closed-minded. It metabolizes very quickly." + taste_description = "Ag'hsj'saje'sh" + process_flags = ORGANIC | SYNTHETIC + color = "#1f8016" + metabolization_rate = 1 + +/datum/reagent/eldritch/on_mob_life(mob/living/M) + var/update_flags = STATUS_UPDATE_NONE + if(IS_HERETIC_OR_MONSTER(M)) + M.AdjustDrowsy(-10 SECONDS) + M.AdjustParalysis(-2 SECONDS) + M.AdjustStunned(-4 SECONDS) + M.AdjustWeakened(-4 SECONDS) + M.AdjustKnockDown(-4 SECONDS) + update_flags |= M.adjustStaminaLoss(-25, FALSE) + update_flags |= M.adjustToxLoss(-1, FALSE) + update_flags |= M.adjustFireLoss(-1, FALSE) + update_flags |= M.adjustOxyLoss(-1, FALSE) + update_flags |= M.adjustBruteLoss(-1, FALSE) + if(M.blood_volume < BLOOD_VOLUME_NORMAL) + M.blood_volume += 3 + else + update_flags |= M.adjustBrainLoss(3, FALSE) + update_flags |= M.adjustToxLoss(1, FALSE) + update_flags |= M.adjustFireLoss(2, FALSE) + update_flags |= M.adjustOxyLoss(2, FALSE) + update_flags |= M.adjustBruteLoss(2, FALSE) + return ..() | update_flags + + +/datum/reagent/helgrasp + name = "Helgrasp" + id = "helgrasp" + description = "This rare and forbidden concoction is thought to bring you closer to the grasp of the Norse goddess Hel." + metabolization_rate = 0.5 + /// How much toxin damage do we do each tick? + var/toxin_damage = 0.25 + //Keeps track of the hand timer so we can cleanup on removal + +//Warns you about the impenting hands +/datum/reagent/helgrasp/on_mob_add(mob/living/affected_mob, amount) + . = ..() + to_chat(affected_mob, "You hear laughter as malevolent hands apparate before you, eager to drag you down to hell...! Look out!") + playsound(affected_mob.loc, 'sound/effects/ahaha.ogg', 80, TRUE, -1) //Very obvious tell so people can be ready + +//Sends hands after you for your hubris +/datum/reagent/helgrasp/on_mob_life(mob/living/carbon/affected_mob) + var/update_flags = STATUS_UPDATE_NONE + update_flags |= affected_mob.adjustToxLoss(toxin_damage, FALSE) + spawn_hands(affected_mob) + return ..() | update_flags + +/datum/reagent/helgrasp/proc/spawn_hands(mob/living/carbon/affected_mob) + if(!affected_mob && iscarbon(holder.my_atom))//Catch timer + affected_mob = holder.my_atom + fire_curse_hand(affected_mob) + +/datum/reagent/helgrasp/heretic + name = "Grasp of the Mansus" + id = "mansusgrasp" + description = "The Hand of the Mansus is at your neck." + toxin_damage = 0 + /datum/reagent/hellwater name = "Hell Water" id = "hell_water" diff --git a/code/modules/surgery/organs/organ.dm b/code/modules/surgery/organs/organ.dm index 4d2b13883ba6..9169f55db357 100644 --- a/code/modules/surgery/organs/organ.dm +++ b/code/modules/surgery/organs/organ.dm @@ -256,6 +256,7 @@ return SEND_SIGNAL(owner, COMSIG_CARBON_LOSE_ORGAN, src) + SEND_SIGNAL(src, COMSIG_ORGAN_REMOVED, owner) owner.internal_organs -= src diff --git a/code/modules/surgery/organs/organ_external.dm b/code/modules/surgery/organs/organ_external.dm index 36c4b86aaf93..c047586ea3b1 100644 --- a/code/modules/surgery/organs/organ_external.dm +++ b/code/modules/surgery/organs/organ_external.dm @@ -893,6 +893,7 @@ Note that amputating the affected organ does in fact remove the infection from t return SEND_SIGNAL(owner, COMSIG_CARBON_LOSE_ORGAN, src) + SEND_SIGNAL(src, COMSIG_ORGAN_REMOVED, owner) var/mob/living/carbon/human/victim = owner if(status & ORGAN_SPLINTED) diff --git a/code/modules/surgery/organs/organ_internal.dm b/code/modules/surgery/organs/organ_internal.dm index 7bb1293a8d51..ff8a73105352 100644 --- a/code/modules/surgery/organs/organ_internal.dm +++ b/code/modules/surgery/organs/organ_internal.dm @@ -74,6 +74,7 @@ if(owner.stat == DEAD) ADD_TRAIT(src, TRAIT_ORGAN_INSERTED_WHILE_DEAD, "[UID()]") RegisterSignal(owner, COMSIG_LIVING_DEFIBBED, PROC_REF(on_revival)) + SEND_SIGNAL(src, COMSIG_ORGAN_IMPLANTED, owner) // Removes the given organ from its owner. @@ -82,7 +83,8 @@ /obj/item/organ/internal/remove(mob/living/carbon/M, special = 0) if(!owner) stack_trace("\'remove\' called on [src] without an owner! Mob: [M], [atom_loc_line(M)]") - SEND_SIGNAL(owner, COMSIG_CARBON_LOSE_ORGAN) + SEND_SIGNAL(owner, COMSIG_CARBON_LOSE_ORGAN, src) + SEND_SIGNAL(src, COMSIG_ORGAN_REMOVED, owner) REMOVE_TRAIT(src, TRAIT_ORGAN_INSERTED_WHILE_DEAD, "[UID()]") UnregisterSignal(owner, COMSIG_LIVING_DEFIBBED) diff --git a/code/modules/tooltip/tooltip.html b/code/modules/tooltip/tooltip.html index d2c6016b1a94..9428ded82f16 100644 --- a/code/modules/tooltip/tooltip.html +++ b/code/modules/tooltip/tooltip.html @@ -103,7 +103,7 @@ window.location = 'byond://winset?id='+tooltip.control+';is-visible=false'; }, updateCallback: function(map) { - if (typeof map === 'undefined' || !map) {return false;} + if(typeof map === 'undefined' || !map) {return false;} //alert(tooltip.params+' | '+tooltip.clientView+' | '+tooltip.text+' | '+tooltip.theme); //DEBUG @@ -140,7 +140,7 @@ } //Sometimes screen-loc is never sent ahaha fuck you byond - if (!parameters["icon-x"] || !parameters["icon-y"] || !parameters["screen-loc"]) { + if(!parameters["icon-x"] || !parameters["icon-y"] || !parameters["screen-loc"]) { return false; } //icon-x @@ -150,10 +150,10 @@ //screen-loc var screenLoc = parameters["screen-loc"]; screenLoc = screenLoc.split(','); - if (screenLoc.length < 2) {return false;} + if(screenLoc.length < 2) {return false;} var left = screenLoc[0]; var top = screenLoc[1]; - if (!left || !top) {return false;} + if(!left || !top) {return false;} screenLoc = left.split(':'); left = parseInt(screenLoc[0]); var enteredX = parseInt(screenLoc[1]); @@ -166,26 +166,26 @@ var oScreenLoc = tooltip.params.screenLoc.split(','); //o for original ok var west = oScreenLoc[0].split(':'); - if (west.length > 1) { //Only if west has a pixel offset + if(west.length > 1) { //Only if west has a pixel offset var westOffset = parseInt(west[1]); - if (westOffset !== 0) { - if ((iconX + westOffset) !== enteredX) { //Cursor entered on the offset tile + if(westOffset !== 0) { + if((iconX + westOffset) !== enteredX) { //Cursor entered on the offset tile left = left + (westOffset < 0 ? 1 : -1); } leftOffset = leftOffset + (westOffset * resizeRatioX); } } - if (oScreenLoc.length > 1) { //If north is given + if(oScreenLoc.length > 1) { //If north is given var north = oScreenLoc[1].split(':'); - if (north.length > 1) { //Only if north has a pixel offset + if(north.length > 1) { //Only if north has a pixel offset var northOffset = parseInt(north[1]); - if (northOffset !== 0) { - if ((iconY + northOffset) === enteredY) { //Cursor entered on the original tile + if(northOffset !== 0) { + if((iconY + northOffset) === enteredY) { //Cursor entered on the original tile top--; topOffset = topOffset - ((tooltip.tileSize + northOffset) * resizeRatioY); } else { //Cursor entered on the offset tile - if (northOffset < 0) { //Offset southwards + if(northOffset < 0) { //Offset southwards topOffset = topOffset - ((tooltip.tileSize + northOffset) * resizeRatioY); } else { //Offset northwards top--; @@ -197,7 +197,7 @@ } //Handle special cases (for fuck sake) - if (tooltip.special !== 'none') { + if(tooltip.special !== 'none') { //Put yo special cases here } @@ -222,14 +222,14 @@ $wrap.width($wrap.width() + 2); //Dumb hack to fix a bizarre sizing bug var pixelRatio = 1; - if (window.devicePixelRatio) { + if(window.devicePixelRatio) { pixelRatio = window.devicePixelRatio; } var docWidth = Math.floor($wrap.outerWidth() * pixelRatio), docHeight = Math.floor($wrap.outerHeight() * pixelRatio); - if (posY + docHeight > map.size.y) { //Is the bottom edge below the window? Snap it up if so + if(posY + docHeight > map.size.y) { //Is the bottom edge below the window? Snap it up if so posY = (posY - docHeight) - realIconSizeY - tooltip.padding; } diff --git a/config/example/config.toml b/config/example/config.toml index 5819604446c7..63bdacc454fc 100644 --- a/config/example/config.toml +++ b/config/example/config.toml @@ -263,7 +263,7 @@ gamemode_probabilities = [ { gamemode = "changeling", probability = 0 }, { gamemode = "cult", probability = 3 }, { gamemode = "extend-a-traitormongous", probability = 2 }, # Autotraitor - { gamemode = "extended", probability = 0 }, + { gamemode = "extended", probability = 1 }, { gamemode = "nuclear", probability = 2 }, { gamemode = "raginmages", probability = 0 }, { gamemode = "revolution", probability = 0 }, diff --git a/data/mode.txt b/data/mode.txt index ef18df98db46..d97c5eada5d8 100644 --- a/data/mode.txt +++ b/data/mode.txt @@ -1 +1 @@ -extended +secret diff --git a/html/search.js b/html/search.js index 59ac83573b70..b95057a6f7ba 100644 --- a/html/search.js +++ b/html/search.js @@ -1,33 +1,33 @@ -function selectTextField() { - var filter_text = document.getElementById('filter'); - filter_text.focus(); - filter_text.select(); -} -function updateSearch() { - var input_form = document.getElementById('filter'); - var filter = input_form.value.toLowerCase(); - input_form.value = filter; - var table = document.getElementById('searchable'); - var alt_style = 'norm'; - for (var i = 0; i < table.rows.length; i++) { - try { - var row = table.rows[i]; - if (row.className == 'title') continue; - var found = 0; - for (var j = 0; j < row.cells.length; j++) { - var cell = row.cells[j]; - if (cell.innerText.toLowerCase().indexOf(filter) != -1) { - found = 1; - break; - } - } - if (found == 0) row.style.display = 'none'; - else { - row.style.display = 'block'; - row.className = alt_style; - if (alt_style == 'alt') alt_style = 'norm'; - else alt_style = 'alt'; - } - } catch (err) {} - } -} +function selectTextField() { + var filter_text = document.getElementById('filter'); + filter_text.focus(); + filter_text.select(); +} +function updateSearch() { + var input_form = document.getElementById('filter'); + var filter = input_form.value.toLowerCase(); + input_form.value = filter; + var table = document.getElementById('searchable'); + var alt_style = 'norm'; + for (var i = 0; i < table.rows.length; i++) { + try { + var row = table.rows[i]; + if (row.className == 'title') continue; + var found = 0; + for (var j = 0; j < row.cells.length; j++) { + var cell = row.cells[j]; + if (cell.innerText.toLowerCase().indexOf(filter) != -1) { + found = 1; + break; + } + } + if (found == 0) row.style.display = 'none'; + else { + row.style.display = 'block'; + row.className = alt_style; + if (alt_style == 'alt') alt_style = 'norm'; + else alt_style = 'alt'; + } + } catch (err) {} + } +} diff --git a/icons/blanks/32x32.dmi b/icons/blanks/32x32.dmi new file mode 100644 index 000000000000..6c4f2b33e0fe Binary files /dev/null and b/icons/blanks/32x32.dmi differ diff --git a/icons/effects/160x160.dmi b/icons/effects/160x160.dmi index cf17b54b9bb1..639046464da6 100644 Binary files a/icons/effects/160x160.dmi and b/icons/effects/160x160.dmi differ diff --git a/icons/effects/64x64.dmi b/icons/effects/64x64.dmi index 4530b11af6a8..4dc3276dc5c2 100644 Binary files a/icons/effects/64x64.dmi and b/icons/effects/64x64.dmi differ diff --git a/icons/effects/96x96.dmi b/icons/effects/96x96.dmi index 3218df8a1358..cdb352f8b2e2 100644 Binary files a/icons/effects/96x96.dmi and b/icons/effects/96x96.dmi differ diff --git a/icons/effects/beam.dmi b/icons/effects/beam.dmi index 7bd1e5397130..d9e5465ab4e6 100644 Binary files a/icons/effects/beam.dmi and b/icons/effects/beam.dmi differ diff --git a/icons/effects/blood.dmi b/icons/effects/blood.dmi index c82e9b9bec41..b13279714eb7 100644 Binary files a/icons/effects/blood.dmi and b/icons/effects/blood.dmi differ diff --git a/icons/effects/effects.dmi b/icons/effects/effects.dmi index 0439814e3101..eceb973a6e95 100644 Binary files a/icons/effects/effects.dmi and b/icons/effects/effects.dmi differ diff --git a/icons/effects/eldritch.dmi b/icons/effects/eldritch.dmi index 6481aa7591bd..345895585152 100644 Binary files a/icons/effects/eldritch.dmi and b/icons/effects/eldritch.dmi differ diff --git a/icons/effects/mouse_pointers/cult_target.dmi b/icons/effects/mouse_pointers/cult_target.dmi new file mode 100644 index 000000000000..650feb336134 Binary files /dev/null and b/icons/effects/mouse_pointers/cult_target.dmi differ diff --git a/icons/effects/mouse_pointers/moon_target.dmi b/icons/effects/mouse_pointers/moon_target.dmi new file mode 100644 index 000000000000..d89cab42aa12 Binary files /dev/null and b/icons/effects/mouse_pointers/moon_target.dmi differ diff --git a/icons/effects/mouse_pointers/throw_target.dmi b/icons/effects/mouse_pointers/throw_target.dmi new file mode 100644 index 000000000000..660eafbf2b19 Binary files /dev/null and b/icons/effects/mouse_pointers/throw_target.dmi differ diff --git a/icons/effects/weather_effects.dmi b/icons/effects/weather_effects.dmi index c084ca04b5b5..55753c94959e 100644 Binary files a/icons/effects/weather_effects.dmi and b/icons/effects/weather_effects.dmi differ diff --git a/icons/mob/96x96eldritch_mobs.dmi b/icons/mob/96x96eldritch_mobs.dmi new file mode 100644 index 000000000000..4bbc55c15dd8 Binary files /dev/null and b/icons/mob/96x96eldritch_mobs.dmi differ diff --git a/icons/mob/actions/actions.dmi b/icons/mob/actions/actions.dmi index 7119185eb41d..a9119c0f7415 100644 Binary files a/icons/mob/actions/actions.dmi and b/icons/mob/actions/actions.dmi differ diff --git a/icons/mob/actions/actions_animal.dmi b/icons/mob/actions/actions_animal.dmi index 26533a9fac0e..5a8ee7da6984 100644 Binary files a/icons/mob/actions/actions_animal.dmi and b/icons/mob/actions/actions_animal.dmi differ diff --git a/icons/mob/actions/actions_cult.dmi b/icons/mob/actions/actions_cult.dmi index d7df7a79a5c9..6c5f30d241e9 100644 Binary files a/icons/mob/actions/actions_cult.dmi and b/icons/mob/actions/actions_cult.dmi differ diff --git a/icons/mob/actions/actions_ecult.dmi b/icons/mob/actions/actions_ecult.dmi new file mode 100644 index 000000000000..8dcce9dccc3a Binary files /dev/null and b/icons/mob/actions/actions_ecult.dmi differ diff --git a/icons/mob/actions/actions_minor_antag.dmi b/icons/mob/actions/actions_minor_antag.dmi new file mode 100644 index 000000000000..0c2728d811b6 Binary files /dev/null and b/icons/mob/actions/actions_minor_antag.dmi differ diff --git a/icons/mob/clothing/back.dmi b/icons/mob/clothing/back.dmi index cc1bae10c47f..78b06da1ad77 100644 Binary files a/icons/mob/clothing/back.dmi and b/icons/mob/clothing/back.dmi differ diff --git a/icons/mob/clothing/belt.dmi b/icons/mob/clothing/belt.dmi index 909a2f22a29f..c2ab2ec23bf9 100644 Binary files a/icons/mob/clothing/belt.dmi and b/icons/mob/clothing/belt.dmi differ diff --git a/icons/mob/clothing/belt_mirror.dmi b/icons/mob/clothing/belt_mirror.dmi index 2c1dc3053a95..f192ce441c05 100644 Binary files a/icons/mob/clothing/belt_mirror.dmi and b/icons/mob/clothing/belt_mirror.dmi differ diff --git a/icons/mob/clothing/head.dmi b/icons/mob/clothing/head.dmi index 5fbb0f01023c..59d5ddb4a4ff 100644 Binary files a/icons/mob/clothing/head.dmi and b/icons/mob/clothing/head.dmi differ diff --git a/icons/mob/clothing/mask.dmi b/icons/mob/clothing/mask.dmi index 4e9d4ff1a61e..7e86126b8814 100644 Binary files a/icons/mob/clothing/mask.dmi and b/icons/mob/clothing/mask.dmi differ diff --git a/icons/mob/clothing/neck.dmi b/icons/mob/clothing/neck.dmi index fd1e22cb72fb..6dc486334ac4 100644 Binary files a/icons/mob/clothing/neck.dmi and b/icons/mob/clothing/neck.dmi differ diff --git a/icons/mob/clothing/suit.dmi b/icons/mob/clothing/suit.dmi index 6fcc795c6b3a..7d10c35f272e 100644 Binary files a/icons/mob/clothing/suit.dmi and b/icons/mob/clothing/suit.dmi differ diff --git a/icons/mob/eldritch_mobs.dmi b/icons/mob/eldritch_mobs.dmi new file mode 100644 index 000000000000..3f2aa454f0eb Binary files /dev/null and b/icons/mob/eldritch_mobs.dmi differ diff --git a/icons/mob/hud/antaghud.dmi b/icons/mob/hud/antaghud.dmi index c03977d7083e..ce12874efb00 100644 Binary files a/icons/mob/hud/antaghud.dmi and b/icons/mob/hud/antaghud.dmi differ diff --git a/icons/mob/inhands/64x64_lefthand.dmi b/icons/mob/inhands/64x64_lefthand.dmi index b63746a56d4c..a31976b20bf0 100644 Binary files a/icons/mob/inhands/64x64_lefthand.dmi and b/icons/mob/inhands/64x64_lefthand.dmi differ diff --git a/icons/mob/inhands/64x64_righthand.dmi b/icons/mob/inhands/64x64_righthand.dmi index 9ca8da5d1a4b..87e6eda7c139 100644 Binary files a/icons/mob/inhands/64x64_righthand.dmi and b/icons/mob/inhands/64x64_righthand.dmi differ diff --git a/icons/mob/inhands/guns_lefthand.dmi b/icons/mob/inhands/guns_lefthand.dmi index 62f205c4d82a..4bd81fabe17b 100644 Binary files a/icons/mob/inhands/guns_lefthand.dmi and b/icons/mob/inhands/guns_lefthand.dmi differ diff --git a/icons/mob/inhands/guns_righthand.dmi b/icons/mob/inhands/guns_righthand.dmi index 53969c71c105..458495b5b1b4 100644 Binary files a/icons/mob/inhands/guns_righthand.dmi and b/icons/mob/inhands/guns_righthand.dmi differ diff --git a/icons/mob/inhands/items_lefthand.dmi b/icons/mob/inhands/items_lefthand.dmi index f03540a971bc..9ddc98ff361d 100644 Binary files a/icons/mob/inhands/items_lefthand.dmi and b/icons/mob/inhands/items_lefthand.dmi differ diff --git a/icons/mob/inhands/items_righthand.dmi b/icons/mob/inhands/items_righthand.dmi index 718e4382d4f7..b6f36fd20b39 100644 Binary files a/icons/mob/inhands/items_righthand.dmi and b/icons/mob/inhands/items_righthand.dmi differ diff --git a/icons/mob/screen_alert.dmi b/icons/mob/screen_alert.dmi index a18666708200..457276bb94c5 100644 Binary files a/icons/mob/screen_alert.dmi and b/icons/mob/screen_alert.dmi differ diff --git a/icons/mob/screen_fog.dmi b/icons/mob/screen_fog.dmi index f443820d9fcd..910cc57f8ca6 100644 Binary files a/icons/mob/screen_fog.dmi and b/icons/mob/screen_fog.dmi differ diff --git a/icons/obj/ammo.dmi b/icons/obj/ammo.dmi index b19f65eeb33e..75be226d1e1a 100644 Binary files a/icons/obj/ammo.dmi and b/icons/obj/ammo.dmi differ diff --git a/icons/obj/antags/eldritch.dmi b/icons/obj/antags/eldritch.dmi new file mode 100644 index 000000000000..f57bc5cdb3f7 Binary files /dev/null and b/icons/obj/antags/eldritch.dmi differ diff --git a/icons/obj/clothing/belts.dmi b/icons/obj/clothing/belts.dmi index 18b2cabe3d57..837673cfe991 100644 Binary files a/icons/obj/clothing/belts.dmi and b/icons/obj/clothing/belts.dmi differ diff --git a/icons/obj/clothing/hats.dmi b/icons/obj/clothing/hats.dmi index 020c2e847166..1c64f553d4db 100644 Binary files a/icons/obj/clothing/hats.dmi and b/icons/obj/clothing/hats.dmi differ diff --git a/icons/obj/clothing/masks.dmi b/icons/obj/clothing/masks.dmi index 926c2d713586..d6b2e4a57a1c 100644 Binary files a/icons/obj/clothing/masks.dmi and b/icons/obj/clothing/masks.dmi differ diff --git a/icons/obj/clothing/neck.dmi b/icons/obj/clothing/neck.dmi index dc6419550b82..cb4dd79ac7a8 100644 Binary files a/icons/obj/clothing/neck.dmi and b/icons/obj/clothing/neck.dmi differ diff --git a/icons/obj/clothing/suits.dmi b/icons/obj/clothing/suits.dmi index d61e20a90f10..884a99d8733d 100644 Binary files a/icons/obj/clothing/suits.dmi and b/icons/obj/clothing/suits.dmi differ diff --git a/icons/obj/cult.dmi b/icons/obj/cult.dmi index 2a2fabd845bc..3b7ff1251390 100644 Binary files a/icons/obj/cult.dmi and b/icons/obj/cult.dmi differ diff --git a/icons/obj/decals.dmi b/icons/obj/decals.dmi index c11cef0cef1e..41d7889b3e7c 100644 Binary files a/icons/obj/decals.dmi and b/icons/obj/decals.dmi differ diff --git a/icons/obj/economy.dmi b/icons/obj/economy.dmi index 4d3fc3871818..c81aaaeb5715 100644 Binary files a/icons/obj/economy.dmi and b/icons/obj/economy.dmi differ diff --git a/icons/obj/library.dmi b/icons/obj/library.dmi index 9fdfed83f5f3..d93c63570a53 100644 Binary files a/icons/obj/library.dmi and b/icons/obj/library.dmi differ diff --git a/icons/obj/projectiles.dmi b/icons/obj/projectiles.dmi index 7020cd65fb7f..ef45889f458c 100644 Binary files a/icons/obj/projectiles.dmi and b/icons/obj/projectiles.dmi differ diff --git a/icons/obj/weapons/khopesh.dmi b/icons/obj/weapons/khopesh.dmi new file mode 100644 index 000000000000..257ccc800dfb Binary files /dev/null and b/icons/obj/weapons/khopesh.dmi differ diff --git a/icons/obj/weapons/magical_weapons.dmi b/icons/obj/weapons/magical_weapons.dmi index 154cd8790155..235b07d57d2a 100644 Binary files a/icons/obj/weapons/magical_weapons.dmi and b/icons/obj/weapons/magical_weapons.dmi differ diff --git a/icons/obj/weapons/wide_guns.dmi b/icons/obj/weapons/wide_guns.dmi new file mode 100644 index 000000000000..53167e805bf0 Binary files /dev/null and b/icons/obj/weapons/wide_guns.dmi differ diff --git a/icons/turf/areas.dmi b/icons/turf/areas.dmi index d27c76b49de6..9536c3f6d842 100755 Binary files a/icons/turf/areas.dmi and b/icons/turf/areas.dmi differ diff --git a/icons/turf/overlays.dmi b/icons/turf/overlays.dmi index 79fddb79b512..5342730385b8 100644 Binary files a/icons/turf/overlays.dmi and b/icons/turf/overlays.dmi differ diff --git a/icons/ui_icons/antags/heretic/ascension.dmi b/icons/ui_icons/antags/heretic/ascension.dmi new file mode 100644 index 000000000000..a72b197c6ce2 Binary files /dev/null and b/icons/ui_icons/antags/heretic/ascension.dmi differ diff --git a/icons/ui_icons/antags/heretic/knowledge.dmi b/icons/ui_icons/antags/heretic/knowledge.dmi new file mode 100644 index 000000000000..d24de1a5f0e8 Binary files /dev/null and b/icons/ui_icons/antags/heretic/knowledge.dmi differ diff --git a/paradise.dme b/paradise.dme index 5954dcf663ce..1a8a2338f735 100644 --- a/paradise.dme +++ b/paradise.dme @@ -156,7 +156,9 @@ #include "code\__DEFINES\dcs\dcs_helpers.dm" #include "code\__DEFINES\dcs\dept_signals.dm" #include "code\__DEFINES\dcs\global_signals.dm" +#include "code\__DEFINES\dcs\heretic_signals.dm" #include "code\__DEFINES\dcs\item_signals.dm" +#include "code\__DEFINES\dcs\leash_signals.dm" #include "code\__DEFINES\dcs\machinery_signals.dm" #include "code\__DEFINES\dcs\mob_signals.dm" #include "code\__DEFINES\dcs\movable_signals.dm" @@ -449,14 +451,16 @@ #include "code\datums\components\drift.dm" #include "code\datums\components\ducttape.dm" #include "code\datums\components\edit_complainer.dm" +#include "code\datums\components\effect_remover.dm" #include "code\datums\components\emissive_blocker.dm" #include "code\datums\components\footstep.dm" #include "code\datums\components\forces_doors_open.dm" #include "code\datums\components\fullauto.dm" -#include "code\datums\components\jetpack_component.dm" #include "code\datums\components\ghost_direct_control.dm" +#include "code\datums\components\jetpack_component.dm" #include "code\datums\components\label.dm" #include "code\datums\components\largeobjecttransparency.dm" +#include "code\datums\components\leash.dm" #include "code\datums\components\material_container.dm" #include "code\datums\components\multitile.dm" #include "code\datums\components\orbiter.dm" @@ -544,9 +548,13 @@ #include "code\datums\elements\body_temperature.dm" #include "code\datums\elements\bombable_turf.dm" #include "code\datums\elements\connect_loc.dm" +#include "code\datums\elements\corrupt_organ.dm" #include "code\datums\elements\decal_element.dm" #include "code\datums\elements\earhealing.dm" +#include "code\datums\elements\effect_trail.dm" #include "code\datums\elements\high_value_item.dm" +#include "code\datums\elements\leaching_walk.dm" +#include "code\datums\elements\noticable_organ.dm" #include "code\datums\elements\rad_insulation.dm" #include "code\datums\elements\ridable.dm" #include "code\datums\elements\rust_element.dm" @@ -575,6 +583,7 @@ #include "code\datums\looping_sounds\item_sounds.dm" #include "code\datums\looping_sounds\looping_sound.dm" #include "code\datums\looping_sounds\machinery_sounds.dm" +#include "code\datums\looping_sounds\projectiles_sounds.dm" #include "code\datums\looping_sounds\thermal_drill_sounds.dm" #include "code\datums\looping_sounds\weather_sounds.dm" #include "code\datums\outfits\outfit.dm" @@ -585,6 +594,7 @@ #include "code\datums\proximity\advanced_proximity_monitor.dm" #include "code\datums\proximity\proximity_monitor.dm" #include "code\datums\proximity\singulo_proximity_monitor.dm" +#include "code\datums\proximity\void_storm_proximity.dm" #include "code\datums\ruins\lavaland.dm" #include "code\datums\ruins\ruin_placer.dm" #include "code\datums\ruins\space_ruins.dm" @@ -636,6 +646,7 @@ #include "code\datums\spells\mimic.dm" #include "code\datums\spells\mind_transfer.dm" #include "code\datums\spells\night_vision.dm" +#include "code\datums\spells\pointed.dm" #include "code\datums\spells\projectile_spell.dm" #include "code\datums\spells\rathens.dm" #include "code\datums\spells\rod_form.dm" @@ -684,6 +695,7 @@ #include "code\datums\weather\weather_types\radiation_storm.dm" #include "code\datums\weather\weather_types\snow_storm.dm" #include "code\datums\weather\weather_types\solar_flare.dm" +#include "code\datums\weather\weather_types\void_storm.dm" #include "code\datums\wires\airlock_wires.dm" #include "code\datums\wires\alarm.dm" #include "code\datums\wires\apc_wires.dm" @@ -1530,8 +1542,8 @@ #include "code\modules\antagonists\_common\antag_hud.dm" #include "code\modules\antagonists\_common\antag_spawner.dm" #include "code\modules\antagonists\_common\antag_team.dm" -#include "code\modules\antagonists\abductor\team_abductor.dm" #include "code\modules\antagonists\abductor\datum_abductor.dm" +#include "code\modules\antagonists\abductor\team_abductor.dm" #include "code\modules\antagonists\antag_org\antag_org_datum.dm" #include "code\modules\antagonists\antag_org\antag_org_syndicate.dm" #include "code\modules\antagonists\changeling\changeling_power.dm" @@ -1566,6 +1578,99 @@ #include "code\modules\antagonists\cult\datum_cultist.dm" #include "code\modules\antagonists\cult\team_cult.dm" #include "code\modules\antagonists\event\datum_eventmisc.dm" +#include "code\modules\antagonists\heretic\cosmic_effect.dm" +#include "code\modules\antagonists\heretic\heretic_antag.dm" +#include "code\modules\antagonists\heretic\heretic_focus.dm" +#include "code\modules\antagonists\heretic\heretic_knowledge.dm" +#include "code\modules\antagonists\heretic\heretic_living_heart.dm" +#include "code\modules\antagonists\heretic\heretic_monsters.dm" +#include "code\modules\antagonists\heretic\influences.dm" +#include "code\modules\antagonists\heretic\knife_effect.dm" +#include "code\modules\antagonists\heretic\soultrapped_heretic.dm" +#include "code\modules\antagonists\heretic\transmutation_rune.dm" +#include "code\modules\antagonists\heretic\items\corrupted_organs.dm" +#include "code\modules\antagonists\heretic\items\eldritch_flask.dm" +#include "code\modules\antagonists\heretic\items\forbidden_book.dm" +#include "code\modules\antagonists\heretic\items\heretic_armor.dm" +#include "code\modules\antagonists\heretic\items\heretic_blades.dm" +#include "code\modules\antagonists\heretic\items\heretic_necks.dm" +#include "code\modules\antagonists\heretic\items\hunter_rifle.dm" +#include "code\modules\antagonists\heretic\items\keyring.dm" +#include "code\modules\antagonists\heretic\items\labyrinth_handbook.dm" +#include "code\modules\antagonists\heretic\items\madness_mask.dm" +#include "code\modules\antagonists\heretic\items\unfathomable_curio.dm" +#include "code\modules\antagonists\heretic\knowledge\_heretic_paths.dm" +#include "code\modules\antagonists\heretic\knowledge\ash_lore.dm" +#include "code\modules\antagonists\heretic\knowledge\blade_lore.dm" +#include "code\modules\antagonists\heretic\knowledge\cosmic_lore.dm" +#include "code\modules\antagonists\heretic\knowledge\flesh_lore.dm" +#include "code\modules\antagonists\heretic\knowledge\general_side.dm" +#include "code\modules\antagonists\heretic\knowledge\lock_lore.dm" +#include "code\modules\antagonists\heretic\knowledge\moon_lore.dm" +#include "code\modules\antagonists\heretic\knowledge\rust_lore.dm" +#include "code\modules\antagonists\heretic\knowledge\side_ash_moon.dm" +#include "code\modules\antagonists\heretic\knowledge\side_blade_rust.dm" +#include "code\modules\antagonists\heretic\knowledge\side_cosmos_ash.dm" +#include "code\modules\antagonists\heretic\knowledge\side_flesh_void.dm" +#include "code\modules\antagonists\heretic\knowledge\side_lock_flesh.dm" +#include "code\modules\antagonists\heretic\knowledge\side_lock_moon.dm" +#include "code\modules\antagonists\heretic\knowledge\side_rust_cosmos.dm" +#include "code\modules\antagonists\heretic\knowledge\side_void_blade.dm" +#include "code\modules\antagonists\heretic\knowledge\starting_lore.dm" +#include "code\modules\antagonists\heretic\knowledge\void_lore.dm" +#include "code\modules\antagonists\heretic\knowledge\sacrifice_knowledge\sacrifice_buff.dm" +#include "code\modules\antagonists\heretic\knowledge\sacrifice_knowledge\sacrifice_curse.dm" +#include "code\modules\antagonists\heretic\knowledge\sacrifice_knowledge\sacrifice_knowledge.dm" +#include "code\modules\antagonists\heretic\knowledge\sacrifice_knowledge\sacrifice_map.dm" +#include "code\modules\antagonists\heretic\magic\aggressive_spread.dm" +#include "code\modules\antagonists\heretic\magic\apetravulnera.dm" +#include "code\modules\antagonists\heretic\magic\ascended_shapeshift.dm" +#include "code\modules\antagonists\heretic\magic\ash_ascension.dm" +#include "code\modules\antagonists\heretic\magic\ash_jaunt.dm" +#include "code\modules\antagonists\heretic\magic\blood_cleave.dm" +#include "code\modules\antagonists\heretic\magic\blood_siphon.dm" +#include "code\modules\antagonists\heretic\magic\burglar_finesse.dm" +#include "code\modules\antagonists\heretic\magic\caretaker.dm" +#include "code\modules\antagonists\heretic\magic\cosmic_expansion.dm" +#include "code\modules\antagonists\heretic\magic\cosmic_runes.dm" +#include "code\modules\antagonists\heretic\magic\eldritch_blind.dm" +#include "code\modules\antagonists\heretic\magic\eldritch_emplosion.dm" +#include "code\modules\antagonists\heretic\magic\eldritch_shapeshift.dm" +#include "code\modules\antagonists\heretic\magic\eldritch_telepathy.dm" +#include "code\modules\antagonists\heretic\magic\expand_sight.dm" +#include "code\modules\antagonists\heretic\magic\fire_blast.dm" +#include "code\modules\antagonists\heretic\magic\flesh_ascension.dm" +#include "code\modules\antagonists\heretic\magic\flesh_surgery.dm" +#include "code\modules\antagonists\heretic\magic\furious_steel.dm" +#include "code\modules\antagonists\heretic\magic\mansus_grasp.dm" +#include "code\modules\antagonists\heretic\magic\mind_gate.dm" +#include "code\modules\antagonists\heretic\magic\mirror_walk.dm" +#include "code\modules\antagonists\heretic\magic\moon_parade.dm" +#include "code\modules\antagonists\heretic\magic\moon_ringleader.dm" +#include "code\modules\antagonists\heretic\magic\moon_smile.dm" +#include "code\modules\antagonists\heretic\magic\nightwatcher_rebirth.dm" +#include "code\modules\antagonists\heretic\magic\realignment.dm" +#include "code\modules\antagonists\heretic\magic\rust_charge.dm" +#include "code\modules\antagonists\heretic\magic\rust_construction.dm" +#include "code\modules\antagonists\heretic\magic\rust_wave.dm" +#include "code\modules\antagonists\heretic\magic\shadow_cloak.dm" +#include "code\modules\antagonists\heretic\magic\space_crawl.dm" +#include "code\modules\antagonists\heretic\magic\star_blast.dm" +#include "code\modules\antagonists\heretic\magic\star_touch.dm" +#include "code\modules\antagonists\heretic\magic\void_cold_cone.dm" +#include "code\modules\antagonists\heretic\magic\void_conduit.dm" +#include "code\modules\antagonists\heretic\magic\void_phase.dm" +#include "code\modules\antagonists\heretic\magic\void_prison.dm" +#include "code\modules\antagonists\heretic\magic\void_pull.dm" +#include "code\modules\antagonists\heretic\magic\wave_of_desperation.dm" +#include "code\modules\antagonists\heretic\status_effects\ghoul.dm" +#include "code\modules\antagonists\heretic\status_effects\heretic_buffs.dm" +#include "code\modules\antagonists\heretic\status_effects\heretic_debuffs.dm" +#include "code\modules\antagonists\heretic\status_effects\mark_effects.dm" +#include "code\modules\antagonists\heretic\status_effects\void_chill.dm" +#include "code\modules\antagonists\heretic\structures\carving_knife.dm" +#include "code\modules\antagonists\heretic\structures\lock_final.dm" +#include "code\modules\antagonists\heretic\structures\mawed_crucible.dm" #include "code\modules\antagonists\mind_flayer\flayer_datum.dm" #include "code\modules\antagonists\mind_flayer\flayer_power.dm" #include "code\modules\antagonists\mind_flayer\mindflayer_gamemode.dm" @@ -2465,6 +2570,7 @@ #include "code\modules\mob\living\simple_animal\hostile\giant_spider.dm" #include "code\modules\mob\living\simple_animal\hostile\headslug.dm" #include "code\modules\mob\living\simple_animal\hostile\hellhound.dm" +#include "code\modules\mob\living\simple_animal\hostile\heretic_monsters.dm" #include "code\modules\mob\living\simple_animal\hostile\hivebot.dm" #include "code\modules\mob\living\simple_animal\hostile\hostile.dm" #include "code\modules\mob\living\simple_animal\hostile\illusion.dm" diff --git a/sound/ambience/ambireebe1.ogg b/sound/ambience/ambireebe1.ogg new file mode 100644 index 000000000000..9a98b560de7c Binary files /dev/null and b/sound/ambience/ambireebe1.ogg differ diff --git a/sound/ambience/ambireebe2.ogg b/sound/ambience/ambireebe2.ogg new file mode 100644 index 000000000000..4e6127735ef9 Binary files /dev/null and b/sound/ambience/ambireebe2.ogg differ diff --git a/sound/ambience/ambireebe3.ogg b/sound/ambience/ambireebe3.ogg new file mode 100644 index 000000000000..dc87f8cd97de Binary files /dev/null and b/sound/ambience/ambireebe3.ogg differ diff --git a/sound/ambience/antag/heretic/VoidsEmbrace.ogg b/sound/ambience/antag/heretic/VoidsEmbrace.ogg new file mode 100644 index 000000000000..66eac7e13e55 Binary files /dev/null and b/sound/ambience/antag/heretic/VoidsEmbrace.ogg differ diff --git a/sound/ambience/antag/heretic/ascend_ash.ogg b/sound/ambience/antag/heretic/ascend_ash.ogg new file mode 100644 index 000000000000..fda3f1ed9499 Binary files /dev/null and b/sound/ambience/antag/heretic/ascend_ash.ogg differ diff --git a/sound/ambience/antag/heretic/ascend_blade.ogg b/sound/ambience/antag/heretic/ascend_blade.ogg new file mode 100644 index 000000000000..cc645ffb897c Binary files /dev/null and b/sound/ambience/antag/heretic/ascend_blade.ogg differ diff --git a/sound/ambience/antag/heretic/ascend_cosmic.ogg b/sound/ambience/antag/heretic/ascend_cosmic.ogg new file mode 100644 index 000000000000..413e7215000a Binary files /dev/null and b/sound/ambience/antag/heretic/ascend_cosmic.ogg differ diff --git a/sound/ambience/antag/heretic/ascend_flesh.ogg b/sound/ambience/antag/heretic/ascend_flesh.ogg new file mode 100644 index 000000000000..2088647af5a9 Binary files /dev/null and b/sound/ambience/antag/heretic/ascend_flesh.ogg differ diff --git a/sound/ambience/antag/heretic/ascend_knock.ogg b/sound/ambience/antag/heretic/ascend_knock.ogg new file mode 100644 index 000000000000..80a79d51a88c Binary files /dev/null and b/sound/ambience/antag/heretic/ascend_knock.ogg differ diff --git a/sound/ambience/antag/heretic/ascend_moon.ogg b/sound/ambience/antag/heretic/ascend_moon.ogg new file mode 100644 index 000000000000..ad2fc4e95050 Binary files /dev/null and b/sound/ambience/antag/heretic/ascend_moon.ogg differ diff --git a/sound/ambience/antag/heretic/ascend_rust.ogg b/sound/ambience/antag/heretic/ascend_rust.ogg new file mode 100644 index 000000000000..fb959ed334e0 Binary files /dev/null and b/sound/ambience/antag/heretic/ascend_rust.ogg differ diff --git a/sound/ambience/antag/heretic/ascend_void.ogg b/sound/ambience/antag/heretic/ascend_void.ogg new file mode 100644 index 000000000000..0c4812683135 Binary files /dev/null and b/sound/ambience/antag/heretic/ascend_void.ogg differ diff --git a/sound/ambience/antag/heretic/attribution.txt b/sound/ambience/antag/heretic/attribution.txt new file mode 100644 index 000000000000..eb17caca63e6 --- /dev/null +++ b/sound/ambience/antag/heretic/attribution.txt @@ -0,0 +1,3 @@ +heretic_sacrifice.ogg - made by sadboysusss, License: CC-by-SA + +VoidsEmbrace.ogg is Chopin - Waltz in C Sharp Minor (Op. 64 No. 2). It is in public domain. diff --git a/sound/ambience/antag/heretic/heretic_gain.ogg b/sound/ambience/antag/heretic/heretic_gain.ogg new file mode 100644 index 000000000000..32de62cda16b Binary files /dev/null and b/sound/ambience/antag/heretic/heretic_gain.ogg differ diff --git a/sound/ambience/antag/heretic/heretic_gain_intense.ogg b/sound/ambience/antag/heretic/heretic_gain_intense.ogg new file mode 100644 index 000000000000..203334a44911 Binary files /dev/null and b/sound/ambience/antag/heretic/heretic_gain_intense.ogg differ diff --git a/sound/ambience/antag/heretic/heretic_sacrifice.ogg b/sound/ambience/antag/heretic/heretic_sacrifice.ogg new file mode 100644 index 000000000000..92560235e885 Binary files /dev/null and b/sound/ambience/antag/heretic/heretic_sacrifice.ogg differ diff --git a/sound/effects/Captures/Paradise Station 13 2025-01-21 21-39-48.mp4 b/sound/effects/Captures/Paradise Station 13 2025-01-21 21-39-48.mp4 new file mode 100644 index 000000000000..c95d46990f3d Binary files /dev/null and b/sound/effects/Captures/Paradise Station 13 2025-01-21 21-39-48.mp4 differ diff --git a/sound/effects/Captures/Paradise Station 13 2025-01-21 22-35-56.mp4 b/sound/effects/Captures/Paradise Station 13 2025-01-21 22-35-56.mp4 new file mode 100644 index 000000000000..03220ee886fa Binary files /dev/null and b/sound/effects/Captures/Paradise Station 13 2025-01-21 22-35-56.mp4 differ diff --git a/sound/effects/Captures/Paradise Station 13 2025-01-22 12-20-09.mp4 b/sound/effects/Captures/Paradise Station 13 2025-01-22 12-20-09.mp4 new file mode 100644 index 000000000000..4679b4f7613a Binary files /dev/null and b/sound/effects/Captures/Paradise Station 13 2025-01-22 12-20-09.mp4 differ diff --git a/sound/effects/Captures/Paradise Station 13 2025-01-22 12-36-29.mp4 b/sound/effects/Captures/Paradise Station 13 2025-01-22 12-36-29.mp4 new file mode 100644 index 000000000000..e061ae5676ff Binary files /dev/null and b/sound/effects/Captures/Paradise Station 13 2025-01-22 12-36-29.mp4 differ diff --git a/sound/effects/Captures/Paradise Station 13 2025-01-22 13-37-11.mp4 b/sound/effects/Captures/Paradise Station 13 2025-01-22 13-37-11.mp4 new file mode 100644 index 000000000000..64c4ab5ecdef Binary files /dev/null and b/sound/effects/Captures/Paradise Station 13 2025-01-22 13-37-11.mp4 differ diff --git a/sound/effects/Captures/Paradise Station 13 2025-01-22 14-55-29.mp4 b/sound/effects/Captures/Paradise Station 13 2025-01-22 14-55-29.mp4 new file mode 100644 index 000000000000..6af64f514dde Binary files /dev/null and b/sound/effects/Captures/Paradise Station 13 2025-01-22 14-55-29.mp4 differ diff --git a/sound/effects/Captures/Paradise Station 13 2025-01-22 14-56-33.mp4 b/sound/effects/Captures/Paradise Station 13 2025-01-22 14-56-33.mp4 new file mode 100644 index 000000000000..d447d846ec35 Binary files /dev/null and b/sound/effects/Captures/Paradise Station 13 2025-01-22 14-56-33.mp4 differ diff --git a/sound/effects/Captures/Paradise Station 13 2025-01-22 15-02-55.mp4 b/sound/effects/Captures/Paradise Station 13 2025-01-22 15-02-55.mp4 new file mode 100644 index 000000000000..11c7bb634c9e Binary files /dev/null and b/sound/effects/Captures/Paradise Station 13 2025-01-22 15-02-55.mp4 differ diff --git a/sound/effects/Captures/Paradise Station 13 2025-01-22 16-17-51.mp4 b/sound/effects/Captures/Paradise Station 13 2025-01-22 16-17-51.mp4 new file mode 100644 index 000000000000..ba7a0fc9032d Binary files /dev/null and b/sound/effects/Captures/Paradise Station 13 2025-01-22 16-17-51.mp4 differ diff --git a/sound/effects/Captures/Paradise Station 13 2025-01-22 16-30-07.mp4 b/sound/effects/Captures/Paradise Station 13 2025-01-22 16-30-07.mp4 new file mode 100644 index 000000000000..f128f5eeb271 Binary files /dev/null and b/sound/effects/Captures/Paradise Station 13 2025-01-22 16-30-07.mp4 differ diff --git a/sound/effects/Captures/Paradise Station 13 2025-01-22 16-50-31.mp4 b/sound/effects/Captures/Paradise Station 13 2025-01-22 16-50-31.mp4 new file mode 100644 index 000000000000..57818538bfb2 Binary files /dev/null and b/sound/effects/Captures/Paradise Station 13 2025-01-22 16-50-31.mp4 differ diff --git a/sound/effects/Captures/Paradise Station 13 2025-01-22 18-21-17.mp4 b/sound/effects/Captures/Paradise Station 13 2025-01-22 18-21-17.mp4 new file mode 100644 index 000000000000..940c2392df56 Binary files /dev/null and b/sound/effects/Captures/Paradise Station 13 2025-01-22 18-21-17.mp4 differ diff --git a/sound/effects/Captures/Paradise Station 13 2025-01-22 18-21-44.mp4 b/sound/effects/Captures/Paradise Station 13 2025-01-22 18-21-44.mp4 new file mode 100644 index 000000000000..260171145be8 Binary files /dev/null and b/sound/effects/Captures/Paradise Station 13 2025-01-22 18-21-44.mp4 differ diff --git a/sound/effects/Captures/desktop.ini b/sound/effects/Captures/desktop.ini new file mode 100644 index 000000000000..7f38b4042647 --- /dev/null +++ b/sound/effects/Captures/desktop.ini @@ -0,0 +1,2 @@ +[.ShellClassInfo] +LocalizedResourceName=@%SystemRoot%\system32\windows.storage.dll,-21826 diff --git a/sound/effects/ahaha.ogg b/sound/effects/ahaha.ogg new file mode 100644 index 000000000000..dcea90a3c0df Binary files /dev/null and b/sound/effects/ahaha.ogg differ diff --git a/sound/effects/bowling_strike.ogg b/sound/effects/bowling_strike.ogg new file mode 100644 index 000000000000..eb9918fbdd97 Binary files /dev/null and b/sound/effects/bowling_strike.ogg differ diff --git a/sound/effects/constructform.ogg b/sound/effects/constructform.ogg new file mode 100644 index 000000000000..51783d2bb59d Binary files /dev/null and b/sound/effects/constructform.ogg differ diff --git a/sound/effects/curse.ogg b/sound/effects/curse.ogg new file mode 100644 index 000000000000..b9134da2c5a9 Binary files /dev/null and b/sound/effects/curse.ogg differ diff --git a/sound/effects/curse/curse1.ogg b/sound/effects/curse/curse1.ogg new file mode 100644 index 000000000000..155c23e3e85d Binary files /dev/null and b/sound/effects/curse/curse1.ogg differ diff --git a/sound/effects/curse/curse2.ogg b/sound/effects/curse/curse2.ogg new file mode 100644 index 000000000000..cdfc13e5ceb7 Binary files /dev/null and b/sound/effects/curse/curse2.ogg differ diff --git a/sound/effects/curse/curse3.ogg b/sound/effects/curse/curse3.ogg new file mode 100644 index 000000000000..5ceb74b5c916 Binary files /dev/null and b/sound/effects/curse/curse3.ogg differ diff --git a/sound/effects/curse/curse4.ogg b/sound/effects/curse/curse4.ogg new file mode 100644 index 000000000000..c720569bd2cf Binary files /dev/null and b/sound/effects/curse/curse4.ogg differ diff --git a/sound/effects/curse/curse5.ogg b/sound/effects/curse/curse5.ogg new file mode 100644 index 000000000000..9a2e9db368a7 Binary files /dev/null and b/sound/effects/curse/curse5.ogg differ diff --git a/sound/effects/curse/curse6.ogg b/sound/effects/curse/curse6.ogg new file mode 100644 index 000000000000..c05568f20c52 Binary files /dev/null and b/sound/effects/curse/curse6.ogg differ diff --git a/sound/effects/curse/curseattack.ogg b/sound/effects/curse/curseattack.ogg new file mode 100644 index 000000000000..552a2a572a34 Binary files /dev/null and b/sound/effects/curse/curseattack.ogg differ diff --git a/sound/effects/desecration/desecration-01.ogg b/sound/effects/desecration/desecration-01.ogg new file mode 100644 index 000000000000..44072ec60680 Binary files /dev/null and b/sound/effects/desecration/desecration-01.ogg differ diff --git a/sound/effects/desecration/desecration-02.ogg b/sound/effects/desecration/desecration-02.ogg new file mode 100644 index 000000000000..3462470247f9 Binary files /dev/null and b/sound/effects/desecration/desecration-02.ogg differ diff --git a/sound/effects/desecration/desecration-03.ogg b/sound/effects/desecration/desecration-03.ogg new file mode 100644 index 000000000000..237eac0b3773 Binary files /dev/null and b/sound/effects/desecration/desecration-03.ogg differ diff --git a/sound/effects/moon_parade.ogg b/sound/effects/moon_parade.ogg new file mode 100644 index 000000000000..6ec9e5544fb6 Binary files /dev/null and b/sound/effects/moon_parade.ogg differ diff --git a/sound/effects/moon_parade_soundloop.ogg b/sound/effects/moon_parade_soundloop.ogg new file mode 100644 index 000000000000..cd5aa864cbff Binary files /dev/null and b/sound/effects/moon_parade_soundloop.ogg differ diff --git a/sound/magic/cosmic_energy.ogg b/sound/magic/cosmic_energy.ogg new file mode 100644 index 000000000000..c69a41198fca Binary files /dev/null and b/sound/magic/cosmic_energy.ogg differ diff --git a/sound/magic/cosmic_expansion.ogg b/sound/magic/cosmic_expansion.ogg new file mode 100644 index 000000000000..dbc868fa6c1c Binary files /dev/null and b/sound/magic/cosmic_expansion.ogg differ diff --git a/sound/magic/hereticknock.ogg b/sound/magic/hereticknock.ogg new file mode 100644 index 000000000000..470212cf0159 Binary files /dev/null and b/sound/magic/hereticknock.ogg differ diff --git a/sound/magic/swap.ogg b/sound/magic/swap.ogg new file mode 100644 index 000000000000..de08a44bf559 Binary files /dev/null and b/sound/magic/swap.ogg differ diff --git a/sound/magic/voidblink.ogg b/sound/magic/voidblink.ogg new file mode 100644 index 000000000000..13913858cde3 Binary files /dev/null and b/sound/magic/voidblink.ogg differ diff --git a/sound/weapons/guillotine.ogg b/sound/weapons/guillotine.ogg new file mode 100644 index 000000000000..bb097f89aa86 Binary files /dev/null and b/sound/weapons/guillotine.ogg differ diff --git a/strings/heretic_influences.json b/strings/heretic_influences.json new file mode 100644 index 000000000000..ef7d55a101f2 --- /dev/null +++ b/strings/heretic_influences.json @@ -0,0 +1,67 @@ +{ + "prefix": [ + "aggressive", + "arrogant", + "atomized", + "blissful", + "enlightening", + "fleeting", + "intrusive", + "lowering", + "omniscient", + "peaceful", + "resentful", + "rising", + "subtle", + "threatening", + "thundering", + "towering" + ], + "postfix": [ + "blemish", + "blush", + "breeze", + "cold", + "crack", + "flaw", + "flow", + "grasp", + "heat", + "imperfection", + "memory", + "presence", + "reminder", + "sight", + "thought", + "touch", + "veil", + "whisper" + ], + "drained": [ + "analyzed", + "drained", + "emptied", + "opened", + "researched", + "siphoned" + ], + "drain_message": [ + "A SHIMMER... POTENTIAL... POWER.", + "A WHISPER.", + "COVERED AND FORGOTTEN.", + "CURSED LAND, CURSED MAN, CURSED MIND.", + "GREATER HEIGHTS.", + "I AM BEING WATCHED... FROM WHERE? FROM WHAT?", + "I AM LATE FOR MY DESTINY.", + "LIFE IS FLEETING, BUT WHAT YET STAYS?", + "RAIN OF BLOOD. REIGN OF BLOOD.", + "STRENGTH... UNPARALLELED. UNNATURAL.", + "THE GATES OF THE MANSUS IS HERE, IS OPEN.", + "THE HIGHER I RISE, THE MORE I SEE.", + "THE VEIL IS SHATTERED.", + "THEIR HAND IS AT MY SIDE.", + "THEY WALK THE WORLD. UNNOTICED.", + "TO WALK BETWEEN PLANES." + ] + +} diff --git a/tgui/packages/tgui/interfaces/AntagInfoHeretic.tsx b/tgui/packages/tgui/interfaces/AntagInfoHeretic.tsx new file mode 100644 index 000000000000..9af685bb9faa --- /dev/null +++ b/tgui/packages/tgui/interfaces/AntagInfoHeretic.tsx @@ -0,0 +1,318 @@ +import { BooleanLike } from 'common/react'; + +import { useBackend, useLocalState } from '../backend'; +import { Box, Button, DmIcon, Flex, Section, Stack, Tabs } from '../components'; +import { Window } from '../layouts'; + +const hereticRed = { + color: '#e03c3c', +}; + +const hereticBlue = { + fontWeight: 'bold', + color: '#2185d0', +}; + +const hereticPurple = { + fontWeight: 'bold', + color: '#bd54e0', +}; + +const hereticGreen = { + fontWeight: 'bold', + color: '#20b142', +}; + +const hereticYellow = { + fontWeight: 'bold', + color: 'yellow', +}; + +type IconParams = { + icon: string; + state: string; + frame: number; + dir: number; + moving: BooleanLike; +}; + +type Knowledge = { + path: string; + icon_params: IconParams; + name: string; + desc: string; + gainFlavor: string; + cost: number; + bgr: string; + disabled: BooleanLike; + finished: BooleanLike; + ascension: BooleanLike; +}; + +type KnowledgeInfo = { + knowledge_tiers: KnowledgeTier[]; +}; + +type KnowledgeTier = { + nodes: Knowledge[]; +}; + +type Info = { + charges: number; + total_sacrifices: number; + ascended: BooleanLike; + can_change_objective: BooleanLike; +}; + +const IntroductionSection = (props, context) => { + const { data, act } = useBackend(context); + const { ascended, can_change_objective } = data; + + return ( + + +
+ + + + + + + + +
+
+
+ ); +}; + +const FlavorSection = () => { + return ( + + + + + Another day at a meaningless job. You feel a  + shimmer +  around you, as a realization of something  + strange +  in the air unfolds. You look inwards and discover something that will change your life. + + + + + The Gates of Mansus +  open up to your mind. + + + + + ); +}; + +const GuideSection = () => { + return ( + + + + - Find reality smashing  + influences +  around the station invisible to the normal eye and  + right click on them to harvest them for  + knowledge points. Tapping them makes them visible to all after a short time. + + + - Use your  + Living Heart action +  to track down  + sacrifice targets, but be careful: Pulsing it will produce a heartbeat sound + that nearby people may hear. This action is tied to your heart - if you lose it, you must complete a + ritual to regain it. + + + - Draw a  + transmutation rune by using a drawing tool (a pen or crayon) on the floor + while having  + Mansus Grasp +  active in your other hand. This rune allows you to complete rituals and sacrifices. + + + - Follow your Living Heart to find your targets. Bring them back to a  + transmutation rune in critical or worse condition to  + sacrifice them for  + knowledge points. The Mansus ONLY accepts targets pointed to by + the  + Living Heart. + + + - Make yourself a focus to be able to cast various advanced spells to + assist you in acquiring harder and harder sacrifices. + + + - Accomplish all of your objectives to be able to learn the final ritual. + Complete the ritual to become all powerful! + + + + ); +}; + +const InformationSection = (props, context) => { + const { data } = useBackend(context); + const { charges, total_sacrifices, ascended } = data; + return ( + + + {!!ascended && ( + + + You have + + + ASCENDED + + ! + + + + )} + + You have {charges || 0}  + knowledge point{charges !== 1 ? 's' : ''}. + + + You have made a total of  + {total_sacrifices || 0}  + sacrifices. + + + + ); +}; + +const KnowledgeTree = (props, context) => { + const { data, act } = useBackend(context); + const { knowledge_tiers } = data; + + return ( +
+ + DAWN + + + {knowledge_tiers.length === 0 + ? 'None!' + : knowledge_tiers.map((tier, i) => ( + + + {tier.nodes.map((node) => ( + + + {!!node.ascension && ( + + DUSK + + )} + + ))} + +
+
+ ))} +
+
+ ); +}; + +const ResearchInfo = (props, context) => { + const { data } = useBackend(context); + const { charges } = data; + + return ( + + + You have {charges || 0}  + knowledge point{charges !== 1 ? 's' : ''} to spend. + + + + + + ); +}; + +export const AntagInfoHeretic = (props, context) => { + const { data } = useBackend(context); + const { ascended } = data; + + const [currentTab, setTab] = useLocalState(context, 'currentTab', 0); + + return ( + + + + + + setTab(0)}> + Information + + setTab(1)} + > + Research + + + + {(currentTab === 0 && ) || } + + + + ); +}; diff --git a/tgui/public/tgui.bundle.js b/tgui/public/tgui.bundle.js index ea91fdc4e33f..d6fd8135e1c1 100644 --- a/tgui/public/tgui.bundle.js +++ b/tgui/public/tgui.bundle.js @@ -1,30 +1,30 @@ -(function(){(function(){var Jt={96376:function(T,r,n){"use strict";r.__esModule=!0,r.createPopper=void 0,r.popperGenerator=m;var e=g(n(74758)),a=g(n(28811)),t=g(n(98309)),o=g(n(44896)),f=g(n(33118)),b=g(n(10579)),y=g(n(56500)),B=g(n(17633));r.detectOverflow=B.default;var k=n(75573);function g(u){return u&&u.__esModule?u:{default:u}}var l={placement:"bottom",modifiers:[],strategy:"absolute"};function c(){for(var u=arguments.length,s=new Array(u),d=0;d0&&(0,a.round)(g.width)/y.offsetWidth||1,c=y.offsetHeight>0&&(0,a.round)(g.height)/y.offsetHeight||1);var m=(0,e.isElement)(y)?(0,t.default)(y):window,i=m.visualViewport,u=!(0,o.default)()&&k,s=(g.left+(u&&i?i.offsetLeft:0))/l,d=(g.top+(u&&i?i.offsetTop:0))/c,v=g.width/l,h=g.height/c;return{width:v,height:h,top:d,right:s+v,bottom:d+h,left:s,x:s,y:d}}},49035:function(T,r,n){"use strict";r.__esModule=!0,r.default=h;var e=n(46206),a=u(n(87991)),t=u(n(79752)),o=u(n(98309)),f=u(n(44896)),b=u(n(40600)),y=u(n(16599)),B=n(75573),k=u(n(37786)),g=u(n(57819)),l=u(n(4206)),c=u(n(12972)),m=u(n(81666)),i=n(63618);function u(C){return C&&C.__esModule?C:{default:C}}function s(C,p){var N=(0,k.default)(C,!1,p==="fixed");return N.top=N.top+C.clientTop,N.left=N.left+C.clientLeft,N.bottom=N.top+C.clientHeight,N.right=N.left+C.clientWidth,N.width=C.clientWidth,N.height=C.clientHeight,N.x=N.left,N.y=N.top,N}function d(C,p,N){return p===e.viewport?(0,m.default)((0,a.default)(C,N)):(0,B.isElement)(p)?s(p,N):(0,m.default)((0,t.default)((0,b.default)(C)))}function v(C){var p=(0,o.default)((0,g.default)(C)),N=["absolute","fixed"].indexOf((0,y.default)(C).position)>=0,V=N&&(0,B.isHTMLElement)(C)?(0,f.default)(C):C;return(0,B.isElement)(V)?p.filter(function(S){return(0,B.isElement)(S)&&(0,l.default)(S,V)&&(0,c.default)(S)!=="body"}):[]}function h(C,p,N,V){var S=p==="clippingParents"?v(C):[].concat(p),I=[].concat(S,[N]),L=I[0],w=I.reduce(function(A,x){var E=d(C,x,V);return A.top=(0,i.max)(E.top,A.top),A.right=(0,i.min)(E.right,A.right),A.bottom=(0,i.min)(E.bottom,A.bottom),A.left=(0,i.max)(E.left,A.left),A},d(C,L,V));return w.width=w.right-w.left,w.height=w.bottom-w.top,w.x=w.left,w.y=w.top,w}},74758:function(T,r,n){"use strict";r.__esModule=!0,r.default=l;var e=k(n(37786)),a=k(n(13390)),t=k(n(12972)),o=n(75573),f=k(n(79697)),b=k(n(40600)),y=k(n(10798)),B=n(63618);function k(c){return c&&c.__esModule?c:{default:c}}function g(c){var m=c.getBoundingClientRect(),i=(0,B.round)(m.width)/c.offsetWidth||1,u=(0,B.round)(m.height)/c.offsetHeight||1;return i!==1||u!==1}function l(c,m,i){i===void 0&&(i=!1);var u=(0,o.isHTMLElement)(m),s=(0,o.isHTMLElement)(m)&&g(m),d=(0,b.default)(m),v=(0,e.default)(c,s,i),h={scrollLeft:0,scrollTop:0},C={x:0,y:0};return(u||!u&&!i)&&(((0,t.default)(m)!=="body"||(0,y.default)(d))&&(h=(0,a.default)(m)),(0,o.isHTMLElement)(m)?(C=(0,e.default)(m,!0),C.x+=m.clientLeft,C.y+=m.clientTop):d&&(C.x=(0,f.default)(d))),{x:v.left+h.scrollLeft-C.x,y:v.top+h.scrollTop-C.y,width:v.width,height:v.height}}},16599:function(T,r,n){"use strict";r.__esModule=!0,r.default=t;var e=a(n(95115));function a(o){return o&&o.__esModule?o:{default:o}}function t(o){return(0,e.default)(o).getComputedStyle(o)}},40600:function(T,r,n){"use strict";r.__esModule=!0,r.default=a;var e=n(75573);function a(t){return(((0,e.isElement)(t)?t.ownerDocument:t.document)||window.document).documentElement}},79752:function(T,r,n){"use strict";r.__esModule=!0,r.default=y;var e=b(n(40600)),a=b(n(16599)),t=b(n(79697)),o=b(n(43750)),f=n(63618);function b(B){return B&&B.__esModule?B:{default:B}}function y(B){var k,g=(0,e.default)(B),l=(0,o.default)(B),c=(k=B.ownerDocument)==null?void 0:k.body,m=(0,f.max)(g.scrollWidth,g.clientWidth,c?c.scrollWidth:0,c?c.clientWidth:0),i=(0,f.max)(g.scrollHeight,g.clientHeight,c?c.scrollHeight:0,c?c.clientHeight:0),u=-l.scrollLeft+(0,t.default)(B),s=-l.scrollTop;return(0,a.default)(c||g).direction==="rtl"&&(u+=(0,f.max)(g.clientWidth,c?c.clientWidth:0)-m),{width:m,height:i,x:u,y:s}}},3073:function(T,r){"use strict";r.__esModule=!0,r.default=n;function n(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}},28811:function(T,r,n){"use strict";r.__esModule=!0,r.default=t;var e=a(n(37786));function a(o){return o&&o.__esModule?o:{default:o}}function t(o){var f=(0,e.default)(o),b=o.offsetWidth,y=o.offsetHeight;return Math.abs(f.width-b)<=1&&(b=f.width),Math.abs(f.height-y)<=1&&(y=f.height),{x:o.offsetLeft,y:o.offsetTop,width:b,height:y}}},12972:function(T,r){"use strict";r.__esModule=!0,r.default=n;function n(e){return e?(e.nodeName||"").toLowerCase():null}},13390:function(T,r,n){"use strict";r.__esModule=!0,r.default=b;var e=f(n(43750)),a=f(n(95115)),t=n(75573),o=f(n(3073));function f(y){return y&&y.__esModule?y:{default:y}}function b(y){return y===(0,a.default)(y)||!(0,t.isHTMLElement)(y)?(0,e.default)(y):(0,o.default)(y)}},44896:function(T,r,n){"use strict";r.__esModule=!0,r.default=l;var e=B(n(95115)),a=B(n(12972)),t=B(n(16599)),o=n(75573),f=B(n(87031)),b=B(n(57819)),y=B(n(35366));function B(c){return c&&c.__esModule?c:{default:c}}function k(c){return!(0,o.isHTMLElement)(c)||(0,t.default)(c).position==="fixed"?null:c.offsetParent}function g(c){var m=/firefox/i.test((0,y.default)()),i=/Trident/i.test((0,y.default)());if(i&&(0,o.isHTMLElement)(c)){var u=(0,t.default)(c);if(u.position==="fixed")return null}var s=(0,b.default)(c);for((0,o.isShadowRoot)(s)&&(s=s.host);(0,o.isHTMLElement)(s)&&["html","body"].indexOf((0,a.default)(s))<0;){var d=(0,t.default)(s);if(d.transform!=="none"||d.perspective!=="none"||d.contain==="paint"||["transform","perspective"].indexOf(d.willChange)!==-1||m&&d.willChange==="filter"||m&&d.filter&&d.filter!=="none")return s;s=s.parentNode}return null}function l(c){for(var m=(0,e.default)(c),i=k(c);i&&(0,f.default)(i)&&(0,t.default)(i).position==="static";)i=k(i);return i&&((0,a.default)(i)==="html"||(0,a.default)(i)==="body"&&(0,t.default)(i).position==="static")?m:i||g(c)||m}},57819:function(T,r,n){"use strict";r.__esModule=!0,r.default=f;var e=o(n(12972)),a=o(n(40600)),t=n(75573);function o(b){return b&&b.__esModule?b:{default:b}}function f(b){return(0,e.default)(b)==="html"?b:b.assignedSlot||b.parentNode||((0,t.isShadowRoot)(b)?b.host:null)||(0,a.default)(b)}},24426:function(T,r,n){"use strict";r.__esModule=!0,r.default=b;var e=f(n(57819)),a=f(n(10798)),t=f(n(12972)),o=n(75573);function f(y){return y&&y.__esModule?y:{default:y}}function b(y){return["html","body","#document"].indexOf((0,t.default)(y))>=0?y.ownerDocument.body:(0,o.isHTMLElement)(y)&&(0,a.default)(y)?y:b((0,e.default)(y))}},87991:function(T,r,n){"use strict";r.__esModule=!0,r.default=b;var e=f(n(95115)),a=f(n(40600)),t=f(n(79697)),o=f(n(89331));function f(y){return y&&y.__esModule?y:{default:y}}function b(y,B){var k=(0,e.default)(y),g=(0,a.default)(y),l=k.visualViewport,c=g.clientWidth,m=g.clientHeight,i=0,u=0;if(l){c=l.width,m=l.height;var s=(0,o.default)();(s||!s&&B==="fixed")&&(i=l.offsetLeft,u=l.offsetTop)}return{width:c,height:m,x:i+(0,t.default)(y),y:u}}},95115:function(T,r){"use strict";r.__esModule=!0,r.default=n;function n(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var a=e.ownerDocument;return a&&a.defaultView||window}return e}},43750:function(T,r,n){"use strict";r.__esModule=!0,r.default=t;var e=a(n(95115));function a(o){return o&&o.__esModule?o:{default:o}}function t(o){var f=(0,e.default)(o),b=f.pageXOffset,y=f.pageYOffset;return{scrollLeft:b,scrollTop:y}}},79697:function(T,r,n){"use strict";r.__esModule=!0,r.default=f;var e=o(n(37786)),a=o(n(40600)),t=o(n(43750));function o(b){return b&&b.__esModule?b:{default:b}}function f(b){return(0,e.default)((0,a.default)(b)).left+(0,t.default)(b).scrollLeft}},75573:function(T,r,n){"use strict";r.__esModule=!0,r.isElement=t,r.isHTMLElement=o,r.isShadowRoot=f;var e=a(n(95115));function a(b){return b&&b.__esModule?b:{default:b}}function t(b){var y=(0,e.default)(b).Element;return b instanceof y||b instanceof Element}function o(b){var y=(0,e.default)(b).HTMLElement;return b instanceof y||b instanceof HTMLElement}function f(b){if(typeof ShadowRoot=="undefined")return!1;var y=(0,e.default)(b).ShadowRoot;return b instanceof y||b instanceof ShadowRoot}},89331:function(T,r,n){"use strict";r.__esModule=!0,r.default=t;var e=a(n(35366));function a(o){return o&&o.__esModule?o:{default:o}}function t(){return!/^((?!chrome|android).)*safari/i.test((0,e.default)())}},10798:function(T,r,n){"use strict";r.__esModule=!0,r.default=t;var e=a(n(16599));function a(o){return o&&o.__esModule?o:{default:o}}function t(o){var f=(0,e.default)(o),b=f.overflow,y=f.overflowX,B=f.overflowY;return/auto|scroll|overlay|hidden/.test(b+B+y)}},87031:function(T,r,n){"use strict";r.__esModule=!0,r.default=t;var e=a(n(12972));function a(o){return o&&o.__esModule?o:{default:o}}function t(o){return["table","td","th"].indexOf((0,e.default)(o))>=0}},98309:function(T,r,n){"use strict";r.__esModule=!0,r.default=b;var e=f(n(24426)),a=f(n(57819)),t=f(n(95115)),o=f(n(10798));function f(y){return y&&y.__esModule?y:{default:y}}function b(y,B){var k;B===void 0&&(B=[]);var g=(0,e.default)(y),l=g===((k=y.ownerDocument)==null?void 0:k.body),c=(0,t.default)(g),m=l?[c].concat(c.visualViewport||[],(0,o.default)(g)?g:[]):g,i=B.concat(m);return l?i:i.concat(b((0,a.default)(m)))}},46206:function(T,r){"use strict";r.__esModule=!0,r.write=r.viewport=r.variationPlacements=r.top=r.start=r.right=r.reference=r.read=r.popper=r.placements=r.modifierPhases=r.main=r.left=r.end=r.clippingParents=r.bottom=r.beforeWrite=r.beforeRead=r.beforeMain=r.basePlacements=r.auto=r.afterWrite=r.afterRead=r.afterMain=void 0;var n=r.top="top",e=r.bottom="bottom",a=r.right="right",t=r.left="left",o=r.auto="auto",f=r.basePlacements=[n,e,a,t],b=r.start="start",y=r.end="end",B=r.clippingParents="clippingParents",k=r.viewport="viewport",g=r.popper="popper",l=r.reference="reference",c=r.variationPlacements=f.reduce(function(S,I){return S.concat([I+"-"+b,I+"-"+y])},[]),m=r.placements=[].concat(f,[o]).reduce(function(S,I){return S.concat([I,I+"-"+b,I+"-"+y])},[]),i=r.beforeRead="beforeRead",u=r.read="read",s=r.afterRead="afterRead",d=r.beforeMain="beforeMain",v=r.main="main",h=r.afterMain="afterMain",C=r.beforeWrite="beforeWrite",p=r.write="write",N=r.afterWrite="afterWrite",V=r.modifierPhases=[i,u,s,d,v,h,C,p,N]},95996:function(T,r,n){"use strict";r.__esModule=!0;var e={popperGenerator:!0,detectOverflow:!0,createPopperBase:!0,createPopper:!0,createPopperLite:!0};r.popperGenerator=r.detectOverflow=r.createPopperLite=r.createPopperBase=r.createPopper=void 0;var a=n(46206);Object.keys(a).forEach(function(y){y==="default"||y==="__esModule"||Object.prototype.hasOwnProperty.call(e,y)||y in r&&r[y]===a[y]||(r[y]=a[y])});var t=n(39805);Object.keys(t).forEach(function(y){y==="default"||y==="__esModule"||Object.prototype.hasOwnProperty.call(e,y)||y in r&&r[y]===t[y]||(r[y]=t[y])});var o=n(96376);r.popperGenerator=o.popperGenerator,r.detectOverflow=o.detectOverflow,r.createPopperBase=o.createPopper;var f=n(83312);r.createPopper=f.createPopper;var b=n(2473);r.createPopperLite=b.createPopper},19975:function(T,r,n){"use strict";r.__esModule=!0,r.default=void 0;var e=t(n(12972)),a=n(75573);function t(y){return y&&y.__esModule?y:{default:y}}function o(y){var B=y.state;Object.keys(B.elements).forEach(function(k){var g=B.styles[k]||{},l=B.attributes[k]||{},c=B.elements[k];!(0,a.isHTMLElement)(c)||!(0,e.default)(c)||(Object.assign(c.style,g),Object.keys(l).forEach(function(m){var i=l[m];i===!1?c.removeAttribute(m):c.setAttribute(m,i===!0?"":i)}))})}function f(y){var B=y.state,k={popper:{position:B.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(B.elements.popper.style,k.popper),B.styles=k,B.elements.arrow&&Object.assign(B.elements.arrow.style,k.arrow),function(){Object.keys(B.elements).forEach(function(g){var l=B.elements[g],c=B.attributes[g]||{},m=Object.keys(B.styles.hasOwnProperty(g)?B.styles[g]:k[g]),i=m.reduce(function(u,s){return u[s]="",u},{});!(0,a.isHTMLElement)(l)||!(0,e.default)(l)||(Object.assign(l.style,i),Object.keys(c).forEach(function(u){l.removeAttribute(u)}))})}}var b=r.default={name:"applyStyles",enabled:!0,phase:"write",fn:o,effect:f,requires:["computeStyles"]}},52744:function(T,r,n){"use strict";r.__esModule=!0,r.default=void 0;var e=g(n(83104)),a=g(n(28811)),t=g(n(4206)),o=g(n(44896)),f=g(n(41199)),b=n(28595),y=g(n(43286)),B=g(n(81447)),k=n(46206);function g(u){return u&&u.__esModule?u:{default:u}}var l=function(){function u(s,d){return s=typeof s=="function"?s(Object.assign({},d.rects,{placement:d.placement})):s,(0,y.default)(typeof s!="number"?s:(0,B.default)(s,k.basePlacements))}return u}();function c(u){var s,d=u.state,v=u.name,h=u.options,C=d.elements.arrow,p=d.modifiersData.popperOffsets,N=(0,e.default)(d.placement),V=(0,f.default)(N),S=[k.left,k.right].indexOf(N)>=0,I=S?"height":"width";if(!(!C||!p)){var L=l(h.padding,d),w=(0,a.default)(C),A=V==="y"?k.top:k.left,x=V==="y"?k.bottom:k.right,E=d.rects.reference[I]+d.rects.reference[V]-p[V]-d.rects.popper[I],P=p[V]-d.rects.reference[V],D=(0,o.default)(C),M=D?V==="y"?D.clientHeight||0:D.clientWidth||0:0,R=E/2-P/2,O=L[A],F=M-w[I]-L[x],_=M/2-w[I]/2+R,U=(0,b.within)(O,_,F),z=V;d.modifiersData[v]=(s={},s[z]=U,s.centerOffset=U-_,s)}}function m(u){var s=u.state,d=u.options,v=d.element,h=v===void 0?"[data-popper-arrow]":v;h!=null&&(typeof h=="string"&&(h=s.elements.popper.querySelector(h),!h)||(0,t.default)(s.elements.popper,h)&&(s.elements.arrow=h))}var i=r.default={name:"arrow",enabled:!0,phase:"main",fn:c,effect:m,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]}},59894:function(T,r,n){"use strict";r.__esModule=!0,r.default=void 0,r.mapToStyles=c;var e=n(46206),a=k(n(44896)),t=k(n(95115)),o=k(n(40600)),f=k(n(16599)),b=k(n(83104)),y=k(n(45)),B=n(63618);function k(u){return u&&u.__esModule?u:{default:u}}var g={top:"auto",right:"auto",bottom:"auto",left:"auto"};function l(u,s){var d=u.x,v=u.y,h=s.devicePixelRatio||1;return{x:(0,B.round)(d*h)/h||0,y:(0,B.round)(v*h)/h||0}}function c(u){var s,d=u.popper,v=u.popperRect,h=u.placement,C=u.variation,p=u.offsets,N=u.position,V=u.gpuAcceleration,S=u.adaptive,I=u.roundOffsets,L=u.isFixed,w=p.x,A=w===void 0?0:w,x=p.y,E=x===void 0?0:x,P=typeof I=="function"?I({x:A,y:E}):{x:A,y:E};A=P.x,E=P.y;var D=p.hasOwnProperty("x"),M=p.hasOwnProperty("y"),R=e.left,O=e.top,F=window;if(S){var _=(0,a.default)(d),U="clientHeight",z="clientWidth";if(_===(0,t.default)(d)&&(_=(0,o.default)(d),(0,f.default)(_).position!=="static"&&N==="absolute"&&(U="scrollHeight",z="scrollWidth")),_=_,h===e.top||(h===e.left||h===e.right)&&C===e.end){O=e.bottom;var $=L&&_===F&&F.visualViewport?F.visualViewport.height:_[U];E-=$-v.height,E*=V?1:-1}if(h===e.left||(h===e.top||h===e.bottom)&&C===e.end){R=e.right;var G=L&&_===F&&F.visualViewport?F.visualViewport.width:_[z];A-=G-v.width,A*=V?1:-1}}var X=Object.assign({position:N},S&&g),J=I===!0?l({x:A,y:E},(0,t.default)(d)):{x:A,y:E};if(A=J.x,E=J.y,V){var se;return Object.assign({},X,(se={},se[O]=M?"0":"",se[R]=D?"0":"",se.transform=(F.devicePixelRatio||1)<=1?"translate("+A+"px, "+E+"px)":"translate3d("+A+"px, "+E+"px, 0)",se))}return Object.assign({},X,(s={},s[O]=M?E+"px":"",s[R]=D?A+"px":"",s.transform="",s))}function m(u){var s=u.state,d=u.options,v=d.gpuAcceleration,h=v===void 0?!0:v,C=d.adaptive,p=C===void 0?!0:C,N=d.roundOffsets,V=N===void 0?!0:N,S={placement:(0,b.default)(s.placement),variation:(0,y.default)(s.placement),popper:s.elements.popper,popperRect:s.rects.popper,gpuAcceleration:h,isFixed:s.options.strategy==="fixed"};s.modifiersData.popperOffsets!=null&&(s.styles.popper=Object.assign({},s.styles.popper,c(Object.assign({},S,{offsets:s.modifiersData.popperOffsets,position:s.options.strategy,adaptive:p,roundOffsets:V})))),s.modifiersData.arrow!=null&&(s.styles.arrow=Object.assign({},s.styles.arrow,c(Object.assign({},S,{offsets:s.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:V})))),s.attributes.popper=Object.assign({},s.attributes.popper,{"data-popper-placement":s.placement})}var i=r.default={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:m,data:{}}},36692:function(T,r,n){"use strict";r.__esModule=!0,r.default=void 0;var e=a(n(95115));function a(b){return b&&b.__esModule?b:{default:b}}var t={passive:!0};function o(b){var y=b.state,B=b.instance,k=b.options,g=k.scroll,l=g===void 0?!0:g,c=k.resize,m=c===void 0?!0:c,i=(0,e.default)(y.elements.popper),u=[].concat(y.scrollParents.reference,y.scrollParents.popper);return l&&u.forEach(function(s){s.addEventListener("scroll",B.update,t)}),m&&i.addEventListener("resize",B.update,t),function(){l&&u.forEach(function(s){s.removeEventListener("scroll",B.update,t)}),m&&i.removeEventListener("resize",B.update,t)}}var f=r.default={name:"eventListeners",enabled:!0,phase:"write",fn:function(){function b(){}return b}(),effect:o,data:{}}},23798:function(T,r,n){"use strict";r.__esModule=!0,r.default=void 0;var e=B(n(71376)),a=B(n(83104)),t=B(n(86459)),o=B(n(17633)),f=B(n(9041)),b=n(46206),y=B(n(45));function B(c){return c&&c.__esModule?c:{default:c}}function k(c){if((0,a.default)(c)===b.auto)return[];var m=(0,e.default)(c);return[(0,t.default)(c),m,(0,t.default)(m)]}function g(c){var m=c.state,i=c.options,u=c.name;if(!m.modifiersData[u]._skip){for(var s=i.mainAxis,d=s===void 0?!0:s,v=i.altAxis,h=v===void 0?!0:v,C=i.fallbackPlacements,p=i.padding,N=i.boundary,V=i.rootBoundary,S=i.altBoundary,I=i.flipVariations,L=I===void 0?!0:I,w=i.allowedAutoPlacements,A=m.options.placement,x=(0,a.default)(A),E=x===A,P=C||(E||!L?[(0,e.default)(A)]:k(A)),D=[A].concat(P).reduce(function(ne,te){return ne.concat((0,a.default)(te)===b.auto?(0,f.default)(m,{placement:te,boundary:N,rootBoundary:V,padding:p,flipVariations:L,allowedAutoPlacements:w}):te)},[]),M=m.rects.reference,R=m.rects.popper,O=new Map,F=!0,_=D[0],U=0;U=0,J=X?"width":"height",se=(0,o.default)(m,{placement:z,boundary:N,rootBoundary:V,altBoundary:S,padding:p}),ie=X?G?b.right:b.left:G?b.bottom:b.top;M[J]>R[J]&&(ie=(0,e.default)(ie));var me=(0,e.default)(ie),q=[];if(d&&q.push(se[$]<=0),h&&q.push(se[ie]<=0,se[me]<=0),q.every(function(ne){return ne})){_=z,F=!1;break}O.set(z,q)}if(F)for(var re=L?3:1,ae=function(){function ne(te){var fe=D.find(function(pe){var ce=O.get(pe);if(ce)return ce.slice(0,te).every(function(Ve){return Ve})});if(fe)return _=fe,"break"}return ne}(),le=re;le>0;le--){var Z=ae(le);if(Z==="break")break}m.placement!==_&&(m.modifiersData[u]._skip=!0,m.placement=_,m.reset=!0)}}var l=r.default={name:"flip",enabled:!0,phase:"main",fn:g,requiresIfExists:["offset"],data:{_skip:!1}}},83761:function(T,r,n){"use strict";r.__esModule=!0,r.default=void 0;var e=n(46206),a=t(n(17633));function t(B){return B&&B.__esModule?B:{default:B}}function o(B,k,g){return g===void 0&&(g={x:0,y:0}),{top:B.top-k.height-g.y,right:B.right-k.width+g.x,bottom:B.bottom-k.height+g.y,left:B.left-k.width-g.x}}function f(B){return[e.top,e.right,e.bottom,e.left].some(function(k){return B[k]>=0})}function b(B){var k=B.state,g=B.name,l=k.rects.reference,c=k.rects.popper,m=k.modifiersData.preventOverflow,i=(0,a.default)(k,{elementContext:"reference"}),u=(0,a.default)(k,{altBoundary:!0}),s=o(i,l),d=o(u,c,m),v=f(s),h=f(d);k.modifiersData[g]={referenceClippingOffsets:s,popperEscapeOffsets:d,isReferenceHidden:v,hasPopperEscaped:h},k.attributes.popper=Object.assign({},k.attributes.popper,{"data-popper-reference-hidden":v,"data-popper-escaped":h})}var y=r.default={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:b}},39805:function(T,r,n){"use strict";r.__esModule=!0,r.preventOverflow=r.popperOffsets=r.offset=r.hide=r.flip=r.eventListeners=r.computeStyles=r.arrow=r.applyStyles=void 0;var e=g(n(19975));r.applyStyles=e.default;var a=g(n(52744));r.arrow=a.default;var t=g(n(59894));r.computeStyles=t.default;var o=g(n(36692));r.eventListeners=o.default;var f=g(n(23798));r.flip=f.default;var b=g(n(83761));r.hide=b.default;var y=g(n(61410));r.offset=y.default;var B=g(n(40107));r.popperOffsets=B.default;var k=g(n(75137));r.preventOverflow=k.default;function g(l){return l&&l.__esModule?l:{default:l}}},61410:function(T,r,n){"use strict";r.__esModule=!0,r.default=void 0,r.distanceAndSkiddingToXY=o;var e=t(n(83104)),a=n(46206);function t(y){return y&&y.__esModule?y:{default:y}}function o(y,B,k){var g=(0,e.default)(y),l=[a.left,a.top].indexOf(g)>=0?-1:1,c=typeof k=="function"?k(Object.assign({},B,{placement:y})):k,m=c[0],i=c[1];return m=m||0,i=(i||0)*l,[a.left,a.right].indexOf(g)>=0?{x:i,y:m}:{x:m,y:i}}function f(y){var B=y.state,k=y.options,g=y.name,l=k.offset,c=l===void 0?[0,0]:l,m=a.placements.reduce(function(d,v){return d[v]=o(v,B.rects,c),d},{}),i=m[B.placement],u=i.x,s=i.y;B.modifiersData.popperOffsets!=null&&(B.modifiersData.popperOffsets.x+=u,B.modifiersData.popperOffsets.y+=s),B.modifiersData[g]=m}var b=r.default={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:f}},40107:function(T,r,n){"use strict";r.__esModule=!0,r.default=void 0;var e=a(n(89951));function a(f){return f&&f.__esModule?f:{default:f}}function t(f){var b=f.state,y=f.name;b.modifiersData[y]=(0,e.default)({reference:b.rects.reference,element:b.rects.popper,strategy:"absolute",placement:b.placement})}var o=r.default={name:"popperOffsets",enabled:!0,phase:"read",fn:t,data:{}}},75137:function(T,r,n){"use strict";r.__esModule=!0,r.default=void 0;var e=n(46206),a=c(n(83104)),t=c(n(41199)),o=c(n(28066)),f=n(28595),b=c(n(28811)),y=c(n(44896)),B=c(n(17633)),k=c(n(45)),g=c(n(34780)),l=n(63618);function c(u){return u&&u.__esModule?u:{default:u}}function m(u){var s=u.state,d=u.options,v=u.name,h=d.mainAxis,C=h===void 0?!0:h,p=d.altAxis,N=p===void 0?!1:p,V=d.boundary,S=d.rootBoundary,I=d.altBoundary,L=d.padding,w=d.tether,A=w===void 0?!0:w,x=d.tetherOffset,E=x===void 0?0:x,P=(0,B.default)(s,{boundary:V,rootBoundary:S,padding:L,altBoundary:I}),D=(0,a.default)(s.placement),M=(0,k.default)(s.placement),R=!M,O=(0,t.default)(D),F=(0,o.default)(O),_=s.modifiersData.popperOffsets,U=s.rects.reference,z=s.rects.popper,$=typeof E=="function"?E(Object.assign({},s.rects,{placement:s.placement})):E,G=typeof $=="number"?{mainAxis:$,altAxis:$}:Object.assign({mainAxis:0,altAxis:0},$),X=s.modifiersData.offset?s.modifiersData.offset[s.placement]:null,J={x:0,y:0};if(_){if(C){var se,ie=O==="y"?e.top:e.left,me=O==="y"?e.bottom:e.right,q=O==="y"?"height":"width",re=_[O],ae=re+P[ie],le=re-P[me],Z=A?-z[q]/2:0,ne=M===e.start?U[q]:z[q],te=M===e.start?-z[q]:-U[q],fe=s.elements.arrow,pe=A&&fe?(0,b.default)(fe):{width:0,height:0},ce=s.modifiersData["arrow#persistent"]?s.modifiersData["arrow#persistent"].padding:(0,g.default)(),Ve=ce[ie],Ce=ce[me],Ne=(0,f.within)(0,U[q],pe[q]),Be=R?U[q]/2-Z-Ne-Ve-G.mainAxis:ne-Ne-Ve-G.mainAxis,be=R?-U[q]/2+Z+Ne+Ce+G.mainAxis:te+Ne+Ce+G.mainAxis,Le=s.elements.arrow&&(0,y.default)(s.elements.arrow),we=Le?O==="y"?Le.clientTop||0:Le.clientLeft||0:0,xe=(se=X==null?void 0:X[O])!=null?se:0,Re=re+Be-xe-we,He=re+be-xe,ye=(0,f.within)(A?(0,l.min)(ae,Re):ae,re,A?(0,l.max)(le,He):le);_[O]=ye,J[O]=ye-re}if(N){var de,he=O==="x"?e.top:e.left,ke=O==="x"?e.bottom:e.right,ve=_[F],Se=F==="y"?"height":"width",Pe=ve+P[he],je=ve-P[ke],Fe=[e.top,e.left].indexOf(D)!==-1,ze=(de=X==null?void 0:X[F])!=null?de:0,We=Fe?Pe:ve-U[Se]-z[Se]-ze+G.altAxis,Ue=Fe?ve+U[Se]+z[Se]-ze-G.altAxis:je,Xe=A&&Fe?(0,f.withinMaxClamp)(We,ve,Ue):(0,f.within)(A?We:Pe,ve,A?Ue:je);_[F]=Xe,J[F]=Xe-ve}s.modifiersData[v]=J}}var i=r.default={name:"preventOverflow",enabled:!0,phase:"main",fn:m,requiresIfExists:["offset"]}},2473:function(T,r,n){"use strict";r.__esModule=!0,r.defaultModifiers=r.createPopper=void 0;var e=n(96376);r.popperGenerator=e.popperGenerator,r.detectOverflow=e.detectOverflow;var a=b(n(36692)),t=b(n(40107)),o=b(n(59894)),f=b(n(19975));function b(k){return k&&k.__esModule?k:{default:k}}var y=r.defaultModifiers=[a.default,t.default,o.default,f.default],B=r.createPopper=(0,e.popperGenerator)({defaultModifiers:y})},83312:function(T,r,n){"use strict";r.__esModule=!0;var e={createPopper:!0,createPopperLite:!0,defaultModifiers:!0,popperGenerator:!0,detectOverflow:!0};r.defaultModifiers=r.createPopperLite=r.createPopper=void 0;var a=n(96376);r.popperGenerator=a.popperGenerator,r.detectOverflow=a.detectOverflow;var t=i(n(36692)),o=i(n(40107)),f=i(n(59894)),b=i(n(19975)),y=i(n(61410)),B=i(n(23798)),k=i(n(75137)),g=i(n(52744)),l=i(n(83761)),c=n(2473);r.createPopperLite=c.createPopper;var m=n(39805);Object.keys(m).forEach(function(d){d==="default"||d==="__esModule"||Object.prototype.hasOwnProperty.call(e,d)||d in r&&r[d]===m[d]||(r[d]=m[d])});function i(d){return d&&d.__esModule?d:{default:d}}var u=r.defaultModifiers=[t.default,o.default,f.default,b.default,y.default,B.default,k.default,g.default,l.default],s=r.createPopperLite=r.createPopper=(0,a.popperGenerator)({defaultModifiers:u})},9041:function(T,r,n){"use strict";r.__esModule=!0,r.default=b;var e=f(n(45)),a=n(46206),t=f(n(17633)),o=f(n(83104));function f(y){return y&&y.__esModule?y:{default:y}}function b(y,B){B===void 0&&(B={});var k=B,g=k.placement,l=k.boundary,c=k.rootBoundary,m=k.padding,i=k.flipVariations,u=k.allowedAutoPlacements,s=u===void 0?a.placements:u,d=(0,e.default)(g),v=d?i?a.variationPlacements:a.variationPlacements.filter(function(p){return(0,e.default)(p)===d}):a.basePlacements,h=v.filter(function(p){return s.indexOf(p)>=0});h.length===0&&(h=v);var C=h.reduce(function(p,N){return p[N]=(0,t.default)(y,{placement:N,boundary:l,rootBoundary:c,padding:m})[(0,o.default)(N)],p},{});return Object.keys(C).sort(function(p,N){return C[p]-C[N]})}},89951:function(T,r,n){"use strict";r.__esModule=!0,r.default=b;var e=f(n(83104)),a=f(n(45)),t=f(n(41199)),o=n(46206);function f(y){return y&&y.__esModule?y:{default:y}}function b(y){var B=y.reference,k=y.element,g=y.placement,l=g?(0,e.default)(g):null,c=g?(0,a.default)(g):null,m=B.x+B.width/2-k.width/2,i=B.y+B.height/2-k.height/2,u;switch(l){case o.top:u={x:m,y:B.y-k.height};break;case o.bottom:u={x:m,y:B.y+B.height};break;case o.right:u={x:B.x+B.width,y:i};break;case o.left:u={x:B.x-k.width,y:i};break;default:u={x:B.x,y:B.y}}var s=l?(0,t.default)(l):null;if(s!=null){var d=s==="y"?"height":"width";switch(c){case o.start:u[s]=u[s]-(B[d]/2-k[d]/2);break;case o.end:u[s]=u[s]+(B[d]/2-k[d]/2);break;default:}}return u}},10579:function(T,r){"use strict";r.__esModule=!0,r.default=n;function n(e){var a;return function(){return a||(a=new Promise(function(t){Promise.resolve().then(function(){a=void 0,t(e())})})),a}}},17633:function(T,r,n){"use strict";r.__esModule=!0,r.default=l;var e=g(n(49035)),a=g(n(40600)),t=g(n(37786)),o=g(n(89951)),f=g(n(81666)),b=n(46206),y=n(75573),B=g(n(43286)),k=g(n(81447));function g(c){return c&&c.__esModule?c:{default:c}}function l(c,m){m===void 0&&(m={});var i=m,u=i.placement,s=u===void 0?c.placement:u,d=i.strategy,v=d===void 0?c.strategy:d,h=i.boundary,C=h===void 0?b.clippingParents:h,p=i.rootBoundary,N=p===void 0?b.viewport:p,V=i.elementContext,S=V===void 0?b.popper:V,I=i.altBoundary,L=I===void 0?!1:I,w=i.padding,A=w===void 0?0:w,x=(0,B.default)(typeof A!="number"?A:(0,k.default)(A,b.basePlacements)),E=S===b.popper?b.reference:b.popper,P=c.rects.popper,D=c.elements[L?E:S],M=(0,e.default)((0,y.isElement)(D)?D:D.contextElement||(0,a.default)(c.elements.popper),C,N,v),R=(0,t.default)(c.elements.reference),O=(0,o.default)({reference:R,element:P,strategy:"absolute",placement:s}),F=(0,f.default)(Object.assign({},P,O)),_=S===b.popper?F:R,U={top:M.top-_.top+x.top,bottom:_.bottom-M.bottom+x.bottom,left:M.left-_.left+x.left,right:_.right-M.right+x.right},z=c.modifiersData.offset;if(S===b.popper&&z){var $=z[s];Object.keys(U).forEach(function(G){var X=[b.right,b.bottom].indexOf(G)>=0?1:-1,J=[b.top,b.bottom].indexOf(G)>=0?"y":"x";U[G]+=$[J]*X})}return U}},81447:function(T,r){"use strict";r.__esModule=!0,r.default=n;function n(e,a){return a.reduce(function(t,o){return t[o]=e,t},{})}},28066:function(T,r){"use strict";r.__esModule=!0,r.default=n;function n(e){return e==="x"?"y":"x"}},83104:function(T,r,n){"use strict";r.__esModule=!0,r.default=a;var e=n(46206);function a(t){return t.split("-")[0]}},34780:function(T,r){"use strict";r.__esModule=!0,r.default=n;function n(){return{top:0,right:0,bottom:0,left:0}}},41199:function(T,r){"use strict";r.__esModule=!0,r.default=n;function n(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}},71376:function(T,r){"use strict";r.__esModule=!0,r.default=e;var n={left:"right",right:"left",bottom:"top",top:"bottom"};function e(a){return a.replace(/left|right|bottom|top/g,function(t){return n[t]})}},86459:function(T,r){"use strict";r.__esModule=!0,r.default=e;var n={start:"end",end:"start"};function e(a){return a.replace(/start|end/g,function(t){return n[t]})}},45:function(T,r){"use strict";r.__esModule=!0,r.default=n;function n(e){return e.split("-")[1]}},63618:function(T,r){"use strict";r.__esModule=!0,r.round=r.min=r.max=void 0;var n=r.max=Math.max,e=r.min=Math.min,a=r.round=Math.round},56500:function(T,r){"use strict";r.__esModule=!0,r.default=n;function n(e){var a=e.reduce(function(t,o){var f=t[o.name];return t[o.name]=f?Object.assign({},f,o,{options:Object.assign({},f.options,o.options),data:Object.assign({},f.data,o.data)}):o,t},{});return Object.keys(a).map(function(t){return a[t]})}},43286:function(T,r,n){"use strict";r.__esModule=!0,r.default=t;var e=a(n(34780));function a(o){return o&&o.__esModule?o:{default:o}}function t(o){return Object.assign({},(0,e.default)(),o)}},33118:function(T,r,n){"use strict";r.__esModule=!0,r.default=t;var e=n(46206);function a(o){var f=new Map,b=new Set,y=[];o.forEach(function(k){f.set(k.name,k)});function B(k){b.add(k.name);var g=[].concat(k.requires||[],k.requiresIfExists||[]);g.forEach(function(l){if(!b.has(l)){var c=f.get(l);c&&B(c)}}),y.push(k)}return o.forEach(function(k){b.has(k.name)||B(k)}),y}function t(o){var f=a(o);return e.modifierPhases.reduce(function(b,y){return b.concat(f.filter(function(B){return B.phase===y}))},[])}},81666:function(T,r){"use strict";r.__esModule=!0,r.default=n;function n(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}},35366:function(T,r){"use strict";r.__esModule=!0,r.default=n;function n(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(a){return a.brand+"/"+a.version}).join(" "):navigator.userAgent}},28595:function(T,r,n){"use strict";r.__esModule=!0,r.within=a,r.withinMaxClamp=t;var e=n(63618);function a(o,f,b){return(0,e.max)(o,(0,e.min)(f,b))}function t(o,f,b){var y=a(o,f,b);return y>b?b:y}},15875:function(T,r){"use strict";r.__esModule=!0,r.VNodeFlags=r.ChildFlags=void 0;var n;(function(a){a[a.Unknown=0]="Unknown",a[a.HtmlElement=1]="HtmlElement",a[a.ComponentUnknown=2]="ComponentUnknown",a[a.ComponentClass=4]="ComponentClass",a[a.ComponentFunction=8]="ComponentFunction",a[a.Text=16]="Text",a[a.SvgElement=32]="SvgElement",a[a.InputElement=64]="InputElement",a[a.TextareaElement=128]="TextareaElement",a[a.SelectElement=256]="SelectElement",a[a.Portal=1024]="Portal",a[a.ReCreate=2048]="ReCreate",a[a.ContentEditable=4096]="ContentEditable",a[a.Fragment=8192]="Fragment",a[a.InUse=16384]="InUse",a[a.ForwardRef=32768]="ForwardRef",a[a.Normalized=65536]="Normalized",a[a.ForwardRefComponent=32776]="ForwardRefComponent",a[a.FormElement=448]="FormElement",a[a.Element=481]="Element",a[a.Component=14]="Component",a[a.DOMRef=1521]="DOMRef",a[a.InUseOrNormalized=81920]="InUseOrNormalized",a[a.ClearInUse=-16385]="ClearInUse",a[a.ComponentKnown=12]="ComponentKnown"})(n||(r.VNodeFlags=n={}));var e;(function(a){a[a.UnknownChildren=0]="UnknownChildren",a[a.HasInvalidChildren=1]="HasInvalidChildren",a[a.HasVNodeChildren=2]="HasVNodeChildren",a[a.HasNonKeyedChildren=4]="HasNonKeyedChildren",a[a.HasKeyedChildren=8]="HasKeyedChildren",a[a.HasTextChildren=16]="HasTextChildren",a[a.MultipleChildren=12]="MultipleChildren"})(e||(r.ChildFlags=e={}))},89292:function(T,r){"use strict";r.__esModule=!0,r.Fragment=r.EMPTY_OBJ=r.Component=r.AnimationQueues=void 0,r._CI=Ot,r._HI=pe,r._M=Ke,r._MCCC=Ft,r._ME=Dt,r._MFCC=_t,r._MP=Mt,r._MR=at,r._RFC=gt,r.__render=Ht,r.createComponentVNode=se,r.createFragment=me,r.createPortal=Z,r.createRef=nn,r.createRenderer=En,r.createTextVNode=ie,r.createVNode=$,r.directClone=ae,r.findDOMFromVNode=V,r.forwardRef=on,r.getFlagsForElementVnode=te,r.linkEvent=g,r.normalizeProps=q,r.options=void 0,r.render=zt,r.rerender=$t,r.version=void 0;var n=Array.isArray;function e(j){var W=typeof j;return W==="string"||W==="number"}function a(j){return j==null}function t(j){return j===null||j===!1||j===!0||j===void 0}function o(j){return typeof j=="function"}function f(j){return typeof j=="string"}function b(j){return typeof j=="number"}function y(j){return j===null}function B(j){return j===void 0}function k(j,W){var H={};if(j)for(var K in j)H[K]=j[K];if(W)for(var Q in W)H[Q]=W[Q];return H}function g(j,W){return o(W)?{data:j,event:W}:null}function l(j){return!y(j)&&typeof j=="object"}var c=r.EMPTY_OBJ={},m=r.Fragment="$F",i=r.AnimationQueues=function(){function j(){this.componentDidAppear=[],this.componentWillDisappear=[],this.componentWillMove=[]}return j}();function u(j){return j.substring(2).toLowerCase()}function s(j,W){j.appendChild(W)}function d(j,W,H){y(H)?s(j,W):j.insertBefore(W,H)}function v(j,W){return W?document.createElementNS("http://www.w3.org/2000/svg",j):document.createElement(j)}function h(j,W,H){j.replaceChild(W,H)}function C(j,W){j.removeChild(W)}function p(j){for(var W=0;W0?S(H.componentWillDisappear,w(j,W)):L(j,W,!1)}function x(j,W,H,K,Q,ee,oe,ue){j.componentWillMove.push({dom:K,fn:function(){function ge(){oe&4?H.componentWillMove(W,Q,K):oe&8&&H.onComponentWillMove(W,Q,K,ue)}return ge}(),next:ee,parent:Q})}function E(j,W,H,K,Q){var ee,oe,ue=W.flags;do{var ge=W.flags;if(ge&1521){!a(ee)&&(o(ee.componentWillMove)||o(ee.onComponentWillMove))?x(Q,j,ee,W.dom,H,K,ue,oe):d(H,W.dom,K);return}var Te=W.children;if(ge&4)ee=W.children,oe=W.props,W=Te.$LI;else if(ge&8)ee=W.ref,oe=W.props,W=Te;else if(ge&8192)if(W.childFlags===2)W=Te;else{for(var Ie=0,Ee=Te.length;Ie0,Te=y(ue),Ie=f(ue)&&ue[0]===U;ge||Te||Ie?(H=H||W.slice(0,ee),(ge||Ie)&&(oe=ae(oe)),(Te||Ie)&&(oe.key=U+ee),H.push(oe)):H&&H.push(oe),oe.flags|=65536}}H=H||W,H.length===0?K=1:K=8}else H=W,H.flags|=65536,W.flags&81920&&(H=ae(W)),K=2;return j.children=H,j.childFlags=K,j}function pe(j){return t(j)||e(j)?ie(j,null):n(j)?me(j,0,null):j.flags&16384?ae(j):j}var ce="http://www.w3.org/1999/xlink",Ve="http://www.w3.org/XML/1998/namespace",Ce={"xlink:actuate":ce,"xlink:arcrole":ce,"xlink:href":ce,"xlink:role":ce,"xlink:show":ce,"xlink:title":ce,"xlink:type":ce,"xml:base":Ve,"xml:lang":Ve,"xml:space":Ve};function Ne(j){return{onClick:j,onDblClick:j,onFocusIn:j,onFocusOut:j,onKeyDown:j,onKeyPress:j,onKeyUp:j,onMouseDown:j,onMouseMove:j,onMouseUp:j,onTouchEnd:j,onTouchMove:j,onTouchStart:j}}var Be=Ne(0),be=Ne(null),Le=Ne(!0);function we(j,W){var H=W.$EV;return H||(H=W.$EV=Ne(null)),H[j]||++Be[j]===1&&(be[j]=je(j)),H}function xe(j,W){var H=W.$EV;H&&H[j]&&(--Be[j]===0&&(document.removeEventListener(u(j),be[j]),be[j]=null),H[j]=null)}function Re(j,W,H,K){if(o(H))we(j,K)[j]=H;else if(l(H)){if(O(W,H))return;we(j,K)[j]=H}else xe(j,K)}function He(j){return o(j.composedPath)?j.composedPath()[0]:j.target}function ye(j,W,H,K){var Q=He(j);do{if(W&&Q.disabled)return;var ee=Q.$EV;if(ee){var oe=ee[H];if(oe&&(K.dom=Q,oe.event?oe.event(oe.data,j):oe(j),j.cancelBubble))return}Q=Q.parentNode}while(!y(Q))}function de(){this.cancelBubble=!0,this.immediatePropagationStopped||this.stopImmediatePropagation()}function he(){return this.defaultPrevented}function ke(){return this.cancelBubble}function ve(j){var W={dom:document};return j.isDefaultPrevented=he,j.isPropagationStopped=ke,j.stopPropagation=de,Object.defineProperty(j,"currentTarget",{configurable:!0,get:function(){function H(){return W.dom}return H}()}),W}function Se(j){return function(W){if(W.button!==0){W.stopPropagation();return}ye(W,!0,j,ve(W))}}function Pe(j){return function(W){ye(W,!1,j,ve(W))}}function je(j){var W=j==="onClick"||j==="onDblClick"?Se(j):Pe(j);return document.addEventListener(u(j),W),W}function Fe(j,W){var H=document.createElement("i");return H.innerHTML=W,H.innerHTML===j.innerHTML}function ze(j,W,H){if(j[W]){var K=j[W];K.event?K.event(K.data,H):K(H)}else{var Q=W.toLowerCase();j[Q]&&j[Q](H)}}function We(j,W){var H=function(){function K(Q){var ee=this.$V;if(ee){var oe=ee.props||c,ue=ee.dom;if(f(j))ze(oe,j,Q);else for(var ge=0;ge-1&&W.options[ee]&&(ue=W.options[ee].value),H&&a(ue)&&(ue=j.defaultValue),rt(K,ue)}}var Zt=We("onInput",Tt),qt=We("onChange");function en(j,W){Ue(j,"input",Zt),W.onChange&&Ue(j,"change",qt)}function Tt(j,W,H){var K=j.value,Q=W.value;if(a(K)){if(H){var ee=j.defaultValue;!a(ee)&&ee!==Q&&(W.defaultValue=ee,W.value=ee)}}else Q!==K&&(W.defaultValue=K,W.value=K)}function xt(j,W,H,K,Q,ee){j&64?ut(K,H):j&256?wt(K,H,Q,W):j&128&&Tt(K,H,Q),ee&&(H.$V=W)}function tn(j,W,H){j&64?Bt(W,H):j&256?Qt(W):j&128&&en(W,H)}function At(j){return j.type&&Xe(j.type)?!a(j.checked):!a(j.value)}function nn(){return{current:null}}function on(j){var W={render:j};return W}function st(j){j&&!_(j,null)&&j.current&&(j.current=null)}function at(j,W,H){j&&(o(j)||j.current!==void 0)&&H.push(function(){!_(j,W)&&j.current!==void 0&&(j.current=W)})}function Je(j,W,H){Ze(j,H),A(j,W,H)}function Ze(j,W){var H=j.flags,K=j.children,Q;if(H&481){Q=j.ref;var ee=j.props;st(Q);var oe=j.childFlags;if(!y(ee))for(var ue=Object.keys(ee),ge=0,Te=ue.length;ge0?S(H.componentWillDisappear,rn(W,j)):j.textContent=""}function pt(j,W,H,K){ct(H,K),W.flags&8192?A(W,j,K):mt(j,H,K)}function Et(j,W,H,K,Q){j.componentWillDisappear.push(function(ee){K&4?W.componentWillDisappear(H,ee):K&8&&W.onComponentWillDisappear(H,Q,ee)})}function an(j){var W=j.event;return function(H){W(j.data,H)}}function cn(j,W,H,K){if(l(H)){if(O(W,H))return;H=an(H)}Ue(K,u(j),H)}function ln(j,W,H){if(a(W)){H.removeAttribute("style");return}var K=H.style,Q,ee;if(f(W)){K.cssText=W;return}if(!a(j)&&!f(j)){for(Q in W)ee=W[Q],ee!==j[Q]&&K.setProperty(Q,ee);for(Q in j)a(W[Q])&&K.removeProperty(Q)}else for(Q in W)ee=W[Q],K.setProperty(Q,ee)}function dn(j,W,H,K,Q){var ee=j&&j.__html||"",oe=W&&W.__html||"";ee!==oe&&!a(oe)&&!Fe(K,oe)&&(y(H)||(H.childFlags&12?ct(H.children,Q):H.childFlags===2&&Ze(H.children,Q),H.children=null,H.childFlags=1),K.innerHTML=oe)}function vt(j,W,H,K,Q,ee,oe,ue){switch(j){case"children":case"childrenType":case"className":case"defaultValue":case"key":case"multiple":case"ref":case"selectedIndex":break;case"autoFocus":K.autofocus=!!H;break;case"allowfullscreen":case"autoplay":case"capture":case"checked":case"controls":case"default":case"disabled":case"hidden":case"indeterminate":case"loop":case"muted":case"novalidate":case"open":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"selected":K[j]=!!H;break;case"defaultChecked":case"value":case"volume":if(ee&&j==="value")break;var ge=a(H)?"":H;K[j]!==ge&&(K[j]=ge);break;case"style":ln(W,H,K);break;case"dangerouslySetInnerHTML":dn(W,H,oe,K,ue);break;default:Le[j]?Re(j,W,H,K):j.charCodeAt(0)===111&&j.charCodeAt(1)===110?cn(j,W,H,K):a(H)?K.removeAttribute(j):Q&&Ce[j]?K.setAttributeNS(Ce[j],j,H):K.setAttribute(j,H);break}}function Mt(j,W,H,K,Q,ee){var oe=!1,ue=(W&448)>0;ue&&(oe=At(H),oe&&tn(W,K,H));for(var ge in H)vt(ge,null,H[ge],K,Q,oe,null,ee);ue&&xt(W,j,K,H,!0,oe)}function Pt(j,W,H){var K=pe(j.render(W,j.state,H)),Q=H;return o(j.getChildContext)&&(Q=k(H,j.getChildContext())),j.$CX=Q,K}function Ot(j,W,H,K,Q,ee){var oe=new W(H,K),ue=oe.$N=!!(W.getDerivedStateFromProps||oe.getSnapshotBeforeUpdate);if(oe.$SVG=Q,oe.$L=ee,j.children=oe,oe.$BS=!1,oe.context=K,oe.props===c&&(oe.props=H),ue)oe.state=P(oe,H,oe.state);else if(o(oe.componentWillMount)){oe.$BR=!0,oe.componentWillMount();var ge=oe.$PS;if(!y(ge)){var Te=oe.state;if(y(Te))oe.state=ge;else for(var Ie in ge)Te[Ie]=ge[Ie];oe.$PS=null}oe.$BR=!1}return oe.$LI=Pt(oe,H,K),oe}function gt(j,W){var H=j.props||c;return j.flags&32768?j.type.render(H,j.ref,W):j.type(H,W)}function Ke(j,W,H,K,Q,ee,oe){var ue=j.flags|=16384;ue&481?Dt(j,W,H,K,Q,ee,oe):ue&4?mn(j,W,H,K,Q,ee,oe):ue&8?pn(j,W,H,K,Q,ee,oe):ue&16?Rt(j,W,Q):ue&8192?sn(j,H,W,K,Q,ee,oe):ue&1024&&un(j,H,W,Q,ee,oe)}function un(j,W,H,K,Q,ee){Ke(j.children,j.ref,W,!1,null,Q,ee);var oe=le();Rt(oe,H,K),j.dom=oe.dom}function sn(j,W,H,K,Q,ee,oe){var ue=j.children,ge=j.childFlags;ge&12&&ue.length===0&&(ge=j.childFlags=2,ue=j.children=le()),ge===2?Ke(ue,H,W,K,Q,ee,oe):ot(ue,H,W,K,Q,ee,oe)}function Rt(j,W,H){var K=j.dom=document.createTextNode(j.children);y(W)||d(W,K,H)}function Dt(j,W,H,K,Q,ee,oe){var ue=j.flags,ge=j.props,Te=j.className,Ie=j.childFlags,Ee=j.dom=v(j.type,K=K||(ue&32)>0),Ae=j.children;if(!a(Te)&&Te!==""&&(K?Ee.setAttribute("class",Te):Ee.className=Te),Ie===16)R(Ee,Ae);else if(Ie!==1){var Me=K&&j.type!=="foreignObject";Ie===2?(Ae.flags&16384&&(j.children=Ae=ae(Ae)),Ke(Ae,Ee,H,Me,null,ee,oe)):(Ie===8||Ie===4)&&ot(Ae,Ee,H,Me,null,ee,oe)}y(W)||d(W,Ee,Q),y(ge)||Mt(j,ue,ge,Ee,K,oe),at(j.ref,Ee,ee)}function ot(j,W,H,K,Q,ee,oe){for(var ue=0;ueMe)&&(Ee=V(ue[Me-1],!1).nextSibling)}Nt(Te,Ie,ue,ge,H,K,Q,Ee,j,ee,oe)}function Vn(j,W,H,K,Q){var ee=j.ref,oe=W.ref,ue=W.children;if(Nt(j.childFlags,W.childFlags,j.children,ue,ee,H,!1,null,j,K,Q),W.dom=j.dom,ee!==oe&&!t(ue)){var ge=ue.dom;C(ee,ge),s(oe,ge)}}function bn(j,W,H,K,Q,ee,oe){var ue=W.dom=j.dom,ge=j.props,Te=W.props,Ie=!1,Ee=!1,Ae;if(K=K||(Q&32)>0,ge!==Te){var Me=ge||c;if(Ae=Te||c,Ae!==c){Ie=(Q&448)>0,Ie&&(Ee=At(Ae));for(var _e in Ae){var Oe=Me[_e],$e=Ae[_e];Oe!==$e&&vt(_e,Oe,$e,ue,K,Ee,j,oe)}}if(Me!==c)for(var De in Me)a(Ae[De])&&!a(Me[De])&&vt(De,Me[De],null,ue,K,Ee,j,oe)}var tt=W.children,Ye=W.className;j.className!==Ye&&(a(Ye)?ue.removeAttribute("class"):K?ue.setAttribute("class",Ye):ue.className=Ye),Q&4096?gn(ue,tt):Nt(j.childFlags,W.childFlags,j.children,tt,ue,H,K&&W.type!=="foreignObject",null,j,ee,oe),Ie&&xt(Q,W,ue,Ae,!1,Ee);var it=W.ref,Qe=j.ref;Qe!==it&&(st(Qe),at(it,ue,ee))}function kn(j,W,H,K,Q,ee,oe){Ze(j,oe),ot(W,H,K,Q,V(j,!0),ee,oe),A(j,H,oe)}function Nt(j,W,H,K,Q,ee,oe,ue,ge,Te,Ie){switch(j){case 2:switch(W){case 2:qe(H,K,Q,ee,oe,ue,Te,Ie);break;case 1:Je(H,Q,Ie);break;case 16:Ze(H,Ie),R(Q,K);break;default:kn(H,K,Q,ee,oe,Te,Ie);break}break;case 1:switch(W){case 2:Ke(K,Q,ee,oe,ue,Te,Ie);break;case 1:break;case 16:R(Q,K);break;default:ot(K,Q,ee,oe,ue,Te,Ie);break}break;case 16:switch(W){case 16:vn(H,K,Q);break;case 2:mt(Q,H,Ie),Ke(K,Q,ee,oe,ue,Te,Ie);break;case 1:mt(Q,H,Ie);break;default:mt(Q,H,Ie),ot(K,Q,ee,oe,ue,Te,Ie);break}break;default:switch(W){case 16:ct(H,Ie),R(Q,K);break;case 2:pt(Q,ge,H,Ie),Ke(K,Q,ee,oe,ue,Te,Ie);break;case 1:pt(Q,ge,H,Ie);break;default:var Ee=H.length|0,Ae=K.length|0;Ee===0?Ae>0&&ot(K,Q,ee,oe,ue,Te,Ie):Ae===0?pt(Q,ge,H,Ie):W===8&&j===8?wn(H,K,Q,ee,oe,Ee,Ae,ue,ge,Te,Ie):Ln(H,K,Q,ee,oe,Ee,Ae,ue,Te,Ie);break}break}}function yn(j,W,H,K,Q){Q.push(function(){j.componentDidUpdate(W,H,K)})}function Wt(j,W,H,K,Q,ee,oe,ue,ge,Te){var Ie=j.state,Ee=j.props,Ae=!!j.$N,Me=o(j.shouldComponentUpdate);if(Ae&&(W=P(j,H,W!==Ie?k(Ie,W):W)),oe||!Me||Me&&j.shouldComponentUpdate(H,W,Q)){!Ae&&o(j.componentWillUpdate)&&j.componentWillUpdate(H,W,Q),j.props=H,j.state=W,j.context=Q;var _e=null,Oe=Pt(j,H,Q);Ae&&o(j.getSnapshotBeforeUpdate)&&(_e=j.getSnapshotBeforeUpdate(Ee,Ie)),qe(j.$LI,Oe,K,j.$CX,ee,ue,ge,Te),j.$LI=Oe,o(j.componentDidUpdate)&&yn(j,Ee,Ie,_e,ge)}else j.props=H,j.state=W,j.context=Q}function Sn(j,W,H,K,Q,ee,oe,ue){var ge=W.children=j.children;if(!y(ge)){ge.$L=oe;var Te=W.props||c,Ie=W.ref,Ee=j.ref,Ae=ge.state;if(!ge.$N){if(o(ge.componentWillReceiveProps)){if(ge.$BR=!0,ge.componentWillReceiveProps(Te,K),ge.$UN)return;ge.$BR=!1}y(ge.$PS)||(Ae=k(Ae,ge.$PS),ge.$PS=null)}Wt(ge,Ae,Te,H,K,Q,!1,ee,oe,ue),Ee!==Ie&&(st(Ee),at(Ie,ge,oe))}}function Bn(j,W,H,K,Q,ee,oe,ue){var ge=!0,Te=W.props||c,Ie=W.ref,Ee=j.props,Ae=!a(Ie),Me=j.children;if(Ae&&o(Ie.onComponentShouldUpdate)&&(ge=Ie.onComponentShouldUpdate(Ee,Te)),ge!==!1){Ae&&o(Ie.onComponentWillUpdate)&&Ie.onComponentWillUpdate(Ee,Te);var _e=pe(gt(W,K));qe(Me,_e,H,K,Q,ee,oe,ue),W.children=_e,Ae&&o(Ie.onComponentDidUpdate)&&Ie.onComponentDidUpdate(Ee,Te)}else W.children=Me}function In(j,W){var H=W.children,K=W.dom=j.dom;H!==j.children&&(K.nodeValue=H)}function Ln(j,W,H,K,Q,ee,oe,ue,ge,Te){for(var Ie=ee>oe?oe:ee,Ee=0,Ae,Me;Eeoe)for(Ee=Ie;EeEe||Me>Ae)break e;_e=j[Me],Oe=W[Me]}for(_e=j[Ee],Oe=W[Ae];_e.key===Oe.key;){if(Oe.flags&16384&&(W[Ae]=Oe=ae(Oe)),qe(_e,Oe,H,K,Q,ue,Te,Ie),j[Ee]=Oe,Ee--,Ae--,Me>Ee||Me>Ae)break e;_e=j[Ee],Oe=W[Ae]}}if(Me>Ee){if(Me<=Ae)for($e=Ae+1,De=$eAe)for(;Me<=Ee;)Je(j[Me++],H,Ie);else Tn(j,W,K,ee,oe,Ee,Ae,Me,H,Q,ue,ge,Te,Ie)}function Tn(j,W,H,K,Q,ee,oe,ue,ge,Te,Ie,Ee,Ae,Me){var _e,Oe,$e=0,De=0,tt=ue,Ye=ue,it=ee-ue+1,Qe=oe-ue+1,lt=new Int32Array(Qe+1),nt=it===K,bt=!1,Ge=0,dt=0;if(Q<4||(it|Qe)<32)for(De=tt;De<=ee;++De)if(_e=j[De],dtue?bt=!0:Ge=ue,Oe.flags&16384&&(W[ue]=Oe=ae(Oe)),qe(_e,Oe,ge,H,Te,Ie,Ae,Me),++dt;break}!nt&&ue>oe&&Je(_e,ge,Me)}else nt||Je(_e,ge,Me);else{var Yt={};for(De=Ye;De<=oe;++De)Yt[W[De].key]=De;for(De=tt;De<=ee;++De)if(_e=j[De],dttt;)Je(j[tt++],ge,Me);lt[ue-Ye]=De+1,Ge>ue?bt=!0:Ge=ue,Oe=W[ue],Oe.flags&16384&&(W[ue]=Oe=ae(Oe)),qe(_e,Oe,ge,H,Te,Ie,Ae,Me),++dt}else nt||Je(_e,ge,Me);else nt||Je(_e,ge,Me)}if(nt)pt(ge,Ee,j,Me),ot(W,ge,H,Te,Ie,Ae,Me);else if(bt){var Xt=xn(lt);for(ue=Xt.length-1,De=Qe-1;De>=0;De--)lt[De]===0?(Ge=De+Ye,Oe=W[Ge],Oe.flags&16384&&(W[Ge]=Oe=ae(Oe)),$e=Ge+1,Ke(Oe,ge,H,Te,$e0&&I(Me.componentWillMove)}else if(dt!==Qe)for(De=Qe-1;De>=0;De--)lt[De]===0&&(Ge=De+Ye,Oe=W[Ge],Oe.flags&16384&&(W[Ge]=Oe=ae(Oe)),$e=Ge+1,Ke(Oe,ge,H,Te,$eUt&&(Ut=ge,et=new Int32Array(ge),ft=new Int32Array(ge));H>1,j[et[ue]]0&&(ft[H]=et[ee-1]),et[ee]=H)}ee=Q+1;var Te=new Int32Array(ee);for(oe=et[ee-1];ee-- >0;)Te[ee]=oe,oe=ft[oe],et[ee]=0;return Te}var An=typeof document!="undefined";An&&window.Node&&(Node.prototype.$EV=null,Node.prototype.$V=null);function Ht(j,W,H,K){var Q=[],ee=new i,oe=W.$V;D.v=!0,a(oe)?a(j)||(j.flags&16384&&(j=ae(j)),Ke(j,W,K,!1,null,Q,ee),W.$V=j,oe=j):a(j)?(Je(oe,W,ee),W.$V=null):(j.flags&16384&&(j=ae(j)),qe(oe,j,W,K,!1,null,Q,ee),oe=W.$V=j),p(Q),S(ee.componentDidAppear),D.v=!1,o(H)&&H(),o(M.renderComplete)&&M.renderComplete(oe,W)}function zt(j,W,H,K){H===void 0&&(H=null),K===void 0&&(K=c),Ht(j,W,H,K)}function En(j){return function(){function W(H,K,Q,ee){j||(j=H),zt(K,j,Q,ee)}return W}()}var ht=[],Mn=typeof Promise!="undefined"?Promise.resolve().then.bind(Promise.resolve()):function(j){window.setTimeout(j,0)},Vt=!1;function Kt(j,W,H,K){var Q=j.$PS;if(o(W)&&(W=W(Q?k(j.state,Q):j.state,j.props,j.context)),a(Q))j.$PS=W;else for(var ee in W)Q[ee]=W[ee];if(j.$BR)o(H)&&j.$L.push(H.bind(j));else{if(!D.v&&ht.length===0){Gt(j,K),o(H)&&H.call(j);return}if(ht.indexOf(j)===-1&&ht.push(j),K&&(j.$F=!0),Vt||(Vt=!0,Mn($t)),o(H)){var oe=j.$QU;oe||(oe=j.$QU=[]),oe.push(H)}}}function Pn(j){for(var W=j.$QU,H=0;H=0;--_){var U=this.tryEntries[_],z=U.completion;if(U.tryLoc==="root")return F("end");if(U.tryLoc<=this.prev){var $=a.call(U,"catchLoc"),G=a.call(U,"finallyLoc");if($&&G){if(this.prev=0;--F){var _=this.tryEntries[F];if(_.tryLoc<=this.prev&&a.call(_,"finallyLoc")&&this.prev<_.finallyLoc){var U=_;break}}U&&(R==="break"||R==="continue")&&U.tryLoc<=O&&O<=U.finallyLoc&&(U=null);var z=U?U.completion:{};return z.type=R,z.arg=O,U?(this.method="next",this.next=U.finallyLoc,s):this.complete(z)}return M}(),complete:function(){function M(R,O){if(R.type==="throw")throw R.arg;return R.type==="break"||R.type==="continue"?this.next=R.arg:R.type==="return"?(this.rval=this.arg=R.arg,this.method="return",this.next="end"):R.type==="normal"&&O&&(this.next=O),s}return M}(),finish:function(){function M(R){for(var O=this.tryEntries.length-1;O>=0;--O){var F=this.tryEntries[O];if(F.finallyLoc===R)return this.complete(F.completion,F.afterLoc),x(F),s}}return M}(),catch:function(){function M(R){for(var O=this.tryEntries.length-1;O>=0;--O){var F=this.tryEntries[O];if(F.tryLoc===R){var _=F.completion;if(_.type==="throw"){var U=_.arg;x(F)}return U}}throw new Error("illegal catch attempt")}return M}(),delegateYield:function(){function M(R,O,F){return this.delegate={iterator:P(R),resultName:O,nextLoc:F},this.method==="next"&&(this.arg=o),s}return M}()},n}(T.exports);try{regeneratorRuntime=r}catch(n){typeof globalThis=="object"?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}},30236:function(){"use strict";self.fetch||(self.fetch=function(T,r){return r=r||{},new Promise(function(n,e){var a=new XMLHttpRequest,t=[],o={},f=function(){function y(){return{ok:(a.status/100|0)==2,statusText:a.statusText,status:a.status,url:a.responseURL,text:function(){function B(){return Promise.resolve(a.responseText)}return B}(),json:function(){function B(){return Promise.resolve(a.responseText).then(JSON.parse)}return B}(),blob:function(){function B(){return Promise.resolve(new Blob([a.response]))}return B}(),clone:y,headers:{keys:function(){function B(){return t}return B}(),entries:function(){function B(){return t.map(function(k){return[k,a.getResponseHeader(k)]})}return B}(),get:function(){function B(k){return a.getResponseHeader(k)}return B}(),has:function(){function B(k){return a.getResponseHeader(k)!=null}return B}()}}}return y}();for(var b in a.open(r.method||"get",T,!0),a.onload=function(){a.getAllResponseHeaders().toLowerCase().replace(/^(.+?):/gm,function(y,B){o[B]||t.push(o[B]=B)}),n(f())},a.onerror=e,a.withCredentials=r.credentials=="include",r.headers)a.setRequestHeader(b,r.headers[b]);a.send(r.body||null)})})},88510:function(T,r){"use strict";r.__esModule=!0,r.zipWith=r.zip=r.uniqBy=r.uniq=r.toKeyedArray=r.toArray=r.sortBy=r.sort=r.reduce=r.range=r.map=r.filterMap=r.filter=void 0;function n(d,v){var h=typeof Symbol!="undefined"&&d[Symbol.iterator]||d["@@iterator"];if(h)return(h=h.call(d)).next.bind(h);if(Array.isArray(d)||(h=e(d))||v&&d&&typeof d.length=="number"){h&&(d=h);var C=0;return function(){return C>=d.length?{done:!0}:{done:!1,value:d[C++]}}}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 e(d,v){if(d){if(typeof d=="string")return a(d,v);var h={}.toString.call(d).slice(8,-1);return h==="Object"&&d.constructor&&(h=d.constructor.name),h==="Map"||h==="Set"?Array.from(d):h==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(h)?a(d,v):void 0}}function a(d,v){(v==null||v>d.length)&&(v=d.length);for(var h=0,C=Array(v);h0&&(0,a.round)(g.width)/S.offsetWidth||1,c=S.offsetHeight>0&&(0,a.round)(g.height)/S.offsetHeight||1);var m=(0,e.isElement)(S)?(0,t.default)(S):window,i=m.visualViewport,u=!(0,o.default)()&&k,s=(g.left+(u&&i?i.offsetLeft:0))/l,d=(g.top+(u&&i?i.offsetTop:0))/c,v=g.width/l,C=g.height/c;return{width:v,height:C,top:d,right:s+v,bottom:d+C,left:s,x:s,y:d}}},49035:function(T,r,n){"use strict";r.__esModule=!0,r.default=C;var e=n(46206),a=u(n(87991)),t=u(n(79752)),o=u(n(98309)),f=u(n(44896)),b=u(n(40600)),S=u(n(16599)),B=n(75573),k=u(n(37786)),g=u(n(57819)),l=u(n(4206)),c=u(n(12972)),m=u(n(81666)),i=n(63618);function u(h){return h&&h.__esModule?h:{default:h}}function s(h,p){var N=(0,k.default)(h,!1,p==="fixed");return N.top=N.top+h.clientTop,N.left=N.left+h.clientLeft,N.bottom=N.top+h.clientHeight,N.right=N.left+h.clientWidth,N.width=h.clientWidth,N.height=h.clientHeight,N.x=N.left,N.y=N.top,N}function d(h,p,N){return p===e.viewport?(0,m.default)((0,a.default)(h,N)):(0,B.isElement)(p)?s(p,N):(0,m.default)((0,t.default)((0,b.default)(h)))}function v(h){var p=(0,o.default)((0,g.default)(h)),N=["absolute","fixed"].indexOf((0,S.default)(h).position)>=0,V=N&&(0,B.isHTMLElement)(h)?(0,f.default)(h):h;return(0,B.isElement)(V)?p.filter(function(y){return(0,B.isElement)(y)&&(0,l.default)(y,V)&&(0,c.default)(y)!=="body"}):[]}function C(h,p,N,V){var y=p==="clippingParents"?v(h):[].concat(p),I=[].concat(y,[N]),L=I[0],w=I.reduce(function(A,x){var E=d(h,x,V);return A.top=(0,i.max)(E.top,A.top),A.right=(0,i.min)(E.right,A.right),A.bottom=(0,i.min)(E.bottom,A.bottom),A.left=(0,i.max)(E.left,A.left),A},d(h,L,V));return w.width=w.right-w.left,w.height=w.bottom-w.top,w.x=w.left,w.y=w.top,w}},74758:function(T,r,n){"use strict";r.__esModule=!0,r.default=l;var e=k(n(37786)),a=k(n(13390)),t=k(n(12972)),o=n(75573),f=k(n(79697)),b=k(n(40600)),S=k(n(10798)),B=n(63618);function k(c){return c&&c.__esModule?c:{default:c}}function g(c){var m=c.getBoundingClientRect(),i=(0,B.round)(m.width)/c.offsetWidth||1,u=(0,B.round)(m.height)/c.offsetHeight||1;return i!==1||u!==1}function l(c,m,i){i===void 0&&(i=!1);var u=(0,o.isHTMLElement)(m),s=(0,o.isHTMLElement)(m)&&g(m),d=(0,b.default)(m),v=(0,e.default)(c,s,i),C={scrollLeft:0,scrollTop:0},h={x:0,y:0};return(u||!u&&!i)&&(((0,t.default)(m)!=="body"||(0,S.default)(d))&&(C=(0,a.default)(m)),(0,o.isHTMLElement)(m)?(h=(0,e.default)(m,!0),h.x+=m.clientLeft,h.y+=m.clientTop):d&&(h.x=(0,f.default)(d))),{x:v.left+C.scrollLeft-h.x,y:v.top+C.scrollTop-h.y,width:v.width,height:v.height}}},16599:function(T,r,n){"use strict";r.__esModule=!0,r.default=t;var e=a(n(95115));function a(o){return o&&o.__esModule?o:{default:o}}function t(o){return(0,e.default)(o).getComputedStyle(o)}},40600:function(T,r,n){"use strict";r.__esModule=!0,r.default=a;var e=n(75573);function a(t){return(((0,e.isElement)(t)?t.ownerDocument:t.document)||window.document).documentElement}},79752:function(T,r,n){"use strict";r.__esModule=!0,r.default=S;var e=b(n(40600)),a=b(n(16599)),t=b(n(79697)),o=b(n(43750)),f=n(63618);function b(B){return B&&B.__esModule?B:{default:B}}function S(B){var k,g=(0,e.default)(B),l=(0,o.default)(B),c=(k=B.ownerDocument)==null?void 0:k.body,m=(0,f.max)(g.scrollWidth,g.clientWidth,c?c.scrollWidth:0,c?c.clientWidth:0),i=(0,f.max)(g.scrollHeight,g.clientHeight,c?c.scrollHeight:0,c?c.clientHeight:0),u=-l.scrollLeft+(0,t.default)(B),s=-l.scrollTop;return(0,a.default)(c||g).direction==="rtl"&&(u+=(0,f.max)(g.clientWidth,c?c.clientWidth:0)-m),{width:m,height:i,x:u,y:s}}},3073:function(T,r){"use strict";r.__esModule=!0,r.default=n;function n(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}},28811:function(T,r,n){"use strict";r.__esModule=!0,r.default=t;var e=a(n(37786));function a(o){return o&&o.__esModule?o:{default:o}}function t(o){var f=(0,e.default)(o),b=o.offsetWidth,S=o.offsetHeight;return Math.abs(f.width-b)<=1&&(b=f.width),Math.abs(f.height-S)<=1&&(S=f.height),{x:o.offsetLeft,y:o.offsetTop,width:b,height:S}}},12972:function(T,r){"use strict";r.__esModule=!0,r.default=n;function n(e){return e?(e.nodeName||"").toLowerCase():null}},13390:function(T,r,n){"use strict";r.__esModule=!0,r.default=b;var e=f(n(43750)),a=f(n(95115)),t=n(75573),o=f(n(3073));function f(S){return S&&S.__esModule?S:{default:S}}function b(S){return S===(0,a.default)(S)||!(0,t.isHTMLElement)(S)?(0,e.default)(S):(0,o.default)(S)}},44896:function(T,r,n){"use strict";r.__esModule=!0,r.default=l;var e=B(n(95115)),a=B(n(12972)),t=B(n(16599)),o=n(75573),f=B(n(87031)),b=B(n(57819)),S=B(n(35366));function B(c){return c&&c.__esModule?c:{default:c}}function k(c){return!(0,o.isHTMLElement)(c)||(0,t.default)(c).position==="fixed"?null:c.offsetParent}function g(c){var m=/firefox/i.test((0,S.default)()),i=/Trident/i.test((0,S.default)());if(i&&(0,o.isHTMLElement)(c)){var u=(0,t.default)(c);if(u.position==="fixed")return null}var s=(0,b.default)(c);for((0,o.isShadowRoot)(s)&&(s=s.host);(0,o.isHTMLElement)(s)&&["html","body"].indexOf((0,a.default)(s))<0;){var d=(0,t.default)(s);if(d.transform!=="none"||d.perspective!=="none"||d.contain==="paint"||["transform","perspective"].indexOf(d.willChange)!==-1||m&&d.willChange==="filter"||m&&d.filter&&d.filter!=="none")return s;s=s.parentNode}return null}function l(c){for(var m=(0,e.default)(c),i=k(c);i&&(0,f.default)(i)&&(0,t.default)(i).position==="static";)i=k(i);return i&&((0,a.default)(i)==="html"||(0,a.default)(i)==="body"&&(0,t.default)(i).position==="static")?m:i||g(c)||m}},57819:function(T,r,n){"use strict";r.__esModule=!0,r.default=f;var e=o(n(12972)),a=o(n(40600)),t=n(75573);function o(b){return b&&b.__esModule?b:{default:b}}function f(b){return(0,e.default)(b)==="html"?b:b.assignedSlot||b.parentNode||((0,t.isShadowRoot)(b)?b.host:null)||(0,a.default)(b)}},24426:function(T,r,n){"use strict";r.__esModule=!0,r.default=b;var e=f(n(57819)),a=f(n(10798)),t=f(n(12972)),o=n(75573);function f(S){return S&&S.__esModule?S:{default:S}}function b(S){return["html","body","#document"].indexOf((0,t.default)(S))>=0?S.ownerDocument.body:(0,o.isHTMLElement)(S)&&(0,a.default)(S)?S:b((0,e.default)(S))}},87991:function(T,r,n){"use strict";r.__esModule=!0,r.default=b;var e=f(n(95115)),a=f(n(40600)),t=f(n(79697)),o=f(n(89331));function f(S){return S&&S.__esModule?S:{default:S}}function b(S,B){var k=(0,e.default)(S),g=(0,a.default)(S),l=k.visualViewport,c=g.clientWidth,m=g.clientHeight,i=0,u=0;if(l){c=l.width,m=l.height;var s=(0,o.default)();(s||!s&&B==="fixed")&&(i=l.offsetLeft,u=l.offsetTop)}return{width:c,height:m,x:i+(0,t.default)(S),y:u}}},95115:function(T,r){"use strict";r.__esModule=!0,r.default=n;function n(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var a=e.ownerDocument;return a&&a.defaultView||window}return e}},43750:function(T,r,n){"use strict";r.__esModule=!0,r.default=t;var e=a(n(95115));function a(o){return o&&o.__esModule?o:{default:o}}function t(o){var f=(0,e.default)(o),b=f.pageXOffset,S=f.pageYOffset;return{scrollLeft:b,scrollTop:S}}},79697:function(T,r,n){"use strict";r.__esModule=!0,r.default=f;var e=o(n(37786)),a=o(n(40600)),t=o(n(43750));function o(b){return b&&b.__esModule?b:{default:b}}function f(b){return(0,e.default)((0,a.default)(b)).left+(0,t.default)(b).scrollLeft}},75573:function(T,r,n){"use strict";r.__esModule=!0,r.isElement=t,r.isHTMLElement=o,r.isShadowRoot=f;var e=a(n(95115));function a(b){return b&&b.__esModule?b:{default:b}}function t(b){var S=(0,e.default)(b).Element;return b instanceof S||b instanceof Element}function o(b){var S=(0,e.default)(b).HTMLElement;return b instanceof S||b instanceof HTMLElement}function f(b){if(typeof ShadowRoot=="undefined")return!1;var S=(0,e.default)(b).ShadowRoot;return b instanceof S||b instanceof ShadowRoot}},89331:function(T,r,n){"use strict";r.__esModule=!0,r.default=t;var e=a(n(35366));function a(o){return o&&o.__esModule?o:{default:o}}function t(){return!/^((?!chrome|android).)*safari/i.test((0,e.default)())}},10798:function(T,r,n){"use strict";r.__esModule=!0,r.default=t;var e=a(n(16599));function a(o){return o&&o.__esModule?o:{default:o}}function t(o){var f=(0,e.default)(o),b=f.overflow,S=f.overflowX,B=f.overflowY;return/auto|scroll|overlay|hidden/.test(b+B+S)}},87031:function(T,r,n){"use strict";r.__esModule=!0,r.default=t;var e=a(n(12972));function a(o){return o&&o.__esModule?o:{default:o}}function t(o){return["table","td","th"].indexOf((0,e.default)(o))>=0}},98309:function(T,r,n){"use strict";r.__esModule=!0,r.default=b;var e=f(n(24426)),a=f(n(57819)),t=f(n(95115)),o=f(n(10798));function f(S){return S&&S.__esModule?S:{default:S}}function b(S,B){var k;B===void 0&&(B=[]);var g=(0,e.default)(S),l=g===((k=S.ownerDocument)==null?void 0:k.body),c=(0,t.default)(g),m=l?[c].concat(c.visualViewport||[],(0,o.default)(g)?g:[]):g,i=B.concat(m);return l?i:i.concat(b((0,a.default)(m)))}},46206:function(T,r){"use strict";r.__esModule=!0,r.write=r.viewport=r.variationPlacements=r.top=r.start=r.right=r.reference=r.read=r.popper=r.placements=r.modifierPhases=r.main=r.left=r.end=r.clippingParents=r.bottom=r.beforeWrite=r.beforeRead=r.beforeMain=r.basePlacements=r.auto=r.afterWrite=r.afterRead=r.afterMain=void 0;var n=r.top="top",e=r.bottom="bottom",a=r.right="right",t=r.left="left",o=r.auto="auto",f=r.basePlacements=[n,e,a,t],b=r.start="start",S=r.end="end",B=r.clippingParents="clippingParents",k=r.viewport="viewport",g=r.popper="popper",l=r.reference="reference",c=r.variationPlacements=f.reduce(function(y,I){return y.concat([I+"-"+b,I+"-"+S])},[]),m=r.placements=[].concat(f,[o]).reduce(function(y,I){return y.concat([I,I+"-"+b,I+"-"+S])},[]),i=r.beforeRead="beforeRead",u=r.read="read",s=r.afterRead="afterRead",d=r.beforeMain="beforeMain",v=r.main="main",C=r.afterMain="afterMain",h=r.beforeWrite="beforeWrite",p=r.write="write",N=r.afterWrite="afterWrite",V=r.modifierPhases=[i,u,s,d,v,C,h,p,N]},95996:function(T,r,n){"use strict";r.__esModule=!0;var e={popperGenerator:!0,detectOverflow:!0,createPopperBase:!0,createPopper:!0,createPopperLite:!0};r.popperGenerator=r.detectOverflow=r.createPopperLite=r.createPopperBase=r.createPopper=void 0;var a=n(46206);Object.keys(a).forEach(function(S){S==="default"||S==="__esModule"||Object.prototype.hasOwnProperty.call(e,S)||S in r&&r[S]===a[S]||(r[S]=a[S])});var t=n(39805);Object.keys(t).forEach(function(S){S==="default"||S==="__esModule"||Object.prototype.hasOwnProperty.call(e,S)||S in r&&r[S]===t[S]||(r[S]=t[S])});var o=n(96376);r.popperGenerator=o.popperGenerator,r.detectOverflow=o.detectOverflow,r.createPopperBase=o.createPopper;var f=n(83312);r.createPopper=f.createPopper;var b=n(2473);r.createPopperLite=b.createPopper},19975:function(T,r,n){"use strict";r.__esModule=!0,r.default=void 0;var e=t(n(12972)),a=n(75573);function t(S){return S&&S.__esModule?S:{default:S}}function o(S){var B=S.state;Object.keys(B.elements).forEach(function(k){var g=B.styles[k]||{},l=B.attributes[k]||{},c=B.elements[k];!(0,a.isHTMLElement)(c)||!(0,e.default)(c)||(Object.assign(c.style,g),Object.keys(l).forEach(function(m){var i=l[m];i===!1?c.removeAttribute(m):c.setAttribute(m,i===!0?"":i)}))})}function f(S){var B=S.state,k={popper:{position:B.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(B.elements.popper.style,k.popper),B.styles=k,B.elements.arrow&&Object.assign(B.elements.arrow.style,k.arrow),function(){Object.keys(B.elements).forEach(function(g){var l=B.elements[g],c=B.attributes[g]||{},m=Object.keys(B.styles.hasOwnProperty(g)?B.styles[g]:k[g]),i=m.reduce(function(u,s){return u[s]="",u},{});!(0,a.isHTMLElement)(l)||!(0,e.default)(l)||(Object.assign(l.style,i),Object.keys(c).forEach(function(u){l.removeAttribute(u)}))})}}var b=r.default={name:"applyStyles",enabled:!0,phase:"write",fn:o,effect:f,requires:["computeStyles"]}},52744:function(T,r,n){"use strict";r.__esModule=!0,r.default=void 0;var e=g(n(83104)),a=g(n(28811)),t=g(n(4206)),o=g(n(44896)),f=g(n(41199)),b=n(28595),S=g(n(43286)),B=g(n(81447)),k=n(46206);function g(u){return u&&u.__esModule?u:{default:u}}var l=function(){function u(s,d){return s=typeof s=="function"?s(Object.assign({},d.rects,{placement:d.placement})):s,(0,S.default)(typeof s!="number"?s:(0,B.default)(s,k.basePlacements))}return u}();function c(u){var s,d=u.state,v=u.name,C=u.options,h=d.elements.arrow,p=d.modifiersData.popperOffsets,N=(0,e.default)(d.placement),V=(0,f.default)(N),y=[k.left,k.right].indexOf(N)>=0,I=y?"height":"width";if(!(!h||!p)){var L=l(C.padding,d),w=(0,a.default)(h),A=V==="y"?k.top:k.left,x=V==="y"?k.bottom:k.right,E=d.rects.reference[I]+d.rects.reference[V]-p[V]-d.rects.popper[I],P=p[V]-d.rects.reference[V],D=(0,o.default)(h),M=D?V==="y"?D.clientHeight||0:D.clientWidth||0:0,R=E/2-P/2,O=L[A],F=M-w[I]-L[x],_=M/2-w[I]/2+R,U=(0,b.within)(O,_,F),z=V;d.modifiersData[v]=(s={},s[z]=U,s.centerOffset=U-_,s)}}function m(u){var s=u.state,d=u.options,v=d.element,C=v===void 0?"[data-popper-arrow]":v;C!=null&&(typeof C=="string"&&(C=s.elements.popper.querySelector(C),!C)||(0,t.default)(s.elements.popper,C)&&(s.elements.arrow=C))}var i=r.default={name:"arrow",enabled:!0,phase:"main",fn:c,effect:m,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]}},59894:function(T,r,n){"use strict";r.__esModule=!0,r.default=void 0,r.mapToStyles=c;var e=n(46206),a=k(n(44896)),t=k(n(95115)),o=k(n(40600)),f=k(n(16599)),b=k(n(83104)),S=k(n(45)),B=n(63618);function k(u){return u&&u.__esModule?u:{default:u}}var g={top:"auto",right:"auto",bottom:"auto",left:"auto"};function l(u,s){var d=u.x,v=u.y,C=s.devicePixelRatio||1;return{x:(0,B.round)(d*C)/C||0,y:(0,B.round)(v*C)/C||0}}function c(u){var s,d=u.popper,v=u.popperRect,C=u.placement,h=u.variation,p=u.offsets,N=u.position,V=u.gpuAcceleration,y=u.adaptive,I=u.roundOffsets,L=u.isFixed,w=p.x,A=w===void 0?0:w,x=p.y,E=x===void 0?0:x,P=typeof I=="function"?I({x:A,y:E}):{x:A,y:E};A=P.x,E=P.y;var D=p.hasOwnProperty("x"),M=p.hasOwnProperty("y"),R=e.left,O=e.top,F=window;if(y){var _=(0,a.default)(d),U="clientHeight",z="clientWidth";if(_===(0,t.default)(d)&&(_=(0,o.default)(d),(0,f.default)(_).position!=="static"&&N==="absolute"&&(U="scrollHeight",z="scrollWidth")),_=_,C===e.top||(C===e.left||C===e.right)&&h===e.end){O=e.bottom;var $=L&&_===F&&F.visualViewport?F.visualViewport.height:_[U];E-=$-v.height,E*=V?1:-1}if(C===e.left||(C===e.top||C===e.bottom)&&h===e.end){R=e.right;var G=L&&_===F&&F.visualViewport?F.visualViewport.width:_[z];A-=G-v.width,A*=V?1:-1}}var X=Object.assign({position:N},y&&g),J=I===!0?l({x:A,y:E},(0,t.default)(d)):{x:A,y:E};if(A=J.x,E=J.y,V){var se;return Object.assign({},X,(se={},se[O]=M?"0":"",se[R]=D?"0":"",se.transform=(F.devicePixelRatio||1)<=1?"translate("+A+"px, "+E+"px)":"translate3d("+A+"px, "+E+"px, 0)",se))}return Object.assign({},X,(s={},s[O]=M?E+"px":"",s[R]=D?A+"px":"",s.transform="",s))}function m(u){var s=u.state,d=u.options,v=d.gpuAcceleration,C=v===void 0?!0:v,h=d.adaptive,p=h===void 0?!0:h,N=d.roundOffsets,V=N===void 0?!0:N,y={placement:(0,b.default)(s.placement),variation:(0,S.default)(s.placement),popper:s.elements.popper,popperRect:s.rects.popper,gpuAcceleration:C,isFixed:s.options.strategy==="fixed"};s.modifiersData.popperOffsets!=null&&(s.styles.popper=Object.assign({},s.styles.popper,c(Object.assign({},y,{offsets:s.modifiersData.popperOffsets,position:s.options.strategy,adaptive:p,roundOffsets:V})))),s.modifiersData.arrow!=null&&(s.styles.arrow=Object.assign({},s.styles.arrow,c(Object.assign({},y,{offsets:s.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:V})))),s.attributes.popper=Object.assign({},s.attributes.popper,{"data-popper-placement":s.placement})}var i=r.default={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:m,data:{}}},36692:function(T,r,n){"use strict";r.__esModule=!0,r.default=void 0;var e=a(n(95115));function a(b){return b&&b.__esModule?b:{default:b}}var t={passive:!0};function o(b){var S=b.state,B=b.instance,k=b.options,g=k.scroll,l=g===void 0?!0:g,c=k.resize,m=c===void 0?!0:c,i=(0,e.default)(S.elements.popper),u=[].concat(S.scrollParents.reference,S.scrollParents.popper);return l&&u.forEach(function(s){s.addEventListener("scroll",B.update,t)}),m&&i.addEventListener("resize",B.update,t),function(){l&&u.forEach(function(s){s.removeEventListener("scroll",B.update,t)}),m&&i.removeEventListener("resize",B.update,t)}}var f=r.default={name:"eventListeners",enabled:!0,phase:"write",fn:function(){function b(){}return b}(),effect:o,data:{}}},23798:function(T,r,n){"use strict";r.__esModule=!0,r.default=void 0;var e=B(n(71376)),a=B(n(83104)),t=B(n(86459)),o=B(n(17633)),f=B(n(9041)),b=n(46206),S=B(n(45));function B(c){return c&&c.__esModule?c:{default:c}}function k(c){if((0,a.default)(c)===b.auto)return[];var m=(0,e.default)(c);return[(0,t.default)(c),m,(0,t.default)(m)]}function g(c){var m=c.state,i=c.options,u=c.name;if(!m.modifiersData[u]._skip){for(var s=i.mainAxis,d=s===void 0?!0:s,v=i.altAxis,C=v===void 0?!0:v,h=i.fallbackPlacements,p=i.padding,N=i.boundary,V=i.rootBoundary,y=i.altBoundary,I=i.flipVariations,L=I===void 0?!0:I,w=i.allowedAutoPlacements,A=m.options.placement,x=(0,a.default)(A),E=x===A,P=h||(E||!L?[(0,e.default)(A)]:k(A)),D=[A].concat(P).reduce(function(ne,te){return ne.concat((0,a.default)(te)===b.auto?(0,f.default)(m,{placement:te,boundary:N,rootBoundary:V,padding:p,flipVariations:L,allowedAutoPlacements:w}):te)},[]),M=m.rects.reference,R=m.rects.popper,O=new Map,F=!0,_=D[0],U=0;U=0,J=X?"width":"height",se=(0,o.default)(m,{placement:z,boundary:N,rootBoundary:V,altBoundary:y,padding:p}),ie=X?G?b.right:b.left:G?b.bottom:b.top;M[J]>R[J]&&(ie=(0,e.default)(ie));var me=(0,e.default)(ie),q=[];if(d&&q.push(se[$]<=0),C&&q.push(se[ie]<=0,se[me]<=0),q.every(function(ne){return ne})){_=z,F=!1;break}O.set(z,q)}if(F)for(var re=L?3:1,ae=function(){function ne(te){var fe=D.find(function(pe){var ce=O.get(pe);if(ce)return ce.slice(0,te).every(function(Ve){return Ve})});if(fe)return _=fe,"break"}return ne}(),le=re;le>0;le--){var Z=ae(le);if(Z==="break")break}m.placement!==_&&(m.modifiersData[u]._skip=!0,m.placement=_,m.reset=!0)}}var l=r.default={name:"flip",enabled:!0,phase:"main",fn:g,requiresIfExists:["offset"],data:{_skip:!1}}},83761:function(T,r,n){"use strict";r.__esModule=!0,r.default=void 0;var e=n(46206),a=t(n(17633));function t(B){return B&&B.__esModule?B:{default:B}}function o(B,k,g){return g===void 0&&(g={x:0,y:0}),{top:B.top-k.height-g.y,right:B.right-k.width+g.x,bottom:B.bottom-k.height+g.y,left:B.left-k.width-g.x}}function f(B){return[e.top,e.right,e.bottom,e.left].some(function(k){return B[k]>=0})}function b(B){var k=B.state,g=B.name,l=k.rects.reference,c=k.rects.popper,m=k.modifiersData.preventOverflow,i=(0,a.default)(k,{elementContext:"reference"}),u=(0,a.default)(k,{altBoundary:!0}),s=o(i,l),d=o(u,c,m),v=f(s),C=f(d);k.modifiersData[g]={referenceClippingOffsets:s,popperEscapeOffsets:d,isReferenceHidden:v,hasPopperEscaped:C},k.attributes.popper=Object.assign({},k.attributes.popper,{"data-popper-reference-hidden":v,"data-popper-escaped":C})}var S=r.default={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:b}},39805:function(T,r,n){"use strict";r.__esModule=!0,r.preventOverflow=r.popperOffsets=r.offset=r.hide=r.flip=r.eventListeners=r.computeStyles=r.arrow=r.applyStyles=void 0;var e=g(n(19975));r.applyStyles=e.default;var a=g(n(52744));r.arrow=a.default;var t=g(n(59894));r.computeStyles=t.default;var o=g(n(36692));r.eventListeners=o.default;var f=g(n(23798));r.flip=f.default;var b=g(n(83761));r.hide=b.default;var S=g(n(61410));r.offset=S.default;var B=g(n(40107));r.popperOffsets=B.default;var k=g(n(75137));r.preventOverflow=k.default;function g(l){return l&&l.__esModule?l:{default:l}}},61410:function(T,r,n){"use strict";r.__esModule=!0,r.default=void 0,r.distanceAndSkiddingToXY=o;var e=t(n(83104)),a=n(46206);function t(S){return S&&S.__esModule?S:{default:S}}function o(S,B,k){var g=(0,e.default)(S),l=[a.left,a.top].indexOf(g)>=0?-1:1,c=typeof k=="function"?k(Object.assign({},B,{placement:S})):k,m=c[0],i=c[1];return m=m||0,i=(i||0)*l,[a.left,a.right].indexOf(g)>=0?{x:i,y:m}:{x:m,y:i}}function f(S){var B=S.state,k=S.options,g=S.name,l=k.offset,c=l===void 0?[0,0]:l,m=a.placements.reduce(function(d,v){return d[v]=o(v,B.rects,c),d},{}),i=m[B.placement],u=i.x,s=i.y;B.modifiersData.popperOffsets!=null&&(B.modifiersData.popperOffsets.x+=u,B.modifiersData.popperOffsets.y+=s),B.modifiersData[g]=m}var b=r.default={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:f}},40107:function(T,r,n){"use strict";r.__esModule=!0,r.default=void 0;var e=a(n(89951));function a(f){return f&&f.__esModule?f:{default:f}}function t(f){var b=f.state,S=f.name;b.modifiersData[S]=(0,e.default)({reference:b.rects.reference,element:b.rects.popper,strategy:"absolute",placement:b.placement})}var o=r.default={name:"popperOffsets",enabled:!0,phase:"read",fn:t,data:{}}},75137:function(T,r,n){"use strict";r.__esModule=!0,r.default=void 0;var e=n(46206),a=c(n(83104)),t=c(n(41199)),o=c(n(28066)),f=n(28595),b=c(n(28811)),S=c(n(44896)),B=c(n(17633)),k=c(n(45)),g=c(n(34780)),l=n(63618);function c(u){return u&&u.__esModule?u:{default:u}}function m(u){var s=u.state,d=u.options,v=u.name,C=d.mainAxis,h=C===void 0?!0:C,p=d.altAxis,N=p===void 0?!1:p,V=d.boundary,y=d.rootBoundary,I=d.altBoundary,L=d.padding,w=d.tether,A=w===void 0?!0:w,x=d.tetherOffset,E=x===void 0?0:x,P=(0,B.default)(s,{boundary:V,rootBoundary:y,padding:L,altBoundary:I}),D=(0,a.default)(s.placement),M=(0,k.default)(s.placement),R=!M,O=(0,t.default)(D),F=(0,o.default)(O),_=s.modifiersData.popperOffsets,U=s.rects.reference,z=s.rects.popper,$=typeof E=="function"?E(Object.assign({},s.rects,{placement:s.placement})):E,G=typeof $=="number"?{mainAxis:$,altAxis:$}:Object.assign({mainAxis:0,altAxis:0},$),X=s.modifiersData.offset?s.modifiersData.offset[s.placement]:null,J={x:0,y:0};if(_){if(h){var se,ie=O==="y"?e.top:e.left,me=O==="y"?e.bottom:e.right,q=O==="y"?"height":"width",re=_[O],ae=re+P[ie],le=re-P[me],Z=A?-z[q]/2:0,ne=M===e.start?U[q]:z[q],te=M===e.start?-z[q]:-U[q],fe=s.elements.arrow,pe=A&&fe?(0,b.default)(fe):{width:0,height:0},ce=s.modifiersData["arrow#persistent"]?s.modifiersData["arrow#persistent"].padding:(0,g.default)(),Ve=ce[ie],Ce=ce[me],Ne=(0,f.within)(0,U[q],pe[q]),Be=R?U[q]/2-Z-Ne-Ve-G.mainAxis:ne-Ne-Ve-G.mainAxis,be=R?-U[q]/2+Z+Ne+Ce+G.mainAxis:te+Ne+Ce+G.mainAxis,Le=s.elements.arrow&&(0,S.default)(s.elements.arrow),we=Le?O==="y"?Le.clientTop||0:Le.clientLeft||0:0,xe=(se=X==null?void 0:X[O])!=null?se:0,Re=re+Be-xe-we,He=re+be-xe,ye=(0,f.within)(A?(0,l.min)(ae,Re):ae,re,A?(0,l.max)(le,He):le);_[O]=ye,J[O]=ye-re}if(N){var de,he=O==="x"?e.top:e.left,ke=O==="x"?e.bottom:e.right,ve=_[F],Se=F==="y"?"height":"width",Pe=ve+P[he],je=ve-P[ke],Fe=[e.top,e.left].indexOf(D)!==-1,ze=(de=X==null?void 0:X[F])!=null?de:0,We=Fe?Pe:ve-U[Se]-z[Se]-ze+G.altAxis,Ue=Fe?ve+U[Se]+z[Se]-ze-G.altAxis:je,Xe=A&&Fe?(0,f.withinMaxClamp)(We,ve,Ue):(0,f.within)(A?We:Pe,ve,A?Ue:je);_[F]=Xe,J[F]=Xe-ve}s.modifiersData[v]=J}}var i=r.default={name:"preventOverflow",enabled:!0,phase:"main",fn:m,requiresIfExists:["offset"]}},2473:function(T,r,n){"use strict";r.__esModule=!0,r.defaultModifiers=r.createPopper=void 0;var e=n(96376);r.popperGenerator=e.popperGenerator,r.detectOverflow=e.detectOverflow;var a=b(n(36692)),t=b(n(40107)),o=b(n(59894)),f=b(n(19975));function b(k){return k&&k.__esModule?k:{default:k}}var S=r.defaultModifiers=[a.default,t.default,o.default,f.default],B=r.createPopper=(0,e.popperGenerator)({defaultModifiers:S})},83312:function(T,r,n){"use strict";r.__esModule=!0;var e={createPopper:!0,createPopperLite:!0,defaultModifiers:!0,popperGenerator:!0,detectOverflow:!0};r.defaultModifiers=r.createPopperLite=r.createPopper=void 0;var a=n(96376);r.popperGenerator=a.popperGenerator,r.detectOverflow=a.detectOverflow;var t=i(n(36692)),o=i(n(40107)),f=i(n(59894)),b=i(n(19975)),S=i(n(61410)),B=i(n(23798)),k=i(n(75137)),g=i(n(52744)),l=i(n(83761)),c=n(2473);r.createPopperLite=c.createPopper;var m=n(39805);Object.keys(m).forEach(function(d){d==="default"||d==="__esModule"||Object.prototype.hasOwnProperty.call(e,d)||d in r&&r[d]===m[d]||(r[d]=m[d])});function i(d){return d&&d.__esModule?d:{default:d}}var u=r.defaultModifiers=[t.default,o.default,f.default,b.default,S.default,B.default,k.default,g.default,l.default],s=r.createPopperLite=r.createPopper=(0,a.popperGenerator)({defaultModifiers:u})},9041:function(T,r,n){"use strict";r.__esModule=!0,r.default=b;var e=f(n(45)),a=n(46206),t=f(n(17633)),o=f(n(83104));function f(S){return S&&S.__esModule?S:{default:S}}function b(S,B){B===void 0&&(B={});var k=B,g=k.placement,l=k.boundary,c=k.rootBoundary,m=k.padding,i=k.flipVariations,u=k.allowedAutoPlacements,s=u===void 0?a.placements:u,d=(0,e.default)(g),v=d?i?a.variationPlacements:a.variationPlacements.filter(function(p){return(0,e.default)(p)===d}):a.basePlacements,C=v.filter(function(p){return s.indexOf(p)>=0});C.length===0&&(C=v);var h=C.reduce(function(p,N){return p[N]=(0,t.default)(S,{placement:N,boundary:l,rootBoundary:c,padding:m})[(0,o.default)(N)],p},{});return Object.keys(h).sort(function(p,N){return h[p]-h[N]})}},89951:function(T,r,n){"use strict";r.__esModule=!0,r.default=b;var e=f(n(83104)),a=f(n(45)),t=f(n(41199)),o=n(46206);function f(S){return S&&S.__esModule?S:{default:S}}function b(S){var B=S.reference,k=S.element,g=S.placement,l=g?(0,e.default)(g):null,c=g?(0,a.default)(g):null,m=B.x+B.width/2-k.width/2,i=B.y+B.height/2-k.height/2,u;switch(l){case o.top:u={x:m,y:B.y-k.height};break;case o.bottom:u={x:m,y:B.y+B.height};break;case o.right:u={x:B.x+B.width,y:i};break;case o.left:u={x:B.x-k.width,y:i};break;default:u={x:B.x,y:B.y}}var s=l?(0,t.default)(l):null;if(s!=null){var d=s==="y"?"height":"width";switch(c){case o.start:u[s]=u[s]-(B[d]/2-k[d]/2);break;case o.end:u[s]=u[s]+(B[d]/2-k[d]/2);break;default:}}return u}},10579:function(T,r){"use strict";r.__esModule=!0,r.default=n;function n(e){var a;return function(){return a||(a=new Promise(function(t){Promise.resolve().then(function(){a=void 0,t(e())})})),a}}},17633:function(T,r,n){"use strict";r.__esModule=!0,r.default=l;var e=g(n(49035)),a=g(n(40600)),t=g(n(37786)),o=g(n(89951)),f=g(n(81666)),b=n(46206),S=n(75573),B=g(n(43286)),k=g(n(81447));function g(c){return c&&c.__esModule?c:{default:c}}function l(c,m){m===void 0&&(m={});var i=m,u=i.placement,s=u===void 0?c.placement:u,d=i.strategy,v=d===void 0?c.strategy:d,C=i.boundary,h=C===void 0?b.clippingParents:C,p=i.rootBoundary,N=p===void 0?b.viewport:p,V=i.elementContext,y=V===void 0?b.popper:V,I=i.altBoundary,L=I===void 0?!1:I,w=i.padding,A=w===void 0?0:w,x=(0,B.default)(typeof A!="number"?A:(0,k.default)(A,b.basePlacements)),E=y===b.popper?b.reference:b.popper,P=c.rects.popper,D=c.elements[L?E:y],M=(0,e.default)((0,S.isElement)(D)?D:D.contextElement||(0,a.default)(c.elements.popper),h,N,v),R=(0,t.default)(c.elements.reference),O=(0,o.default)({reference:R,element:P,strategy:"absolute",placement:s}),F=(0,f.default)(Object.assign({},P,O)),_=y===b.popper?F:R,U={top:M.top-_.top+x.top,bottom:_.bottom-M.bottom+x.bottom,left:M.left-_.left+x.left,right:_.right-M.right+x.right},z=c.modifiersData.offset;if(y===b.popper&&z){var $=z[s];Object.keys(U).forEach(function(G){var X=[b.right,b.bottom].indexOf(G)>=0?1:-1,J=[b.top,b.bottom].indexOf(G)>=0?"y":"x";U[G]+=$[J]*X})}return U}},81447:function(T,r){"use strict";r.__esModule=!0,r.default=n;function n(e,a){return a.reduce(function(t,o){return t[o]=e,t},{})}},28066:function(T,r){"use strict";r.__esModule=!0,r.default=n;function n(e){return e==="x"?"y":"x"}},83104:function(T,r,n){"use strict";r.__esModule=!0,r.default=a;var e=n(46206);function a(t){return t.split("-")[0]}},34780:function(T,r){"use strict";r.__esModule=!0,r.default=n;function n(){return{top:0,right:0,bottom:0,left:0}}},41199:function(T,r){"use strict";r.__esModule=!0,r.default=n;function n(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}},71376:function(T,r){"use strict";r.__esModule=!0,r.default=e;var n={left:"right",right:"left",bottom:"top",top:"bottom"};function e(a){return a.replace(/left|right|bottom|top/g,function(t){return n[t]})}},86459:function(T,r){"use strict";r.__esModule=!0,r.default=e;var n={start:"end",end:"start"};function e(a){return a.replace(/start|end/g,function(t){return n[t]})}},45:function(T,r){"use strict";r.__esModule=!0,r.default=n;function n(e){return e.split("-")[1]}},63618:function(T,r){"use strict";r.__esModule=!0,r.round=r.min=r.max=void 0;var n=r.max=Math.max,e=r.min=Math.min,a=r.round=Math.round},56500:function(T,r){"use strict";r.__esModule=!0,r.default=n;function n(e){var a=e.reduce(function(t,o){var f=t[o.name];return t[o.name]=f?Object.assign({},f,o,{options:Object.assign({},f.options,o.options),data:Object.assign({},f.data,o.data)}):o,t},{});return Object.keys(a).map(function(t){return a[t]})}},43286:function(T,r,n){"use strict";r.__esModule=!0,r.default=t;var e=a(n(34780));function a(o){return o&&o.__esModule?o:{default:o}}function t(o){return Object.assign({},(0,e.default)(),o)}},33118:function(T,r,n){"use strict";r.__esModule=!0,r.default=t;var e=n(46206);function a(o){var f=new Map,b=new Set,S=[];o.forEach(function(k){f.set(k.name,k)});function B(k){b.add(k.name);var g=[].concat(k.requires||[],k.requiresIfExists||[]);g.forEach(function(l){if(!b.has(l)){var c=f.get(l);c&&B(c)}}),S.push(k)}return o.forEach(function(k){b.has(k.name)||B(k)}),S}function t(o){var f=a(o);return e.modifierPhases.reduce(function(b,S){return b.concat(f.filter(function(B){return B.phase===S}))},[])}},81666:function(T,r){"use strict";r.__esModule=!0,r.default=n;function n(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}},35366:function(T,r){"use strict";r.__esModule=!0,r.default=n;function n(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(a){return a.brand+"/"+a.version}).join(" "):navigator.userAgent}},28595:function(T,r,n){"use strict";r.__esModule=!0,r.within=a,r.withinMaxClamp=t;var e=n(63618);function a(o,f,b){return(0,e.max)(o,(0,e.min)(f,b))}function t(o,f,b){var S=a(o,f,b);return S>b?b:S}},15875:function(T,r){"use strict";r.__esModule=!0,r.VNodeFlags=r.ChildFlags=void 0;var n;(function(a){a[a.Unknown=0]="Unknown",a[a.HtmlElement=1]="HtmlElement",a[a.ComponentUnknown=2]="ComponentUnknown",a[a.ComponentClass=4]="ComponentClass",a[a.ComponentFunction=8]="ComponentFunction",a[a.Text=16]="Text",a[a.SvgElement=32]="SvgElement",a[a.InputElement=64]="InputElement",a[a.TextareaElement=128]="TextareaElement",a[a.SelectElement=256]="SelectElement",a[a.Portal=1024]="Portal",a[a.ReCreate=2048]="ReCreate",a[a.ContentEditable=4096]="ContentEditable",a[a.Fragment=8192]="Fragment",a[a.InUse=16384]="InUse",a[a.ForwardRef=32768]="ForwardRef",a[a.Normalized=65536]="Normalized",a[a.ForwardRefComponent=32776]="ForwardRefComponent",a[a.FormElement=448]="FormElement",a[a.Element=481]="Element",a[a.Component=14]="Component",a[a.DOMRef=1521]="DOMRef",a[a.InUseOrNormalized=81920]="InUseOrNormalized",a[a.ClearInUse=-16385]="ClearInUse",a[a.ComponentKnown=12]="ComponentKnown"})(n||(r.VNodeFlags=n={}));var e;(function(a){a[a.UnknownChildren=0]="UnknownChildren",a[a.HasInvalidChildren=1]="HasInvalidChildren",a[a.HasVNodeChildren=2]="HasVNodeChildren",a[a.HasNonKeyedChildren=4]="HasNonKeyedChildren",a[a.HasKeyedChildren=8]="HasKeyedChildren",a[a.HasTextChildren=16]="HasTextChildren",a[a.MultipleChildren=12]="MultipleChildren"})(e||(r.ChildFlags=e={}))},89292:function(T,r){"use strict";r.__esModule=!0,r.Fragment=r.EMPTY_OBJ=r.Component=r.AnimationQueues=void 0,r._CI=Ot,r._HI=pe,r._M=Ke,r._MCCC=Ft,r._ME=Dt,r._MFCC=_t,r._MP=Mt,r._MR=at,r._RFC=gt,r.__render=Ht,r.createComponentVNode=se,r.createFragment=me,r.createPortal=Z,r.createRef=nn,r.createRenderer=En,r.createTextVNode=ie,r.createVNode=$,r.directClone=ae,r.findDOMFromVNode=V,r.forwardRef=on,r.getFlagsForElementVnode=te,r.linkEvent=g,r.normalizeProps=q,r.options=void 0,r.render=zt,r.rerender=$t,r.version=void 0;var n=Array.isArray;function e(j){var W=typeof j;return W==="string"||W==="number"}function a(j){return j==null}function t(j){return j===null||j===!1||j===!0||j===void 0}function o(j){return typeof j=="function"}function f(j){return typeof j=="string"}function b(j){return typeof j=="number"}function S(j){return j===null}function B(j){return j===void 0}function k(j,W){var H={};if(j)for(var K in j)H[K]=j[K];if(W)for(var Q in W)H[Q]=W[Q];return H}function g(j,W){return o(W)?{data:j,event:W}:null}function l(j){return!S(j)&&typeof j=="object"}var c=r.EMPTY_OBJ={},m=r.Fragment="$F",i=r.AnimationQueues=function(){function j(){this.componentDidAppear=[],this.componentWillDisappear=[],this.componentWillMove=[]}return j}();function u(j){return j.substring(2).toLowerCase()}function s(j,W){j.appendChild(W)}function d(j,W,H){S(H)?s(j,W):j.insertBefore(W,H)}function v(j,W){return W?document.createElementNS("http://www.w3.org/2000/svg",j):document.createElement(j)}function C(j,W,H){j.replaceChild(W,H)}function h(j,W){j.removeChild(W)}function p(j){for(var W=0;W0?y(H.componentWillDisappear,w(j,W)):L(j,W,!1)}function x(j,W,H,K,Q,ee,oe,ue){j.componentWillMove.push({dom:K,fn:function(){function ge(){oe&4?H.componentWillMove(W,Q,K):oe&8&&H.onComponentWillMove(W,Q,K,ue)}return ge}(),next:ee,parent:Q})}function E(j,W,H,K,Q){var ee,oe,ue=W.flags;do{var ge=W.flags;if(ge&1521){!a(ee)&&(o(ee.componentWillMove)||o(ee.onComponentWillMove))?x(Q,j,ee,W.dom,H,K,ue,oe):d(H,W.dom,K);return}var Te=W.children;if(ge&4)ee=W.children,oe=W.props,W=Te.$LI;else if(ge&8)ee=W.ref,oe=W.props,W=Te;else if(ge&8192)if(W.childFlags===2)W=Te;else{for(var Ie=0,Ee=Te.length;Ie0,Te=S(ue),Ie=f(ue)&&ue[0]===U;ge||Te||Ie?(H=H||W.slice(0,ee),(ge||Ie)&&(oe=ae(oe)),(Te||Ie)&&(oe.key=U+ee),H.push(oe)):H&&H.push(oe),oe.flags|=65536}}H=H||W,H.length===0?K=1:K=8}else H=W,H.flags|=65536,W.flags&81920&&(H=ae(W)),K=2;return j.children=H,j.childFlags=K,j}function pe(j){return t(j)||e(j)?ie(j,null):n(j)?me(j,0,null):j.flags&16384?ae(j):j}var ce="http://www.w3.org/1999/xlink",Ve="http://www.w3.org/XML/1998/namespace",Ce={"xlink:actuate":ce,"xlink:arcrole":ce,"xlink:href":ce,"xlink:role":ce,"xlink:show":ce,"xlink:title":ce,"xlink:type":ce,"xml:base":Ve,"xml:lang":Ve,"xml:space":Ve};function Ne(j){return{onClick:j,onDblClick:j,onFocusIn:j,onFocusOut:j,onKeyDown:j,onKeyPress:j,onKeyUp:j,onMouseDown:j,onMouseMove:j,onMouseUp:j,onTouchEnd:j,onTouchMove:j,onTouchStart:j}}var Be=Ne(0),be=Ne(null),Le=Ne(!0);function we(j,W){var H=W.$EV;return H||(H=W.$EV=Ne(null)),H[j]||++Be[j]===1&&(be[j]=je(j)),H}function xe(j,W){var H=W.$EV;H&&H[j]&&(--Be[j]===0&&(document.removeEventListener(u(j),be[j]),be[j]=null),H[j]=null)}function Re(j,W,H,K){if(o(H))we(j,K)[j]=H;else if(l(H)){if(O(W,H))return;we(j,K)[j]=H}else xe(j,K)}function He(j){return o(j.composedPath)?j.composedPath()[0]:j.target}function ye(j,W,H,K){var Q=He(j);do{if(W&&Q.disabled)return;var ee=Q.$EV;if(ee){var oe=ee[H];if(oe&&(K.dom=Q,oe.event?oe.event(oe.data,j):oe(j),j.cancelBubble))return}Q=Q.parentNode}while(!S(Q))}function de(){this.cancelBubble=!0,this.immediatePropagationStopped||this.stopImmediatePropagation()}function he(){return this.defaultPrevented}function ke(){return this.cancelBubble}function ve(j){var W={dom:document};return j.isDefaultPrevented=he,j.isPropagationStopped=ke,j.stopPropagation=de,Object.defineProperty(j,"currentTarget",{configurable:!0,get:function(){function H(){return W.dom}return H}()}),W}function Se(j){return function(W){if(W.button!==0){W.stopPropagation();return}ye(W,!0,j,ve(W))}}function Pe(j){return function(W){ye(W,!1,j,ve(W))}}function je(j){var W=j==="onClick"||j==="onDblClick"?Se(j):Pe(j);return document.addEventListener(u(j),W),W}function Fe(j,W){var H=document.createElement("i");return H.innerHTML=W,H.innerHTML===j.innerHTML}function ze(j,W,H){if(j[W]){var K=j[W];K.event?K.event(K.data,H):K(H)}else{var Q=W.toLowerCase();j[Q]&&j[Q](H)}}function We(j,W){var H=function(){function K(Q){var ee=this.$V;if(ee){var oe=ee.props||c,ue=ee.dom;if(f(j))ze(oe,j,Q);else for(var ge=0;ge-1&&W.options[ee]&&(ue=W.options[ee].value),H&&a(ue)&&(ue=j.defaultValue),rt(K,ue)}}var Zt=We("onInput",Tt),qt=We("onChange");function en(j,W){Ue(j,"input",Zt),W.onChange&&Ue(j,"change",qt)}function Tt(j,W,H){var K=j.value,Q=W.value;if(a(K)){if(H){var ee=j.defaultValue;!a(ee)&&ee!==Q&&(W.defaultValue=ee,W.value=ee)}}else Q!==K&&(W.defaultValue=K,W.value=K)}function xt(j,W,H,K,Q,ee){j&64?ut(K,H):j&256?wt(K,H,Q,W):j&128&&Tt(K,H,Q),ee&&(H.$V=W)}function tn(j,W,H){j&64?Bt(W,H):j&256?Qt(W):j&128&&en(W,H)}function At(j){return j.type&&Xe(j.type)?!a(j.checked):!a(j.value)}function nn(){return{current:null}}function on(j){var W={render:j};return W}function st(j){j&&!_(j,null)&&j.current&&(j.current=null)}function at(j,W,H){j&&(o(j)||j.current!==void 0)&&H.push(function(){!_(j,W)&&j.current!==void 0&&(j.current=W)})}function Je(j,W,H){Ze(j,H),A(j,W,H)}function Ze(j,W){var H=j.flags,K=j.children,Q;if(H&481){Q=j.ref;var ee=j.props;st(Q);var oe=j.childFlags;if(!S(ee))for(var ue=Object.keys(ee),ge=0,Te=ue.length;ge0?y(H.componentWillDisappear,rn(W,j)):j.textContent=""}function pt(j,W,H,K){ct(H,K),W.flags&8192?A(W,j,K):mt(j,H,K)}function Et(j,W,H,K,Q){j.componentWillDisappear.push(function(ee){K&4?W.componentWillDisappear(H,ee):K&8&&W.onComponentWillDisappear(H,Q,ee)})}function an(j){var W=j.event;return function(H){W(j.data,H)}}function cn(j,W,H,K){if(l(H)){if(O(W,H))return;H=an(H)}Ue(K,u(j),H)}function ln(j,W,H){if(a(W)){H.removeAttribute("style");return}var K=H.style,Q,ee;if(f(W)){K.cssText=W;return}if(!a(j)&&!f(j)){for(Q in W)ee=W[Q],ee!==j[Q]&&K.setProperty(Q,ee);for(Q in j)a(W[Q])&&K.removeProperty(Q)}else for(Q in W)ee=W[Q],K.setProperty(Q,ee)}function dn(j,W,H,K,Q){var ee=j&&j.__html||"",oe=W&&W.__html||"";ee!==oe&&!a(oe)&&!Fe(K,oe)&&(S(H)||(H.childFlags&12?ct(H.children,Q):H.childFlags===2&&Ze(H.children,Q),H.children=null,H.childFlags=1),K.innerHTML=oe)}function vt(j,W,H,K,Q,ee,oe,ue){switch(j){case"children":case"childrenType":case"className":case"defaultValue":case"key":case"multiple":case"ref":case"selectedIndex":break;case"autoFocus":K.autofocus=!!H;break;case"allowfullscreen":case"autoplay":case"capture":case"checked":case"controls":case"default":case"disabled":case"hidden":case"indeterminate":case"loop":case"muted":case"novalidate":case"open":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"selected":K[j]=!!H;break;case"defaultChecked":case"value":case"volume":if(ee&&j==="value")break;var ge=a(H)?"":H;K[j]!==ge&&(K[j]=ge);break;case"style":ln(W,H,K);break;case"dangerouslySetInnerHTML":dn(W,H,oe,K,ue);break;default:Le[j]?Re(j,W,H,K):j.charCodeAt(0)===111&&j.charCodeAt(1)===110?cn(j,W,H,K):a(H)?K.removeAttribute(j):Q&&Ce[j]?K.setAttributeNS(Ce[j],j,H):K.setAttribute(j,H);break}}function Mt(j,W,H,K,Q,ee){var oe=!1,ue=(W&448)>0;ue&&(oe=At(H),oe&&tn(W,K,H));for(var ge in H)vt(ge,null,H[ge],K,Q,oe,null,ee);ue&&xt(W,j,K,H,!0,oe)}function Pt(j,W,H){var K=pe(j.render(W,j.state,H)),Q=H;return o(j.getChildContext)&&(Q=k(H,j.getChildContext())),j.$CX=Q,K}function Ot(j,W,H,K,Q,ee){var oe=new W(H,K),ue=oe.$N=!!(W.getDerivedStateFromProps||oe.getSnapshotBeforeUpdate);if(oe.$SVG=Q,oe.$L=ee,j.children=oe,oe.$BS=!1,oe.context=K,oe.props===c&&(oe.props=H),ue)oe.state=P(oe,H,oe.state);else if(o(oe.componentWillMount)){oe.$BR=!0,oe.componentWillMount();var ge=oe.$PS;if(!S(ge)){var Te=oe.state;if(S(Te))oe.state=ge;else for(var Ie in ge)Te[Ie]=ge[Ie];oe.$PS=null}oe.$BR=!1}return oe.$LI=Pt(oe,H,K),oe}function gt(j,W){var H=j.props||c;return j.flags&32768?j.type.render(H,j.ref,W):j.type(H,W)}function Ke(j,W,H,K,Q,ee,oe){var ue=j.flags|=16384;ue&481?Dt(j,W,H,K,Q,ee,oe):ue&4?mn(j,W,H,K,Q,ee,oe):ue&8?pn(j,W,H,K,Q,ee,oe):ue&16?Rt(j,W,Q):ue&8192?sn(j,H,W,K,Q,ee,oe):ue&1024&&un(j,H,W,Q,ee,oe)}function un(j,W,H,K,Q,ee){Ke(j.children,j.ref,W,!1,null,Q,ee);var oe=le();Rt(oe,H,K),j.dom=oe.dom}function sn(j,W,H,K,Q,ee,oe){var ue=j.children,ge=j.childFlags;ge&12&&ue.length===0&&(ge=j.childFlags=2,ue=j.children=le()),ge===2?Ke(ue,H,W,K,Q,ee,oe):ot(ue,H,W,K,Q,ee,oe)}function Rt(j,W,H){var K=j.dom=document.createTextNode(j.children);S(W)||d(W,K,H)}function Dt(j,W,H,K,Q,ee,oe){var ue=j.flags,ge=j.props,Te=j.className,Ie=j.childFlags,Ee=j.dom=v(j.type,K=K||(ue&32)>0),Ae=j.children;if(!a(Te)&&Te!==""&&(K?Ee.setAttribute("class",Te):Ee.className=Te),Ie===16)R(Ee,Ae);else if(Ie!==1){var Me=K&&j.type!=="foreignObject";Ie===2?(Ae.flags&16384&&(j.children=Ae=ae(Ae)),Ke(Ae,Ee,H,Me,null,ee,oe)):(Ie===8||Ie===4)&&ot(Ae,Ee,H,Me,null,ee,oe)}S(W)||d(W,Ee,Q),S(ge)||Mt(j,ue,ge,Ee,K,oe),at(j.ref,Ee,ee)}function ot(j,W,H,K,Q,ee,oe){for(var ue=0;ueMe)&&(Ee=V(ue[Me-1],!1).nextSibling)}Nt(Te,Ie,ue,ge,H,K,Q,Ee,j,ee,oe)}function Vn(j,W,H,K,Q){var ee=j.ref,oe=W.ref,ue=W.children;if(Nt(j.childFlags,W.childFlags,j.children,ue,ee,H,!1,null,j,K,Q),W.dom=j.dom,ee!==oe&&!t(ue)){var ge=ue.dom;h(ee,ge),s(oe,ge)}}function bn(j,W,H,K,Q,ee,oe){var ue=W.dom=j.dom,ge=j.props,Te=W.props,Ie=!1,Ee=!1,Ae;if(K=K||(Q&32)>0,ge!==Te){var Me=ge||c;if(Ae=Te||c,Ae!==c){Ie=(Q&448)>0,Ie&&(Ee=At(Ae));for(var _e in Ae){var Oe=Me[_e],$e=Ae[_e];Oe!==$e&&vt(_e,Oe,$e,ue,K,Ee,j,oe)}}if(Me!==c)for(var De in Me)a(Ae[De])&&!a(Me[De])&&vt(De,Me[De],null,ue,K,Ee,j,oe)}var tt=W.children,Ye=W.className;j.className!==Ye&&(a(Ye)?ue.removeAttribute("class"):K?ue.setAttribute("class",Ye):ue.className=Ye),Q&4096?gn(ue,tt):Nt(j.childFlags,W.childFlags,j.children,tt,ue,H,K&&W.type!=="foreignObject",null,j,ee,oe),Ie&&xt(Q,W,ue,Ae,!1,Ee);var it=W.ref,Qe=j.ref;Qe!==it&&(st(Qe),at(it,ue,ee))}function kn(j,W,H,K,Q,ee,oe){Ze(j,oe),ot(W,H,K,Q,V(j,!0),ee,oe),A(j,H,oe)}function Nt(j,W,H,K,Q,ee,oe,ue,ge,Te,Ie){switch(j){case 2:switch(W){case 2:qe(H,K,Q,ee,oe,ue,Te,Ie);break;case 1:Je(H,Q,Ie);break;case 16:Ze(H,Ie),R(Q,K);break;default:kn(H,K,Q,ee,oe,Te,Ie);break}break;case 1:switch(W){case 2:Ke(K,Q,ee,oe,ue,Te,Ie);break;case 1:break;case 16:R(Q,K);break;default:ot(K,Q,ee,oe,ue,Te,Ie);break}break;case 16:switch(W){case 16:vn(H,K,Q);break;case 2:mt(Q,H,Ie),Ke(K,Q,ee,oe,ue,Te,Ie);break;case 1:mt(Q,H,Ie);break;default:mt(Q,H,Ie),ot(K,Q,ee,oe,ue,Te,Ie);break}break;default:switch(W){case 16:ct(H,Ie),R(Q,K);break;case 2:pt(Q,ge,H,Ie),Ke(K,Q,ee,oe,ue,Te,Ie);break;case 1:pt(Q,ge,H,Ie);break;default:var Ee=H.length|0,Ae=K.length|0;Ee===0?Ae>0&&ot(K,Q,ee,oe,ue,Te,Ie):Ae===0?pt(Q,ge,H,Ie):W===8&&j===8?wn(H,K,Q,ee,oe,Ee,Ae,ue,ge,Te,Ie):Ln(H,K,Q,ee,oe,Ee,Ae,ue,Te,Ie);break}break}}function yn(j,W,H,K,Q){Q.push(function(){j.componentDidUpdate(W,H,K)})}function Wt(j,W,H,K,Q,ee,oe,ue,ge,Te){var Ie=j.state,Ee=j.props,Ae=!!j.$N,Me=o(j.shouldComponentUpdate);if(Ae&&(W=P(j,H,W!==Ie?k(Ie,W):W)),oe||!Me||Me&&j.shouldComponentUpdate(H,W,Q)){!Ae&&o(j.componentWillUpdate)&&j.componentWillUpdate(H,W,Q),j.props=H,j.state=W,j.context=Q;var _e=null,Oe=Pt(j,H,Q);Ae&&o(j.getSnapshotBeforeUpdate)&&(_e=j.getSnapshotBeforeUpdate(Ee,Ie)),qe(j.$LI,Oe,K,j.$CX,ee,ue,ge,Te),j.$LI=Oe,o(j.componentDidUpdate)&&yn(j,Ee,Ie,_e,ge)}else j.props=H,j.state=W,j.context=Q}function Sn(j,W,H,K,Q,ee,oe,ue){var ge=W.children=j.children;if(!S(ge)){ge.$L=oe;var Te=W.props||c,Ie=W.ref,Ee=j.ref,Ae=ge.state;if(!ge.$N){if(o(ge.componentWillReceiveProps)){if(ge.$BR=!0,ge.componentWillReceiveProps(Te,K),ge.$UN)return;ge.$BR=!1}S(ge.$PS)||(Ae=k(Ae,ge.$PS),ge.$PS=null)}Wt(ge,Ae,Te,H,K,Q,!1,ee,oe,ue),Ee!==Ie&&(st(Ee),at(Ie,ge,oe))}}function Bn(j,W,H,K,Q,ee,oe,ue){var ge=!0,Te=W.props||c,Ie=W.ref,Ee=j.props,Ae=!a(Ie),Me=j.children;if(Ae&&o(Ie.onComponentShouldUpdate)&&(ge=Ie.onComponentShouldUpdate(Ee,Te)),ge!==!1){Ae&&o(Ie.onComponentWillUpdate)&&Ie.onComponentWillUpdate(Ee,Te);var _e=pe(gt(W,K));qe(Me,_e,H,K,Q,ee,oe,ue),W.children=_e,Ae&&o(Ie.onComponentDidUpdate)&&Ie.onComponentDidUpdate(Ee,Te)}else W.children=Me}function In(j,W){var H=W.children,K=W.dom=j.dom;H!==j.children&&(K.nodeValue=H)}function Ln(j,W,H,K,Q,ee,oe,ue,ge,Te){for(var Ie=ee>oe?oe:ee,Ee=0,Ae,Me;Eeoe)for(Ee=Ie;EeEe||Me>Ae)break e;_e=j[Me],Oe=W[Me]}for(_e=j[Ee],Oe=W[Ae];_e.key===Oe.key;){if(Oe.flags&16384&&(W[Ae]=Oe=ae(Oe)),qe(_e,Oe,H,K,Q,ue,Te,Ie),j[Ee]=Oe,Ee--,Ae--,Me>Ee||Me>Ae)break e;_e=j[Ee],Oe=W[Ae]}}if(Me>Ee){if(Me<=Ae)for($e=Ae+1,De=$eAe)for(;Me<=Ee;)Je(j[Me++],H,Ie);else Tn(j,W,K,ee,oe,Ee,Ae,Me,H,Q,ue,ge,Te,Ie)}function Tn(j,W,H,K,Q,ee,oe,ue,ge,Te,Ie,Ee,Ae,Me){var _e,Oe,$e=0,De=0,tt=ue,Ye=ue,it=ee-ue+1,Qe=oe-ue+1,lt=new Int32Array(Qe+1),nt=it===K,bt=!1,Ge=0,dt=0;if(Q<4||(it|Qe)<32)for(De=tt;De<=ee;++De)if(_e=j[De],dtue?bt=!0:Ge=ue,Oe.flags&16384&&(W[ue]=Oe=ae(Oe)),qe(_e,Oe,ge,H,Te,Ie,Ae,Me),++dt;break}!nt&&ue>oe&&Je(_e,ge,Me)}else nt||Je(_e,ge,Me);else{var Yt={};for(De=Ye;De<=oe;++De)Yt[W[De].key]=De;for(De=tt;De<=ee;++De)if(_e=j[De],dttt;)Je(j[tt++],ge,Me);lt[ue-Ye]=De+1,Ge>ue?bt=!0:Ge=ue,Oe=W[ue],Oe.flags&16384&&(W[ue]=Oe=ae(Oe)),qe(_e,Oe,ge,H,Te,Ie,Ae,Me),++dt}else nt||Je(_e,ge,Me);else nt||Je(_e,ge,Me)}if(nt)pt(ge,Ee,j,Me),ot(W,ge,H,Te,Ie,Ae,Me);else if(bt){var Xt=xn(lt);for(ue=Xt.length-1,De=Qe-1;De>=0;De--)lt[De]===0?(Ge=De+Ye,Oe=W[Ge],Oe.flags&16384&&(W[Ge]=Oe=ae(Oe)),$e=Ge+1,Ke(Oe,ge,H,Te,$e0&&I(Me.componentWillMove)}else if(dt!==Qe)for(De=Qe-1;De>=0;De--)lt[De]===0&&(Ge=De+Ye,Oe=W[Ge],Oe.flags&16384&&(W[Ge]=Oe=ae(Oe)),$e=Ge+1,Ke(Oe,ge,H,Te,$eUt&&(Ut=ge,et=new Int32Array(ge),ft=new Int32Array(ge));H>1,j[et[ue]]0&&(ft[H]=et[ee-1]),et[ee]=H)}ee=Q+1;var Te=new Int32Array(ee);for(oe=et[ee-1];ee-- >0;)Te[ee]=oe,oe=ft[oe],et[ee]=0;return Te}var An=typeof document!="undefined";An&&window.Node&&(Node.prototype.$EV=null,Node.prototype.$V=null);function Ht(j,W,H,K){var Q=[],ee=new i,oe=W.$V;D.v=!0,a(oe)?a(j)||(j.flags&16384&&(j=ae(j)),Ke(j,W,K,!1,null,Q,ee),W.$V=j,oe=j):a(j)?(Je(oe,W,ee),W.$V=null):(j.flags&16384&&(j=ae(j)),qe(oe,j,W,K,!1,null,Q,ee),oe=W.$V=j),p(Q),y(ee.componentDidAppear),D.v=!1,o(H)&&H(),o(M.renderComplete)&&M.renderComplete(oe,W)}function zt(j,W,H,K){H===void 0&&(H=null),K===void 0&&(K=c),Ht(j,W,H,K)}function En(j){return function(){function W(H,K,Q,ee){j||(j=H),zt(K,j,Q,ee)}return W}()}var ht=[],Mn=typeof Promise!="undefined"?Promise.resolve().then.bind(Promise.resolve()):function(j){window.setTimeout(j,0)},Vt=!1;function Kt(j,W,H,K){var Q=j.$PS;if(o(W)&&(W=W(Q?k(j.state,Q):j.state,j.props,j.context)),a(Q))j.$PS=W;else for(var ee in W)Q[ee]=W[ee];if(j.$BR)o(H)&&j.$L.push(H.bind(j));else{if(!D.v&&ht.length===0){Gt(j,K),o(H)&&H.call(j);return}if(ht.indexOf(j)===-1&&ht.push(j),K&&(j.$F=!0),Vt||(Vt=!0,Mn($t)),o(H)){var oe=j.$QU;oe||(oe=j.$QU=[]),oe.push(H)}}}function Pn(j){for(var W=j.$QU,H=0;H=0;--_){var U=this.tryEntries[_],z=U.completion;if(U.tryLoc==="root")return F("end");if(U.tryLoc<=this.prev){var $=a.call(U,"catchLoc"),G=a.call(U,"finallyLoc");if($&&G){if(this.prev=0;--F){var _=this.tryEntries[F];if(_.tryLoc<=this.prev&&a.call(_,"finallyLoc")&&this.prev<_.finallyLoc){var U=_;break}}U&&(R==="break"||R==="continue")&&U.tryLoc<=O&&O<=U.finallyLoc&&(U=null);var z=U?U.completion:{};return z.type=R,z.arg=O,U?(this.method="next",this.next=U.finallyLoc,s):this.complete(z)}return M}(),complete:function(){function M(R,O){if(R.type==="throw")throw R.arg;return R.type==="break"||R.type==="continue"?this.next=R.arg:R.type==="return"?(this.rval=this.arg=R.arg,this.method="return",this.next="end"):R.type==="normal"&&O&&(this.next=O),s}return M}(),finish:function(){function M(R){for(var O=this.tryEntries.length-1;O>=0;--O){var F=this.tryEntries[O];if(F.finallyLoc===R)return this.complete(F.completion,F.afterLoc),x(F),s}}return M}(),catch:function(){function M(R){for(var O=this.tryEntries.length-1;O>=0;--O){var F=this.tryEntries[O];if(F.tryLoc===R){var _=F.completion;if(_.type==="throw"){var U=_.arg;x(F)}return U}}throw new Error("illegal catch attempt")}return M}(),delegateYield:function(){function M(R,O,F){return this.delegate={iterator:P(R),resultName:O,nextLoc:F},this.method==="next"&&(this.arg=o),s}return M}()},n}(T.exports);try{regeneratorRuntime=r}catch(n){typeof globalThis=="object"?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}},30236:function(){"use strict";self.fetch||(self.fetch=function(T,r){return r=r||{},new Promise(function(n,e){var a=new XMLHttpRequest,t=[],o={},f=function(){function S(){return{ok:(a.status/100|0)==2,statusText:a.statusText,status:a.status,url:a.responseURL,text:function(){function B(){return Promise.resolve(a.responseText)}return B}(),json:function(){function B(){return Promise.resolve(a.responseText).then(JSON.parse)}return B}(),blob:function(){function B(){return Promise.resolve(new Blob([a.response]))}return B}(),clone:S,headers:{keys:function(){function B(){return t}return B}(),entries:function(){function B(){return t.map(function(k){return[k,a.getResponseHeader(k)]})}return B}(),get:function(){function B(k){return a.getResponseHeader(k)}return B}(),has:function(){function B(k){return a.getResponseHeader(k)!=null}return B}()}}}return S}();for(var b in a.open(r.method||"get",T,!0),a.onload=function(){a.getAllResponseHeaders().toLowerCase().replace(/^(.+?):/gm,function(S,B){o[B]||t.push(o[B]=B)}),n(f())},a.onerror=e,a.withCredentials=r.credentials=="include",r.headers)a.setRequestHeader(b,r.headers[b]);a.send(r.body||null)})})},88510:function(T,r){"use strict";r.__esModule=!0,r.zipWith=r.zip=r.uniqBy=r.uniq=r.toKeyedArray=r.toArray=r.sortBy=r.sort=r.reduce=r.range=r.map=r.filterMap=r.filter=void 0;function n(d,v){var C=typeof Symbol!="undefined"&&d[Symbol.iterator]||d["@@iterator"];if(C)return(C=C.call(d)).next.bind(C);if(Array.isArray(d)||(C=e(d))||v&&d&&typeof d.length=="number"){C&&(d=C);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 e(d,v){if(d){if(typeof d=="string")return a(d,v);var C={}.toString.call(d).slice(8,-1);return C==="Object"&&d.constructor&&(C=d.constructor.name),C==="Map"||C==="Set"?Array.from(d):C==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(C)?a(d,v):void 0}}function a(d,v){(v==null||v>d.length)&&(v=d.length);for(var C=0,h=Array(v);CI)return 1}return 0},k=r.sortBy=function(){function d(){for(var v=arguments.length,h=new Array(v),C=0;CI)return 1}return 0},k=r.sortBy=function(){function d(){for(var v=arguments.length,C=new Array(v),h=0;h=1-n)return F[_-1];var z=U%1,$=U|0;return D.lerp(F[$],F[$+1],z)}return R}(),D}(),a=function(M,R,O){return R===void 0&&(R=0),O===void 0&&(O=Math.pow(10,R)),Math.round(O*M)/O},t={grad:360/400,turn:360,rad:360/(Math.PI*2)},o=r.hexToHsva=function(){function D(M){return I(f(M))}return D}(),f=r.hexToRgba=function(){function D(M){return M[0]==="#"&&(M=M.substring(1)),M.length<6?{r:parseInt(M[0]+M[0],16),g:parseInt(M[1]+M[1],16),b:parseInt(M[2]+M[2],16),a:M.length===4?a(parseInt(M[3]+M[3],16)/255,2):1}:{r:parseInt(M.substring(0,2),16),g:parseInt(M.substring(2,4),16),b:parseInt(M.substring(4,6),16),a:M.length===8?a(parseInt(M.substring(6,8),16)/255,2):1}}return D}(),b=r.parseHue=function(){function D(M,R){return R===void 0&&(R="deg"),Number(M)*(t[R]||1)}return D}(),y=r.hslaStringToHsva=function(){function D(M){var R=/hsla?\(?\s*(-?\d*\.?\d+)(deg|rad|grad|turn)?[,\s]+(-?\d*\.?\d+)%?[,\s]+(-?\d*\.?\d+)%?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i,O=R.exec(M);return O?k({h:b(O[1],O[2]),s:Number(O[3]),l:Number(O[4]),a:O[5]===void 0?1:Number(O[5])/(O[6]?100:1)}):{h:0,s:0,v:0,a:1}}return D}(),B=r.hslStringToHsva=y,k=r.hslaToHsva=function(){function D(M){var R=M.h,O=M.s,F=M.l,_=M.a;return O*=(F<50?F:100-F)/100,{h:R,s:O>0?2*O/(F+O)*100:0,v:F+O,a:_}}return D}(),g=r.hsvaToHex=function(){function D(M){return S(s(M))}return D}(),l=r.hsvaToHsla=function(){function D(M){var R=M.h,O=M.s,F=M.v,_=M.a,U=(200-O)*F/100;return{h:a(R),s:a(U>0&&U<200?O*F/100/(U<=100?U:200-U)*100:0),l:a(U/2),a:a(_,2)}}return D}(),c=r.hsvaToHslString=function(){function D(M){var R=l(M),O=R.h,F=R.s,_=R.l;return"hsl("+O+", "+F+"%, "+_+"%)"}return D}(),m=r.hsvaToHsvString=function(){function D(M){var R=L(M),O=R.h,F=R.s,_=R.v;return"hsv("+O+", "+F+"%, "+_+"%)"}return D}(),i=r.hsvaToHsvaString=function(){function D(M){var R=L(M),O=R.h,F=R.s,_=R.v,U=R.a;return"hsva("+O+", "+F+"%, "+_+"%, "+U+")"}return D}(),u=r.hsvaToHslaString=function(){function D(M){var R=l(M),O=R.h,F=R.s,_=R.l,U=R.a;return"hsla("+O+", "+F+"%, "+_+"%, "+U+")"}return D}(),s=r.hsvaToRgba=function(){function D(M){var R=M.h,O=M.s,F=M.v,_=M.a;R=R/360*6,O=O/100,F=F/100;var U=Math.floor(R),z=F*(1-O),$=F*(1-(R-U)*O),G=F*(1-(1-R+U)*O),X=U%6;return{r:[F,$,z,z,G,F][X]*255,g:[G,F,F,$,z,z][X]*255,b:[z,z,G,F,F,$][X]*255,a:a(_,2)}}return D}(),d=r.hsvaToRgbString=function(){function D(M){var R=s(M),O=R.r,F=R.g,_=R.b;return"rgb("+a(O)+", "+a(F)+", "+a(_)+")"}return D}(),v=r.hsvaToRgbaString=function(){function D(M){var R=s(M),O=R.r,F=R.g,_=R.b,U=R.a;return"rgba("+a(O)+", "+a(F)+", "+a(_)+", "+a(U,2)+")"}return D}(),h=r.hsvaStringToHsva=function(){function D(M){var R=/hsva?\(?\s*(-?\d*\.?\d+)(deg|rad|grad|turn)?[,\s]+(-?\d*\.?\d+)%?[,\s]+(-?\d*\.?\d+)%?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i,O=R.exec(M);return O?L({h:b(O[1],O[2]),s:Number(O[3]),v:Number(O[4]),a:O[5]===void 0?1:Number(O[5])/(O[6]?100:1)}):{h:0,s:0,v:0,a:1}}return D}(),C=r.hsvStringToHsva=h,p=r.rgbaStringToHsva=function(){function D(M){var R=/rgba?\(?\s*(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i,O=R.exec(M);return O?I({r:Number(O[1])/(O[2]?100/255:1),g:Number(O[3])/(O[4]?100/255:1),b:Number(O[5])/(O[6]?100/255:1),a:O[7]===void 0?1:Number(O[7])/(O[8]?100:1)}):{h:0,s:0,v:0,a:1}}return D}(),N=r.rgbStringToHsva=p,V=function(M){var R=M.toString(16);return R.length<2?"0"+R:R},S=r.rgbaToHex=function(){function D(M){var R=M.r,O=M.g,F=M.b,_=M.a,U=_<1?V(a(_*255)):"";return"#"+V(a(R))+V(a(O))+V(a(F))+U}return D}(),I=r.rgbaToHsva=function(){function D(M){var R=M.r,O=M.g,F=M.b,_=M.a,U=Math.max(R,O,F),z=U-Math.min(R,O,F),$=z?U===R?(O-F)/z:U===O?2+(F-R)/z:4+(R-O)/z:0;return{h:60*($<0?$+6:$),s:U?z/U*100:0,v:U/255*100,a:_}}return D}(),L=r.roundHsva=function(){function D(M){return{h:a(M.h),s:a(M.s),v:a(M.v),a:a(M.a,2)}}return D}(),w=r.rgbaToRgb=function(){function D(M){var R=M.r,O=M.g,F=M.b;return{r:R,g:O,b:F}}return D}(),A=r.hslaToHsl=function(){function D(M){var R=M.h,O=M.s,F=M.l;return{h:R,s:O,l:F}}return D}(),x=r.hsvaToHsv=function(){function D(M){var R=L(M),O=R.h,F=R.s,_=R.v;return{h:O,s:F,v:_}}return D}(),E=/^#?([0-9A-F]{3,8})$/i,P=r.validHex=function(){function D(M,R){var O=E.exec(M),F=O?O[1].length:0;return F===3||F===6||!!R&&F===4||!!R&&F===8}return D}()},92868:function(T,r){"use strict";r.__esModule=!0,r.EventEmitter=void 0;/** + */var n=1e-4,e=r.Color=function(){function D(R,O,F,_){R===void 0&&(R=0),O===void 0&&(O=0),F===void 0&&(F=0),_===void 0&&(_=1),this.r=void 0,this.g=void 0,this.b=void 0,this.a=void 0,this.r=R,this.g=O,this.b=F,this.a=_}var M=D.prototype;return M.toString=function(){function R(){return"rgba("+(this.r|0)+", "+(this.g|0)+", "+(this.b|0)+", "+(this.a|0)+")"}return R}(),D.fromHex=function(){function R(O){return new D(parseInt(O.substr(1,2),16),parseInt(O.substr(3,2),16),parseInt(O.substr(5,2),16))}return R}(),D.lerp=function(){function R(O,F,_){return new D((F.r-O.r)*_+O.r,(F.g-O.g)*_+O.g,(F.b-O.b)*_+O.b,(F.a-O.a)*_+O.a)}return R}(),D.lookup=function(){function R(O,F){F===void 0&&(F=[]);var _=F.length;if(_<2)throw new Error("Needs at least two colors!");var U=O*(_-1);if(O=1-n)return F[_-1];var z=U%1,$=U|0;return D.lerp(F[$],F[$+1],z)}return R}(),D}(),a=function(M,R,O){return R===void 0&&(R=0),O===void 0&&(O=Math.pow(10,R)),Math.round(O*M)/O},t={grad:360/400,turn:360,rad:360/(Math.PI*2)},o=r.hexToHsva=function(){function D(M){return I(f(M))}return D}(),f=r.hexToRgba=function(){function D(M){return M[0]==="#"&&(M=M.substring(1)),M.length<6?{r:parseInt(M[0]+M[0],16),g:parseInt(M[1]+M[1],16),b:parseInt(M[2]+M[2],16),a:M.length===4?a(parseInt(M[3]+M[3],16)/255,2):1}:{r:parseInt(M.substring(0,2),16),g:parseInt(M.substring(2,4),16),b:parseInt(M.substring(4,6),16),a:M.length===8?a(parseInt(M.substring(6,8),16)/255,2):1}}return D}(),b=r.parseHue=function(){function D(M,R){return R===void 0&&(R="deg"),Number(M)*(t[R]||1)}return D}(),S=r.hslaStringToHsva=function(){function D(M){var R=/hsla?\(?\s*(-?\d*\.?\d+)(deg|rad|grad|turn)?[,\s]+(-?\d*\.?\d+)%?[,\s]+(-?\d*\.?\d+)%?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i,O=R.exec(M);return O?k({h:b(O[1],O[2]),s:Number(O[3]),l:Number(O[4]),a:O[5]===void 0?1:Number(O[5])/(O[6]?100:1)}):{h:0,s:0,v:0,a:1}}return D}(),B=r.hslStringToHsva=S,k=r.hslaToHsva=function(){function D(M){var R=M.h,O=M.s,F=M.l,_=M.a;return O*=(F<50?F:100-F)/100,{h:R,s:O>0?2*O/(F+O)*100:0,v:F+O,a:_}}return D}(),g=r.hsvaToHex=function(){function D(M){return y(s(M))}return D}(),l=r.hsvaToHsla=function(){function D(M){var R=M.h,O=M.s,F=M.v,_=M.a,U=(200-O)*F/100;return{h:a(R),s:a(U>0&&U<200?O*F/100/(U<=100?U:200-U)*100:0),l:a(U/2),a:a(_,2)}}return D}(),c=r.hsvaToHslString=function(){function D(M){var R=l(M),O=R.h,F=R.s,_=R.l;return"hsl("+O+", "+F+"%, "+_+"%)"}return D}(),m=r.hsvaToHsvString=function(){function D(M){var R=L(M),O=R.h,F=R.s,_=R.v;return"hsv("+O+", "+F+"%, "+_+"%)"}return D}(),i=r.hsvaToHsvaString=function(){function D(M){var R=L(M),O=R.h,F=R.s,_=R.v,U=R.a;return"hsva("+O+", "+F+"%, "+_+"%, "+U+")"}return D}(),u=r.hsvaToHslaString=function(){function D(M){var R=l(M),O=R.h,F=R.s,_=R.l,U=R.a;return"hsla("+O+", "+F+"%, "+_+"%, "+U+")"}return D}(),s=r.hsvaToRgba=function(){function D(M){var R=M.h,O=M.s,F=M.v,_=M.a;R=R/360*6,O=O/100,F=F/100;var U=Math.floor(R),z=F*(1-O),$=F*(1-(R-U)*O),G=F*(1-(1-R+U)*O),X=U%6;return{r:[F,$,z,z,G,F][X]*255,g:[G,F,F,$,z,z][X]*255,b:[z,z,G,F,F,$][X]*255,a:a(_,2)}}return D}(),d=r.hsvaToRgbString=function(){function D(M){var R=s(M),O=R.r,F=R.g,_=R.b;return"rgb("+a(O)+", "+a(F)+", "+a(_)+")"}return D}(),v=r.hsvaToRgbaString=function(){function D(M){var R=s(M),O=R.r,F=R.g,_=R.b,U=R.a;return"rgba("+a(O)+", "+a(F)+", "+a(_)+", "+a(U,2)+")"}return D}(),C=r.hsvaStringToHsva=function(){function D(M){var R=/hsva?\(?\s*(-?\d*\.?\d+)(deg|rad|grad|turn)?[,\s]+(-?\d*\.?\d+)%?[,\s]+(-?\d*\.?\d+)%?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i,O=R.exec(M);return O?L({h:b(O[1],O[2]),s:Number(O[3]),v:Number(O[4]),a:O[5]===void 0?1:Number(O[5])/(O[6]?100:1)}):{h:0,s:0,v:0,a:1}}return D}(),h=r.hsvStringToHsva=C,p=r.rgbaStringToHsva=function(){function D(M){var R=/rgba?\(?\s*(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i,O=R.exec(M);return O?I({r:Number(O[1])/(O[2]?100/255:1),g:Number(O[3])/(O[4]?100/255:1),b:Number(O[5])/(O[6]?100/255:1),a:O[7]===void 0?1:Number(O[7])/(O[8]?100:1)}):{h:0,s:0,v:0,a:1}}return D}(),N=r.rgbStringToHsva=p,V=function(M){var R=M.toString(16);return R.length<2?"0"+R:R},y=r.rgbaToHex=function(){function D(M){var R=M.r,O=M.g,F=M.b,_=M.a,U=_<1?V(a(_*255)):"";return"#"+V(a(R))+V(a(O))+V(a(F))+U}return D}(),I=r.rgbaToHsva=function(){function D(M){var R=M.r,O=M.g,F=M.b,_=M.a,U=Math.max(R,O,F),z=U-Math.min(R,O,F),$=z?U===R?(O-F)/z:U===O?2+(F-R)/z:4+(R-O)/z:0;return{h:60*($<0?$+6:$),s:U?z/U*100:0,v:U/255*100,a:_}}return D}(),L=r.roundHsva=function(){function D(M){return{h:a(M.h),s:a(M.s),v:a(M.v),a:a(M.a,2)}}return D}(),w=r.rgbaToRgb=function(){function D(M){var R=M.r,O=M.g,F=M.b;return{r:R,g:O,b:F}}return D}(),A=r.hslaToHsl=function(){function D(M){var R=M.h,O=M.s,F=M.l;return{h:R,s:O,l:F}}return D}(),x=r.hsvaToHsv=function(){function D(M){var R=L(M),O=R.h,F=R.s,_=R.v;return{h:O,s:F,v:_}}return D}(),E=/^#?([0-9A-F]{3,8})$/i,P=r.validHex=function(){function D(M,R){var O=E.exec(M),F=O?O[1].length:0;return F===3||F===6||!!R&&F===4||!!R&&F===8}return D}()},92868:function(T,r){"use strict";r.__esModule=!0,r.EventEmitter=void 0;/** * @file * @copyright 2020 Aleksej Komarov * @license MIT - */var n=r.EventEmitter=function(){function e(){this.listeners={}}var a=e.prototype;return a.on=function(){function t(o,f){this.listeners[o]=this.listeners[o]||[],this.listeners[o].push(f)}return t}(),a.off=function(){function t(o,f){var b=this.listeners[o];if(!b)throw new Error('There is no listeners for "'+o+'"');this.listeners[o]=b.filter(function(y){return y!==f})}return t}(),a.emit=function(){function t(o){var f=this.listeners[o];if(f){for(var b=arguments.length,y=new Array(b>1?b-1:0),B=1;B1?b-1:0),B=1;B1?B-1:0),g=1;g1?k-1:0),l=1;l1?B-1:0),g=1;g1?k-1:0),l=1;ll?l:k}return B}(),e=r.clamp01=function(){function B(k){return k<0?0:k>1?1:k}return B}(),a=r.scale=function(){function B(k,g,l){return(k-g)/(l-g)}return B}(),t=r.round=function(){function B(k,g){if(!k||isNaN(k))return k;var l,c,m,i;return g|=0,l=Math.pow(10,g),k*=l,i=+(k>0)|-(k<0),m=Math.abs(k%1)>=.4999999999854481,c=Math.floor(k),m&&(k=c+(i>0)),(m?k:Math.round(k))/l}return B}(),o=r.toFixed=function(){function B(k,g){return g===void 0&&(g=0),Number(k).toFixed(Math.max(g,0))}return B}(),f=r.inRange=function(){function B(k,g){return g&&k>=g[0]&&k<=g[1]}return B}(),b=r.keyOfMatchingRange=function(){function B(k,g){for(var l=0,c=Object.keys(g);ll?l:k}return B}(),e=r.clamp01=function(){function B(k){return k<0?0:k>1?1:k}return B}(),a=r.scale=function(){function B(k,g,l){return(k-g)/(l-g)}return B}(),t=r.round=function(){function B(k,g){if(!k||isNaN(k))return k;var l,c,m,i;return g|=0,l=Math.pow(10,g),k*=l,i=+(k>0)|-(k<0),m=Math.abs(k%1)>=.4999999999854481,c=Math.floor(k),m&&(k=c+(i>0)),(m?k:Math.round(k))/l}return B}(),o=r.toFixed=function(){function B(k,g){return g===void 0&&(g=0),Number(k).toFixed(Math.max(g,0))}return B}(),f=r.inRange=function(){function B(k,g){return g&&k>=g[0]&&k<=g[1]}return B}(),b=r.keyOfMatchingRange=function(){function B(k,g){for(var l=0,c=Object.keys(g);l1?i-1:0),s=1;s1?V-1:0),I=1;I=0;--pe){var ce=this.tryEntries[pe],Ve=ce.completion;if(ce.tryLoc==="root")return fe("end");if(ce.tryLoc<=this.prev){var Ce=N.call(ce,"catchLoc"),Ne=N.call(ce,"finallyLoc");if(Ce&&Ne){if(this.prev=0;--fe){var pe=this.tryEntries[fe];if(pe.tryLoc<=this.prev&&N.call(pe,"finallyLoc")&&this.prev=0;--te){var fe=this.tryEntries[te];if(fe.finallyLoc===ne)return this.complete(fe.completion,fe.afterLoc),re(fe),O}}return Z}(),catch:function(){function Z(ne){for(var te=this.tryEntries.length-1;te>=0;--te){var fe=this.tryEntries[te];if(fe.tryLoc===ne){var pe=fe.completion;if(pe.type==="throw"){var ce=pe.arg;re(fe)}return ce}}throw Error("illegal catch attempt")}return Z}(),delegateYield:function(){function Z(ne,te,fe){return this.delegate={iterator:le(ne),resultName:te,nextLoc:fe},this.method==="next"&&(this.arg=h),O}return Z}()},C}function e(h,C,p,N,V,S,I){try{var L=h[S](I),w=L.value}catch(A){return void p(A)}L.done?C(w):Promise.resolve(w).then(N,V)}function a(h){return function(){var C=this,p=arguments;return new Promise(function(N,V){var S=h.apply(C,p);function I(w){e(S,N,V,I,L,"next",w)}function L(w){e(S,N,V,I,L,"throw",w)}I(void 0)})}}/** + */var a=r.createStore=function(){function B(k,g){if(g)return g(B)(k);var l,c=[],m=function(){function s(){return l}return s}(),i=function(){function s(d){c.push(d)}return s}(),u=function(){function s(d){l=k(l,d);for(var v=0;v1?i-1:0),s=1;s1?V-1:0),I=1;I=0;--pe){var ce=this.tryEntries[pe],Ve=ce.completion;if(ce.tryLoc==="root")return fe("end");if(ce.tryLoc<=this.prev){var Ce=N.call(ce,"catchLoc"),Ne=N.call(ce,"finallyLoc");if(Ce&&Ne){if(this.prev=0;--fe){var pe=this.tryEntries[fe];if(pe.tryLoc<=this.prev&&N.call(pe,"finallyLoc")&&this.prev=0;--te){var fe=this.tryEntries[te];if(fe.finallyLoc===ne)return this.complete(fe.completion,fe.afterLoc),re(fe),O}}return Z}(),catch:function(){function Z(ne){for(var te=this.tryEntries.length-1;te>=0;--te){var fe=this.tryEntries[te];if(fe.tryLoc===ne){var pe=fe.completion;if(pe.type==="throw"){var ce=pe.arg;re(fe)}return ce}}throw Error("illegal catch attempt")}return Z}(),delegateYield:function(){function Z(ne,te,fe){return this.delegate={iterator:le(ne),resultName:te,nextLoc:fe},this.method==="next"&&(this.arg=C),O}return Z}()},h}function e(C,h,p,N,V,y,I){try{var L=C[y](I),w=L.value}catch(A){return void p(A)}L.done?h(w):Promise.resolve(w).then(N,V)}function a(C){return function(){var h=this,p=arguments;return new Promise(function(N,V){var y=C.apply(h,p);function I(w){e(y,N,V,I,L,"next",w)}function L(w){e(y,N,V,I,L,"throw",w)}I(void 0)})}}/** * Browser-agnostic abstraction of key-value web storage. * * @file * @copyright 2020 Aleksej Komarov * @license MIT - */var t=r.IMPL_MEMORY=0,o=r.IMPL_HUB_STORAGE=1,f=r.IMPL_INDEXED_DB=2,b=1,y="para-tgui",B="storage-v1",k="readonly",g="readwrite",l=function(C){return function(){try{return!!C()}catch(p){return!1}}},c=l(function(){return window.hubStorage&&window.hubStorage.getItem}),m=l(function(){return(window.indexedDB||window.msIndexedDB)&&(window.IDBTransaction||window.msIDBTransaction)}),i=function(){function h(){this.impl=t,this.store={}}var C=h.prototype;return C.get=function(){var p=a(n().mark(function(){function V(S){return n().wrap(function(){function I(L){for(;;)switch(L.prev=L.next){case 0:return L.abrupt("return",this.store[S]);case 1:case"end":return L.stop()}}return I}(),V,this)}return V}()));function N(V){return p.apply(this,arguments)}return N}(),C.set=function(){var p=a(n().mark(function(){function V(S,I){return n().wrap(function(){function L(w){for(;;)switch(w.prev=w.next){case 0:this.store[S]=I;case 1:case"end":return w.stop()}}return L}(),V,this)}return V}()));function N(V,S){return p.apply(this,arguments)}return N}(),C.remove=function(){var p=a(n().mark(function(){function V(S){return n().wrap(function(){function I(L){for(;;)switch(L.prev=L.next){case 0:this.store[S]=void 0;case 1:case"end":return L.stop()}}return I}(),V,this)}return V}()));function N(V){return p.apply(this,arguments)}return N}(),C.clear=function(){var p=a(n().mark(function(){function V(){return n().wrap(function(){function S(I){for(;;)switch(I.prev=I.next){case 0:this.store={};case 1:case"end":return I.stop()}}return S}(),V,this)}return V}()));function N(){return p.apply(this,arguments)}return N}(),h}(),u=function(){function h(){this.impl=o}var C=h.prototype;return C.get=function(){var p=a(n().mark(function(){function V(S){var I;return n().wrap(function(){function L(w){for(;;)switch(w.prev=w.next){case 0:return w.next=2,window.hubStorage.getItem("paradise-"+S);case 2:if(I=w.sent,typeof I!="string"){w.next=5;break}return w.abrupt("return",JSON.parse(I));case 5:case"end":return w.stop()}}return L}(),V)}return V}()));function N(V){return p.apply(this,arguments)}return N}(),C.set=function(){function p(N,V){window.hubStorage.setItem("paradise-"+N,JSON.stringify(V))}return p}(),C.remove=function(){function p(N){window.hubStorage.removeItem("paradise-"+N)}return p}(),C.clear=function(){function p(){window.hubStorage.clear()}return p}(),h}(),s=function(){function h(){this.impl=f,this.dbPromise=new Promise(function(p,N){var V=window.indexedDB||window.msIndexedDB,S=V.open(y,b);S.onupgradeneeded=function(){try{S.result.createObjectStore(B)}catch(I){N(new Error("Failed to upgrade IDB: "+S.error))}},S.onsuccess=function(){return p(S.result)},S.onerror=function(){N(new Error("Failed to open IDB: "+S.error))}})}var C=h.prototype;return C.getStore=function(){var p=a(n().mark(function(){function V(S){return n().wrap(function(){function I(L){for(;;)switch(L.prev=L.next){case 0:return L.abrupt("return",this.dbPromise.then(function(w){return w.transaction(B,S).objectStore(B)}));case 1:case"end":return L.stop()}}return I}(),V,this)}return V}()));function N(V){return p.apply(this,arguments)}return N}(),C.get=function(){var p=a(n().mark(function(){function V(S){var I;return n().wrap(function(){function L(w){for(;;)switch(w.prev=w.next){case 0:return w.next=2,this.getStore(k);case 2:return I=w.sent,w.abrupt("return",new Promise(function(A,x){var E=I.get(S);E.onsuccess=function(){return A(E.result)},E.onerror=function(){return x(E.error)}}));case 4:case"end":return w.stop()}}return L}(),V,this)}return V}()));function N(V){return p.apply(this,arguments)}return N}(),C.set=function(){var p=a(n().mark(function(){function V(S,I){var L;return n().wrap(function(){function w(A){for(;;)switch(A.prev=A.next){case 0:return A.next=2,this.getStore(g);case 2:L=A.sent,L.put(I,S);case 4:case"end":return A.stop()}}return w}(),V,this)}return V}()));function N(V,S){return p.apply(this,arguments)}return N}(),C.remove=function(){var p=a(n().mark(function(){function V(S){var I;return n().wrap(function(){function L(w){for(;;)switch(w.prev=w.next){case 0:return w.next=2,this.getStore(g);case 2:I=w.sent,I.delete(S);case 4:case"end":return w.stop()}}return L}(),V,this)}return V}()));function N(V){return p.apply(this,arguments)}return N}(),C.clear=function(){var p=a(n().mark(function(){function V(){var S;return n().wrap(function(){function I(L){for(;;)switch(L.prev=L.next){case 0:return L.next=2,this.getStore(g);case 2:S=L.sent,S.clear();case 4:case"end":return L.stop()}}return I}(),V,this)}return V}()));function N(){return p.apply(this,arguments)}return N}(),h}(),d=function(){function h(){this.backendPromise=a(n().mark(function(){function p(){var N;return n().wrap(function(){function V(S){for(;;)switch(S.prev=S.next){case 0:if(!(!Byond.TRIDENT&&c())){S.next=2;break}return S.abrupt("return",new u);case 2:if(!m()){S.next=12;break}return S.prev=3,N=new s,S.next=7,N.dbPromise;case 7:return S.abrupt("return",N);case 10:S.prev=10,S.t0=S.catch(3);case 12:return S.abrupt("return",new i);case 13:case"end":return S.stop()}}return V}(),p,null,[[3,10]])}return p}()))()}var C=h.prototype;return C.get=function(){var p=a(n().mark(function(){function V(S){var I;return n().wrap(function(){function L(w){for(;;)switch(w.prev=w.next){case 0:return w.next=2,this.backendPromise;case 2:return I=w.sent,w.abrupt("return",I.get(S));case 4:case"end":return w.stop()}}return L}(),V,this)}return V}()));function N(V){return p.apply(this,arguments)}return N}(),C.set=function(){var p=a(n().mark(function(){function V(S,I){var L;return n().wrap(function(){function w(A){for(;;)switch(A.prev=A.next){case 0:return A.next=2,this.backendPromise;case 2:return L=A.sent,A.abrupt("return",L.set(S,I));case 4:case"end":return A.stop()}}return w}(),V,this)}return V}()));function N(V,S){return p.apply(this,arguments)}return N}(),C.remove=function(){var p=a(n().mark(function(){function V(S){var I;return n().wrap(function(){function L(w){for(;;)switch(w.prev=w.next){case 0:return w.next=2,this.backendPromise;case 2:return I=w.sent,w.abrupt("return",I.remove(S));case 4:case"end":return w.stop()}}return L}(),V,this)}return V}()));function N(V){return p.apply(this,arguments)}return N}(),C.clear=function(){var p=a(n().mark(function(){function V(){var S;return n().wrap(function(){function I(L){for(;;)switch(L.prev=L.next){case 0:return L.next=2,this.backendPromise;case 2:return S=L.sent,L.abrupt("return",S.clear());case 4:case"end":return L.stop()}}return I}(),V,this)}return V}()));function N(){return p.apply(this,arguments)}return N}(),h}(),v=r.storage=new d},25328:function(T,r){"use strict";r.__esModule=!0,r.toTitleCase=r.multiline=r.decodeHtmlEntities=r.createSearch=r.createGlobPattern=r.capitalize=r.buildQueryString=void 0;function n(g,l){var c=typeof Symbol!="undefined"&&g[Symbol.iterator]||g["@@iterator"];if(c)return(c=c.call(g)).next.bind(c);if(Array.isArray(g)||(c=e(g))||l&&g&&typeof g.length=="number"){c&&(g=c);var m=0;return function(){return m>=g.length?{done:!0}:{done:!1,value:g[m++]}}}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 e(g,l){if(g){if(typeof g=="string")return a(g,l);var c={}.toString.call(g).slice(8,-1);return c==="Object"&&g.constructor&&(c=g.constructor.name),c==="Map"||c==="Set"?Array.from(g):c==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c)?a(g,l):void 0}}function a(g,l){(l==null||l>g.length)&&(l=g.length);for(var c=0,m=Array(l);c=g.length?{done:!0}:{done:!1,value:g[m++]}}}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 e(g,l){if(g){if(typeof g=="string")return a(g,l);var c={}.toString.call(g).slice(8,-1);return c==="Object"&&g.constructor&&(c=g.constructor.name),c==="Map"||c==="Set"?Array.from(g):c==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c)?a(g,l):void 0}}function a(g,l){(l==null||l>g.length)&&(l=g.length);for(var c=0,m=Array(l);c",apos:"'"};return l.replace(/
/gi,"\n").replace(/<\/?[a-z0-9-_]+[^>]*>/gi,"").replace(c,function(i,u){return m[u]}).replace(/&#?([0-9]+);/gi,function(i,u){var s=parseInt(u,10);return String.fromCharCode(s)}).replace(/&#x?([0-9a-f]+);/gi,function(i,u){var s=parseInt(u,16);return String.fromCharCode(s)})}return g}(),k=r.buildQueryString=function(){function g(l){return Object.keys(l).map(function(c){return encodeURIComponent(c)+"="+encodeURIComponent(l[c])}).join("&")}return g}()},69214:function(T,r){"use strict";r.__esModule=!0,r.throttle=r.sleep=r.debounce=void 0;/** + */var t=r.multiline=function(){function g(l){if(Array.isArray(l))return g(l.join(""));for(var c=l.split("\n"),m,i=n(c),u;!(u=i()).done;)for(var s=u.value,d=0;d",apos:"'"};return l.replace(/
/gi,"\n").replace(/<\/?[a-z0-9-_]+[^>]*>/gi,"").replace(c,function(i,u){return m[u]}).replace(/&#?([0-9]+);/gi,function(i,u){var s=parseInt(u,10);return String.fromCharCode(s)}).replace(/&#x?([0-9a-f]+);/gi,function(i,u){var s=parseInt(u,16);return String.fromCharCode(s)})}return g}(),k=r.buildQueryString=function(){function g(l){return Object.keys(l).map(function(c){return encodeURIComponent(c)+"="+encodeURIComponent(l[c])}).join("&")}return g}()},69214:function(T,r){"use strict";r.__esModule=!0,r.throttle=r.sleep=r.debounce=void 0;/** * @file * @copyright 2020 Aleksej Komarov * @license MIT - */var n=r.debounce=function(){function t(o,f,b){b===void 0&&(b=!1);var y;return function(){for(var B=arguments.length,k=new Array(B),g=0;g=f)o.apply(null,g),b=c;else{var m;y=setTimeout(function(){return B.apply(void 0,g)},f-(c-((m=b)!=null?m:0)))}}return B}()}return t}()},97450:function(T,r,n){"use strict";r.__esModule=!0,r.vecSubtract=r.vecScale=r.vecNormalize=r.vecMultiply=r.vecLength=r.vecInverse=r.vecDivide=r.vecAdd=void 0;var e=n(88510);/** + */var n=r.debounce=function(){function t(o,f,b){b===void 0&&(b=!1);var S;return function(){for(var B=arguments.length,k=new Array(B),g=0;g=f)o.apply(null,g),b=c;else{var m;S=setTimeout(function(){return B.apply(void 0,g)},f-(c-((m=b)!=null?m:0)))}}return B}()}return t}()},97450:function(T,r,n){"use strict";r.__esModule=!0,r.vecSubtract=r.vecScale=r.vecNormalize=r.vecMultiply=r.vecLength=r.vecInverse=r.vecDivide=r.vecAdd=void 0;var e=n(88510);/** * N-dimensional vector manipulation functions. * * Vectors are plain number arrays, i.e. [x, y, z]. @@ -62,11 +62,11 @@ * @file * @copyright 2020 Aleksej Komarov * @license MIT - */var a=function(u,s){return u+s},t=function(u,s){return u-s},o=function(u,s){return u*s},f=function(u,s){return u/s},b=r.vecAdd=function(){function i(){for(var u=arguments.length,s=new Array(u),d=0;d0&&(N.style=x),N}return C}(),v=r.computeBoxClassName=function(){function C(p){var N=p.textColor||p.color,V=p.backgroundColor;return(0,e.classes)([g(N)&&"color-"+N,g(V)&&"color-bg-"+V])}return C}(),h=r.Box=function(){function C(p){var N=p.as,V=N===void 0?"div":N,S=p.className,I=p.children,L=b(p,f);if(typeof I=="function")return I(d(p));var w=typeof S=="string"?S+" "+v(L):v(L),A=d(L);return(0,a.createVNode)(t.VNodeFlags.HtmlElement,V,w,I,t.ChildFlags.UnknownChildren,A)}return C}();h.defaultHooks=e.pureComponentHooks},96184:function(T,r,n){"use strict";r.__esModule=!0,r.ButtonInput=r.ButtonConfirm=r.ButtonCheckbox=r.Button=void 0;var e=n(89005),a=n(35840),t=n(92986),o=n(9394),f=n(55937),b=n(1331),y=n(62147),B=["className","fluid","translucent","icon","iconRotation","iconSpin","color","textColor","disabled","selected","tooltip","tooltipPosition","ellipsis","compact","circular","content","iconColor","iconRight","iconStyle","children","onclick","onClick","multiLine"],k=["checked"],g=["confirmContent","confirmColor","confirmIcon","icon","color","content","onClick"],l=["fluid","content","icon","iconRotation","iconSpin","tooltip","tooltipPosition","color","disabled","multiLine"];/** + */function b(h,p){if(h==null)return{};var N={};for(var V in h)if({}.hasOwnProperty.call(h,V)){if(p.includes(V))continue;N[V]=h[V]}return N}var S=r.unit=function(){function h(p){if(typeof p=="string")return p.endsWith("px")?parseFloat(p)/12+"rem":p;if(typeof p=="number")return p+"rem"}return h}(),B=r.halfUnit=function(){function h(p){if(typeof p=="string")return S(p);if(typeof p=="number")return S(p*.5)}return h}(),k=function(p){return!g(p)},g=function(p){if(typeof p=="string")return o.CSS_COLORS.includes(p)},l=function(p){return function(N,V){(typeof V=="number"||typeof V=="string")&&(N[p]=V)}},c=function(p,N){return function(V,y){(typeof y=="number"||typeof y=="string")&&(V[p]=N(y))}},m=function(p,N){return function(V,y){y&&(V[p]=N)}},i=function(p,N,V){return function(y,I){if(typeof I=="number"||typeof I=="string")for(var L=0;L0&&(N.style=x),N}return h}(),v=r.computeBoxClassName=function(){function h(p){var N=p.textColor||p.color,V=p.backgroundColor;return(0,e.classes)([g(N)&&"color-"+N,g(V)&&"color-bg-"+V])}return h}(),C=r.Box=function(){function h(p){var N=p.as,V=N===void 0?"div":N,y=p.className,I=p.children,L=b(p,f);if(typeof I=="function")return I(d(p));var w=typeof y=="string"?y+" "+v(L):v(L),A=d(L);return(0,a.createVNode)(t.VNodeFlags.HtmlElement,V,w,I,t.ChildFlags.UnknownChildren,A)}return h}();C.defaultHooks=e.pureComponentHooks},96184:function(T,r,n){"use strict";r.__esModule=!0,r.ButtonInput=r.ButtonConfirm=r.ButtonCheckbox=r.Button=void 0;var e=n(89005),a=n(35840),t=n(92986),o=n(9394),f=n(55937),b=n(1331),S=n(62147),B=["className","fluid","translucent","icon","iconRotation","iconSpin","color","textColor","disabled","selected","tooltip","tooltipPosition","ellipsis","compact","circular","content","iconColor","iconRight","iconStyle","children","onclick","onClick","multiLine"],k=["checked"],g=["confirmContent","confirmColor","confirmIcon","icon","color","content","onClick"],l=["fluid","content","icon","iconRotation","iconSpin","tooltip","tooltipPosition","color","disabled","multiLine"];/** * @file * @copyright 2020 Aleksej Komarov * @license MIT - */function c(C,p){C.prototype=Object.create(p.prototype),C.prototype.constructor=C,m(C,p)}function m(C,p){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(N,V){return N.__proto__=V,N},m(C,p)}function i(C,p){if(C==null)return{};var N={};for(var V in C)if({}.hasOwnProperty.call(C,V)){if(p.includes(V))continue;N[V]=C[V]}return N}var u=(0,o.createLogger)("Button"),s=r.Button=function(){function C(p){var N=p.className,V=p.fluid,S=p.translucent,I=p.icon,L=p.iconRotation,w=p.iconSpin,A=p.color,x=p.textColor,E=p.disabled,P=p.selected,D=p.tooltip,M=p.tooltipPosition,R=p.ellipsis,O=p.compact,F=p.circular,_=p.content,U=p.iconColor,z=p.iconRight,$=p.iconStyle,G=p.children,X=p.onclick,J=p.onClick,se=p.multiLine,ie=i(p,B),me=!!(_||G);X&&u.warn("Lowercase 'onclick' is not supported on Button and lowercase prop names are discouraged in general. Please use a camelCase'onClick' instead and read: https://infernojs.org/docs/guides/event-handling"),ie.onClick=function(re){!E&&J&&J(re)};var q=(0,e.normalizeProps)((0,e.createComponentVNode)(2,f.Box,Object.assign({className:(0,a.classes)(["Button",V&&"Button--fluid",E&&"Button--disabled"+(S?"--translucent":""),P&&"Button--selected"+(S?"--translucent":""),me&&"Button--hasContent",R&&"Button--ellipsis",F&&"Button--circular",O&&"Button--compact",z&&"Button--iconRight",se&&"Button--multiLine",A&&typeof A=="string"?"Button--color--"+A+(S?"--translucent":""):"Button--color--default"+(S?"--translucent":""),N]),tabIndex:!E&&"0",color:x,onKeyDown:function(){function re(ae){var le=window.event?ae.which:ae.keyCode;if(le===t.KEY_SPACE||le===t.KEY_ENTER){ae.preventDefault(),!E&&J&&J(ae);return}if(le===t.KEY_ESCAPE){ae.preventDefault();return}}return re}()},ie,{children:[I&&!z&&(0,e.createComponentVNode)(2,b.Icon,{name:I,color:U,rotation:L,spin:w,style:$}),_,G,I&&z&&(0,e.createComponentVNode)(2,b.Icon,{name:I,color:U,rotation:L,spin:w,style:$})]})));return D&&(q=(0,e.createComponentVNode)(2,y.Tooltip,{content:D,position:M,children:q})),q}return C}();s.defaultHooks=a.pureComponentHooks;var d=r.ButtonCheckbox=function(){function C(p){var N=p.checked,V=i(p,k);return(0,e.normalizeProps)((0,e.createComponentVNode)(2,s,Object.assign({color:"transparent",icon:N?"check-square-o":"square-o",selected:N},V)))}return C}();s.Checkbox=d;var v=r.ButtonConfirm=function(C){function p(){var V;return V=C.call(this)||this,V.handleClick=function(){V.state.clickedOnce&&V.setClickedOnce(!1)},V.state={clickedOnce:!1},V}c(p,C);var N=p.prototype;return N.setClickedOnce=function(){function V(S){var I=this;this.setState({clickedOnce:S}),S?setTimeout(function(){return window.addEventListener("click",I.handleClick)}):window.removeEventListener("click",this.handleClick)}return V}(),N.render=function(){function V(){var S=this,I=this.props,L=I.confirmContent,w=L===void 0?"Confirm?":L,A=I.confirmColor,x=A===void 0?"bad":A,E=I.confirmIcon,P=I.icon,D=I.color,M=I.content,R=I.onClick,O=i(I,g);return(0,e.normalizeProps)((0,e.createComponentVNode)(2,s,Object.assign({content:this.state.clickedOnce?w:M,icon:this.state.clickedOnce?E:P,color:this.state.clickedOnce?x:D,onClick:function(){function F(_){return S.state.clickedOnce?R==null?void 0:R(_):S.setClickedOnce(!0)}return F}()},O)))}return V}(),p}(e.Component);s.Confirm=v;var h=r.ButtonInput=function(C){function p(){var V;return V=C.call(this)||this,V.inputRef=void 0,V.inputRef=(0,e.createRef)(),V.state={inInput:!1},V}c(p,C);var N=p.prototype;return N.setInInput=function(){function V(S){var I=this.props.disabled;if(!I&&(this.setState({inInput:S}),this.inputRef)){var L=this.inputRef.current;if(S){L.value=this.props.currentValue||"";try{L.focus(),L.select()}catch(w){}}}}return V}(),N.commitResult=function(){function V(S){if(this.inputRef){var I=this.inputRef.current,L=I.value!=="";if(L){this.props.onCommit(S,I.value);return}else{if(!this.props.defaultValue)return;this.props.onCommit(S,this.props.defaultValue)}}}return V}(),N.render=function(){function V(){var S=this,I=this.props,L=I.fluid,w=I.content,A=I.icon,x=I.iconRotation,E=I.iconSpin,P=I.tooltip,D=I.tooltipPosition,M=I.color,R=M===void 0?"default":M,O=I.disabled,F=I.multiLine,_=i(I,l),U=(0,e.normalizeProps)((0,e.createComponentVNode)(2,f.Box,Object.assign({className:(0,a.classes)(["Button",L&&"Button--fluid",O&&"Button--disabled","Button--color--"+R,F+"Button--multiLine"])},_,{onClick:function(){function z(){return S.setInInput(!0)}return z}(),children:[A&&(0,e.createComponentVNode)(2,b.Icon,{name:A,rotation:x,spin:E}),(0,e.createVNode)(1,"div",null,w,0),(0,e.createVNode)(64,"input","NumberInput__input",null,1,{style:{display:this.state.inInput?void 0:"none","text-align":"left"},onBlur:function(){function z($){S.state.inInput&&(S.setInInput(!1),S.commitResult($))}return z}(),onKeyDown:function(){function z($){if($.keyCode===t.KEY_ENTER){S.setInInput(!1),S.commitResult($);return}$.keyCode===t.KEY_ESCAPE&&S.setInInput(!1)}return z}()},null,this.inputRef)]})));return P&&(U=(0,e.createComponentVNode)(2,y.Tooltip,{content:P,position:D,children:U})),U}return V}(),p}(e.Component);s.Input=h},18982:function(T,r,n){"use strict";r.__esModule=!0,r.ByondUi=void 0;var e=n(89005),a=n(35840),t=n(69214),o=n(9394),f=n(55937),b=["params"],y=["params"],B=["parent","params"];function k(v,h){if(v==null)return{};var C={};for(var p in v)if({}.hasOwnProperty.call(v,p)){if(h.includes(p))continue;C[p]=v[p]}return C}function g(v,h){v.prototype=Object.create(h.prototype),v.prototype.constructor=v,l(v,h)}function l(v,h){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(C,p){return C.__proto__=p,C},l(v,h)}/** + */function c(h,p){h.prototype=Object.create(p.prototype),h.prototype.constructor=h,m(h,p)}function m(h,p){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(N,V){return N.__proto__=V,N},m(h,p)}function i(h,p){if(h==null)return{};var N={};for(var V in h)if({}.hasOwnProperty.call(h,V)){if(p.includes(V))continue;N[V]=h[V]}return N}var u=(0,o.createLogger)("Button"),s=r.Button=function(){function h(p){var N=p.className,V=p.fluid,y=p.translucent,I=p.icon,L=p.iconRotation,w=p.iconSpin,A=p.color,x=p.textColor,E=p.disabled,P=p.selected,D=p.tooltip,M=p.tooltipPosition,R=p.ellipsis,O=p.compact,F=p.circular,_=p.content,U=p.iconColor,z=p.iconRight,$=p.iconStyle,G=p.children,X=p.onclick,J=p.onClick,se=p.multiLine,ie=i(p,B),me=!!(_||G);X&&u.warn("Lowercase 'onclick' is not supported on Button and lowercase prop names are discouraged in general. Please use a camelCase'onClick' instead and read: https://infernojs.org/docs/guides/event-handling"),ie.onClick=function(re){!E&&J&&J(re)};var q=(0,e.normalizeProps)((0,e.createComponentVNode)(2,f.Box,Object.assign({className:(0,a.classes)(["Button",V&&"Button--fluid",E&&"Button--disabled"+(y?"--translucent":""),P&&"Button--selected"+(y?"--translucent":""),me&&"Button--hasContent",R&&"Button--ellipsis",F&&"Button--circular",O&&"Button--compact",z&&"Button--iconRight",se&&"Button--multiLine",A&&typeof A=="string"?"Button--color--"+A+(y?"--translucent":""):"Button--color--default"+(y?"--translucent":""),N]),tabIndex:!E&&"0",color:x,onKeyDown:function(){function re(ae){var le=window.event?ae.which:ae.keyCode;if(le===t.KEY_SPACE||le===t.KEY_ENTER){ae.preventDefault(),!E&&J&&J(ae);return}if(le===t.KEY_ESCAPE){ae.preventDefault();return}}return re}()},ie,{children:[I&&!z&&(0,e.createComponentVNode)(2,b.Icon,{name:I,color:U,rotation:L,spin:w,style:$}),_,G,I&&z&&(0,e.createComponentVNode)(2,b.Icon,{name:I,color:U,rotation:L,spin:w,style:$})]})));return D&&(q=(0,e.createComponentVNode)(2,S.Tooltip,{content:D,position:M,children:q})),q}return h}();s.defaultHooks=a.pureComponentHooks;var d=r.ButtonCheckbox=function(){function h(p){var N=p.checked,V=i(p,k);return(0,e.normalizeProps)((0,e.createComponentVNode)(2,s,Object.assign({color:"transparent",icon:N?"check-square-o":"square-o",selected:N},V)))}return h}();s.Checkbox=d;var v=r.ButtonConfirm=function(h){function p(){var V;return V=h.call(this)||this,V.handleClick=function(){V.state.clickedOnce&&V.setClickedOnce(!1)},V.state={clickedOnce:!1},V}c(p,h);var N=p.prototype;return N.setClickedOnce=function(){function V(y){var I=this;this.setState({clickedOnce:y}),y?setTimeout(function(){return window.addEventListener("click",I.handleClick)}):window.removeEventListener("click",this.handleClick)}return V}(),N.render=function(){function V(){var y=this,I=this.props,L=I.confirmContent,w=L===void 0?"Confirm?":L,A=I.confirmColor,x=A===void 0?"bad":A,E=I.confirmIcon,P=I.icon,D=I.color,M=I.content,R=I.onClick,O=i(I,g);return(0,e.normalizeProps)((0,e.createComponentVNode)(2,s,Object.assign({content:this.state.clickedOnce?w:M,icon:this.state.clickedOnce?E:P,color:this.state.clickedOnce?x:D,onClick:function(){function F(_){return y.state.clickedOnce?R==null?void 0:R(_):y.setClickedOnce(!0)}return F}()},O)))}return V}(),p}(e.Component);s.Confirm=v;var C=r.ButtonInput=function(h){function p(){var V;return V=h.call(this)||this,V.inputRef=void 0,V.inputRef=(0,e.createRef)(),V.state={inInput:!1},V}c(p,h);var N=p.prototype;return N.setInInput=function(){function V(y){var I=this.props.disabled;if(!I&&(this.setState({inInput:y}),this.inputRef)){var L=this.inputRef.current;if(y){L.value=this.props.currentValue||"";try{L.focus(),L.select()}catch(w){}}}}return V}(),N.commitResult=function(){function V(y){if(this.inputRef){var I=this.inputRef.current,L=I.value!=="";if(L){this.props.onCommit(y,I.value);return}else{if(!this.props.defaultValue)return;this.props.onCommit(y,this.props.defaultValue)}}}return V}(),N.render=function(){function V(){var y=this,I=this.props,L=I.fluid,w=I.content,A=I.icon,x=I.iconRotation,E=I.iconSpin,P=I.tooltip,D=I.tooltipPosition,M=I.color,R=M===void 0?"default":M,O=I.disabled,F=I.multiLine,_=i(I,l),U=(0,e.normalizeProps)((0,e.createComponentVNode)(2,f.Box,Object.assign({className:(0,a.classes)(["Button",L&&"Button--fluid",O&&"Button--disabled","Button--color--"+R,F+"Button--multiLine"])},_,{onClick:function(){function z(){return y.setInInput(!0)}return z}(),children:[A&&(0,e.createComponentVNode)(2,b.Icon,{name:A,rotation:x,spin:E}),(0,e.createVNode)(1,"div",null,w,0),(0,e.createVNode)(64,"input","NumberInput__input",null,1,{style:{display:this.state.inInput?void 0:"none","text-align":"left"},onBlur:function(){function z($){y.state.inInput&&(y.setInInput(!1),y.commitResult($))}return z}(),onKeyDown:function(){function z($){if($.keyCode===t.KEY_ENTER){y.setInInput(!1),y.commitResult($);return}$.keyCode===t.KEY_ESCAPE&&y.setInInput(!1)}return z}()},null,this.inputRef)]})));return P&&(U=(0,e.createComponentVNode)(2,S.Tooltip,{content:P,position:D,children:U})),U}return V}(),p}(e.Component);s.Input=C},18982:function(T,r,n){"use strict";r.__esModule=!0,r.ByondUi=void 0;var e=n(89005),a=n(35840),t=n(69214),o=n(9394),f=n(55937),b=["params"],S=["params"],B=["parent","params"];function k(v,C){if(v==null)return{};var h={};for(var p in v)if({}.hasOwnProperty.call(v,p)){if(C.includes(p))continue;h[p]=v[p]}return h}function g(v,C){v.prototype=Object.create(C.prototype),v.prototype.constructor=v,l(v,C)}function l(v,C){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(h,p){return h.__proto__=p,h},l(v,C)}/** * @file * @copyright 2020 Aleksej Komarov * @license MIT -*/var c=(0,o.createLogger)("ByondUi"),m=[],i=function(h){var C=m.length;m.push(null);var p=h||"byondui_"+C;return c.log("allocated '"+p+"'"),{render:function(){function N(V){c.log("unmounting '"+p+"'"),m[C]=null,Byond.winset(p,{parent:""}),c.log("rendering '"+p+"'"),m[C]=p,Byond.winset(p,V)}return N}(),unmount:function(){function N(){c.log("unmounting '"+p+"'"),m[C]=null,Byond.winset(p,{parent:""})}return N}()}};window.addEventListener("beforeunload",function(){for(var v=0;v0){var M=D[0],R=D[D.length-1];D.push([P[0]+x,R[1]]),D.push([P[0]+x,-x]),D.push([-x,-x]),D.push([-x,M[1]])}var O=g(D);return(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Box,Object.assign({position:"relative"},E,{children:function(){function F(_){return(0,e.normalizeProps)((0,e.createVNode)(1,"div",null,(0,e.createVNode)(32,"svg",null,(0,e.createVNode)(32,"polyline",null,null,1,{transform:"scale(1, -1) translate(0, -"+P[1]+")",fill:I,stroke:w,"stroke-width":x,points:O}),2,{viewBox:"0 0 "+P[0]+" "+P[1],preserveAspectRatio:"none",style:{position:"absolute",top:0,left:0,right:0,bottom:0,overflow:"hidden"}}),2,Object.assign({},_),null,v.ref))}return F}()})))}return d}(),u}(e.Component);l.defaultHooks=t.pureComponentHooks;var c=function(u){return null},m=r.Chart={Line:l}},4796:function(T,r,n){"use strict";r.__esModule=!0,r.Collapsible=void 0;var e=n(89005),a=n(55937),t=n(96184),o=["children","color","title","buttons","contentStyle"];function f(k,g){if(k==null)return{};var l={};for(var c in k)if({}.hasOwnProperty.call(k,c)){if(g.includes(c))continue;l[c]=k[c]}return l}function b(k,g){k.prototype=Object.create(g.prototype),k.prototype.constructor=k,y(k,g)}function y(k,g){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(l,c){return l.__proto__=c,l},y(k,g)}/** +*/var k=function(u,s,d,v){if(u.length===0)return[];var C=(0,a.zipWith)(Math.min).apply(void 0,u),h=(0,a.zipWith)(Math.max).apply(void 0,u);d!==void 0&&(C[0]=d[0],h[0]=d[1]),v!==void 0&&(C[1]=v[0],h[1]=v[1]);var p=(0,a.map)(function(N){return(0,a.zipWith)(function(V,y,I,L){return(V-y)/(I-y)*L})(N,C,h,s)})(u);return p},g=function(u){for(var s="",d=0;d0){var M=D[0],R=D[D.length-1];D.push([P[0]+x,R[1]]),D.push([P[0]+x,-x]),D.push([-x,-x]),D.push([-x,M[1]])}var O=g(D);return(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Box,Object.assign({position:"relative"},E,{children:function(){function F(_){return(0,e.normalizeProps)((0,e.createVNode)(1,"div",null,(0,e.createVNode)(32,"svg",null,(0,e.createVNode)(32,"polyline",null,null,1,{transform:"scale(1, -1) translate(0, -"+P[1]+")",fill:I,stroke:w,"stroke-width":x,points:O}),2,{viewBox:"0 0 "+P[0]+" "+P[1],preserveAspectRatio:"none",style:{position:"absolute",top:0,left:0,right:0,bottom:0,overflow:"hidden"}}),2,Object.assign({},_),null,v.ref))}return F}()})))}return d}(),u}(e.Component);l.defaultHooks=t.pureComponentHooks;var c=function(u){return null},m=r.Chart={Line:l}},4796:function(T,r,n){"use strict";r.__esModule=!0,r.Collapsible=void 0;var e=n(89005),a=n(55937),t=n(96184),o=["children","color","title","buttons","contentStyle"];function f(k,g){if(k==null)return{};var l={};for(var c in k)if({}.hasOwnProperty.call(k,c)){if(g.includes(c))continue;l[c]=k[c]}return l}function b(k,g){k.prototype=Object.create(g.prototype),k.prototype.constructor=k,S(k,g)}function S(k,g){return S=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(l,c){return l.__proto__=c,l},S(k,g)}/** * @file * @copyright 2020 Aleksej Komarov * @license MIT -*/var B=r.Collapsible=function(k){function g(c){var m;m=k.call(this,c)||this;var i=c.open;return m.state={open:i||!1},m}b(g,k);var l=g.prototype;return l.render=function(){function c(){var m=this,i=this.props,u=this.state.open,s=i.children,d=i.color,v=d===void 0?"default":d,h=i.title,C=i.buttons,p=i.contentStyle,N=f(i,o);return(0,e.createComponentVNode)(2,a.Box,{className:"Collapsible",children:[(0,e.createVNode)(1,"div","Table",[(0,e.createVNode)(1,"div","Table__cell",(0,e.normalizeProps)((0,e.createComponentVNode)(2,t.Button,Object.assign({fluid:!0,color:v,icon:u?"chevron-down":"chevron-right",onClick:function(){function V(){return m.setState({open:!u})}return V}()},N,{children:h}))),2),C&&(0,e.createVNode)(1,"div","Table__cell Table__cell--collapsing",C,0)],0),u&&(0,e.createComponentVNode)(2,a.Box,{mt:1,style:p,children:s})]})}return c}(),g}(e.Component)},88894:function(T,r,n){"use strict";r.__esModule=!0,r.ColorBox=void 0;var e=n(89005),a=n(35840),t=n(55937),o=["content","children","className","color","backgroundColor"];/** +*/var B=r.Collapsible=function(k){function g(c){var m;m=k.call(this,c)||this;var i=c.open;return m.state={open:i||!1},m}b(g,k);var l=g.prototype;return l.render=function(){function c(){var m=this,i=this.props,u=this.state.open,s=i.children,d=i.color,v=d===void 0?"default":d,C=i.title,h=i.buttons,p=i.contentStyle,N=f(i,o);return(0,e.createComponentVNode)(2,a.Box,{className:"Collapsible",children:[(0,e.createVNode)(1,"div","Table",[(0,e.createVNode)(1,"div","Table__cell",(0,e.normalizeProps)((0,e.createComponentVNode)(2,t.Button,Object.assign({fluid:!0,color:v,icon:u?"chevron-down":"chevron-right",onClick:function(){function V(){return m.setState({open:!u})}return V}()},N,{children:C}))),2),h&&(0,e.createVNode)(1,"div","Table__cell Table__cell--collapsing",h,0)],0),u&&(0,e.createComponentVNode)(2,a.Box,{mt:1,style:p,children:s})]})}return c}(),g}(e.Component)},88894:function(T,r,n){"use strict";r.__esModule=!0,r.ColorBox=void 0;var e=n(89005),a=n(35840),t=n(55937),o=["content","children","className","color","backgroundColor"];/** * @file * @copyright 2020 Aleksej Komarov * @license MIT - */function f(y,B){if(y==null)return{};var k={};for(var g in y)if({}.hasOwnProperty.call(y,g)){if(B.includes(g))continue;k[g]=y[g]}return k}var b=r.ColorBox=function(){function y(B){var k=B.content,g=B.children,l=B.className,c=B.color,m=B.backgroundColor,i=f(B,o);return i.color=k?null:"transparent",i.backgroundColor=c||m,(0,e.normalizeProps)((0,e.createVNode)(1,"div",(0,a.classes)(["ColorBox",l,(0,t.computeBoxClassName)(i)]),k||".",0,Object.assign({},(0,t.computeBoxProps)(i))))}return y}();b.defaultHooks=a.pureComponentHooks},73379:function(T,r,n){"use strict";r.__esModule=!0,r.Countdown=void 0;var e=n(89005),a=n(55937),t=["format"];function o(B,k){if(B==null)return{};var g={};for(var l in B)if({}.hasOwnProperty.call(B,l)){if(k.includes(l))continue;g[l]=B[l]}return g}function f(B,k){B.prototype=Object.create(k.prototype),B.prototype.constructor=B,b(B,k)}function b(B,k){return b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(g,l){return g.__proto__=l,g},b(B,k)}var y=r.Countdown=function(B){function k(l){var c;return c=B.call(this,l)||this,c.timer=null,c.state={value:Math.max(l.timeLeft*100,0)},c}f(k,B);var g=k.prototype;return g.tick=function(){function l(){var c=Math.max(this.state.value-this.props.rate,0);c<=0&&clearInterval(this.timer),this.setState(function(m){return{value:c}})}return l}(),g.componentDidMount=function(){function l(){var c=this;this.timer=setInterval(function(){return c.tick()},this.props.rate)}return l}(),g.componentWillUnmount=function(){function l(){clearInterval(this.timer)}return l}(),g.componentDidUpdate=function(){function l(c){var m=this;this.props.current!==c.current&&this.setState(function(i){return{value:Math.max(m.props.timeLeft*100,0)}}),this.timer||this.componentDidMount()}return l}(),g.render=function(){function l(){var c=this.props,m=c.format,i=o(c,t),u=new Date(this.state.value).toISOString().slice(11,19);return(0,e.normalizeProps)((0,e.createComponentVNode)(2,a.Box,Object.assign({as:"span"},i,{children:m?m(this.state.value,u):u})))}return l}(),k}(e.Component);y.defaultProps={rate:1e3}},61940:function(T,r,n){"use strict";r.__esModule=!0,r.Dimmer=void 0;var e=n(89005),a=n(35840),t=n(55937),o=["className","children"];/** + */function f(S,B){if(S==null)return{};var k={};for(var g in S)if({}.hasOwnProperty.call(S,g)){if(B.includes(g))continue;k[g]=S[g]}return k}var b=r.ColorBox=function(){function S(B){var k=B.content,g=B.children,l=B.className,c=B.color,m=B.backgroundColor,i=f(B,o);return i.color=k?null:"transparent",i.backgroundColor=c||m,(0,e.normalizeProps)((0,e.createVNode)(1,"div",(0,a.classes)(["ColorBox",l,(0,t.computeBoxClassName)(i)]),k||".",0,Object.assign({},(0,t.computeBoxProps)(i))))}return S}();b.defaultHooks=a.pureComponentHooks},73379:function(T,r,n){"use strict";r.__esModule=!0,r.Countdown=void 0;var e=n(89005),a=n(55937),t=["format"];function o(B,k){if(B==null)return{};var g={};for(var l in B)if({}.hasOwnProperty.call(B,l)){if(k.includes(l))continue;g[l]=B[l]}return g}function f(B,k){B.prototype=Object.create(k.prototype),B.prototype.constructor=B,b(B,k)}function b(B,k){return b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(g,l){return g.__proto__=l,g},b(B,k)}var S=r.Countdown=function(B){function k(l){var c;return c=B.call(this,l)||this,c.timer=null,c.state={value:Math.max(l.timeLeft*100,0)},c}f(k,B);var g=k.prototype;return g.tick=function(){function l(){var c=Math.max(this.state.value-this.props.rate,0);c<=0&&clearInterval(this.timer),this.setState(function(m){return{value:c}})}return l}(),g.componentDidMount=function(){function l(){var c=this;this.timer=setInterval(function(){return c.tick()},this.props.rate)}return l}(),g.componentWillUnmount=function(){function l(){clearInterval(this.timer)}return l}(),g.componentDidUpdate=function(){function l(c){var m=this;this.props.current!==c.current&&this.setState(function(i){return{value:Math.max(m.props.timeLeft*100,0)}}),this.timer||this.componentDidMount()}return l}(),g.render=function(){function l(){var c=this.props,m=c.format,i=o(c,t),u=new Date(this.state.value).toISOString().slice(11,19);return(0,e.normalizeProps)((0,e.createComponentVNode)(2,a.Box,Object.assign({as:"span"},i,{children:m?m(this.state.value,u):u})))}return l}(),k}(e.Component);S.defaultProps={rate:1e3}},61940:function(T,r,n){"use strict";r.__esModule=!0,r.Dimmer=void 0;var e=n(89005),a=n(35840),t=n(55937),o=["className","children"];/** * @file * @copyright 2020 Aleksej Komarov * @license MIT - */function f(y,B){if(y==null)return{};var k={};for(var g in y)if({}.hasOwnProperty.call(y,g)){if(B.includes(g))continue;k[g]=y[g]}return k}var b=r.Dimmer=function(){function y(B){var k=B.className,g=B.children,l=f(B,o);return(0,e.normalizeProps)((0,e.createComponentVNode)(2,t.Box,Object.assign({className:(0,a.classes)(["Dimmer"].concat(k))},l,{children:(0,e.createVNode)(1,"div","Dimmer__inner",g,0)})))}return y}()},13605:function(T,r,n){"use strict";r.__esModule=!0,r.Divider=void 0;var e=n(89005),a=n(35840);/** + */function f(S,B){if(S==null)return{};var k={};for(var g in S)if({}.hasOwnProperty.call(S,g)){if(B.includes(g))continue;k[g]=S[g]}return k}var b=r.Dimmer=function(){function S(B){var k=B.className,g=B.children,l=f(B,o);return(0,e.normalizeProps)((0,e.createComponentVNode)(2,t.Box,Object.assign({className:(0,a.classes)(["Dimmer"].concat(k))},l,{children:(0,e.createVNode)(1,"div","Dimmer__inner",g,0)})))}return S}()},13605:function(T,r,n){"use strict";r.__esModule=!0,r.Divider=void 0;var e=n(89005),a=n(35840);/** * @file * @copyright 2020 Aleksej Komarov * @license MIT - */var t=r.Divider=function(){function o(f){var b=f.vertical,y=f.hidden;return(0,e.createVNode)(1,"div",(0,a.classes)(["Divider",y&&"Divider--hidden",b?"Divider--vertical":"Divider--horizontal"]))}return o}()},60218:function(T,r,n){"use strict";r.__esModule=!0,r.DmIcon=void 0;var e=n(89005),a=n(79140),t=n(46085),o=n(91225),f=["className","direction","fallback","frame","icon_state","movement"];function b(u,s){if(u==null)return{};var d={};for(var v in u)if({}.hasOwnProperty.call(u,v)){if(s.includes(v))continue;d[v]=u[v]}return d}function y(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */y=function(){return s};var u,s={},d=Object.prototype,v=d.hasOwnProperty,h=Object.defineProperty||function(q,re,ae){q[re]=ae.value},C=typeof Symbol=="function"?Symbol:{},p=C.iterator||"@@iterator",N=C.asyncIterator||"@@asyncIterator",V=C.toStringTag||"@@toStringTag";function S(q,re,ae){return Object.defineProperty(q,re,{value:ae,enumerable:!0,configurable:!0,writable:!0}),q[re]}try{S({},"")}catch(q){S=function(ae,le,Z){return ae[le]=Z}}function I(q,re,ae,le){var Z=re&&re.prototype instanceof D?re:D,ne=Object.create(Z.prototype),te=new ie(le||[]);return h(ne,"_invoke",{value:G(q,ae,te)}),ne}function L(q,re,ae){try{return{type:"normal",arg:q.call(re,ae)}}catch(le){return{type:"throw",arg:le}}}s.wrap=I;var w="suspendedStart",A="suspendedYield",x="executing",E="completed",P={};function D(){}function M(){}function R(){}var O={};S(O,p,function(){return this});var F=Object.getPrototypeOf,_=F&&F(F(me([])));_&&_!==d&&v.call(_,p)&&(O=_);var U=R.prototype=D.prototype=Object.create(O);function z(q){["next","throw","return"].forEach(function(re){S(q,re,function(ae){return this._invoke(re,ae)})})}function $(q,re){function ae(Z,ne,te,fe){var pe=L(q[Z],q,ne);if(pe.type!=="throw"){var ce=pe.arg,Ve=ce.value;return Ve&&typeof Ve=="object"&&v.call(Ve,"__await")?re.resolve(Ve.__await).then(function(Ce){ae("next",Ce,te,fe)},function(Ce){ae("throw",Ce,te,fe)}):re.resolve(Ve).then(function(Ce){ce.value=Ce,te(ce)},function(Ce){return ae("throw",Ce,te,fe)})}fe(pe.arg)}var le;h(this,"_invoke",{value:function(){function Z(ne,te){function fe(){return new re(function(pe,ce){ae(ne,te,pe,ce)})}return le=le?le.then(fe,fe):fe()}return Z}()})}function G(q,re,ae){var le=w;return function(Z,ne){if(le===x)throw Error("Generator is already running");if(le===E){if(Z==="throw")throw ne;return{value:u,done:!0}}for(ae.method=Z,ae.arg=ne;;){var te=ae.delegate;if(te){var fe=X(te,ae);if(fe){if(fe===P)continue;return fe}}if(ae.method==="next")ae.sent=ae._sent=ae.arg;else if(ae.method==="throw"){if(le===w)throw le=E,ae.arg;ae.dispatchException(ae.arg)}else ae.method==="return"&&ae.abrupt("return",ae.arg);le=x;var pe=L(q,re,ae);if(pe.type==="normal"){if(le=ae.done?E:A,pe.arg===P)continue;return{value:pe.arg,done:ae.done}}pe.type==="throw"&&(le=E,ae.method="throw",ae.arg=pe.arg)}}}function X(q,re){var ae=re.method,le=q.iterator[ae];if(le===u)return re.delegate=null,ae==="throw"&&q.iterator.return&&(re.method="return",re.arg=u,X(q,re),re.method==="throw")||ae!=="return"&&(re.method="throw",re.arg=new TypeError("The iterator does not provide a '"+ae+"' method")),P;var Z=L(le,q.iterator,re.arg);if(Z.type==="throw")return re.method="throw",re.arg=Z.arg,re.delegate=null,P;var ne=Z.arg;return ne?ne.done?(re[q.resultName]=ne.value,re.next=q.nextLoc,re.method!=="return"&&(re.method="next",re.arg=u),re.delegate=null,P):ne:(re.method="throw",re.arg=new TypeError("iterator result is not an object"),re.delegate=null,P)}function J(q){var re={tryLoc:q[0]};1 in q&&(re.catchLoc=q[1]),2 in q&&(re.finallyLoc=q[2],re.afterLoc=q[3]),this.tryEntries.push(re)}function se(q){var re=q.completion||{};re.type="normal",delete re.arg,q.completion=re}function ie(q){this.tryEntries=[{tryLoc:"root"}],q.forEach(J,this),this.reset(!0)}function me(q){if(q||q===""){var re=q[p];if(re)return re.call(q);if(typeof q.next=="function")return q;if(!isNaN(q.length)){var ae=-1,le=function(){function Z(){for(;++ae=0;--Z){var ne=this.tryEntries[Z],te=ne.completion;if(ne.tryLoc==="root")return le("end");if(ne.tryLoc<=this.prev){var fe=v.call(ne,"catchLoc"),pe=v.call(ne,"finallyLoc");if(fe&&pe){if(this.prev=0;--le){var Z=this.tryEntries[le];if(Z.tryLoc<=this.prev&&v.call(Z,"finallyLoc")&&this.prev=0;--ae){var le=this.tryEntries[ae];if(le.finallyLoc===re)return this.complete(le.completion,le.afterLoc),se(le),P}}return q}(),catch:function(){function q(re){for(var ae=this.tryEntries.length-1;ae>=0;--ae){var le=this.tryEntries[ae];if(le.tryLoc===re){var Z=le.completion;if(Z.type==="throw"){var ne=Z.arg;se(le)}return ne}}throw Error("illegal catch attempt")}return q}(),delegateYield:function(){function q(re,ae,le){return this.delegate={iterator:me(re),resultName:ae,nextLoc:le},this.method==="next"&&(this.arg=u),P}return q}()},s}function B(u,s,d,v,h,C,p){try{var N=u[C](p),V=N.value}catch(S){return void d(S)}N.done?s(V):Promise.resolve(V).then(v,h)}function k(u){return function(){var s=this,d=arguments;return new Promise(function(v,h){var C=u.apply(s,d);function p(V){B(C,v,h,p,N,"next",V)}function N(V){B(C,v,h,p,N,"throw",V)}p(void 0)})}}function g(u,s){u.prototype=Object.create(s.prototype),u.prototype.constructor=u,l(u,s)}function l(u,s){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(d,v){return d.__proto__=v,d},l(u,s)}var c=function(u){return u[u.NORTH=1]="NORTH",u[u.SOUTH=2]="SOUTH",u[u.EAST=4]="EAST",u[u.WEST=8]="WEST",u[u.NORTHEAST=5]="NORTHEAST",u[u.NORTHWEST=9]="NORTHWEST",u[u.SOUTHEAST=6]="SOUTHEAST",u[u.SOUTHWEST=10]="SOUTHWEST",u}(c||{}),m,i=r.DmIcon=function(u){function s(v){var h;return h=u.call(this,v)||this,h.state={iconRef:""},h}g(s,u);var d=s.prototype;return d.fetchRefMap=function(){var v=k(y().mark(function(){function C(){var p,N;return y().wrap(function(){function V(S){for(;;)switch(S.prev=S.next){case 0:return S.prev=0,S.next=3,(0,t.fetchRetry)((0,a.resolveAsset)("icon_ref_map.json"));case 3:return p=S.sent,S.next=6,p.json();case 6:N=S.sent,m=N,this.setState({iconRef:N[this.props.icon]||""}),S.next=14;break;case 11:return S.prev=11,S.t0=S.catch(0),S.abrupt("return");case 14:case"end":return S.stop()}}return V}(),C,this,[[0,11]])}return C}()));function h(){return v.apply(this,arguments)}return h}(),d.componentDidMount=function(){function v(){m?this.setState({iconRef:m[this.props.icon]}):this.fetchRefMap()}return v}(),d.componentDidUpdate=function(){function v(h){h.icon!==this.props.icon&&(m?this.setState({iconRef:m[this.props.icon]}):this.fetchRefMap())}return v}(),d.render=function(){function v(){var h=this.props,C=h.className,p=h.direction,N=p===void 0?c.SOUTH:p,V=h.fallback,S=h.frame,I=S===void 0?1:S,L=h.icon_state,w=h.movement,A=w===void 0?!1:w,x=b(h,f),E=this.state.iconRef,P=E+"?state="+L+"&dir="+N+"&movement="+!!A+"&frame="+I;return E?(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Image,Object.assign({fixErrors:!0,src:P},x))):V||null}return v}(),s}(e.Component)},20342:function(T,r,n){"use strict";r.__esModule=!0,r.DraggableControl=void 0;var e=n(89005),a=n(44879),t=n(35840),o=n(9474);function f(g,l){g.prototype=Object.create(l.prototype),g.prototype.constructor=g,b(g,l)}function b(g,l){return b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(c,m){return c.__proto__=m,c},b(g,l)}var y=400,B=function(l,c){return l.screenX*c[0]+l.screenY*c[1]},k=r.DraggableControl=function(g){function l(m){var i;return i=g.call(this,m)||this,i.inputRef=(0,e.createRef)(),i.state={originalValue:m.value,value:m.value,dragging:!1,editing:!1,origin:null,suppressingFlicker:!1},i.flickerTimer=null,i.suppressFlicker=function(){var u=i.props.suppressFlicker;u>0&&(i.setState({suppressingFlicker:!0}),clearTimeout(i.flickerTimer),i.flickerTimer=setTimeout(function(){return i.setState({suppressingFlicker:!1})},u))},i.handleDragStart=function(u){var s=i.props,d=s.value,v=s.dragMatrix,h=s.disabled,C=i.state.editing;C||h||(document.body.style["pointer-events"]="none",i.ref=u.currentTarget,i.setState({originalValue:d,dragging:!1,value:d,origin:B(u,v)}),i.timer=setTimeout(function(){i.setState({dragging:!0})},250),i.dragInterval=setInterval(function(){var p=i.state,N=p.dragging,V=p.value,S=i.props.onDrag;N&&S&&S(u,V)},i.props.updateRate||y),document.addEventListener("mousemove",i.handleDragMove),document.addEventListener("mouseup",i.handleDragEnd))},i.handleDragMove=function(u){var s,d=i.props,v=d.minValue,h=d.maxValue,C=d.step,p=d.dragMatrix,N=d.disabled;if(!N){var V=i.ref.offsetWidth/((h-v)/C),S=(s=i.props.stepPixelSize)!=null?s:V;typeof S=="function"&&(S=S(V)),i.setState(function(I){var L=Object.assign({},I),w=I.origin,A=B(u,p)-w;if(I.dragging){var x=Math.trunc(A/S);L.value=(0,a.clamp)(Math.floor(L.originalValue/C)*C+x*C,v,h)}else Math.abs(A)>4&&(L.dragging=!0);return L})}},i.handleDragEnd=function(u){var s=i.props,d=s.onChange,v=s.onDrag,h=i.state,C=h.dragging,p=h.value;if(document.body.style["pointer-events"]="auto",clearTimeout(i.timer),clearInterval(i.dragInterval),i.setState({originalValue:null,dragging:!1,editing:!C,origin:null}),document.removeEventListener("mousemove",i.handleDragMove),document.removeEventListener("mouseup",i.handleDragEnd),C)i.suppressFlicker(),d&&d(u,p),v&&v(u,p);else if(i.inputRef){var N=i.inputRef.current;N.value=p;try{N.focus(),N.select()}catch(V){}}},i}f(l,g);var c=l.prototype;return c.render=function(){function m(){var i=this,u=this.state,s=u.dragging,d=u.editing,v=u.value,h=u.suppressingFlicker,C=this.props,p=C.animated,N=C.value,V=C.unit,S=C.minValue,I=C.maxValue,L=C.format,w=C.onChange,A=C.onDrag,x=C.children,E=C.height,P=C.lineHeight,D=C.fontSize,M=C.disabled,R=N;(s||h)&&(R=v);var O=function(){function U(z){return z+(V?" "+V:"")}return U}(),F=p&&!s&&!h&&(0,e.createComponentVNode)(2,o.AnimatedNumber,{value:R,format:L,children:O})||O(L?L(R):R),_=(0,e.createVNode)(64,"input","NumberInput__input",null,1,{style:{display:!d||M?"none":void 0,height:E,"line-height":P,"font-size":D},onBlur:function(){function U(z){if(d){var $=(0,a.clamp)(parseFloat(z.target.value),S,I);if(Number.isNaN($)){i.setState({editing:!1});return}i.setState({editing:!1,value:$}),i.suppressFlicker(),w&&w(z,$),A&&A(z,$)}}return U}(),onKeyDown:function(){function U(z){if(z.keyCode===13){var $=(0,a.clamp)(parseFloat(z.target.value),S,I);if(Number.isNaN($)){i.setState({editing:!1});return}i.setState({editing:!1,value:$}),i.suppressFlicker(),w&&w(z,$),A&&A(z,$);return}if(z.keyCode===27){i.setState({editing:!1});return}}return U}(),disabled:M},null,this.inputRef);return x({dragging:s,editing:d,value:N,displayValue:R,displayElement:F,inputElement:_,handleDragStart:this.handleDragStart})}return m}(),l}(e.Component);k.defaultHooks=t.pureComponentHooks,k.defaultProps={minValue:-1/0,maxValue:1/0,step:1,suppressFlicker:50,dragMatrix:[1,0]}},87099:function(T,r,n){"use strict";r.__esModule=!0,r.Dropdown=void 0;var e=n(89005),a=n(95996),t=n(35840),o=n(55937),f=n(96184),b=n(1331),y=n(96690),B=["icon","iconRotation","iconSpin","clipSelectedText","color","dropdownStyle","over","nochevron","width","onClick","onSelected","selected","disabled","displayText","buttons"],k=["className"],g;function l(h,C){if(h==null)return{};var p={};for(var N in h)if({}.hasOwnProperty.call(h,N)){if(C.includes(N))continue;p[N]=h[N]}return p}function c(h,C){h.prototype=Object.create(C.prototype),h.prototype.constructor=h,m(h,C)}function m(h,C){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,N){return p.__proto__=N,p},m(h,C)}var i={placement:"left-start",modifiers:[{name:"eventListeners",enabled:!1}]},u={width:0,height:0,top:0,right:0,bottom:0,left:0,x:0,y:0,toJSON:function(){function h(){return null}return h}()},s="Layout Dropdown__menu",d="Layout Dropdown__menu-scroll",v=r.Dropdown=function(h){function C(N){var V;return V=h.call(this,N)||this,V.menuContents=void 0,V.handleClick=function(){V.state.open&&V.setOpen(!1)},V.state={open:!1,selected:V.props.selected},V.menuContents=null,V}c(C,h);var p=C.prototype;return p.getDOMNode=function(){function N(){return(0,e.findDOMFromVNode)(this.$LI,!0)}return N}(),p.componentDidMount=function(){function N(){var V=this.getDOMNode()}return N}(),p.openMenu=function(){function N(){var V=C.renderedMenu;V===void 0&&(V=document.createElement("div"),V.className=s,document.body.appendChild(V),C.renderedMenu=V);var S=this.getDOMNode();C.currentOpenMenu=S,V.scrollTop=0,V.style.width=this.props.menuWidth||S.offsetWidth+"px",V.style.opacity="1",V.style.pointerEvents="auto",setTimeout(function(){var I;(I=C.renderedMenu)==null||I.focus()},400),this.renderMenuContent()}return N}(),p.closeMenu=function(){function N(){C.currentOpenMenu===this.getDOMNode()&&(C.currentOpenMenu=void 0,C.renderedMenu.style.opacity="0",C.renderedMenu.style.pointerEvents="none")}return N}(),p.componentWillUnmount=function(){function N(){this.closeMenu(),this.setOpen(!1)}return N}(),p.renderMenuContent=function(){function N(){var V=this,S=C.renderedMenu;if(S){S.offsetHeight>200?S.className=d:S.className=s;var I=this.props.options,L=I===void 0?[]:I,w=L.map(function(x){var E,P;return typeof x=="string"?(P=x,E=x):x!==null&&(P=x.displayText,E=x.value),(0,e.createVNode)(1,"div",(0,t.classes)(["Dropdown__menuentry",V.state.selected===E&&"selected"]),P,0,{onClick:function(){function D(){V.setSelected(E)}return D}()},E)}),A=w.length?w:"No Options Found";(0,e.render)((0,e.createVNode)(1,"div",null,A,0),S,function(){var x=C.singletonPopper;x===void 0?(x=(0,a.createPopper)(C.virtualElement,S,Object.assign({},i,{placement:"bottom-start"})),C.singletonPopper=x):(x.setOptions(Object.assign({},i,{placement:"bottom-start"})),x.update())},this.context)}}return N}(),p.setOpen=function(){function N(V){var S=this;this.setState(function(I){return Object.assign({},I,{open:V})}),V?setTimeout(function(){S.openMenu(),window.addEventListener("click",S.handleClick)}):(this.closeMenu(),window.removeEventListener("click",this.handleClick))}return N}(),p.setSelected=function(){function N(V){this.setState(function(S){return Object.assign({},S,{selected:V})}),this.setOpen(!1),this.props.onSelected&&this.props.onSelected(V)}return N}(),p.getOptionValue=function(){function N(V){return typeof V=="string"?V:V.value}return N}(),p.getSelectedIndex=function(){function N(){var V=this,S=this.state.selected||this.props.selected,I=this.props.options,L=I===void 0?[]:I;return L.findIndex(function(w){return V.getOptionValue(w)===S})}return N}(),p.toPrevious=function(){function N(){if(!(this.props.options.length<1)){var V=this.getSelectedIndex(),S=0,I=this.props.options.length-1,L=V>=0;L||(V=S);var w=V===S?I:V-1;this.setSelected(this.getOptionValue(this.props.options[w]))}}return N}(),p.toNext=function(){function N(){if(!(this.props.options.length<1)){var V=this.getSelectedIndex(),S=0,I=this.props.options.length-1,L=V>=0;L||(V=I);var w=V===I?S:V+1;this.setSelected(this.getOptionValue(this.props.options[w]))}}return N}(),p.render=function(){function N(){var V=this,S=this.props,I=S.icon,L=S.iconRotation,w=S.iconSpin,A=S.clipSelectedText,x=A===void 0?!0:A,E=S.color,P=E===void 0?"default":E,D=S.dropdownStyle,M=S.over,R=S.nochevron,O=S.width,F=S.onClick,_=S.onSelected,U=S.selected,z=S.disabled,$=S.displayText,G=S.buttons,X=l(S,B),J=X.className,se=l(X,k),ie=M?!this.state.open:this.state.open;return(0,e.createComponentVNode)(2,y.Stack,{inline:!0,fill:!0,width:O,children:[(0,e.createComponentVNode)(2,y.Stack.Item,{grow:!0,children:(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Box,Object.assign({width:"100%",className:(0,t.classes)(["Dropdown__control","Button","Button--color--"+P,z&&"Button--disabled",J]),onClick:function(){function me(q){z&&!V.state.open||(V.setOpen(!V.state.open),F&&F(q))}return me}()},se,{children:[I&&(0,e.createComponentVNode)(2,b.Icon,{name:I,rotation:L,spin:w,mr:1}),(0,e.createVNode)(1,"span","Dropdown__selected-text",$||this.state.selected,0,{style:{overflow:x?"hidden":"visible"}}),R||(0,e.createVNode)(1,"span","Dropdown__arrow-button",(0,e.createComponentVNode)(2,b.Icon,{name:ie?"chevron-up":"chevron-down"}),2)]})))}),G&&(0,e.createFragment)([(0,e.createComponentVNode)(2,y.Stack.Item,{height:"100%",children:(0,e.createComponentVNode)(2,f.Button,{height:"100%",icon:"chevron-left",disabled:z,onClick:function(){function me(){z||V.toPrevious()}return me}()})}),(0,e.createComponentVNode)(2,y.Stack.Item,{height:"100%",children:(0,e.createComponentVNode)(2,f.Button,{height:"100%",icon:"chevron-right",disabled:z,onClick:function(){function me(){z||V.toNext()}return me}()})})],4)]})}return N}(),C}(e.Component);g=v,v.renderedMenu=void 0,v.singletonPopper=void 0,v.currentOpenMenu=void 0,v.virtualElement={getBoundingClientRect:function(){function h(){var C,p;return(C=(p=g.currentOpenMenu)==null?void 0:p.getBoundingClientRect())!=null?C:u}return h}()}},39473:function(T,r,n){"use strict";r.__esModule=!0,r.computeFlexProps=r.computeFlexItemProps=r.computeFlexItemClassName=r.computeFlexClassName=r.Flex=void 0;var e=n(89005),a=n(35840),t=n(55937),o=["className","direction","wrap","align","justify","inline","style"],f=["className"],b=["className","style","grow","order","shrink","basis","align"],y=["className"];/** + */var t=r.Divider=function(){function o(f){var b=f.vertical,S=f.hidden;return(0,e.createVNode)(1,"div",(0,a.classes)(["Divider",S&&"Divider--hidden",b?"Divider--vertical":"Divider--horizontal"]))}return o}()},60218:function(T,r,n){"use strict";r.__esModule=!0,r.DmIcon=void 0;var e=n(89005),a=n(79140),t=n(46085),o=n(91225),f=["className","direction","fallback","frame","icon_state","movement"];function b(u,s){if(u==null)return{};var d={};for(var v in u)if({}.hasOwnProperty.call(u,v)){if(s.includes(v))continue;d[v]=u[v]}return d}function S(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */S=function(){return s};var u,s={},d=Object.prototype,v=d.hasOwnProperty,C=Object.defineProperty||function(q,re,ae){q[re]=ae.value},h=typeof Symbol=="function"?Symbol:{},p=h.iterator||"@@iterator",N=h.asyncIterator||"@@asyncIterator",V=h.toStringTag||"@@toStringTag";function y(q,re,ae){return Object.defineProperty(q,re,{value:ae,enumerable:!0,configurable:!0,writable:!0}),q[re]}try{y({},"")}catch(q){y=function(ae,le,Z){return ae[le]=Z}}function I(q,re,ae,le){var Z=re&&re.prototype instanceof D?re:D,ne=Object.create(Z.prototype),te=new ie(le||[]);return C(ne,"_invoke",{value:G(q,ae,te)}),ne}function L(q,re,ae){try{return{type:"normal",arg:q.call(re,ae)}}catch(le){return{type:"throw",arg:le}}}s.wrap=I;var w="suspendedStart",A="suspendedYield",x="executing",E="completed",P={};function D(){}function M(){}function R(){}var O={};y(O,p,function(){return this});var F=Object.getPrototypeOf,_=F&&F(F(me([])));_&&_!==d&&v.call(_,p)&&(O=_);var U=R.prototype=D.prototype=Object.create(O);function z(q){["next","throw","return"].forEach(function(re){y(q,re,function(ae){return this._invoke(re,ae)})})}function $(q,re){function ae(Z,ne,te,fe){var pe=L(q[Z],q,ne);if(pe.type!=="throw"){var ce=pe.arg,Ve=ce.value;return Ve&&typeof Ve=="object"&&v.call(Ve,"__await")?re.resolve(Ve.__await).then(function(Ce){ae("next",Ce,te,fe)},function(Ce){ae("throw",Ce,te,fe)}):re.resolve(Ve).then(function(Ce){ce.value=Ce,te(ce)},function(Ce){return ae("throw",Ce,te,fe)})}fe(pe.arg)}var le;C(this,"_invoke",{value:function(){function Z(ne,te){function fe(){return new re(function(pe,ce){ae(ne,te,pe,ce)})}return le=le?le.then(fe,fe):fe()}return Z}()})}function G(q,re,ae){var le=w;return function(Z,ne){if(le===x)throw Error("Generator is already running");if(le===E){if(Z==="throw")throw ne;return{value:u,done:!0}}for(ae.method=Z,ae.arg=ne;;){var te=ae.delegate;if(te){var fe=X(te,ae);if(fe){if(fe===P)continue;return fe}}if(ae.method==="next")ae.sent=ae._sent=ae.arg;else if(ae.method==="throw"){if(le===w)throw le=E,ae.arg;ae.dispatchException(ae.arg)}else ae.method==="return"&&ae.abrupt("return",ae.arg);le=x;var pe=L(q,re,ae);if(pe.type==="normal"){if(le=ae.done?E:A,pe.arg===P)continue;return{value:pe.arg,done:ae.done}}pe.type==="throw"&&(le=E,ae.method="throw",ae.arg=pe.arg)}}}function X(q,re){var ae=re.method,le=q.iterator[ae];if(le===u)return re.delegate=null,ae==="throw"&&q.iterator.return&&(re.method="return",re.arg=u,X(q,re),re.method==="throw")||ae!=="return"&&(re.method="throw",re.arg=new TypeError("The iterator does not provide a '"+ae+"' method")),P;var Z=L(le,q.iterator,re.arg);if(Z.type==="throw")return re.method="throw",re.arg=Z.arg,re.delegate=null,P;var ne=Z.arg;return ne?ne.done?(re[q.resultName]=ne.value,re.next=q.nextLoc,re.method!=="return"&&(re.method="next",re.arg=u),re.delegate=null,P):ne:(re.method="throw",re.arg=new TypeError("iterator result is not an object"),re.delegate=null,P)}function J(q){var re={tryLoc:q[0]};1 in q&&(re.catchLoc=q[1]),2 in q&&(re.finallyLoc=q[2],re.afterLoc=q[3]),this.tryEntries.push(re)}function se(q){var re=q.completion||{};re.type="normal",delete re.arg,q.completion=re}function ie(q){this.tryEntries=[{tryLoc:"root"}],q.forEach(J,this),this.reset(!0)}function me(q){if(q||q===""){var re=q[p];if(re)return re.call(q);if(typeof q.next=="function")return q;if(!isNaN(q.length)){var ae=-1,le=function(){function Z(){for(;++ae=0;--Z){var ne=this.tryEntries[Z],te=ne.completion;if(ne.tryLoc==="root")return le("end");if(ne.tryLoc<=this.prev){var fe=v.call(ne,"catchLoc"),pe=v.call(ne,"finallyLoc");if(fe&&pe){if(this.prev=0;--le){var Z=this.tryEntries[le];if(Z.tryLoc<=this.prev&&v.call(Z,"finallyLoc")&&this.prev=0;--ae){var le=this.tryEntries[ae];if(le.finallyLoc===re)return this.complete(le.completion,le.afterLoc),se(le),P}}return q}(),catch:function(){function q(re){for(var ae=this.tryEntries.length-1;ae>=0;--ae){var le=this.tryEntries[ae];if(le.tryLoc===re){var Z=le.completion;if(Z.type==="throw"){var ne=Z.arg;se(le)}return ne}}throw Error("illegal catch attempt")}return q}(),delegateYield:function(){function q(re,ae,le){return this.delegate={iterator:me(re),resultName:ae,nextLoc:le},this.method==="next"&&(this.arg=u),P}return q}()},s}function B(u,s,d,v,C,h,p){try{var N=u[h](p),V=N.value}catch(y){return void d(y)}N.done?s(V):Promise.resolve(V).then(v,C)}function k(u){return function(){var s=this,d=arguments;return new Promise(function(v,C){var h=u.apply(s,d);function p(V){B(h,v,C,p,N,"next",V)}function N(V){B(h,v,C,p,N,"throw",V)}p(void 0)})}}function g(u,s){u.prototype=Object.create(s.prototype),u.prototype.constructor=u,l(u,s)}function l(u,s){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(d,v){return d.__proto__=v,d},l(u,s)}var c=function(u){return u[u.NORTH=1]="NORTH",u[u.SOUTH=2]="SOUTH",u[u.EAST=4]="EAST",u[u.WEST=8]="WEST",u[u.NORTHEAST=5]="NORTHEAST",u[u.NORTHWEST=9]="NORTHWEST",u[u.SOUTHEAST=6]="SOUTHEAST",u[u.SOUTHWEST=10]="SOUTHWEST",u}(c||{}),m,i=r.DmIcon=function(u){function s(v){var C;return C=u.call(this,v)||this,C.state={iconRef:""},C}g(s,u);var d=s.prototype;return d.fetchRefMap=function(){var v=k(S().mark(function(){function h(){var p,N;return S().wrap(function(){function V(y){for(;;)switch(y.prev=y.next){case 0:return y.prev=0,y.next=3,(0,t.fetchRetry)((0,a.resolveAsset)("icon_ref_map.json"));case 3:return p=y.sent,y.next=6,p.json();case 6:N=y.sent,m=N,this.setState({iconRef:N[this.props.icon]||""}),y.next=14;break;case 11:return y.prev=11,y.t0=y.catch(0),y.abrupt("return");case 14:case"end":return y.stop()}}return V}(),h,this,[[0,11]])}return h}()));function C(){return v.apply(this,arguments)}return C}(),d.componentDidMount=function(){function v(){m?this.setState({iconRef:m[this.props.icon]}):this.fetchRefMap()}return v}(),d.componentDidUpdate=function(){function v(C){C.icon!==this.props.icon&&(m?this.setState({iconRef:m[this.props.icon]}):this.fetchRefMap())}return v}(),d.render=function(){function v(){var C=this.props,h=C.className,p=C.direction,N=p===void 0?c.SOUTH:p,V=C.fallback,y=C.frame,I=y===void 0?1:y,L=C.icon_state,w=C.movement,A=w===void 0?!1:w,x=b(C,f),E=this.state.iconRef,P=E+"?state="+L+"&dir="+N+"&movement="+!!A+"&frame="+I;return E?(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Image,Object.assign({fixErrors:!0,src:P},x))):V||null}return v}(),s}(e.Component)},20342:function(T,r,n){"use strict";r.__esModule=!0,r.DraggableControl=void 0;var e=n(89005),a=n(44879),t=n(35840),o=n(9474);function f(g,l){g.prototype=Object.create(l.prototype),g.prototype.constructor=g,b(g,l)}function b(g,l){return b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(c,m){return c.__proto__=m,c},b(g,l)}var S=400,B=function(l,c){return l.screenX*c[0]+l.screenY*c[1]},k=r.DraggableControl=function(g){function l(m){var i;return i=g.call(this,m)||this,i.inputRef=(0,e.createRef)(),i.state={originalValue:m.value,value:m.value,dragging:!1,editing:!1,origin:null,suppressingFlicker:!1},i.flickerTimer=null,i.suppressFlicker=function(){var u=i.props.suppressFlicker;u>0&&(i.setState({suppressingFlicker:!0}),clearTimeout(i.flickerTimer),i.flickerTimer=setTimeout(function(){return i.setState({suppressingFlicker:!1})},u))},i.handleDragStart=function(u){var s=i.props,d=s.value,v=s.dragMatrix,C=s.disabled,h=i.state.editing;h||C||(document.body.style["pointer-events"]="none",i.ref=u.currentTarget,i.setState({originalValue:d,dragging:!1,value:d,origin:B(u,v)}),i.timer=setTimeout(function(){i.setState({dragging:!0})},250),i.dragInterval=setInterval(function(){var p=i.state,N=p.dragging,V=p.value,y=i.props.onDrag;N&&y&&y(u,V)},i.props.updateRate||S),document.addEventListener("mousemove",i.handleDragMove),document.addEventListener("mouseup",i.handleDragEnd))},i.handleDragMove=function(u){var s,d=i.props,v=d.minValue,C=d.maxValue,h=d.step,p=d.dragMatrix,N=d.disabled;if(!N){var V=i.ref.offsetWidth/((C-v)/h),y=(s=i.props.stepPixelSize)!=null?s:V;typeof y=="function"&&(y=y(V)),i.setState(function(I){var L=Object.assign({},I),w=I.origin,A=B(u,p)-w;if(I.dragging){var x=Math.trunc(A/y);L.value=(0,a.clamp)(Math.floor(L.originalValue/h)*h+x*h,v,C)}else Math.abs(A)>4&&(L.dragging=!0);return L})}},i.handleDragEnd=function(u){var s=i.props,d=s.onChange,v=s.onDrag,C=i.state,h=C.dragging,p=C.value;if(document.body.style["pointer-events"]="auto",clearTimeout(i.timer),clearInterval(i.dragInterval),i.setState({originalValue:null,dragging:!1,editing:!h,origin:null}),document.removeEventListener("mousemove",i.handleDragMove),document.removeEventListener("mouseup",i.handleDragEnd),h)i.suppressFlicker(),d&&d(u,p),v&&v(u,p);else if(i.inputRef){var N=i.inputRef.current;N.value=p;try{N.focus(),N.select()}catch(V){}}},i}f(l,g);var c=l.prototype;return c.render=function(){function m(){var i=this,u=this.state,s=u.dragging,d=u.editing,v=u.value,C=u.suppressingFlicker,h=this.props,p=h.animated,N=h.value,V=h.unit,y=h.minValue,I=h.maxValue,L=h.format,w=h.onChange,A=h.onDrag,x=h.children,E=h.height,P=h.lineHeight,D=h.fontSize,M=h.disabled,R=N;(s||C)&&(R=v);var O=function(){function U(z){return z+(V?" "+V:"")}return U}(),F=p&&!s&&!C&&(0,e.createComponentVNode)(2,o.AnimatedNumber,{value:R,format:L,children:O})||O(L?L(R):R),_=(0,e.createVNode)(64,"input","NumberInput__input",null,1,{style:{display:!d||M?"none":void 0,height:E,"line-height":P,"font-size":D},onBlur:function(){function U(z){if(d){var $=(0,a.clamp)(parseFloat(z.target.value),y,I);if(Number.isNaN($)){i.setState({editing:!1});return}i.setState({editing:!1,value:$}),i.suppressFlicker(),w&&w(z,$),A&&A(z,$)}}return U}(),onKeyDown:function(){function U(z){if(z.keyCode===13){var $=(0,a.clamp)(parseFloat(z.target.value),y,I);if(Number.isNaN($)){i.setState({editing:!1});return}i.setState({editing:!1,value:$}),i.suppressFlicker(),w&&w(z,$),A&&A(z,$);return}if(z.keyCode===27){i.setState({editing:!1});return}}return U}(),disabled:M},null,this.inputRef);return x({dragging:s,editing:d,value:N,displayValue:R,displayElement:F,inputElement:_,handleDragStart:this.handleDragStart})}return m}(),l}(e.Component);k.defaultHooks=t.pureComponentHooks,k.defaultProps={minValue:-1/0,maxValue:1/0,step:1,suppressFlicker:50,dragMatrix:[1,0]}},87099:function(T,r,n){"use strict";r.__esModule=!0,r.Dropdown=void 0;var e=n(89005),a=n(95996),t=n(35840),o=n(55937),f=n(96184),b=n(1331),S=n(96690),B=["icon","iconRotation","iconSpin","clipSelectedText","color","dropdownStyle","over","nochevron","width","onClick","onSelected","selected","disabled","displayText","buttons"],k=["className"],g;function l(C,h){if(C==null)return{};var p={};for(var N in C)if({}.hasOwnProperty.call(C,N)){if(h.includes(N))continue;p[N]=C[N]}return p}function c(C,h){C.prototype=Object.create(h.prototype),C.prototype.constructor=C,m(C,h)}function m(C,h){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,N){return p.__proto__=N,p},m(C,h)}var i={placement:"left-start",modifiers:[{name:"eventListeners",enabled:!1}]},u={width:0,height:0,top:0,right:0,bottom:0,left:0,x:0,y:0,toJSON:function(){function C(){return null}return C}()},s="Layout Dropdown__menu",d="Layout Dropdown__menu-scroll",v=r.Dropdown=function(C){function h(N){var V;return V=C.call(this,N)||this,V.menuContents=void 0,V.handleClick=function(){V.state.open&&V.setOpen(!1)},V.state={open:!1,selected:V.props.selected},V.menuContents=null,V}c(h,C);var p=h.prototype;return p.getDOMNode=function(){function N(){return(0,e.findDOMFromVNode)(this.$LI,!0)}return N}(),p.componentDidMount=function(){function N(){var V=this.getDOMNode()}return N}(),p.openMenu=function(){function N(){var V=h.renderedMenu;V===void 0&&(V=document.createElement("div"),V.className=s,document.body.appendChild(V),h.renderedMenu=V);var y=this.getDOMNode();h.currentOpenMenu=y,V.scrollTop=0,V.style.width=this.props.menuWidth||y.offsetWidth+"px",V.style.opacity="1",V.style.pointerEvents="auto",setTimeout(function(){var I;(I=h.renderedMenu)==null||I.focus()},400),this.renderMenuContent()}return N}(),p.closeMenu=function(){function N(){h.currentOpenMenu===this.getDOMNode()&&(h.currentOpenMenu=void 0,h.renderedMenu.style.opacity="0",h.renderedMenu.style.pointerEvents="none")}return N}(),p.componentWillUnmount=function(){function N(){this.closeMenu(),this.setOpen(!1)}return N}(),p.renderMenuContent=function(){function N(){var V=this,y=h.renderedMenu;if(y){y.offsetHeight>200?y.className=d:y.className=s;var I=this.props.options,L=I===void 0?[]:I,w=L.map(function(x){var E,P;return typeof x=="string"?(P=x,E=x):x!==null&&(P=x.displayText,E=x.value),(0,e.createVNode)(1,"div",(0,t.classes)(["Dropdown__menuentry",V.state.selected===E&&"selected"]),P,0,{onClick:function(){function D(){V.setSelected(E)}return D}()},E)}),A=w.length?w:"No Options Found";(0,e.render)((0,e.createVNode)(1,"div",null,A,0),y,function(){var x=h.singletonPopper;x===void 0?(x=(0,a.createPopper)(h.virtualElement,y,Object.assign({},i,{placement:"bottom-start"})),h.singletonPopper=x):(x.setOptions(Object.assign({},i,{placement:"bottom-start"})),x.update())},this.context)}}return N}(),p.setOpen=function(){function N(V){var y=this;this.setState(function(I){return Object.assign({},I,{open:V})}),V?setTimeout(function(){y.openMenu(),window.addEventListener("click",y.handleClick)}):(this.closeMenu(),window.removeEventListener("click",this.handleClick))}return N}(),p.setSelected=function(){function N(V){this.setState(function(y){return Object.assign({},y,{selected:V})}),this.setOpen(!1),this.props.onSelected&&this.props.onSelected(V)}return N}(),p.getOptionValue=function(){function N(V){return typeof V=="string"?V:V.value}return N}(),p.getSelectedIndex=function(){function N(){var V=this,y=this.state.selected||this.props.selected,I=this.props.options,L=I===void 0?[]:I;return L.findIndex(function(w){return V.getOptionValue(w)===y})}return N}(),p.toPrevious=function(){function N(){if(!(this.props.options.length<1)){var V=this.getSelectedIndex(),y=0,I=this.props.options.length-1,L=V>=0;L||(V=y);var w=V===y?I:V-1;this.setSelected(this.getOptionValue(this.props.options[w]))}}return N}(),p.toNext=function(){function N(){if(!(this.props.options.length<1)){var V=this.getSelectedIndex(),y=0,I=this.props.options.length-1,L=V>=0;L||(V=I);var w=V===I?y:V+1;this.setSelected(this.getOptionValue(this.props.options[w]))}}return N}(),p.render=function(){function N(){var V=this,y=this.props,I=y.icon,L=y.iconRotation,w=y.iconSpin,A=y.clipSelectedText,x=A===void 0?!0:A,E=y.color,P=E===void 0?"default":E,D=y.dropdownStyle,M=y.over,R=y.nochevron,O=y.width,F=y.onClick,_=y.onSelected,U=y.selected,z=y.disabled,$=y.displayText,G=y.buttons,X=l(y,B),J=X.className,se=l(X,k),ie=M?!this.state.open:this.state.open;return(0,e.createComponentVNode)(2,S.Stack,{inline:!0,fill:!0,width:O,children:[(0,e.createComponentVNode)(2,S.Stack.Item,{grow:!0,children:(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Box,Object.assign({width:"100%",className:(0,t.classes)(["Dropdown__control","Button","Button--color--"+P,z&&"Button--disabled",J]),onClick:function(){function me(q){z&&!V.state.open||(V.setOpen(!V.state.open),F&&F(q))}return me}()},se,{children:[I&&(0,e.createComponentVNode)(2,b.Icon,{name:I,rotation:L,spin:w,mr:1}),(0,e.createVNode)(1,"span","Dropdown__selected-text",$||this.state.selected,0,{style:{overflow:x?"hidden":"visible"}}),R||(0,e.createVNode)(1,"span","Dropdown__arrow-button",(0,e.createComponentVNode)(2,b.Icon,{name:ie?"chevron-up":"chevron-down"}),2)]})))}),G&&(0,e.createFragment)([(0,e.createComponentVNode)(2,S.Stack.Item,{height:"100%",children:(0,e.createComponentVNode)(2,f.Button,{height:"100%",icon:"chevron-left",disabled:z,onClick:function(){function me(){z||V.toPrevious()}return me}()})}),(0,e.createComponentVNode)(2,S.Stack.Item,{height:"100%",children:(0,e.createComponentVNode)(2,f.Button,{height:"100%",icon:"chevron-right",disabled:z,onClick:function(){function me(){z||V.toNext()}return me}()})})],4)]})}return N}(),h}(e.Component);g=v,v.renderedMenu=void 0,v.singletonPopper=void 0,v.currentOpenMenu=void 0,v.virtualElement={getBoundingClientRect:function(){function C(){var h,p;return(h=(p=g.currentOpenMenu)==null?void 0:p.getBoundingClientRect())!=null?h:u}return C}()}},39473:function(T,r,n){"use strict";r.__esModule=!0,r.computeFlexProps=r.computeFlexItemProps=r.computeFlexItemClassName=r.computeFlexClassName=r.Flex=void 0;var e=n(89005),a=n(35840),t=n(55937),o=["className","direction","wrap","align","justify","inline","style"],f=["className"],b=["className","style","grow","order","shrink","basis","align"],S=["className"];/** * @file * @copyright 2020 Aleksej Komarov * @license MIT - */function B(u,s){if(u==null)return{};var d={};for(var v in u)if({}.hasOwnProperty.call(u,v)){if(s.includes(v))continue;d[v]=u[v]}return d}var k=r.computeFlexClassName=function(){function u(s){return(0,a.classes)(["Flex",s.inline&&"Flex--inline",(0,t.computeBoxClassName)(s)])}return u}(),g=r.computeFlexProps=function(){function u(s){var d=s.className,v=s.direction,h=s.wrap,C=s.align,p=s.justify,N=s.inline,V=s.style,S=B(s,o);return(0,t.computeBoxProps)(Object.assign({style:Object.assign({},V,{"flex-direction":v,"flex-wrap":h===!0?"wrap":h,"align-items":C,"justify-content":p})},S))}return u}(),l=r.Flex=function(){function u(s){var d=s.className,v=B(s,f);return(0,e.normalizeProps)((0,e.createVNode)(1,"div",(0,a.classes)([d,k(v)]),null,1,Object.assign({},g(v))))}return u}();l.defaultHooks=a.pureComponentHooks;var c=r.computeFlexItemClassName=function(){function u(s){return(0,a.classes)(["Flex__item",(0,t.computeBoxClassName)(s)])}return u}(),m=r.computeFlexItemProps=function(){function u(s){var d=s.className,v=s.style,h=s.grow,C=s.order,p=s.shrink,N=s.basis,V=N===void 0?s.width:N,S=s.align,I=B(s,b);return(0,t.computeBoxProps)(Object.assign({style:Object.assign({},v,{"flex-grow":h!==void 0&&Number(h),"flex-shrink":p!==void 0&&Number(p),"flex-basis":(0,t.unit)(V),order:C,"align-self":S})},I))}return u}(),i=function(s){var d=s.className,v=B(s,y);return(0,e.normalizeProps)((0,e.createVNode)(1,"div",(0,a.classes)([d,c(s)]),null,1,Object.assign({},m(v))))};i.defaultHooks=a.pureComponentHooks,l.Item=i},79646:function(T,r,n){"use strict";r.__esModule=!0,r.GridColumn=r.Grid=void 0;var e=n(89005),a=n(36352),t=n(35840),o=["children"],f=["size","style"];/** + */function B(u,s){if(u==null)return{};var d={};for(var v in u)if({}.hasOwnProperty.call(u,v)){if(s.includes(v))continue;d[v]=u[v]}return d}var k=r.computeFlexClassName=function(){function u(s){return(0,a.classes)(["Flex",s.inline&&"Flex--inline",(0,t.computeBoxClassName)(s)])}return u}(),g=r.computeFlexProps=function(){function u(s){var d=s.className,v=s.direction,C=s.wrap,h=s.align,p=s.justify,N=s.inline,V=s.style,y=B(s,o);return(0,t.computeBoxProps)(Object.assign({style:Object.assign({},V,{"flex-direction":v,"flex-wrap":C===!0?"wrap":C,"align-items":h,"justify-content":p})},y))}return u}(),l=r.Flex=function(){function u(s){var d=s.className,v=B(s,f);return(0,e.normalizeProps)((0,e.createVNode)(1,"div",(0,a.classes)([d,k(v)]),null,1,Object.assign({},g(v))))}return u}();l.defaultHooks=a.pureComponentHooks;var c=r.computeFlexItemClassName=function(){function u(s){return(0,a.classes)(["Flex__item",(0,t.computeBoxClassName)(s)])}return u}(),m=r.computeFlexItemProps=function(){function u(s){var d=s.className,v=s.style,C=s.grow,h=s.order,p=s.shrink,N=s.basis,V=N===void 0?s.width:N,y=s.align,I=B(s,b);return(0,t.computeBoxProps)(Object.assign({style:Object.assign({},v,{"flex-grow":C!==void 0&&Number(C),"flex-shrink":p!==void 0&&Number(p),"flex-basis":(0,t.unit)(V),order:h,"align-self":y})},I))}return u}(),i=function(s){var d=s.className,v=B(s,S);return(0,e.normalizeProps)((0,e.createVNode)(1,"div",(0,a.classes)([d,c(s)]),null,1,Object.assign({},m(v))))};i.defaultHooks=a.pureComponentHooks,l.Item=i},79646:function(T,r,n){"use strict";r.__esModule=!0,r.GridColumn=r.Grid=void 0;var e=n(89005),a=n(36352),t=n(35840),o=["children"],f=["size","style"];/** * @file * @copyright 2020 Aleksej Komarov * @license MIT - */function b(k,g){if(k==null)return{};var l={};for(var c in k)if({}.hasOwnProperty.call(k,c)){if(g.includes(c))continue;l[c]=k[c]}return l}var y=r.Grid=function(){function k(g){var l=g.children,c=b(g,o);return(0,e.normalizeProps)((0,e.createComponentVNode)(2,a.Table,Object.assign({},c,{children:(0,e.createComponentVNode)(2,a.Table.Row,{children:l})})))}return k}();y.defaultHooks=t.pureComponentHooks;var B=r.GridColumn=function(){function k(g){var l=g.size,c=l===void 0?1:l,m=g.style,i=b(g,f);return(0,e.normalizeProps)((0,e.createComponentVNode)(2,a.Table.Cell,Object.assign({style:Object.assign({width:c+"%"},m)},i)))}return k}();y.defaultHooks=t.pureComponentHooks,y.Column=B},1331:function(T,r,n){"use strict";r.__esModule=!0,r.IconStack=r.Icon=void 0;var e=n(89005),a=n(35840),t=n(55937),o=["name","size","spin","className","style","rotation","inverse"],f=["className","style","children"];/** + */function b(k,g){if(k==null)return{};var l={};for(var c in k)if({}.hasOwnProperty.call(k,c)){if(g.includes(c))continue;l[c]=k[c]}return l}var S=r.Grid=function(){function k(g){var l=g.children,c=b(g,o);return(0,e.normalizeProps)((0,e.createComponentVNode)(2,a.Table,Object.assign({},c,{children:(0,e.createComponentVNode)(2,a.Table.Row,{children:l})})))}return k}();S.defaultHooks=t.pureComponentHooks;var B=r.GridColumn=function(){function k(g){var l=g.size,c=l===void 0?1:l,m=g.style,i=b(g,f);return(0,e.normalizeProps)((0,e.createComponentVNode)(2,a.Table.Cell,Object.assign({style:Object.assign({width:c+"%"},m)},i)))}return k}();S.defaultHooks=t.pureComponentHooks,S.Column=B},1331:function(T,r,n){"use strict";r.__esModule=!0,r.IconStack=r.Icon=void 0;var e=n(89005),a=n(35840),t=n(55937),o=["name","size","spin","className","style","rotation","inverse"],f=["className","style","children"];/** * @file * @copyright 2020 Aleksej Komarov * @license MIT - */function b(g,l){if(g==null)return{};var c={};for(var m in g)if({}.hasOwnProperty.call(g,m)){if(l.includes(m))continue;c[m]=g[m]}return c}var y=/-o$/,B=r.Icon=function(){function g(l){var c=l.name,m=l.size,i=l.spin,u=l.className,s=l.style,d=s===void 0?{}:s,v=l.rotation,h=l.inverse,C=b(l,o);m&&(d["font-size"]=m*100+"%"),typeof v=="number"&&(d.transform="rotate("+v+"deg)");var p=y.test(c),N=c.replace(y,"");return(0,e.normalizeProps)((0,e.createComponentVNode)(2,t.Box,Object.assign({as:"i",className:(0,a.classes)(["Icon",u,p?"far":"fas","fa-"+N,i&&"fa-spin"]),style:d},C)))}return g}();B.defaultHooks=a.pureComponentHooks;var k=r.IconStack=function(){function g(l){var c=l.className,m=l.style,i=m===void 0?{}:m,u=l.children,s=b(l,f);return(0,e.normalizeProps)((0,e.createComponentVNode)(2,t.Box,Object.assign({as:"span",class:(0,a.classes)(["IconStack",c]),style:i},s,{children:u})))}return g}();B.Stack=k},91225:function(T,r,n){"use strict";r.__esModule=!0,r.Image=void 0;var e=n(89005),a=n(55937),t=["fixBlur","fixErrors","objectFit","src"];function o(k,g){if(k==null)return{};var l={};for(var c in k)if({}.hasOwnProperty.call(k,c)){if(g.includes(c))continue;l[c]=k[c]}return l}function f(k,g){k.prototype=Object.create(g.prototype),k.prototype.constructor=k,b(k,g)}function b(k,g){return b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(l,c){return l.__proto__=c,l},b(k,g)}var y=5,B=r.Image=function(k){function g(){for(var c,m=arguments.length,i=new Array(m),u=0;u0;u&&(i=c.containerRef)!=null&&i.current?c.props.onMove(b(c.containerRef.current,m)):c.toggleDocumentEvents(!1)},c.handleMoveEnd=function(){c.toggleDocumentEvents(!1)},c.handleKeyDown=function(m){var i=m.which||m.keyCode;i<37||i>40||(m.preventDefault(),c.props.onKey({left:i===39?.05:i===37?-.05:0,top:i===40?.05:i===38?-.05:0}))},c.props=l,c.containerRef=(0,e.createRef)(),c}t(k,B);var g=k.prototype;return g.toggleDocumentEvents=function(){function l(c){var m,i=(m=this.containerRef)==null?void 0:m.current,u=f(i),s=c?u.addEventListener:u.removeEventListener;s("mousemove",this.handleMove),s("mouseup",this.handleMoveEnd)}return l}(),g.componentDidMount=function(){function l(){this.toggleDocumentEvents(!0)}return l}(),g.componentWillUnmount=function(){function l(){this.toggleDocumentEvents(!1)}return l}(),g.render=function(){function l(){return(0,e.normalizeProps)((0,e.createVNode)(1,"div","react-colorful__interactive",this.props.children,0,Object.assign({},this.props,{style:this.props.style,onMouseDown:this.handleMoveStart,onKeyDown:this.handleKeyDown,tabIndex:0,role:"slider"}),null,this.containerRef))}return l}(),k}(e.Component)},76334:function(T,r,n){"use strict";r.__esModule=!0,r.Knob=void 0;var e=n(89005),a=n(44879),t=n(35840),o=n(55937),f=n(20342),b=n(59263),y=["animated","format","maxValue","minValue","onChange","onDrag","step","stepPixelSize","suppressFlicker","unit","value","className","style","fillValue","color","ranges","size","bipolar","children","popUpPosition"];/** +*/var g=r.toInputValue=function(){function c(m){return typeof m!="number"&&typeof m!="string"?"":String(m)}return c}(),l=r.Input=function(c){function m(){var u;return u=c.call(this)||this,u.inputRef=(0,e.createRef)(),u.state={editing:!1},u.handleInput=function(s){var d=u.state.editing,v=u.props.onInput;d||u.setEditing(!0),v&&v(s,s.target.value)},u.handleFocus=function(s){var d=u.state.editing;d||u.setEditing(!0)},u.handleBlur=function(s){var d=u.state.editing,v=u.props.onChange;d&&(u.setEditing(!1),v&&v(s,s.target.value))},u.handleKeyDown=function(s){var d=u.props,v=d.onInput,C=d.onChange,h=d.onEnter;if(s.keyCode===o.KEY_ENTER){u.setEditing(!1),C&&C(s,s.target.value),v&&v(s,s.target.value),h&&h(s,s.target.value),u.props.selfClear?s.target.value="":s.target.blur();return}if(s.keyCode===o.KEY_ESCAPE){u.setEditing(!1),s.target.value=g(u.props.value),s.target.blur();return}},u}B(m,c);var i=m.prototype;return i.componentDidMount=function(){function u(){var s=this,d=this.props.value,v=this.inputRef.current;v&&(v.value=g(d),v.selectionStart=0,v.selectionEnd=v.value.length),(this.props.autoFocus||this.props.autoSelect)&&setTimeout(function(){v.focus(),s.props.autoSelect&&v.select()},1)}return u}(),i.componentDidUpdate=function(){function u(s,d){var v=this.state.editing,C=s.value,h=this.props.value,p=this.inputRef.current;p&&!v&&C!==h&&(p.value=g(h))}return u}(),i.setEditing=function(){function u(s){this.setState({editing:s})}return u}(),i.render=function(){function u(){var s=this.props,d=s.selfClear,v=s.onInput,C=s.onChange,h=s.onEnter,p=s.value,N=s.maxLength,V=s.placeholder,y=s.autofocus,I=s.disabled,L=s.multiline,w=s.cols,A=w===void 0?32:w,x=s.rows,E=x===void 0?4:x,P=S(s,f),D=P.className,M=P.fluid,R=P.monospace,O=S(P,b);return(0,e.normalizeProps)((0,e.createComponentVNode)(2,t.Box,Object.assign({className:(0,a.classes)(["Input",M&&"Input--fluid",R&&"Input--monospace",I&&"Input--disabled",D])},O,{children:[(0,e.createVNode)(1,"div","Input__baseline",".",16),L?(0,e.createVNode)(128,"textarea","Input__textarea",null,1,{placeholder:V,onInput:this.handleInput,onFocus:this.handleFocus,onBlur:this.handleBlur,maxLength:N,cols:A,rows:E,disabled:I},null,this.inputRef):(0,e.createVNode)(64,"input","Input__input",null,1,{placeholder:V,onInput:this.handleInput,onFocus:this.handleFocus,onBlur:this.handleBlur,onKeyDown:this.handleKeyDown,maxLength:N,disabled:I},null,this.inputRef)]})))}return u}(),m}(e.Component)},4454:function(T,r,n){"use strict";r.__esModule=!0,r.Interactive=void 0;var e=n(89005),a=n(44879);function t(B,k){B.prototype=Object.create(k.prototype),B.prototype.constructor=B,o(B,k)}function o(B,k){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(g,l){return g.__proto__=l,g},o(B,k)}var f=function(k){return k&&k.ownerDocument.defaultView||self},b=function(k,g){var l=k.getBoundingClientRect(),c=g;return{left:(0,a.clamp)((c.pageX-(l.left+f(k).pageXOffset))/l.width,0,1),top:(0,a.clamp)((c.pageY-(l.top+f(k).pageYOffset))/l.height,0,1)}},S=r.Interactive=function(B){function k(l){var c;return c=B.call(this)||this,c.containerRef=void 0,c.props=void 0,c.handleMoveStart=function(m){var i,u=(i=c.containerRef)==null?void 0:i.current;u&&(m.preventDefault(),u.focus(),c.props.onMove(b(u,m)),c.toggleDocumentEvents(!0))},c.handleMove=function(m){var i;m.preventDefault();var u=m.buttons>0;u&&(i=c.containerRef)!=null&&i.current?c.props.onMove(b(c.containerRef.current,m)):c.toggleDocumentEvents(!1)},c.handleMoveEnd=function(){c.toggleDocumentEvents(!1)},c.handleKeyDown=function(m){var i=m.which||m.keyCode;i<37||i>40||(m.preventDefault(),c.props.onKey({left:i===39?.05:i===37?-.05:0,top:i===40?.05:i===38?-.05:0}))},c.props=l,c.containerRef=(0,e.createRef)(),c}t(k,B);var g=k.prototype;return g.toggleDocumentEvents=function(){function l(c){var m,i=(m=this.containerRef)==null?void 0:m.current,u=f(i),s=c?u.addEventListener:u.removeEventListener;s("mousemove",this.handleMove),s("mouseup",this.handleMoveEnd)}return l}(),g.componentDidMount=function(){function l(){this.toggleDocumentEvents(!0)}return l}(),g.componentWillUnmount=function(){function l(){this.toggleDocumentEvents(!1)}return l}(),g.render=function(){function l(){return(0,e.normalizeProps)((0,e.createVNode)(1,"div","react-colorful__interactive",this.props.children,0,Object.assign({},this.props,{style:this.props.style,onMouseDown:this.handleMoveStart,onKeyDown:this.handleKeyDown,tabIndex:0,role:"slider"}),null,this.containerRef))}return l}(),k}(e.Component)},76334:function(T,r,n){"use strict";r.__esModule=!0,r.Knob=void 0;var e=n(89005),a=n(44879),t=n(35840),o=n(55937),f=n(20342),b=n(59263),S=["animated","format","maxValue","minValue","onChange","onDrag","step","stepPixelSize","suppressFlicker","unit","value","className","style","fillValue","color","ranges","size","bipolar","children","popUpPosition"];/** * @file * @copyright 2020 Aleksej Komarov * @license MIT - */function B(g,l){if(g==null)return{};var c={};for(var m in g)if({}.hasOwnProperty.call(g,m)){if(l.includes(m))continue;c[m]=g[m]}return c}var k=r.Knob=function(){function g(l){var c=l.animated,m=l.format,i=l.maxValue,u=l.minValue,s=l.onChange,d=l.onDrag,v=l.step,h=l.stepPixelSize,C=l.suppressFlicker,p=l.unit,N=l.value,V=l.className,S=l.style,I=l.fillValue,L=l.color,w=l.ranges,A=w===void 0?{}:w,x=l.size,E=x===void 0?1:x,P=l.bipolar,D=l.children,M=l.popUpPosition,R=B(l,y);return(0,e.normalizeProps)((0,e.createComponentVNode)(2,f.DraggableControl,Object.assign({dragMatrix:[0,-1]},{animated:c,format:m,maxValue:i,minValue:u,onChange:s,onDrag:d,step:v,stepPixelSize:h,suppressFlicker:C,unit:p,value:N},{children:function(){function O(F){var _=F.dragging,U=F.editing,z=F.value,$=F.displayValue,G=F.displayElement,X=F.inputElement,J=F.handleDragStart,se=(0,a.scale)(I!=null?I:$,u,i),ie=(0,a.scale)($,u,i),me=L||(0,a.keyOfMatchingRange)(I!=null?I:z,A)||"default",q=(ie-.5)*270;return(0,e.normalizeProps)((0,e.createVNode)(1,"div",(0,t.classes)(["Knob","Knob--color--"+me,P&&"Knob--bipolar",V,(0,o.computeBoxClassName)(R)]),[(0,e.createVNode)(1,"div","Knob__circle",(0,e.createVNode)(1,"div","Knob__cursorBox",(0,e.createVNode)(1,"div","Knob__cursor"),2,{style:{transform:"rotate("+q+"deg)"}}),2),_&&(0,e.createVNode)(1,"div",(0,t.classes)(["Knob__popupValue",M&&"Knob__popupValue--"+M]),G,0),(0,e.createVNode)(32,"svg","Knob__ring Knob__ringTrackPivot",(0,e.createVNode)(32,"circle","Knob__ringTrack",null,1,{cx:"50",cy:"50",r:"50"}),2,{viewBox:"0 0 100 100"}),(0,e.createVNode)(32,"svg","Knob__ring Knob__ringFillPivot",(0,e.createVNode)(32,"circle","Knob__ringFill",null,1,{style:{"stroke-dashoffset":((P?2.75:2)-se*1.5)*Math.PI*50},cx:"50",cy:"50",r:"50"}),2,{viewBox:"0 0 100 100"}),X],0,Object.assign({},(0,o.computeBoxProps)(Object.assign({style:Object.assign({"font-size":E+"em"},S)},R)),{onMouseDown:J})))}return O}()})))}return g}()},78621:function(T,r,n){"use strict";r.__esModule=!0,r.LabeledControls=void 0;var e=n(89005),a=n(39473),t=["children"],o=["label","children"];/** + */function B(g,l){if(g==null)return{};var c={};for(var m in g)if({}.hasOwnProperty.call(g,m)){if(l.includes(m))continue;c[m]=g[m]}return c}var k=r.Knob=function(){function g(l){var c=l.animated,m=l.format,i=l.maxValue,u=l.minValue,s=l.onChange,d=l.onDrag,v=l.step,C=l.stepPixelSize,h=l.suppressFlicker,p=l.unit,N=l.value,V=l.className,y=l.style,I=l.fillValue,L=l.color,w=l.ranges,A=w===void 0?{}:w,x=l.size,E=x===void 0?1:x,P=l.bipolar,D=l.children,M=l.popUpPosition,R=B(l,S);return(0,e.normalizeProps)((0,e.createComponentVNode)(2,f.DraggableControl,Object.assign({dragMatrix:[0,-1]},{animated:c,format:m,maxValue:i,minValue:u,onChange:s,onDrag:d,step:v,stepPixelSize:C,suppressFlicker:h,unit:p,value:N},{children:function(){function O(F){var _=F.dragging,U=F.editing,z=F.value,$=F.displayValue,G=F.displayElement,X=F.inputElement,J=F.handleDragStart,se=(0,a.scale)(I!=null?I:$,u,i),ie=(0,a.scale)($,u,i),me=L||(0,a.keyOfMatchingRange)(I!=null?I:z,A)||"default",q=(ie-.5)*270;return(0,e.normalizeProps)((0,e.createVNode)(1,"div",(0,t.classes)(["Knob","Knob--color--"+me,P&&"Knob--bipolar",V,(0,o.computeBoxClassName)(R)]),[(0,e.createVNode)(1,"div","Knob__circle",(0,e.createVNode)(1,"div","Knob__cursorBox",(0,e.createVNode)(1,"div","Knob__cursor"),2,{style:{transform:"rotate("+q+"deg)"}}),2),_&&(0,e.createVNode)(1,"div",(0,t.classes)(["Knob__popupValue",M&&"Knob__popupValue--"+M]),G,0),(0,e.createVNode)(32,"svg","Knob__ring Knob__ringTrackPivot",(0,e.createVNode)(32,"circle","Knob__ringTrack",null,1,{cx:"50",cy:"50",r:"50"}),2,{viewBox:"0 0 100 100"}),(0,e.createVNode)(32,"svg","Knob__ring Knob__ringFillPivot",(0,e.createVNode)(32,"circle","Knob__ringFill",null,1,{style:{"stroke-dashoffset":((P?2.75:2)-se*1.5)*Math.PI*50},cx:"50",cy:"50",r:"50"}),2,{viewBox:"0 0 100 100"}),X],0,Object.assign({},(0,o.computeBoxProps)(Object.assign({style:Object.assign({"font-size":E+"em"},y)},R)),{onMouseDown:J})))}return O}()})))}return g}()},78621:function(T,r,n){"use strict";r.__esModule=!0,r.LabeledControls=void 0;var e=n(89005),a=n(39473),t=["children"],o=["label","children"];/** * @file * @copyright 2020 Aleksej Komarov * @license MIT - */function f(B,k){if(B==null)return{};var g={};for(var l in B)if({}.hasOwnProperty.call(B,l)){if(k.includes(l))continue;g[l]=B[l]}return g}var b=r.LabeledControls=function(){function B(k){var g=k.children,l=f(k,t);return(0,e.normalizeProps)((0,e.createComponentVNode)(2,a.Flex,Object.assign({mx:-.5,align:"stretch",justify:"space-between"},l,{children:g})))}return B}(),y=function(k){var g=k.label,l=k.children,c=f(k,o);return(0,e.createComponentVNode)(2,a.Flex.Item,{mx:1,children:(0,e.normalizeProps)((0,e.createComponentVNode)(2,a.Flex,Object.assign({minWidth:"52px",height:"100%",direction:"column",align:"center",textAlign:"center",justify:"space-between"},c,{children:[(0,e.createComponentVNode)(2,a.Flex.Item),(0,e.createComponentVNode)(2,a.Flex.Item,{children:l}),(0,e.createComponentVNode)(2,a.Flex.Item,{color:"label",children:g})]})))})};b.Item=y},29319:function(T,r,n){"use strict";r.__esModule=!0,r.LabeledList=void 0;var e=n(89005),a=n(35840),t=n(55937),o=n(13605),f=n(62147);/** + */function f(B,k){if(B==null)return{};var g={};for(var l in B)if({}.hasOwnProperty.call(B,l)){if(k.includes(l))continue;g[l]=B[l]}return g}var b=r.LabeledControls=function(){function B(k){var g=k.children,l=f(k,t);return(0,e.normalizeProps)((0,e.createComponentVNode)(2,a.Flex,Object.assign({mx:-.5,align:"stretch",justify:"space-between"},l,{children:g})))}return B}(),S=function(k){var g=k.label,l=k.children,c=f(k,o);return(0,e.createComponentVNode)(2,a.Flex.Item,{mx:1,children:(0,e.normalizeProps)((0,e.createComponentVNode)(2,a.Flex,Object.assign({minWidth:"52px",height:"100%",direction:"column",align:"center",textAlign:"center",justify:"space-between"},c,{children:[(0,e.createComponentVNode)(2,a.Flex.Item),(0,e.createComponentVNode)(2,a.Flex.Item,{children:l}),(0,e.createComponentVNode)(2,a.Flex.Item,{color:"label",children:g})]})))})};b.Item=S},29319:function(T,r,n){"use strict";r.__esModule=!0,r.LabeledList=void 0;var e=n(89005),a=n(35840),t=n(55937),o=n(13605),f=n(62147);/** * @file * @copyright 2020 Aleksej Komarov * @license MIT - */var b=r.LabeledList=function(){function k(g){var l=g.children;return(0,e.createVNode)(1,"table","LabeledList",l,0)}return k}();b.defaultHooks=a.pureComponentHooks;var y=function(g){var l=g.className,c=g.label,m=g.labelColor,i=m===void 0?"label":m,u=g.color,s=g.textAlign,d=g.buttons,v=g.tooltip,h=g.content,C=g.children,p=g.preserveWhitespace,N=g.labelStyle,V=(0,e.createVNode)(1,"tr",(0,a.classes)(["LabeledList__row",l]),[(0,e.createComponentVNode)(2,t.Box,{as:"td",color:i,className:(0,a.classes)(["LabeledList__cell","LabeledList__label"]),style:N,children:c?c+":":null}),(0,e.createComponentVNode)(2,t.Box,{as:"td",color:u,textAlign:s,className:(0,a.classes)(["LabeledList__cell","LabeledList__content"]),colSpan:d?void 0:2,preserveWhitespace:p,children:[h,C]}),d&&(0,e.createVNode)(1,"td","LabeledList__cell LabeledList__buttons",d,0)],0);return v&&(V=(0,e.createComponentVNode)(2,f.Tooltip,{content:v,children:V})),V};y.defaultHooks=a.pureComponentHooks;var B=function(g){var l=g.size?(0,t.unit)(Math.max(0,g.size-1)):0;return(0,e.createVNode)(1,"tr","LabeledList__row",(0,e.createVNode)(1,"td",null,(0,e.createComponentVNode)(2,o.Divider),2,{colSpan:3,style:{"padding-top":l,"padding-bottom":l}}),2)};B.defaultHooks=a.pureComponentHooks,b.Item=y,b.Divider=B},36077:function(T,r,n){"use strict";r.__esModule=!0,r.Modal=void 0;var e=n(89005),a=n(35840),t=n(55937),o=n(61940),f=["className","children","onEnter"];/** + */var b=r.LabeledList=function(){function k(g){var l=g.children;return(0,e.createVNode)(1,"table","LabeledList",l,0)}return k}();b.defaultHooks=a.pureComponentHooks;var S=function(g){var l=g.className,c=g.label,m=g.labelColor,i=m===void 0?"label":m,u=g.color,s=g.textAlign,d=g.buttons,v=g.tooltip,C=g.content,h=g.children,p=g.preserveWhitespace,N=g.labelStyle,V=(0,e.createVNode)(1,"tr",(0,a.classes)(["LabeledList__row",l]),[(0,e.createComponentVNode)(2,t.Box,{as:"td",color:i,className:(0,a.classes)(["LabeledList__cell","LabeledList__label"]),style:N,children:c?c+":":null}),(0,e.createComponentVNode)(2,t.Box,{as:"td",color:u,textAlign:s,className:(0,a.classes)(["LabeledList__cell","LabeledList__content"]),colSpan:d?void 0:2,preserveWhitespace:p,children:[C,h]}),d&&(0,e.createVNode)(1,"td","LabeledList__cell LabeledList__buttons",d,0)],0);return v&&(V=(0,e.createComponentVNode)(2,f.Tooltip,{content:v,children:V})),V};S.defaultHooks=a.pureComponentHooks;var B=function(g){var l=g.size?(0,t.unit)(Math.max(0,g.size-1)):0;return(0,e.createVNode)(1,"tr","LabeledList__row",(0,e.createVNode)(1,"td",null,(0,e.createComponentVNode)(2,o.Divider),2,{colSpan:3,style:{"padding-top":l,"padding-bottom":l}}),2)};B.defaultHooks=a.pureComponentHooks,b.Item=S,b.Divider=B},36077:function(T,r,n){"use strict";r.__esModule=!0,r.Modal=void 0;var e=n(89005),a=n(35840),t=n(55937),o=n(61940),f=["className","children","onEnter"];/** * @file * @copyright 2020 Aleksej Komarov * @license MIT - */function b(B,k){if(B==null)return{};var g={};for(var l in B)if({}.hasOwnProperty.call(B,l)){if(k.includes(l))continue;g[l]=B[l]}return g}var y=r.Modal=function(){function B(k){var g=k.className,l=k.children,c=k.onEnter,m=b(k,f),i;return c&&(i=function(){function u(s){s.keyCode===13&&c(s)}return u}()),(0,e.createComponentVNode)(2,o.Dimmer,{onKeyDown:i,children:(0,e.normalizeProps)((0,e.createVNode)(1,"div",(0,a.classes)(["Modal",g,(0,t.computeBoxClassName)(m)]),l,0,Object.assign({},(0,t.computeBoxProps)(m))))})}return B}()},73280:function(T,r,n){"use strict";r.__esModule=!0,r.NanoMap=void 0;var e=n(89005),a=n(36036),t=n(72253),o=n(29319),f=n(79911),b=n(79140),y=["x","y","icon","tooltip","color","children"],B=["icon","color"];function k(h,C){if(h==null)return{};var p={};for(var N in h)if({}.hasOwnProperty.call(h,N)){if(C.includes(N))continue;p[N]=h[N]}return p}function g(h,C){h.prototype=Object.create(C.prototype),h.prototype.constructor=h,l(h,C)}function l(h,C){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,N){return p.__proto__=N,p},l(h,C)}var c=510,m=2,i=function(C){return C.stopPropagation&&C.stopPropagation(),C.preventDefault&&C.preventDefault(),C.cancelBubble=!0,C.returnValue=!1,!1},u=r.NanoMap=function(h){function C(N){var V,S,I,L;L=h.call(this,N)||this;var w=window.innerWidth/2-256,A=window.innerHeight/2-256;return L.state={offsetX:(V=N.offsetX)!=null?V:0,offsetY:(S=N.offsetY)!=null?S:0,dragging:!1,originX:null,originY:null,zoom:(I=N.zoom)!=null?I:1},L.handleDragStart=function(x){L.ref=x.target,L.setState({dragging:!1,originX:x.screenX,originY:x.screenY}),document.addEventListener("mousemove",L.handleDragMove),document.addEventListener("mouseup",L.handleDragEnd),i(x)},L.handleDragMove=function(x){L.setState(function(E){var P=Object.assign({},E),D=x.screenX-P.originX,M=x.screenY-P.originY;return E.dragging?(P.offsetX+=D/P.zoom,P.offsetY+=M/P.zoom,P.originX=x.screenX,P.originY=x.screenY):P.dragging=!0,P}),i(x)},L.handleDragEnd=function(x){L.setState({dragging:!1,originX:null,originY:null}),document.removeEventListener("mousemove",L.handleDragMove),document.removeEventListener("mouseup",L.handleDragEnd),N.onOffsetChange==null||N.onOffsetChange(x,L.state),i(x)},L.handleZoom=function(x,E){L.setState(function(P){var D=Math.min(Math.max(E,1),8);return P.zoom=D,N.onZoom&&N.onZoom(P.zoom),P})},L.handleReset=function(x){L.setState(function(E){E.offsetX=0,E.offsetY=0,E.zoom=1,L.handleZoom(x,1),N.onOffsetChange==null||N.onOffsetChange(x,E)})},L}g(C,h);var p=C.prototype;return p.getChildContext=function(){function N(){return{map:{zoom:this.state.zoom}}}return N}(),p.render=function(){function N(){var V=(0,t.useBackend)(this.context),S=V.config,I=this.state,L=I.dragging,w=I.offsetX,A=I.offsetY,x=I.zoom,E=x===void 0?1:x,P=this.props.children,D=S.map+"_nanomap_z1.png",M=c*E+"px",R={width:M,height:M,"margin-top":A*E+"px","margin-left":w*E+"px",overflow:"hidden",position:"relative",top:"50%",left:"50%",transform:"translate(-50%, -50%)","background-size":"cover","background-repeat":"no-repeat","text-align":"center",cursor:L?"move":"auto"},O={width:"100%",height:"100%",position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)","-ms-interpolation-mode":"nearest-neighbor","image-rendering":"pixelated"};return(0,e.createComponentVNode)(2,a.Box,{className:"NanoMap__container",children:[(0,e.createComponentVNode)(2,a.Box,{style:R,onMouseDown:this.handleDragStart,children:[(0,e.createVNode)(1,"img",null,null,1,{src:(0,b.resolveAsset)(D),style:O}),(0,e.createComponentVNode)(2,a.Box,{children:P})]}),(0,e.createComponentVNode)(2,v,{zoom:E,onZoom:this.handleZoom,onReset:this.handleReset})]})}return N}(),C}(e.Component),s=function(C,p){var N=p.map.zoom,V=C.x,S=C.y,I=C.icon,L=C.tooltip,w=C.color,A=C.children,x=k(C,y),E=m*N,P=(V-1)*E,D=(S-1)*E;return(0,e.createVNode)(1,"div",null,(0,e.createComponentVNode)(2,a.Tooltip,{content:L,children:(0,e.normalizeProps)((0,e.createComponentVNode)(2,a.Box,Object.assign({position:"absolute",className:"NanoMap__marker",lineHeight:"0",bottom:D+"px",left:P+"px",width:E+"px",height:E+"px"},x,{children:A})))}),2)};u.Marker=s;var d=function(C,p){var N=p.map.zoom,V=C.icon,S=C.color,I=k(C,B),L=m*N+4/Math.ceil(N/4);return(0,e.normalizeProps)((0,e.createComponentVNode)(2,s,Object.assign({},I,{children:(0,e.createComponentVNode)(2,a.Icon,{name:V,color:S,fontSize:L+"px",style:{position:"relative",top:"50%",left:"50%",transform:"translate(-50%, -50%)"}})})))};u.MarkerIcon=d;var v=function(C,p){return(0,e.createComponentVNode)(2,a.Box,{className:"NanoMap__zoomer",children:(0,e.createComponentVNode)(2,o.LabeledList,{children:(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Zoom",labelStyle:{"vertical-align":"middle"},children:(0,e.createComponentVNode)(2,a.Flex,{direction:"row",children:[(0,e.createComponentVNode)(2,f.Slider,{minValue:1,maxValue:8,stepPixelSize:10,format:function(){function N(V){return V+"x"}return N}(),value:C.zoom,onDrag:function(){function N(V,S){return C.onZoom(V,S)}return N}()}),(0,e.createComponentVNode)(2,a.Button,{ml:"0.5em",float:"right",icon:"sync",tooltip:"Reset View",onClick:function(){function N(V){return C.onReset==null?void 0:C.onReset(V)}return N}()})]})})})})};u.Zoomer=v},74733:function(T,r,n){"use strict";r.__esModule=!0,r.NoticeBox=void 0;var e=n(89005),a=n(35840),t=n(55937),o=["className","color","info","warning","success","danger"];/** + */function b(B,k){if(B==null)return{};var g={};for(var l in B)if({}.hasOwnProperty.call(B,l)){if(k.includes(l))continue;g[l]=B[l]}return g}var S=r.Modal=function(){function B(k){var g=k.className,l=k.children,c=k.onEnter,m=b(k,f),i;return c&&(i=function(){function u(s){s.keyCode===13&&c(s)}return u}()),(0,e.createComponentVNode)(2,o.Dimmer,{onKeyDown:i,children:(0,e.normalizeProps)((0,e.createVNode)(1,"div",(0,a.classes)(["Modal",g,(0,t.computeBoxClassName)(m)]),l,0,Object.assign({},(0,t.computeBoxProps)(m))))})}return B}()},73280:function(T,r,n){"use strict";r.__esModule=!0,r.NanoMap=void 0;var e=n(89005),a=n(36036),t=n(72253),o=n(29319),f=n(79911),b=n(79140),S=["x","y","icon","tooltip","color","children"],B=["icon","color"];function k(C,h){if(C==null)return{};var p={};for(var N in C)if({}.hasOwnProperty.call(C,N)){if(h.includes(N))continue;p[N]=C[N]}return p}function g(C,h){C.prototype=Object.create(h.prototype),C.prototype.constructor=C,l(C,h)}function l(C,h){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,N){return p.__proto__=N,p},l(C,h)}var c=510,m=2,i=function(h){return h.stopPropagation&&h.stopPropagation(),h.preventDefault&&h.preventDefault(),h.cancelBubble=!0,h.returnValue=!1,!1},u=r.NanoMap=function(C){function h(N){var V,y,I,L;L=C.call(this,N)||this;var w=window.innerWidth/2-256,A=window.innerHeight/2-256;return L.state={offsetX:(V=N.offsetX)!=null?V:0,offsetY:(y=N.offsetY)!=null?y:0,dragging:!1,originX:null,originY:null,zoom:(I=N.zoom)!=null?I:1},L.handleDragStart=function(x){L.ref=x.target,L.setState({dragging:!1,originX:x.screenX,originY:x.screenY}),document.addEventListener("mousemove",L.handleDragMove),document.addEventListener("mouseup",L.handleDragEnd),i(x)},L.handleDragMove=function(x){L.setState(function(E){var P=Object.assign({},E),D=x.screenX-P.originX,M=x.screenY-P.originY;return E.dragging?(P.offsetX+=D/P.zoom,P.offsetY+=M/P.zoom,P.originX=x.screenX,P.originY=x.screenY):P.dragging=!0,P}),i(x)},L.handleDragEnd=function(x){L.setState({dragging:!1,originX:null,originY:null}),document.removeEventListener("mousemove",L.handleDragMove),document.removeEventListener("mouseup",L.handleDragEnd),N.onOffsetChange==null||N.onOffsetChange(x,L.state),i(x)},L.handleZoom=function(x,E){L.setState(function(P){var D=Math.min(Math.max(E,1),8);return P.zoom=D,N.onZoom&&N.onZoom(P.zoom),P})},L.handleReset=function(x){L.setState(function(E){E.offsetX=0,E.offsetY=0,E.zoom=1,L.handleZoom(x,1),N.onOffsetChange==null||N.onOffsetChange(x,E)})},L}g(h,C);var p=h.prototype;return p.getChildContext=function(){function N(){return{map:{zoom:this.state.zoom}}}return N}(),p.render=function(){function N(){var V=(0,t.useBackend)(this.context),y=V.config,I=this.state,L=I.dragging,w=I.offsetX,A=I.offsetY,x=I.zoom,E=x===void 0?1:x,P=this.props.children,D=y.map+"_nanomap_z1.png",M=c*E+"px",R={width:M,height:M,"margin-top":A*E+"px","margin-left":w*E+"px",overflow:"hidden",position:"relative",top:"50%",left:"50%",transform:"translate(-50%, -50%)","background-size":"cover","background-repeat":"no-repeat","text-align":"center",cursor:L?"move":"auto"},O={width:"100%",height:"100%",position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)","-ms-interpolation-mode":"nearest-neighbor","image-rendering":"pixelated"};return(0,e.createComponentVNode)(2,a.Box,{className:"NanoMap__container",children:[(0,e.createComponentVNode)(2,a.Box,{style:R,onMouseDown:this.handleDragStart,children:[(0,e.createVNode)(1,"img",null,null,1,{src:(0,b.resolveAsset)(D),style:O}),(0,e.createComponentVNode)(2,a.Box,{children:P})]}),(0,e.createComponentVNode)(2,v,{zoom:E,onZoom:this.handleZoom,onReset:this.handleReset})]})}return N}(),h}(e.Component),s=function(h,p){var N=p.map.zoom,V=h.x,y=h.y,I=h.icon,L=h.tooltip,w=h.color,A=h.children,x=k(h,S),E=m*N,P=(V-1)*E,D=(y-1)*E;return(0,e.createVNode)(1,"div",null,(0,e.createComponentVNode)(2,a.Tooltip,{content:L,children:(0,e.normalizeProps)((0,e.createComponentVNode)(2,a.Box,Object.assign({position:"absolute",className:"NanoMap__marker",lineHeight:"0",bottom:D+"px",left:P+"px",width:E+"px",height:E+"px"},x,{children:A})))}),2)};u.Marker=s;var d=function(h,p){var N=p.map.zoom,V=h.icon,y=h.color,I=k(h,B),L=m*N+4/Math.ceil(N/4);return(0,e.normalizeProps)((0,e.createComponentVNode)(2,s,Object.assign({},I,{children:(0,e.createComponentVNode)(2,a.Icon,{name:V,color:y,fontSize:L+"px",style:{position:"relative",top:"50%",left:"50%",transform:"translate(-50%, -50%)"}})})))};u.MarkerIcon=d;var v=function(h,p){return(0,e.createComponentVNode)(2,a.Box,{className:"NanoMap__zoomer",children:(0,e.createComponentVNode)(2,o.LabeledList,{children:(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Zoom",labelStyle:{"vertical-align":"middle"},children:(0,e.createComponentVNode)(2,a.Flex,{direction:"row",children:[(0,e.createComponentVNode)(2,f.Slider,{minValue:1,maxValue:8,stepPixelSize:10,format:function(){function N(V){return V+"x"}return N}(),value:h.zoom,onDrag:function(){function N(V,y){return h.onZoom(V,y)}return N}()}),(0,e.createComponentVNode)(2,a.Button,{ml:"0.5em",float:"right",icon:"sync",tooltip:"Reset View",onClick:function(){function N(V){return h.onReset==null?void 0:h.onReset(V)}return N}()})]})})})})};u.Zoomer=v},74733:function(T,r,n){"use strict";r.__esModule=!0,r.NoticeBox=void 0;var e=n(89005),a=n(35840),t=n(55937),o=["className","color","info","warning","success","danger"];/** * @file * @copyright 2020 Aleksej Komarov * @license MIT - */function f(y,B){if(y==null)return{};var k={};for(var g in y)if({}.hasOwnProperty.call(y,g)){if(B.includes(g))continue;k[g]=y[g]}return k}var b=r.NoticeBox=function(){function y(B){var k=B.className,g=B.color,l=B.info,c=B.warning,m=B.success,i=B.danger,u=f(B,o);return(0,e.normalizeProps)((0,e.createComponentVNode)(2,t.Box,Object.assign({className:(0,a.classes)(["NoticeBox",g&&"NoticeBox--color--"+g,l&&"NoticeBox--type--info",m&&"NoticeBox--type--success",i&&"NoticeBox--type--danger",k])},u)))}return y}();b.defaultHooks=a.pureComponentHooks},59263:function(T,r,n){"use strict";r.__esModule=!0,r.NumberInput=void 0;var e=n(89005),a=n(44879),t=n(35840),o=n(9474),f=n(55937);function b(g,l){g.prototype=Object.create(l.prototype),g.prototype.constructor=g,y(g,l)}function y(g,l){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(c,m){return c.__proto__=m,c},y(g,l)}/** + */function f(S,B){if(S==null)return{};var k={};for(var g in S)if({}.hasOwnProperty.call(S,g)){if(B.includes(g))continue;k[g]=S[g]}return k}var b=r.NoticeBox=function(){function S(B){var k=B.className,g=B.color,l=B.info,c=B.warning,m=B.success,i=B.danger,u=f(B,o);return(0,e.normalizeProps)((0,e.createComponentVNode)(2,t.Box,Object.assign({className:(0,a.classes)(["NoticeBox",g&&"NoticeBox--color--"+g,l&&"NoticeBox--type--info",m&&"NoticeBox--type--success",i&&"NoticeBox--type--danger",k])},u)))}return S}();b.defaultHooks=a.pureComponentHooks},59263:function(T,r,n){"use strict";r.__esModule=!0,r.NumberInput=void 0;var e=n(89005),a=n(44879),t=n(35840),o=n(9474),f=n(55937);function b(g,l){g.prototype=Object.create(l.prototype),g.prototype.constructor=g,S(g,l)}function S(g,l){return S=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(c,m){return c.__proto__=m,c},S(g,l)}/** * @file * @copyright 2020 Aleksej Komarov * @license MIT -*/var B=400,k=r.NumberInput=function(g){function l(m){var i;i=g.call(this,m)||this;var u=m.value;return i.inputRef=(0,e.createRef)(),i.state={value:u,dragging:!1,editing:!1,internalValue:null,origin:null,suppressingFlicker:!1},i.flickerTimer=null,i.suppressFlicker=function(){var s=i.props.suppressFlicker;s>0&&(i.setState({suppressingFlicker:!0}),clearTimeout(i.flickerTimer),i.flickerTimer=setTimeout(function(){return i.setState({suppressingFlicker:!1})},s))},i.handleDragStart=function(s){var d=i.props.value,v=i.state.editing;v||(document.body.style["pointer-events"]="none",i.ref=s.target,i.setState({dragging:!1,origin:s.screenY,value:d,internalValue:d}),i.timer=setTimeout(function(){i.setState({dragging:!0})},250),i.dragInterval=setInterval(function(){var h=i.state,C=h.dragging,p=h.value,N=i.props.onDrag;C&&N&&N(s,p)},i.props.updateRate||B),document.addEventListener("mousemove",i.handleDragMove),document.addEventListener("mouseup",i.handleDragEnd))},i.handleDragMove=function(s){var d=i.props,v=d.minValue,h=d.maxValue,C=d.step,p=d.stepPixelSize;i.setState(function(N){var V=Object.assign({},N),S=V.origin-s.screenY;if(N.dragging){var I=Number.isFinite(v)?v%C:0;V.internalValue=(0,a.clamp)(V.internalValue+S*C/p,v-C,h+C),V.value=(0,a.clamp)(V.internalValue-V.internalValue%C+I,v,h),V.origin=s.screenY}else Math.abs(S)>4&&(V.dragging=!0);return V})},i.handleDragEnd=function(s){var d=i.props,v=d.onChange,h=d.onDrag,C=i.state,p=C.dragging,N=C.value,V=C.internalValue;if(document.body.style["pointer-events"]="auto",clearTimeout(i.timer),clearInterval(i.dragInterval),i.setState({dragging:!1,editing:!p,origin:null}),document.removeEventListener("mousemove",i.handleDragMove),document.removeEventListener("mouseup",i.handleDragEnd),p)i.suppressFlicker(),v&&v(s,N),h&&h(s,N);else if(i.inputRef){var S=i.inputRef.current;S.value=V;try{S.focus(),S.select()}catch(I){}}},i}b(l,g);var c=l.prototype;return c.render=function(){function m(){var i=this,u=this.state,s=u.dragging,d=u.editing,v=u.value,h=u.suppressingFlicker,C=this.props,p=C.className,N=C.fluid,V=C.animated,S=C.value,I=C.unit,L=C.minValue,w=C.maxValue,A=C.height,x=C.width,E=C.lineHeight,P=C.fontSize,D=C.format,M=C.onChange,R=C.onDrag,O=S;(s||h)&&(O=v);var F=(0,e.createVNode)(1,"div","NumberInput__content",[V&&!s&&!h?(0,e.createComponentVNode)(2,o.AnimatedNumber,{value:O,format:D}):D?D(O):O,I?" "+I:""],0);return(0,e.createComponentVNode)(2,f.Box,{className:(0,t.classes)(["NumberInput",N&&"NumberInput--fluid",p]),minWidth:x,minHeight:A,lineHeight:E,fontSize:P,onMouseDown:this.handleDragStart,children:[(0,e.createVNode)(1,"div","NumberInput__barContainer",(0,e.createVNode)(1,"div","NumberInput__bar",null,1,{style:{height:(0,a.clamp)((O-L)/(w-L)*100,0,100)+"%"}}),2),F,(0,e.createVNode)(64,"input","NumberInput__input",null,1,{style:{display:d?void 0:"none",height:A,"line-height":E,"font-size":P},onBlur:function(){function _(U){if(d){var z=(0,a.clamp)(parseFloat(U.target.value),L,w);if(Number.isNaN(z)){i.setState({editing:!1});return}i.setState({editing:!1,value:z}),i.suppressFlicker(),M&&M(U,z),R&&R(U,z)}}return _}(),onKeyDown:function(){function _(U){if(U.keyCode===13){var z=(0,a.clamp)(parseFloat(U.target.value),L,w);if(Number.isNaN(z)){i.setState({editing:!1});return}i.setState({editing:!1,value:z}),i.suppressFlicker(),M&&M(U,z),R&&R(U,z);return}if(U.keyCode===27){i.setState({editing:!1});return}}return _}()},null,this.inputRef)]})}return m}(),l}(e.Component);k.defaultHooks=t.pureComponentHooks,k.defaultProps={minValue:-1/0,maxValue:1/0,step:1,stepPixelSize:1,suppressFlicker:50}},33337:function(T,r,n){"use strict";r.__esModule=!0,r.Pointer=void 0;var e=n(89005),a=n(35840),t=r.Pointer=function(){function o(f){var b=f.className,y=f.color,B=f.left,k=f.top,g=k===void 0?.5:k,l=(0,a.classes)(["react-colorful__pointer",b]),c={top:g*100+"%",left:B*100+"%"};return(0,e.createVNode)(1,"div",l,(0,e.createVNode)(1,"div","react-colorful__pointer-fill",null,1,{style:{"background-color":y}}),2,{style:c})}return o}()},50186:function(T,r,n){"use strict";r.__esModule=!0,r.Popper=void 0;var e=n(95996),a=n(89005);function t(b,y){b.prototype=Object.create(y.prototype),b.prototype.constructor=b,o(b,y)}function o(b,y){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(B,k){return B.__proto__=k,B},o(b,y)}var f=r.Popper=function(b){function y(){var k;return k=b.call(this)||this,k.renderedContent=void 0,k.popperInstance=void 0,y.id+=1,k}t(y,b);var B=y.prototype;return B.componentDidMount=function(){function k(){var g=this,l=this.props,c=l.additionalStyles,m=l.options;if(this.renderedContent=document.createElement("div"),c)for(var i=0,u=Object.entries(c);i0&&(i.setState({suppressingFlicker:!0}),clearTimeout(i.flickerTimer),i.flickerTimer=setTimeout(function(){return i.setState({suppressingFlicker:!1})},s))},i.handleDragStart=function(s){var d=i.props.value,v=i.state.editing;v||(document.body.style["pointer-events"]="none",i.ref=s.target,i.setState({dragging:!1,origin:s.screenY,value:d,internalValue:d}),i.timer=setTimeout(function(){i.setState({dragging:!0})},250),i.dragInterval=setInterval(function(){var C=i.state,h=C.dragging,p=C.value,N=i.props.onDrag;h&&N&&N(s,p)},i.props.updateRate||B),document.addEventListener("mousemove",i.handleDragMove),document.addEventListener("mouseup",i.handleDragEnd))},i.handleDragMove=function(s){var d=i.props,v=d.minValue,C=d.maxValue,h=d.step,p=d.stepPixelSize;i.setState(function(N){var V=Object.assign({},N),y=V.origin-s.screenY;if(N.dragging){var I=Number.isFinite(v)?v%h:0;V.internalValue=(0,a.clamp)(V.internalValue+y*h/p,v-h,C+h),V.value=(0,a.clamp)(V.internalValue-V.internalValue%h+I,v,C),V.origin=s.screenY}else Math.abs(y)>4&&(V.dragging=!0);return V})},i.handleDragEnd=function(s){var d=i.props,v=d.onChange,C=d.onDrag,h=i.state,p=h.dragging,N=h.value,V=h.internalValue;if(document.body.style["pointer-events"]="auto",clearTimeout(i.timer),clearInterval(i.dragInterval),i.setState({dragging:!1,editing:!p,origin:null}),document.removeEventListener("mousemove",i.handleDragMove),document.removeEventListener("mouseup",i.handleDragEnd),p)i.suppressFlicker(),v&&v(s,N),C&&C(s,N);else if(i.inputRef){var y=i.inputRef.current;y.value=V;try{y.focus(),y.select()}catch(I){}}},i}b(l,g);var c=l.prototype;return c.render=function(){function m(){var i=this,u=this.state,s=u.dragging,d=u.editing,v=u.value,C=u.suppressingFlicker,h=this.props,p=h.className,N=h.fluid,V=h.animated,y=h.value,I=h.unit,L=h.minValue,w=h.maxValue,A=h.height,x=h.width,E=h.lineHeight,P=h.fontSize,D=h.format,M=h.onChange,R=h.onDrag,O=y;(s||C)&&(O=v);var F=(0,e.createVNode)(1,"div","NumberInput__content",[V&&!s&&!C?(0,e.createComponentVNode)(2,o.AnimatedNumber,{value:O,format:D}):D?D(O):O,I?" "+I:""],0);return(0,e.createComponentVNode)(2,f.Box,{className:(0,t.classes)(["NumberInput",N&&"NumberInput--fluid",p]),minWidth:x,minHeight:A,lineHeight:E,fontSize:P,onMouseDown:this.handleDragStart,children:[(0,e.createVNode)(1,"div","NumberInput__barContainer",(0,e.createVNode)(1,"div","NumberInput__bar",null,1,{style:{height:(0,a.clamp)((O-L)/(w-L)*100,0,100)+"%"}}),2),F,(0,e.createVNode)(64,"input","NumberInput__input",null,1,{style:{display:d?void 0:"none",height:A,"line-height":E,"font-size":P},onBlur:function(){function _(U){if(d){var z=(0,a.clamp)(parseFloat(U.target.value),L,w);if(Number.isNaN(z)){i.setState({editing:!1});return}i.setState({editing:!1,value:z}),i.suppressFlicker(),M&&M(U,z),R&&R(U,z)}}return _}(),onKeyDown:function(){function _(U){if(U.keyCode===13){var z=(0,a.clamp)(parseFloat(U.target.value),L,w);if(Number.isNaN(z)){i.setState({editing:!1});return}i.setState({editing:!1,value:z}),i.suppressFlicker(),M&&M(U,z),R&&R(U,z);return}if(U.keyCode===27){i.setState({editing:!1});return}}return _}()},null,this.inputRef)]})}return m}(),l}(e.Component);k.defaultHooks=t.pureComponentHooks,k.defaultProps={minValue:-1/0,maxValue:1/0,step:1,stepPixelSize:1,suppressFlicker:50}},33337:function(T,r,n){"use strict";r.__esModule=!0,r.Pointer=void 0;var e=n(89005),a=n(35840),t=r.Pointer=function(){function o(f){var b=f.className,S=f.color,B=f.left,k=f.top,g=k===void 0?.5:k,l=(0,a.classes)(["react-colorful__pointer",b]),c={top:g*100+"%",left:B*100+"%"};return(0,e.createVNode)(1,"div",l,(0,e.createVNode)(1,"div","react-colorful__pointer-fill",null,1,{style:{"background-color":S}}),2,{style:c})}return o}()},50186:function(T,r,n){"use strict";r.__esModule=!0,r.Popper=void 0;var e=n(95996),a=n(89005);function t(b,S){b.prototype=Object.create(S.prototype),b.prototype.constructor=b,o(b,S)}function o(b,S){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(B,k){return B.__proto__=k,B},o(b,S)}var f=r.Popper=function(b){function S(){var k;return k=b.call(this)||this,k.renderedContent=void 0,k.popperInstance=void 0,S.id+=1,k}t(S,b);var B=S.prototype;return B.componentDidMount=function(){function k(){var g=this,l=this.props,c=l.additionalStyles,m=l.options;if(this.renderedContent=document.createElement("div"),c)for(var i=0,u=Object.entries(c);im)return"in the future";c=c/10,m=m/10;var i=m-c;if(i>3600){var u=Math.round(i/3600);return u+" hour"+(u===1?"":"s")+" ago"}else if(i>60){var s=Math.round(i/60);return s+" minute"+(s===1?"":"s")+" ago"}else{var d=Math.round(i);return d+" second"+(d===1?"":"s")+" ago"}return"just now"}return l}()},40944:function(T,r,n){"use strict";r.__esModule=!0,r.KitchenSink=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595);/** +*/var l=r.TextArea=function(c){function m(u,s){var d;d=c.call(this,u,s)||this,d.textareaRef=u.innerRef||(0,e.createRef)(),d.fillerRef=(0,e.createRef)(),d.state={editing:!1};var v=u.dontUseTabForIndent,C=v===void 0?!1:v;return d.handleOnInput=function(h){var p=d.state.editing,N=d.props.onInput;p||d.setEditing(!0),N&&N(h,h.target.value)},d.handleOnChange=function(h){var p=d.state.editing,N=d.props.onChange;N&&N(h,h.target.value)},d.handleKeyPress=function(h){var p=d.state.editing,N=d.props.onKeyPress;p||d.setEditing(!0),N&&N(h,h.target.value)},d.handleKeyDown=function(h){var p=d.state.editing,N=d.props,V=N.onChange,y=N.onInput,I=N.onEnter,L=N.onKeyDown;if(h.keyCode===f.KEY_ENTER){d.setEditing(!1),V&&V(h,h.target.value),y&&y(h,h.target.value),I&&I(h,h.target.value),d.props.selfClear&&(h.target.value="",h.target.blur());return}if(h.keyCode===f.KEY_ESCAPE){d.props.onEscape&&d.props.onEscape(h),d.setEditing(!1),d.props.selfClear?h.target.value="":(h.target.value=(0,o.toInputValue)(d.props.value),h.target.blur());return}if(p||d.setEditing(!0),L&&L(h,h.target.value),!C){var w=h.keyCode||h.which;if(w===f.KEY_TAB){h.preventDefault();var A=h.target,x=A.value,E=A.selectionStart,P=A.selectionEnd;h.target.value=x.substring(0,E)+" "+x.substring(P),h.target.selectionEnd=E+1}}},d.handleFocus=function(h){var p=d.state.editing;p||d.setEditing(!0)},d.handleBlur=function(h){var p=d.state.editing,N=d.props.onChange;p&&(d.setEditing(!1),N&&N(h,h.target.value))},d}k(m,c);var i=m.prototype;return i.componentDidMount=function(){function u(){var s=this,d=this.props.value,v=this.textareaRef.current;v&&(v.value=(0,o.toInputValue)(d)),(this.props.autoFocus||this.props.autoSelect)&&setTimeout(function(){v.focus(),s.props.autoSelect&&v.select()},1)}return u}(),i.componentDidUpdate=function(){function u(s,d){var v=s.value,C=this.props.value,h=this.textareaRef.current;h&&typeof C=="string"&&v!==C&&(h.value=(0,o.toInputValue)(C))}return u}(),i.setEditing=function(){function u(s){this.setState({editing:s})}return u}(),i.getValue=function(){function u(){return this.textareaRef.current&&this.textareaRef.current.value}return u}(),i.render=function(){function u(){var s=this.props,d=s.onChange,v=s.onKeyDown,C=s.onKeyPress,h=s.onInput,p=s.onFocus,N=s.onBlur,V=s.onEnter,y=s.value,I=s.maxLength,L=s.placeholder,w=B(s,b),A=w.className,x=w.fluid,E=B(w,S);return(0,e.normalizeProps)((0,e.createComponentVNode)(2,t.Box,Object.assign({className:(0,a.classes)(["TextArea",x&&"TextArea--fluid",A])},E,{children:(0,e.createVNode)(128,"textarea","TextArea__textarea",null,1,{placeholder:L,onChange:this.handleOnChange,onKeyDown:this.handleKeyDown,onKeyPress:this.handleKeyPress,onInput:this.handleOnInput,onFocus:this.handleFocus,onBlur:this.handleBlur,maxLength:I},null,this.textareaRef)})))}return u}(),m}(e.Component)},5169:function(T,r){"use strict";r.__esModule=!0,r.TimeDisplay=void 0;var n=function(t){(!t||t<0)&&(t=0);var o=Math.floor(t/60).toString(10),f=(Math.floor(t)%60).toString(10);return[o,f].map(function(b){return b.length<2?"0"+b:b}).join(":")},e=r.TimeDisplay=function(){function a(t){var o=t.totalSeconds,f=o===void 0?0:o;return n(f)}return a}()},62147:function(T,r,n){"use strict";r.__esModule=!0,r.Tooltip=void 0;var e=n(89005),a=n(95996),t;function o(k,g){k.prototype=Object.create(g.prototype),k.prototype.constructor=k,f(k,g)}function f(k,g){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(l,c){return l.__proto__=c,l},f(k,g)}var b={modifiers:[{name:"eventListeners",enabled:!1}]},S={width:0,height:0,top:0,right:0,bottom:0,left:0,x:0,y:0,toJSON:function(){function k(){return null}return k}()},B=r.Tooltip=function(k){function g(){return k.apply(this,arguments)||this}o(g,k);var l=g.prototype;return l.getDOMNode=function(){function c(){return(0,e.findDOMFromVNode)(this.$LI,!0)}return c}(),l.componentDidMount=function(){function c(){var m=this,i=this.getDOMNode();i&&(i.addEventListener("mouseenter",function(){var u=g.renderedTooltip;u===void 0&&(u=document.createElement("div"),u.className="Tooltip",document.body.appendChild(u),g.renderedTooltip=u),g.currentHoveredElement=i,u.style.opacity="1",m.renderPopperContent()}),i.addEventListener("mouseleave",function(){m.fadeOut()}))}return c}(),l.fadeOut=function(){function c(){g.currentHoveredElement===this.getDOMNode()&&(g.currentHoveredElement=void 0,g.renderedTooltip.style.opacity="0")}return c}(),l.renderPopperContent=function(){function c(){var m=this,i=g.renderedTooltip;i&&(0,e.render)((0,e.createVNode)(1,"span",null,this.props.content,0),i,function(){var u=g.singletonPopper;u===void 0?(u=(0,a.createPopper)(g.virtualElement,i,Object.assign({},b,{placement:m.props.position||"auto"})),g.singletonPopper=u):(u.setOptions(Object.assign({},b,{placement:m.props.position||"auto"})),u.update())},this.context)}return c}(),l.componentDidUpdate=function(){function c(){g.currentHoveredElement===this.getDOMNode()&&this.renderPopperContent()}return c}(),l.componentWillUnmount=function(){function c(){this.fadeOut()}return c}(),l.render=function(){function c(){return this.props.children}return c}(),g}(e.Component);t=B,B.renderedTooltip=void 0,B.singletonPopper=void 0,B.currentHoveredElement=void 0,B.virtualElement={getBoundingClientRect:function(){function k(){var g,l;return(g=(l=t.currentHoveredElement)==null?void 0:l.getBoundingClientRect())!=null?g:S}return k}()}},36036:function(T,r,n){"use strict";r.__esModule=!0,r.Tooltip=r.TimeDisplay=r.TextArea=r.Tabs=r.Table=r.Stack=r.Slider=r.Section=r.RoundGauge=r.RestrictedInput=r.ProgressBar=r.Popper=r.Pointer=r.NumberInput=r.NoticeBox=r.NanoMap=r.Modal=r.LabeledList=r.LabeledControls=r.Knob=r.Interactive=r.Input=r.ImageButton=r.Image=r.Icon=r.Grid=r.Flex=r.Dropdown=r.DraggableControl=r.DmIcon=r.Divider=r.Dimmer=r.Countdown=r.ColorBox=r.Collapsible=r.Chart=r.ByondUi=r.Button=r.Box=r.BlockQuote=r.Blink=r.Autofocus=r.AnimatedNumber=void 0;var e=n(9474);r.AnimatedNumber=e.AnimatedNumber;var a=n(27185);r.Autofocus=a.Autofocus;var t=n(5814);r.Blink=t.Blink;var o=n(61773);r.BlockQuote=o.BlockQuote;var f=n(55937);r.Box=f.Box;var b=n(96184);r.Button=b.Button;var S=n(18982);r.ByondUi=S.ByondUi;var B=n(66820);r.Chart=B.Chart;var k=n(4796);r.Collapsible=k.Collapsible;var g=n(88894);r.ColorBox=g.ColorBox;var l=n(73379);r.Countdown=l.Countdown;var c=n(61940);r.Dimmer=c.Dimmer;var m=n(13605);r.Divider=m.Divider;var i=n(20342);r.DraggableControl=i.DraggableControl;var u=n(87099);r.Dropdown=u.Dropdown;var s=n(39473);r.Flex=s.Flex;var d=n(79646);r.Grid=d.Grid;var v=n(4454);r.Interactive=v.Interactive;var C=n(91225);r.Image=C.Image;var h=n(60218);r.DmIcon=h.DmIcon;var p=n(1331);r.Icon=p.Icon;var N=n(79825);r.ImageButton=N.ImageButton;var V=n(79652);r.Input=V.Input;var y=n(76334);r.Knob=y.Knob;var I=n(78621);r.LabeledControls=I.LabeledControls;var L=n(29319);r.LabeledList=L.LabeledList;var w=n(36077);r.Modal=w.Modal;var A=n(73280);r.NanoMap=A.NanoMap;var x=n(74733);r.NoticeBox=x.NoticeBox;var E=n(59263);r.NumberInput=E.NumberInput;var P=n(33337);r.Pointer=P.Pointer;var D=n(50186);r.Popper=D.Popper;var M=n(92704);r.ProgressBar=M.ProgressBar;var R=n(9075);r.RestrictedInput=R.RestrictedInput;var O=n(11441);r.RoundGauge=O.RoundGauge;var F=n(97079);r.Section=F.Section;var _=n(79911);r.Slider=_.Slider;var U=n(96690);r.Stack=U.Stack;var z=n(36352);r.Table=z.Table;var $=n(85138);r.Tabs=$.Tabs;var G=n(44868);r.TextArea=G.TextArea;var X=n(5169);r.TimeDisplay=X.TimeDisplay;var J=n(62147);r.Tooltip=J.Tooltip},76910:function(T,r){"use strict";r.__esModule=!0,r.timeAgo=r.getGasLabel=r.getGasColor=r.UI_UPDATE=r.UI_INTERACTIVE=r.UI_DISABLED=r.UI_CLOSE=r.RADIO_CHANNELS=r.CSS_COLORS=r.COLORS=void 0;var n=r.UI_INTERACTIVE=2,e=r.UI_UPDATE=1,a=r.UI_DISABLED=0,t=r.UI_CLOSE=-1,o=r.COLORS={department:{command:"#526aff",security:"#CF0000",medical:"#009190",science:"#993399",engineering:"#A66300",supply:"#9F8545",service:"#80A000",centcom:"#78789B",other:"#C38312"},damageType:{oxy:"#3498db",toxin:"#2ecc71",burn:"#e67e22",brute:"#e74c3c"}},f=r.CSS_COLORS=["black","white","red","orange","yellow","olive","green","teal","blue","violet","purple","pink","brown","grey","good","average","bad","label"],b=r.RADIO_CHANNELS=[{name:"Syndicate",freq:1213,color:"#a52a2a"},{name:"SyndTeam",freq:1244,color:"#a52a2a"},{name:"Red Team",freq:1215,color:"#ff4444"},{name:"Blue Team",freq:1217,color:"#3434fd"},{name:"Response Team",freq:1345,color:"#2681a5"},{name:"Special Ops",freq:1341,color:"#2681a5"},{name:"Supply",freq:1347,color:"#b88646"},{name:"Service",freq:1349,color:"#6ca729"},{name:"Science",freq:1351,color:"#c68cfa"},{name:"Command",freq:1353,color:"#5177ff"},{name:"Procedure",freq:1339,color:"#F70285"},{name:"Medical",freq:1355,color:"#57b8f0"},{name:"Medical(I)",freq:1485,color:"#57b8f0"},{name:"Engineering",freq:1357,color:"#f37746"},{name:"Security",freq:1359,color:"#dd3535"},{name:"Security(I)",freq:1475,color:"#dd3535"},{name:"AI Private",freq:1343,color:"#d65d95"},{name:"Common",freq:1459,color:"#1ecc43"}],S=[{id:"o2",name:"Oxygen",label:"O\u2082",color:"blue"},{id:"n2",name:"Nitrogen",label:"N\u2082",color:"red"},{id:"co2",name:"Carbon Dioxide",label:"CO\u2082",color:"grey"},{id:"plasma",name:"Plasma",label:"Plasma",color:"pink"},{id:"water_vapor",name:"Water Vapor",label:"H\u2082O",color:"grey"},{id:"nob",name:"Hyper-noblium",label:"Hyper-nob",color:"teal"},{id:"n2o",name:"Nitrous Oxide",label:"N\u2082O",color:"red"},{id:"no2",name:"Nitryl",label:"NO\u2082",color:"brown"},{id:"tritium",name:"Tritium",label:"Tritium",color:"green"},{id:"bz",name:"BZ",label:"BZ",color:"purple"},{id:"stim",name:"Stimulum",label:"Stimulum",color:"purple"},{id:"pluox",name:"Pluoxium",label:"Pluoxium",color:"blue"},{id:"miasma",name:"Miasma",label:"Miasma",color:"olive"},{id:"hydrogen",name:"Hydrogen",label:"H\u2082",color:"white"},{id:"ab",name:"Agent B",label:"Agent B",color:"purple"}],B=r.getGasLabel=function(){function l(c,m){var i=String(c).toLowerCase(),u=S.find(function(s){return s.id===i||s.name.toLowerCase()===i});return u&&u.label||m||c}return l}(),k=r.getGasColor=function(){function l(c){var m=String(c).toLowerCase(),i=S.find(function(u){return u.id===m||u.name.toLowerCase()===m});return i&&i.color}return l}(),g=r.timeAgo=function(){function l(c,m){if(c>m)return"in the future";c=c/10,m=m/10;var i=m-c;if(i>3600){var u=Math.round(i/3600);return u+" hour"+(u===1?"":"s")+" ago"}else if(i>60){var s=Math.round(i/60);return s+" minute"+(s===1?"":"s")+" ago"}else{var d=Math.round(i);return d+" second"+(d===1?"":"s")+" ago"}return"just now"}return l}()},40944:function(T,r,n){"use strict";r.__esModule=!0,r.KitchenSink=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595);/** * @file * @copyright 2020 Aleksej Komarov * @license MIT - */var f=n(4085),b=function(){return f.keys().map(function(k){return f(k)})},y=r.KitchenSink=function(){function B(k,g){var l=k.panel,c=(0,a.useLocalState)(g,"kitchenSinkTheme"),m=c[0],i=(0,a.useLocalState)(g,"pageIndex",0),u=i[0],s=i[1],d=b(),v=d[u],h=l?o.Pane:o.Window;return(0,e.createComponentVNode)(2,h,{title:"Kitchen Sink",width:600,height:500,theme:m,children:(0,e.createComponentVNode)(2,t.Flex,{height:"100%",children:[(0,e.createComponentVNode)(2,t.Flex.Item,{m:1,mr:0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,fitted:!0,children:(0,e.createComponentVNode)(2,t.Tabs,{vertical:!0,children:d.map(function(C,p){return(0,e.createComponentVNode)(2,t.Tabs.Tab,{color:"transparent",selected:p===u,onClick:function(){function N(){return s(p)}return N}(),children:C.meta.title},p)})})})}),(0,e.createComponentVNode)(2,t.Flex.Item,{position:"relative",grow:1,children:(0,e.createComponentVNode)(2,h.Content,{scrollable:!0,children:v.meta.render()})})]})})}return B}()},77384:function(T,r,n){"use strict";r.__esModule=!0,r.toggleKitchenSink=r.toggleDebugLayout=r.openExternalBrowser=void 0;var e=n(85307);/** + */var f=n(4085),b=function(){return f.keys().map(function(k){return f(k)})},S=r.KitchenSink=function(){function B(k,g){var l=k.panel,c=(0,a.useLocalState)(g,"kitchenSinkTheme"),m=c[0],i=(0,a.useLocalState)(g,"pageIndex",0),u=i[0],s=i[1],d=b(),v=d[u],C=l?o.Pane:o.Window;return(0,e.createComponentVNode)(2,C,{title:"Kitchen Sink",width:600,height:500,theme:m,children:(0,e.createComponentVNode)(2,t.Flex,{height:"100%",children:[(0,e.createComponentVNode)(2,t.Flex.Item,{m:1,mr:0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,fitted:!0,children:(0,e.createComponentVNode)(2,t.Tabs,{vertical:!0,children:d.map(function(h,p){return(0,e.createComponentVNode)(2,t.Tabs.Tab,{color:"transparent",selected:p===u,onClick:function(){function N(){return s(p)}return N}(),children:h.meta.title},p)})})})}),(0,e.createComponentVNode)(2,t.Flex.Item,{position:"relative",grow:1,children:(0,e.createComponentVNode)(2,C.Content,{scrollable:!0,children:v.meta.render()})})]})})}return B}()},77384:function(T,r,n){"use strict";r.__esModule=!0,r.toggleKitchenSink=r.toggleDebugLayout=r.openExternalBrowser=void 0;var e=n(85307);/** * @file * @copyright 2020 Aleksej Komarov * @license MIT @@ -210,7 +210,7 @@ * @file * @copyright 2020 Aleksej Komarov * @license MIT - */var f=["backend/update","chat/message"],b=r.debugMiddleware=function(){function B(k){return(0,t.acquireHotKey)(e.KEY_F11),(0,t.acquireHotKey)(e.KEY_F12),a.globalEvents.on("keydown",function(g){g.code===e.KEY_F11&&k.dispatch((0,o.toggleDebugLayout)()),g.code===e.KEY_F12&&k.dispatch((0,o.toggleKitchenSink)()),g.ctrl&&g.alt&&g.code===e.KEY_BACKSPACE&&setTimeout(function(){throw new Error("OOPSIE WOOPSIE!! UwU We made a fucky wucky!! A wittle fucko boingo! The code monkeys at our headquarters are working VEWY HAWD to fix this!")})}),function(g){return function(l){return g(l)}}}return B}(),y=r.relayMiddleware=function(){function B(k){var g=n(7435),l=location.search==="?external";return l?g.subscribe(function(c){var m=c.type,i=c.payload;m==="relay"&&i.windowId===Byond.windowId&&k.dispatch(Object.assign({},i.action,{relayed:!0}))}):((0,t.acquireHotKey)(e.KEY_F10),a.globalEvents.on("keydown",function(c){c===e.KEY_F10&&k.dispatch((0,o.openExternalBrowser)())})),function(c){return function(m){var i=m.type,u=m.payload,s=m.relayed;if(i===o.openExternalBrowser.type){window.open(location.href+"?external","_blank");return}return f.includes(i)&&!s&&!l&&g.sendMessage({type:"relay",payload:{windowId:Byond.windowId,action:m}}),c(m)}}}return B}()},19147:function(T,r){"use strict";r.__esModule=!0,r.debugReducer=void 0;/** + */var f=["backend/update","chat/message"],b=r.debugMiddleware=function(){function B(k){return(0,t.acquireHotKey)(e.KEY_F11),(0,t.acquireHotKey)(e.KEY_F12),a.globalEvents.on("keydown",function(g){g.code===e.KEY_F11&&k.dispatch((0,o.toggleDebugLayout)()),g.code===e.KEY_F12&&k.dispatch((0,o.toggleKitchenSink)()),g.ctrl&&g.alt&&g.code===e.KEY_BACKSPACE&&setTimeout(function(){throw new Error("OOPSIE WOOPSIE!! UwU We made a fucky wucky!! A wittle fucko boingo! The code monkeys at our headquarters are working VEWY HAWD to fix this!")})}),function(g){return function(l){return g(l)}}}return B}(),S=r.relayMiddleware=function(){function B(k){var g=n(7435),l=location.search==="?external";return l?g.subscribe(function(c){var m=c.type,i=c.payload;m==="relay"&&i.windowId===Byond.windowId&&k.dispatch(Object.assign({},i.action,{relayed:!0}))}):((0,t.acquireHotKey)(e.KEY_F10),a.globalEvents.on("keydown",function(c){c===e.KEY_F10&&k.dispatch((0,o.openExternalBrowser)())})),function(c){return function(m){var i=m.type,u=m.payload,s=m.relayed;if(i===o.openExternalBrowser.type){window.open(location.href+"?external","_blank");return}return f.includes(i)&&!s&&!l&&g.sendMessage({type:"relay",payload:{windowId:Byond.windowId,action:m}}),c(m)}}}return B}()},19147:function(T,r){"use strict";r.__esModule=!0,r.debugReducer=void 0;/** * @file * @copyright 2020 Aleksej Komarov * @license MIT @@ -222,13 +222,13 @@ * @file * @copyright 2020 Aleksej Komarov * @license MIT -*/var y=(0,t.createLogger)("drag"),B=Byond.windowId,k=!1,g=!1,l=[0,0],c,m,i,u,s,d=r.setWindowKey=function(){function O(F){B=F}return O}(),v=r.getWindowPosition=function(){function O(){return[window.screenLeft,window.screenTop]}return O}(),h=r.getWindowSize=function(){function O(){return[window.innerWidth,window.innerHeight]}return O}(),C=r.setWindowPosition=function(){function O(F){var _=(0,a.vecAdd)(F,l);return Byond.winset(Byond.windowId,{pos:_[0]+","+_[1]})}return O}(),p=r.setWindowSize=function(){function O(F){return Byond.winset(Byond.windowId,{size:F[0]+"x"+F[1]})}return O}(),N=r.getScreenPosition=function(){function O(){return[0-l[0],0-l[1]]}return O}(),V=r.getScreenSize=function(){function O(){return[window.screen.availWidth,window.screen.availHeight]}return O}(),S=function(F,_,U){U===void 0&&(U=50);for(var z=[_],$,G=0;Gse&&($[X]=se-_[X],G=!0)}return[G,$]},x=r.dragStartHandler=function(){function O(F){y.log("drag start"),k=!0,m=[window.screenLeft-F.screenX,window.screenTop-F.screenY],document.addEventListener("mousemove",P),document.addEventListener("mouseup",E),P(F)}return O}(),E=function O(F){y.log("drag end"),P(F),document.removeEventListener("mousemove",P),document.removeEventListener("mouseup",O),k=!1,I()},P=function(F){k&&(F.preventDefault(),C((0,a.vecAdd)([F.screenX,F.screenY],m)))},D=r.resizeStartHandler=function(){function O(F,_){return function(U){i=[F,_],y.log("resize start",i),g=!0,m=[window.screenLeft-U.screenX,window.screenTop-U.screenY],u=[window.innerWidth,window.innerHeight],document.addEventListener("mousemove",R),document.addEventListener("mouseup",M),R(U)}}return O}(),M=function O(F){y.log("resize end",s),R(F),document.removeEventListener("mousemove",R),document.removeEventListener("mouseup",O),g=!1,I()},R=function(F){g&&(F.preventDefault(),s=(0,a.vecAdd)(u,(0,a.vecMultiply)(i,(0,a.vecAdd)([F.screenX,F.screenY],(0,a.vecInverse)([window.screenLeft,window.screenTop]),m,[1,1]))),s[0]=Math.max(s[0],150),s[1]=Math.max(s[1],50),p(s))}},24826:function(T,r,n){"use strict";r.__esModule=!0,r.setupGlobalEvents=r.removeScrollableNode=r.globalEvents=r.canStealFocus=r.addScrollableNode=r.KeyEvent=void 0;var e=n(92868),a=n(92986);/** +*/var S=(0,t.createLogger)("drag"),B=Byond.windowId,k=!1,g=!1,l=[0,0],c,m,i,u,s,d=r.setWindowKey=function(){function O(F){B=F}return O}(),v=r.getWindowPosition=function(){function O(){return[window.screenLeft,window.screenTop]}return O}(),C=r.getWindowSize=function(){function O(){return[window.innerWidth,window.innerHeight]}return O}(),h=r.setWindowPosition=function(){function O(F){var _=(0,a.vecAdd)(F,l);return Byond.winset(Byond.windowId,{pos:_[0]+","+_[1]})}return O}(),p=r.setWindowSize=function(){function O(F){return Byond.winset(Byond.windowId,{size:F[0]+"x"+F[1]})}return O}(),N=r.getScreenPosition=function(){function O(){return[0-l[0],0-l[1]]}return O}(),V=r.getScreenSize=function(){function O(){return[window.screen.availWidth,window.screen.availHeight]}return O}(),y=function(F,_,U){U===void 0&&(U=50);for(var z=[_],$,G=0;Gse&&($[X]=se-_[X],G=!0)}return[G,$]},x=r.dragStartHandler=function(){function O(F){S.log("drag start"),k=!0,m=[window.screenLeft-F.screenX,window.screenTop-F.screenY],document.addEventListener("mousemove",P),document.addEventListener("mouseup",E),P(F)}return O}(),E=function O(F){S.log("drag end"),P(F),document.removeEventListener("mousemove",P),document.removeEventListener("mouseup",O),k=!1,I()},P=function(F){k&&(F.preventDefault(),h((0,a.vecAdd)([F.screenX,F.screenY],m)))},D=r.resizeStartHandler=function(){function O(F,_){return function(U){i=[F,_],S.log("resize start",i),g=!0,m=[window.screenLeft-U.screenX,window.screenTop-U.screenY],u=[window.innerWidth,window.innerHeight],document.addEventListener("mousemove",R),document.addEventListener("mouseup",M),R(U)}}return O}(),M=function O(F){S.log("resize end",s),R(F),document.removeEventListener("mousemove",R),document.removeEventListener("mouseup",O),g=!1,I()},R=function(F){g&&(F.preventDefault(),s=(0,a.vecAdd)(u,(0,a.vecMultiply)(i,(0,a.vecAdd)([F.screenX,F.screenY],(0,a.vecInverse)([window.screenLeft,window.screenTop]),m,[1,1]))),s[0]=Math.max(s[0],150),s[1]=Math.max(s[1],50),p(s))}},24826:function(T,r,n){"use strict";r.__esModule=!0,r.setupGlobalEvents=r.removeScrollableNode=r.globalEvents=r.canStealFocus=r.addScrollableNode=r.KeyEvent=void 0;var e=n(92868),a=n(92986);/** * Normalized browser focus events and BYOND-specific focus helpers. * * @file * @copyright 2020 Aleksej Komarov * @license MIT - */var t=r.globalEvents=new e.EventEmitter,o=!1,f=r.setupGlobalEvents=function(){function p(N){N===void 0&&(N={}),o=!!N.ignoreWindowFocus}return p}(),b,y=!0,B=function p(N,V){if(o){y=!0;return}if(b&&(clearTimeout(b),b=null),V){b=setTimeout(function(){return p(N)});return}y!==N&&(y=N,t.emit(N?"window-focus":"window-blur"),t.emit("window-focus-change",N))},k=null,g=r.canStealFocus=function(){function p(N){var V=String(N.tagName).toLowerCase();return V==="input"||V==="textarea"}return p}(),l=function(N){c(),k=N,k.addEventListener("blur",c)},c=function p(){k&&(k.removeEventListener("blur",p),k=null)},m=null,i=null,u=[],s=r.addScrollableNode=function(){function p(N){u.push(N)}return p}(),d=r.removeScrollableNode=function(){function p(N){var V=u.indexOf(N);V>=0&&u.splice(V,1)}return p}(),v=function(N){if(!(k||!y))for(var V=document.body;N&&N!==V;){if(u.includes(N)){if(N.contains(m))return;m=N,N.focus();return}N=N.parentNode}};window.addEventListener("mousemove",function(p){var N=p.target;N!==i&&(i=N,v(N))}),window.addEventListener("focusin",function(p){if(i=null,m=p.target,B(!0),g(p.target)){l(p.target);return}}),window.addEventListener("focusout",function(p){i=null,B(!1,!0)}),window.addEventListener("blur",function(p){i=null,B(!1,!0)}),window.addEventListener("beforeunload",function(p){B(!1)});var h={},C=r.KeyEvent=function(){function p(V,S,I){this.event=V,this.type=S,this.code=window.event?V.which:V.keyCode,this.ctrl=V.ctrlKey,this.shift=V.shiftKey,this.alt=V.altKey,this.repeat=!!I}var N=p.prototype;return N.hasModifierKeys=function(){function V(){return this.ctrl||this.alt||this.shift}return V}(),N.isModifierKey=function(){function V(){return this.code===a.KEY_CTRL||this.code===a.KEY_SHIFT||this.code===a.KEY_ALT}return V}(),N.isDown=function(){function V(){return this.type==="keydown"}return V}(),N.isUp=function(){function V(){return this.type==="keyup"}return V}(),N.toString=function(){function V(){return this._str?this._str:(this._str="",this.ctrl&&(this._str+="Ctrl+"),this.alt&&(this._str+="Alt+"),this.shift&&(this._str+="Shift+"),this.code>=48&&this.code<=90?this._str+=String.fromCharCode(this.code):this.code>=a.KEY_F1&&this.code<=a.KEY_F12?this._str+="F"+(this.code-111):this._str+="["+this.code+"]",this._str)}return V}(),p}();document.addEventListener("keydown",function(p){if(!g(p.target)){var N=p.keyCode,V=new C(p,"keydown",h[N]);t.emit("keydown",V),t.emit("key",V),h[N]=!0}}),document.addEventListener("keyup",function(p){if(!g(p.target)){var N=p.keyCode,V=new C(p,"keyup");t.emit("keyup",V),t.emit("key",V),h[N]=!1}})},87695:function(T,r){"use strict";r.__esModule=!0,r.focusWindow=r.focusMap=void 0;/** + */var t=r.globalEvents=new e.EventEmitter,o=!1,f=r.setupGlobalEvents=function(){function p(N){N===void 0&&(N={}),o=!!N.ignoreWindowFocus}return p}(),b,S=!0,B=function p(N,V){if(o){S=!0;return}if(b&&(clearTimeout(b),b=null),V){b=setTimeout(function(){return p(N)});return}S!==N&&(S=N,t.emit(N?"window-focus":"window-blur"),t.emit("window-focus-change",N))},k=null,g=r.canStealFocus=function(){function p(N){var V=String(N.tagName).toLowerCase();return V==="input"||V==="textarea"}return p}(),l=function(N){c(),k=N,k.addEventListener("blur",c)},c=function p(){k&&(k.removeEventListener("blur",p),k=null)},m=null,i=null,u=[],s=r.addScrollableNode=function(){function p(N){u.push(N)}return p}(),d=r.removeScrollableNode=function(){function p(N){var V=u.indexOf(N);V>=0&&u.splice(V,1)}return p}(),v=function(N){if(!(k||!S))for(var V=document.body;N&&N!==V;){if(u.includes(N)){if(N.contains(m))return;m=N,N.focus();return}N=N.parentNode}};window.addEventListener("mousemove",function(p){var N=p.target;N!==i&&(i=N,v(N))}),window.addEventListener("focusin",function(p){if(i=null,m=p.target,B(!0),g(p.target)){l(p.target);return}}),window.addEventListener("focusout",function(p){i=null,B(!1,!0)}),window.addEventListener("blur",function(p){i=null,B(!1,!0)}),window.addEventListener("beforeunload",function(p){B(!1)});var C={},h=r.KeyEvent=function(){function p(V,y,I){this.event=V,this.type=y,this.code=window.event?V.which:V.keyCode,this.ctrl=V.ctrlKey,this.shift=V.shiftKey,this.alt=V.altKey,this.repeat=!!I}var N=p.prototype;return N.hasModifierKeys=function(){function V(){return this.ctrl||this.alt||this.shift}return V}(),N.isModifierKey=function(){function V(){return this.code===a.KEY_CTRL||this.code===a.KEY_SHIFT||this.code===a.KEY_ALT}return V}(),N.isDown=function(){function V(){return this.type==="keydown"}return V}(),N.isUp=function(){function V(){return this.type==="keyup"}return V}(),N.toString=function(){function V(){return this._str?this._str:(this._str="",this.ctrl&&(this._str+="Ctrl+"),this.alt&&(this._str+="Alt+"),this.shift&&(this._str+="Shift+"),this.code>=48&&this.code<=90?this._str+=String.fromCharCode(this.code):this.code>=a.KEY_F1&&this.code<=a.KEY_F12?this._str+="F"+(this.code-111):this._str+="["+this.code+"]",this._str)}return V}(),p}();document.addEventListener("keydown",function(p){if(!g(p.target)){var N=p.keyCode,V=new h(p,"keydown",C[N]);t.emit("keydown",V),t.emit("key",V),C[N]=!0}}),document.addEventListener("keyup",function(p){if(!g(p.target)){var N=p.keyCode,V=new h(p,"keyup");t.emit("keyup",V),t.emit("key",V),C[N]=!1}})},87695:function(T,r){"use strict";r.__esModule=!0,r.focusWindow=r.focusMap=void 0;/** * Various focus helpers. * * @file @@ -238,117 +238,117 @@ * @file * @copyright 2020 Aleksej Komarov * @license MIT - */var a=["f","p","n","\u03BC","m"," ","k","M","G","T","P","E","Z","Y"],t=a.indexOf(" "),o=r.formatSiUnit=function(){function B(k,g,l){if(g===void 0&&(g=-t),l===void 0&&(l=""),typeof k!="number"||!Number.isFinite(k))return k;var c=Math.floor(Math.log10(k)),m=Math.floor(Math.max(g*3,c)),i=Math.floor(c/3),u=Math.floor(m/3),s=(0,e.clamp)(t+u,0,a.length),d=a[s],v=k/Math.pow(1e3,u),h=i>g?2+u*3-m:0,C=(0,e.toFixed)(v,h)+" "+d+l;return C.trim()}return B}(),f=r.formatPower=function(){function B(k,g){return g===void 0&&(g=0),o(k,g,"W")}return B}(),b=r.formatMoney=function(){function B(k,g){if(g===void 0&&(g=0),!Number.isFinite(k))return k;var l=(0,e.round)(k,g);g>0&&(l=(0,e.toFixed)(k,g)),l=String(l);var c=l.length,m=l.indexOf(".");m===-1&&(m=c);for(var i="",u=0;u0&&u=0?"+":g<0?"\u2013":"",c=Math.abs(g);return c===1/0?c="Inf":c=(0,e.toFixed)(c,2),l+c+" dB"}return B}()},56518:function(T,r,n){"use strict";r.__esModule=!0,r.setupHotKeys=r.releaseHotKey=r.releaseHeldKeys=r.acquireHotKey=void 0;var e=f(n(92986)),a=n(24826),t=n(9394);function o(s){if(typeof WeakMap!="function")return null;var d=new WeakMap,v=new WeakMap;return(o=function(C){return C?v:d})(s)}function f(s,d){if(!d&&s&&s.__esModule)return s;if(s===null||typeof s!="object"&&typeof s!="function")return{default:s};var v=o(d);if(v&&v.has(s))return v.get(s);var h={__proto__:null},C=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var p in s)if(p!=="default"&&{}.hasOwnProperty.call(s,p)){var N=C?Object.getOwnPropertyDescriptor(s,p):null;N&&(N.get||N.set)?Object.defineProperty(h,p,N):h[p]=s[p]}return h.default=s,v&&v.set(s,h),h}/** + */var a=["f","p","n","\u03BC","m"," ","k","M","G","T","P","E","Z","Y"],t=a.indexOf(" "),o=r.formatSiUnit=function(){function B(k,g,l){if(g===void 0&&(g=-t),l===void 0&&(l=""),typeof k!="number"||!Number.isFinite(k))return k;var c=Math.floor(Math.log10(k)),m=Math.floor(Math.max(g*3,c)),i=Math.floor(c/3),u=Math.floor(m/3),s=(0,e.clamp)(t+u,0,a.length),d=a[s],v=k/Math.pow(1e3,u),C=i>g?2+u*3-m:0,h=(0,e.toFixed)(v,C)+" "+d+l;return h.trim()}return B}(),f=r.formatPower=function(){function B(k,g){return g===void 0&&(g=0),o(k,g,"W")}return B}(),b=r.formatMoney=function(){function B(k,g){if(g===void 0&&(g=0),!Number.isFinite(k))return k;var l=(0,e.round)(k,g);g>0&&(l=(0,e.toFixed)(k,g)),l=String(l);var c=l.length,m=l.indexOf(".");m===-1&&(m=c);for(var i="",u=0;u0&&u=0?"+":g<0?"\u2013":"",c=Math.abs(g);return c===1/0?c="Inf":c=(0,e.toFixed)(c,2),l+c+" dB"}return B}()},56518:function(T,r,n){"use strict";r.__esModule=!0,r.setupHotKeys=r.releaseHotKey=r.releaseHeldKeys=r.acquireHotKey=void 0;var e=f(n(92986)),a=n(24826),t=n(9394);function o(s){if(typeof WeakMap!="function")return null;var d=new WeakMap,v=new WeakMap;return(o=function(h){return h?v:d})(s)}function f(s,d){if(!d&&s&&s.__esModule)return s;if(s===null||typeof s!="object"&&typeof s!="function")return{default:s};var v=o(d);if(v&&v.has(s))return v.get(s);var C={__proto__:null},h=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var p in s)if(p!=="default"&&{}.hasOwnProperty.call(s,p)){var N=h?Object.getOwnPropertyDescriptor(s,p):null;N&&(N.get||N.set)?Object.defineProperty(C,p,N):C[p]=s[p]}return C.default=s,v&&v.set(s,C),C}/** * @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={},g=function(d){if(d===16)return"Shift";if(d===17)return"Ctrl";if(d===18)return"Alt";if(d===33)return"Northeast";if(d===34)return"Southeast";if(d===35)return"Southwest";if(d===36)return"Northwest";if(d===37)return"West";if(d===38)return"North";if(d===39)return"East";if(d===40)return"South";if(d===45)return"Insert";if(d===46)return"Delete";if(d>=48&&d<=57||d>=65&&d<=90)return String.fromCharCode(d);if(d>=96&&d<=105)return"Numpad"+(d-96);if(d>=112&&d<=123)return"F"+(d-111);if(d===188)return",";if(d===189)return"-";if(d===190)return"."},l=function(d){var v=String(d);if(v==="Ctrl+F5"||v==="Ctrl+R"){location.reload();return}if(v!=="Ctrl+F"&&!(d.event.defaultPrevented||d.isModifierKey()||B.includes(d.code))){v==="F5"&&(d.event.preventDefault(),d.event.returnValue=!1);var h=g(d.code);if(h){var C=y[h];if(C)return b.debug("macro",C),Byond.command(C);if(d.isDown()&&!k[h]){k[h]=!0;var p='Key_Down "'+h+'"';return b.debug(p),Byond.command(p)}if(d.isUp()&&k[h]){k[h]=!1;var N='Key_Up "'+h+'"';return b.debug(N),Byond.command(N)}}}},c=r.acquireHotKey=function(){function s(d){B.push(d)}return s}(),m=r.releaseHotKey=function(){function s(d){var v=B.indexOf(d);v>=0&&B.splice(v,1)}return s}(),i=r.releaseHeldKeys=function(){function s(){for(var d=0,v=Object.keys(k);d0||(0,a.fetchRetry)((0,e.resolveAsset)("icon_ref_map.json")).then(function(b){return b.json()}).then(function(b){return Byond.iconRefMap=b}).catch(function(b){return t.logger.log(b)})}return f}()},1090:function(T,r,n){"use strict";r.__esModule=!0,r.AICard=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.AICard=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,l=k.data;if(l.has_ai===0)return(0,e.createComponentVNode)(2,o.Window,{width:250,height:120,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Stored AI",children:(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createVNode)(1,"h3",null,"No AI detected.",16)})})})});var c=null;return l.integrity>=75?c="green":l.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:l.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:l.integrity/100})})}),(0,e.createComponentVNode)(2,t.Box,{color:"red",children:(0,e.createVNode)(1,"h2",null,l.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:!!l.has_laws&&(0,e.createComponentVNode)(2,t.Box,{children:l.laws.map(function(m,i){return(0,e.createComponentVNode)(2,t.Box,{children:m},i)})})||(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:l.wireless?"check":"times",content:l.wireless?"Enabled":"Disabled",color:l.wireless?"green":"red",onClick:function(){function m(){return g("wireless")}return m}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Subspace Transceiver",children:(0,e.createComponentVNode)(2,t.Button,{width:10,icon:l.radio?"check":"times",content:l.radio?"Enabled":"Disabled",color:l.radio?"green":"red",onClick:function(){function m(){return g("radio")}return m}()})}),(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:l.flushing||l.integrity===0,confirmColor:"red",content:"Wipe AI",onClick:function(){function m(){return g("wipe")}return m}()})})]})})})]})})})}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),f=r.AIFixer=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,l=k.data;if(l.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;(l.stat===2||l.stat===null)&&(c=!1);var m=null;l.integrity>=75?m="green":l.integrity>=25?m="yellow":m="red";var i=!0;return l.integrity>=100&&l.stat!==2&&(i=!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:l.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:m,value:l.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:!!l.has_laws&&(0,e.createComponentVNode)(2,t.Box,{children:l.laws.map(function(u,s){return(0,e.createComponentVNode)(2,t.Box,{inline:!0,children:u},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:l.wireless?"times":"check",content:l.wireless?"Disabled":"Enabled",color:l.wireless?"red":"green",onClick:function(){function u(){return g("wireless")}return u}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Subspace Transceiver",children:(0,e.createComponentVNode)(2,t.Button,{icon:l.radio?"times":"check",content:l.radio?"Disabled":"Enabled",color:l.radio?"red":"green",onClick:function(){function u(){return g("radio")}return u}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Start Repairs",children:(0,e.createComponentVNode)(2,t.Button,{icon:"wrench",disabled:!i||l.active,content:!i||l.active?"Already Repaired":"Repair",onClick:function(){function u(){return g("fix")}return u}()})})]}),(0,e.createComponentVNode)(2,t.Box,{color:"green",lineHeight:2,children:l.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),f=n(195),b=r.APC=function(){function g(l,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 g}(),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(l,c){var m=(0,a.useBackend)(c),i=m.act,u=m.data,s=u.locked&&!u.siliconUser,d=u.normallyLocked,v=y[u.externalPower]||y[0],h=y[u.chargingStatus]||y[0],C=u.powerChannels||[],p=B[u.malfStatus]||B[0],N=u.powerCellStatus/100;return(0,e.createFragment)([(0,e.createComponentVNode)(2,f.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:v.color,buttons:(0,e.createComponentVNode)(2,t.Button,{icon:u.isOperating?"power-off":"times",content:u.isOperating?"On":"Off",selected:u.isOperating&&!s,color:u.isOperating?"":"bad",disabled:s,onClick:function(){function V(){return i("breaker")}return V}()}),children:["[ ",v.externalPowerText," ]"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Power Cell",children:(0,e.createComponentVNode)(2,t.ProgressBar,{color:"good",value:N})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Charge Mode",color:h.color,buttons:(0,e.createComponentVNode)(2,t.Button,{icon:u.chargeMode?"sync":"times",content:u.chargeMode?"Auto":"Off",selected:u.chargeMode,disabled:s,onClick:function(){function V(){return i("charge")}return V}()}),children:["[ ",h.chargingText," ]"]})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Power Channels",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[C.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 i("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 i("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 i("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,[u.totalLoad,(0,e.createTextVNode)(" W")],0)})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Misc",buttons:!!u.siliconUser&&(0,e.createFragment)([!!u.malfStatus&&(0,e.createComponentVNode)(2,t.Button,{icon:p.icon,content:p.content,color:"bad",onClick:function(){function V(){return i(p.action)}return V}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"lightbulb-o",content:"Overload",onClick:function(){function V(){return i("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:u.coverLocked?"lock":"unlock",content:u.coverLocked?"Engaged":"Disengaged",disabled:s,onClick:function(){function V(){return i("cover")}return V}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Emergency Lighting",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"lightbulb-o",content:u.emergencyLights?"Enabled":"Disabled",disabled:s,onClick:function(){function V(){return i("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:u.nightshiftLights?"Enabled":"Disabled",onClick:function(){function V(){return i("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),f=r.ATM=function(){function m(i,u){var s=(0,a.useBackend)(u),d=s.act,v=s.data,h=v.view_screen,C=v.authenticated_account,p=v.ticks_left_locked_down,N=v.linked_db,V;if(p>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(!N)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(C)switch(h){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,l);break;default:V=(0,e.createComponentVNode)(2,k)}else V=(0,e.createComponentVNode)(2,g);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 m}(),b=function(i,u){var s=(0,a.useBackend)(u),d=s.act,v=s.data,h=v.machine_id,C=v.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:C,icon:"eject",onClick:function(){function p(){return d("insert_card")}return p}()})})})]})},y=function(i,u){var s=(0,a.useBackend)(u),d=s.act,v=s.data,h=v.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:h===0,onClick:function(){function C(){return d("change_security_level",{new_security_level:1})}return C}()})}),(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:h===2,onClick:function(){function C(){return d("change_security_level",{new_security_level:2})}return C}()})}),(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(i,u){var s=(0,a.useBackend)(u),d=s.act,v=s.data,h=(0,a.useLocalState)(u,"targetAccNumber",0),C=h[0],p=h[1],N=(0,a.useLocalState)(u,"fundsAmount",0),V=N[0],S=N[1],I=(0,a.useLocalState)(u,"purpose",0),L=I[0],w=I[1],A=v.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 p(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 d("transfer",{target_acc_number:C,funds_amount:V,purpose:L})}return x}()}),(0,e.createComponentVNode)(2,t.Divider),(0,e.createComponentVNode)(2,c)]})},k=function(i,u){var s=(0,a.useBackend)(u),d=s.act,v=s.data,h=(0,a.useLocalState)(u,"fundsAmount",0),C=h[0],p=h[1],N=v.owner_name,V=v.money;return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Section,{title:"Welcome, "+N,buttons:(0,e.createComponentVNode)(2,t.Button,{content:"Logout",icon:"sign-out-alt",onClick:function(){function S(){return d("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 p(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 d("withdrawal",{funds_amount:C})}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 d("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 d("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 d("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 d("balance_statement")}return S}()})})]})],4)},g=function(i,u){var s=(0,a.useBackend)(u),d=s.act,v=s.data,h=(0,a.useLocalState)(u,"accountID",null),C=h[0],p=h[1],N=(0,a.useLocalState)(u,"accountPin",null),V=N[0],S=N[1],I=v.machine_id,L=v.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 p(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 d("attempt_auth",{account_num:C,account_pin:V})}return w}()})})]})})},l=function(i,u){var s=(0,a.useBackend)(u),d=s.act,v=s.data,h=v.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"})]}),h.map(function(C){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:C.time}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:C.purpose}),(0,e.createComponentVNode)(2,t.Table.Cell,{color:C.is_deposit?"green":"red",children:["$",C.amount]}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:C.target_name})]},C)})]}),(0,e.createComponentVNode)(2,t.Divider),(0,e.createComponentVNode)(2,c)]})},c=function(i,u){var s=(0,a.useBackend)(u),d=s.act,v=s.data;return(0,e.createComponentVNode)(2,t.Button,{content:"Back",icon:"sign-out-alt",onClick:function(){function h(){return d("view_screen",{view_screen:0})}return h}()})}},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),f=n(36352),b=n(98595),y=n(321),B=n(5485),k=r.AccountsUplinkTerminal=function(){function v(h,C){var p=(0,t.useBackend)(C),N=p.act,V=p.data,S=V.loginState,I=V.currentPage,L;if(S.logged_in)I===1?L=(0,e.createComponentVNode)(2,l):I===2?L=(0,e.createComponentVNode)(2,s):I===3&&(L=(0,e.createComponentVNode)(2,d));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,g),(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,children:L})]})})})}return v}(),g=function(h,C){var p=(0,t.useBackend)(C),N=p.data,V=(0,t.useLocalState)(C,"tabIndex",0),S=V[0],I=V[1],L=N.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"})]})})})},l=function(h,C){var p=(0,t.useLocalState)(C,"tabIndex",0),N=p[0];switch(N){case 0:return(0,e.createComponentVNode)(2,c);case 1:return(0,e.createComponentVNode)(2,m);default:return"You are somehow on a tab that doesn't exist! Please let a coder know."}},c=function(h,C){var p=(0,t.useBackend)(C),N=p.act,V=p.data,S=V.accounts,I=(0,t.useLocalState)(C,"searchText",""),L=I[0],w=I[1],A=(0,t.useLocalState)(C,"sortId","owner_name"),x=A[0],E=A[1],P=(0,t.useLocalState)(C,"sortOrder",!0),D=P[0],M=P[1];return(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,u),(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,i,{id:"owner_name",children:"Account Holder"}),(0,e.createComponentVNode)(2,i,{id:"account_number",children:"Account Number"}),(0,e.createComponentVNode)(2,i,{id:"suspended",children:"Account Status"}),(0,e.createComponentVNode)(2,i,{id:"money",children:"Account Balance"})]}),S.filter((0,a.createSearch)(L,function(R){return R.owner_name+"|"+R.account_number+"|"+R.suspended+"|"+R.money})).sort(function(R,O){var F=D?1:-1;return R[x].localeCompare(O[x])*F}).map(function(R){return(0,e.createComponentVNode)(2,o.Table.Row,{className:"AccountsUplinkTerminal__listRow--"+R.suspended,onClick:function(){function O(){return N("view_account_detail",{account_num:R.account_number})}return O}(),children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:[(0,e.createComponentVNode)(2,o.Icon,{name:"user"})," ",R.owner_name]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:["#",R.account_number]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:R.suspended}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:R.money})]},R.account_number)})]})})})]})},m=function(h,C){var p=(0,t.useBackend)(C),N=p.act,V=p.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,f.TableCell,{children:"Department Name"}),(0,e.createComponentVNode)(2,f.TableCell,{children:"Account Number"}),(0,e.createComponentVNode)(2,f.TableCell,{children:"Account Status"}),(0,e.createComponentVNode)(2,f.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 N("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)})]})})})})},i=function(h,C){var p=(0,t.useLocalState)(C,"sortId","name"),N=p[0],V=p[1],S=(0,t.useLocalState)(C,"sortOrder",!0),I=S[0],L=S[1],w=h.id,A=h.children;return(0,e.createComponentVNode)(2,o.Table.Cell,{children:(0,e.createComponentVNode)(2,o.Button,{color:N!==w&&"transparent",width:"100%",onClick:function(){function x(){N===w?L(!I):(V(w),L(!0))}return x}(),children:[A,N===w&&(0,e.createComponentVNode)(2,o.Icon,{name:I?"sort-up":"sort-down",ml:"0.25rem;"})]})})},u=function(h,C){var p=(0,t.useBackend)(C),N=p.act,V=p.data,S=V.is_printing,I=(0,t.useLocalState)(C,"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 N("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(h,C){var p=(0,t.useBackend)(C),N=p.act,V=p.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 N("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 N("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 N("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)})]})})})]})},d=function(h,C){var p=(0,t.useBackend)(C),N=p.act,V=p.data,S=(0,t.useLocalState)(C,"accName",""),I=S[0],L=S[1],w=(0,t.useLocalState)(C,"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 N("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,D){return L(D)}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,D){return x(D)}return E}()})})]}),(0,e.createComponentVNode)(2,o.Button,{mt:1,fluid:!0,content:"Create Account",onClick:function(){function E(){return N("finalise_create_account",{holder_name:I,starting_funds:A})}return E}()})]})}},23001:function(T,r,n){"use strict";r.__esModule=!0,r.AdminAntagMenu=void 0;var e=n(89005),a=n(25328),t=n(72253),o=n(36036),f=n(36352),b=n(98595),y=n(321),B=n(5485),k=function(v){switch(v){case 0:return"Antagonists";case 1:return"Objectives";case 2:return"Security";case 3:return"All High Value Items";default:return"Something went wrong with this menu, make an issue report please!"}},g=function(v){switch(v){case 0:return(0,e.createComponentVNode)(2,c);case 1:return(0,e.createComponentVNode)(2,m);case 2:return(0,e.createComponentVNode)(2,i);case 3:return(0,e.createComponentVNode)(2,u);default:return"Something went wrong with this menu, make an issue report please!"}},l=r.AdminAntagMenu=function(){function d(v,h){var C=(0,t.useBackend)(h),p=C.act,N=C.data,V=N.loginState,S=N.currentPage,I=(0,t.useLocalState)(h,"tabIndex",0),L=I[0],w=I[1],A=(0,t.useLocalState)(h,"searchText",""),x=A[0],E=A[1];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,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.NoticeBox,{children:"This menu is a Work in Progress. Some antagonists like Nuclear Operatives and Biohazards will not show up."})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Tabs,{children:[(0,e.createComponentVNode)(2,o.Tabs.Tab,{selected:L===0,onClick:function(){function P(){w(0)}return P}(),icon:"user",children:"Antagonists"},"Antagonists"),(0,e.createComponentVNode)(2,o.Tabs.Tab,{selected:L===1,onClick:function(){function P(){w(1)}return P}(),icon:"people-robbery",children:"Objectives"},"Objectives"),(0,e.createComponentVNode)(2,o.Tabs.Tab,{selected:L===2,onClick:function(){function P(){w(2)}return P}(),icon:"handcuffs",children:"Security"},"Security"),(0,e.createComponentVNode)(2,o.Tabs.Tab,{selected:L===3,onClick:function(){function P(){w(3)}return P}(),icon:"lock",children:"High Value Items"},"HighValueItems")]})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Section,{title:k(L),fill:!0,scrollable:!0,buttons:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,o.Input,{placeholder:"Search...",width:"300px",onInput:function(){function P(D,M){return E(M)}return P}()}),(0,e.createComponentVNode)(2,o.Button,{icon:"sync",onClick:function(){function P(){return p("refresh")}return P}(),children:"Refresh"})]}),children:g(L)})})]})})})}return d}(),c=function(v,h){var C=(0,t.useBackend)(h),p=C.act,N=C.data,V=N.antagonists,S=(0,t.useLocalState)(h,"searchText",""),I=S[0],L=S[1],w=(0,t.useLocalState)(h,"sortId","antag_name"),A=w[0],x=w[1],E=(0,t.useLocalState)(h,"sortOrder",!0),P=E[0],D=E[1];return V.length?(0,e.createComponentVNode)(2,o.Table,{className:"AdminAntagMenu__list",children:[(0,e.createComponentVNode)(2,o.Table.Row,{bold:!0,children:[(0,e.createComponentVNode)(2,s,{id:"name",children:"Mob Name"}),(0,e.createComponentVNode)(2,s,{id:"",children:"Buttons"}),(0,e.createComponentVNode)(2,s,{id:"antag_name",children:"Antagonist Type"}),(0,e.createComponentVNode)(2,s,{id:"status",children:"Status"})]}),V.filter((0,a.createSearch)(I,function(M){return M.name+"|"+M.status+"|"+M.antag_name})).sort(function(M,R){var O=P?1:-1;return M[A]===void 0||M[A]===null?O:R[A]===void 0||R[A]===null?-1*O:typeof M[A]=="number"?(M[A]-R[A])*O:M[A].localeCompare(R[A])*O}).map(function(M,R){return(0,e.createComponentVNode)(2,o.Table.Row,{children:[(0,e.createComponentVNode)(2,o.Table.Cell,{collapsing:!0,children:M.body_destroyed?M.name:(0,e.createComponentVNode)(2,o.Button,{color:M.is_hijacker||!M.name?"red":"",tooltip:M.is_hijacker?"Hijacker":"",onClick:function(){function O(){return p("show_player_panel",{mind_uid:M.antag_mind_uid})}return O}(),children:M.name?M.name:"??? (NO NAME)"})}),(0,e.createComponentVNode)(2,o.Table.Cell,{collapsing:!0,children:[(0,e.createComponentVNode)(2,o.Button,{onClick:function(){function O(){p("pm",{ckey:M.ckey})}return O}(),children:"PM"}),(0,e.createComponentVNode)(2,o.Button,{onClick:function(){function O(){p("follow",{datum_uid:M.antag_mind_uid})}return O}(),children:"FLW"}),(0,e.createComponentVNode)(2,o.Button,{onClick:function(){function O(){p("obs",{mind_uid:M.antag_mind_uid})}return O}(),children:"OBS"}),(0,e.createComponentVNode)(2,o.Button,{onClick:function(){function O(){p("tp",{mind_uid:M.antag_mind_uid})}return O}(),children:"TP"})]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:M.antag_name}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:(0,e.createComponentVNode)(2,o.Box,{color:M.status?"red":"grey",children:M.status?M.status:"Alive"})})]},R)})]}):"No Antagonists!"},m=function(v,h){var C=(0,t.useBackend)(h),p=C.act,N=C.data,V=N.objectives,S=(0,t.useLocalState)(h,"searchText",""),I=S[0],L=S[1],w=(0,t.useLocalState)(h,"sortId2","target_name"),A=w[0],x=w[1],E=(0,t.useLocalState)(h,"sortOrder",!0),P=E[0],D=E[1];return V.length?(0,e.createComponentVNode)(2,o.Table,{className:"AdminAntagMenu__list",children:[(0,e.createComponentVNode)(2,o.Table.Row,{bold:!0,children:[(0,e.createComponentVNode)(2,s,{sort_group:"sortId2",id:"obj_name",children:"Name"}),(0,e.createComponentVNode)(2,s,{sort_group:"sortId2",id:"target_name",children:"Target"}),(0,e.createComponentVNode)(2,s,{sort_group:"sortId2",id:"status",children:"Status"}),(0,e.createComponentVNode)(2,s,{sort_group:"sortId2",id:"owner_name",children:"Owner"})]}),V.filter((0,a.createSearch)(I,function(M){return M.obj_name+"|"+M.target_name+"|"+(M.status?"success":"incompleted")+"|"+M.owner_name})).sort(function(M,R){var O=P?1:-1;return M[A]===void 0||M[A]===null||A==="target_name"&&M.no_target?O:R[A]===void 0||R[A]===null||A==="target_name"&&R.no_target?-1*O:typeof M[A]=="number"?(M[A]-R[A])*O:M[A].localeCompare(R[A])*O}).map(function(M,R){return(0,e.createComponentVNode)(2,o.Table.Row,{children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:(0,e.createComponentVNode)(2,o.Button,{tooltip:M.obj_desc,onClick:function(){function O(){return p("vv",{uid:M.obj_uid})}return O}(),children:M.obj_name})}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:M.no_target?"":M.track.length?M.track.map(function(O,F){return(0,e.createComponentVNode)(2,o.Button,{onClick:function(){function _(){return p("follow",{datum_uid:O})}return _}(),children:[M.target_name," ",M.track.length>1?"("+(parseInt(F,10)+1)+")":""]},F)}):"No "+M.target_name+" Found"}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:(0,e.createComponentVNode)(2,o.Box,{color:M.status?"green":"grey",children:M.status?"Success":"Incomplete"})}),(0,e.createComponentVNode)(2,o.Table.Cell,{collapsing:!0,children:(0,e.createComponentVNode)(2,o.Button,{onClick:function(){function O(){p("obj_owner",{owner_uid:M.owner_uid})}return O}(),children:M.owner_name})})]},R)})]}):"No Objectives!"},i=function(v,h){var C=(0,t.useBackend)(h),p=C.act,N=C.data,V=N.security,S=(0,t.useLocalState)(h,"searchText",""),I=S[0],L=S[1],w=(0,t.useLocalState)(h,"sortId3","health"),A=w[0],x=w[1],E=(0,t.useLocalState)(h,"sortOrder",!0),P=E[0],D=E[1],M=function(F){return F.status===2?"red":F.status===1?"orange":F.broken_bone||F.internal_bleeding?"yellow":"grey"},R=function(F){return F.status===2?"Dead":F.status===1?"Unconscious":F.broken_bone&&F.internal_bleeding?"Broken Bone, IB":F.broken_bone?"Broken Bone":F.internal_bleeding?"IB":"Alive"};return V.length?(0,e.createComponentVNode)(2,o.Table,{className:"AdminAntagMenu__list",children:[(0,e.createComponentVNode)(2,o.Table.Row,{bold:!0,children:[(0,e.createComponentVNode)(2,s,{sort_group:"sortId3",id:"name",children:"Name"}),(0,e.createComponentVNode)(2,s,{sort_group:"sortId3",id:"role",children:"Role"}),(0,e.createComponentVNode)(2,s,{sort_group:"sortId3",id:"status",children:"Status"}),(0,e.createComponentVNode)(2,s,{sort_group:"sortId3",id:"antag",children:"Antag"}),(0,e.createComponentVNode)(2,s,{sort_group:"sortId3",id:"health",children:"Health"})]}),V.filter((0,a.createSearch)(I,function(O){return O.name+"|"+O.role+"|"+R(O)+"|"+O.antag})).sort(function(O,F){var _=P?1:-1;return O[A]===void 0||O[A]===null?_:F[A]===void 0||F[A]===null?-1*_:typeof O[A]=="number"?(O[A]-F[A])*_:O[A].localeCompare(F[A])*_}).map(function(O,F){return(0,e.createComponentVNode)(2,o.Table.Row,{children:[(0,e.createComponentVNode)(2,o.Table.Cell,{collapsing:!0,children:(0,e.createComponentVNode)(2,o.Button,{onClick:function(){function _(){return p("show_player_panel",{mind_uid:O.mind_uid})}return _}(),children:O.name})}),(0,e.createComponentVNode)(2,o.Table.Cell,{collapsing:!0,children:O.role}),(0,e.createComponentVNode)(2,o.Table.Cell,{collapsing:!0,children:(0,e.createComponentVNode)(2,o.Box,{color:M(O),children:R(O)})}),(0,e.createComponentVNode)(2,o.Table.Cell,{collapsing:!0,children:O.antag?(0,e.createComponentVNode)(2,o.Button,{textColor:"red",translucent:!0,onClick:function(){function _(){p("tp",{mind_uid:O.mind_uid})}return _}(),children:O.antag}):""}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:(0,e.createComponentVNode)(2,o.ProgressBar,{minValue:0,value:O.health/O.max_health,maxValue:1,ranges:{good:[.6,1/0],average:[0,.6],bad:[-1/0,0]},children:O.health})}),(0,e.createComponentVNode)(2,o.Table.Cell,{collapsing:!0,children:[(0,e.createComponentVNode)(2,o.Button,{onClick:function(){function _(){p("pm",{ckey:O.ckey})}return _}(),children:"PM"}),(0,e.createComponentVNode)(2,o.Button,{onClick:function(){function _(){p("follow",{datum_uid:O.mind_uid})}return _}(),children:"FLW"}),(0,e.createComponentVNode)(2,o.Button,{onClick:function(){function _(){p("obs",{mind_uid:O.mind_uid})}return _}(),children:"OBS"})]})]},F)})]}):"No Security!"},u=function(v,h){var C=(0,t.useBackend)(h),p=C.act,N=C.data,V=N.high_value_items,S=(0,t.useLocalState)(h,"searchText",""),I=S[0],L=S[1],w=(0,t.useLocalState)(h,"sortId4","person"),A=w[0],x=w[1],E=(0,t.useLocalState)(h,"sortOrder",!0),P=E[0],D=E[1];return V.length?(0,e.createComponentVNode)(2,o.Table,{className:"AdminAntagMenu__list",children:[(0,e.createComponentVNode)(2,o.Table.Row,{bold:!0,children:[(0,e.createComponentVNode)(2,s,{sort_group:"sortId4",id:"name",children:"Name"}),(0,e.createComponentVNode)(2,s,{sort_group:"sortId4",id:"person",children:"Carrier"}),(0,e.createComponentVNode)(2,s,{sort_group:"sortId4",id:"loc",children:"Location"}),(0,e.createComponentVNode)(2,s,{sort_group:"sortId4",id:"admin_z",children:"On Admin Z-level"})]}),V.filter((0,a.createSearch)(I,function(M){return M.name+"|"+M.loc})).sort(function(M,R){var O=P?1:-1;return M[A]===void 0||M[A]===null?O:R[A]===void 0||R[A]===null?-1*O:typeof M[A]=="number"?(M[A]-R[A])*O:M[A].localeCompare(R[A])*O}).map(function(M,R){return(0,e.createComponentVNode)(2,o.Table.Row,{children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:(0,e.createComponentVNode)(2,o.Button,{tooltip:M.obj_desc,translucent:M.admin_z,onClick:function(){function O(){return p("vv",{uid:M.uid})}return O}(),children:M.name})}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:(0,e.createComponentVNode)(2,o.Box,{color:M.admin_z?"grey":"",children:M.person})}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:(0,e.createComponentVNode)(2,o.Box,{color:M.admin_z?"grey":"",children:M.loc})}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:(0,e.createComponentVNode)(2,o.Box,{color:"grey",children:M.admin_z?"On Admin Z-level":""})}),(0,e.createComponentVNode)(2,o.Table.Cell,{collapsing:!0,children:(0,e.createComponentVNode)(2,o.Button,{onClick:function(){function O(){p("follow",{datum_uid:M.uid})}return O}(),children:"FLW"})})]},R)})]}):"No High Value Items!"},s=function(v,h){var C=v.id,p=v.sort_group,N=p===void 0?"sortId":p,V=v.default_sort,S=V===void 0?"antag_name":V,I=v.children,L=(0,t.useLocalState)(h,N,S),w=L[0],A=L[1],x=(0,t.useLocalState)(h,"sortOrder",!0),E=x[0],P=x[1];return(0,e.createComponentVNode)(2,o.Table.Cell,{children:(0,e.createComponentVNode)(2,o.Button,{color:w!==C&&"transparent",width:"100%",onClick:function(){function D(){w===C?P(!E):(A(C),P(!0))}return D}(),children:[I,w===C&&(0,e.createComponentVNode)(2,o.Icon,{name:E?"sort-up":"sort-down",ml:"0.25rem;"})]})})}},39683: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),f=[{name:"Male",icon:"mars"},{name:"Female",icon:"venus"},{name:"Genderless",icon:"genderless"}],b=["A+","A-","B+","B-","AB+","AB-","O+","O-"],y="Empty",B=function(m){var i=m.label,u=m.value,s=m.onCommit,d=m.onClick,v=m.onRClick,h=m.tooltip;return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:i,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:u||y,onCommit:s})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{icon:"file-signature",tooltip:h,tooltipPosition:"bottom-end",onClick:d,onContextMenu:v})})]})})},k=r.AgentCard=function(){function c(m,i){var u=(0,a.useLocalState)(i,"tabIndex",0),s=u[0],d=u[1],v=function(){function h(C){switch(C){case 0:return(0,e.createComponentVNode)(2,g);case 1:return(0,e.createComponentVNode)(2,l);default:return(0,e.createComponentVNode)(2,g)}}return h}();return(0,e.createComponentVNode)(2,o.Window,{width:435,height:500,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,{selected:s===0,onClick:function(){function h(){return d(0)}return h}(),children:[(0,e.createComponentVNode)(2,t.Icon,{name:"table"})," Card Info"]},"Card Info"),(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:s===1,onClick:function(){function h(){return d(1)}return h}(),children:[(0,e.createComponentVNode)(2,t.Icon,{name:"id-card"})," Appearance"]},"Appearance")]})}),v(s)]})})})}return c}(),g=r.AgentCardInfo=function(){function c(m,i){var u=(0,a.useBackend)(i),s=u.act,d=u.data,v=d.registered_name,h=d.sex,C=d.age,p=d.assignment,N=d.job_icon,V=d.associated_account_number,S=d.blood_type,I=d.dna_hash,L=d.fingerprint_hash,w=d.photo,A=d.ai_tracking,x=d.photo_cooldown,E=(0,e.createVNode)(1,"span",null,[(0,e.createTextVNode)("Autofill options."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("LMB - Autofill your own data."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("RMB - Autofill someone else data.")],4),P=(0,e.createVNode)(1,"span",null,[(0,e.createTextVNode)("Autofill options."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("LMB - Autofill your own data."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("RMB - Autofill with random data.")],4);return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Card Info",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,B,{label:"Name",value:v,tooltip:E,onCommit:function(){function D(M,R){return s("change_name",{name:R})}return D}(),onClick:function(){function D(){return s("change_name",{option:"Primary"})}return D}(),onRClick:function(){function D(M){M.preventDefault(),s("change_name",{option:"Secondary"})}return D}()}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Sex",children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,mb:-.5,children:f.map(function(D){return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:D.icon,content:D.name,selected:h===D.name,onClick:function(){function M(){return s("change_sex",{sex:D.name})}return M}()})},D.name)})})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Age",children:(0,e.createComponentVNode)(2,t.Slider,{fluid:!0,minValue:17,value:C||0,maxValue:300,onChange:function(){function D(M,R){return s("change_age",{age:R})}return D}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Rank",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,{fluid:!0,onClick:function(){function D(){return s("change_occupation")}return D}(),textAlign:"middle",children:p||"[UNSET]"})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{tooltip:"Change HUD icon",tooltipPosition:"bottom-end",onClick:function(){function D(){return s("change_occupation",{option:"Primary"})}return D}(),children:[(0,e.createComponentVNode)(2,t.DmIcon,{fill:!0,icon:"icons/mob/hud/job_assets.dmi",icon_state:N,verticalAlign:"bottom",my:"2px",width:"16px"})," "]})})]})}),(0,e.createComponentVNode)(2,B,{label:"Fingerprint",value:L,onCommit:function(){function D(M,R){return s("change_fingerprints",{new_fingerprints:R})}return D}(),onClick:function(){function D(){return s("change_fingerprints",{option:"Primary"})}return D}(),onRClick:function(){function D(M){M.preventDefault(),s("change_fingerprints",{option:"Secondary"})}return D}(),tooltip:P}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Blood Type",children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,mb:-.5,children:[b.map(function(D){return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,content:D,selected:S===D,onClick:function(){function M(){return s("change_blood_type",{new_type:D})}return M}()})},D)}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"file-signature",onClick:function(){function D(){return s("change_blood_type",{option:"Primary"})}return D}()})})]})}),(0,e.createComponentVNode)(2,B,{label:"DNA",value:I,onCommit:function(){function D(M,R){return s("change_dna_hash",{new_dna:R})}return D}(),onClick:function(){function D(){return s("change_dna_hash",{option:"Primary"})}return D}(),onRClick:function(){function D(M){M.preventDefault(),s("change_dna_hash",{option:"Secondary"})}return D}(),tooltip:P}),(0,e.createComponentVNode)(2,B,{label:"Account",value:V||0,onCommit:function(){function D(M,R){return s("change_money_account",{new_account:R})}return D}(),onClick:function(){function D(){return s("change_money_account",{option:"Primary"})}return D}(),onRClick:function(){function D(M){M.preventDefault(),s("change_money_account",{option:"Secondary"})}return D}(),tooltip:P}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Photo",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",disabled:!x,tooltip:x?"":"You can't generate a new photo yet.",onClick:function(){function D(){return s("change_photo")}return D}(),children:w?"Update":y})})]})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Card Settings",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Card Info",children:(0,e.createComponentVNode)(2,t.Button.Confirm,{fluid:!0,textAlign:"center",content:"Delete Card Info",confirmContent:"Are you sure?",onClick:function(){function D(){return s("delete_info")}return D}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Access",children:(0,e.createComponentVNode)(2,t.Button.Confirm,{fluid:!0,textAlign:"center",content:"Reset Access",confirmContent:"Are you sure?",onClick:function(){function D(){return s("clear_access")}return D}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"AI Tracking",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",onClick:function(){function D(){return s("change_ai_tracking")}return D}(),children:A?"Untrackable":"Trackable"})})]})})})],4)}return c}(),l=r.AgentCardAppearances=function(){function c(m,i){var u=(0,a.useBackend)(i),s=u.act,d=u.data,v=(0,a.useSharedState)(i,"selectedAppearance",null),h=v[0],C=v[1],p=d.appearances,N=d.id_icon;return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Card Appearance",children:p.map(function(V){return(0,e.createComponentVNode)(2,t.ImageButton,{dmIcon:N,dmIconState:V,imageSize:64,compact:!0,selected:V===h,tooltip:V,style:{opacity:V===h&&"1"||"0.5"},onClick:function(){function S(){C(V),s("change_appearance",{new_appearance:V})}return S}()},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),f={2:{color:"good",localStatusText:"Offline"},1:{color:"average",localStatusText:"Caution"},0:{color:"bad",localStatusText:"Optimal"}},b=r.AiAirlock=function(){function y(B,k){var g=(0,a.useBackend)(k),l=g.act,c=g.data,m=f[c.power.main]||f[0],i=f[c.power.backup]||f[0],u=f[c.shock]||f[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:m.color,buttons:(0,e.createComponentVNode)(2,t.Button,{mb:.5,icon:"lightbulb-o",disabled:!c.power.main,content:"Disrupt",onClick:function(){function s(){return l("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:i.color,buttons:(0,e.createComponentVNode)(2,t.Button,{mb:.5,icon:"lightbulb-o",disabled:!c.power.backup,content:"Disrupt",onClick:function(){function s(){return l("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:u.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 l("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 l("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 l("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 l("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 l("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 l("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 l("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 l("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 l("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 l("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),f=n(195),b=r.AirAlarm=function(){function u(s,d){var v=(0,a.useBackend)(d),h=v.act,C=v.data,p=C.locked;return(0,e.createComponentVNode)(2,o.Window,{width:570,height:p?310:755,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[(0,e.createComponentVNode)(2,f.InterfaceLockNoticeBox),(0,e.createComponentVNode)(2,B),!p&&(0,e.createFragment)([(0,e.createComponentVNode)(2,k),(0,e.createComponentVNode)(2,g)],4)]})})}return u}(),y=function(s){return s===0?"green":s===1?"orange":"red"},B=function(s,d){var v=(0,a.useBackend)(d),h=v.act,C=v.data,p=C.air,N=C.mode,V=C.atmos_alarm,S=C.locked,I=C.alarmActivated,L=C.rcon,w=C.target_temp,A;return p.danger.overall===0?V===0?A="Optimal":A="Caution: Atmos alert in area":p.danger.overall===1?A="Caution":A="DANGER: Internals Required",(0,e.createComponentVNode)(2,t.Section,{title:"Air Status",children:p?(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(p.danger.pressure),children:[(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:p.pressure})," kPa",!S&&(0,e.createFragment)([(0,e.createTextVNode)("\xA0"),(0,e.createComponentVNode)(2,t.Button,{content:N===3?"Deactivate Panic Siphon":"Activate Panic Siphon",selected:N===3,icon:"exclamation-triangle",onClick:function(){function x(){return h("mode",{mode:N===3?1:3})}return x}()})],4)]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Oxygen",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:p.contents.oxygen/100,fractionDigits:"1",color:y(p.danger.oxygen)})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Nitrogen",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:p.contents.nitrogen/100,fractionDigits:"1",color:y(p.danger.nitrogen)})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Carbon Dioxide",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:p.contents.co2/100,fractionDigits:"1",color:y(p.danger.co2)})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Toxins",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:p.contents.plasma/100,fractionDigits:"1",color:y(p.danger.plasma)})}),p.contents.n2o>.1&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Nitrous Oxide",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:p.contents.n2o/100,fractionDigits:"1",color:y(p.danger.n2o)})}),p.contents.other>.1&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Other",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:p.contents.other/100,fractionDigits:"1",color:y(p.danger.other)})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Temperature",children:(0,e.createComponentVNode)(2,t.Box,{color:y(p.danger.temperature),children:[(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:p.temperature})," K / ",(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:p.temperature_c})," C\xA0",(0,e.createComponentVNode)(2,t.Button,{icon:"thermometer-full",content:w+" C",onClick:function(){function x(){return h("temperature")}return x}()}),(0,e.createComponentVNode)(2,t.Button,{content:p.thermostat_state?"On":"Off",selected:p.thermostat_state,icon:"power-off",onClick:function(){function x(){return h("thermostat_state")}return x}()})]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Local Status",children:(0,e.createComponentVNode)(2,t.Box,{color:y(p.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 h(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 h("set_rcon",{rcon:1})}return x}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Auto",selected:L===2,onClick:function(){function x(){return h("set_rcon",{rcon:2})}return x}()}),(0,e.createComponentVNode)(2,t.Button,{content:"On",selected:L===3,onClick:function(){function x(){return h("set_rcon",{rcon:3})}return x}()})]})]}):(0,e.createComponentVNode)(2,t.Box,{children:"Unable to acquire air sample!"})})},k=function(s,d){var v=(0,a.useLocalState)(d,"tabIndex",0),h=v[0],C=v[1];return(0,e.createComponentVNode)(2,t.Tabs,{children:[(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:h===0,onClick:function(){function p(){return C(0)}return p}(),children:[(0,e.createComponentVNode)(2,t.Icon,{name:"sign-out-alt"})," Vent Control"]},"Vents"),(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:h===1,onClick:function(){function p(){return C(1)}return p}(),children:[(0,e.createComponentVNode)(2,t.Icon,{name:"sign-in-alt"})," Scrubber Control"]},"Scrubbers"),(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:h===2,onClick:function(){function p(){return C(2)}return p}(),children:[(0,e.createComponentVNode)(2,t.Icon,{name:"cog"})," Mode"]},"Mode"),(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:h===3,onClick:function(){function p(){return C(3)}return p}(),children:[(0,e.createComponentVNode)(2,t.Icon,{name:"tachometer-alt"})," Thresholds"]},"Thresholds")]})},g=function(s,d){var v=(0,a.useLocalState)(d,"tabIndex",0),h=v[0],C=v[1];switch(h){case 0:return(0,e.createComponentVNode)(2,l);case 1:return(0,e.createComponentVNode)(2,c);case 2:return(0,e.createComponentVNode)(2,m);case 3:return(0,e.createComponentVNode)(2,i);default:return"WE SHOULDN'T BE HERE!"}},l=function(s,d){var v=(0,a.useBackend)(d),h=v.act,C=v.data,p=C.vents;return p.map(function(N){return(0,e.createComponentVNode)(2,t.Section,{title:N.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:N.power?"On":"Off",selected:N.power,icon:"power-off",onClick:function(){function V(){return h("command",{cmd:"power",val:!N.power,id_tag:N.id_tag})}return V}()}),(0,e.createComponentVNode)(2,t.Button,{content:N.direction?"Blowing":"Siphoning",icon:N.direction?"sign-out-alt":"sign-in-alt",onClick:function(){function V(){return h("command",{cmd:"direction",val:!N.direction,id_tag:N.id_tag})}return V}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Pressure Checks",children:[(0,e.createComponentVNode)(2,t.Button,{content:"External",selected:N.checks===1,onClick:function(){function V(){return h("command",{cmd:"checks",val:1,id_tag:N.id_tag})}return V}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Internal",selected:N.checks===2,onClick:function(){function V(){return h("command",{cmd:"checks",val:2,id_tag:N.id_tag})}return V}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"External Pressure Target",children:[(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:N.external})," kPa\xA0",(0,e.createComponentVNode)(2,t.Button,{content:"Set",icon:"cog",onClick:function(){function V(){return h("command",{cmd:"set_external_pressure",id_tag:N.id_tag})}return V}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Reset",icon:"redo-alt",onClick:function(){function V(){return h("command",{cmd:"set_external_pressure",val:101.325,id_tag:N.id_tag})}return V}()})]})]})},N.name)})},c=function(s,d){var v=(0,a.useBackend)(d),h=v.act,C=v.data,p=C.scrubbers;return p.map(function(N){return(0,e.createComponentVNode)(2,t.Section,{title:N.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:N.power?"On":"Off",selected:N.power,icon:"power-off",onClick:function(){function V(){return h("command",{cmd:"power",val:!N.power,id_tag:N.id_tag})}return V}()}),(0,e.createComponentVNode)(2,t.Button,{content:N.scrubbing?"Scrubbing":"Siphoning",icon:N.scrubbing?"filter":"sign-in-alt",onClick:function(){function V(){return h("command",{cmd:"scrubbing",val:!N.scrubbing,id_tag:N.id_tag})}return V}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Range",children:(0,e.createComponentVNode)(2,t.Button,{content:N.widenet?"Extended":"Normal",selected:N.widenet,icon:"expand-arrows-alt",onClick:function(){function V(){return h("command",{cmd:"widenet",val:!N.widenet,id_tag:N.id_tag})}return V}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Filtering",children:[(0,e.createComponentVNode)(2,t.Button,{content:"Carbon Dioxide",selected:N.filter_co2,onClick:function(){function V(){return h("command",{cmd:"co2_scrub",val:!N.filter_co2,id_tag:N.id_tag})}return V}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Plasma",selected:N.filter_toxins,onClick:function(){function V(){return h("command",{cmd:"tox_scrub",val:!N.filter_toxins,id_tag:N.id_tag})}return V}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Nitrous Oxide",selected:N.filter_n2o,onClick:function(){function V(){return h("command",{cmd:"n2o_scrub",val:!N.filter_n2o,id_tag:N.id_tag})}return V}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Oxygen",selected:N.filter_o2,onClick:function(){function V(){return h("command",{cmd:"o2_scrub",val:!N.filter_o2,id_tag:N.id_tag})}return V}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Nitrogen",selected:N.filter_n2,onClick:function(){function V(){return h("command",{cmd:"n2_scrub",val:!N.filter_n2,id_tag:N.id_tag})}return V}()})]})]})},N.name)})},m=function(s,d){var v=(0,a.useBackend)(d),h=v.act,C=v.data,p=C.modes,N=C.presets,V=C.emagged,S=C.mode,I=C.preset;return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Section,{title:"System Mode",children:Object.keys(p).map(function(L){var w=p[L];if(!w.emagonly||V)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:w.name,icon:"cog",selected:w.id===S,onClick:function(){function A(){return h("mode",{mode:w.id})}return A}()})}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:w.desc})]},w.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:N.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 h("preset",{preset:L.id})}return w}()})}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:L.desc})]},L.name)})})]})],4)},i=function(s,d){var v=(0,a.useBackend)(d),h=v.act,C=v.data,p=C.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"})]}),p.map(function(N){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:N.name}),N.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 h("command",{cmd:"set_threshold",env:V.env,var:V.val})}return S}()})},V.val)})]},N.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),f=r.AirlockAccessController=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,l=k.data,c=l.exterior_status,m=l.interior_status,i=l.processing,u,s;return c==="open"?u=(0,e.createComponentVNode)(2,t.Button,{width:"50%",content:"Lock Exterior Door",icon:"exclamation-triangle",disabled:i,onClick:function(){function d(){return g("force_ext")}return d}()}):u=(0,e.createComponentVNode)(2,t.Button,{width:"50%",content:"Cycle to Exterior",icon:"arrow-circle-left",disabled:i,onClick:function(){function d(){return g("cycle_ext_door")}return d}()}),m==="open"?s=(0,e.createComponentVNode)(2,t.Button,{width:"49%",content:"Lock Interior Door",icon:"exclamation-triangle",disabled:i,color:m==="open"?"red":i?"yellow":null,onClick:function(){function d(){return g("force_int")}return d}()}):s=(0,e.createComponentVNode)(2,t.Button,{width:"49%",content:"Cycle to Interior",icon:"arrow-circle-right",disabled:i,onClick:function(){function d(){return g("cycle_int_door")}return d}()}),(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:m==="closed"?"Locked":"Open"})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Actions",children:(0,e.createComponentVNode)(2,t.Box,{children:[u,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),f=n(49148),b=1,y=2,B=4,k=8,g=r.AirlockElectronics=function(){function m(i,u){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,l),(0,e.createComponentVNode)(2,c)]})})})}return m}(),l=function(i,u){var s=(0,a.useBackend)(u),d=s.act,v=s.data,h=v.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:h&B,onClick:function(){function C(){return d("unrestricted_access",{unres_dir:B})}return C}()})}),(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:h&y,onClick:function(){function C(){return d("unrestricted_access",{unres_dir:y})}return C}()})}),(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:h&k,onClick:function(){function C(){return d("unrestricted_access",{unres_dir:k})}return C}()})}),(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:h&b,onClick:function(){function C(){return d("unrestricted_access",{unres_dir:b})}return C}()})})]})]})})},c=function(i,u){var s=(0,a.useBackend)(u),d=s.act,v=s.data,h=v.selected_accesses,C=v.one_access,p=v.regions;return(0,e.createComponentVNode)(2,f.AccessList,{usedByRcd:1,rcdButtons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button.Checkbox,{checked:C,content:"One",onClick:function(){function N(){return d("set_one_access",{access:"one"})}return N}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{checked:!C,content:"All",onClick:function(){function N(){return d("set_one_access",{access:"all"})}return N}()})],4),accesses:p,selectedList:h,accessMod:function(){function N(V){return d("set",{access:V})}return N}(),grantAll:function(){function N(){return d("grant_all")}return N}(),denyAll:function(){function N(){return d("clear_all")}return N}(),grantDep:function(){function N(V){return d("grant_region",{region:V})}return N}(),denyDep:function(){function N(V){return d("deny_region",{region:V})}return N}()})}},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),f=n(36036),b=n(98595),y=-1,B=1,k=r.AlertModal=function(){function c(m,i){var u=(0,t.useBackend)(i),s=u.act,d=u.data,v=d.autofocus,h=d.buttons,C=h===void 0?[]:h,p=d.large_buttons,N=d.message,V=N===void 0?"":N,S=d.timeout,I=d.title,L=(0,t.useLocalState)(i,"selected",0),w=L[0],A=L[1],x=110+(V.length>30?Math.ceil(V.length/4):0)+(V.length&&p?5:0),E=325+(C.length>2?100:0),P=function(){function D(M){w===0&&M===y?A(C.length-1):w===C.length-1&&M===B?A(0):A(w+M)}return D}();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 D(M){var R=window.event?M.which:M.keyCode;R===o.KEY_SPACE||R===o.KEY_ENTER?s("choose",{choice:C[w]}):R===o.KEY_ESCAPE?s("cancel"):R===o.KEY_LEFT?(M.preventDefault(),P(y)):(R===o.KEY_TAB||R===o.KEY_RIGHT)&&(M.preventDefault(),P(B))}return D}(),children:(0,e.createComponentVNode)(2,f.Section,{fill:!0,children:(0,e.createComponentVNode)(2,f.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,f.Stack.Item,{grow:!0,m:1,children:(0,e.createComponentVNode)(2,f.Box,{color:"label",overflow:"hidden",children:V})}),(0,e.createComponentVNode)(2,f.Stack.Item,{children:[!!v&&(0,e.createComponentVNode)(2,f.Autofocus),(0,e.createComponentVNode)(2,g,{selected:w})]})]})})})]})}return c}(),g=function(m,i){var u=(0,t.useBackend)(i),s=u.data,d=s.buttons,v=d===void 0?[]:d,h=s.large_buttons,C=s.swapped_buttons,p=m.selected;return(0,e.createComponentVNode)(2,f.Flex,{fill:!0,align:"center",direction:C?"row":"row-reverse",justify:"space-around",wrap:!0,children:v==null?void 0:v.map(function(N,V){return h&&v.length<3?(0,e.createComponentVNode)(2,f.Flex.Item,{grow:!0,children:(0,e.createComponentVNode)(2,l,{button:N,id:V.toString(),selected:p===V})},V):(0,e.createComponentVNode)(2,f.Flex.Item,{grow:h?1:0,children:(0,e.createComponentVNode)(2,l,{button:N,id:V.toString(),selected:p===V})},V)})})},l=function(m,i){var u=(0,t.useBackend)(i),s=u.act,d=u.data,v=d.large_buttons,h=m.button,C=m.selected,p=h.length>7?"100%":7;return(0,e.createComponentVNode)(2,f.Button,{mx:v?1:0,pt:v?.33:0,content:h,fluid:!!v,onClick:function(){function N(){return s("choose",{choice:h})}return N}(),selected:C,textAlign:"center",height:!!v&&2,width:!v&&p})}},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),f=r.AppearanceChanger=function(){function y(B,k){var g=(0,a.useBackend)(k),l=g.act,c=g.data,m=c.change_race,i=c.species,u=c.specimen,s=c.change_gender,d=c.gender,v=c.change_eye_color,h=c.change_skin_tone,C=c.change_skin_color,p=c.change_runechat_color,N=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,D=c.head_accessory_style,M=c.change_hair,R=c.hair_styles,O=c.hair_style,F=c.change_hair_gradient,_=c.change_facial_hair,U=c.facial_hair_styles,z=c.facial_hair_style,$=c.change_head_markings,G=c.head_marking_styles,X=c.head_marking_style,J=c.change_body_markings,se=c.body_marking_styles,ie=c.body_marking_style,me=c.change_tail_markings,q=c.tail_marking_styles,re=c.tail_marking_style,ae=c.change_body_accessory,le=c.body_accessory_styles,Z=c.body_accessory_style,ne=c.change_alt_head,te=c.alt_head_styles,fe=c.alt_head_style,pe=!1;return(v||h||C||N||p||V||S||I||L||w||A||x)&&(pe=!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:[!!m&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Species",children:i.map(function(ce){return(0,e.createComponentVNode)(2,t.Button,{content:ce.specimen,selected:ce.specimen===u,onClick:function(){function Ve(){return l("race",{race:ce.specimen})}return Ve}()},ce.specimen)})}),!!s&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Gender",children:[(0,e.createComponentVNode)(2,t.Button,{content:"Male",selected:d==="male",onClick:function(){function ce(){return l("gender",{gender:"male"})}return ce}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Female",selected:d==="female",onClick:function(){function ce(){return l("gender",{gender:"female"})}return ce}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Genderless",selected:d==="plural",onClick:function(){function ce(){return l("gender",{gender:"plural"})}return ce}()})]}),!!pe&&(0,e.createComponentVNode)(2,b),!!E&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Head accessory",children:P.map(function(ce){return(0,e.createComponentVNode)(2,t.Button,{content:ce.headaccessorystyle,selected:ce.headaccessorystyle===D,onClick:function(){function Ve(){return l("head_accessory",{head_accessory:ce.headaccessorystyle})}return Ve}()},ce.headaccessorystyle)})}),!!M&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Hair",children:R.map(function(ce){return(0,e.createComponentVNode)(2,t.Button,{content:ce.hairstyle,selected:ce.hairstyle===O,onClick:function(){function Ve(){return l("hair",{hair:ce.hairstyle})}return Ve}()},ce.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 ce(){return l("hair_gradient")}return ce}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Change Offset",onClick:function(){function ce(){return l("hair_gradient_offset")}return ce}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Change Color",onClick:function(){function ce(){return l("hair_gradient_colour")}return ce}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Change Alpha",onClick:function(){function ce(){return l("hair_gradient_alpha")}return ce}()})]}),!!_&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Facial hair",children:U.map(function(ce){return(0,e.createComponentVNode)(2,t.Button,{content:ce.facialhairstyle,selected:ce.facialhairstyle===z,onClick:function(){function Ve(){return l("facial_hair",{facial_hair:ce.facialhairstyle})}return Ve}()},ce.facialhairstyle)})}),!!$&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Head markings",children:G.map(function(ce){return(0,e.createComponentVNode)(2,t.Button,{content:ce.headmarkingstyle,selected:ce.headmarkingstyle===X,onClick:function(){function Ve(){return l("head_marking",{head_marking:ce.headmarkingstyle})}return Ve}()},ce.headmarkingstyle)})}),!!J&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Body markings",children:se.map(function(ce){return(0,e.createComponentVNode)(2,t.Button,{content:ce.bodymarkingstyle,selected:ce.bodymarkingstyle===ie,onClick:function(){function Ve(){return l("body_marking",{body_marking:ce.bodymarkingstyle})}return Ve}()},ce.bodymarkingstyle)})}),!!me&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Tail markings",children:q.map(function(ce){return(0,e.createComponentVNode)(2,t.Button,{content:ce.tailmarkingstyle,selected:ce.tailmarkingstyle===re,onClick:function(){function Ve(){return l("tail_marking",{tail_marking:ce.tailmarkingstyle})}return Ve}()},ce.tailmarkingstyle)})}),!!ae&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Body accessory",children:le.map(function(ce){return(0,e.createComponentVNode)(2,t.Button,{content:ce.bodyaccessorystyle,selected:ce.bodyaccessorystyle===Z,onClick:function(){function Ve(){return l("body_accessory",{body_accessory:ce.bodyaccessorystyle})}return Ve}()},ce.bodyaccessorystyle)})}),!!ne&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Alternate head",children:te.map(function(ce){return(0,e.createComponentVNode)(2,t.Button,{content:ce.altheadstyle,selected:ce.altheadstyle===fe,onClick:function(){function Ve(){return l("alt_head",{alt_head:ce.altheadstyle})}return Ve}()},ce.altheadstyle)})})]})})})}return y}(),b=function(B,k){var g=(0,a.useBackend)(k),l=g.act,c=g.data,m=[{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:m.map(function(i){return!!c[i.key]&&(0,e.createComponentVNode)(2,t.Button,{content:i.text,onClick:function(){function u(){return l(i.action)}return u}()},i.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),f=r.AtmosAlertConsole=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,l=k.data,c=l.priority||[],m=l.minor||[],i=l.mode||{};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)}),m.length===0&&(0,e.createVNode)(1,"li","color-good","No Minor Alerts",16),m.map(function(u){return(0,e.createVNode)(1,"li","color-average",u,0,null,u)}),Object.keys(i).length===0&&(0,e.createVNode)(1,"li","color-good","All Areas Filtering",16),Object.keys(i).map(function(u){return(0,e.createVNode)(1,"li","color-good",[u,(0,e.createTextVNode)(" mode is "),i[u]],0,null,alert)})],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),f=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 l(c,m){var i=(0,a.useBackend)(m),u=i.act,s=i.data,d=(0,a.useLocalState)(m,"tabIndex",0),v=d[0],h=d[1],C=function(){function p(N){switch(N){case 0:return(0,e.createComponentVNode)(2,k);case 1:return(0,e.createComponentVNode)(2,g);default:return"WE SHOULDN'T BE HERE!"}}return p}();return(0,e.createComponentVNode)(2,f.Window,{width:800,height:600,children:(0,e.createComponentVNode)(2,f.Window.Content,{scrollable:v===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 p(){return h(0)}return p}(),children:[(0,e.createComponentVNode)(2,t.Icon,{name:"table"})," Data View"]},"DataView"),(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:v===1,onClick:function(){function p(){return h(1)}return p}(),children:[(0,e.createComponentVNode)(2,t.Icon,{name:"map-marked-alt"})," Map View"]},"MapView")]}),C(v)]})})})}return l}(),k=function(c,m){var i=(0,a.useBackend)(m),u=i.act,s=i.data,d=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"})]}),d.map(function(v){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,o.TableCell,{children:v.name}),(0,e.createComponentVNode)(2,o.TableCell,{children:b(v.danger)}),(0,e.createComponentVNode)(2,o.TableCell,{children:(0,e.createComponentVNode)(2,t.Button,{icon:"cog",content:"Access",onClick:function(){function h(){return u("open_alarm",{aref:v.ref})}return h}()})})]},v.name)})]})})},g=function(c,m){var i=(0,a.useBackend)(m),u=i.act,s=i.data,d=s.alarms;return(0,e.createComponentVNode)(2,t.Box,{height:"526px",mb:"0.5rem",overflow:"hidden",children:(0,e.createComponentVNode)(2,t.NanoMap,{children:d.filter(function(v){return v.z===2}).map(function(v){return(0,e.createComponentVNode)(2,t.NanoMap.MarkerIcon,{x:v.x,y:v.y,icon:"circle",tooltip:v.name,color:y(v.danger),onClick:function(){function h(){return u("open_alarm",{aref:v.ref})}return h}()},v.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),f=r.AtmosFilter=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,l=k.data,c=l.on,m=l.pressure,i=l.max_pressure,u=l.filter_type,s=l.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 d(){return g("power")}return d}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Rate",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"fast-backward",textAlign:"center",disabled:m===0,width:2.2,onClick:function(){function d(){return g("min_pressure")}return d}()}),(0,e.createComponentVNode)(2,t.NumberInput,{animated:!0,unit:"kPa",width:6.1,lineHeight:1.5,step:10,minValue:0,maxValue:i,value:m,onDrag:function(){function d(v,h){return g("custom_pressure",{pressure:h})}return d}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"fast-forward",textAlign:"center",disabled:m===i,width:2.2,onClick:function(){function d(){return g("max_pressure")}return d}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Filter",children:s.map(function(d){return(0,e.createComponentVNode)(2,t.Button,{selected:d.gas_type===u,content:d.label,onClick:function(){function v(){return g("set_filter",{filter:d.gas_type})}return v}()},d.label)})})]})})})})}return b}()},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),f=r.AtmosMixer=function(){function y(B,k){var g=(0,a.useBackend)(k),l=g.act,c=g.data,m=c.on,i=c.pressure,u=c.max_pressure,s=c.node1_concentration,d=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:m?"On":"Off",color:m?null:"red",selected:m,onClick:function(){function v(){return l("power")}return v}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Rate",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"fast-backward",textAlign:"center",disabled:i===0,width:2.2,onClick:function(){function v(){return l("min_pressure")}return v}()}),(0,e.createComponentVNode)(2,t.NumberInput,{animated:!0,unit:"kPa",width:6.1,lineHeight:1.5,step:10,minValue:0,maxValue:u,value:i,onDrag:function(){function v(h,C){return l("custom_pressure",{pressure:C})}return v}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"fast-forward",textAlign:"center",disabled:i===u,width:2.2,onClick:function(){function v(){return l("max_pressure")}return v}()})]}),(0,e.createComponentVNode)(2,b,{node_name:"Node 1",node_ref:s}),(0,e.createComponentVNode)(2,b,{node_name:"Node 2",node_ref:d})]})})})})}return y}(),b=function(B,k){var g=(0,a.useBackend)(k),l=g.act,c=g.data,m=B.node_name,i=B.node_ref;return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:m,children:[(0,e.createComponentVNode)(2,t.Button,{icon:"fast-backward",textAlign:"center",width:2.2,disabled:i===0,onClick:function(){function u(){return l("set_node",{node_name:m,concentration:(i-10)/100})}return u}()}),(0,e.createComponentVNode)(2,t.NumberInput,{animated:!0,unit:"%",width:6.1,lineHeight:1.5,stepPixelSize:10,minValue:0,maxValue:100,value:i,onChange:function(){function u(s,d){return l("set_node",{node_name:m,concentration:d/100})}return u}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"fast-forward",textAlign:"center",width:2.2,disabled:i===100,onClick:function(){function u(){return l("set_node",{node_name:m,concentration:(i+10)/100})}return u}()})]})}},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),f=r.AtmosPump=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,l=k.data,c=l.on,m=l.rate,i=l.max_rate,u=l.gas_unit,s=l.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 d(){return g("power")}return d}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Rate",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"fast-backward",textAlign:"center",disabled:m===0,width:2.2,onClick:function(){function d(){return g("min_rate")}return d}()}),(0,e.createComponentVNode)(2,t.NumberInput,{animated:!0,unit:u,width:6.1,lineHeight:1.5,step:s,minValue:0,maxValue:i,value:m,onDrag:function(){function d(v,h){return g("custom_rate",{rate:h})}return d}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"fast-forward",textAlign:"center",disabled:m===i,width:2.2,onClick:function(){function d(){return g("max_rate")}return d}()})]})]})})})})}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),f=n(76910),b=n(98595),y=r.AtmosTankControl=function(){function B(k,g){var l=(0,a.useBackend)(g),c=l.act,m=l.data,i=m.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(i).map(function(u){return(0,e.createComponentVNode)(2,t.Section,{title:u,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[Object.keys(i[u]).indexOf("pressure")>-1?(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Pressure",children:[i[u].pressure," kpa"]}):"",Object.keys(i[u]).indexOf("temperature")>-1?(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Temperature",children:[i[u].temperature," K"]}):"",["o2","n2","plasma","co2","n2o"].map(function(s){return Object.keys(i[u]).indexOf(s)>-1?(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:(0,f.getGasLabel)(s),children:(0,e.createComponentVNode)(2,t.ProgressBar,{color:(0,f.getGasColor)(s),value:i[u][s],minValue:0,maxValue:100,children:(0,o.toFixed)(i[u][s],2)+"%"})},(0,f.getGasLabel)(s)):""})]})},u)}),m.inlet&&Object.keys(m.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:(m.inlet.on,"power-off"),content:m.inlet.on?"On":"Off",color:m.inlet.on?null:"red",selected:m.inlet.on,onClick:function(){function u(){return c("toggle_active",{dev:"inlet"})}return u}()})}),(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:m.inlet.rate,onDrag:function(){function u(s,d){return c("set_pressure",{dev:"inlet",val:d})}return u}()})})]})}):"",m.outlet&&Object.keys(m.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:(m.outlet.on,"power-off"),content:m.outlet.on?"On":"Off",color:m.outlet.on?null:"red",selected:m.outlet.on,onClick:function(){function u(){return c("toggle_active",{dev:"outlet"})}return u}()})}),(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:m.outlet.rate,onDrag:function(){function u(s,d){return c("set_pressure",{dev:"outlet",val:d})}return u}()})})]})}):""]})})}return B}()},92444:function(T,r,n){"use strict";r.__esModule=!0,r.AugmentMenu=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=n(25328),b=r.AugmentMenu=function(){function k(g,l){return(0,e.createComponentVNode)(2,o.Window,{width:700,height:660,theme:"malfunction",children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{vertical:!0,children:(0,e.createComponentVNode)(2,y,{context:l})})})})}return k}(),y=function(g){var l=g.context,c=(0,a.useBackend)(l),m=c.act,i=c.data,u=i.usable_swarms,s=i.ability_tabs,d=i.known_abilities,v=(0,a.useLocalState)(l,"selectedTab",s[0]),h=v[0],C=v[1],p=(0,a.useLocalState)(l,"searchText",""),N=p[0],V=p[1],S=function(){var E=s.find(function(D){return D.category_name===h.category_name});if(!E)return[];var P=Math.min(E.category_stage,4);return E.abilities.filter(function(D){return D.stage<=P&&(!N||D.name.toLowerCase().includes(N.toLowerCase()))}).sort(function(D,M){return["intruder","destroyer"].includes(h.category_name.toLowerCase())?D.stage-M.stage:0})},I=S(),L=s.find(function(x){return x.category_name===h.category_name}),w=["intruder","destroyer"].includes(h.category_name.toLowerCase()),A=function(E){var P=d.find(function(R){return R.ability_path===E.ability_path}),D=P?P.cost:E.cost,M=P&&P.current_level>0?P.current_level+" / "+P.max_level:"0 / "+E.max_level;return(0,e.createComponentVNode)(2,t.Stack.Item,{direction:"row",children:[(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Button,{height:"20px",width:"35px",mb:1,textAlign:"center",content:D,disabled:D>u||P&&P.current_level===P.max_level,tooltip:"Purchase this ability?",onClick:function(){function R(){m("purchase",{ability_path:E.ability_path}),C(h)}return R}()}),(0,e.createComponentVNode)(2,t.Stack.Item,{fontSize:"16px",children:E.name})]}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Stack,{vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{fontSize:"13px",children:E.desc||"Description not available"}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:["Level: ",(0,e.createVNode)(1,"span",null,M,0,{style:{color:"green"}}),w&&E.stage>0&&(0,e.createVNode)(1,"span",null,[(0,e.createTextVNode)(" (Stage: "),E.stage,(0,e.createTextVNode)(")")],0)]}),(0,e.createComponentVNode)(2,t.Stack.Divider)]})})]},E.name)};return(0,e.createComponentVNode)(2,t.Section,{title:(0,e.createVNode)(1,"div",null,[(0,e.createComponentVNode)(2,t.Stack,{vertical:!0,style:{marginRight:"10px"},children:[(0,e.createVNode)(1,"span",null,[(0,e.createTextVNode)("Swarms: "),(0,e.createVNode)(1,"span",null,u,0,{style:{color:"green"}})],4),w&&L&&(0,e.createVNode)(1,"span",null,[(0,e.createTextVNode)("Category Stage: "),(0,e.createVNode)(1,"span",null,Math.min(L.category_stage,4),0,{style:{color:"green"}})],4)]}),(0,e.createVNode)(1,"div","Section__buttons",(0,e.createComponentVNode)(2,t.Input,{width:"200px",placeholder:"Search Abilities",onInput:function(){function x(E,P){return V(P)}return x}(),value:N}),2)],4,{style:{display:"flex",alignItems:"center"}}),children:[(0,e.createComponentVNode)(2,t.Tabs,{children:[s.map(function(x){return(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:h.category_name===x.category_name,onClick:function(){function E(){C(x),V("")}return E}(),children:(0,f.capitalize)(x.category_name)},x.category_name)}),(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:h.category_name==="upgrades",onClick:function(){function x(){return C({category_name:"upgrades"})}return x}(),children:"Upgrades"},"upgrades")]}),h.category_name==="upgrades"?(0,e.createComponentVNode)(2,B,{act:m,abilityTabs:s,knownAbilities:d,usableSwarms:u}):(0,e.createComponentVNode)(2,t.Stack,{vertical:!0,children:I.map(A)})]})},B=function(g){var l=g.act,c=g.abilityTabs,m=g.knownAbilities,i=g.usableSwarms,u=m.filter(function(d){return d.current_leveli,tooltip:"Upgrade this ability?",onClick:function(){function C(){return l("purchase",{ability_path:v.ability_path})}return C}()}),(0,e.createComponentVNode)(2,t.Stack.Item,{fontSize:"16px",children:v.name})]}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Stack,{vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{fontSize:"13px",children:v.upgrade_text}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:["Level:"," ",(0,e.createVNode)(1,"span",null,v.current_level+" / "+v.max_level,0,{style:{color:"green"}}),h&&h.stage>0&&(0,e.createVNode)(1,"span",null,[(0,e.createTextVNode)(" (Stage: "),h.stage,(0,e.createTextVNode)(")")],0)]}),(0,e.createComponentVNode)(2,t.Stack.Divider)]})})]},v.name)};return(0,e.createComponentVNode)(2,t.Stack,{vertical:!0,children:u.map(s)})}},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),f=n(36036),b=n(98595),y=n(25328),B=function(l,c,m,i){return l.requirements===null?!0:!(l.requirements.metal*i>c||l.requirements.glass*i>m)},k=r.Autolathe=function(){function g(l,c){var m=(0,o.useBackend)(c),i=m.act,u=m.data,s=u.total_amount,d=u.max_amount,v=u.metal_amount,h=u.glass_amount,C=u.busyname,p=u.busyamt,N=u.showhacked,V=u.buildQueue,S=u.buildQueueLen,I=u.recipes,L=u.categories,w=(0,o.useSharedState)(c,"category",0),A=w[0],x=w[1];A===0&&(A="Tools");var E=v.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,"),P=h.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,"),D=s.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,"),M=(0,o.useSharedState)(c,"search_text",""),R=M[0],O=M[1],F=(0,y.createSearch)(R,function($){return $.name}),_="";S>0&&(_=V.map(function($,G){return(0,e.createComponentVNode)(2,f.Box,{children:(0,e.createComponentVNode)(2,f.Button,{fluid:!0,icon:"times",color:"transparent",content:V[G][0],onClick:function(){function X(){return i("remove_from_queue",{remove_from_queue:V.indexOf($)+1})}return X}()},$)},G)}));var U=(0,a.flow)([(0,t.filter)(function($){return($.category.indexOf(A)>-1||R)&&(u.showhacked||!$.hacked)}),R&&(0,t.filter)(F),(0,t.sortBy)(function($){return $.name.toLowerCase()})])(I),z="Build";return R?z="Results for: '"+R+"':":A&&(z="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,f.Stack,{fill:!0,horizontal:!0,children:[(0,e.createComponentVNode)(2,f.Stack.Item,{width:"70%",children:(0,e.createComponentVNode)(2,f.Section,{fill:!0,scrollable:!0,title:z,buttons:(0,e.createComponentVNode)(2,f.Dropdown,{width:"150px",options:L,selected:A,onSelected:function(){function $(G){return x(G)}return $}()}),children:[(0,e.createComponentVNode)(2,f.Input,{fluid:!0,placeholder:"Search for...",onInput:function(){function $(G,X){return O(X)}return $}(),mb:1}),U.map(function($){return(0,e.createComponentVNode)(2,f.Stack.Item,{grow:!0,children:[(0,e.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+$.image,style:{"vertical-align":"middle",width:"32px",margin:"0px","margin-left":"0px"}}),(0,e.createComponentVNode)(2,f.Button,{mr:1,icon:"hammer",selected:u.busyname===$.name&&u.busyamt===1,disabled:!B($,u.metal_amount,u.glass_amount,1),onClick:function(){function G(){return i("make",{make:$.uid,multiplier:1})}return G}(),children:(0,y.toTitleCase)($.name)}),$.max_multiplier>=10&&(0,e.createComponentVNode)(2,f.Button,{mr:1,icon:"hammer",selected:u.busyname===$.name&&u.busyamt===10,disabled:!B($,u.metal_amount,u.glass_amount,10),onClick:function(){function G(){return i("make",{make:$.uid,multiplier:10})}return G}(),children:"10x"}),$.max_multiplier>=25&&(0,e.createComponentVNode)(2,f.Button,{mr:1,icon:"hammer",selected:u.busyname===$.name&&u.busyamt===25,disabled:!B($,u.metal_amount,u.glass_amount,25),onClick:function(){function G(){return i("make",{make:$.uid,multiplier:25})}return G}(),children:"25x"}),$.max_multiplier>25&&(0,e.createComponentVNode)(2,f.Button,{mr:1,icon:"hammer",selected:u.busyname===$.name&&u.busyamt===$.max_multiplier,disabled:!B($,u.metal_amount,u.glass_amount,$.max_multiplier),onClick:function(){function G(){return i("make",{make:$.uid,multiplier:$.max_multiplier})}return G}(),children:[$.max_multiplier,"x"]}),$.requirements&&Object.keys($.requirements).map(function(G){return(0,y.toTitleCase)(G)+": "+$.requirements[G]}).join(", ")||(0,e.createComponentVNode)(2,f.Box,{children:"No resources required."})]},$.ref)})]})}),(0,e.createComponentVNode)(2,f.Stack.Item,{width:"30%",children:[(0,e.createComponentVNode)(2,f.Section,{title:"Materials",children:(0,e.createComponentVNode)(2,f.LabeledList,{children:[(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Metal",children:E}),(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Glass",children:P}),(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Total",children:D}),(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Storage",children:[u.fill_percent,"% Full"]})]})}),(0,e.createComponentVNode)(2,f.Section,{title:"Building",children:(0,e.createComponentVNode)(2,f.Box,{color:C?"green":"",children:C||"Nothing"})}),(0,e.createComponentVNode)(2,f.Section,{title:"Build Queue",height:23.7,children:[_,(0,e.createComponentVNode)(2,f.Button,{mt:.5,fluid:!0,icon:"times",content:"Clear All",color:"red",disabled:!u.buildQueueLen,onClick:function(){function $(){return i("clear_queue")}return $}()})]})]})]})})})}return g}()},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),f=r.BioChipPad=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,l=k.data,c=l.implant,m=l.contains_case,i=l.gps,u=l.tag,s=(0,a.useLocalState)(B,"newTag",u),d=s[0],v=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:!m,onClick:function(){function h(){return g("eject_case")}return h}()})}),children:c&&m?(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}),!!i&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Tag",children:[(0,e.createComponentVNode)(2,t.Input,{width:"5.5rem",value:u,onEnter:function(){function h(){return g("tag",{newtag:d})}return h}(),onInput:function(){function h(C,p){return v(p)}return h}()}),(0,e.createComponentVNode)(2,t.Button,{disabled:u===d,width:"20px",mb:"0",ml:"0.25rem",onClick:function(){function h(){return g("tag",{newtag:d})}return h}(),children:(0,e.createComponentVNode)(2,t.Icon,{name:"pen"})})]})]})],4):m?(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),f=n(62411),b=r.Biogenerator=function(){function l(c,m){var i=(0,a.useBackend)(m),u=i.data,s=i.config,d=u.container,v=u.processing,h=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,f.Operating,{operating:v,name:h}),(0,e.createComponentVNode)(2,B),(0,e.createComponentVNode)(2,k),d?(0,e.createComponentVNode)(2,g):(0,e.createComponentVNode)(2,y)]})})})}return l}(),y=function(c,m){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,m){var i=(0,a.useBackend)(m),u=i.act,s=i.data,d=s.biomass,v=s.container,h=s.container_curr_reagents,C=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:d}),(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:"}),v?(0,e.createComponentVNode)(2,t.ProgressBar,{value:h,maxValue:C,children:(0,e.createComponentVNode)(2,t.Box,{textAlign:"center",children:h+" / "+C+" units"})}):(0,e.createComponentVNode)(2,t.Stack.Item,{children:"None"})]})]})},k=function(c,m){var i=(0,a.useBackend)(m),u=i.act,s=i.data,d=s.has_plants,v=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:!d,tooltip:d?"":"There are no plants in the biogenerator.",tooltipPosition:"top-start",content:"Activate",onClick:function(){function h(){return u("activate")}return h}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{width:"40%",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"flask",disabled:!v,tooltip:v?"":"The biogenerator does not have a container.",tooltipPosition:"top",content:"Detach Container",onClick:function(){function h(){return u("detach_container")}return h}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{width:"30%",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"eject",disabled:!d,tooltip:d?"":"There are no stored plants to eject.",tooltipPosition:"top-end",content:"Eject Plants",onClick:function(){function h(){return u("eject_plants")}return h}()})})]})})},g=function(c,m){var i=(0,a.useBackend)(m),u=i.act,s=i.data,d=s.biomass,v=s.product_list,h=(0,a.useSharedState)(m,"vendAmount",1),C=h[0],p=h[1],N=Object.entries(v).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*C,(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:d.25?750+400*Math.random():290+150*Math.random(),time:60+150*Math.random(),children:(0,e.createComponentVNode)(2,t.Stack,{mb:"30px",fontsize:"256px",children:(0,e.createComponentVNode)(2,t.Stack.Item,{bold:!0,color:"red",fontsize:"256px",textAlign:"center",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"skull",size:14,mb:"64px"}),(0,e.createVNode)(1,"br"),"E$#OR:& U#KN!WN IN%ERF#R_NCE"]})})})})}return k}(),y=r.BluespaceTap=function(){function k(g,l){var c=(0,a.useBackend)(l),m=c.act,i=c.data,u=i.product||[],s=i.desiredMiningPower,d=i.miningPower,v=i.points,h=i.totalPoints,C=i.powerUse,p=i.availablePower,N=i.emagged,V=i.autoShutown,S=i.stabilizers,I=i.stabilizerPower,L=i.stabilizerPriority,w=s>d&&"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,b),(0,e.createComponentVNode)(2,B),(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:V&&!N?"toggle-on":"toggle-off",content:"Auto shutdown",color:V&&!N?"green":"red",disabled:!!N,tooltip:"Turn auto shutdown on or off",tooltipPosition:"top",onClick:function(){function A(){return m("auto_shutdown")}return A}()}),(0,e.createComponentVNode)(2,t.Button,{icon:S&&!N?"toggle-on":"toggle-off",content:"Stabilizers",color:S&&!N?"green":"red",disabled:!!N,tooltip:"Turn stabilizers on or off",tooltipPosition:"top",onClick:function(){function A(){return m("stabilizers")}return A}()}),(0,e.createComponentVNode)(2,t.Button,{icon:L&&!N?"toggle-on":"toggle-off",content:"Stabilizer priority",color:L&&!N?"green":"red",disabled:!!N,tooltip:"On: Mining power will not exceed what can be stabilized",tooltipPosition:"top",onClick:function(){function A(){return m("stabilizer_priority")}return A}()}),(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Desired Mining Power",children:(0,f.formatPower)(s)}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{labelStyle:{"vertical-align":"top"},label:"Set Desired Mining Power",children:(0,e.createComponentVNode)(2,t.Stack,{width:"100%",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Button,{icon:"step-backward",disabled:s===0||N,tooltip:"Set to 0",tooltipPosition:"bottom",onClick:function(){function A(){return m("set",{set_power:0})}return A}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"fast-backward",tooltip:"Decrease by 10 MW",tooltipPosition:"bottom",disabled:s===0||N,onClick:function(){function A(){return m("set",{set_power:s-1e7})}return A}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"backward",disabled:s===0||N,tooltip:"Decrease by 1 MW",tooltipPosition:"bottom",onClick:function(){function A(){return m("set",{set_power:s-1e6})}return A}()})]}),(0,e.createComponentVNode)(2,t.Stack.Item,{mx:1,children:(0,e.createComponentVNode)(2,t.NumberInput,{disabled:N,minvalue:0,value:s,maxvalue:1/0,step:1,onChange:function(){function A(x,E){return m("set",{set_power:E})}return A}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Button,{icon:"forward",disabled:N,tooltip:"Increase by one MW",tooltipPosition:"bottom",onClick:function(){function A(){return m("set",{set_power:s+1e6})}return A}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"fast-forward",disabled:N,tooltip:"Increase by 10MW",tooltipPosition:"bottom",onClick:function(){function A(){return m("set",{set_power:s+1e7})}return A}()})]})]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Total Power Use",children:(0,f.formatPower)(C)}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Mining Power Use",children:(0,f.formatPower)(d)}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Stabilizer Power Use",children:(0,f.formatPower)(I)}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Surplus Power",children:(0,f.formatPower)(p)})]})]})}),(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:v}),(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>=v,onClick:function(){function x(){return m("vend",{target:A.key})}return x}(),content:A.price})},A.key)})})})})]})})]})})})}return k}(),B=r.Alerts=function(){function k(g,l){var c=(0,a.useBackend)(l),m=c.act,i=c.data,u=i.product||[],s=i.miningPower,d=i.stabilizerPower,v=i.emagged,h=i.safeLevels,C=i.autoShutown,p=i.stabilizers,N=i.overhead;return(0,e.createFragment)([!C&&!v&&(0,e.createComponentVNode)(2,t.NoticeBox,{danger:1,children:"Auto shutdown disabled"}),v?(0,e.createComponentVNode)(2,t.NoticeBox,{danger:1,children:"All safeties disabled"}):s<=15e6?"":p?s>d+15e6?(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 k}()},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),f=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"]],g={average:[.25,.5],bad:[.5,1/0]},l=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,f.Box,{children:L},L)],0)},null):null},m=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""},i=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,u,{occupant:E}):(0,e.createComponentVNode)(2,N);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}(),u=function(S){var I=S.occupant;return(0,e.createComponentVNode)(2,f.Box,{children:[(0,e.createComponentVNode)(2,s,{occupant:I}),(0,e.createComponentVNode)(2,d,{occupant:I}),(0,e.createComponentVNode)(2,v,{occupant:I}),(0,e.createComponentVNode)(2,C,{organs:I.extOrgan}),(0,e.createComponentVNode)(2,p,{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,f.Section,{title:"Occupant",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,f.Button,{icon:"print",onClick:function(){function E(){return w("print_p")}return E}(),children:"Print Report"}),(0,e.createComponentVNode)(2,f.Button,{icon:"user-slash",onClick:function(){function E(){return w("ejectify")}return E}(),children:"Eject"})],4),children:(0,e.createComponentVNode)(2,f.LabeledList,{children:[(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Name",children:x.name}),(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Health",children:(0,e.createComponentVNode)(2,f.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,f.LabeledList.Item,{label:"Status",color:y[x.stat][0],children:y[x.stat][1]}),(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Temperature",children:[(0,e.createComponentVNode)(2,f.AnimatedNumber,{value:(0,a.round)(x.bodyTempC)}),"\xB0C,\xA0",(0,e.createComponentVNode)(2,f.AnimatedNumber,{value:(0,a.round)(x.bodyTempF)}),"\xB0F"]}),(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Implants",children:x.implant_len?(0,e.createComponentVNode)(2,f.Box,{children:x.implant.map(function(E){return E.name}).join(", ")}):(0,e.createComponentVNode)(2,f.Box,{color:"label",children:"None"})})]})})},d=function(S){var I=S.occupant;return I.hasBorer||I.blind||I.colourblind||I.nearsighted||I.hasVirus?(0,e.createComponentVNode)(2,f.Section,{title:"Abnormalities",children:B.map(function(L,w){if(I[L[0]])return(0,e.createComponentVNode)(2,f.Box,{color:L[1],bold:L[1]==="bad",children:L[2]},L[2])})}):(0,e.createComponentVNode)(2,f.Section,{title:"Abnormalities",children:(0,e.createComponentVNode)(2,f.Box,{color:"label",children:"No abnormalities found."})})},v=function(S){var I=S.occupant;return(0,e.createComponentVNode)(2,f.Section,{title:"Damage",children:(0,e.createComponentVNode)(2,f.Table,{children:l(k,function(L,w,A){return(0,e.createFragment)([(0,e.createComponentVNode)(2,f.Table.Row,{color:"label",children:[(0,e.createComponentVNode)(2,f.Table.Cell,{children:[L[0],":"]}),(0,e.createComponentVNode)(2,f.Table.Cell,{children:!!w&&w[0]+":"})]}),(0,e.createComponentVNode)(2,f.Table.Row,{children:[(0,e.createComponentVNode)(2,f.Table.Cell,{children:(0,e.createComponentVNode)(2,h,{value:I[L[1]],marginBottom:A100)&&"average"||!!I.status.robotic&&"label",width:"33%",children:(0,t.capitalize)(I.name)}),(0,e.createComponentVNode)(2,f.Table.Cell,{textAlign:"center",children:(0,e.createComponentVNode)(2,f.ProgressBar,{m:-.5,min:"0",max:I.maxHealth,mt:L>0&&"0.5rem",value:I.totalLoss/I.maxHealth,ranges:g,children:(0,e.createComponentVNode)(2,f.Stack,{children:[(0,e.createComponentVNode)(2,f.Tooltip,{content:"Total damage",children:(0,e.createComponentVNode)(2,f.Stack.Item,{children:[(0,e.createComponentVNode)(2,f.Icon,{name:"heartbeat",mr:.5}),(0,a.round)(I.totalLoss)]})}),!!I.bruteLoss&&(0,e.createComponentVNode)(2,f.Tooltip,{content:"Brute damage",children:(0,e.createComponentVNode)(2,f.Stack.Item,{grow:!0,children:[(0,e.createComponentVNode)(2,f.Icon,{name:"bone",mr:.5}),(0,a.round)(I.bruteLoss)]})}),!!I.fireLoss&&(0,e.createComponentVNode)(2,f.Tooltip,{content:"Burn damage",children:(0,e.createComponentVNode)(2,f.Stack.Item,{children:[(0,e.createComponentVNode)(2,f.Icon,{name:"fire",mr:.5}),(0,a.round)(I.fireLoss)]})})]})})}),(0,e.createComponentVNode)(2,f.Table.Cell,{textAlign:"right",verticalAlign:"top",width:"33%",pt:L>0&&"calc(0.5rem + 2px)",children:[(0,e.createComponentVNode)(2,f.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,m(I.germ_level),!!I.open&&"Open incision"])}),(0,e.createComponentVNode)(2,f.Box,{inline:!0,children:[c([!!I.status.splinted&&(0,e.createComponentVNode)(2,f.Box,{color:"good",children:"Splinted"}),!!I.status.robotic&&(0,e.createComponentVNode)(2,f.Box,{color:"label",children:"Robotic"}),!!I.status.dead&&(0,e.createComponentVNode)(2,f.Box,{color:"bad",bold:!0,children:"DEAD"})]),c(I.shrapnel.map(function(w){return w.known?w.name:"Unknown object"}))]})]})]},L)})]})})},p=function(S){return S.organs.length===0?(0,e.createComponentVNode)(2,f.Section,{title:"Internal Organs",children:(0,e.createComponentVNode)(2,f.Box,{color:"label",children:"N/A"})}):(0,e.createComponentVNode)(2,f.Section,{title:"Internal Organs",children:(0,e.createComponentVNode)(2,f.Table,{children:[(0,e.createComponentVNode)(2,f.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,f.Table.Cell,{children:"Name"}),(0,e.createComponentVNode)(2,f.Table.Cell,{textAlign:"center",children:"Damage"}),(0,e.createComponentVNode)(2,f.Table.Cell,{textAlign:"right",children:"Injuries"})]}),S.organs.map(function(I,L){return(0,e.createComponentVNode)(2,f.Table.Row,{children:[(0,e.createComponentVNode)(2,f.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,f.Table.Cell,{textAlign:"center",children:(0,e.createComponentVNode)(2,f.ProgressBar,{min:"0",max:I.maxHealth,value:I.damage/I.maxHealth,mt:L>0&&"0.5rem",ranges:g,children:(0,a.round)(I.damage)})}),(0,e.createComponentVNode)(2,f.Table.Cell,{textAlign:"right",verticalAlign:"top",width:"33%",pt:L>0&&"calc(0.5rem + 2px)",children:[(0,e.createComponentVNode)(2,f.Box,{color:"average",inline:!0,children:c([m(I.germ_level)])}),(0,e.createComponentVNode)(2,f.Box,{inline:!0,children:c([I.robotic===1&&(0,e.createComponentVNode)(2,f.Box,{color:"label",children:"Robotic"}),I.robotic===2&&(0,e.createComponentVNode)(2,f.Box,{color:"label",children:"Assisted"}),!!I.dead&&(0,e.createComponentVNode)(2,f.Box,{color:"bad",bold:!0,children:"DEAD"})])})]})]},L)})]})})},N=function(){return(0,e.createComponentVNode)(2,f.Section,{fill:!0,children:(0,e.createComponentVNode)(2,f.Stack,{fill:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,f.Stack.Item,{grow:!0,align:"center",color:"label",children:[(0,e.createComponentVNode)(2,f.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),f=n(3939),b=n(39473),y=r.BookBinder=function(){function B(k,g){var l=(0,a.useBackend)(g),c=l.act,m=l.data,i=m.selectedbook,u=m.book_categories,s=[];return u.map(function(d){return s[d.description]=d.category_id}),(0,e.createComponentVNode)(2,o.Window,{width:600,height:400,children:[(0,e.createComponentVNode)(2,f.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 d(){return c("print_book")}return d}()}),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:i.title,onClick:function(){function d(){return(0,f.modalOpen)(g,"edit_selected_title")}return d}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Author",children:(0,e.createComponentVNode)(2,t.Button,{textAlign:"left",icon:"pen",width:"auto",content:i.author,onClick:function(){function d(){return(0,f.modalOpen)(g,"edit_selected_author")}return d}()})}),(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:u.map(function(d){return d.description}),onSelected:function(){function d(v){return c("toggle_binder_category",{category_id:s[v]})}return d}()})})}),(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 d(){return(0,f.modalOpen)(g,"edit_selected_summary")}return d}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{children:i.summary})]}),(0,e.createVNode)(1,"br"),u.filter(function(d){return i.categories.includes(d.category_id)}).map(function(d){return(0,e.createComponentVNode)(2,t.Button,{content:d.description,selected:!0,icon:"unlink",onClick:function(){function v(){return c("toggle_binder_category",{category_id:d.category_id})}return v}()},d.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),f=function(l){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"}],m=c.find(function(i){return i.modes.includes(l)});return(0,e.createComponentVNode)(2,t.Box,{color:m.color,children:[" ",m.label," "]})},b=r.BotCall=function(){function g(l,c){var m=(0,a.useBackend)(c),i=m.act,u=m.data,s=(0,a.useLocalState)(c,"tabIndex",0),d=s[0],v=s[1],h={0:"Security",1:"Medibot",2:"Cleanbot",3:"Floorbot",4:"Mule",5:"Honkbot"},C=function(){function p(N){return h[N]?(0,e.createComponentVNode)(2,y,{model:h[N]}):"This should not happen. Report on Paradise Github"}return p}();return(0,e.createComponentVNode)(2,o.Window,{width:700,height:400,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:d===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(p,N){return(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:d===N,onClick:function(){function V(){return v(N)}return V}(),children:h[N]},N)})})}),C(d)]})})})}return g}(),y=function(l,c){var m=(0,a.useBackend)(c),i=m.act,u=m.data,s=u.bots;return s[l.model]!==void 0?(0,e.createComponentVNode)(2,k,{model:[l.model]}):(0,e.createComponentVNode)(2,B,{model:[l.model]})},B=function(l,c){var m=(0,a.useBackend)(c),i=m.act,u=m.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 ",[l.model]," detected"]})})},k=function(l,c){var m=(0,a.useBackend)(c),i=m.act,u=m.data,s=u.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[l.model].map(function(d){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:d.name}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:d.model}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:d.on?f(d.status):(0,e.createComponentVNode)(2,t.Box,{color:"red",children:"Off"})}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:d.location}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Interface",onClick:function(){function v(){return i("interface",{botref:d.UID})}return v}()})}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Call",onClick:function(){function v(){return i("call",{botref:d.UID})}return v}()})})]},d.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),f=n(92963),b=r.BotClean=function(){function y(B,k){var g=(0,a.useBackend)(k),l=g.act,c=g.data,m=c.locked,i=c.noaccess,u=c.maintpanel,s=c.on,d=c.autopatrol,v=c.canhack,h=c.emagged,C=c.remote_disabled,p=c.painame,N=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,f.BotStatus),(0,e.createComponentVNode)(2,t.Section,{title:"Cleaning Settings",children:(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:N,content:"Clean Blood",disabled:i,onClick:function(){function S(){return l("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 l("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})})]}),p&&(0,e.createComponentVNode)(2,t.Section,{title:"pAI",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"eject",content:p,disabled:i,onClick:function(){function S(){return l("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),f=n(92963),b=r.BotFloor=function(){function y(B,k){var g=(0,a.useBackend)(k),l=g.act,c=g.data,m=c.noaccess,i=c.painame,u=c.hullplating,s=c.replace,d=c.eat,v=c.make,h=c.fixfloor,C=c.nag_empty,p=c.magnet,N=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,f.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:N})}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:u,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:m,onClick:function(){function V(){return l("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:m,onClick:function(){function V(){return l("replacetiles")}return V}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:h,content:"Repair damaged tiles and platings",disabled:m,onClick:function(){function V(){return l("fixfloors")}return V}()})]}),(0,e.createComponentVNode)(2,t.Section,{title:"Miscellaneous",children:[(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:d,content:"Finds tiles",disabled:m,onClick:function(){function V(){return l("eattiles")}return V}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:v,content:"Make pieces of metal into tiles when empty",disabled:m,onClick:function(){function V(){return l("maketiles")}return V}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:C,content:"Transmit notice when empty",disabled:m,onClick:function(){function V(){return l("nagonempty")}return V}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:p,content:"Traction Magnets",disabled:m,onClick:function(){function V(){return l("anchored")}return V}()})]}),i&&(0,e.createComponentVNode)(2,t.Section,{title:"pAI",children:(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,icon:"eject",content:i,disabled:m,onClick:function(){function V(){return l("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),f=n(92963),b=r.BotHonk=function(){function y(B,k){var g=(0,a.useBackend)(k),l=g.act,c=g.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,f.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),f=n(92963),b=r.BotMed=function(){function y(B,k){var g=(0,a.useBackend)(k),l=g.act,c=g.data,m=c.locked,i=c.noaccess,u=c.maintpanel,s=c.on,d=c.autopatrol,v=c.canhack,h=c.emagged,C=c.remote_disabled,p=c.painame,N=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,f.BotStatus),(0,e.createComponentVNode)(2,t.Section,{title:"Communication Settings",children:[(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,content:"Speaker",checked:!N,disabled:i,onClick:function(){function E(){return l("toggle_speaker")}return E}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,content:"Critical Patient Alerts",checked:V,disabled:i,onClick:function(){function E(){return l("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:i,onChange:function(){function E(P,D){return l("set_heal_threshold",{target:D})}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:i,onChange:function(){function E(P,D){return l("set_injection_amount",{target:D})}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:i,onClick:function(){function E(){return l("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:i,onClick:function(){function E(){return l("eject_reagent_glass")}return E}()})})]})})]}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{mt:1,fluid:!0,content:"Treat Viral Infections",checked:A,disabled:i,onClick:function(){function E(){return l("toggle_treat_viral")}return E}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,content:"Stationary Mode",checked:S,disabled:i,onClick:function(){function E(){return l("toggle_stationary_mode")}return E}()})]}),p&&(0,e.createComponentVNode)(2,t.Section,{title:"pAI",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"eject",content:p,disabled:i,onClick:function(){function E(){return l("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),f=n(92963),b=r.BotSecurity=function(){function y(B,k){var g=(0,a.useBackend)(k),l=g.act,c=g.data,m=c.noaccess,i=c.painame,u=c.check_id,s=c.check_weapons,d=c.check_warrant,v=c.arrest_mode,h=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,f.BotStatus),(0,e.createComponentVNode)(2,t.Section,{title:"Who To Arrest",children:[(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:u,content:"Unidentifiable Persons",disabled:m,onClick:function(){function C(){return l("authid")}return C}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:s,content:"Unauthorized Weapons",disabled:m,onClick:function(){function C(){return l("authweapon")}return C}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:d,content:"Wanted Criminals",disabled:m,onClick:function(){function C(){return l("authwarrant")}return C}()})]}),(0,e.createComponentVNode)(2,t.Section,{title:"Arrest Procedure",children:[(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:v,content:"Detain Targets Indefinitely",disabled:m,onClick:function(){function C(){return l("arrtype")}return C}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:h,content:"Announce Arrests On Radio",disabled:m,onClick:function(){function C(){return l("arrdeclare")}return C}()})]}),i&&(0,e.createComponentVNode)(2,t.Section,{title:"pAI",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"eject",content:i,disabled:m,onClick:function(){function C(){return l("ejectpai")}return C}()})})]})})}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),f=function(k,g){var l=k.cell,c=(0,o.useBackend)(g),m=c.act,i=l.cell_id,u=l.occupant,s=l.crimes,d=l.brigged_by,v=l.time_left_seconds,h=l.time_set_seconds,C=l.ref,p="";v>0&&(p+=" BrigCells__listRow--active");var N=function(){m("release",{ref:C})};return(0,e.createComponentVNode)(2,t.Table.Row,{className:p,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:i}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:u}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:s}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:d}),(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.TimeDisplay,{totalSeconds:v})}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Button,{type:"button",onClick:N,children:"Release"})})]})},b=function(k){var g=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"})]}),g.map(function(l){return(0,e.createComponentVNode)(2,f,{cell:l},l.ref)})]})},y=r.BrigCells=function(){function B(k,g){var l=(0,o.useBackend)(g),c=l.act,m=l.data,i=m.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:i})})})})})}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),f=r.BrigTimer=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,l=k.data;l.nameText=l.occupant,l.timing&&(l.prisoner_hasrec?l.nameText=(0,e.createComponentVNode)(2,t.Box,{color:"green",children:l.occupant}):l.nameText=(0,e.createComponentVNode)(2,t.Box,{color:"red",children:l.occupant}));var c="pencil-alt";l.prisoner_name&&(l.prisoner_hasrec||(c="exclamation-triangle"));var m=[],i=0;for(i=0;im?this.substring(0,m)+"...":this};var k=function(i,u){var s,d;if(!u)return[];var v=i.findIndex(function(h){return h.name===u.name});return[(s=i[v-1])==null?void 0:s.name,(d=i[v+1])==null?void 0:d.name]},g=function(i,u){u===void 0&&(u="");var s=(0,f.createSearch)(u,function(d){return d.name});return(0,t.flow)([(0,a.filter)(function(d){return d==null?void 0:d.name}),u&&(0,a.filter)(s),(0,a.sortBy)(function(d){return d.name})])(i)},l=r.CameraConsole=function(){function m(i,u){var s=(0,b.useBackend)(u),d=s.act,v=s.data,h=s.config,C=v.mapRef,p=v.activeCamera,N=g(v.cameras),V=k(N,p),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),p&&p.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 d("switch_camera",{name:S})}return L}()}),(0,e.createComponentVNode)(2,y.Button,{icon:"chevron-right",disabled:!I,onClick:function(){function L(){return d("switch_camera",{name:I})}return L}()})],4),(0,e.createComponentVNode)(2,y.ByondUi,{className:"CameraConsole__map",params:{id:C,type:"map"}})],4)]})}return m}(),c=r.CameraConsoleContent=function(){function m(i,u){var s=(0,b.useBackend)(u),d=s.act,v=s.data,h=(0,b.useLocalState)(u,"searchText",""),C=h[0],p=h[1],N=v.activeCamera,V=g(v.cameras,C);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 p(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",N&&S.name===N.name&&"Button--selected"]),S.name.trimLongStr(23),0,{title:S.name,onClick:function(){function I(){return d("switch_camera",{name:S.name})}return I}()},S.name)})})})]})}return m}()},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),f=n(49968),b=n(98595),y=r.Canister=function(){function B(k,g){var l=(0,t.useBackend)(g),c=l.act,m=l.data,i=m.portConnected,u=m.tankPressure,s=m.releasePressure,d=m.defaultReleasePressure,v=m.minReleasePressure,h=m.maxReleasePressure,C=m.valveOpen,p=m.name,N=m.canLabel,V=m.colorContainer,S=m.color_index,I=m.hasHoldingTank,L=m.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=[],D=[],M=[],R=[],O=0;for(O=0;Op.current_positions&&(0,e.createComponentVNode)(2,t.Box,{color:"green",children:p.total_positions-p.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:d.cooldown_time||!p.can_close,onClick:function(){function N(){return s("make_job_unavailable",{job:p.title})}return N}()})}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{content:"+",disabled:d.cooldown_time||!p.can_open,onClick:function(){function N(){return s("make_job_available",{job:p.title})}return N}()})}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:d.target_dept&&(0,e.createComponentVNode)(2,t.Box,{color:"green",children:d.priority_jobs.indexOf(p.title)>-1?"Yes":""})||(0,e.createComponentVNode)(2,t.Button,{content:p.is_priority?"Yes":"No",selected:p.is_priority,disabled:d.cooldown_time||!p.can_prioritize,onClick:function(){function N(){return s("prioritize_job",{job:p.title})}return N}()})})]},p.title)})]})})]}):C=(0,e.createComponentVNode)(2,B);break;case 2:!d.authenticated||!d.scan_name?C=(0,e.createComponentVNode)(2,B):d.modify_name?C=(0,e.createComponentVNode)(2,f.AccessList,{accesses:d.regions,selectedList:d.selectedAccess,accessMod:function(){function p(N){return s("set",{access:N})}return p}(),grantAll:function(){function p(){return s("grant_all")}return p}(),denyAll:function(){function p(){return s("clear_all")}return p}(),grantDep:function(){function p(N){return s("grant_region",{region:N})}return p}(),denyDep:function(){function p(N){return s("deny_region",{region:N})}return p}()}):C=(0,e.createComponentVNode)(2,k);break;case 3:d.authenticated?d.records.length?C=(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:!d.authenticated||d.records.length===0||d.target_dept,onClick:function(){function p(){return s("wipe_all_logs")}return p}()}),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"}),!!d.iscentcom&&(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Deleted By"})]}),d.records.map(function(p){return(0,e.createComponentVNode)(2,t.Table.Row,{height:2,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:p.transferee}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:p.oldvalue}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:p.newvalue}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:p.whodidit}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:p.timestamp}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:p.reason}),!!d.iscentcom&&(0,e.createComponentVNode)(2,t.Table.Cell,{children:p.deletedby})]},p.timestamp)})]}),!!d.iscentcom&&(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{icon:"pencil-alt",content:"Delete MY Records",color:"purple",disabled:!d.authenticated||d.records.length===0,onClick:function(){function p(){return s("wipe_my_logs")}return p}()})})]}):C=(0,e.createComponentVNode)(2,g):C=(0,e.createComponentVNode)(2,B);break;case 4:!d.authenticated||!d.scan_name?C=(0,e.createComponentVNode)(2,B):C=(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"})]}),d.people_dept.map(function(p){return(0,e.createComponentVNode)(2,t.Table.Row,{height:2,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:p.name}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:p.title}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:p.crimstat}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Button,{content:p.buttontext,disabled:!p.demotable,onClick:function(){function N(){return s("remote_demote",{remote_demote:p.name})}return N}()})})]},p.title)})]})});break;default:C=(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:h}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:v}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:C})]})})})}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),f=n(36036),b=n(98595),y=n(25328),B=r.CargoConsole=function(){function u(s,d){return(0,e.createComponentVNode)(2,b.Window,{width:900,height:800,children:(0,e.createComponentVNode)(2,b.Window.Content,{children:(0,e.createComponentVNode)(2,f.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,k),(0,e.createComponentVNode)(2,g),(0,e.createComponentVNode)(2,l),(0,e.createComponentVNode)(2,c),(0,e.createComponentVNode)(2,i)]})})})}return u}(),k=function(s,d){var v=(0,o.useLocalState)(d,"contentsModal",null),h=v[0],C=v[1],p=(0,o.useLocalState)(d,"contentsModalTitle",null),N=p[0],V=p[1];if(h!==null&&N!==null)return(0,e.createComponentVNode)(2,f.Modal,{maxWidth:"75%",width:window.innerWidth+"px",maxHeight:window.innerHeight*.75+"px",mx:"auto",children:[(0,e.createComponentVNode)(2,f.Box,{width:"100%",bold:!0,children:(0,e.createVNode)(1,"h1",null,[N,(0,e.createTextVNode)(" contents:")],0)}),(0,e.createComponentVNode)(2,f.Box,{children:h.map(function(S){return(0,e.createComponentVNode)(2,f.Box,{children:["- ",S]},S)})}),(0,e.createComponentVNode)(2,f.Box,{m:2,children:(0,e.createComponentVNode)(2,f.Button,{content:"Close",onClick:function(){function S(){C(null),V(null)}return S}()})})]})},g=function(s,d){var v=(0,o.useBackend)(d),h=v.act,C=v.data,p=C.is_public,N=C.timeleft,V=C.moving,S=C.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...",N!==1?I="Shuttle is en route (ETA: "+N+" minutes)":I="Shuttle is en route (ETA: "+N+" minute)"),(0,e.createComponentVNode)(2,f.Stack.Item,{children:(0,e.createComponentVNode)(2,f.Section,{title:"Status",children:(0,e.createComponentVNode)(2,f.LabeledList,{children:[(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Shuttle Status",children:I}),p===0&&(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Controls",children:[(0,e.createComponentVNode)(2,f.Button,{content:L,disabled:V,onClick:function(){function w(){return h("moveShuttle")}return w}()}),(0,e.createComponentVNode)(2,f.Button,{content:"View Central Command Messages",onClick:function(){function w(){return h("showMessages")}return w}()})]})]})})})},l=function(s,d){var v,h=(0,o.useBackend)(d),C=h.act,p=h.data,N=p.accounts,V=(0,o.useLocalState)(d,"selectedAccount"),S=V[0],I=V[1],L=[];return N.map(function(w){return L[w.name]=w.account_UID}),(0,e.createComponentVNode)(2,f.Stack.Item,{children:(0,e.createComponentVNode)(2,f.Section,{title:"Payment",children:[(0,e.createComponentVNode)(2,f.Dropdown,{width:"190px",options:N.map(function(w){return w.name}),selected:(v=N.filter(function(w){return w.account_UID===S})[0])==null?void 0:v.name,onSelected:function(){function w(A){return I(L[A])}return w}()}),N.filter(function(w){return w.account_UID===S}).map(function(w){return(0,e.createComponentVNode)(2,f.LabeledList,{children:[(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Account Name",children:(0,e.createComponentVNode)(2,f.Stack.Item,{mt:1,children:w.name})}),(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Balance",children:(0,e.createComponentVNode)(2,f.Stack.Item,{children:w.balance})})]},w.account_UID)})]})})},c=function(s,d){var v=(0,o.useBackend)(d),h=v.act,C=v.data,p=C.requests,N=C.categories,V=C.supply_packs,S=(0,o.useSharedState)(d,"category","Emergency"),I=S[0],L=S[1],w=(0,o.useSharedState)(d,"search_text",""),A=w[0],x=w[1],E=(0,o.useLocalState)(d,"contentsModal",null),P=E[0],D=E[1],M=(0,o.useLocalState)(d,"contentsModalTitle",null),R=M[0],O=M[1],F=(0,y.createSearch)(A,function(X){return X.name}),_=(0,o.useLocalState)(d,"selectedAccount"),U=_[0],z=_[1],$=(0,a.flow)([(0,t.filter)(function(X){return X.cat===N.filter(function(J){return J.name===I})[0].category||A}),A&&(0,t.filter)(F),(0,t.sortBy)(function(X){return X.name.toLowerCase()})])(V),G="Crate Catalogue";return A?G="Results for '"+A+"':":I&&(G="Browsing "+I),(0,e.createComponentVNode)(2,f.Stack.Item,{children:(0,e.createComponentVNode)(2,f.Section,{title:G,buttons:(0,e.createComponentVNode)(2,f.Dropdown,{width:"190px",options:N.map(function(X){return X.name}),selected:I,onSelected:function(){function X(J){return L(J)}return X}()}),children:[(0,e.createComponentVNode)(2,f.Input,{fluid:!0,placeholder:"Search for...",onInput:function(){function X(J,se){return x(se)}return X}(),mb:1}),(0,e.createComponentVNode)(2,f.Box,{maxHeight:25,overflowY:"auto",overflowX:"hidden",children:(0,e.createComponentVNode)(2,f.Table,{m:"0.5rem",children:$.map(function(X){return(0,e.createComponentVNode)(2,f.Table.Row,{children:[(0,e.createComponentVNode)(2,f.Table.Cell,{bold:!0,children:[X.name," (",X.cost," Credits)"]}),(0,e.createComponentVNode)(2,f.Table.Cell,{textAlign:"right",pr:1,children:[(0,e.createComponentVNode)(2,f.Button,{content:"Order 1",icon:"shopping-cart",disabled:!U,onClick:function(){function J(){return h("order",{crate:X.ref,multiple:!1,account:U})}return J}()}),(0,e.createComponentVNode)(2,f.Button,{content:"Order Multiple",icon:"cart-plus",disabled:!U||X.singleton,onClick:function(){function J(){return h("order",{crate:X.ref,multiple:!0,account:U})}return J}()}),(0,e.createComponentVNode)(2,f.Button,{content:"View Contents",icon:"search",onClick:function(){function J(){D(X.contents),O(X.name)}return J}()})]})]},X.name)})})})]})})},m=function(s,d){var v=s.request,h,C;switch(v.department){case"Engineering":C="CE",h="orange";break;case"Medical":C="CMO",h="teal";break;case"Science":C="RD",h="purple";break;case"Supply":C="CT",h="brown";break;case"Service":C="HOP",h="olive";break;case"Security":C="HOS",h="red";break;case"Command":C="CAP",h="blue";break;case"Assistant":C="Any Head",h="grey";break}return(0,e.createComponentVNode)(2,f.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,f.Stack.Item,{mt:.5,children:"Approval Required:"}),!!v.req_cargo_approval&&(0,e.createComponentVNode)(2,f.Stack.Item,{children:(0,e.createComponentVNode)(2,f.Button,{color:"brown",content:"QM",icon:"user-tie",tooltip:"This Order requires approval from the QM still"})}),!!v.req_head_approval&&(0,e.createComponentVNode)(2,f.Stack.Item,{children:(0,e.createComponentVNode)(2,f.Button,{color:h,content:C,disabled:v.req_cargo_approval,icon:"user-tie",tooltip:v.req_cargo_approval?"This Order first requires approval from the QM before the "+C+" can approve it":"This Order requires approval from the "+C+" still"})})]})},i=function(s,d){var v=(0,o.useBackend)(d),h=v.act,C=v.data,p=C.requests,N=C.orders,V=C.shipments;return(0,e.createComponentVNode)(2,f.Section,{fill:!0,scrollable:!0,title:"Orders",children:[(0,e.createComponentVNode)(2,f.Box,{bold:!0,children:"Requests"}),(0,e.createComponentVNode)(2,f.Table,{children:p.map(function(S){return(0,e.createComponentVNode)(2,f.Table.Row,{className:"Cargo_RequestList",children:[(0,e.createComponentVNode)(2,f.Table.Cell,{mb:1,children:[(0,e.createComponentVNode)(2,f.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,f.Box,{italic:!0,children:["Reason: ",S.comment]}),(0,e.createComponentVNode)(2,m,{request:S})]}),(0,e.createComponentVNode)(2,f.Stack.Item,{textAlign:"right",children:[(0,e.createComponentVNode)(2,f.Button,{content:"Approve",color:"green",disabled:!S.can_approve,onClick:function(){function I(){return h("approve",{ordernum:S.ordernum})}return I}()}),(0,e.createComponentVNode)(2,f.Button,{content:"Deny",color:"red",disabled:!S.can_deny,onClick:function(){function I(){return h("deny",{ordernum:S.ordernum})}return I}()})]})]},S.ordernum)})}),(0,e.createComponentVNode)(2,f.Box,{bold:!0,children:"Orders Awaiting Delivery"}),(0,e.createComponentVNode)(2,f.Table,{m:"0.5rem",children:N.map(function(S){return(0,e.createComponentVNode)(2,f.Table.Row,{children:(0,e.createComponentVNode)(2,f.Table.Cell,{children:[(0,e.createComponentVNode)(2,f.Box,{children:["- #",S.ordernum,": ",S.supply_type," for ",(0,e.createVNode)(1,"b",null,S.orderedby,0)]}),(0,e.createComponentVNode)(2,f.Box,{italic:!0,children:["Reason: ",S.comment]})]})},S.ordernum)})}),(0,e.createComponentVNode)(2,f.Box,{bold:!0,children:"Order in Transit"}),(0,e.createComponentVNode)(2,f.Table,{m:"0.5rem",children:V.map(function(S){return(0,e.createComponentVNode)(2,f.Table.Row,{children:(0,e.createComponentVNode)(2,f.Table.Cell,{children:[(0,e.createComponentVNode)(2,f.Box,{children:["- #",S.ordernum,": ",S.supply_type," for ",(0,e.createVNode)(1,"b",null,S.orderedby,0)]}),(0,e.createComponentVNode)(2,f.Box,{italic:!0,children:["Reason: ",S.comment]})]})},S.ordernum)})})]})}},36232:function(T,r,n){"use strict";r.__esModule=!0,r.ChameleonAppearances=r.Chameleon=void 0;var e=n(89005),a=n(25328),t=n(64795),o=n(88510),f=n(72253),b=n(36036),y=n(98595),B=r.Chameleon=function(){function l(c,m){return(0,e.createComponentVNode)(2,y.Window,{width:431,height:500,theme:"syndicate",children:(0,e.createComponentVNode)(2,y.Window.Content,{children:(0,e.createComponentVNode)(2,g)})})}return l}(),k=function(c,m){m===void 0&&(m="");var i=(0,a.createSearch)(m,function(u){return u.name});return(0,t.flow)([(0,o.filter)(function(u){return u==null?void 0:u.name}),m&&(0,o.filter)(i)])(c)},g=r.ChameleonAppearances=function(){function l(c,m){var i=(0,f.useBackend)(m),u=i.act,s=i.data,d=(0,f.useLocalState)(m,"searchText",""),v=d[0],h=d[1],C=k(s.chameleon_skins,v),p=s.selected_appearance;return(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 an appearance",onInput:function(){function N(V,S){return h(S)}return N}()})}),(0,e.createComponentVNode)(2,b.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,b.Section,{fill:!0,scrollable:!0,title:"Item Appearance",children:C.map(function(N){var V=N.name+"_"+N.icon_state;return(0,e.createComponentVNode)(2,b.ImageButton,{dmIcon:N.icon,dmIconState:N.icon_state,imageSize:64,m:.5,compact:!0,selected:V===p,tooltip:N.name,style:{opacity:V===p&&"1"||"0.5"},onClick:function(){function S(){u("change_appearance",{new_appearance:V})}return S}()},V)})})})]})}return l}()},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),f=r.ChangelogView=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,l=k.data,c=(0,a.useLocalState)(B,"onlyRecent",0),m=c[0],i=c[1],u=l.cl_data,s=l.last_cl,d={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"})},v=function(){function h(C){return C in d?d[C]:(0,e.createComponentVNode)(2,t.Icon,{name:"plus",color:"green"})}return h}();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:m?"Showing all changes":"Showing changes since last connection",onClick:function(){function h(){return i(!m)}return h}()}),children:u.map(function(h){return!m&&h.merge_ts<=s||(0,e.createComponentVNode)(2,t.Section,{mb:2,title:h.author+" - Merged on "+h.merge_date,buttons:(0,e.createComponentVNode)(2,t.Button,{content:"#"+h.num,onClick:function(){function C(){return g("open_pr",{pr_number:h.num})}return C}()}),children:h.entries.map(function(C){return(0,e.createComponentVNode)(2,t.Box,{m:1,children:[v(C.etype)," ",C.etext]},C)})},h)})})})})}return b}()},91360:function(T,r,n){"use strict";r.__esModule=!0,r.CheckboxListInputModal=void 0;var e=n(89005),a=n(51057),t=n(19203),o=n(36036),f=n(72253),b=n(98595),y=r.CheckboxListInputModal=function(){function k(g,l){var c=(0,f.useBackend)(l),m=c.act,i=c.data,u=i.items,s=u===void 0?[]:u,d=i.message,v=d===void 0?"":d,h=i.init_value,C=i.timeout,p=i.title,N=(0,f.useLocalState)(l,"edittedItems",s),V=N[0],S=N[1],I=330+Math.ceil(v.length/3),L=function(){function w(A){A===void 0&&(A=null);var x=[].concat(V);x=x.map(function(E){return E.key===A.key?Object.assign({},E,{checked:!A.checked}):E}),S(x)}return w}();return(0,e.createComponentVNode)(2,b.Window,{title:p,width:325,height:I,children:[C&&(0,e.createComponentVNode)(2,a.Loader,{value:C}),(0,e.createComponentVNode)(2,b.Window.Content,{children:(0,e.createComponentVNode)(2,o.Section,{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,B,{filteredItems:V,onClick:L})}),(0,e.createComponentVNode)(2,o.Stack.Item,{mt:.5,children:(0,e.createComponentVNode)(2,t.InputButtons,{input:V})})]})})})]})}return k}(),B=function(g,l){var c=g.filteredItems,m=g.onClick;return(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,tabIndex:0,children:c.map(function(i,u){return(0,e.createComponentVNode)(2,o.Button.Checkbox,{fluid:!0,id:u,onClick:function(){function s(){return m(i)}return s}(),checked:i.checked,style:{animation:"none",transition:"none"},children:i.key.replace(/^\w/,function(s){return s.toUpperCase()})},u)})})}},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),f=n(98595),b=[1,5,10,20,30,50],y=[1,5,10],B=r.ChemDispenser=function(){function c(m,i){var u=(0,a.useBackend)(i),s=u.act,d=u.data,v=d.chemicals;return(0,e.createComponentVNode)(2,f.Window,{width:400,height:400+v.length*8,children:(0,e.createComponentVNode)(2,f.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,k),(0,e.createComponentVNode)(2,g),(0,e.createComponentVNode)(2,l)]})})})}return c}(),k=function(m,i){var u=(0,a.useBackend)(i),s=u.act,d=u.data,v=d.amount,h=d.energy,C=d.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:h,minValue:0,maxValue:C,ranges:{good:[C*.5,1/0],average:[C*.25,C*.5],bad:[-1/0,C*.25]},children:[h," / ",C," Units"]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Dispense",verticalAlign:"middle",children:(0,e.createComponentVNode)(2,t.Stack,{children:b.map(function(p,N){return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,width:"15%",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"cog",selected:v===p,content:p,onClick:function(){function V(){return s("amount",{amount:p})}return V}()})},N)})})})]})})})},g=function(m,i){for(var u=(0,a.useBackend)(i),s=u.act,d=u.data,v=d.chemicals,h=v===void 0?[]:v,C=[],p=0;p<(h.length+1)%3;p++)C.push(!0);return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:d.glass?"Drink Dispenser":"Chemical Dispenser",children:[h.map(function(N,V){return(0,e.createComponentVNode)(2,t.Button,{m:.1,width:"32.5%",icon:"arrow-circle-down",overflow:"hidden",textOverflow:"ellipsis",content:N.title,style:{"margin-left":"2px"},onClick:function(){function S(){return s("dispense",{reagent:N.id})}return S}()},V)}),C.map(function(N,V){return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,basis:"25%"},V)})]})})},l=function(m,i){var u=(0,a.useBackend)(i),s=u.act,d=u.data,v=d.isBeakerLoaded,h=d.beakerCurrentVolume,C=d.beakerMaxVolume,p=d.beakerContents,N=p===void 0?[]:p;return(0,e.createComponentVNode)(2,t.Stack.Item,{height:16,children:(0,e.createComponentVNode)(2,t.Section,{title:d.glass?"Glass":"Beaker",fill:!0,scrollable:!0,buttons:(0,e.createComponentVNode)(2,t.Box,{children:[!!v&&(0,e.createComponentVNode)(2,t.Box,{inline:!0,color:"label",mr:2,children:[h," / ",C," units"]}),(0,e.createComponentVNode)(2,t.Button,{icon:"eject",content:"Eject",disabled:!v,onClick:function(){function V(){return s("ejectBeaker")}return V}()})]}),children:(0,e.createComponentVNode)(2,o.BeakerContents,{beakerLoaded:v,beakerContents:N,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),f=n(85870),b=n(98595),y=r.ChemHeater=function(){function g(l,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 g}(),B=function(l,c){var m=(0,t.useBackend)(c),i=m.act,u=m.data,s=u.targetTemp,d=u.targetTempReached,v=u.autoEject,h=u.isActive,C=u.currentTemp,p=u.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:v?"toggle-on":"toggle-off",selected:v,onClick:function(){function N(){return i("toggle_autoeject")}return N}()}),(0,e.createComponentVNode)(2,o.Button,{content:h?"On":"Off",icon:"power-off",selected:h,disabled:!p,onClick:function(){function N(){return i("toggle_on")}return N}()})],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 N(V,S){return i("adjust_temperature",{target:S})}return N}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Reading",color:d?"good":"average",children:p&&(0,e.createComponentVNode)(2,o.AnimatedNumber,{value:C,format:function(){function N(V){return(0,a.toFixed)(V)+" K"}return N}()})||"\u2014"})]})})})},k=function(l,c){var m=(0,t.useBackend)(c),i=m.act,u=m.data,s=u.isBeakerLoaded,d=u.beakerCurrentVolume,v=u.beakerMaxVolume,h=u.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:[d," / ",v," units"]}),(0,e.createComponentVNode)(2,o.Button,{icon:"eject",content:"Eject",onClick:function(){function C(){return i("eject_beaker")}return C}()})]}),children:(0,e.createComponentVNode)(2,f.BeakerContents,{beakerLoaded:s,beakerContents:h})})})}},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),f=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 g(I,L){I.prototype=Object.create(L.prototype),I.prototype.constructor=I,l(I,L)}function l(I,L){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(w,A){return w.__proto__=A,w},l(I,L)}var c=[1,5,10],m=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 D(){return x("print",{idx:P.idx,beaker:L.args.beaker})}return D}()})]})})})})},i=function(I){return I[I.ToDisposals=0]="ToDisposals",I[I.ToBeaker=1]="ToBeaker",I}(i||{}),u=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,d),(0,e.createComponentVNode)(2,v),(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,D=E.beaker_reagents,M=E.buffer_reagents,R=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:R?(0,e.createComponentVNode)(2,t.Button.Confirm,{icon:"eject",disabled:!P,content:"Eject and Clear Buffer",onClick:function(){function O(){return x("eject")}return O}()}):(0,e.createComponentVNode)(2,t.Button,{icon:"eject",disabled:!P,content:"Eject and Clear Buffer",onClick:function(){function O(){return x("eject")}return O}()}),children:P?(0,e.createComponentVNode)(2,f.BeakerContents,{beakerLoaded:!0,beakerContents:D,buttons:function(){function O(F,_){return(0,e.createComponentVNode)(2,t.Box,{mb:_0?(0,e.createComponentVNode)(2,f.BeakerContents,{beakerLoaded:!0,beakerContents:D,buttons:function(){function M(R,O){return(0,e.createComponentVNode)(2,t.Box,{mb:O0&&(R=M.map(function(O){var F=O.id,_=O.sprite;return(0,e.createComponentVNode)(2,N,{icon:_,translucent:!0,onClick:function(){function U(){return x("set_sprite_style",{production_mode:P,style:F})}return U}(),selected:D===F},F)})),(0,e.createComponentVNode)(2,p,{productionData:L.productionData,children:R&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Style",children:R})})},S=function(L,w){var A=(0,a.useBackend)(w),x=A.act,E=A.data,P=E.loaded_pill_bottle_style,D=E.containerstyles,M=E.loaded_pill_bottle,R={width:"20px",height:"20px"},O=D.map(function(F){var _=F.color,U=F.name,z=P===_;return(0,e.createComponentVNode)(2,t.Button,{style:{position:"relative",width:R.width,height:R.height},onClick:function(){function $(){return x("set_container_style",{style:_})}return $}(),icon:z&&"check",iconStyle:{position:"relative","z-index":1},tooltip:U,tooltipPosition:"top",children:[!z&&(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:R.width,height:R.height,"background-color":_,opacity:.6,filter:"alpha(opacity=60)"}})]},_)});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:R.width,height:R.height},icon:"tint-slash",onClick:function(){function F(){return x("clear_container_style")}return F}(),selected:!P,tooltip:"Default",tooltipPosition:"top"}),O]})}):(0,e.createComponentVNode)(2,t.Box,{color:"label",children:"No pill bottle or patch pack loaded."})})})};(0,b.modalRegisterBodyOverride)("analyze",m)},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),f=n(79140),b=1,y=32,B=128,k=r.CloningConsole=function(){function u(s,d){var v=(0,a.useBackend)(d),h=v.act,C=v.data,p=C.tab,N=C.has_scanner,V=C.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:N?"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:p===1,icon:"home",onClick:function(){function S(){return h("menu",{tab:1})}return S}(),children:"Main Menu"}),(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:p===2,icon:"user",onClick:function(){function S(){return h("menu",{tab:2})}return S}(),children:"Damage Configuration"})]}),(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,g)})]})})}return u}(),g=function(s,d){var v=(0,a.useBackend)(d),h=v.data,C=h.tab,p;return C===1?p=(0,e.createComponentVNode)(2,l):C===2&&(p=(0,e.createComponentVNode)(2,c)),p},l=function(s,d){var v=(0,a.useBackend)(d),h=v.act,C=v.data,p=C.pods,N=C.pod_amount,V=C.selected_pod_UID;return(0,e.createComponentVNode)(2,t.Box,{children:[!N&&(0,e.createComponentVNode)(2,t.Box,{color:"average",children:"Notice: No pods connected."}),!!N&&p.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,f.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 h("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,d){var v=(0,a.useBackend)(d),h=v.act,C=v.data,p=C.selected_pod_data,N=C.has_scanned,V=C.scanner_has_patient,S=C.feedback,I=C.scan_successful,L=C.cloning_cost,w=C.has_scanner,A=C.currently_scanning;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 x(){return h("scan")}return x}(),disabled:!V||A,children:"Scan"}),(0,e.createComponentVNode)(2,t.Button,{icon:"eject",onClick:function(){function x(){return h("eject")}return x}(),disabled:!V||A,children:"Eject Patient"})]}),children:[!N&&!A&&(0,e.createComponentVNode)(2,t.Box,{color:"average",children:V?"No scan detected for current patient.":"No patient is in the scanner."}),(!!N||!!A)&&(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||!N)&&(0,e.createComponentVNode)(2,t.Box,{color:"average",children:"No valid scan detected."}),!!I&&!!N&&(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 x(){return h("fix_all")}return x}(),children:"Repair All Damages"}),(0,e.createComponentVNode)(2,t.Button,{onClick:function(){function x(){return h("fix_none")}return x}(),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 x(){return h("clone")}return x}(),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:p.biomass_storage_capacity,ranges:{bad:[2*p.biomass_storage_capacity/3,p.biomass_storage_capacity],average:[p.biomass_storage_capacity/3,2*p.biomass_storage_capacity/3],good:[0,p.biomass_storage_capacity/3]},color:L[0]>p.biomass?"bad":null,children:["Biomass: ",L[0],"/",p.biomass,"/",p.biomass_storage_capacity]})}),(0,e.createComponentVNode)(2,t.Stack.Item,{width:"30%",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:L[1],maxValue:p.max_reagent_capacity,ranges:{bad:[2*p.max_reagent_capacity/3,p.max_reagent_capacity],average:[p.max_reagent_capacity/3,2*p.max_reagent_capacity/3],good:[0,p.max_reagent_capacity/3]},color:L[1]>p.sanguine_reagent?"bad":"good",children:["Sanguine: ",L[1],"/",p.sanguine_reagent,"/",p.max_reagent_capacity]})}),(0,e.createComponentVNode)(2,t.Stack.Item,{width:"30%",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:L[2],maxValue:p.max_reagent_capacity,ranges:{bad:[2*p.max_reagent_capacity/3,p.max_reagent_capacity],average:[p.max_reagent_capacity/3,2*p.max_reagent_capacity/3],good:[0,p.max_reagent_capacity/3]},color:L[2]>p.osseous_reagent?"bad":"good",children:["Osseous: ",L[2],"/",p.osseous_reagent,"/",p.max_reagent_capacity]})})]}),(0,e.createComponentVNode)(2,m),(0,e.createComponentVNode)(2,i)]})]})})]})]})},m=function(s,d){var v=(0,a.useBackend)(d),h=v.act,C=v.data,p=C.patient_limb_data,N=C.limb_list,V=C.desired_limb_data;return(0,e.createComponentVNode)(2,t.Collapsible,{title:"Limbs",children:N.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:[p[S][4],":"," "]}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:1}),p[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:p[S][5],ranges:{good:[0,p[S][5]/3],average:[p[S][5]/3,2*p[S][5]/3],bad:[2*p[S][5]/3,p[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]]})}),p[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 ",p[S][4]," is missing!"]})})]}),(0,e.createComponentVNode)(2,t.Stack,{children:[!!p[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 h("toggle_limb_repair",{limb:S,type:"replace"})}return L}(),children:"Replace Limb"})}),!p[S][3]&&(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Button.Checkbox,{disabled:!(p[S][0]||p[S][1]),checked:!(V[S][0]||V[S][1]),onClick:function(){function L(){return h("toggle_limb_repair",{limb:S,type:"damage"})}return L}(),children:"Repair Damages"}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{disabled:!(p[S][2]&b),checked:!(V[S][2]&b),onClick:function(){function L(){return h("toggle_limb_repair",{limb:S,type:"bone"})}return L}(),children:"Mend Bone"}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{disabled:!(p[S][2]&y),checked:!(V[S][2]&y),onClick:function(){function L(){return h("toggle_limb_repair",{limb:S,type:"ib"})}return L}(),children:"Mend IB"}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{disabled:!(p[S][2]&B),checked:!(V[S][2]&B),onClick:function(){function L(){return h("toggle_limb_repair",{limb:S,type:"critburn"})}return L}(),children:"Mend Critical Burn"})]})]})]},S)})})},i=function(s,d){var v=(0,a.useBackend)(d),h=v.act,C=v.data,p=C.patient_organ_data,N=C.organ_list,V=C.desired_organ_data;return(0,e.createComponentVNode)(2,t.Collapsible,{title:"Organs",children:N.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:[p[S][3],":"," "]}),p[S][5]!=="heart"&&(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Stack.Item,{children:[!!p[S][2]&&(0,e.createComponentVNode)(2,t.Button.Checkbox,{checked:!V[S][2]&&!V[S][1],onClick:function(){function L(){return h("toggle_organ_repair",{organ:S,type:"replace"})}return L}(),children:"Replace Organ"}),!p[S][2]&&(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button.Checkbox,{disabled:!p[S][0],checked:!V[S][0],onClick:function(){function L(){return h("toggle_organ_repair",{organ:S,type:"damage"})}return L}(),children:"Repair Damages"})})]})}),p[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:[!!p[S][2]&&(0,e.createComponentVNode)(2,t.ProgressBar,{color:"bad",value:0,children:["The patient's ",p[S][3]," is missing!"]}),!p[S][2]&&(0,e.createComponentVNode)(2,t.ProgressBar,{value:V[S][0],maxValue:p[S][4],ranges:{good:[0,p[S][4]/3],average:[p[S][4]/3,2*p[S][4]/3],bad:[2*p[S][4]/3,p[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),f=r.CloningPod=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,l=k.data,c=l.biomass,m=l.biomass_storage_capacity,i=l.sanguine_reagent,u=l.osseous_reagent,s=l.organs,d=l.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*m/3,m],average:[m/3,2*m/3],bad:[0,m/3]},minValue:0,maxValue:m})})]}),(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:i+" 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:i,step:1,unit:"units",onChange:function(){function v(h,C){return g("remove_reagent",{reagent:"sanguine_reagent",amount:C})}return v}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Remove All",onClick:function(){function v(){return g("purge_reagent",{reagent:"sanguine_reagent"})}return v}()})})]}),(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: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 v(h,C){return g("remove_reagent",{reagent:"osseous_reagent",amount:C})}return v}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Remove All",onClick:function(){function v(){return g("purge_reagent",{reagent:"osseous_reagent"})}return v}()})})]})]}),(0,e.createComponentVNode)(2,t.Section,{title:"Organ Storage",children:[!d&&(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(v){return(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:v.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 h(){return g("eject_organ",{organ_ref:v.ref})}return h}()})})]},v)})]}),!!d&&(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),f=n(98595),b=r.CoinMint=function(){function y(B,k){var g=(0,t.useBackend)(k),l=g.act,c=g.data,m=c.materials,i=c.moneyBag,u=c.moneyBagContent,s=c.moneyBagMaxContent,d=(i?210:138)+Math.ceil(m.length/4)*64;return(0,e.createComponentVNode)(2,f.Window,{width:210,height:d,children:(0,e.createComponentVNode)(2,f.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:!i&&"Need a money bag",disabled:!i,onClick:function(){function v(){return l("activate")}return v}()}),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 v(){return l("ejectMat")}return v}()})})]})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:m.map(function(v){return(0,e.createComponentVNode)(2,o.Button,{bold:!0,inline:!0,translucent:!0,m:.2,textAlign:"center",selected:v.id===c.chosenMaterial,tooltip:v.name,content:(0,e.createComponentVNode)(2,o.Stack,{vertical:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{className:(0,a.classes)(["materials32x32",v.id])}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:v.amount})]}),onClick:function(){function h(){return l("selectMaterial",{material:v.id})}return h}()},v.id)})})]})})}),!!i&&(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 v(){return l("ejectBag")}return v}()}),children:(0,e.createComponentVNode)(2,o.ProgressBar,{width:"100%",minValue:0,maxValue:s,value:u,children:[u," / ",s]})})})]})})})}return y}()},93858:function(T,r,n){"use strict";r.__esModule=!0,r.HexColorInput=r.ColorSelector=r.ColorPickerModal=r.ColorInput=void 0;var e=n(89005),a=n(51057),t=n(72253),o=n(36036),f=n(98595),b=n(44879),y=n(14448),B=n(4454),k=n(35840),g=n(9394),l=n(19203),c=["prefixed","alpha","color","fluid","onChange"];/** + */var b=(0,t.createLogger)("hotkeys"),S={},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={},g=function(d){if(d===16)return"Shift";if(d===17)return"Ctrl";if(d===18)return"Alt";if(d===33)return"Northeast";if(d===34)return"Southeast";if(d===35)return"Southwest";if(d===36)return"Northwest";if(d===37)return"West";if(d===38)return"North";if(d===39)return"East";if(d===40)return"South";if(d===45)return"Insert";if(d===46)return"Delete";if(d>=48&&d<=57||d>=65&&d<=90)return String.fromCharCode(d);if(d>=96&&d<=105)return"Numpad"+(d-96);if(d>=112&&d<=123)return"F"+(d-111);if(d===188)return",";if(d===189)return"-";if(d===190)return"."},l=function(d){var v=String(d);if(v==="Ctrl+F5"||v==="Ctrl+R"){location.reload();return}if(v!=="Ctrl+F"&&!(d.event.defaultPrevented||d.isModifierKey()||B.includes(d.code))){v==="F5"&&(d.event.preventDefault(),d.event.returnValue=!1);var C=g(d.code);if(C){var h=S[C];if(h)return b.debug("macro",h),Byond.command(h);if(d.isDown()&&!k[C]){k[C]=!0;var p='Key_Down "'+C+'"';return b.debug(p),Byond.command(p)}if(d.isUp()&&k[C]){k[C]=!1;var N='Key_Up "'+C+'"';return b.debug(N),Byond.command(N)}}}},c=r.acquireHotKey=function(){function s(d){B.push(d)}return s}(),m=r.releaseHotKey=function(){function s(d){var v=B.indexOf(d);v>=0&&B.splice(v,1)}return s}(),i=r.releaseHeldKeys=function(){function s(){for(var d=0,v=Object.keys(k);d0||(0,a.fetchRetry)((0,e.resolveAsset)("icon_ref_map.json")).then(function(b){return b.json()}).then(function(b){return Byond.iconRefMap=b}).catch(function(b){return t.logger.log(b)})}return f}()},1090:function(T,r,n){"use strict";r.__esModule=!0,r.AICard=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.AICard=function(){function b(S,B){var k=(0,a.useBackend)(B),g=k.act,l=k.data;if(l.has_ai===0)return(0,e.createComponentVNode)(2,o.Window,{width:250,height:120,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Stored AI",children:(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createVNode)(1,"h3",null,"No AI detected.",16)})})})});var c=null;return l.integrity>=75?c="green":l.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:l.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:l.integrity/100})})}),(0,e.createComponentVNode)(2,t.Box,{color:"red",children:(0,e.createVNode)(1,"h2",null,l.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:!!l.has_laws&&(0,e.createComponentVNode)(2,t.Box,{children:l.laws.map(function(m,i){return(0,e.createComponentVNode)(2,t.Box,{children:m},i)})})||(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:l.wireless?"check":"times",content:l.wireless?"Enabled":"Disabled",color:l.wireless?"green":"red",onClick:function(){function m(){return g("wireless")}return m}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Subspace Transceiver",children:(0,e.createComponentVNode)(2,t.Button,{width:10,icon:l.radio?"check":"times",content:l.radio?"Enabled":"Disabled",color:l.radio?"green":"red",onClick:function(){function m(){return g("radio")}return m}()})}),(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:l.flushing||l.integrity===0,confirmColor:"red",content:"Wipe AI",onClick:function(){function m(){return g("wipe")}return m}()})})]})})})]})})})}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),f=r.AIFixer=function(){function b(S,B){var k=(0,a.useBackend)(B),g=k.act,l=k.data;if(l.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;(l.stat===2||l.stat===null)&&(c=!1);var m=null;l.integrity>=75?m="green":l.integrity>=25?m="yellow":m="red";var i=!0;return l.integrity>=100&&l.stat!==2&&(i=!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:l.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:m,value:l.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:!!l.has_laws&&(0,e.createComponentVNode)(2,t.Box,{children:l.laws.map(function(u,s){return(0,e.createComponentVNode)(2,t.Box,{inline:!0,children:u},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:l.wireless?"times":"check",content:l.wireless?"Disabled":"Enabled",color:l.wireless?"red":"green",onClick:function(){function u(){return g("wireless")}return u}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Subspace Transceiver",children:(0,e.createComponentVNode)(2,t.Button,{icon:l.radio?"times":"check",content:l.radio?"Disabled":"Enabled",color:l.radio?"red":"green",onClick:function(){function u(){return g("radio")}return u}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Start Repairs",children:(0,e.createComponentVNode)(2,t.Button,{icon:"wrench",disabled:!i||l.active,content:!i||l.active?"Already Repaired":"Repair",onClick:function(){function u(){return g("fix")}return u}()})})]}),(0,e.createComponentVNode)(2,t.Box,{color:"green",lineHeight:2,children:l.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),f=n(195),b=r.APC=function(){function g(l,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 g}(),S={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(l,c){var m=(0,a.useBackend)(c),i=m.act,u=m.data,s=u.locked&&!u.siliconUser,d=u.normallyLocked,v=S[u.externalPower]||S[0],C=S[u.chargingStatus]||S[0],h=u.powerChannels||[],p=B[u.malfStatus]||B[0],N=u.powerCellStatus/100;return(0,e.createFragment)([(0,e.createComponentVNode)(2,f.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:v.color,buttons:(0,e.createComponentVNode)(2,t.Button,{icon:u.isOperating?"power-off":"times",content:u.isOperating?"On":"Off",selected:u.isOperating&&!s,color:u.isOperating?"":"bad",disabled:s,onClick:function(){function V(){return i("breaker")}return V}()}),children:["[ ",v.externalPowerText," ]"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Power Cell",children:(0,e.createComponentVNode)(2,t.ProgressBar,{color:"good",value:N})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Charge Mode",color:C.color,buttons:(0,e.createComponentVNode)(2,t.Button,{icon:u.chargeMode?"sync":"times",content:u.chargeMode?"Auto":"Off",selected:u.chargeMode,disabled:s,onClick:function(){function V(){return i("charge")}return V}()}),children:["[ ",C.chargingText," ]"]})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Power Channels",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[h.map(function(V){var y=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 i("channel",y.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 i("channel",y.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 i("channel",y.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,[u.totalLoad,(0,e.createTextVNode)(" W")],0)})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Misc",buttons:!!u.siliconUser&&(0,e.createFragment)([!!u.malfStatus&&(0,e.createComponentVNode)(2,t.Button,{icon:p.icon,content:p.content,color:"bad",onClick:function(){function V(){return i(p.action)}return V}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"lightbulb-o",content:"Overload",onClick:function(){function V(){return i("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:u.coverLocked?"lock":"unlock",content:u.coverLocked?"Engaged":"Disengaged",disabled:s,onClick:function(){function V(){return i("cover")}return V}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Emergency Lighting",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"lightbulb-o",content:u.emergencyLights?"Enabled":"Disabled",disabled:s,onClick:function(){function V(){return i("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:u.nightshiftLights?"Enabled":"Disabled",onClick:function(){function V(){return i("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),f=r.ATM=function(){function m(i,u){var s=(0,a.useBackend)(u),d=s.act,v=s.data,C=v.view_screen,h=v.authenticated_account,p=v.ticks_left_locked_down,N=v.linked_db,V;if(p>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(!N)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(h)switch(C){case 1:V=(0,e.createComponentVNode)(2,S);break;case 2:V=(0,e.createComponentVNode)(2,B);break;case 3:V=(0,e.createComponentVNode)(2,l);break;default:V=(0,e.createComponentVNode)(2,k)}else V=(0,e.createComponentVNode)(2,g);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 m}(),b=function(i,u){var s=(0,a.useBackend)(u),d=s.act,v=s.data,C=v.machine_id,h=v.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:h,icon:"eject",onClick:function(){function p(){return d("insert_card")}return p}()})})})]})},S=function(i,u){var s=(0,a.useBackend)(u),d=s.act,v=s.data,C=v.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:C===0,onClick:function(){function h(){return d("change_security_level",{new_security_level:1})}return h}()})}),(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:C===2,onClick:function(){function h(){return d("change_security_level",{new_security_level:2})}return h}()})}),(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(i,u){var s=(0,a.useBackend)(u),d=s.act,v=s.data,C=(0,a.useLocalState)(u,"targetAccNumber",0),h=C[0],p=C[1],N=(0,a.useLocalState)(u,"fundsAmount",0),V=N[0],y=N[1],I=(0,a.useLocalState)(u,"purpose",0),L=I[0],w=I[1],A=v.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 p(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 y(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 d("transfer",{target_acc_number:h,funds_amount:V,purpose:L})}return x}()}),(0,e.createComponentVNode)(2,t.Divider),(0,e.createComponentVNode)(2,c)]})},k=function(i,u){var s=(0,a.useBackend)(u),d=s.act,v=s.data,C=(0,a.useLocalState)(u,"fundsAmount",0),h=C[0],p=C[1],N=v.owner_name,V=v.money;return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Section,{title:"Welcome, "+N,buttons:(0,e.createComponentVNode)(2,t.Button,{content:"Logout",icon:"sign-out-alt",onClick:function(){function y(){return d("logout")}return y}()}),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 y(I,L){return p(L)}return y}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Withdraw Funds",icon:"sign-out-alt",onClick:function(){function y(){return d("withdrawal",{funds_amount:h})}return y}()})})]})}),(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 y(){return d("view_screen",{view_screen:1})}return y}()})}),(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Make transfer",icon:"exchange-alt",onClick:function(){function y(){return d("view_screen",{view_screen:2})}return y}()})}),(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{content:"View transaction log",icon:"list",onClick:function(){function y(){return d("view_screen",{view_screen:3})}return y}()})}),(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Print balance statement",icon:"print",onClick:function(){function y(){return d("balance_statement")}return y}()})})]})],4)},g=function(i,u){var s=(0,a.useBackend)(u),d=s.act,v=s.data,C=(0,a.useLocalState)(u,"accountID",null),h=C[0],p=C[1],N=(0,a.useLocalState)(u,"accountPin",null),V=N[0],y=N[1],I=v.machine_id,L=v.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 p(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 y(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 d("attempt_auth",{account_num:h,account_pin:V})}return w}()})})]})})},l=function(i,u){var s=(0,a.useBackend)(u),d=s.act,v=s.data,C=v.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"})]}),C.map(function(h){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:h.time}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:h.purpose}),(0,e.createComponentVNode)(2,t.Table.Cell,{color:h.is_deposit?"green":"red",children:["$",h.amount]}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:h.target_name})]},h)})]}),(0,e.createComponentVNode)(2,t.Divider),(0,e.createComponentVNode)(2,c)]})},c=function(i,u){var s=(0,a.useBackend)(u),d=s.act,v=s.data;return(0,e.createComponentVNode)(2,t.Button,{content:"Back",icon:"sign-out-alt",onClick:function(){function C(){return d("view_screen",{view_screen:0})}return C}()})}},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),f=n(36352),b=n(98595),S=n(321),B=n(5485),k=r.AccountsUplinkTerminal=function(){function v(C,h){var p=(0,t.useBackend)(h),N=p.act,V=p.data,y=V.loginState,I=V.currentPage,L;if(y.logged_in)I===1?L=(0,e.createComponentVNode)(2,l):I===2?L=(0,e.createComponentVNode)(2,s):I===3&&(L=(0,e.createComponentVNode)(2,d));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,S.LoginInfo),(0,e.createComponentVNode)(2,g),(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,children:L})]})})})}return v}(),g=function(C,h){var p=(0,t.useBackend)(h),N=p.data,V=(0,t.useLocalState)(h,"tabIndex",0),y=V[0],I=V[1],L=N.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:y===0,onClick:function(){function w(){return I(0)}return w}(),children:"User Accounts"}),(0,e.createComponentVNode)(2,o.Tabs.Tab,{icon:"list",selected:y===1,onClick:function(){function w(){return I(1)}return w}(),children:"Department Accounts"})]})})})},l=function(C,h){var p=(0,t.useLocalState)(h,"tabIndex",0),N=p[0];switch(N){case 0:return(0,e.createComponentVNode)(2,c);case 1:return(0,e.createComponentVNode)(2,m);default:return"You are somehow on a tab that doesn't exist! Please let a coder know."}},c=function(C,h){var p=(0,t.useBackend)(h),N=p.act,V=p.data,y=V.accounts,I=(0,t.useLocalState)(h,"searchText",""),L=I[0],w=I[1],A=(0,t.useLocalState)(h,"sortId","owner_name"),x=A[0],E=A[1],P=(0,t.useLocalState)(h,"sortOrder",!0),D=P[0],M=P[1];return(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,u),(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,i,{id:"owner_name",children:"Account Holder"}),(0,e.createComponentVNode)(2,i,{id:"account_number",children:"Account Number"}),(0,e.createComponentVNode)(2,i,{id:"suspended",children:"Account Status"}),(0,e.createComponentVNode)(2,i,{id:"money",children:"Account Balance"})]}),y.filter((0,a.createSearch)(L,function(R){return R.owner_name+"|"+R.account_number+"|"+R.suspended+"|"+R.money})).sort(function(R,O){var F=D?1:-1;return R[x].localeCompare(O[x])*F}).map(function(R){return(0,e.createComponentVNode)(2,o.Table.Row,{className:"AccountsUplinkTerminal__listRow--"+R.suspended,onClick:function(){function O(){return N("view_account_detail",{account_num:R.account_number})}return O}(),children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:[(0,e.createComponentVNode)(2,o.Icon,{name:"user"})," ",R.owner_name]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:["#",R.account_number]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:R.suspended}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:R.money})]},R.account_number)})]})})})]})},m=function(C,h){var p=(0,t.useBackend)(h),N=p.act,V=p.data,y=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,f.TableCell,{children:"Department Name"}),(0,e.createComponentVNode)(2,f.TableCell,{children:"Account Number"}),(0,e.createComponentVNode)(2,f.TableCell,{children:"Account Status"}),(0,e.createComponentVNode)(2,f.TableCell,{children:"Account Balance"})]}),y.map(function(I){return(0,e.createComponentVNode)(2,o.Table.Row,{className:"AccountsUplinkTerminal__listRow--"+I.suspended,onClick:function(){function L(){return N("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)})]})})})})},i=function(C,h){var p=(0,t.useLocalState)(h,"sortId","name"),N=p[0],V=p[1],y=(0,t.useLocalState)(h,"sortOrder",!0),I=y[0],L=y[1],w=C.id,A=C.children;return(0,e.createComponentVNode)(2,o.Table.Cell,{children:(0,e.createComponentVNode)(2,o.Button,{color:N!==w&&"transparent",width:"100%",onClick:function(){function x(){N===w?L(!I):(V(w),L(!0))}return x}(),children:[A,N===w&&(0,e.createComponentVNode)(2,o.Icon,{name:I?"sort-up":"sort-down",ml:"0.25rem;"})]})})},u=function(C,h){var p=(0,t.useBackend)(h),N=p.act,V=p.data,y=V.is_printing,I=(0,t.useLocalState)(h,"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 N("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(C,h){var p=(0,t.useBackend)(h),N=p.act,V=p.data,y=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:"#"+y+" / "+I,buttons:(0,e.createComponentVNode)(2,o.Button,{icon:"arrow-left",content:"Back",onClick:function(){function P(){return N("back")}return P}()}),children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Account Number",children:["#",y]}),!!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 N("set_account_pin",{account_number:y})}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 N("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)})]})})})]})},d=function(C,h){var p=(0,t.useBackend)(h),N=p.act,V=p.data,y=(0,t.useLocalState)(h,"accName",""),I=y[0],L=y[1],w=(0,t.useLocalState)(h,"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 N("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,D){return L(D)}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,D){return x(D)}return E}()})})]}),(0,e.createComponentVNode)(2,o.Button,{mt:1,fluid:!0,content:"Create Account",onClick:function(){function E(){return N("finalise_create_account",{holder_name:I,starting_funds:A})}return E}()})]})}},23001:function(T,r,n){"use strict";r.__esModule=!0,r.AdminAntagMenu=void 0;var e=n(89005),a=n(25328),t=n(72253),o=n(36036),f=n(36352),b=n(98595),S=n(321),B=n(5485),k=function(v){switch(v){case 0:return"Antagonists";case 1:return"Objectives";case 2:return"Security";case 3:return"All High Value Items";default:return"Something went wrong with this menu, make an issue report please!"}},g=function(v){switch(v){case 0:return(0,e.createComponentVNode)(2,c);case 1:return(0,e.createComponentVNode)(2,m);case 2:return(0,e.createComponentVNode)(2,i);case 3:return(0,e.createComponentVNode)(2,u);default:return"Something went wrong with this menu, make an issue report please!"}},l=r.AdminAntagMenu=function(){function d(v,C){var h=(0,t.useBackend)(C),p=h.act,N=h.data,V=N.loginState,y=N.currentPage,I=(0,t.useLocalState)(C,"tabIndex",0),L=I[0],w=I[1],A=(0,t.useLocalState)(C,"searchText",""),x=A[0],E=A[1];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,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.NoticeBox,{children:"This menu is a Work in Progress. Some antagonists like Nuclear Operatives and Biohazards will not show up."})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Tabs,{children:[(0,e.createComponentVNode)(2,o.Tabs.Tab,{selected:L===0,onClick:function(){function P(){w(0)}return P}(),icon:"user",children:"Antagonists"},"Antagonists"),(0,e.createComponentVNode)(2,o.Tabs.Tab,{selected:L===1,onClick:function(){function P(){w(1)}return P}(),icon:"people-robbery",children:"Objectives"},"Objectives"),(0,e.createComponentVNode)(2,o.Tabs.Tab,{selected:L===2,onClick:function(){function P(){w(2)}return P}(),icon:"handcuffs",children:"Security"},"Security"),(0,e.createComponentVNode)(2,o.Tabs.Tab,{selected:L===3,onClick:function(){function P(){w(3)}return P}(),icon:"lock",children:"High Value Items"},"HighValueItems")]})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Section,{title:k(L),fill:!0,scrollable:!0,buttons:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,o.Input,{placeholder:"Search...",width:"300px",onInput:function(){function P(D,M){return E(M)}return P}()}),(0,e.createComponentVNode)(2,o.Button,{icon:"sync",onClick:function(){function P(){return p("refresh")}return P}(),children:"Refresh"})]}),children:g(L)})})]})})})}return d}(),c=function(v,C){var h=(0,t.useBackend)(C),p=h.act,N=h.data,V=N.antagonists,y=(0,t.useLocalState)(C,"searchText",""),I=y[0],L=y[1],w=(0,t.useLocalState)(C,"sortId","antag_name"),A=w[0],x=w[1],E=(0,t.useLocalState)(C,"sortOrder",!0),P=E[0],D=E[1];return V.length?(0,e.createComponentVNode)(2,o.Table,{className:"AdminAntagMenu__list",children:[(0,e.createComponentVNode)(2,o.Table.Row,{bold:!0,children:[(0,e.createComponentVNode)(2,s,{id:"name",children:"Mob Name"}),(0,e.createComponentVNode)(2,s,{id:"",children:"Buttons"}),(0,e.createComponentVNode)(2,s,{id:"antag_name",children:"Antagonist Type"}),(0,e.createComponentVNode)(2,s,{id:"status",children:"Status"})]}),V.filter((0,a.createSearch)(I,function(M){return M.name+"|"+M.status+"|"+M.antag_name})).sort(function(M,R){var O=P?1:-1;return M[A]===void 0||M[A]===null?O:R[A]===void 0||R[A]===null?-1*O:typeof M[A]=="number"?(M[A]-R[A])*O:M[A].localeCompare(R[A])*O}).map(function(M,R){return(0,e.createComponentVNode)(2,o.Table.Row,{children:[(0,e.createComponentVNode)(2,o.Table.Cell,{collapsing:!0,children:M.body_destroyed?M.name:(0,e.createComponentVNode)(2,o.Button,{color:M.is_hijacker||!M.name?"red":"",tooltip:M.is_hijacker?"Hijacker":"",onClick:function(){function O(){return p("show_player_panel",{mind_uid:M.antag_mind_uid})}return O}(),children:M.name?M.name:"??? (NO NAME)"})}),(0,e.createComponentVNode)(2,o.Table.Cell,{collapsing:!0,children:[(0,e.createComponentVNode)(2,o.Button,{onClick:function(){function O(){p("pm",{ckey:M.ckey})}return O}(),children:"PM"}),(0,e.createComponentVNode)(2,o.Button,{onClick:function(){function O(){p("follow",{datum_uid:M.antag_mind_uid})}return O}(),children:"FLW"}),(0,e.createComponentVNode)(2,o.Button,{onClick:function(){function O(){p("obs",{mind_uid:M.antag_mind_uid})}return O}(),children:"OBS"}),(0,e.createComponentVNode)(2,o.Button,{onClick:function(){function O(){p("tp",{mind_uid:M.antag_mind_uid})}return O}(),children:"TP"})]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:M.antag_name}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:(0,e.createComponentVNode)(2,o.Box,{color:M.status?"red":"grey",children:M.status?M.status:"Alive"})})]},R)})]}):"No Antagonists!"},m=function(v,C){var h=(0,t.useBackend)(C),p=h.act,N=h.data,V=N.objectives,y=(0,t.useLocalState)(C,"searchText",""),I=y[0],L=y[1],w=(0,t.useLocalState)(C,"sortId2","target_name"),A=w[0],x=w[1],E=(0,t.useLocalState)(C,"sortOrder",!0),P=E[0],D=E[1];return V.length?(0,e.createComponentVNode)(2,o.Table,{className:"AdminAntagMenu__list",children:[(0,e.createComponentVNode)(2,o.Table.Row,{bold:!0,children:[(0,e.createComponentVNode)(2,s,{sort_group:"sortId2",id:"obj_name",children:"Name"}),(0,e.createComponentVNode)(2,s,{sort_group:"sortId2",id:"target_name",children:"Target"}),(0,e.createComponentVNode)(2,s,{sort_group:"sortId2",id:"status",children:"Status"}),(0,e.createComponentVNode)(2,s,{sort_group:"sortId2",id:"owner_name",children:"Owner"})]}),V.filter((0,a.createSearch)(I,function(M){return M.obj_name+"|"+M.target_name+"|"+(M.status?"success":"incompleted")+"|"+M.owner_name})).sort(function(M,R){var O=P?1:-1;return M[A]===void 0||M[A]===null||A==="target_name"&&M.no_target?O:R[A]===void 0||R[A]===null||A==="target_name"&&R.no_target?-1*O:typeof M[A]=="number"?(M[A]-R[A])*O:M[A].localeCompare(R[A])*O}).map(function(M,R){return(0,e.createComponentVNode)(2,o.Table.Row,{children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:(0,e.createComponentVNode)(2,o.Button,{tooltip:M.obj_desc,onClick:function(){function O(){return p("vv",{uid:M.obj_uid})}return O}(),children:M.obj_name})}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:M.no_target?"":M.track.length?M.track.map(function(O,F){return(0,e.createComponentVNode)(2,o.Button,{onClick:function(){function _(){return p("follow",{datum_uid:O})}return _}(),children:[M.target_name," ",M.track.length>1?"("+(parseInt(F,10)+1)+")":""]},F)}):"No "+M.target_name+" Found"}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:(0,e.createComponentVNode)(2,o.Box,{color:M.status?"green":"grey",children:M.status?"Success":"Incomplete"})}),(0,e.createComponentVNode)(2,o.Table.Cell,{collapsing:!0,children:(0,e.createComponentVNode)(2,o.Button,{onClick:function(){function O(){p("obj_owner",{owner_uid:M.owner_uid})}return O}(),children:M.owner_name})})]},R)})]}):"No Objectives!"},i=function(v,C){var h=(0,t.useBackend)(C),p=h.act,N=h.data,V=N.security,y=(0,t.useLocalState)(C,"searchText",""),I=y[0],L=y[1],w=(0,t.useLocalState)(C,"sortId3","health"),A=w[0],x=w[1],E=(0,t.useLocalState)(C,"sortOrder",!0),P=E[0],D=E[1],M=function(F){return F.status===2?"red":F.status===1?"orange":F.broken_bone||F.internal_bleeding?"yellow":"grey"},R=function(F){return F.status===2?"Dead":F.status===1?"Unconscious":F.broken_bone&&F.internal_bleeding?"Broken Bone, IB":F.broken_bone?"Broken Bone":F.internal_bleeding?"IB":"Alive"};return V.length?(0,e.createComponentVNode)(2,o.Table,{className:"AdminAntagMenu__list",children:[(0,e.createComponentVNode)(2,o.Table.Row,{bold:!0,children:[(0,e.createComponentVNode)(2,s,{sort_group:"sortId3",id:"name",children:"Name"}),(0,e.createComponentVNode)(2,s,{sort_group:"sortId3",id:"role",children:"Role"}),(0,e.createComponentVNode)(2,s,{sort_group:"sortId3",id:"status",children:"Status"}),(0,e.createComponentVNode)(2,s,{sort_group:"sortId3",id:"antag",children:"Antag"}),(0,e.createComponentVNode)(2,s,{sort_group:"sortId3",id:"health",children:"Health"})]}),V.filter((0,a.createSearch)(I,function(O){return O.name+"|"+O.role+"|"+R(O)+"|"+O.antag})).sort(function(O,F){var _=P?1:-1;return O[A]===void 0||O[A]===null?_:F[A]===void 0||F[A]===null?-1*_:typeof O[A]=="number"?(O[A]-F[A])*_:O[A].localeCompare(F[A])*_}).map(function(O,F){return(0,e.createComponentVNode)(2,o.Table.Row,{children:[(0,e.createComponentVNode)(2,o.Table.Cell,{collapsing:!0,children:(0,e.createComponentVNode)(2,o.Button,{onClick:function(){function _(){return p("show_player_panel",{mind_uid:O.mind_uid})}return _}(),children:O.name})}),(0,e.createComponentVNode)(2,o.Table.Cell,{collapsing:!0,children:O.role}),(0,e.createComponentVNode)(2,o.Table.Cell,{collapsing:!0,children:(0,e.createComponentVNode)(2,o.Box,{color:M(O),children:R(O)})}),(0,e.createComponentVNode)(2,o.Table.Cell,{collapsing:!0,children:O.antag?(0,e.createComponentVNode)(2,o.Button,{textColor:"red",translucent:!0,onClick:function(){function _(){p("tp",{mind_uid:O.mind_uid})}return _}(),children:O.antag}):""}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:(0,e.createComponentVNode)(2,o.ProgressBar,{minValue:0,value:O.health/O.max_health,maxValue:1,ranges:{good:[.6,1/0],average:[0,.6],bad:[-1/0,0]},children:O.health})}),(0,e.createComponentVNode)(2,o.Table.Cell,{collapsing:!0,children:[(0,e.createComponentVNode)(2,o.Button,{onClick:function(){function _(){p("pm",{ckey:O.ckey})}return _}(),children:"PM"}),(0,e.createComponentVNode)(2,o.Button,{onClick:function(){function _(){p("follow",{datum_uid:O.mind_uid})}return _}(),children:"FLW"}),(0,e.createComponentVNode)(2,o.Button,{onClick:function(){function _(){p("obs",{mind_uid:O.mind_uid})}return _}(),children:"OBS"})]})]},F)})]}):"No Security!"},u=function(v,C){var h=(0,t.useBackend)(C),p=h.act,N=h.data,V=N.high_value_items,y=(0,t.useLocalState)(C,"searchText",""),I=y[0],L=y[1],w=(0,t.useLocalState)(C,"sortId4","person"),A=w[0],x=w[1],E=(0,t.useLocalState)(C,"sortOrder",!0),P=E[0],D=E[1];return V.length?(0,e.createComponentVNode)(2,o.Table,{className:"AdminAntagMenu__list",children:[(0,e.createComponentVNode)(2,o.Table.Row,{bold:!0,children:[(0,e.createComponentVNode)(2,s,{sort_group:"sortId4",id:"name",children:"Name"}),(0,e.createComponentVNode)(2,s,{sort_group:"sortId4",id:"person",children:"Carrier"}),(0,e.createComponentVNode)(2,s,{sort_group:"sortId4",id:"loc",children:"Location"}),(0,e.createComponentVNode)(2,s,{sort_group:"sortId4",id:"admin_z",children:"On Admin Z-level"})]}),V.filter((0,a.createSearch)(I,function(M){return M.name+"|"+M.loc})).sort(function(M,R){var O=P?1:-1;return M[A]===void 0||M[A]===null?O:R[A]===void 0||R[A]===null?-1*O:typeof M[A]=="number"?(M[A]-R[A])*O:M[A].localeCompare(R[A])*O}).map(function(M,R){return(0,e.createComponentVNode)(2,o.Table.Row,{children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:(0,e.createComponentVNode)(2,o.Button,{tooltip:M.obj_desc,translucent:M.admin_z,onClick:function(){function O(){return p("vv",{uid:M.uid})}return O}(),children:M.name})}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:(0,e.createComponentVNode)(2,o.Box,{color:M.admin_z?"grey":"",children:M.person})}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:(0,e.createComponentVNode)(2,o.Box,{color:M.admin_z?"grey":"",children:M.loc})}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:(0,e.createComponentVNode)(2,o.Box,{color:"grey",children:M.admin_z?"On Admin Z-level":""})}),(0,e.createComponentVNode)(2,o.Table.Cell,{collapsing:!0,children:(0,e.createComponentVNode)(2,o.Button,{onClick:function(){function O(){p("follow",{datum_uid:M.uid})}return O}(),children:"FLW"})})]},R)})]}):"No High Value Items!"},s=function(v,C){var h=v.id,p=v.sort_group,N=p===void 0?"sortId":p,V=v.default_sort,y=V===void 0?"antag_name":V,I=v.children,L=(0,t.useLocalState)(C,N,y),w=L[0],A=L[1],x=(0,t.useLocalState)(C,"sortOrder",!0),E=x[0],P=x[1];return(0,e.createComponentVNode)(2,o.Table.Cell,{children:(0,e.createComponentVNode)(2,o.Button,{color:w!==h&&"transparent",width:"100%",onClick:function(){function D(){w===h?P(!E):(A(h),P(!0))}return D}(),children:[I,w===h&&(0,e.createComponentVNode)(2,o.Icon,{name:E?"sort-up":"sort-down",ml:"0.25rem;"})]})})}},39683: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),f=[{name:"Male",icon:"mars"},{name:"Female",icon:"venus"},{name:"Genderless",icon:"genderless"}],b=["A+","A-","B+","B-","AB+","AB-","O+","O-"],S="Empty",B=function(m){var i=m.label,u=m.value,s=m.onCommit,d=m.onClick,v=m.onRClick,C=m.tooltip;return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:i,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:u||S,onCommit:s})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{icon:"file-signature",tooltip:C,tooltipPosition:"bottom-end",onClick:d,onContextMenu:v})})]})})},k=r.AgentCard=function(){function c(m,i){var u=(0,a.useLocalState)(i,"tabIndex",0),s=u[0],d=u[1],v=function(){function C(h){switch(h){case 0:return(0,e.createComponentVNode)(2,g);case 1:return(0,e.createComponentVNode)(2,l);default:return(0,e.createComponentVNode)(2,g)}}return C}();return(0,e.createComponentVNode)(2,o.Window,{width:435,height:500,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,{selected:s===0,onClick:function(){function C(){return d(0)}return C}(),children:[(0,e.createComponentVNode)(2,t.Icon,{name:"table"})," Card Info"]},"Card Info"),(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:s===1,onClick:function(){function C(){return d(1)}return C}(),children:[(0,e.createComponentVNode)(2,t.Icon,{name:"id-card"})," Appearance"]},"Appearance")]})}),v(s)]})})})}return c}(),g=r.AgentCardInfo=function(){function c(m,i){var u=(0,a.useBackend)(i),s=u.act,d=u.data,v=d.registered_name,C=d.sex,h=d.age,p=d.assignment,N=d.job_icon,V=d.associated_account_number,y=d.blood_type,I=d.dna_hash,L=d.fingerprint_hash,w=d.photo,A=d.ai_tracking,x=d.photo_cooldown,E=(0,e.createVNode)(1,"span",null,[(0,e.createTextVNode)("Autofill options."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("LMB - Autofill your own data."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("RMB - Autofill someone else data.")],4),P=(0,e.createVNode)(1,"span",null,[(0,e.createTextVNode)("Autofill options."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("LMB - Autofill your own data."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("RMB - Autofill with random data.")],4);return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Card Info",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,B,{label:"Name",value:v,tooltip:E,onCommit:function(){function D(M,R){return s("change_name",{name:R})}return D}(),onClick:function(){function D(){return s("change_name",{option:"Primary"})}return D}(),onRClick:function(){function D(M){M.preventDefault(),s("change_name",{option:"Secondary"})}return D}()}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Sex",children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,mb:-.5,children:f.map(function(D){return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:D.icon,content:D.name,selected:C===D.name,onClick:function(){function M(){return s("change_sex",{sex:D.name})}return M}()})},D.name)})})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Age",children:(0,e.createComponentVNode)(2,t.Slider,{fluid:!0,minValue:17,value:h||0,maxValue:300,onChange:function(){function D(M,R){return s("change_age",{age:R})}return D}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Rank",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,{fluid:!0,onClick:function(){function D(){return s("change_occupation")}return D}(),textAlign:"middle",children:p||"[UNSET]"})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{tooltip:"Change HUD icon",tooltipPosition:"bottom-end",onClick:function(){function D(){return s("change_occupation",{option:"Primary"})}return D}(),children:[(0,e.createComponentVNode)(2,t.DmIcon,{fill:!0,icon:"icons/mob/hud/job_assets.dmi",icon_state:N,verticalAlign:"bottom",my:"2px",width:"16px"})," "]})})]})}),(0,e.createComponentVNode)(2,B,{label:"Fingerprint",value:L,onCommit:function(){function D(M,R){return s("change_fingerprints",{new_fingerprints:R})}return D}(),onClick:function(){function D(){return s("change_fingerprints",{option:"Primary"})}return D}(),onRClick:function(){function D(M){M.preventDefault(),s("change_fingerprints",{option:"Secondary"})}return D}(),tooltip:P}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Blood Type",children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,mb:-.5,children:[b.map(function(D){return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,content:D,selected:y===D,onClick:function(){function M(){return s("change_blood_type",{new_type:D})}return M}()})},D)}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"file-signature",onClick:function(){function D(){return s("change_blood_type",{option:"Primary"})}return D}()})})]})}),(0,e.createComponentVNode)(2,B,{label:"DNA",value:I,onCommit:function(){function D(M,R){return s("change_dna_hash",{new_dna:R})}return D}(),onClick:function(){function D(){return s("change_dna_hash",{option:"Primary"})}return D}(),onRClick:function(){function D(M){M.preventDefault(),s("change_dna_hash",{option:"Secondary"})}return D}(),tooltip:P}),(0,e.createComponentVNode)(2,B,{label:"Account",value:V||0,onCommit:function(){function D(M,R){return s("change_money_account",{new_account:R})}return D}(),onClick:function(){function D(){return s("change_money_account",{option:"Primary"})}return D}(),onRClick:function(){function D(M){M.preventDefault(),s("change_money_account",{option:"Secondary"})}return D}(),tooltip:P}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Photo",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",disabled:!x,tooltip:x?"":"You can't generate a new photo yet.",onClick:function(){function D(){return s("change_photo")}return D}(),children:w?"Update":S})})]})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Card Settings",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Card Info",children:(0,e.createComponentVNode)(2,t.Button.Confirm,{fluid:!0,textAlign:"center",content:"Delete Card Info",confirmContent:"Are you sure?",onClick:function(){function D(){return s("delete_info")}return D}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Access",children:(0,e.createComponentVNode)(2,t.Button.Confirm,{fluid:!0,textAlign:"center",content:"Reset Access",confirmContent:"Are you sure?",onClick:function(){function D(){return s("clear_access")}return D}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"AI Tracking",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",onClick:function(){function D(){return s("change_ai_tracking")}return D}(),children:A?"Untrackable":"Trackable"})})]})})})],4)}return c}(),l=r.AgentCardAppearances=function(){function c(m,i){var u=(0,a.useBackend)(i),s=u.act,d=u.data,v=(0,a.useSharedState)(i,"selectedAppearance",null),C=v[0],h=v[1],p=d.appearances,N=d.id_icon;return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Card Appearance",children:p.map(function(V){return(0,e.createComponentVNode)(2,t.ImageButton,{dmIcon:N,dmIconState:V,imageSize:64,compact:!0,selected:V===C,tooltip:V,style:{opacity:V===C&&"1"||"0.5"},onClick:function(){function y(){h(V),s("change_appearance",{new_appearance:V})}return y}()},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),f={2:{color:"good",localStatusText:"Offline"},1:{color:"average",localStatusText:"Caution"},0:{color:"bad",localStatusText:"Optimal"}},b=r.AiAirlock=function(){function S(B,k){var g=(0,a.useBackend)(k),l=g.act,c=g.data,m=f[c.power.main]||f[0],i=f[c.power.backup]||f[0],u=f[c.shock]||f[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:m.color,buttons:(0,e.createComponentVNode)(2,t.Button,{mb:.5,icon:"lightbulb-o",disabled:!c.power.main,content:"Disrupt",onClick:function(){function s(){return l("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:i.color,buttons:(0,e.createComponentVNode)(2,t.Button,{mb:.5,icon:"lightbulb-o",disabled:!c.power.backup,content:"Disrupt",onClick:function(){function s(){return l("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:u.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 l("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 l("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 l("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 l("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 l("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 l("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 l("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 l("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 l("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 l("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 S}()},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),f=n(195),b=r.AirAlarm=function(){function u(s,d){var v=(0,a.useBackend)(d),C=v.act,h=v.data,p=h.locked;return(0,e.createComponentVNode)(2,o.Window,{width:570,height:p?310:755,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[(0,e.createComponentVNode)(2,f.InterfaceLockNoticeBox),(0,e.createComponentVNode)(2,B),!p&&(0,e.createFragment)([(0,e.createComponentVNode)(2,k),(0,e.createComponentVNode)(2,g)],4)]})})}return u}(),S=function(s){return s===0?"green":s===1?"orange":"red"},B=function(s,d){var v=(0,a.useBackend)(d),C=v.act,h=v.data,p=h.air,N=h.mode,V=h.atmos_alarm,y=h.locked,I=h.alarmActivated,L=h.rcon,w=h.target_temp,A;return p.danger.overall===0?V===0?A="Optimal":A="Caution: Atmos alert in area":p.danger.overall===1?A="Caution":A="DANGER: Internals Required",(0,e.createComponentVNode)(2,t.Section,{title:"Air Status",children:p?(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Pressure",children:(0,e.createComponentVNode)(2,t.Box,{color:S(p.danger.pressure),children:[(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:p.pressure})," kPa",!y&&(0,e.createFragment)([(0,e.createTextVNode)("\xA0"),(0,e.createComponentVNode)(2,t.Button,{content:N===3?"Deactivate Panic Siphon":"Activate Panic Siphon",selected:N===3,icon:"exclamation-triangle",onClick:function(){function x(){return C("mode",{mode:N===3?1:3})}return x}()})],4)]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Oxygen",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:p.contents.oxygen/100,fractionDigits:"1",color:S(p.danger.oxygen)})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Nitrogen",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:p.contents.nitrogen/100,fractionDigits:"1",color:S(p.danger.nitrogen)})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Carbon Dioxide",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:p.contents.co2/100,fractionDigits:"1",color:S(p.danger.co2)})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Toxins",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:p.contents.plasma/100,fractionDigits:"1",color:S(p.danger.plasma)})}),p.contents.n2o>.1&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Nitrous Oxide",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:p.contents.n2o/100,fractionDigits:"1",color:S(p.danger.n2o)})}),p.contents.other>.1&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Other",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:p.contents.other/100,fractionDigits:"1",color:S(p.danger.other)})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Temperature",children:(0,e.createComponentVNode)(2,t.Box,{color:S(p.danger.temperature),children:[(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:p.temperature})," K / ",(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:p.temperature_c})," C\xA0",(0,e.createComponentVNode)(2,t.Button,{icon:"thermometer-full",content:w+" C",onClick:function(){function x(){return C("temperature")}return x}()}),(0,e.createComponentVNode)(2,t.Button,{content:p.thermostat_state?"On":"Off",selected:p.thermostat_state,icon:"power-off",onClick:function(){function x(){return C("thermostat_state")}return x}()})]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Local Status",children:(0,e.createComponentVNode)(2,t.Box,{color:S(p.danger.overall),children:[A,!y&&(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 C(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 C("set_rcon",{rcon:1})}return x}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Auto",selected:L===2,onClick:function(){function x(){return C("set_rcon",{rcon:2})}return x}()}),(0,e.createComponentVNode)(2,t.Button,{content:"On",selected:L===3,onClick:function(){function x(){return C("set_rcon",{rcon:3})}return x}()})]})]}):(0,e.createComponentVNode)(2,t.Box,{children:"Unable to acquire air sample!"})})},k=function(s,d){var v=(0,a.useLocalState)(d,"tabIndex",0),C=v[0],h=v[1];return(0,e.createComponentVNode)(2,t.Tabs,{children:[(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:C===0,onClick:function(){function p(){return h(0)}return p}(),children:[(0,e.createComponentVNode)(2,t.Icon,{name:"sign-out-alt"})," Vent Control"]},"Vents"),(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:C===1,onClick:function(){function p(){return h(1)}return p}(),children:[(0,e.createComponentVNode)(2,t.Icon,{name:"sign-in-alt"})," Scrubber Control"]},"Scrubbers"),(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:C===2,onClick:function(){function p(){return h(2)}return p}(),children:[(0,e.createComponentVNode)(2,t.Icon,{name:"cog"})," Mode"]},"Mode"),(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:C===3,onClick:function(){function p(){return h(3)}return p}(),children:[(0,e.createComponentVNode)(2,t.Icon,{name:"tachometer-alt"})," Thresholds"]},"Thresholds")]})},g=function(s,d){var v=(0,a.useLocalState)(d,"tabIndex",0),C=v[0],h=v[1];switch(C){case 0:return(0,e.createComponentVNode)(2,l);case 1:return(0,e.createComponentVNode)(2,c);case 2:return(0,e.createComponentVNode)(2,m);case 3:return(0,e.createComponentVNode)(2,i);default:return"WE SHOULDN'T BE HERE!"}},l=function(s,d){var v=(0,a.useBackend)(d),C=v.act,h=v.data,p=h.vents;return p.map(function(N){return(0,e.createComponentVNode)(2,t.Section,{title:N.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:N.power?"On":"Off",selected:N.power,icon:"power-off",onClick:function(){function V(){return C("command",{cmd:"power",val:!N.power,id_tag:N.id_tag})}return V}()}),(0,e.createComponentVNode)(2,t.Button,{content:N.direction?"Blowing":"Siphoning",icon:N.direction?"sign-out-alt":"sign-in-alt",onClick:function(){function V(){return C("command",{cmd:"direction",val:!N.direction,id_tag:N.id_tag})}return V}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Pressure Checks",children:[(0,e.createComponentVNode)(2,t.Button,{content:"External",selected:N.checks===1,onClick:function(){function V(){return C("command",{cmd:"checks",val:1,id_tag:N.id_tag})}return V}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Internal",selected:N.checks===2,onClick:function(){function V(){return C("command",{cmd:"checks",val:2,id_tag:N.id_tag})}return V}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"External Pressure Target",children:[(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:N.external})," kPa\xA0",(0,e.createComponentVNode)(2,t.Button,{content:"Set",icon:"cog",onClick:function(){function V(){return C("command",{cmd:"set_external_pressure",id_tag:N.id_tag})}return V}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Reset",icon:"redo-alt",onClick:function(){function V(){return C("command",{cmd:"set_external_pressure",val:101.325,id_tag:N.id_tag})}return V}()})]})]})},N.name)})},c=function(s,d){var v=(0,a.useBackend)(d),C=v.act,h=v.data,p=h.scrubbers;return p.map(function(N){return(0,e.createComponentVNode)(2,t.Section,{title:N.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:N.power?"On":"Off",selected:N.power,icon:"power-off",onClick:function(){function V(){return C("command",{cmd:"power",val:!N.power,id_tag:N.id_tag})}return V}()}),(0,e.createComponentVNode)(2,t.Button,{content:N.scrubbing?"Scrubbing":"Siphoning",icon:N.scrubbing?"filter":"sign-in-alt",onClick:function(){function V(){return C("command",{cmd:"scrubbing",val:!N.scrubbing,id_tag:N.id_tag})}return V}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Range",children:(0,e.createComponentVNode)(2,t.Button,{content:N.widenet?"Extended":"Normal",selected:N.widenet,icon:"expand-arrows-alt",onClick:function(){function V(){return C("command",{cmd:"widenet",val:!N.widenet,id_tag:N.id_tag})}return V}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Filtering",children:[(0,e.createComponentVNode)(2,t.Button,{content:"Carbon Dioxide",selected:N.filter_co2,onClick:function(){function V(){return C("command",{cmd:"co2_scrub",val:!N.filter_co2,id_tag:N.id_tag})}return V}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Plasma",selected:N.filter_toxins,onClick:function(){function V(){return C("command",{cmd:"tox_scrub",val:!N.filter_toxins,id_tag:N.id_tag})}return V}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Nitrous Oxide",selected:N.filter_n2o,onClick:function(){function V(){return C("command",{cmd:"n2o_scrub",val:!N.filter_n2o,id_tag:N.id_tag})}return V}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Oxygen",selected:N.filter_o2,onClick:function(){function V(){return C("command",{cmd:"o2_scrub",val:!N.filter_o2,id_tag:N.id_tag})}return V}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Nitrogen",selected:N.filter_n2,onClick:function(){function V(){return C("command",{cmd:"n2_scrub",val:!N.filter_n2,id_tag:N.id_tag})}return V}()})]})]})},N.name)})},m=function(s,d){var v=(0,a.useBackend)(d),C=v.act,h=v.data,p=h.modes,N=h.presets,V=h.emagged,y=h.mode,I=h.preset;return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Section,{title:"System Mode",children:Object.keys(p).map(function(L){var w=p[L];if(!w.emagonly||V)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:w.name,icon:"cog",selected:w.id===y,onClick:function(){function A(){return C("mode",{mode:w.id})}return A}()})}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:w.desc})]},w.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:N.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 C("preset",{preset:L.id})}return w}()})}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:L.desc})]},L.name)})})]})],4)},i=function(s,d){var v=(0,a.useBackend)(d),C=v.act,h=v.data,p=h.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"})]}),p.map(function(N){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:N.name}),N.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 y(){return C("command",{cmd:"set_threshold",env:V.env,var:V.val})}return y}()})},V.val)})]},N.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),f=r.AirlockAccessController=function(){function b(S,B){var k=(0,a.useBackend)(B),g=k.act,l=k.data,c=l.exterior_status,m=l.interior_status,i=l.processing,u,s;return c==="open"?u=(0,e.createComponentVNode)(2,t.Button,{width:"50%",content:"Lock Exterior Door",icon:"exclamation-triangle",disabled:i,onClick:function(){function d(){return g("force_ext")}return d}()}):u=(0,e.createComponentVNode)(2,t.Button,{width:"50%",content:"Cycle to Exterior",icon:"arrow-circle-left",disabled:i,onClick:function(){function d(){return g("cycle_ext_door")}return d}()}),m==="open"?s=(0,e.createComponentVNode)(2,t.Button,{width:"49%",content:"Lock Interior Door",icon:"exclamation-triangle",disabled:i,color:m==="open"?"red":i?"yellow":null,onClick:function(){function d(){return g("force_int")}return d}()}):s=(0,e.createComponentVNode)(2,t.Button,{width:"49%",content:"Cycle to Interior",icon:"arrow-circle-right",disabled:i,onClick:function(){function d(){return g("cycle_int_door")}return d}()}),(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:m==="closed"?"Locked":"Open"})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Actions",children:(0,e.createComponentVNode)(2,t.Box,{children:[u,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),f=n(49148),b=1,S=2,B=4,k=8,g=r.AirlockElectronics=function(){function m(i,u){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,l),(0,e.createComponentVNode)(2,c)]})})})}return m}(),l=function(i,u){var s=(0,a.useBackend)(u),d=s.act,v=s.data,C=v.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:C&B,onClick:function(){function h(){return d("unrestricted_access",{unres_dir:B})}return h}()})}),(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:C&S,onClick:function(){function h(){return d("unrestricted_access",{unres_dir:S})}return h}()})}),(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:C&k,onClick:function(){function h(){return d("unrestricted_access",{unres_dir:k})}return h}()})}),(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:C&b,onClick:function(){function h(){return d("unrestricted_access",{unres_dir:b})}return h}()})})]})]})})},c=function(i,u){var s=(0,a.useBackend)(u),d=s.act,v=s.data,C=v.selected_accesses,h=v.one_access,p=v.regions;return(0,e.createComponentVNode)(2,f.AccessList,{usedByRcd:1,rcdButtons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button.Checkbox,{checked:h,content:"One",onClick:function(){function N(){return d("set_one_access",{access:"one"})}return N}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{checked:!h,content:"All",onClick:function(){function N(){return d("set_one_access",{access:"all"})}return N}()})],4),accesses:p,selectedList:C,accessMod:function(){function N(V){return d("set",{access:V})}return N}(),grantAll:function(){function N(){return d("grant_all")}return N}(),denyAll:function(){function N(){return d("clear_all")}return N}(),grantDep:function(){function N(V){return d("grant_region",{region:V})}return N}(),denyDep:function(){function N(V){return d("deny_region",{region:V})}return N}()})}},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),f=n(36036),b=n(98595),S=-1,B=1,k=r.AlertModal=function(){function c(m,i){var u=(0,t.useBackend)(i),s=u.act,d=u.data,v=d.autofocus,C=d.buttons,h=C===void 0?[]:C,p=d.large_buttons,N=d.message,V=N===void 0?"":N,y=d.timeout,I=d.title,L=(0,t.useLocalState)(i,"selected",0),w=L[0],A=L[1],x=110+(V.length>30?Math.ceil(V.length/4):0)+(V.length&&p?5:0),E=325+(h.length>2?100:0),P=function(){function D(M){w===0&&M===S?A(h.length-1):w===h.length-1&&M===B?A(0):A(w+M)}return D}();return(0,e.createComponentVNode)(2,b.Window,{title:I,height:x,width:E,children:[!!y&&(0,e.createComponentVNode)(2,a.Loader,{value:y}),(0,e.createComponentVNode)(2,b.Window.Content,{onKeyDown:function(){function D(M){var R=window.event?M.which:M.keyCode;R===o.KEY_SPACE||R===o.KEY_ENTER?s("choose",{choice:h[w]}):R===o.KEY_ESCAPE?s("cancel"):R===o.KEY_LEFT?(M.preventDefault(),P(S)):(R===o.KEY_TAB||R===o.KEY_RIGHT)&&(M.preventDefault(),P(B))}return D}(),children:(0,e.createComponentVNode)(2,f.Section,{fill:!0,children:(0,e.createComponentVNode)(2,f.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,f.Stack.Item,{grow:!0,m:1,children:(0,e.createComponentVNode)(2,f.Box,{color:"label",overflow:"hidden",children:V})}),(0,e.createComponentVNode)(2,f.Stack.Item,{children:[!!v&&(0,e.createComponentVNode)(2,f.Autofocus),(0,e.createComponentVNode)(2,g,{selected:w})]})]})})})]})}return c}(),g=function(m,i){var u=(0,t.useBackend)(i),s=u.data,d=s.buttons,v=d===void 0?[]:d,C=s.large_buttons,h=s.swapped_buttons,p=m.selected;return(0,e.createComponentVNode)(2,f.Flex,{fill:!0,align:"center",direction:h?"row":"row-reverse",justify:"space-around",wrap:!0,children:v==null?void 0:v.map(function(N,V){return C&&v.length<3?(0,e.createComponentVNode)(2,f.Flex.Item,{grow:!0,children:(0,e.createComponentVNode)(2,l,{button:N,id:V.toString(),selected:p===V})},V):(0,e.createComponentVNode)(2,f.Flex.Item,{grow:C?1:0,children:(0,e.createComponentVNode)(2,l,{button:N,id:V.toString(),selected:p===V})},V)})})},l=function(m,i){var u=(0,t.useBackend)(i),s=u.act,d=u.data,v=d.large_buttons,C=m.button,h=m.selected,p=C.length>7?"100%":7;return(0,e.createComponentVNode)(2,f.Button,{mx:v?1:0,pt:v?.33:0,content:C,fluid:!!v,onClick:function(){function N(){return s("choose",{choice:C})}return N}(),selected:h,textAlign:"center",height:!!v&&2,width:!v&&p})}},68371:function(T,r,n){"use strict";r.__esModule=!0,r.AntagInfoHeretic=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f={color:"#e03c3c"},b={fontWeight:"bold",color:"#2185d0"},S={fontWeight:"bold",color:"#bd54e0"},B={fontWeight:"bold",color:"#20b142"},k={fontWeight:"bold",color:"yellow"},g=function(v,C){var h=(0,a.useBackend)(C),p=h.data,N=h.act,V=p.ascended,y=p.can_change_objective;return(0,e.createComponentVNode)(2,t.Stack,{justify:"space-evenly",height:"100%",width:"100%",children:(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"You are the Heretic!",fill:!0,fontSize:"14px",children:(0,e.createComponentVNode)(2,t.Stack,{vertical:!0,children:[(0,e.createComponentVNode)(2,l),(0,e.createComponentVNode)(2,t.Stack.Divider),(0,e.createComponentVNode)(2,c),(0,e.createComponentVNode)(2,t.Stack.Divider),(0,e.createComponentVNode)(2,m),(0,e.createComponentVNode)(2,t.Stack.Divider)]})})})})},l=function(){return(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Stack,{vertical:!0,textAlign:"center",fontSize:"14px",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createVNode)(1,"i",null,[(0,e.createTextVNode)("Another day at a meaningless job. You feel a\xA0"),(0,e.createVNode)(1,"span",null,"shimmer",16,{style:b}),(0,e.createTextVNode)("\xA0around you, as a realization of something\xA0"),(0,e.createVNode)(1,"span",null,"strange",16,{style:f}),(0,e.createTextVNode)("\xA0in the air unfolds. You look inwards and discover something that will change your life.")],4)}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createVNode)(1,"b",null,[(0,e.createTextVNode)("The "),(0,e.createVNode)(1,"span",null,"Gates of Mansus",16,{style:S}),(0,e.createTextVNode)("\xA0open up to your mind.")],4)})]})})},c=function(){return(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Stack,{vertical:!0,fontSize:"12px",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:["- Find reality smashing\xA0",(0,e.createVNode)(1,"span",null,"influences",16,{style:S}),"\xA0around the station invisible to the normal eye and\xA0",(0,e.createVNode)(1,"b",null,"right click",16)," on them to harvest them for\xA0",(0,e.createVNode)(1,"span",null,"knowledge points",16,{style:b}),". Tapping them makes them visible to all after a short time."]}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:["- Use your\xA0",(0,e.createVNode)(1,"span",null,"Living Heart action",16,{style:f}),"\xA0to track down\xA0",(0,e.createVNode)(1,"span",null,"sacrifice targets",16,{style:f}),", but be careful: Pulsing it will produce a heartbeat sound that nearby people may hear. This action is tied to your ",(0,e.createVNode)(1,"b",null,"heart",16)," - if you lose it, you must complete a ritual to regain it."]}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:["- Draw a\xA0",(0,e.createVNode)(1,"span",null,"transmutation rune",16,{style:B})," by using a drawing tool (a pen or crayon) on the floor while having\xA0",(0,e.createVNode)(1,"span",null,"Mansus Grasp",16,{style:B}),"\xA0active in your other hand. This rune allows you to complete rituals and sacrifices."]}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:["- Follow your ",(0,e.createVNode)(1,"span",null,"Living Heart",16,{style:f})," to find your targets. Bring them back to a\xA0",(0,e.createVNode)(1,"span",null,"transmutation rune",16,{style:B})," in critical or worse condition to\xA0",(0,e.createVNode)(1,"span",null,"sacrifice",16,{style:f})," them for\xA0",(0,e.createVNode)(1,"span",null,"knowledge points",16,{style:b}),". The Mansus ",(0,e.createVNode)(1,"b",null,"ONLY",16)," accepts targets pointed to by the\xA0",(0,e.createVNode)(1,"span",null,"Living Heart",16,{style:f}),"."]}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:["- Make yourself a ",(0,e.createVNode)(1,"span",null,"focus",16,{style:k})," to be able to cast various advanced spells to assist you in acquiring harder and harder sacrifices."]}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:["- Accomplish all of your objectives to be able to learn the ",(0,e.createVNode)(1,"span",null,"final ritual",16,{style:k}),". Complete the ritual to become all powerful!"]})]})})},m=function(v,C){var h=(0,a.useBackend)(C),p=h.data,N=p.charges,V=p.total_sacrifices,y=p.ascended;return(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Stack,{vertical:!0,fill:!0,children:[!!y&&(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Stack,{align:"center",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:"You have"}),(0,e.createComponentVNode)(2,t.Stack.Item,{fontSize:"24px",children:[(0,e.createComponentVNode)(2,t.Box,{inline:!0,color:"yellow",children:"ASCENDED"}),"!"]})]})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:["You have ",(0,e.createVNode)(1,"b",null,N||0,0),"\xA0",(0,e.createVNode)(1,"span",null,[(0,e.createTextVNode)("knowledge point"),N!==1?"s":""],0,{style:b}),"."]}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:["You have made a total of\xA0",(0,e.createVNode)(1,"b",null,V||0,0),"\xA0",(0,e.createVNode)(1,"span",null,"sacrifices",16,{style:f}),"."]})]})})},i=function(v,C){var h=(0,a.useBackend)(C),p=h.data,N=h.act,V=p.knowledge_tiers;return(0,e.createComponentVNode)(2,t.Section,{title:"Research Tree",fill:!0,scrollable:!0,children:[(0,e.createComponentVNode)(2,t.Box,{textAlign:"center",fontSize:"32px",children:(0,e.createVNode)(1,"span",null,"DAWN",16,{style:k})}),(0,e.createComponentVNode)(2,t.Stack,{vertical:!0,children:V.length===0?"None!":V.map(function(y,I){return(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Flex,{justify:"center",align:"center",backgroundColor:"transparent",wrap:"wrap",children:y.nodes.map(function(L){return(0,e.createComponentVNode)(2,t.Flex.Item,{children:[(0,e.createComponentVNode)(2,t.Button,{color:"transparent",tooltip:L.name+":\n "+L.desc,onClick:L.disabled||L.finished?void 0:function(){return N("research",{path:L.path})},width:L.ascension?"192px":"64px",height:L.ascension?"192px":"64px",m:"8px",style:{borderRadius:"50%"},children:[(0,e.createComponentVNode)(2,t.DmIcon,{icon:"icons/ui_icons/antags/heretic/knowledge.dmi",icon_state:L.disabled?"node_locked":L.finished?"node_finished":L.bgr,height:L.ascension?"192px":"64px",width:L.ascension?"192px":"64px",top:"0px",left:"0px",position:"absolute"}),(0,e.createComponentVNode)(2,t.DmIcon,{icon:L.icon_params.icon,icon_state:L.icon_params.state,frame:L.icon_params.frame,direction:L.icon_params.dir,movement:L.icon_params.moving,height:L.ascension?"152px":"64px",width:L.ascension?"152px":"64px",top:L.ascension?"20px":"0px",left:L.ascension?"20px":"0px",position:"absolute"}),(0,e.createComponentVNode)(2,t.Box,{position:"absolute",top:"0px",left:"0px",backgroundColor:"black",textColor:"white",bold:!0,children:!L.finished&&(L.cost>0?L.cost:"FREE")})]}),!!L.ascension&&(0,e.createComponentVNode)(2,t.Box,{textAlign:"center",fontSize:"32px",children:(0,e.createVNode)(1,"span",null,"DUSK",16,{style:S})})]},L.name)})}),(0,e.createVNode)(1,"hr")]},I)})})]})},u=function(v,C){var h=(0,a.useBackend)(C),p=h.data,N=p.charges;return(0,e.createComponentVNode)(2,t.Stack,{vertical:!0,fill:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{fontSize:"20px",textAlign:"center",children:["You have ",(0,e.createVNode)(1,"b",null,N||0,0),"\xA0",(0,e.createVNode)(1,"span",null,[(0,e.createTextVNode)("knowledge point"),N!==1?"s":""],0,{style:b})," to spend."]}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,i)})]})},s=r.AntagInfoHeretic=function(){function d(v,C){var h=(0,a.useBackend)(C),p=h.data,N=p.ascended,V=(0,a.useLocalState)(C,"currentTab",0),y=V[0],I=V[1];return(0,e.createComponentVNode)(2,o.Window,{width:675,height:635,children:(0,e.createComponentVNode)(2,o.Window.Content,{style:{backgroundImage:"none",background:N?"radial-gradient(circle, rgba(24,9,9,1) 54%, rgba(31,10,10,1) 60%, rgba(46,11,11,1) 80%, rgba(47,14,14,1) 100%);":"radial-gradient(circle, rgba(9,9,24,1) 54%, rgba(10,10,31,1) 60%, rgba(21,11,46,1) 80%, rgba(24,14,47,1) 100%);"},children:(0,e.createComponentVNode)(2,t.Stack,{vertical:!0,fill:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Tabs,{fluid:!0,children:[(0,e.createComponentVNode)(2,t.Tabs.Tab,{icon:"info",selected:y===0,onClick:function(){function L(){return I(0)}return L}(),children:"Information"}),(0,e.createComponentVNode)(2,t.Tabs.Tab,{icon:y===1?"book-open":"book",selected:y===1,onClick:function(){function L(){return I(1)}return L}(),children:"Research"})]})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:y===0&&(0,e.createComponentVNode)(2,g)||(0,e.createComponentVNode)(2,u)})]})})})}return d}()},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),f=r.AppearanceChanger=function(){function S(B,k){var g=(0,a.useBackend)(k),l=g.act,c=g.data,m=c.change_race,i=c.species,u=c.specimen,s=c.change_gender,d=c.gender,v=c.change_eye_color,C=c.change_skin_tone,h=c.change_skin_color,p=c.change_runechat_color,N=c.change_head_accessory_color,V=c.change_hair_color,y=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,D=c.head_accessory_style,M=c.change_hair,R=c.hair_styles,O=c.hair_style,F=c.change_hair_gradient,_=c.change_facial_hair,U=c.facial_hair_styles,z=c.facial_hair_style,$=c.change_head_markings,G=c.head_marking_styles,X=c.head_marking_style,J=c.change_body_markings,se=c.body_marking_styles,ie=c.body_marking_style,me=c.change_tail_markings,q=c.tail_marking_styles,re=c.tail_marking_style,ae=c.change_body_accessory,le=c.body_accessory_styles,Z=c.body_accessory_style,ne=c.change_alt_head,te=c.alt_head_styles,fe=c.alt_head_style,pe=!1;return(v||C||h||N||p||V||y||I||L||w||A||x)&&(pe=!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:[!!m&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Species",children:i.map(function(ce){return(0,e.createComponentVNode)(2,t.Button,{content:ce.specimen,selected:ce.specimen===u,onClick:function(){function Ve(){return l("race",{race:ce.specimen})}return Ve}()},ce.specimen)})}),!!s&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Gender",children:[(0,e.createComponentVNode)(2,t.Button,{content:"Male",selected:d==="male",onClick:function(){function ce(){return l("gender",{gender:"male"})}return ce}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Female",selected:d==="female",onClick:function(){function ce(){return l("gender",{gender:"female"})}return ce}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Genderless",selected:d==="plural",onClick:function(){function ce(){return l("gender",{gender:"plural"})}return ce}()})]}),!!pe&&(0,e.createComponentVNode)(2,b),!!E&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Head accessory",children:P.map(function(ce){return(0,e.createComponentVNode)(2,t.Button,{content:ce.headaccessorystyle,selected:ce.headaccessorystyle===D,onClick:function(){function Ve(){return l("head_accessory",{head_accessory:ce.headaccessorystyle})}return Ve}()},ce.headaccessorystyle)})}),!!M&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Hair",children:R.map(function(ce){return(0,e.createComponentVNode)(2,t.Button,{content:ce.hairstyle,selected:ce.hairstyle===O,onClick:function(){function Ve(){return l("hair",{hair:ce.hairstyle})}return Ve}()},ce.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 ce(){return l("hair_gradient")}return ce}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Change Offset",onClick:function(){function ce(){return l("hair_gradient_offset")}return ce}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Change Color",onClick:function(){function ce(){return l("hair_gradient_colour")}return ce}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Change Alpha",onClick:function(){function ce(){return l("hair_gradient_alpha")}return ce}()})]}),!!_&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Facial hair",children:U.map(function(ce){return(0,e.createComponentVNode)(2,t.Button,{content:ce.facialhairstyle,selected:ce.facialhairstyle===z,onClick:function(){function Ve(){return l("facial_hair",{facial_hair:ce.facialhairstyle})}return Ve}()},ce.facialhairstyle)})}),!!$&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Head markings",children:G.map(function(ce){return(0,e.createComponentVNode)(2,t.Button,{content:ce.headmarkingstyle,selected:ce.headmarkingstyle===X,onClick:function(){function Ve(){return l("head_marking",{head_marking:ce.headmarkingstyle})}return Ve}()},ce.headmarkingstyle)})}),!!J&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Body markings",children:se.map(function(ce){return(0,e.createComponentVNode)(2,t.Button,{content:ce.bodymarkingstyle,selected:ce.bodymarkingstyle===ie,onClick:function(){function Ve(){return l("body_marking",{body_marking:ce.bodymarkingstyle})}return Ve}()},ce.bodymarkingstyle)})}),!!me&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Tail markings",children:q.map(function(ce){return(0,e.createComponentVNode)(2,t.Button,{content:ce.tailmarkingstyle,selected:ce.tailmarkingstyle===re,onClick:function(){function Ve(){return l("tail_marking",{tail_marking:ce.tailmarkingstyle})}return Ve}()},ce.tailmarkingstyle)})}),!!ae&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Body accessory",children:le.map(function(ce){return(0,e.createComponentVNode)(2,t.Button,{content:ce.bodyaccessorystyle,selected:ce.bodyaccessorystyle===Z,onClick:function(){function Ve(){return l("body_accessory",{body_accessory:ce.bodyaccessorystyle})}return Ve}()},ce.bodyaccessorystyle)})}),!!ne&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Alternate head",children:te.map(function(ce){return(0,e.createComponentVNode)(2,t.Button,{content:ce.altheadstyle,selected:ce.altheadstyle===fe,onClick:function(){function Ve(){return l("alt_head",{alt_head:ce.altheadstyle})}return Ve}()},ce.altheadstyle)})})]})})})}return S}(),b=function(B,k){var g=(0,a.useBackend)(k),l=g.act,c=g.data,m=[{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:m.map(function(i){return!!c[i.key]&&(0,e.createComponentVNode)(2,t.Button,{content:i.text,onClick:function(){function u(){return l(i.action)}return u}()},i.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),f=r.AtmosAlertConsole=function(){function b(S,B){var k=(0,a.useBackend)(B),g=k.act,l=k.data,c=l.priority||[],m=l.minor||[],i=l.mode||{};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)}),m.length===0&&(0,e.createVNode)(1,"li","color-good","No Minor Alerts",16),m.map(function(u){return(0,e.createVNode)(1,"li","color-average",u,0,null,u)}),Object.keys(i).length===0&&(0,e.createVNode)(1,"li","color-good","All Areas Filtering",16),Object.keys(i).map(function(u){return(0,e.createVNode)(1,"li","color-good",[u,(0,e.createTextVNode)(" mode is "),i[u]],0,null,alert)})],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),f=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"})},S=function(c){if(c===0)return"green";if(c===1)return"orange";if(c===2)return"red"},B=r.AtmosControl=function(){function l(c,m){var i=(0,a.useBackend)(m),u=i.act,s=i.data,d=(0,a.useLocalState)(m,"tabIndex",0),v=d[0],C=d[1],h=function(){function p(N){switch(N){case 0:return(0,e.createComponentVNode)(2,k);case 1:return(0,e.createComponentVNode)(2,g);default:return"WE SHOULDN'T BE HERE!"}}return p}();return(0,e.createComponentVNode)(2,f.Window,{width:800,height:600,children:(0,e.createComponentVNode)(2,f.Window.Content,{scrollable:v===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 p(){return C(0)}return p}(),children:[(0,e.createComponentVNode)(2,t.Icon,{name:"table"})," Data View"]},"DataView"),(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:v===1,onClick:function(){function p(){return C(1)}return p}(),children:[(0,e.createComponentVNode)(2,t.Icon,{name:"map-marked-alt"})," Map View"]},"MapView")]}),h(v)]})})})}return l}(),k=function(c,m){var i=(0,a.useBackend)(m),u=i.act,s=i.data,d=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"})]}),d.map(function(v){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,o.TableCell,{children:v.name}),(0,e.createComponentVNode)(2,o.TableCell,{children:b(v.danger)}),(0,e.createComponentVNode)(2,o.TableCell,{children:(0,e.createComponentVNode)(2,t.Button,{icon:"cog",content:"Access",onClick:function(){function C(){return u("open_alarm",{aref:v.ref})}return C}()})})]},v.name)})]})})},g=function(c,m){var i=(0,a.useBackend)(m),u=i.act,s=i.data,d=s.alarms;return(0,e.createComponentVNode)(2,t.Box,{height:"526px",mb:"0.5rem",overflow:"hidden",children:(0,e.createComponentVNode)(2,t.NanoMap,{children:d.filter(function(v){return v.z===2}).map(function(v){return(0,e.createComponentVNode)(2,t.NanoMap.MarkerIcon,{x:v.x,y:v.y,icon:"circle",tooltip:v.name,color:S(v.danger),onClick:function(){function C(){return u("open_alarm",{aref:v.ref})}return C}()},v.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),f=r.AtmosFilter=function(){function b(S,B){var k=(0,a.useBackend)(B),g=k.act,l=k.data,c=l.on,m=l.pressure,i=l.max_pressure,u=l.filter_type,s=l.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 d(){return g("power")}return d}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Rate",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"fast-backward",textAlign:"center",disabled:m===0,width:2.2,onClick:function(){function d(){return g("min_pressure")}return d}()}),(0,e.createComponentVNode)(2,t.NumberInput,{animated:!0,unit:"kPa",width:6.1,lineHeight:1.5,step:10,minValue:0,maxValue:i,value:m,onDrag:function(){function d(v,C){return g("custom_pressure",{pressure:C})}return d}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"fast-forward",textAlign:"center",disabled:m===i,width:2.2,onClick:function(){function d(){return g("max_pressure")}return d}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Filter",children:s.map(function(d){return(0,e.createComponentVNode)(2,t.Button,{selected:d.gas_type===u,content:d.label,onClick:function(){function v(){return g("set_filter",{filter:d.gas_type})}return v}()},d.label)})})]})})})})}return b}()},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),f=r.AtmosMixer=function(){function S(B,k){var g=(0,a.useBackend)(k),l=g.act,c=g.data,m=c.on,i=c.pressure,u=c.max_pressure,s=c.node1_concentration,d=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:m?"On":"Off",color:m?null:"red",selected:m,onClick:function(){function v(){return l("power")}return v}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Rate",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"fast-backward",textAlign:"center",disabled:i===0,width:2.2,onClick:function(){function v(){return l("min_pressure")}return v}()}),(0,e.createComponentVNode)(2,t.NumberInput,{animated:!0,unit:"kPa",width:6.1,lineHeight:1.5,step:10,minValue:0,maxValue:u,value:i,onDrag:function(){function v(C,h){return l("custom_pressure",{pressure:h})}return v}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"fast-forward",textAlign:"center",disabled:i===u,width:2.2,onClick:function(){function v(){return l("max_pressure")}return v}()})]}),(0,e.createComponentVNode)(2,b,{node_name:"Node 1",node_ref:s}),(0,e.createComponentVNode)(2,b,{node_name:"Node 2",node_ref:d})]})})})})}return S}(),b=function(B,k){var g=(0,a.useBackend)(k),l=g.act,c=g.data,m=B.node_name,i=B.node_ref;return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:m,children:[(0,e.createComponentVNode)(2,t.Button,{icon:"fast-backward",textAlign:"center",width:2.2,disabled:i===0,onClick:function(){function u(){return l("set_node",{node_name:m,concentration:(i-10)/100})}return u}()}),(0,e.createComponentVNode)(2,t.NumberInput,{animated:!0,unit:"%",width:6.1,lineHeight:1.5,stepPixelSize:10,minValue:0,maxValue:100,value:i,onChange:function(){function u(s,d){return l("set_node",{node_name:m,concentration:d/100})}return u}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"fast-forward",textAlign:"center",width:2.2,disabled:i===100,onClick:function(){function u(){return l("set_node",{node_name:m,concentration:(i+10)/100})}return u}()})]})}},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),f=r.AtmosPump=function(){function b(S,B){var k=(0,a.useBackend)(B),g=k.act,l=k.data,c=l.on,m=l.rate,i=l.max_rate,u=l.gas_unit,s=l.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 d(){return g("power")}return d}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Rate",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"fast-backward",textAlign:"center",disabled:m===0,width:2.2,onClick:function(){function d(){return g("min_rate")}return d}()}),(0,e.createComponentVNode)(2,t.NumberInput,{animated:!0,unit:u,width:6.1,lineHeight:1.5,step:s,minValue:0,maxValue:i,value:m,onDrag:function(){function d(v,C){return g("custom_rate",{rate:C})}return d}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"fast-forward",textAlign:"center",disabled:m===i,width:2.2,onClick:function(){function d(){return g("max_rate")}return d}()})]})]})})})})}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),f=n(76910),b=n(98595),S=r.AtmosTankControl=function(){function B(k,g){var l=(0,a.useBackend)(g),c=l.act,m=l.data,i=m.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(i).map(function(u){return(0,e.createComponentVNode)(2,t.Section,{title:u,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[Object.keys(i[u]).indexOf("pressure")>-1?(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Pressure",children:[i[u].pressure," kpa"]}):"",Object.keys(i[u]).indexOf("temperature")>-1?(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Temperature",children:[i[u].temperature," K"]}):"",["o2","n2","plasma","co2","n2o"].map(function(s){return Object.keys(i[u]).indexOf(s)>-1?(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:(0,f.getGasLabel)(s),children:(0,e.createComponentVNode)(2,t.ProgressBar,{color:(0,f.getGasColor)(s),value:i[u][s],minValue:0,maxValue:100,children:(0,o.toFixed)(i[u][s],2)+"%"})},(0,f.getGasLabel)(s)):""})]})},u)}),m.inlet&&Object.keys(m.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:(m.inlet.on,"power-off"),content:m.inlet.on?"On":"Off",color:m.inlet.on?null:"red",selected:m.inlet.on,onClick:function(){function u(){return c("toggle_active",{dev:"inlet"})}return u}()})}),(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:m.inlet.rate,onDrag:function(){function u(s,d){return c("set_pressure",{dev:"inlet",val:d})}return u}()})})]})}):"",m.outlet&&Object.keys(m.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:(m.outlet.on,"power-off"),content:m.outlet.on?"On":"Off",color:m.outlet.on?null:"red",selected:m.outlet.on,onClick:function(){function u(){return c("toggle_active",{dev:"outlet"})}return u}()})}),(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:m.outlet.rate,onDrag:function(){function u(s,d){return c("set_pressure",{dev:"outlet",val:d})}return u}()})})]})}):""]})})}return B}()},92444:function(T,r,n){"use strict";r.__esModule=!0,r.AugmentMenu=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=n(25328),b=r.AugmentMenu=function(){function k(g,l){return(0,e.createComponentVNode)(2,o.Window,{width:700,height:660,theme:"malfunction",children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{vertical:!0,children:(0,e.createComponentVNode)(2,S,{context:l})})})})}return k}(),S=function(g){var l=g.context,c=(0,a.useBackend)(l),m=c.act,i=c.data,u=i.usable_swarms,s=i.ability_tabs,d=i.known_abilities,v=(0,a.useLocalState)(l,"selectedTab",s[0]),C=v[0],h=v[1],p=(0,a.useLocalState)(l,"searchText",""),N=p[0],V=p[1],y=function(){var E=s.find(function(D){return D.category_name===C.category_name});if(!E)return[];var P=Math.min(E.category_stage,4);return E.abilities.filter(function(D){return D.stage<=P&&(!N||D.name.toLowerCase().includes(N.toLowerCase()))}).sort(function(D,M){return["intruder","destroyer"].includes(C.category_name.toLowerCase())?D.stage-M.stage:0})},I=y(),L=s.find(function(x){return x.category_name===C.category_name}),w=["intruder","destroyer"].includes(C.category_name.toLowerCase()),A=function(E){var P=d.find(function(R){return R.ability_path===E.ability_path}),D=P?P.cost:E.cost,M=P&&P.current_level>0?P.current_level+" / "+P.max_level:"0 / "+E.max_level;return(0,e.createComponentVNode)(2,t.Stack.Item,{direction:"row",children:[(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Button,{height:"20px",width:"35px",mb:1,textAlign:"center",content:D,disabled:D>u||P&&P.current_level===P.max_level,tooltip:"Purchase this ability?",onClick:function(){function R(){m("purchase",{ability_path:E.ability_path}),h(C)}return R}()}),(0,e.createComponentVNode)(2,t.Stack.Item,{fontSize:"16px",children:E.name})]}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Stack,{vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{fontSize:"13px",children:E.desc||"Description not available"}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:["Level: ",(0,e.createVNode)(1,"span",null,M,0,{style:{color:"green"}}),w&&E.stage>0&&(0,e.createVNode)(1,"span",null,[(0,e.createTextVNode)(" (Stage: "),E.stage,(0,e.createTextVNode)(")")],0)]}),(0,e.createComponentVNode)(2,t.Stack.Divider)]})})]},E.name)};return(0,e.createComponentVNode)(2,t.Section,{title:(0,e.createVNode)(1,"div",null,[(0,e.createComponentVNode)(2,t.Stack,{vertical:!0,style:{marginRight:"10px"},children:[(0,e.createVNode)(1,"span",null,[(0,e.createTextVNode)("Swarms: "),(0,e.createVNode)(1,"span",null,u,0,{style:{color:"green"}})],4),w&&L&&(0,e.createVNode)(1,"span",null,[(0,e.createTextVNode)("Category Stage: "),(0,e.createVNode)(1,"span",null,Math.min(L.category_stage,4),0,{style:{color:"green"}})],4)]}),(0,e.createVNode)(1,"div","Section__buttons",(0,e.createComponentVNode)(2,t.Input,{width:"200px",placeholder:"Search Abilities",onInput:function(){function x(E,P){return V(P)}return x}(),value:N}),2)],4,{style:{display:"flex",alignItems:"center"}}),children:[(0,e.createComponentVNode)(2,t.Tabs,{children:[s.map(function(x){return(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:C.category_name===x.category_name,onClick:function(){function E(){h(x),V("")}return E}(),children:(0,f.capitalize)(x.category_name)},x.category_name)}),(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:C.category_name==="upgrades",onClick:function(){function x(){return h({category_name:"upgrades"})}return x}(),children:"Upgrades"},"upgrades")]}),C.category_name==="upgrades"?(0,e.createComponentVNode)(2,B,{act:m,abilityTabs:s,knownAbilities:d,usableSwarms:u}):(0,e.createComponentVNode)(2,t.Stack,{vertical:!0,children:I.map(A)})]})},B=function(g){var l=g.act,c=g.abilityTabs,m=g.knownAbilities,i=g.usableSwarms,u=m.filter(function(d){return d.current_leveli,tooltip:"Upgrade this ability?",onClick:function(){function h(){return l("purchase",{ability_path:v.ability_path})}return h}()}),(0,e.createComponentVNode)(2,t.Stack.Item,{fontSize:"16px",children:v.name})]}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Stack,{vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{fontSize:"13px",children:v.upgrade_text}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:["Level:"," ",(0,e.createVNode)(1,"span",null,v.current_level+" / "+v.max_level,0,{style:{color:"green"}}),C&&C.stage>0&&(0,e.createVNode)(1,"span",null,[(0,e.createTextVNode)(" (Stage: "),C.stage,(0,e.createTextVNode)(")")],0)]}),(0,e.createComponentVNode)(2,t.Stack.Divider)]})})]},v.name)};return(0,e.createComponentVNode)(2,t.Stack,{vertical:!0,children:u.map(s)})}},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),f=n(36036),b=n(98595),S=n(25328),B=function(l,c,m,i){return l.requirements===null?!0:!(l.requirements.metal*i>c||l.requirements.glass*i>m)},k=r.Autolathe=function(){function g(l,c){var m=(0,o.useBackend)(c),i=m.act,u=m.data,s=u.total_amount,d=u.max_amount,v=u.metal_amount,C=u.glass_amount,h=u.busyname,p=u.busyamt,N=u.showhacked,V=u.buildQueue,y=u.buildQueueLen,I=u.recipes,L=u.categories,w=(0,o.useSharedState)(c,"category",0),A=w[0],x=w[1];A===0&&(A="Tools");var E=v.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,"),P=C.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,"),D=s.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,"),M=(0,o.useSharedState)(c,"search_text",""),R=M[0],O=M[1],F=(0,S.createSearch)(R,function($){return $.name}),_="";y>0&&(_=V.map(function($,G){return(0,e.createComponentVNode)(2,f.Box,{children:(0,e.createComponentVNode)(2,f.Button,{fluid:!0,icon:"times",color:"transparent",content:V[G][0],onClick:function(){function X(){return i("remove_from_queue",{remove_from_queue:V.indexOf($)+1})}return X}()},$)},G)}));var U=(0,a.flow)([(0,t.filter)(function($){return($.category.indexOf(A)>-1||R)&&(u.showhacked||!$.hacked)}),R&&(0,t.filter)(F),(0,t.sortBy)(function($){return $.name.toLowerCase()})])(I),z="Build";return R?z="Results for: '"+R+"':":A&&(z="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,f.Stack,{fill:!0,horizontal:!0,children:[(0,e.createComponentVNode)(2,f.Stack.Item,{width:"70%",children:(0,e.createComponentVNode)(2,f.Section,{fill:!0,scrollable:!0,title:z,buttons:(0,e.createComponentVNode)(2,f.Dropdown,{width:"150px",options:L,selected:A,onSelected:function(){function $(G){return x(G)}return $}()}),children:[(0,e.createComponentVNode)(2,f.Input,{fluid:!0,placeholder:"Search for...",onInput:function(){function $(G,X){return O(X)}return $}(),mb:1}),U.map(function($){return(0,e.createComponentVNode)(2,f.Stack.Item,{grow:!0,children:[(0,e.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+$.image,style:{"vertical-align":"middle",width:"32px",margin:"0px","margin-left":"0px"}}),(0,e.createComponentVNode)(2,f.Button,{mr:1,icon:"hammer",selected:u.busyname===$.name&&u.busyamt===1,disabled:!B($,u.metal_amount,u.glass_amount,1),onClick:function(){function G(){return i("make",{make:$.uid,multiplier:1})}return G}(),children:(0,S.toTitleCase)($.name)}),$.max_multiplier>=10&&(0,e.createComponentVNode)(2,f.Button,{mr:1,icon:"hammer",selected:u.busyname===$.name&&u.busyamt===10,disabled:!B($,u.metal_amount,u.glass_amount,10),onClick:function(){function G(){return i("make",{make:$.uid,multiplier:10})}return G}(),children:"10x"}),$.max_multiplier>=25&&(0,e.createComponentVNode)(2,f.Button,{mr:1,icon:"hammer",selected:u.busyname===$.name&&u.busyamt===25,disabled:!B($,u.metal_amount,u.glass_amount,25),onClick:function(){function G(){return i("make",{make:$.uid,multiplier:25})}return G}(),children:"25x"}),$.max_multiplier>25&&(0,e.createComponentVNode)(2,f.Button,{mr:1,icon:"hammer",selected:u.busyname===$.name&&u.busyamt===$.max_multiplier,disabled:!B($,u.metal_amount,u.glass_amount,$.max_multiplier),onClick:function(){function G(){return i("make",{make:$.uid,multiplier:$.max_multiplier})}return G}(),children:[$.max_multiplier,"x"]}),$.requirements&&Object.keys($.requirements).map(function(G){return(0,S.toTitleCase)(G)+": "+$.requirements[G]}).join(", ")||(0,e.createComponentVNode)(2,f.Box,{children:"No resources required."})]},$.ref)})]})}),(0,e.createComponentVNode)(2,f.Stack.Item,{width:"30%",children:[(0,e.createComponentVNode)(2,f.Section,{title:"Materials",children:(0,e.createComponentVNode)(2,f.LabeledList,{children:[(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Metal",children:E}),(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Glass",children:P}),(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Total",children:D}),(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Storage",children:[u.fill_percent,"% Full"]})]})}),(0,e.createComponentVNode)(2,f.Section,{title:"Building",children:(0,e.createComponentVNode)(2,f.Box,{color:h?"green":"",children:h||"Nothing"})}),(0,e.createComponentVNode)(2,f.Section,{title:"Build Queue",height:23.7,children:[_,(0,e.createComponentVNode)(2,f.Button,{mt:.5,fluid:!0,icon:"times",content:"Clear All",color:"red",disabled:!u.buildQueueLen,onClick:function(){function $(){return i("clear_queue")}return $}()})]})]})]})})})}return g}()},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),f=r.BioChipPad=function(){function b(S,B){var k=(0,a.useBackend)(B),g=k.act,l=k.data,c=l.implant,m=l.contains_case,i=l.gps,u=l.tag,s=(0,a.useLocalState)(B,"newTag",u),d=s[0],v=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:!m,onClick:function(){function C(){return g("eject_case")}return C}()})}),children:c&&m?(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}),!!i&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Tag",children:[(0,e.createComponentVNode)(2,t.Input,{width:"5.5rem",value:u,onEnter:function(){function C(){return g("tag",{newtag:d})}return C}(),onInput:function(){function C(h,p){return v(p)}return C}()}),(0,e.createComponentVNode)(2,t.Button,{disabled:u===d,width:"20px",mb:"0",ml:"0.25rem",onClick:function(){function C(){return g("tag",{newtag:d})}return C}(),children:(0,e.createComponentVNode)(2,t.Icon,{name:"pen"})})]})]})],4):m?(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),f=n(62411),b=r.Biogenerator=function(){function l(c,m){var i=(0,a.useBackend)(m),u=i.data,s=i.config,d=u.container,v=u.processing,C=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,f.Operating,{operating:v,name:C}),(0,e.createComponentVNode)(2,B),(0,e.createComponentVNode)(2,k),d?(0,e.createComponentVNode)(2,g):(0,e.createComponentVNode)(2,S)]})})})}return l}(),S=function(c,m){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,m){var i=(0,a.useBackend)(m),u=i.act,s=i.data,d=s.biomass,v=s.container,C=s.container_curr_reagents,h=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:d}),(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:"}),v?(0,e.createComponentVNode)(2,t.ProgressBar,{value:C,maxValue:h,children:(0,e.createComponentVNode)(2,t.Box,{textAlign:"center",children:C+" / "+h+" units"})}):(0,e.createComponentVNode)(2,t.Stack.Item,{children:"None"})]})]})},k=function(c,m){var i=(0,a.useBackend)(m),u=i.act,s=i.data,d=s.has_plants,v=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:!d,tooltip:d?"":"There are no plants in the biogenerator.",tooltipPosition:"top-start",content:"Activate",onClick:function(){function C(){return u("activate")}return C}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{width:"40%",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"flask",disabled:!v,tooltip:v?"":"The biogenerator does not have a container.",tooltipPosition:"top",content:"Detach Container",onClick:function(){function C(){return u("detach_container")}return C}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{width:"30%",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"eject",disabled:!d,tooltip:d?"":"There are no stored plants to eject.",tooltipPosition:"top-end",content:"Eject Plants",onClick:function(){function C(){return u("eject_plants")}return C}()})})]})})},g=function(c,m){var i=(0,a.useBackend)(m),u=i.act,s=i.data,d=s.biomass,v=s.product_list,C=(0,a.useSharedState)(m,"vendAmount",1),h=C[0],p=C[1],N=Object.entries(v).map(function(V,y){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*h,(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:d.25?750+400*Math.random():290+150*Math.random(),time:60+150*Math.random(),children:(0,e.createComponentVNode)(2,t.Stack,{mb:"30px",fontsize:"256px",children:(0,e.createComponentVNode)(2,t.Stack.Item,{bold:!0,color:"red",fontsize:"256px",textAlign:"center",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"skull",size:14,mb:"64px"}),(0,e.createVNode)(1,"br"),"E$#OR:& U#KN!WN IN%ERF#R_NCE"]})})})})}return k}(),S=r.BluespaceTap=function(){function k(g,l){var c=(0,a.useBackend)(l),m=c.act,i=c.data,u=i.product||[],s=i.desiredMiningPower,d=i.miningPower,v=i.points,C=i.totalPoints,h=i.powerUse,p=i.availablePower,N=i.emagged,V=i.autoShutown,y=i.stabilizers,I=i.stabilizerPower,L=i.stabilizerPriority,w=s>d&&"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,b),(0,e.createComponentVNode)(2,B),(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:V&&!N?"toggle-on":"toggle-off",content:"Auto shutdown",color:V&&!N?"green":"red",disabled:!!N,tooltip:"Turn auto shutdown on or off",tooltipPosition:"top",onClick:function(){function A(){return m("auto_shutdown")}return A}()}),(0,e.createComponentVNode)(2,t.Button,{icon:y&&!N?"toggle-on":"toggle-off",content:"Stabilizers",color:y&&!N?"green":"red",disabled:!!N,tooltip:"Turn stabilizers on or off",tooltipPosition:"top",onClick:function(){function A(){return m("stabilizers")}return A}()}),(0,e.createComponentVNode)(2,t.Button,{icon:L&&!N?"toggle-on":"toggle-off",content:"Stabilizer priority",color:L&&!N?"green":"red",disabled:!!N,tooltip:"On: Mining power will not exceed what can be stabilized",tooltipPosition:"top",onClick:function(){function A(){return m("stabilizer_priority")}return A}()}),(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Desired Mining Power",children:(0,f.formatPower)(s)}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{labelStyle:{"vertical-align":"top"},label:"Set Desired Mining Power",children:(0,e.createComponentVNode)(2,t.Stack,{width:"100%",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Button,{icon:"step-backward",disabled:s===0||N,tooltip:"Set to 0",tooltipPosition:"bottom",onClick:function(){function A(){return m("set",{set_power:0})}return A}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"fast-backward",tooltip:"Decrease by 10 MW",tooltipPosition:"bottom",disabled:s===0||N,onClick:function(){function A(){return m("set",{set_power:s-1e7})}return A}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"backward",disabled:s===0||N,tooltip:"Decrease by 1 MW",tooltipPosition:"bottom",onClick:function(){function A(){return m("set",{set_power:s-1e6})}return A}()})]}),(0,e.createComponentVNode)(2,t.Stack.Item,{mx:1,children:(0,e.createComponentVNode)(2,t.NumberInput,{disabled:N,minvalue:0,value:s,maxvalue:1/0,step:1,onChange:function(){function A(x,E){return m("set",{set_power:E})}return A}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Button,{icon:"forward",disabled:N,tooltip:"Increase by one MW",tooltipPosition:"bottom",onClick:function(){function A(){return m("set",{set_power:s+1e6})}return A}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"fast-forward",disabled:N,tooltip:"Increase by 10MW",tooltipPosition:"bottom",onClick:function(){function A(){return m("set",{set_power:s+1e7})}return A}()})]})]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Total Power Use",children:(0,f.formatPower)(h)}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Mining Power Use",children:(0,f.formatPower)(d)}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Stabilizer Power Use",children:(0,f.formatPower)(I)}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Surplus Power",children:(0,f.formatPower)(p)})]})]})}),(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:v}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Total Points",children:C})]})})}),(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>=v,onClick:function(){function x(){return m("vend",{target:A.key})}return x}(),content:A.price})},A.key)})})})})]})})]})})})}return k}(),B=r.Alerts=function(){function k(g,l){var c=(0,a.useBackend)(l),m=c.act,i=c.data,u=i.product||[],s=i.miningPower,d=i.stabilizerPower,v=i.emagged,C=i.safeLevels,h=i.autoShutown,p=i.stabilizers,N=i.overhead;return(0,e.createFragment)([!h&&!v&&(0,e.createComponentVNode)(2,t.NoticeBox,{danger:1,children:"Auto shutdown disabled"}),v?(0,e.createComponentVNode)(2,t.NoticeBox,{danger:1,children:"All safeties disabled"}):s<=15e6?"":p?s>d+15e6?(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 k}()},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),f=n(36036),b=n(98595),S=[["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"]],g={average:[.25,.5],bad:[.5,1/0]},l=function(y,I){for(var L=[],w=0;w0?y.filter(function(I){return!!I}).reduce(function(I,L){return(0,e.createFragment)([I,(0,e.createComponentVNode)(2,f.Box,{children:L},L)],0)},null):null},m=function(y){if(y>100){if(y<300)return"mild infection";if(y<400)return"mild infection+";if(y<500)return"mild infection++";if(y<700)return"acute infection";if(y<800)return"acute infection+";if(y<900)return"acute infection++";if(y>=900)return"septic"}return""},i=r.BodyScanner=function(){function V(y,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,u,{occupant:E}):(0,e.createComponentVNode)(2,N);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}(),u=function(y){var I=y.occupant;return(0,e.createComponentVNode)(2,f.Box,{children:[(0,e.createComponentVNode)(2,s,{occupant:I}),(0,e.createComponentVNode)(2,d,{occupant:I}),(0,e.createComponentVNode)(2,v,{occupant:I}),(0,e.createComponentVNode)(2,h,{organs:I.extOrgan}),(0,e.createComponentVNode)(2,p,{organs:I.intOrgan})]})},s=function(y,I){var L=(0,o.useBackend)(I),w=L.act,A=L.data,x=A.occupant;return(0,e.createComponentVNode)(2,f.Section,{title:"Occupant",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,f.Button,{icon:"print",onClick:function(){function E(){return w("print_p")}return E}(),children:"Print Report"}),(0,e.createComponentVNode)(2,f.Button,{icon:"user-slash",onClick:function(){function E(){return w("ejectify")}return E}(),children:"Eject"})],4),children:(0,e.createComponentVNode)(2,f.LabeledList,{children:[(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Name",children:x.name}),(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Health",children:(0,e.createComponentVNode)(2,f.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,f.LabeledList.Item,{label:"Status",color:S[x.stat][0],children:S[x.stat][1]}),(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Temperature",children:[(0,e.createComponentVNode)(2,f.AnimatedNumber,{value:(0,a.round)(x.bodyTempC)}),"\xB0C,\xA0",(0,e.createComponentVNode)(2,f.AnimatedNumber,{value:(0,a.round)(x.bodyTempF)}),"\xB0F"]}),(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Implants",children:x.implant_len?(0,e.createComponentVNode)(2,f.Box,{children:x.implant.map(function(E){return E.name}).join(", ")}):(0,e.createComponentVNode)(2,f.Box,{color:"label",children:"None"})})]})})},d=function(y){var I=y.occupant;return I.hasBorer||I.blind||I.colourblind||I.nearsighted||I.hasVirus?(0,e.createComponentVNode)(2,f.Section,{title:"Abnormalities",children:B.map(function(L,w){if(I[L[0]])return(0,e.createComponentVNode)(2,f.Box,{color:L[1],bold:L[1]==="bad",children:L[2]},L[2])})}):(0,e.createComponentVNode)(2,f.Section,{title:"Abnormalities",children:(0,e.createComponentVNode)(2,f.Box,{color:"label",children:"No abnormalities found."})})},v=function(y){var I=y.occupant;return(0,e.createComponentVNode)(2,f.Section,{title:"Damage",children:(0,e.createComponentVNode)(2,f.Table,{children:l(k,function(L,w,A){return(0,e.createFragment)([(0,e.createComponentVNode)(2,f.Table.Row,{color:"label",children:[(0,e.createComponentVNode)(2,f.Table.Cell,{children:[L[0],":"]}),(0,e.createComponentVNode)(2,f.Table.Cell,{children:!!w&&w[0]+":"})]}),(0,e.createComponentVNode)(2,f.Table.Row,{children:[(0,e.createComponentVNode)(2,f.Table.Cell,{children:(0,e.createComponentVNode)(2,C,{value:I[L[1]],marginBottom:A100)&&"average"||!!I.status.robotic&&"label",width:"33%",children:(0,t.capitalize)(I.name)}),(0,e.createComponentVNode)(2,f.Table.Cell,{textAlign:"center",children:(0,e.createComponentVNode)(2,f.ProgressBar,{m:-.5,min:"0",max:I.maxHealth,mt:L>0&&"0.5rem",value:I.totalLoss/I.maxHealth,ranges:g,children:(0,e.createComponentVNode)(2,f.Stack,{children:[(0,e.createComponentVNode)(2,f.Tooltip,{content:"Total damage",children:(0,e.createComponentVNode)(2,f.Stack.Item,{children:[(0,e.createComponentVNode)(2,f.Icon,{name:"heartbeat",mr:.5}),(0,a.round)(I.totalLoss)]})}),!!I.bruteLoss&&(0,e.createComponentVNode)(2,f.Tooltip,{content:"Brute damage",children:(0,e.createComponentVNode)(2,f.Stack.Item,{grow:!0,children:[(0,e.createComponentVNode)(2,f.Icon,{name:"bone",mr:.5}),(0,a.round)(I.bruteLoss)]})}),!!I.fireLoss&&(0,e.createComponentVNode)(2,f.Tooltip,{content:"Burn damage",children:(0,e.createComponentVNode)(2,f.Stack.Item,{children:[(0,e.createComponentVNode)(2,f.Icon,{name:"fire",mr:.5}),(0,a.round)(I.fireLoss)]})})]})})}),(0,e.createComponentVNode)(2,f.Table.Cell,{textAlign:"right",verticalAlign:"top",width:"33%",pt:L>0&&"calc(0.5rem + 2px)",children:[(0,e.createComponentVNode)(2,f.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,m(I.germ_level),!!I.open&&"Open incision"])}),(0,e.createComponentVNode)(2,f.Box,{inline:!0,children:[c([!!I.status.splinted&&(0,e.createComponentVNode)(2,f.Box,{color:"good",children:"Splinted"}),!!I.status.robotic&&(0,e.createComponentVNode)(2,f.Box,{color:"label",children:"Robotic"}),!!I.status.dead&&(0,e.createComponentVNode)(2,f.Box,{color:"bad",bold:!0,children:"DEAD"})]),c(I.shrapnel.map(function(w){return w.known?w.name:"Unknown object"}))]})]})]},L)})]})})},p=function(y){return y.organs.length===0?(0,e.createComponentVNode)(2,f.Section,{title:"Internal Organs",children:(0,e.createComponentVNode)(2,f.Box,{color:"label",children:"N/A"})}):(0,e.createComponentVNode)(2,f.Section,{title:"Internal Organs",children:(0,e.createComponentVNode)(2,f.Table,{children:[(0,e.createComponentVNode)(2,f.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,f.Table.Cell,{children:"Name"}),(0,e.createComponentVNode)(2,f.Table.Cell,{textAlign:"center",children:"Damage"}),(0,e.createComponentVNode)(2,f.Table.Cell,{textAlign:"right",children:"Injuries"})]}),y.organs.map(function(I,L){return(0,e.createComponentVNode)(2,f.Table.Row,{children:[(0,e.createComponentVNode)(2,f.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,f.Table.Cell,{textAlign:"center",children:(0,e.createComponentVNode)(2,f.ProgressBar,{min:"0",max:I.maxHealth,value:I.damage/I.maxHealth,mt:L>0&&"0.5rem",ranges:g,children:(0,a.round)(I.damage)})}),(0,e.createComponentVNode)(2,f.Table.Cell,{textAlign:"right",verticalAlign:"top",width:"33%",pt:L>0&&"calc(0.5rem + 2px)",children:[(0,e.createComponentVNode)(2,f.Box,{color:"average",inline:!0,children:c([m(I.germ_level)])}),(0,e.createComponentVNode)(2,f.Box,{inline:!0,children:c([I.robotic===1&&(0,e.createComponentVNode)(2,f.Box,{color:"label",children:"Robotic"}),I.robotic===2&&(0,e.createComponentVNode)(2,f.Box,{color:"label",children:"Assisted"}),!!I.dead&&(0,e.createComponentVNode)(2,f.Box,{color:"bad",bold:!0,children:"DEAD"})])})]})]},L)})]})})},N=function(){return(0,e.createComponentVNode)(2,f.Section,{fill:!0,children:(0,e.createComponentVNode)(2,f.Stack,{fill:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,f.Stack.Item,{grow:!0,align:"center",color:"label",children:[(0,e.createComponentVNode)(2,f.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),f=n(3939),b=n(39473),S=r.BookBinder=function(){function B(k,g){var l=(0,a.useBackend)(g),c=l.act,m=l.data,i=m.selectedbook,u=m.book_categories,s=[];return u.map(function(d){return s[d.description]=d.category_id}),(0,e.createComponentVNode)(2,o.Window,{width:600,height:400,children:[(0,e.createComponentVNode)(2,f.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 d(){return c("print_book")}return d}()}),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:i.title,onClick:function(){function d(){return(0,f.modalOpen)(g,"edit_selected_title")}return d}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Author",children:(0,e.createComponentVNode)(2,t.Button,{textAlign:"left",icon:"pen",width:"auto",content:i.author,onClick:function(){function d(){return(0,f.modalOpen)(g,"edit_selected_author")}return d}()})}),(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:u.map(function(d){return d.description}),onSelected:function(){function d(v){return c("toggle_binder_category",{category_id:s[v]})}return d}()})})}),(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 d(){return(0,f.modalOpen)(g,"edit_selected_summary")}return d}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{children:i.summary})]}),(0,e.createVNode)(1,"br"),u.filter(function(d){return i.categories.includes(d.category_id)}).map(function(d){return(0,e.createComponentVNode)(2,t.Button,{content:d.description,selected:!0,icon:"unlink",onClick:function(){function v(){return c("toggle_binder_category",{category_id:d.category_id})}return v}()},d.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),f=function(l){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"}],m=c.find(function(i){return i.modes.includes(l)});return(0,e.createComponentVNode)(2,t.Box,{color:m.color,children:[" ",m.label," "]})},b=r.BotCall=function(){function g(l,c){var m=(0,a.useBackend)(c),i=m.act,u=m.data,s=(0,a.useLocalState)(c,"tabIndex",0),d=s[0],v=s[1],C={0:"Security",1:"Medibot",2:"Cleanbot",3:"Floorbot",4:"Mule",5:"Honkbot"},h=function(){function p(N){return C[N]?(0,e.createComponentVNode)(2,S,{model:C[N]}):"This should not happen. Report on Paradise Github"}return p}();return(0,e.createComponentVNode)(2,o.Window,{width:700,height:400,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:d===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(p,N){return(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:d===N,onClick:function(){function V(){return v(N)}return V}(),children:C[N]},N)})})}),h(d)]})})})}return g}(),S=function(l,c){var m=(0,a.useBackend)(c),i=m.act,u=m.data,s=u.bots;return s[l.model]!==void 0?(0,e.createComponentVNode)(2,k,{model:[l.model]}):(0,e.createComponentVNode)(2,B,{model:[l.model]})},B=function(l,c){var m=(0,a.useBackend)(c),i=m.act,u=m.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 ",[l.model]," detected"]})})},k=function(l,c){var m=(0,a.useBackend)(c),i=m.act,u=m.data,s=u.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[l.model].map(function(d){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:d.name}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:d.model}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:d.on?f(d.status):(0,e.createComponentVNode)(2,t.Box,{color:"red",children:"Off"})}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:d.location}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Interface",onClick:function(){function v(){return i("interface",{botref:d.UID})}return v}()})}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Call",onClick:function(){function v(){return i("call",{botref:d.UID})}return v}()})})]},d.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),f=n(92963),b=r.BotClean=function(){function S(B,k){var g=(0,a.useBackend)(k),l=g.act,c=g.data,m=c.locked,i=c.noaccess,u=c.maintpanel,s=c.on,d=c.autopatrol,v=c.canhack,C=c.emagged,h=c.remote_disabled,p=c.painame,N=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,f.BotStatus),(0,e.createComponentVNode)(2,t.Section,{title:"Cleaning Settings",children:(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:N,content:"Clean Blood",disabled:i,onClick:function(){function y(){return l("blood")}return y}()})}),(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 y(){return l("area")}return y}()}),V!==null&&(0,e.createComponentVNode)(2,t.LabeledList,{mb:1,children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Locked Area",children:V})})]}),p&&(0,e.createComponentVNode)(2,t.Section,{title:"pAI",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"eject",content:p,disabled:i,onClick:function(){function y(){return l("ejectpai")}return y}()})})]})})}return S}()},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),f=n(92963),b=r.BotFloor=function(){function S(B,k){var g=(0,a.useBackend)(k),l=g.act,c=g.data,m=c.noaccess,i=c.painame,u=c.hullplating,s=c.replace,d=c.eat,v=c.make,C=c.fixfloor,h=c.nag_empty,p=c.magnet,N=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,f.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:N})}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:u,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:m,onClick:function(){function V(){return l("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:m,onClick:function(){function V(){return l("replacetiles")}return V}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:C,content:"Repair damaged tiles and platings",disabled:m,onClick:function(){function V(){return l("fixfloors")}return V}()})]}),(0,e.createComponentVNode)(2,t.Section,{title:"Miscellaneous",children:[(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:d,content:"Finds tiles",disabled:m,onClick:function(){function V(){return l("eattiles")}return V}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:v,content:"Make pieces of metal into tiles when empty",disabled:m,onClick:function(){function V(){return l("maketiles")}return V}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:h,content:"Transmit notice when empty",disabled:m,onClick:function(){function V(){return l("nagonempty")}return V}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:p,content:"Traction Magnets",disabled:m,onClick:function(){function V(){return l("anchored")}return V}()})]}),i&&(0,e.createComponentVNode)(2,t.Section,{title:"pAI",children:(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,icon:"eject",content:i,disabled:m,onClick:function(){function V(){return l("ejectpai")}return V}()})})]})})}return S}()},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),f=n(92963),b=r.BotHonk=function(){function S(B,k){var g=(0,a.useBackend)(k),l=g.act,c=g.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,f.BotStatus)})})}return S}()},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),f=n(92963),b=r.BotMed=function(){function S(B,k){var g=(0,a.useBackend)(k),l=g.act,c=g.data,m=c.locked,i=c.noaccess,u=c.maintpanel,s=c.on,d=c.autopatrol,v=c.canhack,C=c.emagged,h=c.remote_disabled,p=c.painame,N=c.shut_up,V=c.declare_crit,y=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,f.BotStatus),(0,e.createComponentVNode)(2,t.Section,{title:"Communication Settings",children:[(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,content:"Speaker",checked:!N,disabled:i,onClick:function(){function E(){return l("toggle_speaker")}return E}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,content:"Critical Patient Alerts",checked:V,disabled:i,onClick:function(){function E(){return l("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:i,onChange:function(){function E(P,D){return l("set_heal_threshold",{target:D})}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:i,onChange:function(){function E(P,D){return l("set_injection_amount",{target:D})}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:i,onClick:function(){function E(){return l("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:i,onClick:function(){function E(){return l("eject_reagent_glass")}return E}()})})]})})]}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{mt:1,fluid:!0,content:"Treat Viral Infections",checked:A,disabled:i,onClick:function(){function E(){return l("toggle_treat_viral")}return E}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,content:"Stationary Mode",checked:y,disabled:i,onClick:function(){function E(){return l("toggle_stationary_mode")}return E}()})]}),p&&(0,e.createComponentVNode)(2,t.Section,{title:"pAI",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"eject",content:p,disabled:i,onClick:function(){function E(){return l("ejectpai")}return E}()})})]})})})}return S}()},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),f=n(92963),b=r.BotSecurity=function(){function S(B,k){var g=(0,a.useBackend)(k),l=g.act,c=g.data,m=c.noaccess,i=c.painame,u=c.check_id,s=c.check_weapons,d=c.check_warrant,v=c.arrest_mode,C=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,f.BotStatus),(0,e.createComponentVNode)(2,t.Section,{title:"Who To Arrest",children:[(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:u,content:"Unidentifiable Persons",disabled:m,onClick:function(){function h(){return l("authid")}return h}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:s,content:"Unauthorized Weapons",disabled:m,onClick:function(){function h(){return l("authweapon")}return h}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:d,content:"Wanted Criminals",disabled:m,onClick:function(){function h(){return l("authwarrant")}return h}()})]}),(0,e.createComponentVNode)(2,t.Section,{title:"Arrest Procedure",children:[(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:v,content:"Detain Targets Indefinitely",disabled:m,onClick:function(){function h(){return l("arrtype")}return h}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:C,content:"Announce Arrests On Radio",disabled:m,onClick:function(){function h(){return l("arrdeclare")}return h}()})]}),i&&(0,e.createComponentVNode)(2,t.Section,{title:"pAI",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"eject",content:i,disabled:m,onClick:function(){function h(){return l("ejectpai")}return h}()})})]})})}return S}()},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),f=function(k,g){var l=k.cell,c=(0,o.useBackend)(g),m=c.act,i=l.cell_id,u=l.occupant,s=l.crimes,d=l.brigged_by,v=l.time_left_seconds,C=l.time_set_seconds,h=l.ref,p="";v>0&&(p+=" BrigCells__listRow--active");var N=function(){m("release",{ref:h})};return(0,e.createComponentVNode)(2,t.Table.Row,{className:p,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:i}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:u}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:s}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:d}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.TimeDisplay,{totalSeconds:C})}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.TimeDisplay,{totalSeconds:v})}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Button,{type:"button",onClick:N,children:"Release"})})]})},b=function(k){var g=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"})]}),g.map(function(l){return(0,e.createComponentVNode)(2,f,{cell:l},l.ref)})]})},S=r.BrigCells=function(){function B(k,g){var l=(0,o.useBackend)(g),c=l.act,m=l.data,i=m.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:i})})})})})}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),f=r.BrigTimer=function(){function b(S,B){var k=(0,a.useBackend)(B),g=k.act,l=k.data;l.nameText=l.occupant,l.timing&&(l.prisoner_hasrec?l.nameText=(0,e.createComponentVNode)(2,t.Box,{color:"green",children:l.occupant}):l.nameText=(0,e.createComponentVNode)(2,t.Box,{color:"red",children:l.occupant}));var c="pencil-alt";l.prisoner_name&&(l.prisoner_hasrec||(c="exclamation-triangle"));var m=[],i=0;for(i=0;im?this.substring(0,m)+"...":this};var k=function(i,u){var s,d;if(!u)return[];var v=i.findIndex(function(C){return C.name===u.name});return[(s=i[v-1])==null?void 0:s.name,(d=i[v+1])==null?void 0:d.name]},g=function(i,u){u===void 0&&(u="");var s=(0,f.createSearch)(u,function(d){return d.name});return(0,t.flow)([(0,a.filter)(function(d){return d==null?void 0:d.name}),u&&(0,a.filter)(s),(0,a.sortBy)(function(d){return d.name})])(i)},l=r.CameraConsole=function(){function m(i,u){var s=(0,b.useBackend)(u),d=s.act,v=s.data,C=s.config,h=v.mapRef,p=v.activeCamera,N=g(v.cameras),V=k(N,p),y=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,S.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),p&&p.name||"\u2014"],0),(0,e.createVNode)(1,"div","CameraConsole__toolbarRight",[(0,e.createComponentVNode)(2,S.Button,{icon:"chevron-left",disabled:!y,onClick:function(){function L(){return d("switch_camera",{name:y})}return L}()}),(0,e.createComponentVNode)(2,S.Button,{icon:"chevron-right",disabled:!I,onClick:function(){function L(){return d("switch_camera",{name:I})}return L}()})],4),(0,e.createComponentVNode)(2,S.ByondUi,{className:"CameraConsole__map",params:{id:h,type:"map"}})],4)]})}return m}(),c=r.CameraConsoleContent=function(){function m(i,u){var s=(0,b.useBackend)(u),d=s.act,v=s.data,C=(0,b.useLocalState)(u,"searchText",""),h=C[0],p=C[1],N=v.activeCamera,V=g(v.cameras,h);return(0,e.createComponentVNode)(2,S.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,S.Stack.Item,{children:(0,e.createComponentVNode)(2,S.Input,{fluid:!0,placeholder:"Search for a camera",onInput:function(){function y(I,L){return p(L)}return y}()})}),(0,e.createComponentVNode)(2,S.Stack.Item,{grow:!0,m:0,children:(0,e.createComponentVNode)(2,S.Section,{fill:!0,scrollable:!0,children:V.map(function(y){return(0,e.createVNode)(1,"div",(0,o.classes)(["Button","Button--fluid","Button--color--transparent",N&&y.name===N.name&&"Button--selected"]),y.name.trimLongStr(23),0,{title:y.name,onClick:function(){function I(){return d("switch_camera",{name:y.name})}return I}()},y.name)})})})]})}return m}()},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),f=n(49968),b=n(98595),S=r.Canister=function(){function B(k,g){var l=(0,t.useBackend)(g),c=l.act,m=l.data,i=m.portConnected,u=m.tankPressure,s=m.releasePressure,d=m.defaultReleasePressure,v=m.minReleasePressure,C=m.maxReleasePressure,h=m.valveOpen,p=m.name,N=m.canLabel,V=m.colorContainer,y=m.color_index,I=m.hasHoldingTank,L=m.holdingTank,w="";y.prim&&(w=V.prim.options[y.prim].name);var A="";y.sec&&(A=V.sec.options[y.sec].name);var x="";y.ter&&(x=V.ter.options[y.ter].name);var E="";y.quart&&(E=V.quart.options[y.quart].name);var P=[],D=[],M=[],R=[],O=0;for(O=0;Op.current_positions&&(0,e.createComponentVNode)(2,t.Box,{color:"green",children:p.total_positions-p.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:d.cooldown_time||!p.can_close,onClick:function(){function N(){return s("make_job_unavailable",{job:p.title})}return N}()})}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{content:"+",disabled:d.cooldown_time||!p.can_open,onClick:function(){function N(){return s("make_job_available",{job:p.title})}return N}()})}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:d.target_dept&&(0,e.createComponentVNode)(2,t.Box,{color:"green",children:d.priority_jobs.indexOf(p.title)>-1?"Yes":""})||(0,e.createComponentVNode)(2,t.Button,{content:p.is_priority?"Yes":"No",selected:p.is_priority,disabled:d.cooldown_time||!p.can_prioritize,onClick:function(){function N(){return s("prioritize_job",{job:p.title})}return N}()})})]},p.title)})]})})]}):h=(0,e.createComponentVNode)(2,B);break;case 2:!d.authenticated||!d.scan_name?h=(0,e.createComponentVNode)(2,B):d.modify_name?h=(0,e.createComponentVNode)(2,f.AccessList,{accesses:d.regions,selectedList:d.selectedAccess,accessMod:function(){function p(N){return s("set",{access:N})}return p}(),grantAll:function(){function p(){return s("grant_all")}return p}(),denyAll:function(){function p(){return s("clear_all")}return p}(),grantDep:function(){function p(N){return s("grant_region",{region:N})}return p}(),denyDep:function(){function p(N){return s("deny_region",{region:N})}return p}()}):h=(0,e.createComponentVNode)(2,k);break;case 3:d.authenticated?d.records.length?h=(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:!d.authenticated||d.records.length===0||d.target_dept,onClick:function(){function p(){return s("wipe_all_logs")}return p}()}),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"}),!!d.iscentcom&&(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Deleted By"})]}),d.records.map(function(p){return(0,e.createComponentVNode)(2,t.Table.Row,{height:2,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:p.transferee}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:p.oldvalue}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:p.newvalue}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:p.whodidit}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:p.timestamp}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:p.reason}),!!d.iscentcom&&(0,e.createComponentVNode)(2,t.Table.Cell,{children:p.deletedby})]},p.timestamp)})]}),!!d.iscentcom&&(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{icon:"pencil-alt",content:"Delete MY Records",color:"purple",disabled:!d.authenticated||d.records.length===0,onClick:function(){function p(){return s("wipe_my_logs")}return p}()})})]}):h=(0,e.createComponentVNode)(2,g):h=(0,e.createComponentVNode)(2,B);break;case 4:!d.authenticated||!d.scan_name?h=(0,e.createComponentVNode)(2,B):h=(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"})]}),d.people_dept.map(function(p){return(0,e.createComponentVNode)(2,t.Table.Row,{height:2,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:p.name}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:p.title}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:p.crimstat}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Button,{content:p.buttontext,disabled:!p.demotable,onClick:function(){function N(){return s("remote_demote",{remote_demote:p.name})}return N}()})})]},p.title)})]})});break;default:h=(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:C}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:v}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:h})]})})})}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),f=n(36036),b=n(98595),S=n(25328),B=r.CargoConsole=function(){function u(s,d){return(0,e.createComponentVNode)(2,b.Window,{width:900,height:800,children:(0,e.createComponentVNode)(2,b.Window.Content,{children:(0,e.createComponentVNode)(2,f.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,k),(0,e.createComponentVNode)(2,g),(0,e.createComponentVNode)(2,l),(0,e.createComponentVNode)(2,c),(0,e.createComponentVNode)(2,i)]})})})}return u}(),k=function(s,d){var v=(0,o.useLocalState)(d,"contentsModal",null),C=v[0],h=v[1],p=(0,o.useLocalState)(d,"contentsModalTitle",null),N=p[0],V=p[1];if(C!==null&&N!==null)return(0,e.createComponentVNode)(2,f.Modal,{maxWidth:"75%",width:window.innerWidth+"px",maxHeight:window.innerHeight*.75+"px",mx:"auto",children:[(0,e.createComponentVNode)(2,f.Box,{width:"100%",bold:!0,children:(0,e.createVNode)(1,"h1",null,[N,(0,e.createTextVNode)(" contents:")],0)}),(0,e.createComponentVNode)(2,f.Box,{children:C.map(function(y){return(0,e.createComponentVNode)(2,f.Box,{children:["- ",y]},y)})}),(0,e.createComponentVNode)(2,f.Box,{m:2,children:(0,e.createComponentVNode)(2,f.Button,{content:"Close",onClick:function(){function y(){h(null),V(null)}return y}()})})]})},g=function(s,d){var v=(0,o.useBackend)(d),C=v.act,h=v.data,p=h.is_public,N=h.timeleft,V=h.moving,y=h.at_station,I,L;return!V&&!y?(I="Docked off-station",L="Call Shuttle"):!V&&y?(I="Docked at the station",L="Return Shuttle"):V&&(L="In Transit...",N!==1?I="Shuttle is en route (ETA: "+N+" minutes)":I="Shuttle is en route (ETA: "+N+" minute)"),(0,e.createComponentVNode)(2,f.Stack.Item,{children:(0,e.createComponentVNode)(2,f.Section,{title:"Status",children:(0,e.createComponentVNode)(2,f.LabeledList,{children:[(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Shuttle Status",children:I}),p===0&&(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Controls",children:[(0,e.createComponentVNode)(2,f.Button,{content:L,disabled:V,onClick:function(){function w(){return C("moveShuttle")}return w}()}),(0,e.createComponentVNode)(2,f.Button,{content:"View Central Command Messages",onClick:function(){function w(){return C("showMessages")}return w}()})]})]})})})},l=function(s,d){var v,C=(0,o.useBackend)(d),h=C.act,p=C.data,N=p.accounts,V=(0,o.useLocalState)(d,"selectedAccount"),y=V[0],I=V[1],L=[];return N.map(function(w){return L[w.name]=w.account_UID}),(0,e.createComponentVNode)(2,f.Stack.Item,{children:(0,e.createComponentVNode)(2,f.Section,{title:"Payment",children:[(0,e.createComponentVNode)(2,f.Dropdown,{width:"190px",options:N.map(function(w){return w.name}),selected:(v=N.filter(function(w){return w.account_UID===y})[0])==null?void 0:v.name,onSelected:function(){function w(A){return I(L[A])}return w}()}),N.filter(function(w){return w.account_UID===y}).map(function(w){return(0,e.createComponentVNode)(2,f.LabeledList,{children:[(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Account Name",children:(0,e.createComponentVNode)(2,f.Stack.Item,{mt:1,children:w.name})}),(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Balance",children:(0,e.createComponentVNode)(2,f.Stack.Item,{children:w.balance})})]},w.account_UID)})]})})},c=function(s,d){var v=(0,o.useBackend)(d),C=v.act,h=v.data,p=h.requests,N=h.categories,V=h.supply_packs,y=(0,o.useSharedState)(d,"category","Emergency"),I=y[0],L=y[1],w=(0,o.useSharedState)(d,"search_text",""),A=w[0],x=w[1],E=(0,o.useLocalState)(d,"contentsModal",null),P=E[0],D=E[1],M=(0,o.useLocalState)(d,"contentsModalTitle",null),R=M[0],O=M[1],F=(0,S.createSearch)(A,function(X){return X.name}),_=(0,o.useLocalState)(d,"selectedAccount"),U=_[0],z=_[1],$=(0,a.flow)([(0,t.filter)(function(X){return X.cat===N.filter(function(J){return J.name===I})[0].category||A}),A&&(0,t.filter)(F),(0,t.sortBy)(function(X){return X.name.toLowerCase()})])(V),G="Crate Catalogue";return A?G="Results for '"+A+"':":I&&(G="Browsing "+I),(0,e.createComponentVNode)(2,f.Stack.Item,{children:(0,e.createComponentVNode)(2,f.Section,{title:G,buttons:(0,e.createComponentVNode)(2,f.Dropdown,{width:"190px",options:N.map(function(X){return X.name}),selected:I,onSelected:function(){function X(J){return L(J)}return X}()}),children:[(0,e.createComponentVNode)(2,f.Input,{fluid:!0,placeholder:"Search for...",onInput:function(){function X(J,se){return x(se)}return X}(),mb:1}),(0,e.createComponentVNode)(2,f.Box,{maxHeight:25,overflowY:"auto",overflowX:"hidden",children:(0,e.createComponentVNode)(2,f.Table,{m:"0.5rem",children:$.map(function(X){return(0,e.createComponentVNode)(2,f.Table.Row,{children:[(0,e.createComponentVNode)(2,f.Table.Cell,{bold:!0,children:[X.name," (",X.cost," Credits)"]}),(0,e.createComponentVNode)(2,f.Table.Cell,{textAlign:"right",pr:1,children:[(0,e.createComponentVNode)(2,f.Button,{content:"Order 1",icon:"shopping-cart",disabled:!U,onClick:function(){function J(){return C("order",{crate:X.ref,multiple:!1,account:U})}return J}()}),(0,e.createComponentVNode)(2,f.Button,{content:"Order Multiple",icon:"cart-plus",disabled:!U||X.singleton,onClick:function(){function J(){return C("order",{crate:X.ref,multiple:!0,account:U})}return J}()}),(0,e.createComponentVNode)(2,f.Button,{content:"View Contents",icon:"search",onClick:function(){function J(){D(X.contents),O(X.name)}return J}()})]})]},X.name)})})})]})})},m=function(s,d){var v=s.request,C,h;switch(v.department){case"Engineering":h="CE",C="orange";break;case"Medical":h="CMO",C="teal";break;case"Science":h="RD",C="purple";break;case"Supply":h="CT",C="brown";break;case"Service":h="HOP",C="olive";break;case"Security":h="HOS",C="red";break;case"Command":h="CAP",C="blue";break;case"Assistant":h="Any Head",C="grey";break}return(0,e.createComponentVNode)(2,f.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,f.Stack.Item,{mt:.5,children:"Approval Required:"}),!!v.req_cargo_approval&&(0,e.createComponentVNode)(2,f.Stack.Item,{children:(0,e.createComponentVNode)(2,f.Button,{color:"brown",content:"QM",icon:"user-tie",tooltip:"This Order requires approval from the QM still"})}),!!v.req_head_approval&&(0,e.createComponentVNode)(2,f.Stack.Item,{children:(0,e.createComponentVNode)(2,f.Button,{color:C,content:h,disabled:v.req_cargo_approval,icon:"user-tie",tooltip:v.req_cargo_approval?"This Order first requires approval from the QM before the "+h+" can approve it":"This Order requires approval from the "+h+" still"})})]})},i=function(s,d){var v=(0,o.useBackend)(d),C=v.act,h=v.data,p=h.requests,N=h.orders,V=h.shipments;return(0,e.createComponentVNode)(2,f.Section,{fill:!0,scrollable:!0,title:"Orders",children:[(0,e.createComponentVNode)(2,f.Box,{bold:!0,children:"Requests"}),(0,e.createComponentVNode)(2,f.Table,{children:p.map(function(y){return(0,e.createComponentVNode)(2,f.Table.Row,{className:"Cargo_RequestList",children:[(0,e.createComponentVNode)(2,f.Table.Cell,{mb:1,children:[(0,e.createComponentVNode)(2,f.Box,{children:["Order #",y.ordernum,": ",y.supply_type," (",y.cost," credits) for ",(0,e.createVNode)(1,"b",null,y.orderedby,0)," with"," ",y.department?"The "+y.department+" Department":"Their Personal"," Account"]}),(0,e.createComponentVNode)(2,f.Box,{italic:!0,children:["Reason: ",y.comment]}),(0,e.createComponentVNode)(2,m,{request:y})]}),(0,e.createComponentVNode)(2,f.Stack.Item,{textAlign:"right",children:[(0,e.createComponentVNode)(2,f.Button,{content:"Approve",color:"green",disabled:!y.can_approve,onClick:function(){function I(){return C("approve",{ordernum:y.ordernum})}return I}()}),(0,e.createComponentVNode)(2,f.Button,{content:"Deny",color:"red",disabled:!y.can_deny,onClick:function(){function I(){return C("deny",{ordernum:y.ordernum})}return I}()})]})]},y.ordernum)})}),(0,e.createComponentVNode)(2,f.Box,{bold:!0,children:"Orders Awaiting Delivery"}),(0,e.createComponentVNode)(2,f.Table,{m:"0.5rem",children:N.map(function(y){return(0,e.createComponentVNode)(2,f.Table.Row,{children:(0,e.createComponentVNode)(2,f.Table.Cell,{children:[(0,e.createComponentVNode)(2,f.Box,{children:["- #",y.ordernum,": ",y.supply_type," for ",(0,e.createVNode)(1,"b",null,y.orderedby,0)]}),(0,e.createComponentVNode)(2,f.Box,{italic:!0,children:["Reason: ",y.comment]})]})},y.ordernum)})}),(0,e.createComponentVNode)(2,f.Box,{bold:!0,children:"Order in Transit"}),(0,e.createComponentVNode)(2,f.Table,{m:"0.5rem",children:V.map(function(y){return(0,e.createComponentVNode)(2,f.Table.Row,{children:(0,e.createComponentVNode)(2,f.Table.Cell,{children:[(0,e.createComponentVNode)(2,f.Box,{children:["- #",y.ordernum,": ",y.supply_type," for ",(0,e.createVNode)(1,"b",null,y.orderedby,0)]}),(0,e.createComponentVNode)(2,f.Box,{italic:!0,children:["Reason: ",y.comment]})]})},y.ordernum)})})]})}},36232:function(T,r,n){"use strict";r.__esModule=!0,r.ChameleonAppearances=r.Chameleon=void 0;var e=n(89005),a=n(25328),t=n(64795),o=n(88510),f=n(72253),b=n(36036),S=n(98595),B=r.Chameleon=function(){function l(c,m){return(0,e.createComponentVNode)(2,S.Window,{width:431,height:500,theme:"syndicate",children:(0,e.createComponentVNode)(2,S.Window.Content,{children:(0,e.createComponentVNode)(2,g)})})}return l}(),k=function(c,m){m===void 0&&(m="");var i=(0,a.createSearch)(m,function(u){return u.name});return(0,t.flow)([(0,o.filter)(function(u){return u==null?void 0:u.name}),m&&(0,o.filter)(i)])(c)},g=r.ChameleonAppearances=function(){function l(c,m){var i=(0,f.useBackend)(m),u=i.act,s=i.data,d=(0,f.useLocalState)(m,"searchText",""),v=d[0],C=d[1],h=k(s.chameleon_skins,v),p=s.selected_appearance;return(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 an appearance",onInput:function(){function N(V,y){return C(y)}return N}()})}),(0,e.createComponentVNode)(2,b.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,b.Section,{fill:!0,scrollable:!0,title:"Item Appearance",children:h.map(function(N){var V=N.name+"_"+N.icon_state;return(0,e.createComponentVNode)(2,b.ImageButton,{dmIcon:N.icon,dmIconState:N.icon_state,imageSize:64,m:.5,compact:!0,selected:V===p,tooltip:N.name,style:{opacity:V===p&&"1"||"0.5"},onClick:function(){function y(){u("change_appearance",{new_appearance:V})}return y}()},V)})})})]})}return l}()},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),f=r.ChangelogView=function(){function b(S,B){var k=(0,a.useBackend)(B),g=k.act,l=k.data,c=(0,a.useLocalState)(B,"onlyRecent",0),m=c[0],i=c[1],u=l.cl_data,s=l.last_cl,d={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"})},v=function(){function C(h){return h in d?d[h]:(0,e.createComponentVNode)(2,t.Icon,{name:"plus",color:"green"})}return C}();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:m?"Showing all changes":"Showing changes since last connection",onClick:function(){function C(){return i(!m)}return C}()}),children:u.map(function(C){return!m&&C.merge_ts<=s||(0,e.createComponentVNode)(2,t.Section,{mb:2,title:C.author+" - Merged on "+C.merge_date,buttons:(0,e.createComponentVNode)(2,t.Button,{content:"#"+C.num,onClick:function(){function h(){return g("open_pr",{pr_number:C.num})}return h}()}),children:C.entries.map(function(h){return(0,e.createComponentVNode)(2,t.Box,{m:1,children:[v(h.etype)," ",h.etext]},h)})},C)})})})})}return b}()},91360:function(T,r,n){"use strict";r.__esModule=!0,r.CheckboxListInputModal=void 0;var e=n(89005),a=n(51057),t=n(19203),o=n(36036),f=n(72253),b=n(98595),S=r.CheckboxListInputModal=function(){function k(g,l){var c=(0,f.useBackend)(l),m=c.act,i=c.data,u=i.items,s=u===void 0?[]:u,d=i.message,v=d===void 0?"":d,C=i.init_value,h=i.timeout,p=i.title,N=(0,f.useLocalState)(l,"edittedItems",s),V=N[0],y=N[1],I=330+Math.ceil(v.length/3),L=function(){function w(A){A===void 0&&(A=null);var x=[].concat(V);x=x.map(function(E){return E.key===A.key?Object.assign({},E,{checked:!A.checked}):E}),y(x)}return w}();return(0,e.createComponentVNode)(2,b.Window,{title:p,width:325,height:I,children:[h&&(0,e.createComponentVNode)(2,a.Loader,{value:h}),(0,e.createComponentVNode)(2,b.Window.Content,{children:(0,e.createComponentVNode)(2,o.Section,{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,B,{filteredItems:V,onClick:L})}),(0,e.createComponentVNode)(2,o.Stack.Item,{mt:.5,children:(0,e.createComponentVNode)(2,t.InputButtons,{input:V})})]})})})]})}return k}(),B=function(g,l){var c=g.filteredItems,m=g.onClick;return(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,tabIndex:0,children:c.map(function(i,u){return(0,e.createComponentVNode)(2,o.Button.Checkbox,{fluid:!0,id:u,onClick:function(){function s(){return m(i)}return s}(),checked:i.checked,style:{animation:"none",transition:"none"},children:i.key.replace(/^\w/,function(s){return s.toUpperCase()})},u)})})}},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),f=n(98595),b=[1,5,10,20,30,50],S=[1,5,10],B=r.ChemDispenser=function(){function c(m,i){var u=(0,a.useBackend)(i),s=u.act,d=u.data,v=d.chemicals;return(0,e.createComponentVNode)(2,f.Window,{width:400,height:400+v.length*8,children:(0,e.createComponentVNode)(2,f.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,k),(0,e.createComponentVNode)(2,g),(0,e.createComponentVNode)(2,l)]})})})}return c}(),k=function(m,i){var u=(0,a.useBackend)(i),s=u.act,d=u.data,v=d.amount,C=d.energy,h=d.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:C,minValue:0,maxValue:h,ranges:{good:[h*.5,1/0],average:[h*.25,h*.5],bad:[-1/0,h*.25]},children:[C," / ",h," Units"]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Dispense",verticalAlign:"middle",children:(0,e.createComponentVNode)(2,t.Stack,{children:b.map(function(p,N){return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,width:"15%",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"cog",selected:v===p,content:p,onClick:function(){function V(){return s("amount",{amount:p})}return V}()})},N)})})})]})})})},g=function(m,i){for(var u=(0,a.useBackend)(i),s=u.act,d=u.data,v=d.chemicals,C=v===void 0?[]:v,h=[],p=0;p<(C.length+1)%3;p++)h.push(!0);return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:d.glass?"Drink Dispenser":"Chemical Dispenser",children:[C.map(function(N,V){return(0,e.createComponentVNode)(2,t.Button,{m:.1,width:"32.5%",icon:"arrow-circle-down",overflow:"hidden",textOverflow:"ellipsis",content:N.title,style:{"margin-left":"2px"},onClick:function(){function y(){return s("dispense",{reagent:N.id})}return y}()},V)}),h.map(function(N,V){return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,basis:"25%"},V)})]})})},l=function(m,i){var u=(0,a.useBackend)(i),s=u.act,d=u.data,v=d.isBeakerLoaded,C=d.beakerCurrentVolume,h=d.beakerMaxVolume,p=d.beakerContents,N=p===void 0?[]:p;return(0,e.createComponentVNode)(2,t.Stack.Item,{height:16,children:(0,e.createComponentVNode)(2,t.Section,{title:d.glass?"Glass":"Beaker",fill:!0,scrollable:!0,buttons:(0,e.createComponentVNode)(2,t.Box,{children:[!!v&&(0,e.createComponentVNode)(2,t.Box,{inline:!0,color:"label",mr:2,children:[C," / ",h," units"]}),(0,e.createComponentVNode)(2,t.Button,{icon:"eject",content:"Eject",disabled:!v,onClick:function(){function V(){return s("ejectBeaker")}return V}()})]}),children:(0,e.createComponentVNode)(2,o.BeakerContents,{beakerLoaded:v,beakerContents:N,buttons:function(){function V(y){return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{content:"Isolate",icon:"compress-arrows-alt",onClick:function(){function I(){return s("remove",{reagent:y.id,amount:-1})}return I}()}),S.map(function(I,L){return(0,e.createComponentVNode)(2,t.Button,{content:I,onClick:function(){function w(){return s("remove",{reagent:y.id,amount:I})}return w}()},L)}),(0,e.createComponentVNode)(2,t.Button,{content:"ALL",onClick:function(){function I(){return s("remove",{reagent:y.id,amount:y.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),f=n(85870),b=n(98595),S=r.ChemHeater=function(){function g(l,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 g}(),B=function(l,c){var m=(0,t.useBackend)(c),i=m.act,u=m.data,s=u.targetTemp,d=u.targetTempReached,v=u.autoEject,C=u.isActive,h=u.currentTemp,p=u.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:v?"toggle-on":"toggle-off",selected:v,onClick:function(){function N(){return i("toggle_autoeject")}return N}()}),(0,e.createComponentVNode)(2,o.Button,{content:C?"On":"Off",icon:"power-off",selected:C,disabled:!p,onClick:function(){function N(){return i("toggle_on")}return N}()})],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 N(V,y){return i("adjust_temperature",{target:y})}return N}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Reading",color:d?"good":"average",children:p&&(0,e.createComponentVNode)(2,o.AnimatedNumber,{value:h,format:function(){function N(V){return(0,a.toFixed)(V)+" K"}return N}()})||"\u2014"})]})})})},k=function(l,c){var m=(0,t.useBackend)(c),i=m.act,u=m.data,s=u.isBeakerLoaded,d=u.beakerCurrentVolume,v=u.beakerMaxVolume,C=u.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:[d," / ",v," units"]}),(0,e.createComponentVNode)(2,o.Button,{icon:"eject",content:"Eject",onClick:function(){function h(){return i("eject_beaker")}return h}()})]}),children:(0,e.createComponentVNode)(2,f.BeakerContents,{beakerLoaded:s,beakerContents:C})})})}},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),f=n(85870),b=n(3939),S=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 g(I,L){I.prototype=Object.create(L.prototype),I.prototype.constructor=I,l(I,L)}function l(I,L){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(w,A){return w.__proto__=A,w},l(I,L)}var c=[1,5,10],m=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 D(){return x("print",{idx:P.idx,beaker:L.args.beaker})}return D}()})]})})})})},i=function(I){return I[I.ToDisposals=0]="ToDisposals",I[I.ToBeaker=1]="ToBeaker",I}(i||{}),u=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,d),(0,e.createComponentVNode)(2,v),(0,e.createComponentVNode)(2,y)]})})]})}return I}(),s=function(L,w){var A=(0,a.useBackend)(w),x=A.act,E=A.data,P=E.beaker,D=E.beaker_reagents,M=E.buffer_reagents,R=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:R?(0,e.createComponentVNode)(2,t.Button.Confirm,{icon:"eject",disabled:!P,content:"Eject and Clear Buffer",onClick:function(){function O(){return x("eject")}return O}()}):(0,e.createComponentVNode)(2,t.Button,{icon:"eject",disabled:!P,content:"Eject and Clear Buffer",onClick:function(){function O(){return x("eject")}return O}()}),children:P?(0,e.createComponentVNode)(2,f.BeakerContents,{beakerLoaded:!0,beakerContents:D,buttons:function(){function O(F,_){return(0,e.createComponentVNode)(2,t.Box,{mb:_0?(0,e.createComponentVNode)(2,f.BeakerContents,{beakerLoaded:!0,beakerContents:D,buttons:function(){function M(R,O){return(0,e.createComponentVNode)(2,t.Box,{mb:O0&&(R=M.map(function(O){var F=O.id,_=O.sprite;return(0,e.createComponentVNode)(2,N,{icon:_,translucent:!0,onClick:function(){function U(){return x("set_sprite_style",{production_mode:P,style:F})}return U}(),selected:D===F},F)})),(0,e.createComponentVNode)(2,p,{productionData:L.productionData,children:R&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Style",children:R})})},y=function(L,w){var A=(0,a.useBackend)(w),x=A.act,E=A.data,P=E.loaded_pill_bottle_style,D=E.containerstyles,M=E.loaded_pill_bottle,R={width:"20px",height:"20px"},O=D.map(function(F){var _=F.color,U=F.name,z=P===_;return(0,e.createComponentVNode)(2,t.Button,{style:{position:"relative",width:R.width,height:R.height},onClick:function(){function $(){return x("set_container_style",{style:_})}return $}(),icon:z&&"check",iconStyle:{position:"relative","z-index":1},tooltip:U,tooltipPosition:"top",children:[!z&&(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:R.width,height:R.height,"background-color":_,opacity:.6,filter:"alpha(opacity=60)"}})]},_)});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:R.width,height:R.height},icon:"tint-slash",onClick:function(){function F(){return x("clear_container_style")}return F}(),selected:!P,tooltip:"Default",tooltipPosition:"top"}),O]})}):(0,e.createComponentVNode)(2,t.Box,{color:"label",children:"No pill bottle or patch pack loaded."})})})};(0,b.modalRegisterBodyOverride)("analyze",m)},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),f=n(79140),b=1,S=32,B=128,k=r.CloningConsole=function(){function u(s,d){var v=(0,a.useBackend)(d),C=v.act,h=v.data,p=h.tab,N=h.has_scanner,V=h.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:N?"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:p===1,icon:"home",onClick:function(){function y(){return C("menu",{tab:1})}return y}(),children:"Main Menu"}),(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:p===2,icon:"user",onClick:function(){function y(){return C("menu",{tab:2})}return y}(),children:"Damage Configuration"})]}),(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,g)})]})})}return u}(),g=function(s,d){var v=(0,a.useBackend)(d),C=v.data,h=C.tab,p;return h===1?p=(0,e.createComponentVNode)(2,l):h===2&&(p=(0,e.createComponentVNode)(2,c)),p},l=function(s,d){var v=(0,a.useBackend)(d),C=v.act,h=v.data,p=h.pods,N=h.pod_amount,V=h.selected_pod_UID;return(0,e.createComponentVNode)(2,t.Box,{children:[!N&&(0,e.createComponentVNode)(2,t.Box,{color:"average",children:"Notice: No pods connected."}),!!N&&p.map(function(y,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,f.resolveAsset)("pod_"+(y.cloning?"cloning":"idle")+".gif"),style:{width:"100%","-ms-interpolation-mode":"nearest-neighbor","image-rendering":"pixelated"}}),(0,e.createComponentVNode)(2,t.Button,{selected:V===y.uid,onClick:function(){function L(){return C("select_pod",{uid:y.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:[!y.cloning&&(0,e.createComponentVNode)(2,t.Box,{color:"average",children:"Pod is inactive."}),!!y.cloning&&(0,e.createComponentVNode)(2,t.ProgressBar,{value:y.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:y.biomass,ranges:{good:[2*y.biomass_storage_capacity/3,y.biomass_storage_capacity],average:[y.biomass_storage_capacity/3,2*y.biomass_storage_capacity/3],bad:[0,y.biomass_storage_capacity/3]},minValue:0,maxValue:y.biomass_storage_capacity,children:[y.biomass,"/",y.biomass_storage_capacity+" ("+100*y.biomass/y.biomass_storage_capacity+"%)"]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Sanguine Reagent",children:y.sanguine_reagent}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Osseous Reagent",children:y.osseous_reagent})]})})]})},y)})]})},c=function(s,d){var v=(0,a.useBackend)(d),C=v.act,h=v.data,p=h.selected_pod_data,N=h.has_scanned,V=h.scanner_has_patient,y=h.feedback,I=h.scan_successful,L=h.cloning_cost,w=h.has_scanner,A=h.currently_scanning;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 x(){return C("scan")}return x}(),disabled:!V||A,children:"Scan"}),(0,e.createComponentVNode)(2,t.Button,{icon:"eject",onClick:function(){function x(){return C("eject")}return x}(),disabled:!V||A,children:"Eject Patient"})]}),children:[!N&&!A&&(0,e.createComponentVNode)(2,t.Box,{color:"average",children:V?"No scan detected for current patient.":"No patient is in the scanner."}),(!!N||!!A)&&(0,e.createComponentVNode)(2,t.Box,{color:y.color,children:y.text})]}),(0,e.createComponentVNode)(2,t.Section,{layer:2,title:"Damages Breakdown",children:(0,e.createComponentVNode)(2,t.Box,{children:[(!I||!N)&&(0,e.createComponentVNode)(2,t.Box,{color:"average",children:"No valid scan detected."}),!!I&&!!N&&(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 x(){return C("fix_all")}return x}(),children:"Repair All Damages"}),(0,e.createComponentVNode)(2,t.Button,{onClick:function(){function x(){return C("fix_none")}return x}(),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 x(){return C("clone")}return x}(),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:p.biomass_storage_capacity,ranges:{bad:[2*p.biomass_storage_capacity/3,p.biomass_storage_capacity],average:[p.biomass_storage_capacity/3,2*p.biomass_storage_capacity/3],good:[0,p.biomass_storage_capacity/3]},color:L[0]>p.biomass?"bad":null,children:["Biomass: ",L[0],"/",p.biomass,"/",p.biomass_storage_capacity]})}),(0,e.createComponentVNode)(2,t.Stack.Item,{width:"30%",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:L[1],maxValue:p.max_reagent_capacity,ranges:{bad:[2*p.max_reagent_capacity/3,p.max_reagent_capacity],average:[p.max_reagent_capacity/3,2*p.max_reagent_capacity/3],good:[0,p.max_reagent_capacity/3]},color:L[1]>p.sanguine_reagent?"bad":"good",children:["Sanguine: ",L[1],"/",p.sanguine_reagent,"/",p.max_reagent_capacity]})}),(0,e.createComponentVNode)(2,t.Stack.Item,{width:"30%",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:L[2],maxValue:p.max_reagent_capacity,ranges:{bad:[2*p.max_reagent_capacity/3,p.max_reagent_capacity],average:[p.max_reagent_capacity/3,2*p.max_reagent_capacity/3],good:[0,p.max_reagent_capacity/3]},color:L[2]>p.osseous_reagent?"bad":"good",children:["Osseous: ",L[2],"/",p.osseous_reagent,"/",p.max_reagent_capacity]})})]}),(0,e.createComponentVNode)(2,m),(0,e.createComponentVNode)(2,i)]})]})})]})]})},m=function(s,d){var v=(0,a.useBackend)(d),C=v.act,h=v.data,p=h.patient_limb_data,N=h.limb_list,V=h.desired_limb_data;return(0,e.createComponentVNode)(2,t.Collapsible,{title:"Limbs",children:N.map(function(y,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:[p[y][4],":"," "]}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:1}),p[y][3]===0&&(0,e.createComponentVNode)(2,t.Stack.Item,{width:"60%",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:V[y][0]+V[y][1],maxValue:p[y][5],ranges:{good:[0,p[y][5]/3],average:[p[y][5]/3,2*p[y][5]/3],bad:[2*p[y][5]/3,p[y][5]]},children:["Post-Cloning Damage: ",(0,e.createComponentVNode)(2,t.Icon,{name:"bone"})," "+V[y][0]+" / ",(0,e.createComponentVNode)(2,t.Icon,{name:"fire"})," "+V[y][1]]})}),p[y][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 ",p[y][4]," is missing!"]})})]}),(0,e.createComponentVNode)(2,t.Stack,{children:[!!p[y][3]&&(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button.Checkbox,{checked:!V[y][3],onClick:function(){function L(){return C("toggle_limb_repair",{limb:y,type:"replace"})}return L}(),children:"Replace Limb"})}),!p[y][3]&&(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Button.Checkbox,{disabled:!(p[y][0]||p[y][1]),checked:!(V[y][0]||V[y][1]),onClick:function(){function L(){return C("toggle_limb_repair",{limb:y,type:"damage"})}return L}(),children:"Repair Damages"}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{disabled:!(p[y][2]&b),checked:!(V[y][2]&b),onClick:function(){function L(){return C("toggle_limb_repair",{limb:y,type:"bone"})}return L}(),children:"Mend Bone"}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{disabled:!(p[y][2]&S),checked:!(V[y][2]&S),onClick:function(){function L(){return C("toggle_limb_repair",{limb:y,type:"ib"})}return L}(),children:"Mend IB"}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{disabled:!(p[y][2]&B),checked:!(V[y][2]&B),onClick:function(){function L(){return C("toggle_limb_repair",{limb:y,type:"critburn"})}return L}(),children:"Mend Critical Burn"})]})]})]},y)})})},i=function(s,d){var v=(0,a.useBackend)(d),C=v.act,h=v.data,p=h.patient_organ_data,N=h.organ_list,V=h.desired_organ_data;return(0,e.createComponentVNode)(2,t.Collapsible,{title:"Organs",children:N.map(function(y,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:[p[y][3],":"," "]}),p[y][5]!=="heart"&&(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Stack.Item,{children:[!!p[y][2]&&(0,e.createComponentVNode)(2,t.Button.Checkbox,{checked:!V[y][2]&&!V[y][1],onClick:function(){function L(){return C("toggle_organ_repair",{organ:y,type:"replace"})}return L}(),children:"Replace Organ"}),!p[y][2]&&(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button.Checkbox,{disabled:!p[y][0],checked:!V[y][0],onClick:function(){function L(){return C("toggle_organ_repair",{organ:y,type:"damage"})}return L}(),children:"Repair Damages"})})]})}),p[y][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:[!!p[y][2]&&(0,e.createComponentVNode)(2,t.ProgressBar,{color:"bad",value:0,children:["The patient's ",p[y][3]," is missing!"]}),!p[y][2]&&(0,e.createComponentVNode)(2,t.ProgressBar,{value:V[y][0],maxValue:p[y][4],ranges:{good:[0,p[y][4]/3],average:[p[y][4]/3,2*p[y][4]/3],bad:[2*p[y][4]/3,p[y][4]]},children:"Post-Cloning Damage: "+V[y][0]})]})]})},y)})})}},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),f=r.CloningPod=function(){function b(S,B){var k=(0,a.useBackend)(B),g=k.act,l=k.data,c=l.biomass,m=l.biomass_storage_capacity,i=l.sanguine_reagent,u=l.osseous_reagent,s=l.organs,d=l.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*m/3,m],average:[m/3,2*m/3],bad:[0,m/3]},minValue:0,maxValue:m})})]}),(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:i+" 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:i,step:1,unit:"units",onChange:function(){function v(C,h){return g("remove_reagent",{reagent:"sanguine_reagent",amount:h})}return v}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Remove All",onClick:function(){function v(){return g("purge_reagent",{reagent:"sanguine_reagent"})}return v}()})})]}),(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: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 v(C,h){return g("remove_reagent",{reagent:"osseous_reagent",amount:h})}return v}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Remove All",onClick:function(){function v(){return g("purge_reagent",{reagent:"osseous_reagent"})}return v}()})})]})]}),(0,e.createComponentVNode)(2,t.Section,{title:"Organ Storage",children:[!d&&(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(v){return(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:v.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 C(){return g("eject_organ",{organ_ref:v.ref})}return C}()})})]},v)})]}),!!d&&(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),f=n(98595),b=r.CoinMint=function(){function S(B,k){var g=(0,t.useBackend)(k),l=g.act,c=g.data,m=c.materials,i=c.moneyBag,u=c.moneyBagContent,s=c.moneyBagMaxContent,d=(i?210:138)+Math.ceil(m.length/4)*64;return(0,e.createComponentVNode)(2,f.Window,{width:210,height:d,children:(0,e.createComponentVNode)(2,f.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:!i&&"Need a money bag",disabled:!i,onClick:function(){function v(){return l("activate")}return v}()}),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 v(){return l("ejectMat")}return v}()})})]})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:m.map(function(v){return(0,e.createComponentVNode)(2,o.Button,{bold:!0,inline:!0,translucent:!0,m:.2,textAlign:"center",selected:v.id===c.chosenMaterial,tooltip:v.name,content:(0,e.createComponentVNode)(2,o.Stack,{vertical:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{className:(0,a.classes)(["materials32x32",v.id])}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:v.amount})]}),onClick:function(){function C(){return l("selectMaterial",{material:v.id})}return C}()},v.id)})})]})})}),!!i&&(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 v(){return l("ejectBag")}return v}()}),children:(0,e.createComponentVNode)(2,o.ProgressBar,{width:"100%",minValue:0,maxValue:s,value:u,children:[u," / ",s]})})})]})})})}return S}()},93858:function(T,r,n){"use strict";r.__esModule=!0,r.HexColorInput=r.ColorSelector=r.ColorPickerModal=r.ColorInput=void 0;var e=n(89005),a=n(51057),t=n(72253),o=n(36036),f=n(98595),b=n(44879),S=n(14448),B=n(4454),k=n(35840),g=n(9394),l=n(19203),c=["prefixed","alpha","color","fluid","onChange"];/** * @file * @copyright 2023 itsmeow * @license MIT - */function m(w,A){w.prototype=Object.create(A.prototype),w.prototype.constructor=w,i(w,A)}function i(w,A){return i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(x,E){return x.__proto__=E,x},i(w,A)}function u(w,A){if(w==null)return{};var x={};for(var E in w)if({}.hasOwnProperty.call(w,E)){if(A.includes(E))continue;x[E]=w[E]}return x}var s=r.ColorPickerModal=function(){function w(A,x){var E=(0,t.useBackend)(x),P=E.data,D=P.timeout,M=P.message,R=P.title,O=P.autofocus,F=P.default_color,_=F===void 0?"#000000":F,U=(0,t.useLocalState)(x,"color_picker_choice",(0,y.hexToHsva)(_)),z=U[0],$=U[1];return(0,e.createComponentVNode)(2,f.Window,{height:400,title:R,width:600,theme:"generic",children:[!!D&&(0,e.createComponentVNode)(2,a.Loader,{value:D}),(0,e.createComponentVNode)(2,f.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[M&&(0,e.createComponentVNode)(2,o.Stack.Item,{m:1,children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,children:(0,e.createComponentVNode)(2,o.Box,{color:"label",overflow:"hidden",children:M})})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,children:[!!O&&(0,e.createComponentVNode)(2,o.Autofocus),(0,e.createComponentVNode)(2,d,{color:z,setColor:$,defaultColor:_})]})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,l.InputButtons,{input:(0,y.hsvaToHex)(z)})})]})})]})}return w}(),d=r.ColorSelector=function(){function w(A,x){var E=A.color,P=A.setColor,D=A.defaultColor,M=function(){function F(_){P(function(U){return Object.assign({},U,_)})}return F}(),R=(0,y.hsvaToRgba)(E),O=(0,y.hsvaToHex)(E);return(0,e.createComponentVNode)(2,o.Flex,{direction:"row",children:[(0,e.createComponentVNode)(2,o.Flex.Item,{mr:2,children:(0,e.createComponentVNode)(2,o.Stack,{vertical:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createVNode)(1,"div","react-colorful",[(0,e.createComponentVNode)(2,N,{hsva:E,onChange:M}),(0,e.createComponentVNode)(2,V,{hue:E.h,onChange:M,className:"react-colorful__last-control"})],4)}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:[(0,e.createComponentVNode)(2,o.Box,{inline:!0,width:"100px",height:"20px",textAlign:"center",children:"Current"}),(0,e.createComponentVNode)(2,o.Box,{inline:!0,width:"100px",height:"20px",textAlign:"center",children:"Previous"}),(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,o.Tooltip,{content:O,position:"bottom",children:(0,e.createComponentVNode)(2,o.Box,{inline:!0,width:"100px",height:"30px",backgroundColor:O})}),(0,e.createComponentVNode)(2,o.Tooltip,{content:D,position:"bottom",children:(0,e.createComponentVNode)(2,o.Box,{inline:!0,width:"100px",height:"30px",backgroundColor:D})})]})]})}),(0,e.createComponentVNode)(2,o.Flex.Item,{grow:!0,fontSize:"15px",lineHeight:"24px",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,{children:(0,e.createComponentVNode)(2,o.Box,{textColor:"label",children:"Hex:"})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,height:"24px",children:(0,e.createComponentVNode)(2,C,{fluid:!0,color:(0,y.hsvaToHex)(E).substring(1),onChange:function(){function F(_){g.logger.info(_),P((0,y.hexToHsva)(_))}return F}(),prefixed:!0})})]})}),(0,e.createComponentVNode)(2,o.Stack.Divider),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Stack,{children:[(0,e.createComponentVNode)(2,o.Stack.Item,{width:"25px",children:(0,e.createComponentVNode)(2,o.Box,{textColor:"label",children:"H:"})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,V,{hue:E.h,onChange:M})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,v,{value:E.h,callback:function(){function F(_,U){return M({h:U})}return F}(),max:360,unit:"\xB0"})})]})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Stack,{children:[(0,e.createComponentVNode)(2,o.Stack.Item,{width:"25px",children:(0,e.createComponentVNode)(2,o.Box,{textColor:"label",children:"S:"})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,S,{color:E,onChange:M})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,v,{value:E.s,callback:function(){function F(_,U){return M({s:U})}return F}(),unit:"%"})})]})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Stack,{children:[(0,e.createComponentVNode)(2,o.Stack.Item,{width:"25px",children:(0,e.createComponentVNode)(2,o.Box,{textColor:"label",children:"V:"})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,I,{color:E,onChange:M})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,v,{value:E.v,callback:function(){function F(_,U){return M({v:U})}return F}(),unit:"%"})})]})}),(0,e.createComponentVNode)(2,o.Stack.Divider),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Stack,{children:[(0,e.createComponentVNode)(2,o.Stack.Item,{width:"25px",children:(0,e.createComponentVNode)(2,o.Box,{textColor:"label",children:"R:"})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,L,{color:E,onChange:M,target:"r"})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,v,{value:R.r,callback:function(){function F(_,U){R.r=U,M((0,y.rgbaToHsva)(R))}return F}(),max:255})})]})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Stack,{children:[(0,e.createComponentVNode)(2,o.Stack.Item,{width:"25px",children:(0,e.createComponentVNode)(2,o.Box,{textColor:"label",children:"G:"})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,L,{color:E,onChange:M,target:"g"})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,v,{value:R.g,callback:function(){function F(_,U){R.g=U,M((0,y.rgbaToHsva)(R))}return F}(),max:255})})]})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Stack,{children:[(0,e.createComponentVNode)(2,o.Stack.Item,{width:"25px",children:(0,e.createComponentVNode)(2,o.Box,{textColor:"label",children:"B:"})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,L,{color:E,onChange:M,target:"b"})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,v,{value:R.b,callback:function(){function F(_,U){R.b=U,M((0,y.rgbaToHsva)(R))}return F}(),max:255})})]})})]})})]})}return w}(),v=function(A){var x=A.value,E=A.callback,P=A.min,D=P===void 0?0:P,M=A.max,R=M===void 0?100:M,O=A.unit;return(0,e.createComponentVNode)(2,o.NumberInput,{width:"70px",value:Math.round(x),step:1,minValue:D,maxValue:R,onChange:E,unit:O})},h=function(A){return"#"+A},C=r.HexColorInput=function(){function w(A){var x=A.prefixed,E=A.alpha,P=A.color,D=A.fluid,M=A.onChange,R=u(A,c),O=function(){function _(U){return U.replace(/([^0-9A-F]+)/gi,"").substring(0,E?8:6)}return _}(),F=function(){function _(U){return(0,y.validHex)(U,E)}return _}();return(0,e.normalizeProps)((0,e.createComponentVNode)(2,p,Object.assign({},R,{fluid:D,color:P,onChange:M,escape:O,format:x?h:void 0,validate:F})))}return w}(),p=r.ColorInput=function(w){function A(E){var P;return P=w.call(this)||this,P.props=void 0,P.state=void 0,P.handleInput=function(D){var M=P.props.escape(D.currentTarget.value);P.setState({localValue:M})},P.handleBlur=function(D){D.currentTarget&&(P.props.validate(D.currentTarget.value)?P.props.onChange(P.props.escape?P.props.escape(D.currentTarget.value):D.currentTarget.value):P.setState({localValue:P.props.escape(P.props.color)}))},P.props=E,P.state={localValue:P.props.escape(P.props.color)},P}m(A,w);var x=A.prototype;return x.componentDidUpdate=function(){function E(P,D){P.color!==this.props.color&&this.setState({localValue:this.props.escape(this.props.color)})}return E}(),x.render=function(){function E(){return(0,e.createComponentVNode)(2,o.Box,{className:(0,k.classes)(["Input",this.props.fluid&&"Input--fluid"]),children:[(0,e.createVNode)(1,"div","Input__baseline",".",16),(0,e.createVNode)(64,"input","Input__input",null,1,{value:this.props.format?this.props.format(this.state.localValue):this.state.localValue,spellCheck:"false",onInput:this.handleInput,onBlur:this.handleBlur})]})}return E}(),A}(e.Component),N=function(A){var x=A.hsva,E=A.onChange,P=function(O){E({s:O.left*100,v:100-O.top*100})},D=function(O){E({s:(0,b.clamp)(x.s+O.left*100,0,100),v:(0,b.clamp)(x.v-O.top*100,0,100)})},M={"background-color":(0,y.hsvaToHslString)({h:x.h,s:100,v:100,a:1})+" !important"};return(0,e.createVNode)(1,"div","react-colorful__saturation_value",(0,e.createComponentVNode)(2,B.Interactive,{onMove:P,onKey:D,"aria-label":"Color","aria-valuetext":"Saturation "+Math.round(x.s)+"%, Brightness "+Math.round(x.v)+"%",children:(0,e.createComponentVNode)(2,o.Pointer,{className:"react-colorful__saturation_value-pointer",top:1-x.v/100,left:x.s/100,color:(0,y.hsvaToHslString)(x)})}),2,{style:M})},V=function(A){var x=A.className,E=A.hue,P=A.onChange,D=function(F){P({h:360*F.left})},M=function(F){P({h:(0,b.clamp)(E+F.left*360,0,360)})},R=(0,k.classes)(["react-colorful__hue",x]);return(0,e.createVNode)(1,"div",R,(0,e.createComponentVNode)(2,B.Interactive,{onMove:D,onKey:M,"aria-label":"Hue","aria-valuenow":Math.round(E),"aria-valuemax":"360","aria-valuemin":"0",children:(0,e.createComponentVNode)(2,o.Pointer,{className:"react-colorful__hue-pointer",left:E/360,color:(0,y.hsvaToHslString)({h:E,s:100,v:100,a:1})})}),2)},S=function(A){var x=A.className,E=A.color,P=A.onChange,D=function(F){P({s:100*F.left})},M=function(F){P({s:(0,b.clamp)(E.s+F.left*100,0,100)})},R=(0,k.classes)(["react-colorful__saturation",x]);return(0,e.createVNode)(1,"div",R,(0,e.createComponentVNode)(2,B.Interactive,{style:{background:"linear-gradient(to right, "+(0,y.hsvaToHslString)({h:E.h,s:0,v:E.v,a:1})+", "+(0,y.hsvaToHslString)({h:E.h,s:100,v:E.v,a:1})+")"},onMove:D,onKey:M,"aria-label":"Saturation","aria-valuenow":Math.round(E.s),"aria-valuemax":"100","aria-valuemin":"0",children:(0,e.createComponentVNode)(2,o.Pointer,{className:"react-colorful__saturation-pointer",left:E.s/100,color:(0,y.hsvaToHslString)({h:E.h,s:E.s,v:E.v,a:1})})}),2)},I=function(A){var x=A.className,E=A.color,P=A.onChange,D=function(F){P({v:100*F.left})},M=function(F){P({v:(0,b.clamp)(E.v+F.left*100,0,100)})},R=(0,k.classes)(["react-colorful__value",x]);return(0,e.createVNode)(1,"div",R,(0,e.createComponentVNode)(2,B.Interactive,{style:{background:"linear-gradient(to right, "+(0,y.hsvaToHslString)({h:E.h,s:E.s,v:0,a:1})+", "+(0,y.hsvaToHslString)({h:E.h,s:E.s,v:100,a:1})+")"},onMove:D,onKey:M,"aria-label":"Value","aria-valuenow":Math.round(E.s),"aria-valuemax":"100","aria-valuemin":"0",children:(0,e.createComponentVNode)(2,o.Pointer,{className:"react-colorful__value-pointer",left:E.v/100,color:(0,y.hsvaToHslString)({h:E.h,s:E.s,v:E.v,a:1})})}),2)},L=function(A){var x=A.className,E=A.color,P=A.onChange,D=A.target,M=(0,y.hsvaToRgba)(E),R=function($){M[D]=$,P((0,y.rgbaToHsva)(M))},O=function($){R(255*$.left)},F=function($){R((0,b.clamp)(M[D]+$.left*255,0,255))},_=(0,k.classes)(["react-colorful__"+D,x]),U=D==="r"?"rgb("+Math.round(M.r)+",0,0)":D==="g"?"rgb(0,"+Math.round(M.g)+",0)":"rgb(0,0,"+Math.round(M.b)+")";return(0,e.createVNode)(1,"div",_,(0,e.createComponentVNode)(2,B.Interactive,{onMove:O,onKey:F,"aria-valuenow":M[D],"aria-valuemax":"100","aria-valuemin":"0",children:(0,e.createComponentVNode)(2,o.Pointer,{className:"react-colorful__"+D+"-pointer",left:M[D]/255,color:U})}),2)}},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),f=r.ColourMatrixTester=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,l=k.data,c=l.colour_data,m=[[{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:m.map(function(i){return(0,e.createComponentVNode)(2,t.Stack,{textAlign:"center",textColor:"label",children:i.map(function(u){return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,mt:1,children:[u.name,":\xA0",(0,e.createComponentVNode)(2,t.NumberInput,{width:4,value:c[u.idx],step:.05,minValue:-5,maxValue:5,stepPixelSize:5,onChange:function(){function s(d,v){return g("setvalue",{idx:u.idx+1,value:v})}return s}()})]},u.name)})},i)})})})})})}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),f=function(s){switch(s){case 1:return(0,e.createComponentVNode)(2,B);case 2:return(0,e.createComponentVNode)(2,l);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,i);default:return"ERROR. Unknown menu_state. Please contact NT Technical Support."}},b=r.CommunicationsComputer=function(){function u(s,d){var v=(0,a.useBackend)(d),h=v.act,C=v.data,p=C.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),f(p)]})})})}return u}(),y=function(s,d){var v=(0,a.useBackend)(d),h=v.act,C=v.data,p=C.authenticated,N=C.noauthbutton,V=C.esc_section,S=C.esc_callable,I=C.esc_recallable,L=C.esc_status,w=C.authhead,A=C.is_ai,x=C.lastCallLoc,E=!1,P;return p?p===1?P="Command":p===2?P="Captain":p===3?P="CentComm Officer":p===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:p?"sign-out-alt":"id-card",selected:p,disabled:N,content:p?"Log Out ("+P+")":"Log In",onClick:function(){function D(){return h("auth")}return D}()})})})})}),(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 D(){return h("callshuttle")}return D}()})}),!!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 D(){return h("cancelshuttle")}return D}()})}),!!x&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Last Call/Recall From",children:x})]})})})],4)},B=function(s,d){var v=(0,a.useBackend)(d),h=v.act,C=v.data,p=C.is_admin;return p?(0,e.createComponentVNode)(2,k):(0,e.createComponentVNode)(2,g)},k=function(s,d){var v=(0,a.useBackend)(d),h=v.act,C=v.data,p=C.is_admin,N=C.gamma_armory_location,V=C.admin_levels,S=C.authenticated,I=C.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,m,{levels:V,required_access:p,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:!p,onClick:function(){function L(){return h("send_to_cc_announcement_page")}return L}()}),S===4&&(0,e.createComponentVNode)(2,t.Button,{icon:"plus",content:"Make Other Announcement",disabled:!p,onClick:function(){function L(){return h("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:!p,onClick:function(){function L(){return h("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:!p,onClick:function(){function L(){return h("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:!p,onClick:function(){function L(){return h("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:N?"Send Gamma Armory":"Recall Gamma Armory",disabled:!p,onClick:function(){function L(){return h("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:!p,onClick:function(){function L(){return h("view_econ")}return L}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"fax",content:"Fax Manager",disabled:!p,onClick:function(){function L(){return h("view_fax")}return L}()})]})]})}),(0,e.createComponentVNode)(2,t.Collapsible,{title:"View Command accessible controls",children:(0,e.createComponentVNode)(2,g)})]})},g=function(s,d){var v=(0,a.useBackend)(d),h=v.act,C=v.data,p=C.msg_cooldown,N=C.emagged,V=C.cc_cooldown,S=C.security_level_color,I=C.str_security_level,L=C.levels,w=C.authcapt,A=C.authhead,x=C.messages,E="Make Priority Announcement";p>0&&(E+=" ("+p+"s)");var P=N?"Message [UNKNOWN]":"Message CentComm",D="Request Authentication Codes";return V>0&&(P+=" ("+V+"s)",D+=" ("+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,m,{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||p>0,onClick:function(){function M(){return h("announce")}return M}()})}),!!N&&(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 h("MessageSyndicate")}return M}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"sync-alt",content:"Reset Relays",disabled:!w,onClick:function(){function M(){return h("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 h("MessageCentcomm")}return M}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Nuclear Device",children:(0,e.createComponentVNode)(2,t.Button,{icon:"bomb",content:D,disabled:!w||V>0,onClick:function(){function M(){return h("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 h("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 h("messagelist")}return M}()})})]})})})],4)},l=function(s,d){var v=(0,a.useBackend)(d),h=v.act,C=v.data,p=C.stat_display,N=C.authhead,V=C.current_message_title,S=p.presets.map(function(L){return(0,e.createComponentVNode)(2,t.Button,{content:L.label,selected:L.name===p.type,disabled:!N,onClick:function(){function w(){return h("setstat",{statdisp:L.name})}return w}()},L.name)}),I=p.alerts.map(function(L){return(0,e.createComponentVNode)(2,t.Button,{content:L.label,selected:L.alert===p.icon,disabled:!N,onClick:function(){function w(){return h("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 h("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:p.line_1,disabled:!N,onClick:function(){function L(){return h("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:p.line_2,disabled:!N,onClick:function(){function L(){return h("setmsg2")}return L}()})})]})})})},c=function(s,d){var v=(0,a.useBackend)(d),h=v.act,C=v.data,p=C.authhead,N=C.current_message_title,V=C.current_message,S=C.messages,I=C.security_level,L;if(N)L=(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:N,buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"times",content:"Return To Message List",disabled:!p,onClick:function(){function A(){return h("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:!p||N===A.title,onClick:function(){function x(){return h("messagelist",{msgid:A.id})}return x}()}),(0,e.createComponentVNode)(2,t.Button.Confirm,{icon:"times",content:"Delete",disabled:!p,onClick:function(){function x(){return h("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 h("main")}return A}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:w})})}return(0,e.createComponentVNode)(2,t.Box,{children:L})},m=function(s,d){var v=(0,a.useBackend)(d),h=v.act,C=v.data,p=s.levels,N=s.required_access,V=s.use_confirm,S=C.security_level;return V?p.map(function(I){return(0,e.createComponentVNode)(2,t.Button.Confirm,{icon:I.icon,content:I.name,disabled:!N||I.id===S,tooltip:I.tooltip,onClick:function(){function L(){return h("newalertlevel",{level:I.id})}return L}()},I.name)}):p.map(function(I){return(0,e.createComponentVNode)(2,t.Button,{icon:I.icon,content:I.name,disabled:!N||I.id===S,tooltip:I.tooltip,onClick:function(){function L(){return h("newalertlevel",{level:I.id})}return L}()},I.name)})},i=function(s,d){var v=(0,a.useBackend)(d),h=v.act,C=v.data,p=C.is_admin,N=C.possible_cc_sounds;if(!p)return h("main");var V=(0,a.useLocalState)(d,"subtitle",""),S=V[0],I=V[1],L=(0,a.useLocalState)(d,"text",""),w=L[0],A=L[1],x=(0,a.useLocalState)(d,"classified",0),E=x[0],P=x[1],D=(0,a.useLocalState)(d,"beepsound","Beep"),M=D[0],R=D[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 O(){return h("main")}return O}()}),children:[(0,e.createComponentVNode)(2,t.Input,{placeholder:"Enter Subtitle here.",fluid:!0,value:S,onChange:function(){function O(F,_){return I(_)}return O}(),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 O(F,_){return A(_)}return O}()}),(0,e.createComponentVNode)(2,t.Button.Confirm,{content:"Send Announcement",fluid:!0,icon:"paper-plane",center:!0,mt:"5px",textAlign:"center",onClick:function(){function O(){return h("make_cc_announcement",{subtitle:S,text:w,classified:E,beepsound:M})}return O}()}),(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:N,selected:M,onSelected:function(){function O(F){return R(F)}return O}(),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 O(){return h("test_sound",{sound:M})}return O}()})}),(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 O(){return P(!E)}return O}()})})]})]})})}},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),f=r.CompostBin=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,l=k.data,c=l.biomass,m=l.compost,i=l.biomass_capacity,u=l.compost_capacity,s=l.potassium,d=l.potassium_capacity,v=l.potash,h=l.potash_capacity,C=(0,a.useSharedState)(B,"vendAmount",1),p=C[0],N=C[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:i,ranges:{good:[i*.5,1/0],average:[i*.25,i*.5],bad:[-1/0,i*.25]},children:[c," / ",i," Units"]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Compost",children:(0,e.createComponentVNode)(2,t.ProgressBar,{ml:.5,mt:1,width:20,value:m,minValue:0,maxValue:u,ranges:{good:[u*.5,1/0],average:[u*.25,u*.5],bad:[-1/0,u*.25]},children:[m," / ",u," 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:d,ranges:{good:[d*.5,1/0],average:[d*.25,d*.5],bad:[-1/0,d*.25]},children:[s," / ",d," Units"]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Potash",children:(0,e.createComponentVNode)(2,t.ProgressBar,{ml:.5,mt:1,width:20,value:v,minValue:0,maxValue:h,ranges:{good:[h*.5,1/0],average:[h*.25,h*.5],bad:[-1/0,h*.25]},children:[v," / ",h," 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:p,width:"32px",minValue:1,maxValue:10,stepPixelSize:7,onChange:function(){function V(S,I){return N(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:m<25*p,icon:"arrow-circle-down",onClick:function(){function V(){return g("create",{amount:p})}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),f=n(73379),b=n(98595);function y(h,C){h.prototype=Object.create(C.prototype),h.prototype.constructor=h,B(h,C)}function B(h,C){return B=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,N){return p.__proto__=N,p},B(h,C)}var k={1:["ACTIVE","good"],2:["COMPLETED","good"],3:["FAILED","bad"]},g=["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"],l=r.Contractor=function(){function h(C,p){var N=(0,t.useBackend)(p),V=N.act,S=N.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,d,{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,m)}),(0,e.createComponentVNode)(2,o.Flex.Item,{grow:"1",overflow:"hidden",children:S.page===1?(0,e.createComponentVNode)(2,i,{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,d,{height:"100%",allMessages:g,finishedTimeout:3e3,onFinished:function(){function x(){return V("complete_load_animation")}return x}()})});var L=(0,t.useLocalState)(p,"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,v),(0,e.createComponentVNode)(2,b.Window.Content,{className:"Contractor",children:(0,e.createComponentVNode)(2,o.Flex,{direction:"column",height:"100%",children:I})})]})}return h}(),c=function(C,p){var N=(0,t.useBackend)(p),V=N.act,S=N.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"]})},C,{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"})]})})]})})))},m=function(C,p){var N=(0,t.useBackend)(p),V=N.act,S=N.data,I=S.page;return(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Tabs,Object.assign({},C,{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"]})]})))},i=function(C,p){var N=(0,t.useBackend)(p),V=N.act,S=N.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)(p,"viewingPhoto",""),P=E[0],D=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,f.Countdown,{timeLeft:A.time_left,format:function(){function M(R,O){return" ("+O.substr(3)+")"}return M}()})],onClick:function(){function M(){return V("extract")}return M}()})},C,{children:I.slice().sort(function(M,R){return M.status===1?-1:R.status===1?1:M.status-R.status}).map(function(M){var R;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 O(){return D("target_photo_"+M.uid+".png")}return O}()})})]}),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 O(){return V("abort")}return O}()})]}),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",u(M)]}),(R=M.difficulties)==null?void 0:R.map(function(O,F){return(0,e.createComponentVNode)(2,o.Button.Confirm,{disabled:!!L,content:O.name+" ("+O.reward+" TC)",onClick:function(){function _(){return V("activate",{uid:M.uid,difficulty:F+1})}return _}()},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)})})))},u=function(C){if(!(!C.objective||C.status>1)){var p=C.objective.locs.user_area_id,N=C.objective.locs.user_coords,V=C.objective.locs.target_area_id,S=C.objective.locs.target_coords,I=p===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]-N[1],S[0]-N[0])),lineHeight:I?null:"0.85",size:"1.5"})})}},s=function(C,p){var N=(0,t.useBackend)(p),V=N.act,S=N.data,I=S.rep,L=S.buyables;return(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Section,Object.assign({title:"Available Purchases",overflow:"auto"},C,{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)})})))},d=function(h){function C(N){var V;return V=h.call(this,N)||this,V.timer=null,V.state={currentIndex:0,currentDisplay:[]},V}y(C,h);var p=C.prototype;return p.tick=function(){function N(){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 N}(),p.componentDidMount=function(){function N(){var V=this,S=this.props.linesPerSecond,I=S===void 0?2.5:S;this.timer=setInterval(function(){return V.tick()},1e3/I)}return N}(),p.componentWillUnmount=function(){function N(){clearTimeout(this.timer)}return N}(),p.render=function(){function N(){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 N}(),C}(e.Component),v=function(C,p){var N=(0,t.useLocalState)(p,"viewingPhoto",""),V=N[0],S=N[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),f=r.ConveyorSwitch=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,l=k.data,c=l.slowFactor,m=l.oneWay,i=l.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:i>0?"forward":i<0?"reverse":"neutral"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Allow reverse",children:(0,e.createComponentVNode)(2,t.Button.Checkbox,{checked:!m,onClick:function(){function u(){return g("toggleOneWay")}return u}()})}),(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 u(){return g("slowFactor",{value:c-5})}return u}()})," "]}),(0,e.createComponentVNode)(2,t.Flex.Item,{mx:"1px",children:[" ",(0,e.createComponentVNode)(2,t.Button,{icon:"angle-left",onClick:function(){function u(){return g("slowFactor",{value:c-1})}return u}()})," "]}),(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 u(s){return s+"x"}return u}(),onChange:function(){function u(s,d){return g("slowFactor",{value:d})}return u}()})}),(0,e.createComponentVNode)(2,t.Flex.Item,{mx:"1px",children:[" ",(0,e.createComponentVNode)(2,t.Button,{icon:"angle-right",onClick:function(){function u(){return g("slowFactor",{value:c+1})}return u}()})," "]}),(0,e.createComponentVNode)(2,t.Flex.Item,{mx:"1px",children:[" ",(0,e.createComponentVNode)(2,t.Button,{icon:"angle-double-right",onClick:function(){function u(){return g("slowFactor",{value:c+5})}return u}()})," "]})]})})]})})})})}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),f=n(36036),b=n(36352),y=n(76910),B=n(98595),k=n(96184),g=["color"];function l(v,h){if(v==null)return{};var C={};for(var p in v)if({}.hasOwnProperty.call(v,p)){if(h.includes(p))continue;C[p]=v[p]}return C}var c=function(h,C){return h.dead?"Deceased":parseInt(h.health,10)<=C?"Critical":parseInt(h.stat,10)===1?"Unconscious":"Living"},m=function(h,C){return h.dead?"red":parseInt(h.health,10)<=C?"orange":parseInt(h.stat,10)===1?"blue":"green"},i=r.CrewMonitor=function(){function v(h,C){var p=(0,o.useBackend)(C),N=p.act,V=p.data,S=(0,o.useLocalState)(C,"tabIndex",V.tabIndex),I=S[0],L=S[1],w=function(){function x(E){L(E),N("set_tab_index",{tab_index:E})}return x}(),A=function(){function x(E){switch(E){case 0:return(0,e.createComponentVNode)(2,u);case 1:return(0,e.createComponentVNode)(2,d);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,f.Stack,{fill:!0,vertical:!0,fillPositionedParent:!0,children:[(0,e.createComponentVNode)(2,f.Stack.Item,{children:(0,e.createComponentVNode)(2,f.Tabs,{children:[(0,e.createComponentVNode)(2,f.Tabs.Tab,{icon:"table",selected:I===0,onClick:function(){function x(){return w(0)}return x}(),children:"Data View"},"DataView"),(0,e.createComponentVNode)(2,f.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 v}(),u=function(h,C){var p=(0,o.useBackend)(C),N=p.act,V=p.data,S=V.possible_levels,I=V.viewing_current_z_level,L=V.is_advanced,w=V.highlightedNames,A=(0,a.sortBy)(function(M){return!w.includes(M.name)},function(M){return M.name})(V.crewmembers||[]),x=(0,o.useLocalState)(C,"search",""),E=x[0],P=x[1],D=(0,t.createSearch)(E,function(M){return M.name+"|"+M.assignment+"|"+M.area});return(0,e.createComponentVNode)(2,f.Section,{fill:!0,scrollable:!0,backgroundColor:"transparent",children:[(0,e.createComponentVNode)(2,f.Stack,{children:[(0,e.createComponentVNode)(2,f.Stack.Item,{width:"100%",ml:"5px",children:(0,e.createComponentVNode)(2,f.Input,{placeholder:"Search by name, assignment or location..",width:"100%",onInput:function(){function M(R,O){return P(O)}return M}()})}),(0,e.createComponentVNode)(2,f.Stack.Item,{children:L?(0,e.createComponentVNode)(2,f.Dropdown,{mr:"5px",width:"50px",options:S,selected:I,onSelected:function(){function M(R){return N("switch_level",{new_level:R})}return M}()}):null})]}),(0,e.createComponentVNode)(2,f.Table,{m:"0.5rem",children:[(0,e.createComponentVNode)(2,f.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,f.Table.Cell,{children:(0,e.createComponentVNode)(2,f.Button,{tooltip:"Clear highlights",icon:"square-xmark",onClick:function(){function M(){return N("clear_highlighted_names")}return M}()})}),(0,e.createComponentVNode)(2,f.Table.Cell,{children:"Name"}),(0,e.createComponentVNode)(2,f.Table.Cell,{children:"Status"}),(0,e.createComponentVNode)(2,f.Table.Cell,{children:"Location"})]}),A.filter(D).map(function(M,R){var O=w.includes(M.name);return(0,e.createComponentVNode)(2,f.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 F(){return N(O?"remove_highlighted_name":"add_highlighted_name",{name:M.name})}return F}()})}),(0,e.createComponentVNode)(2,b.TableCell,{children:[M.name," (",M.assignment,")"]}),(0,e.createComponentVNode)(2,b.TableCell,{children:[(0,e.createComponentVNode)(2,f.Box,{inline:!0,color:m(M,V.critThreshold),children:c(M,V.critThreshold)}),M.sensor_type>=2||V.ignoreSensors?(0,e.createComponentVNode)(2,f.Box,{inline:!0,ml:1,children:["(",(0,e.createComponentVNode)(2,f.Box,{inline:!0,color:y.COLORS.damageType.oxy,children:M.oxy}),"|",(0,e.createComponentVNode)(2,f.Box,{inline:!0,color:y.COLORS.damageType.toxin,children:M.tox}),"|",(0,e.createComponentVNode)(2,f.Box,{inline:!0,color:y.COLORS.damageType.burn,children:M.fire}),"|",(0,e.createComponentVNode)(2,f.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,f.Button,{fluid:!0,icon:"location-arrow",content:M.area+" ("+M.x+", "+M.y+")",onClick:function(){function F(){return N("track",{track:M.ref})}return F}()}):M.area+" ("+M.x+", "+M.y+")":(0,e.createComponentVNode)(2,f.Box,{inline:!0,color:"grey",children:"Not Available"})})]},R)})]})]})},s=function(h,C){var p=h.color,N=l(h,g);return(0,e.normalizeProps)((0,e.createComponentVNode)(2,f.NanoMap.Marker,Object.assign({},N,{children:(0,e.createVNode)(1,"span","highlighted-marker color-border-"+p)})))},d=function(h,C){var p=(0,o.useBackend)(C),N=p.act,V=p.data,S=V.highlightedNames;return(0,e.createComponentVNode)(2,f.Box,{height:"100vh",mb:"0.5rem",overflow:"hidden",children:(0,e.createComponentVNode)(2,f.NanoMap,{zoom:V.zoom,offsetX:V.offsetX,offsetY:V.offsetY,onZoom:function(){function I(L){return N("set_zoom",{zoom:L})}return I}(),onOffsetChange:function(){function I(L,w){return N("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=m(I,V.critThreshold),w=S.includes(I.name),A=function(){return V.isObserver?N("track",{track:I.ref}):null},x=function(){return N(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,f.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),f=[{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 g(l,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 g}(),B=function(l,c){var m=(0,a.useBackend)(c),i=m.act,u=m.data,s=u.isOperating,d=u.hasOccupant,v=u.occupant,h=v===void 0?[]:v,C=u.cellTemperature,p=u.cellTemperatureStatus,N=u.isBeakerLoaded,V=u.cooldownProgress,S=u.auto_eject_healthy,I=u.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 i("ejectOccupant")}return L}(),disabled:!d,children:"Eject"}),children:d?(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Occupant",children:h.name||"Unknown"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Health",children:(0,e.createComponentVNode)(2,t.ProgressBar,{min:h.health,max:h.maxHealth,value:h.health/h.maxHealth,color:h.health>0?"good":"average",children:(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:Math.round(h.health)})})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",color:b[h.stat][0],children:b[h.stat][1]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Temperature",children:[(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:Math.round(h.bodyTemperature)})," K"]}),(0,e.createComponentVNode)(2,t.LabeledList.Divider),f.map(function(L){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:L.label,children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:h[L.type]/100,ranges:{bad:[.01,1/0]},children:(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:Math.round(h[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 i("ejectBeaker")}return L}(),disabled:!N,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 i(s?"switchOff":"switchOn")}return L}(),selected:s,children:s?"On":"Off"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Temperature",color:p,children:[(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:C})," 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:!N&&"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 i(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 i(I?"auto_eject_dead_off":"auto_eject_dead_on")}return L}(),children:I?"On":"Off"})})]})})})],4)},k=function(l,c){var m=(0,a.useBackend)(c),i=m.act,u=m.data,s=u.isBeakerLoaded,d=u.beakerLabel,v=u.beakerVolume;return s?(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Box,{inline:!0,color:!d&&"average",children:[d||"No label",":"]}),(0,e.createComponentVNode)(2,t.Box,{inline:!0,color:!v&&"bad",ml:1,children:v?(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:v,format:function(){function h(C){return Math.round(C)+" units remaining"}return h}()}):"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),f=n(25328),b=r.CryopodConsole=function(){function k(g,l){var c=(0,a.useBackend)(l),m=c.data,i=m.account_name,u=m.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, "+(i||"[REDACTED]")+"!",children:"This automated cryogenic freezing unit will safely store your corporeal form until your next assignment."}),(0,e.createComponentVNode)(2,y),!!u&&(0,e.createComponentVNode)(2,B)]})})}return k}(),y=function(g,l){var c=(0,a.useBackend)(l),m=c.data,i=m.frozen_crew;return(0,e.createComponentVNode)(2,t.Collapsible,{title:"Stored Crew",children:i.length?(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:i.map(function(u,s){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:u.name,children:u.rank},s)})})}):(0,e.createComponentVNode)(2,t.NoticeBox,{children:"No stored crew!"})})},B=function(g,l){var c=(0,a.useBackend)(l),m=c.act,i=c.data,u=i.frozen_items,s=function(v){var h=v.toString();return h.startsWith("the ")&&(h=h.slice(4,h.length)),(0,f.toTitleCase)(h)};return(0,e.createComponentVNode)(2,t.Collapsible,{title:"Stored Items",children:u.length?(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:u.map(function(d){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:s(d.name),buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-down",content:"Drop",mr:1,onClick:function(){function v(){return m("one_item",{item:d.uid})}return v}()})},d)})})}),(0,e.createComponentVNode)(2,t.Button,{content:"Drop All Items",color:"red",onClick:function(){function d(){return m("all_items")}return d}()})],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),f=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 p(N,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,h,{duration:w})),(0,e.createComponentVNode)(2,o.Window,{width:660,height:775,children:[(0,e.createComponentVNode)(2,f.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,g)}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,l)})]})})]})}return p}(),g=function(N,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."})})},l=function(N,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,i)],4):w==="se"?E=(0,e.createFragment)([(0,e.createComponentVNode)(2,m),(0,e.createComponentVNode)(2,i)],4):w==="buffer"?E=(0,e.createComponentVNode)(2,u):w==="rejuvenators"&&(E=(0,e.createComponentVNode)(2,v)),(0,e.createComponentVNode)(2,t.Section,{fill:!0,children:[(0,e.createComponentVNode)(2,t.Tabs,{children:y.map(function(P,D){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]},D)})}),E]})},c=function(N,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,C,{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(D){return D.toString(16).toUpperCase()}return P}(),ml:"0",onChange:function(){function P(D,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}()})]})},m=function(N,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,C,{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}()})]})},i=function(N,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}()})]})},u=function(N,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,d)})]})},s=function(N,V){var S=(0,a.useBackend)(V),I=S.act,L=S.data,w=N.id,A=N.name,x=N.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 D(){return I("bufferOption",{option:"clear",id:w})}return D}()}),(0,e.createComponentVNode)(2,t.Button,{disabled:!x.data,icon:"pen",content:"Rename",onClick:function(){function D(){return I("bufferOption",{option:"changeLabel",id:w})}return D}()}),(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 D(){return I("bufferOption",{option:"saveDisk",id:w})}return D}()})],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 D(){return I("bufferOption",{option:"saveUI",id:w})}return D}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-circle-down",content:"Subject U.I and U.E.",mb:"0",onClick:function(){function D(){return I("bufferOption",{option:"saveUIAndUE",id:w})}return D}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-circle-down",content:"Subject S.E.",mb:"0",onClick:function(){function D(){return I("bufferOption",{option:"saveSE",id:w})}return D}()}),(0,e.createComponentVNode)(2,t.Button,{disabled:!L.hasDisk||!L.disk.data,icon:"arrow-circle-down",content:"From Disk",mb:"0",onClick:function(){function D(){return I("bufferOption",{option:"loadDisk",id:w})}return D}()})]}),!!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 D(){return I("bufferOption",{option:"createInjector",id:w})}return D}()}),(0,e.createComponentVNode)(2,t.Button,{disabled:!E,icon:E?"syringe":"spinner",iconSpin:!E,content:"Block Injector",mb:"0",onClick:function(){function D(){return I("bufferOption",{option:"createInjector",id:w,block:1})}return D}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"user",content:"Subject",mb:"0",onClick:function(){function D(){return I("bufferOption",{option:"transfer",id:w})}return D}()})]})],4)]}),!x.data&&(0,e.createComponentVNode)(2,t.Box,{color:"label",mt:"0.5rem",children:"This buffer is empty."})]})})},d=function(N,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."]})})},v=function(N,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 D(){return I("injectRejuvenators",{amount:E})}return D}()},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)]})})})},h=function(N,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 "),N.duration,(0,e.createTextVNode)(" second"),N.duration===1?"":"s"],0)})]})},C=function(N,V){for(var S=(0,a.useBackend)(V),I=S.act,L=S.data,w=N.dnaString,A=N.selectedBlock,x=N.selectedSubblock,E=N.blockSize,P=N.action,D=w.split(""),M=0,R=[],O=function(){for(var U=F/E+1,z=[],$=function(){var J=G+1;z.push((0,e.createComponentVNode)(2,t.Button,{selected:A===U&&x===J,content:D[F+G],mb:"0",onClick:function(){function se(){return I(P,{block:U,subblock:J})}return se}()}))},G=0;Gd.spawnpoints?"red":"green",children:[d.total," total, versus ",d.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 N(){return s("dispatch_ert",{silent:C})}return N}()})})]})})})},g=function(m,i){var u=(0,a.useBackend)(i),s=u.act,d=u.data,v=d.ert_request_messages;return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,children:v&&v.length?v.map(function(h){return(0,e.createComponentVNode)(2,t.Section,{title:h.time,buttons:(0,e.createComponentVNode)(2,t.Button,{content:h.sender_real_name,onClick:function(){function C(){return s("view_player_panel",{uid:h.sender_uid})}return C}(),tooltip:"View player panel"}),children:h.message},(0,f.decodeHtmlEntities)(h.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."]})})})})},l=function(m,i){var u=(0,a.useBackend)(i),s=u.act,d=u.data,v=(0,a.useLocalState)(i,"text",""),h=v[0],C=v[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:h,onChange:function(){function p(N,V){return C(V)}return p}()}),(0,e.createComponentVNode)(2,t.Button.Confirm,{content:"Deny ERT",fluid:!0,icon:"times",center:!0,mt:2,textAlign:"center",onClick:function(){function p(){return s("deny_ert",{reason:h})}return p}()})]})})}},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),f=n(3939),b=r.EconomyManager=function(){function B(k,g){return(0,e.createComponentVNode)(2,o.Window,{width:600,height:325,children:[(0,e.createComponentVNode)(2,f.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,g){var l=(0,a.useBackend)(g),c=l.act,m=l.data,i=m.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 u(){return c("payroll_modification",{mod_type:"global"})}return u}()})}),(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 u(){return c("payroll_modification",{mod_type:"department"})}return u}()})}),(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 u(){return c("payroll_modification",{mod_type:"department_members"})}return u}()})}),(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 u(){return c("payroll_modification",{mod_type:"crew_member"})}return u}()})})]}),(0,e.createVNode)(1,"hr"),(0,e.createComponentVNode)(2,t.Box,{mb:.5,children:["Next Payroll in: ",i," Minutes"]}),(0,e.createComponentVNode)(2,t.Button,{icon:"angle-double-left",width:"auto",color:"bad",content:"Delay Payroll",onClick:function(){function u(){return c("delay_payroll")}return u}()}),(0,e.createComponentVNode)(2,t.Button,{width:"auto",content:"Set Payroll Time",onClick:function(){function u(){return c("set_payroll")}return u}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"angle-double-right",width:"auto",color:"good",content:"Accelerate Payroll",onClick:function(){function u(){return c("accelerate_payroll")}return u}()})]}),(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),f=n(98595),b=r.Electropack=function(){function y(B,k){var g=(0,t.useBackend)(k),l=g.act,c=g.data,m=c.power,i=c.code,u=c.frequency,s=c.minFrequency,d=c.maxFrequency;return(0,e.createComponentVNode)(2,f.Window,{width:360,height:135,children:(0,e.createComponentVNode)(2,f.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:m?"power-off":"times",content:m?"On":"Off",selected:m,onClick:function(){function v(){return l("power")}return v}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Frequency",buttons:(0,e.createComponentVNode)(2,o.Button,{icon:"sync",content:"Reset",onClick:function(){function v(){return l("reset",{reset:"freq"})}return v}()}),children:(0,e.createComponentVNode)(2,o.NumberInput,{animate:!0,unit:"kHz",step:.2,stepPixelSize:6,minValue:s/10,maxValue:d/10,value:u/10,format:function(){function v(h){return(0,a.toFixed)(h,1)}return v}(),width:"80px",onChange:function(){function v(h,C){return l("freq",{freq:C})}return v}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Code",buttons:(0,e.createComponentVNode)(2,o.Button,{icon:"sync",content:"Reset",onClick:function(){function v(){return l("reset",{reset:"code"})}return v}()}),children:(0,e.createComponentVNode)(2,o.NumberInput,{animate:!0,step:1,stepPixelSize:6,minValue:1,maxValue:100,value:i,width:"80px",onChange:function(){function v(h,C){return l("code",{code:C})}return v}()})})]})})})})}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),f=n(98595),b=r.Emojipedia=function(){function B(k,g){var l=(0,t.useBackend)(g),c=l.data,m=c.emoji_list,i=(0,t.useLocalState)(g,"searchText",""),u=i[0],s=i[1],d=m.filter(function(v){return v.name.toLowerCase().includes(u.toLowerCase())});return(0,e.createComponentVNode)(2,f.Window,{width:325,height:400,children:(0,e.createComponentVNode)(2,f.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:u,onInput:function(){function v(h,C){return s(C)}return v}()}),(0,e.createComponentVNode)(2,o.Button,{tooltip:"Click on an emoji to copy its tag!",tooltipPosition:"bottom",icon:"circle-question"})],4),children:d.map(function(v){return(0,e.createComponentVNode)(2,o.Button,{m:1,color:"transparent",className:(0,a.classes)(["emoji16x16","emoji-"+v.name]),style:{transform:"scale(1.5)"},tooltip:v.name,onClick:function(){function h(){y(v.name)}return h}()},v.name)})})})})}return B}(),y=function(k){var g=document.createElement("input"),l=":"+k+":";g.value=l,document.body.appendChild(g),g.select(),document.execCommand("copy"),document.body.removeChild(g)}},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),f=n(98595),b=n(64795),y=n(88510),B=r.EvolutionMenu=function(){function l(c,m){return(0,e.createComponentVNode)(2,f.Window,{width:480,height:580,theme:"changeling",children:(0,e.createComponentVNode)(2,f.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,k),(0,e.createComponentVNode)(2,g)]})})})}return l}(),k=function(c,m){var i=(0,t.useBackend)(m),u=i.act,s=i.data,d=s.evo_points,v=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:d}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:[(0,e.createComponentVNode)(2,o.Button,{ml:2.5,disabled:!v,content:"Readapt",icon:"sync",onClick:function(){function h(){return u("readapt")}return h}()}),(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"})]})]})})})},g=function(c,m){var i=(0,t.useBackend)(m),u=i.act,s=i.data,d=s.evo_points,v=s.ability_tabs,h=s.purchased_abilities,C=s.view_mode,p=(0,t.useLocalState)(m,"selectedTab",v[0]),N=p[0],V=p[1],S=(0,t.useLocalState)(m,"searchText",""),I=S[0],L=S[1],w=(0,t.useLocalState)(m,"ability_tabs",v[0].abilities),A=w[0],x=w[1],E=function(R,O){if(O===void 0&&(O=""),!R||R.length===0)return[];var F=(0,a.createSearch)(O,function(_){return _.name+"|"+_.description});return(0,b.flow)([(0,y.filter)(function(_){return _==null?void 0:_.name}),(0,y.filter)(F),(0,y.sortBy)(function(_){return _==null?void 0:_.name})])(R)},P=function(R){if(L(R),R==="")return x(N.abilities);x(E(v.map(function(O){return O.abilities}).flat(),R))},D=function(R){V(R),x(R.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(R,O){P(O)}return M}(),value:I}),(0,e.createComponentVNode)(2,o.Button,{icon:C?"square-o":"check-square-o",selected:!C,content:"Compact",onClick:function(){function M(){return u("set_view_mode",{mode:0})}return M}()}),(0,e.createComponentVNode)(2,o.Button,{icon:C?"check-square-o":"square-o",selected:C,content:"Expanded",onClick:function(){function M(){return u("set_view_mode",{mode:1})}return M}()})],4),children:[(0,e.createComponentVNode)(2,o.Tabs,{children:v.map(function(M){return(0,e.createComponentVNode)(2,o.Tabs.Tab,{selected:I===""&&N===M,onClick:function(){function R(){D(M)}return R}(),children:M.category},M)})}),A.map(function(M,R){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}),h.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>d||h.includes(M.power_path),content:"Evolve",onClick:function(){function O(){return u("purchase",{power_path:M.power_path})}return O}()})})]}),!!C&&(0,e.createComponentVNode)(2,o.Stack,{color:"#8a8a8a",my:1,ml:1.5,width:"95%",children:M.description+" "+M.helptext})]},R)})]})})}},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),f=n(36036),b=n(73379),y=n(98595),B=["id","amount","lineDisplay","onClick"];function k(p,N){if(p==null)return{};var V={};for(var S in p)if({}.hasOwnProperty.call(p,S)){if(N.includes(S))continue;V[S]=p[S]}return V}var g=2e3,l={bananium:"clown",tranquillite:"mime"},c=r.ExosuitFabricator=function(){function p(N,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,C),(0,e.createComponentVNode)(2,f.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,f.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,f.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,f.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,i)}),w&&(0,e.createComponentVNode)(2,f.Stack.Item,{children:(0,e.createComponentVNode)(2,u)})]})}),(0,e.createComponentVNode)(2,f.Stack.Item,{width:"30%",children:(0,e.createComponentVNode)(2,f.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,f.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,m)}),(0,e.createComponentVNode)(2,f.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,s)})]})})]})]})}):(0,e.createComponentVNode)(2,h)}return p}(),m=function(N,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,f.Section,{fill:!0,scrollable:!0,title:"Materials",className:"Exofab__materials",buttons:(0,e.createComponentVNode)(2,f.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,d,{mt:-2,id:E,bold:E==="metal"||E==="glass",onClick:function(){function P(){return I("withdraw",{id:E})}return P}()},E)})})},i=function(N,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",""),D=P[0],M=P[1],R=(0,t.createSearch)(D,function(z){return z.name}),O=x.filter(R),F=(0,o.useLocalState)(V,"levelsModal",!1),_=F[0],U=F[1];return(0,e.createComponentVNode)(2,f.Section,{fill:!0,scrollable:!0,className:"Exofab__designs",title:(0,e.createComponentVNode)(2,f.Dropdown,{width:"19rem",className:"Exofab__dropdown",selected:w,options:A,onSelected:function(){function z($){return I("category",{cat:$})}return z}()}),buttons:(0,e.createComponentVNode)(2,f.Box,{mt:"2px",children:[(0,e.createComponentVNode)(2,f.Button,{icon:"plus",content:"Queue all",onClick:function(){function z(){return I("queueall")}return z}()}),(0,e.createComponentVNode)(2,f.Button,{icon:"info",content:"Show current tech levels",onClick:function(){function z(){return U(!0)}return z}()}),(0,e.createComponentVNode)(2,f.Button,{icon:"unlink",color:"red",tooltip:"Disconnect from R&D network",onClick:function(){function z(){return I("unlink")}return z}()})]}),children:[(0,e.createComponentVNode)(2,f.Input,{placeholder:"Search by name...",mb:"0.5rem",width:"100%",onInput:function(){function z($,G){return M(G)}return z}()}),O.map(function(z){return(0,e.createComponentVNode)(2,v,{design:z},z.id)}),O.length===0&&(0,e.createComponentVNode)(2,f.Box,{color:"label",children:"No designs found."})]})},u=function(N,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,f.Section,{className:"Exofab__building",stretchContents:!0,children:(0,e.createComponentVNode)(2,f.ProgressBar.Countdown,{start:A,current:E,end:x,children:(0,e.createComponentVNode)(2,f.Stack,{children:[(0,e.createComponentVNode)(2,f.Stack.Item,{children:(0,e.createComponentVNode)(2,f.Icon,{name:"cog",spin:!0})}),(0,e.createComponentVNode)(2,f.Stack.Item,{children:["Building ",w,"\xA0(",(0,e.createComponentVNode)(2,b.Countdown,{current:E,timeLeft:x-E,format:function(){function P(D,M){return M.substr(3)}return P}()}),")"]})]})})})},s=function(N,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,D){return P+D.time},0);return(0,e.createComponentVNode)(2,f.Section,{fill:!0,scrollable:!0,className:"Exofab__queue",title:"Queue",buttons:(0,e.createComponentVNode)(2,f.Box,{children:[(0,e.createComponentVNode)(2,f.Button,{selected:A,icon:A?"toggle-on":"toggle-off",content:"Process",onClick:function(){function P(){return I("process")}return P}()}),(0,e.createComponentVNode)(2,f.Button,{disabled:w.length===0,icon:"eraser",content:"Clear",onClick:function(){function P(){return I("unqueueall")}return P}()})]}),children:(0,e.createComponentVNode)(2,f.Stack,{fill:!0,vertical:!0,children:w.length===0?(0,e.createComponentVNode)(2,f.Box,{color:"label",children:"The queue is empty."}):(0,e.createFragment)([(0,e.createComponentVNode)(2,f.Stack.Item,{className:"Exofab__queue--queue",grow:!0,overflow:"auto",children:w.map(function(P,D){return(0,e.createComponentVNode)(2,f.Box,{color:P.notEnough&&"bad",children:[D+1,". ",P.name,D>0&&(0,e.createComponentVNode)(2,f.Button,{icon:"arrow-up",onClick:function(){function M(){return I("queueswap",{from:D+1,to:D})}return M}()}),D0&&(0,e.createComponentVNode)(2,f.Stack.Item,{className:"Exofab__queue--time",children:[(0,e.createComponentVNode)(2,f.Divider),"Processing time:",(0,e.createComponentVNode)(2,f.Icon,{name:"clock",mx:"0.5rem"}),(0,e.createComponentVNode)(2,f.Box,{inline:!0,bold:!0,children:new Date(E/10*1e3).toISOString().substr(14,5)})]}),Object.keys(x).length>0&&(0,e.createComponentVNode)(2,f.Stack.Item,{className:"Exofab__queue--deficit",shrink:"0",children:[(0,e.createComponentVNode)(2,f.Divider),"Lacking materials to complete:",x.map(function(P){return(0,e.createComponentVNode)(2,f.Box,{children:(0,e.createComponentVNode)(2,d,{id:P[0],amount:-P[1],lineDisplay:!0})},P[0])})]})],0)})})},d=function(N,V){var S=(0,o.useBackend)(V),I=S.act,L=S.data,w=N.id,A=N.amount,x=N.lineDisplay,E=N.onClick,P=k(N,B),D=L.materials[w]||0,M=A||D;if(!(M<=0&&!(w==="metal"||w==="glass"))){var R=A&&A>D;return(0,e.normalizeProps)((0,e.createComponentVNode)(2,f.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,f.Stack.Item,{className:(0,a.classes)(["materials32x32",w])}),(0,e.createComponentVNode)(2,f.Stack.Item,{className:"Exofab__material--amount",color:R&&"bad",ml:0,mr:1,children:M.toLocaleString("en-US")})],4):(0,e.createFragment)([(0,e.createComponentVNode)(2,f.Stack.Item,{basis:"content",children:(0,e.createComponentVNode)(2,f.Button,{width:"85%",color:"transparent",onClick:E,children:(0,e.createComponentVNode)(2,f.Box,{mt:1,className:(0,a.classes)(["materials32x32",w])})})}),(0,e.createComponentVNode)(2,f.Stack.Item,{grow:"1",children:[(0,e.createComponentVNode)(2,f.Box,{className:"Exofab__material--name",children:w}),(0,e.createComponentVNode)(2,f.Box,{className:"Exofab__material--amount",children:[M.toLocaleString("en-US")," cm\xB3 (",Math.round(M/g*10)/10," ","sheets)"]})]})],4)})))}},v=function(N,V){var S=(0,o.useBackend)(V),I=S.act,L=S.data,w=N.design;return(0,e.createComponentVNode)(2,f.Box,{className:"Exofab__design",children:[(0,e.createComponentVNode)(2,f.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,f.Button,{icon:"plus-circle",onClick:function(){function A(){return I("queue",{id:w.id})}return A}()}),(0,e.createComponentVNode)(2,f.Box,{className:"Exofab__design--cost",children:Object.entries(w.cost).map(function(A){return(0,e.createComponentVNode)(2,f.Box,{children:(0,e.createComponentVNode)(2,d,{id:A[0],amount:A[1],lineDisplay:!0})},A[0])})}),(0,e.createComponentVNode)(2,f.Stack,{className:"Exofab__design--time",children:(0,e.createComponentVNode)(2,f.Stack.Item,{children:[(0,e.createComponentVNode)(2,f.Icon,{name:"clock"}),w.time>0?(0,e.createFragment)([w.time/10,(0,e.createTextVNode)(" seconds")],0):"Instant"]})})]})},h=function(N,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,f.Section,{title:"Setup Linkage",children:(0,e.createComponentVNode)(2,f.Table,{m:"0.5rem",children:[(0,e.createComponentVNode)(2,f.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,f.Table.Cell,{children:"Network Address"}),(0,e.createComponentVNode)(2,f.Table.Cell,{children:"Network ID"}),(0,e.createComponentVNode)(2,f.Table.Cell,{children:"Link"})]}),w.map(function(A){return(0,e.createComponentVNode)(2,f.Table.Row,{children:[(0,e.createComponentVNode)(2,f.Table.Cell,{children:A.addr}),(0,e.createComponentVNode)(2,f.Table.Cell,{children:A.net_id}),(0,e.createComponentVNode)(2,f.Table.Cell,{children:(0,e.createComponentVNode)(2,f.Button,{content:"Link",icon:"link",onClick:function(){function x(){return I("linktonetworkcontroller",{target_controller:A.addr})}return x}()})})]},A.addr)})]})})})})},C=function(N,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,f.Modal,{maxWidth:"75%",width:window.innerWidth+"px",maxHeight:window.innerHeight*.75+"px",mx:"auto",children:(0,e.createComponentVNode)(2,f.Section,{title:"Current tech levels",buttons:(0,e.createComponentVNode)(2,f.Button,{content:"Close",onClick:function(){function P(){E(!1)}return P}()}),children:(0,e.createComponentVNode)(2,f.LabeledList,{children:w.map(function(P){var D=P.name,M=P.level;return(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:D,children:M},D)})})})}):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),f=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,g){var l=(0,a.useBackend)(g),c=l.act,m=l.data,i=m.open,u=m.feedback,s=m.occupant,d=m.occupant_name,v=m.occupant_status,h=function(){function p(){if(!s)return(0,e.createComponentVNode)(2,t.NoticeBox,{children:"No specimen detected."});var N=function(){function S(){return f.get(v)}return S}(),V=N();return(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Name",children:d}),(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 p}(),C=h();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:u})})}),(0,e.createComponentVNode)(2,t.Section,{title:"Scanner",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"eject",content:"Eject",disabled:!i,onClick:function(){function p(){return c("door")}return p}()}),children:C})]})})}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),f=0,b=1013,y=function(g){var l="good",c=80,m=95,i=110,u=120;return gi?l="average":g>u&&(l="bad"),l},B=r.ExternalAirlockController=function(){function k(g,l){var c=(0,a.useBackend)(l),m=c.act,i=c.data,u=i.chamber_pressure,s=i.exterior_status,d=i.interior_status,v=i.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(u),value:u,minValue:f,maxValue:b,children:[u," kPa"]})})})}),(0,e.createComponentVNode)(2,t.Section,{title:"Actions",buttons:(0,e.createComponentVNode)(2,t.Button,{content:"Abort",icon:"ban",color:"red",disabled:!v,onClick:function(){function h(){return m("abort")}return h}()}),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:v,onClick:function(){function h(){return m("cycle_ext")}return h}()}),(0,e.createComponentVNode)(2,t.Button,{width:"50%",content:"Cycle to Interior",icon:"arrow-circle-right",disabled:v,onClick:function(){function h(){return m("cycle_int")}return h}()})]}),(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Button,{width:"49%",content:"Force Exterior Door",icon:"exclamation-triangle",color:d==="open"?"red":v?"yellow":null,onClick:function(){function h(){return m("force_ext")}return h}()}),(0,e.createComponentVNode)(2,t.Button,{width:"50%",content:"Force Interior Door",icon:"exclamation-triangle",color:d==="open"?"red":v?"yellow":null,onClick:function(){function h(){return m("force_int")}return h}()})]})]})]})})}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),f=r.FaxMachine=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,l=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:l.scan_name?"eject":"id-card",selected:l.scan_name,content:l.scan_name?l.scan_name:"-----",tooltip:l.scan_name?"Eject ID":"Insert ID",onClick:function(){function c(){return g("scan")}return c}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Authorize",children:(0,e.createComponentVNode)(2,t.Button,{icon:l.authenticated?"sign-out-alt":"id-card",selected:l.authenticated,disabled:l.nologin,content:l.realauth?"Log Out":"Log In",onClick:function(){function c(){return g("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:l.network}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Document",children:[(0,e.createComponentVNode)(2,t.Button,{icon:l.paper?"eject":"paperclip",disabled:!l.authenticated&&!l.paper,content:l.paper?l.paper:"-----",onClick:function(){function c(){return g("paper")}return c}()}),!!l.paper&&(0,e.createComponentVNode)(2,t.Button,{icon:"pencil-alt",content:"Rename",onClick:function(){function c(){return g("rename")}return c}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Sending To",children:(0,e.createComponentVNode)(2,t.Button,{icon:"print",content:l.destination?l.destination:"-----",disabled:!l.authenticated,onClick:function(){function c(){return g("dept")}return c}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Action",children:(0,e.createComponentVNode)(2,t.Button,{icon:"envelope",content:l.sendError?l.sendError:"Send",disabled:!l.paper||!l.destination||!l.authenticated||l.sendError,onClick:function(){function c(){return g("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),f=r.FilingCabinet=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,l=k.data,c=k.config,m=l.contents,i=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:[!m&&(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 ",i," is empty."]})}),!!m&&m.slice().map(function(u){return(0,e.createComponentVNode)(2,t.Stack,{mt:.5,className:"candystripe",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:"80%",children:u.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 g("retrieve",{index:u.index})}return s}()})})]},u)})]})})})})}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),f=function(k,g){var l=(0,a.useBackend)(g),c=l.act,m=l.data,i=k.icon_state,u=k.direction,s=k.isSelected,d=k.onSelect;return(0,e.createComponentVNode)(2,t.DmIcon,{icon:m.icon,icon_state:i,direction:u,onClick:d,style:{"border-style":s&&"solid"||"none","border-width":"2px","border-color":"orange",padding:s&&"0px"||"2px"}})},b={NORTH:1,SOUTH:2,EAST:4,WEST:8},y=r.FloorPainter=function(){function B(k,g){var l=(0,a.useBackend)(g),c=l.act,m=l.data,i=m.availableStyles,u=m.selectedStyle,s=m.selectedDir;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.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{icon:"chevron-left",onClick:function(){function d(){return c("cycle_style",{offset:-1})}return d}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Dropdown,{options:i,selected:u,width:"150px",nochevron:!0,onSelected:function(){function d(v){return c("select_style",{style:v})}return d}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{icon:"chevron-right",onClick:function(){function d(){return c("cycle_style",{offset:1})}return d}()})})]}),(0,e.createComponentVNode)(2,t.Box,{mt:"5px",mb:"5px",children:(0,e.createComponentVNode)(2,t.Flex,{overflowY:"auto",maxHeight:"239px",wrap:"wrap",children:i.map(function(d){return(0,e.createComponentVNode)(2,t.Flex.Item,{children:(0,e.createComponentVNode)(2,f,{icon_state:d,isSelected:u===d,onSelect:function(){function v(){return c("select_style",{style:d})}return v}()})},d)})})}),(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:[b.NORTH,null,b.SOUTH].map(function(d){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[d+b.WEST,d,d+b.EAST].map(function(v){return(0,e.createComponentVNode)(2,t.Table.Cell,{style:{"vertical-align":"middle","text-align":"center"},children:v===null?(0,e.createComponentVNode)(2,t.Icon,{name:"arrows-alt",size:3}):(0,e.createComponentVNode)(2,f,{icon_state:u,direction:v,isSelected:v===s,onSelect:function(){function h(){return c("select_direction",{direction:v})}return h}()})},v)})},d)})})})})]})})})}return B}()},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),f=n(98595),b=function(i){return i?"("+i.join(", ")+")":"ERROR"},y=function(i,u){if(!(!i||!u)){if(i[2]!==u[2])return null;var s=Math.atan2(u[1]-i[1],u[0]-i[0]),d=Math.sqrt(Math.pow(u[1]-i[1],2)+Math.pow(u[0]-i[0],2));return{angle:(0,a.rad2deg)(s),distance:d}}},B=r.GPS=function(){function m(i,u){var s=(0,t.useBackend)(u),d=s.data,v=d.emped,h=d.active,C=d.area,p=d.position,N=d.saved;return(0,e.createComponentVNode)(2,f.Window,{width:400,height:600,children:(0,e.createComponentVNode)(2,f.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:v?(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,g)}),h?(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,l,{area:C,position:p})}),N&&(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,l,{title:"Saved Position",position:N})}),(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 m}(),k=function(i,u){var s=i.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."]})})})})},g=function(i,u){var s=(0,t.useBackend)(u),d=s.act,v=s.data,h=v.active,C=v.tag,p=v.same_z,N=(0,t.useLocalState)(u,"newTag",C),V=N[0],S=N[1];return(0,e.createComponentVNode)(2,o.Section,{title:"Settings",buttons:(0,e.createComponentVNode)(2,o.Button,{selected:h,icon:h?"toggle-on":"toggle-off",content:h?"On":"Off",onClick:function(){function I(){return d("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:C,onEnter:function(){function I(){return d("tag",{newtag:V})}return I}(),onInput:function(){function I(L,w){return S(w)}return I}()}),(0,e.createComponentVNode)(2,o.Button,{disabled:C===V,width:"20px",mb:"0",ml:"0.25rem",onClick:function(){function I(){return d("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:!p,icon:p?"compress":"expand",content:p?"Local Sector":"Global",onClick:function(){function I(){return d("same_z")}return I}()})})]})})},l=function(i,u){var s=i.title,d=i.area,v=i.position;return(0,e.createComponentVNode)(2,o.Section,{title:s||"Position",children:(0,e.createComponentVNode)(2,o.Box,{fontSize:"1.5rem",children:[d&&(0,e.createFragment)([d,(0,e.createVNode)(1,"br")],0),b(v)]})})},c=function(i,u){var s=(0,t.useBackend)(u),d=s.data,v=d.position,h=d.signals;return(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Section,Object.assign({fill:!0,scrollable:!0,title:"Signals"},i,{children:(0,e.createComponentVNode)(2,o.Table,{children:h.map(function(C){return Object.assign({},C,y(v,C.position))}).map(function(C,p){return(0,e.createComponentVNode)(2,o.Table.Row,{backgroundColor:p%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:C.tag}),(0,e.createComponentVNode)(2,o.Table.Cell,{verticalAlign:"middle",color:"grey",children:C.area}),(0,e.createComponentVNode)(2,o.Table.Cell,{verticalAlign:"middle",collapsing:!0,children:C.distance!==void 0&&(0,e.createComponentVNode)(2,o.Box,{opacity:Math.max(1-Math.min(C.distance,100)/100,.5),children:[(0,e.createComponentVNode)(2,o.Icon,{name:C.distance>0?"arrow-right":"circle",rotation:-C.angle}),"\xA0",Math.floor(C.distance)+"m"]})}),(0,e.createComponentVNode)(2,o.Table.Cell,{verticalAlign:"middle",pr:"0.25rem",collapsing:!0,children:b(C.position)})]},p)})})})))}},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),f=n(98595),b=r.GeneModder=function(){function u(s,d){var v=(0,a.useBackend)(d),h=v.data,C=h.has_seed;return(0,e.createComponentVNode)(2,f.Window,{width:950,height:650,children:[(0,e.createVNode)(1,"div","GeneModder__left",(0,e.createComponentVNode)(2,f.Window.Content,{children:(0,e.createComponentVNode)(2,i,{scrollable:!0})}),2),(0,e.createVNode)(1,"div","GeneModder__right",(0,e.createComponentVNode)(2,f.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%"}),C===0?(0,e.createComponentVNode)(2,B):(0,e.createComponentVNode)(2,y)]})}),2)]})}return u}(),y=function(s,d){var v=(0,a.useBackend)(d),h=v.act,C=v.data,p=C.disk;return(0,e.createComponentVNode)(2,t.Section,{title:"Genes",fill:!0,scrollable:!0,children:[(0,e.createComponentVNode)(2,g),(0,e.createComponentVNode)(2,l),(0,e.createComponentVNode)(2,c)]})},B=function(s,d){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,d){var v=(0,a.useBackend)(d),h=v.act,C=v.data,p=C.has_seed,N=C.seed,V=C.has_disk,S=C.disk,I,L;return p?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,"+N.image,style:{"vertical-align":"middle",width:"32px",margin:"-1px","margin-left":"-11px"}}),(0,e.createComponentVNode)(2,t.Button,{content:N.name,onClick:function(){function w(){return h("eject_seed")}return w}()}),(0,e.createComponentVNode)(2,t.Button,{ml:"3px",icon:"pen",tooltip:"Name Variant",onClick:function(){function w(){return h("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 h("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 h("select_empty_disk")}return w}()})})})]})})},g=function(s,d){var v=(0,a.useBackend)(d),h=v.act,C=v.data,p=C.disk,N=C.core_genes;return(0,e.createComponentVNode)(2,t.Collapsible,{title:"Core Genes",open:!0,children:[N.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:!(p!=null&&p.can_extract),icon:"save",onClick:function(){function S(){return h("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:!(p!=null&&p.can_extract),icon:"save",onClick:function(){function V(){return h("bulk_extract_core")}return V}()})})})]},"Core Genes")},l=function(s,d){var v=(0,a.useBackend)(d),h=v.data,C=h.reagent_genes,p=h.has_reagent;return(0,e.createComponentVNode)(2,m,{title:"Reagent Genes",gene_set:C,do_we_show:p})},c=function(s,d){var v=(0,a.useBackend)(d),h=v.data,C=h.trait_genes,p=h.has_trait;return(0,e.createComponentVNode)(2,m,{title:"Trait Genes",gene_set:C,do_we_show:p})},m=function(s,d){var v=s.title,h=s.gene_set,C=s.do_we_show,p=(0,a.useBackend)(d),N=p.act,V=p.data,S=V.disk;return(0,e.createComponentVNode)(2,t.Collapsible,{title:v,open:!0,children:C?h.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 N("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 N("remove",{id:I.id})}return L}()})})]},I)}):(0,e.createComponentVNode)(2,t.Stack.Item,{children:"No Genes Detected"})},v)},i=function(s,d){var v=s.title,h=s.gene_set,C=s.do_we_show,p=(0,a.useBackend)(d),N=p.act,V=p.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 N("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 N("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 N("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 N("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 N("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 N("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 N("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 N("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 N("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 N("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 N("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 N("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 N("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 N("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),f=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),f=r.GhostHudPanel=function(){function y(B,k){var g=(0,a.useBackend)(k),l=g.data,c=l.security,m=l.medical,i=l.diagnostic,u=l.pressure,s=l.radioactivity,d=l.ahud;return(0,e.createComponentVNode)(2,o.Window,{width:250,height:217,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:m}),(0,e.createComponentVNode)(2,b,{label:"Security",type:"security",is_active:c}),(0,e.createComponentVNode)(2,b,{label:"Diagnostic",type:"diagnostic",is_active:i}),(0,e.createComponentVNode)(2,b,{label:"Pressure",type:"pressure",is_active:u}),(0,e.createComponentVNode)(2,t.Divider),(0,e.createComponentVNode)(2,b,{label:"Radioactivity",type:"radioactivity",is_active:s,act_on:"rads_on",act_off:"rads_off"}),(0,e.createComponentVNode)(2,t.Divider),(0,e.createComponentVNode)(2,b,{label:"Antag HUD",is_active:d,act_on:"ahud_on",act_off:"ahud_off"})]})})})}return y}(),b=function(B,k){var g=(0,a.useBackend)(k),l=g.act,c=B.label,m=B.type,i=m===void 0?null:m,u=B.is_active,s=B.act_on,d=s===void 0?"hud_on":s,v=B.act_off,h=v===void 0?"hud_off":v;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:u?"On":"Off",icon:u?"toggle-on":"toggle-off",selected:u,onClick:function(){function C(){return l(u?h:d,{hud_type:i})}return C}()})})]})}},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),f=r.GlandDispenser=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,l=k.data,c=l.glands,m=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:m.map(function(i){return(0,e.createComponentVNode)(2,t.Button,{width:"60px",height:"60px",m:.75,textAlign:"center",fontSize:"17px",lineHeight:"55px",icon:"eject",backgroundColor:i.color,content:i.amount||"0",disabled:!i.amount,onClick:function(){function u(){return g("dispense",{gland_id:i.id})}return u}()},i.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),f=r.GravityGen=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,l=k.data,c=l.charging_state,m=l.charge_count,i=l.breaker,u=l.ext_power,s=function(){function v(h){return h>0?(0,e.createComponentVNode)(2,t.Box,{inline:!0,color:"average",children:["[ ",h===1?"Charging":"Discharging"," ]"]}):(0,e.createComponentVNode)(2,t.Box,{inline:!0,color:u?"good":"bad",children:["[ ",u?"Powered":"Unpowered"," ]"]})}return v}(),d=function(){function v(h){if(h>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 v}();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:[d(c),(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Generator Status",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:i?"power-off":"times",content:i?"Online":"Offline",color:i?"green":"red",px:1.5,onClick:function(){function v(){return g("breaker")}return v}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Power Status",color:u?"good":"bad",children:s(c)}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Gravity Charge",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:m/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),f=n(49148),b=r.GuestPass=function(){function y(B,k){var g=(0,a.useBackend)(k),l=g.act,c=g.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 m(){return l("mode",{mode:0})}return m}(),children:"Issue Pass"}),(0,e.createComponentVNode)(2,t.Tabs.Tab,{icon:"scroll",selected:c.showlogs,onClick:function(){function m(){return l("mode",{mode:1})}return m}(),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 m(){return l("scan")}return m}()})})})})}),(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 m(){return l("giv_name")}return m}()})}),(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 m(){return l("reason")}return m}()})}),(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 m(){return l("duration")}return m}()})})]})})}),!c.showlogs&&(c.scan_name?(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,f.AccessList,{sectionButtons:(0,e.createComponentVNode)(2,t.Button,{icon:"id-card",content:c.printmsg,disabled:!c.canprint,onClick:function(){function m(){return l("issue")}return m}()}),grantableList:c.grantableList,accesses:c.regions,selectedList:c.selectedAccess,accessMod:function(){function m(i){return l("access",{access:i})}return m}(),grantAll:function(){function m(){return l("grant_all")}return m}(),denyAll:function(){function m(){return l("clear_all")}return m}(),grantDep:function(){function m(i){return l("grant_region",{region:i})}return m}(),denyDep:function(){function m(i){return l("deny_region",{region:i})}return m}()})}):(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 m(){return l("print")}return m}()}),children:!!c.issue_log.length&&(0,e.createComponentVNode)(2,t.LabeledList,{children:c.issue_log.map(function(m,i){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{children:m},i)})})||(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),f=[1,5,10,20,30,50],b=null,y=r.HandheldChemDispenser=function(){function g(l,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 g}(),B=function(l,c){var m=(0,a.useBackend)(c),i=m.act,u=m.data,s=u.amount,d=u.energy,v=u.maxEnergy,h=u.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:d,minValue:0,maxValue:v,ranges:{good:[v*.5,1/0],average:[v*.25,v*.5],bad:[-1/0,v*.25]},children:[d," / ",v," Units"]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Amount",verticalAlign:"middle",children:(0,e.createComponentVNode)(2,t.Stack,{children:f.map(function(C,p){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===C,content:C,onClick:function(){function N(){return i("amount",{amount:C})}return N}()})},p)})})}),(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:h==="dispense",content:"Dispense",m:"0",width:"32%",onClick:function(){function C(){return i("mode",{mode:"dispense"})}return C}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"cog",selected:h==="remove",content:"Remove",m:"0",width:"32%",onClick:function(){function C(){return i("mode",{mode:"remove"})}return C}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"cog",selected:h==="isolate",content:"Isolate",m:"0",width:"32%",onClick:function(){function C(){return i("mode",{mode:"isolate"})}return C}()})]})})]})})})},k=function(l,c){for(var m=(0,a.useBackend)(c),i=m.act,u=m.data,s=u.chemicals,d=s===void 0?[]:s,v=u.current_reagent,h=[],C=0;C<(d.length+1)%3;C++)h.push(!0);return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,height:"18%",children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:u.glass?"Drink Selector":"Chemical Selector",children:[d.map(function(p,N){return(0,e.createComponentVNode)(2,t.Button,{width:"32%",icon:"arrow-circle-down",overflow:"hidden",textOverflow:"ellipsis",selected:v===p.id,content:p.title,style:{"margin-left":"2px"},onClick:function(){function V(){return i("dispense",{reagent:p.id})}return V}()},N)}),h.map(function(p,N){return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:"1",basis:"25%"},N)})]})})}},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),f=n(98595),b=r.HealthSensor=function(){function B(k,g){var l=(0,t.useBackend)(g),c=l.act,m=l.data,i=m.on,u=m.user_health,s=m.minHealth,d=m.maxHealth,v=m.alarm_health;return(0,e.createComponentVNode)(2,f.Window,{width:300,height:125,children:(0,e.createComponentVNode)(2,f.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:i?"On":"Off",color:i?null:"red",selected:i,onClick:function(){function h(){return c("scan_toggle")}return h}()})}),(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:d,value:v,format:function(){function h(C){return(0,a.toFixed)(C,1)}return h}(),width:"80px",onDrag:function(){function h(C,p){return c("alarm_health",{alarm_health:p})}return h}()})}),u!==null&&(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"User health",children:(0,e.createComponentVNode)(2,o.Box,{color:y(u),bold:u>=100,children:(0,e.createComponentVNode)(2,o.AnimatedNumber,{value:u})})})]})})})})}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),f=r.Holodeck=function(){function y(B,k){var g=(0,a.useBackend)(k),l=g.act,c=g.data,m=(0,a.useLocalState)(k,"currentDeck",""),i=m[0],u=m[1],s=(0,a.useLocalState)(k,"showReload",!1),d=s[0],v=s[1],h=c.decks,C=c.ai_override,p=c.emagged,N=function(){function V(S){l("select_deck",{deck:S}),u(S),v(!0),setTimeout(function(){v(!1)},3e3)}return V}();return(0,e.createComponentVNode)(2,o.Window,{width:400,height:320,children:[d&&(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)," ",i]})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Available Programs",children:[h.map(function(V){return(0,e.createComponentVNode)(2,t.Button,{width:15.5,color:"transparent",content:V,selected:V===i,onClick:function(){function S(){return N(V)}return S}()},V)}),(0,e.createVNode)(1,"hr",null,null,1,{color:"gray"}),(0,e.createComponentVNode)(2,t.LabeledList,{children:[!!C&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Override Protocols",children:(0,e.createComponentVNode)(2,t.Button,{content:p?"Turn On":"Turn Off",color:p?"good":"bad",onClick:function(){function V(){return l("ai_override")}return V}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Safety Protocols",children:(0,e.createComponentVNode)(2,t.Box,{color:p?"bad":"good",children:[p?"Off":"On",!!p&&(0,e.createComponentVNode)(2,t.Button,{ml:9.5,width:15.5,color:"red",content:"Wildlife Simulation",onClick:function(){function V(){return l("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),f=n(98595),b=r.Instrument=function(){function l(c,m){var i=(0,t.useBackend)(m),u=i.act,s=i.data;return(0,e.createComponentVNode)(2,f.Window,{width:600,height:505,children:[(0,e.createComponentVNode)(2,y),(0,e.createComponentVNode)(2,f.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,B),(0,e.createComponentVNode)(2,g)]})})]})}return l}(),y=function(c,m){var i=(0,t.useBackend)(m),u=i.act,s=i.data,d=s.help;if(d)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 v(){return u("help")}return v}()})]})})})},B=function(c,m){var i=(0,t.useBackend)(m),u=i.act,s=i.data,d=s.lines,v=s.playing,h=s.repeat,C=s.maxRepeats,p=s.tempo,N=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 u("help")}return x}()}),(0,e.createComponentVNode)(2,o.Button,{icon:"file",content:"New",onClick:function(){function x(){return u("newsong")}return x}()}),(0,e.createComponentVNode)(2,o.Button,{icon:"upload",content:"Import",onClick:function(){function x(){return u("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:v,disabled:d.length===0||h<0,icon:"play",content:"Play",onClick:function(){function x(){return u("play")}return x}()}),(0,e.createComponentVNode)(2,o.Button,{disabled:!v,icon:"stop",content:"Stop",onClick:function(){function x(){return u("stop")}return x}()})]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Repeat",children:(0,e.createComponentVNode)(2,o.Slider,{animated:!0,minValue:0,maxValue:C,value:h,stepPixelSize:59,onChange:function(){function x(E,P){return u("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:p>=V,content:"-",as:"span",mr:"0.5rem",onClick:function(){function x(){return u("tempo",{new:p+S})}return x}()}),(0,a.round)(600/p)," BPM",(0,e.createComponentVNode)(2,o.Button,{disabled:p<=N,content:"+",as:"span",ml:"0.5rem",onClick:function(){function x(){return u("tempo",{new:p-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 u("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,m){var i=(0,t.useBackend)(m),u=i.act,s=i.data,d=s.allowedInstrumentNames,v=s.instrumentLoaded,h=s.instrument,C=s.canNoteShift,p=s.noteShift,N=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 D(M){return(0,a.round)(M*100)/100+" seconds"}return D}(),onChange:function(){function D(M,R){return u("setlinearfalloff",{new:R/10})}return D}()})):S===2&&(E="Exponential",P=(0,e.createComponentVNode)(2,o.Slider,{minValue:1.025,maxValue:10,value:L,step:.01,format:function(){function D(M){return(0,a.round)(M*1e3)/1e3+"% per decisecond"}return D}(),onChange:function(){function D(M,R){return u("setexpfalloff",{new:R})}return D}()})),d.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:v?(0,e.createComponentVNode)(2,o.Dropdown,{options:d,selected:h,width:"50%",onSelected:function(){function D(M){return u("switchinstrument",{name:M})}return D}()}):(0,e.createComponentVNode)(2,o.Box,{color:"bad",children:"None!"})}),!!(!w&&C)&&(0,e.createFragment)([(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Note Shift/Note Transpose",children:(0,e.createComponentVNode)(2,o.Slider,{minValue:N,maxValue:V,value:p,stepPixelSize:2,format:function(){function D(M){return M+" keys / "+(0,a.round)(M/12*100)/100+" octaves"}return D}(),onChange:function(){function D(M,R){return u("setnoteshift",{new:R})}return D}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Sustain Mode",children:[(0,e.createComponentVNode)(2,o.Dropdown,{options:["Linear","Exponential"],selected:E,mb:"0.4rem",onSelected:function(){function D(M){return u("setsustainmode",{new:M})}return D}()}),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 D(M,R){return u("setdropoffvolume",{new:R})}return D}()})}),(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 D(){return u("togglesustainhold")}return D}()})})],4)]}),(0,e.createComponentVNode)(2,o.Button,{icon:"redo",content:"Reset to Default",mt:"0.5rem",onClick:function(){function D(){return u("reset")}return D}()})]})})})},g=function(c,m){var i=(0,t.useBackend)(m),u=i.act,s=i.data,d=s.playing,v=s.lines,h=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:!h||d,icon:"plus",content:"Add Line",onClick:function(){function C(){return u("newline",{line:v.length+1})}return C}()}),(0,e.createComponentVNode)(2,o.Button,{selected:!h,icon:h?"chevron-up":"chevron-down",onClick:function(){function C(){return u("edit")}return C}()})],4),children:!!h&&(v.length>0?(0,e.createComponentVNode)(2,o.LabeledList,{children:v.map(function(C,p){return(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:p+1,buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Button,{disabled:d,icon:"pen",onClick:function(){function N(){return u("modifyline",{line:p+1})}return N}()}),(0,e.createComponentVNode)(2,o.Button,{disabled:d,icon:"trash",onClick:function(){function N(){return u("deleteline",{line:p+1})}return N}()})],4),children:C},p)})}):(0,e.createComponentVNode)(2,o.Box,{color:"label",children:"Song is empty."}))})}},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),f=n(98595),b=n(19203),y=n(51057),B=function(i){return i.key!==a.KEY.Alt&&i.key!==a.KEY.Control&&i.key!==a.KEY.Shift&&i.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"},g=3,l=function(i){var u="";if(i.altKey&&(u+="Alt"),i.ctrlKey&&(u+="Ctrl"),i.shiftKey&&!(i.keyCode>=48&&i.keyCode<=57)&&(u+="Shift"),i.location===g&&(u+="Numpad"),B(i))if(i.shiftKey&&i.keyCode>=48&&i.keyCode<=57){var s=i.keyCode-48;u+="Shift"+s}else{var d=i.key.toUpperCase();u+=k[d]||d}return u},c=r.KeyComboModal=function(){function m(i,u){var s=(0,t.useBackend)(u),d=s.act,v=s.data,h=v.init_value,C=v.large_buttons,p=v.message,N=p===void 0?"":p,V=v.title,S=v.timeout,I=(0,t.useLocalState)(u,"input",h),L=I[0],w=I[1],A=(0,t.useLocalState)(u,"binding",!0),x=A[0],E=A[1],P=function(){function R(O){if(!x){O.key===a.KEY.Enter&&d("submit",{entry:L}),(0,a.isEscape)(O.key)&&d("cancel");return}if(O.preventDefault(),B(O)){D(l(O)),E(!1);return}else if(O.key===a.KEY.Escape){D(h),E(!1);return}}return R}(),D=function(){function R(O){O!==L&&w(O)}return R}(),M=130+(N.length>30?Math.ceil(N.length/3):0)+(N.length&&C?5:0);return(0,e.createComponentVNode)(2,f.Window,{title:V,width:240,height:M,children:[S&&(0,e.createComponentVNode)(2,y.Loader,{value:S}),(0,e.createComponentVNode)(2,f.Window.Content,{onKeyDown:function(){function R(O){P(O)}return R}(),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:N})}),(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 R(){D(h),E(!0)}return R}()})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,b.InputButtons,{input:L})})]})]})})]})}return m}()},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),f=r.KeycardAuth=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,l=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(!l.swiping&&!l.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:!l.redAvailable,onClick:function(){function i(){return g("triggerevent",{triggerevent:"Red Alert"})}return i}(),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 i(){return g("triggerevent",{triggerevent:"Emergency Response Team"})}return i}(),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 i(){return g("triggerevent",{triggerevent:"Grant Emergency Maintenance Access"})}return i}(),content:"Grant"}),(0,e.createComponentVNode)(2,t.Button,{icon:"door-closed",onClick:function(){function i(){return g("triggerevent",{triggerevent:"Revoke Emergency Maintenance Access"})}return i}(),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 i(){return g("triggerevent",{triggerevent:"Activate Station-Wide Emergency Access"})}return i}(),content:"Grant"}),(0,e.createComponentVNode)(2,t.Button,{icon:"door-closed",onClick:function(){function i(){return g("triggerevent",{triggerevent:"Deactivate Station-Wide Emergency Access"})}return i}(),content:"Revoke"})]})]})})]})});var m=(0,e.createComponentVNode)(2,t.Box,{color:"red",children:"Waiting for YOU to swipe your ID..."});return!l.hasSwiped&&!l.ertreason&&l.event==="Emergency Response Team"?m=(0,e.createComponentVNode)(2,t.Box,{color:"red",children:"Fill out the reason for your ERT request."}):l.hasConfirm?m=(0,e.createComponentVNode)(2,t.Box,{color:"green",children:"Request Confirmed!"}):l.isRemote?m=(0,e.createComponentVNode)(2,t.Box,{color:"orange",children:"Swipe your card to CONFIRM the remote request."}):l.hasSwiped&&(m=(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,l.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:l.ertreason?"":"red",icon:l.ertreason?"check":"pencil-alt",content:l.ertreason?l.ertreason:"-----",disabled:l.busy,onClick:function(){function i(){return g("ert")}return i}()})})}),(0,e.createComponentVNode)(2,t.Section,{title:l.event,buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-circle-left",content:"Back",disabled:l.busy||l.hasConfirm,onClick:function(){function i(){return g("reset")}return i}()}),children:m})]})})}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),f=n(62411),b=r.KitchenMachine=function(){function B(k,g){var l=(0,a.useBackend)(g),c=l.data,m=l.config,i=c.ingredients,u=c.operating,s=m.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,f.Operating,{operating:u,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:i.map(function(d){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:d.name}),2),(0,e.createVNode)(1,"td",null,(0,e.createComponentVNode)(2,t.Table.Cell,{collapsing:!0,textAlign:"center",children:[d.amount," ",d.units]}),2)]},d.name)})})})})]})})})}return B}(),y=function(k,g){var l=(0,a.useBackend)(g),c=l.act,m=l.data,i=m.inactive,u=m.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:i,tooltip:i?u:"",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:i,tooltip:i?u:"",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),f=r.LawManager=function(){function k(g,l){var c=(0,a.useBackend)(l),m=c.act,i=c.data,u=i.isAdmin,s=i.isSlaved,d=i.isMalf,v=i.isAIMalf,h=i.view;return(0,e.createComponentVNode)(2,o.Window,{width:800,height:d?620:365,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[!!(u&&s)&&(0,e.createComponentVNode)(2,t.NoticeBox,{children:["This unit is slaved to ",s,"."]}),!!(d||v)&&(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Button,{content:"Law Management",selected:h===0,onClick:function(){function C(){return m("set_view",{set_view:0})}return C}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Lawsets",selected:h===1,onClick:function(){function C(){return m("set_view",{set_view:1})}return C}()})]}),h===0&&(0,e.createComponentVNode)(2,b),h===1&&(0,e.createComponentVNode)(2,y)]})})}return k}(),b=function(g,l){var c=(0,a.useBackend)(l),m=c.act,i=c.data,u=i.has_zeroth_laws,s=i.zeroth_laws,d=i.has_ion_laws,v=i.ion_laws,h=i.ion_law_nr,C=i.has_inherent_laws,p=i.inherent_laws,N=i.has_supplied_laws,V=i.supplied_laws,S=i.channels,I=i.channel,L=i.isMalf,w=i.isAdmin,A=i.zeroth_law,x=i.ion_law,E=i.inherent_law,P=i.supplied_law,D=i.supplied_law_position;return(0,e.createFragment)([!!u&&(0,e.createComponentVNode)(2,B,{title:"ERR_NULL_VALUE",laws:s,ctx:l}),!!d&&(0,e.createComponentVNode)(2,B,{title:h,laws:v,ctx:l}),!!C&&(0,e.createComponentVNode)(2,B,{title:"Inherent",laws:p,ctx:l}),!!N&&(0,e.createComponentVNode)(2,B,{title:"Supplied",laws:V,ctx:l}),(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 R(){return m("law_channel",{law_channel:M.channel})}return R}()},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 m("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 m("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&&!u)&&(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 m("change_zeroth_law")}return M}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Add",icon:"plus",onClick:function(){function M(){return m("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 m("change_ion_law")}return M}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Add",icon:"plus",onClick:function(){function M(){return m("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 m("change_inherent_law")}return M}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Add",icon:"plus",onClick:function(){function M(){return m("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:D,onClick:function(){function M(){return m("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 m("change_supplied_law")}return M}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Add",icon:"plus",onClick:function(){function M(){return m("add_supplied_law")}return M}()})]})]})]})})],0)},y=function(g,l){var c=(0,a.useBackend)(l),m=c.act,i=c.data,u=i.law_sets;return(0,e.createComponentVNode)(2,t.Box,{children:u.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 d(){return m("transfer_laws",{transfer_laws:s.ref})}return d}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[s.laws.has_ion_laws>0&&s.laws.ion_laws.map(function(d){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:d.index,children:d.law},d.index)}),s.laws.has_zeroth_laws>0&&s.laws.zeroth_laws.map(function(d){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:d.index,children:d.law},d.index)}),s.laws.has_inherent_laws>0&&s.laws.inherent_laws.map(function(d){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:d.index,children:d.law},d.index)}),s.laws.has_supplied_laws>0&&s.laws.inherent_laws.map(function(d){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:d.index,children:d.law},d.index)})]})},s.name)})})},B=function(g,l){var c=(0,a.useBackend)(g.ctx),m=c.act,i=c.data,u=i.isMalf;return(0,e.createComponentVNode)(2,t.Section,{title:g.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?"})]}),g.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 d(){return m("state_law",{ref:s.ref,state_law:s.state?0:1})}return d}()}),!!u&&(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{content:"Edit",icon:"pencil-alt",onClick:function(){function d(){return m("edit_law",{edit_law:s.ref})}return d}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Delete",icon:"trash",color:"red",onClick:function(){function d(){return m("delete_law",{delete_law:s.ref})}return d}()})],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),f=n(3939),b=r.LibraryComputer=function(){function h(C,p){return(0,e.createComponentVNode)(2,o.Window,{width:1050,height:600,children:[(0,e.createComponentVNode)(2,f.ComplexModal),(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,l),(0,e.createComponentVNode)(2,c)]})})]})}return h}(),y=function(C,p){var N=(0,a.useBackend)(p),V=N.act,S=N.data,I=C.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,f.modalOpen)(p,"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,f.modalOpen)(p,"rate_info",{bookid:I.id})}return w}()})]})},B=function(C,p){var N=(0,a.useBackend)(p),V=N.act,S=N.data,I=C.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(C,p){var N=(0,a.useBackend)(p),V=N.act,S=N.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"})]})]})},g=function(C,p){var N=(0,a.useBackend)(p),V=N.act,S=N.data,I=C.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}()})]})},l=function(C,p){var N=(0,a.useBackend)(p),V=N.data,S=(0,a.useLocalState)(p,"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(C,p){var N=(0,a.useLocalState)(p,"tabIndex",0),V=N[0];switch(V){case 0:return(0,e.createComponentVNode)(2,i);case 1:return(0,e.createComponentVNode)(2,u);case 2:return(0,e.createComponentVNode)(2,s);case 3:return(0,e.createComponentVNode)(2,d);case 4:return(0,e.createComponentVNode)(2,v);default:return"You are somehow on a tab that doesn't exist! Please let a coder know."}},m=function(C,p){var N=(0,a.useBackend)(p),V=N.act,S=N.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,f.modalOpen)(p,"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,f.modalOpen)(p,"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,f.modalOpen)(p,"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,f.modalOpen)(p,"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}()})]})]})},i=function(C,p){var N=(0,a.useBackend)(p),V=N.act,S=N.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,f.modalOpen)(p,"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,m),(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,f.modalOpen)(p,"expand_info",{bookid:x.id})}return E}()})]})]},x.id)})]})]})},u=function(C,p){var N=(0,a.useBackend)(p),V=N.act,S=N.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,f.modalOpen)(p,"expand_info",{bookid:w.id})}return x}()})]})]},A)})]})})},s=function(C,p){var N=(0,a.useBackend)(p),V=N.act,S=N.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,f.modalOpen)(p,"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,f.modalOpen)(p,"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,f.modalOpen)(p,"edit_selected_summary")}return x}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{children:I.summary})]})})]})]})},d=function(C,p){var N=(0,a.useBackend)(p),V=N.act,S=N.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)})]})})},v=function(C,p){var N=(0,a.useBackend)(p),V=N.act,S=N.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,f.modalRegisterBodyOverride)("expand_info",y),(0,f.modalRegisterBodyOverride)("report_book",B),(0,f.modalRegisterBodyOverride)("rate_info",g)},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),f=n(3939),b=r.LibraryManager=function(){function l(c,m){return(0,e.createComponentVNode)(2,o.Window,{width:600,height:600,children:[(0,e.createComponentVNode)(2,f.ComplexModal),(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,className:"Layout__content--flexColumn",children:(0,e.createComponentVNode)(2,y)})]})}return l}(),y=function(c,m){var i=(0,a.useBackend)(m),u=i.act,s=i.data,d=s.pagestate;switch(d){case 1:return(0,e.createComponentVNode)(2,B);case 2:return(0,e.createComponentVNode)(2,g);case 3:return(0,e.createComponentVNode)(2,k);default:return"WE SHOULDN'T BE HERE!"}},B=function(c,m){var i=(0,a.useBackend)(m),u=i.act,s=i.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 d(){return(0,f.modalOpen)(m,"specify_ssid_delete")}return d}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"user-slash",width:"auto",color:"danger",content:"Delete All Books By CKEY",onClick:function(){function d(){return(0,f.modalOpen)(m,"specify_ckey_delete")}return d}()}),(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,t.Button,{icon:"search",width:"auto",content:"View All Books By CKEY",onClick:function(){function d(){return(0,f.modalOpen)(m,"specify_ckey_search")}return d}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"search",width:"auto",content:"View All Reported Books",onClick:function(){function d(){return u("view_reported_books")}return d}()})]})},k=function(c,m){var i=(0,a.useBackend)(m),u=i.act,s=i.data,d=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 v(){return u("return")}return v}()}),(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"})]}),d.map(function(v){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:v.uploader_ckey}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:v.id}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"left",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"book"}),v.title]}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"left",children:v.author}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"left",children:v.report_description}),(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:v.reporter_ckey}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:[(0,e.createComponentVNode)(2,t.Button.Confirm,{content:"Delete",icon:"trash",onClick:function(){function h(){return u("delete_book",{bookid:v.id})}return h}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Unflag",icon:"flag",color:"caution",onClick:function(){function h(){return u("unflag_book",{bookid:v.id})}return h}()}),(0,e.createComponentVNode)(2,t.Button,{content:"View",onClick:function(){function h(){return u("view_book",{bookid:v.id})}return h}()})]})]},v.id)})]})})},g=function(c,m){var i=(0,a.useBackend)(m),u=i.act,s=i.data,d=s.ckey,v=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 ",d,(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 h(){return u("return")}return h}()}),(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"})]}),v.map(function(h){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(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:"right",children:[(0,e.createComponentVNode)(2,t.Button.Confirm,{content:"Delete",icon:"trash",color:"bad",onClick:function(){function C(){return u("delete_book",{bookid:h.id})}return C}()}),(0,e.createComponentVNode)(2,t.Button,{content:"View",onClick:function(){function C(){return u("view_book",{bookid:h.id})}return C}()})]})]},h.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),f=n(72253),b=n(92986),y=n(98595),B=r.ListInputModal=function(){function l(c,m){var i=(0,f.useBackend)(m),u=i.act,s=i.data,d=s.items,v=d===void 0?[]:d,h=s.message,C=h===void 0?"":h,p=s.init_value,N=s.timeout,V=s.title,S=(0,f.useLocalState)(m,"selected",v.indexOf(p)),I=S[0],L=S[1],w=(0,f.useLocalState)(m,"searchBarVisible",v.length>10),A=w[0],x=w[1],E=(0,f.useLocalState)(m,"searchQuery",""),P=E[0],D=E[1],M=function(){function G(X){var J=z.length-1;if(X===b.KEY_DOWN)if(I===null||I===J){var se;L(0),(se=document.getElementById("0"))==null||se.scrollIntoView()}else{var ie;L(I+1),(ie=document.getElementById((I+1).toString()))==null||ie.scrollIntoView()}else if(X===b.KEY_UP)if(I===null||I===0){var me;L(J),(me=document.getElementById(J.toString()))==null||me.scrollIntoView()}else{var q;L(I-1),(q=document.getElementById((I-1).toString()))==null||q.scrollIntoView()}}return G}(),R=function(){function G(X){X!==I&&L(X)}return G}(),O=function(){function G(){x(!1),x(!0)}return G}(),F=function(){function G(X){var J=String.fromCharCode(X),se=v.find(function(q){return q==null?void 0:q.toLowerCase().startsWith(J==null?void 0:J.toLowerCase())});if(se){var ie,me=v.indexOf(se);L(me),(ie=document.getElementById(me.toString()))==null||ie.scrollIntoView()}}return G}(),_=function(){function G(X){var J;X!==P&&(D(X),L(0),(J=document.getElementById("0"))==null||J.scrollIntoView())}return G}(),U=function(){function G(){x(!A),D("")}return G}(),z=v.filter(function(G){return G==null?void 0:G.toLowerCase().includes(P.toLowerCase())}),$=330+Math.ceil(C.length/3);return A||setTimeout(function(){var G;return(G=document.getElementById(I.toString()))==null?void 0:G.focus()},1),(0,e.createComponentVNode)(2,y.Window,{title:V,width:325,height:$,children:[N&&(0,e.createComponentVNode)(2,a.Loader,{value:N}),(0,e.createComponentVNode)(2,y.Window.Content,{onKeyDown:function(){function G(X){var J=window.event?X.which:X.keyCode;(J===b.KEY_DOWN||J===b.KEY_UP)&&(X.preventDefault(),M(J)),J===b.KEY_ENTER&&(X.preventDefault(),u("submit",{entry:z[I]})),!A&&J>=b.KEY_A&&J<=b.KEY_Z&&(X.preventDefault(),F(J)),J===b.KEY_ESCAPE&&(X.preventDefault(),u("cancel"))}return G}(),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 G(){return U()}return G}()}),className:"ListInput__Section",fill:!0,title:C,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:z,onClick:R,onFocusSearch:O,searchBarVisible:A,selected:I})}),(0,e.createComponentVNode)(2,o.Stack.Item,{m:0,children:A&&(0,e.createComponentVNode)(2,g,{filteredItems:z,onSearch:_,searchQuery:P,selected:I})}),(0,e.createComponentVNode)(2,o.Stack.Item,{mt:.5,children:(0,e.createComponentVNode)(2,t.InputButtons,{input:z[I]})})]})})})]})}return l}(),k=function(c,m){var i=(0,f.useBackend)(m),u=i.act,s=c.filteredItems,d=c.onClick,v=c.onFocusSearch,h=c.searchBarVisible,C=c.selected;return(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,tabIndex:0,children:s.map(function(p,N){return(0,e.createComponentVNode)(2,o.Button,{fluid:!0,color:"transparent",id:N,onClick:function(){function V(){return d(N)}return V}(),onDblClick:function(){function V(S){S.preventDefault(),u("submit",{entry:s[C]})}return V}(),onKeyDown:function(){function V(S){var I=window.event?S.which:S.keyCode;h&&I>=b.KEY_A&&I<=b.KEY_Z&&(S.preventDefault(),v())}return V}(),selected:N===C,style:{animation:"none",transition:"none"},children:p.replace(/^\w/,function(V){return V.toUpperCase()})},N)})})},g=function(c,m){var i=(0,f.useBackend)(m),u=i.act,s=c.filteredItems,d=c.onSearch,v=c.searchQuery,h=c.selected;return(0,e.createComponentVNode)(2,o.Input,{width:"100%",autoFocus:!0,autoSelect:!0,onEnter:function(){function C(p){p.preventDefault(),u("submit",{entry:s[h]})}return C}(),onInput:function(){function C(p,N){return d(N)}return C}(),placeholder:"Search...",value:v})}},26826:function(T,r,n){"use strict";r.__esModule=!0,r.Loadout=void 0;var e=n(89005),a=n(25328),t=n(72253),o=n(36036),f=n(98595),b={Default:function(){function c(m,i){return m.gear.gear_tier-i.gear.gear_tier}return c}(),Alphabetical:function(){function c(m,i){return m.gear.name.toLowerCase().localeCompare(i.gear.name.toLowerCase())}return c}(),Cost:function(){function c(m,i){return m.gear.cost-i.gear.cost}return c}()},y=r.Loadout=function(){function c(m,i){var u=(0,t.useBackend)(i),s=u.act,d=u.data,v=(0,t.useLocalState)(i,"search",!1),h=v[0],C=v[1],p=(0,t.useLocalState)(i,"searchText",""),N=p[0],V=p[1],S=(0,t.useLocalState)(i,"category",Object.keys(d.gears)[0]),I=S[0],L=S[1],w=(0,t.useLocalState)(i,"tweakedGear",""),A=w[0],x=w[1];return(0,e.createComponentVNode)(2,f.Window,{width:1105,height:650,children:[A&&(0,e.createComponentVNode)(2,l,{tweakedGear:A,setTweakedGear:x}),(0,e.createComponentVNode)(2,f.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,B,{category:I,setCategory:L})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"25%",children:(0,e.createComponentVNode)(2,g,{setTweakedGear:x})}),(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"75%",children:(0,e.createComponentVNode)(2,k,{category:I,search:h,setSearch:C,searchText:N,setSearchText:V})})]})})]})})]})}return c}(),B=function(m,i){var u=(0,t.useBackend)(i),s=u.act,d=u.data,v=m.category,h=m.setCategory;return(0,e.createComponentVNode)(2,o.Tabs,{fluid:!0,textAlign:"center",style:{"flex-wrap":"wrap-reverse"},children:Object.keys(d.gears).map(function(C){return(0,e.createComponentVNode)(2,o.Tabs.Tab,{selected:C===v,style:{"white-space":"nowrap"},onClick:function(){function p(){return h(C)}return p}(),children:C},C)})})},k=function(m,i){var u=(0,t.useBackend)(i),s=u.act,d=u.data,v=d.user_tier,h=d.gear_slots,C=d.max_gear_slots,p=m.category,N=m.search,V=m.setSearch,S=m.searchText,I=m.setSearchText,L=(0,t.useLocalState)(i,"sortType","Default"),w=L[0],A=L[1],x=(0,t.useLocalState)(i,"sortReverse",!1),E=x[0],P=x[1],D=(0,a.createSearch)(S,function(R){return R.name}),M;return S.length>2?M=Object.entries(d.gears).reduce(function(R,O){var F=O[0],_=O[1];return R.concat(Object.entries(_).map(function(U){var z=U[0],$=U[1];return{key:z,gear:$}}))},[]).filter(function(R){var O=R.gear;return D(O)}):M=Object.entries(d.gears[p]).map(function(R){var O=R[0],F=R[1];return{key:O,gear:F}}),M.sort(b[w]),E&&(M=M.reverse()),(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:p,buttons:(0,e.createComponentVNode)(2,o.Stack,{children:[(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Dropdown,{height:1.66,selected:w,options:Object.keys(b),onSelected:function(){function R(O){return A(O)}return R}()})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Button,{icon:E?"arrow-down-wide-short":"arrow-down-short-wide",tooltip:E?"Ascending order":"Descending order",tooltipPosition:"bottom-end",onClick:function(){function R(){return P(!E)}return R}()})}),N&&(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Input,{width:20,placeholder:"Search...",value:S,onInput:function(){function R(O){return I(O.target.value)}return R}()})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Button,{icon:"magnifying-glass",selected:N,tooltip:"Toggle search field",tooltipPosition:"bottom-end",onClick:function(){function R(){V(!N),I("")}return R}()})})]}),children:M.map(function(R){var O=R.key,F=R.gear,_=12,U=Object.keys(d.selected_gears).includes(O),z=F.cost===1?F.cost+" Point":F.cost+" Points",$=(0,e.createComponentVNode)(2,o.Box,{children:[F.name.length>_&&(0,e.createComponentVNode)(2,o.Box,{children:F.name}),F.gear_tier>v&&(0,e.createComponentVNode)(2,o.Box,{mt:F.name.length>_&&1.5,textColor:"red",children:"That gear is only available at a higher donation tier than you are on."})]}),G=(0,e.createFragment)([F.allowed_roles&&(0,e.createComponentVNode)(2,o.Button,{width:"22px",color:"transparent",icon:"user",tooltip:(0,e.createComponentVNode)(2,o.Section,{m:-1,title:"Allowed Roles",children:F.allowed_roles.map(function(J){return(0,e.createComponentVNode)(2,o.Box,{children:J},J)})}),tooltipPosition:"left"}),Object.entries(F.tweaks).map(function(J){var se=J[0],ie=J[1];return ie.map(function(me){return(0,e.createComponentVNode)(2,o.Button,{width:"22px",color:"transparent",icon:me.icon,tooltip:me.tooltip,tooltipPosition:"top"},se)})}),(0,e.createComponentVNode)(2,o.Button,{width:"22px",color:"transparent",icon:"info",tooltip:F.desc,tooltipPosition:"top"})],0),X=(0,e.createComponentVNode)(2,o.Box,{class:"Loadout-InfoBox",children:[(0,e.createComponentVNode)(2,o.Box,{style:{"flex-grow":1},fontSize:1,color:"gold",opacity:.75,children:F.gear_tier>0&&"Tier "+F.gear_tier}),(0,e.createComponentVNode)(2,o.Box,{fontSize:.75,opacity:.66,children:z})]});return(0,e.createComponentVNode)(2,o.ImageButton,{m:.5,imageSize:84,dmIcon:F.icon,dmIconState:F.icon_state,tooltip:(F.name.length>_||F.gear_tier>0)&&$,tooltipPosition:"bottom",selected:U,disabled:F.gear_tier>v||h+F.cost>C&&!U,buttons:G,buttonsAlt:X,onClick:function(){function J(){return s("toggle_gear",{gear:O})}return J}(),children:F.name},O)})})},g=function(m,i){var u=(0,t.useBackend)(i),s=u.act,d=u.data,v=m.setTweakedGear,h=Object.entries(d.gears).reduce(function(C,p){var N=p[0],V=p[1],S=Object.entries(V).filter(function(I){var L=I[0];return Object.keys(d.selected_gears).includes(L)}).map(function(I){var L=I[0],w=I[1];return Object.assign({key:L},w)});return C.concat(S)},[]);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,{fill:!0,scrollable:!0,title:"Selected Equipment",buttons:(0,e.createComponentVNode)(2,o.Button.Confirm,{icon:"trash",tooltip:"Clear Loadout",tooltipPosition:"bottom-end",onClick:function(){function C(){return s("clear_loadout")}return C}()}),children:h.map(function(C){return(0,e.createComponentVNode)(2,o.ImageButton,{fluid:!0,imageSize:32,dmIcon:C.icon,dmIconState:C.icon_state,buttons:(0,e.createFragment)([Object.entries(C.tweaks).length>0&&(0,e.createComponentVNode)(2,o.Button,{translucent:!0,icon:"gears",iconColor:"gray",width:"33px",onClick:function(){function p(){return v(C)}return p}()}),(0,e.createComponentVNode)(2,o.Button,{translucent:!0,icon:"times",iconColor:"red",width:"32px",onClick:function(){function p(){return s("toggle_gear",{gear:C.key})}return p}()})],0),children:C.name},C.key)})})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Section,{children:(0,e.createComponentVNode)(2,o.ProgressBar,{value:d.gear_slots,maxValue:d.max_gear_slots,ranges:{bad:[d.max_gear_slots,1/0],average:[d.max_gear_slots*.66,d.max_gear_slots],good:[0,d.max_gear_slots*.66]},children:(0,e.createComponentVNode)(2,o.Box,{textAlign:"center",children:["Used points ",d.gear_slots,"/",d.max_gear_slots]})})})})]})},l=function(m,i){var u=(0,t.useBackend)(i),s=u.act,d=u.data,v=m.tweakedGear,h=m.setTweakedGear;return(0,e.createComponentVNode)(2,o.Dimmer,{children:(0,e.createComponentVNode)(2,o.Box,{className:"Loadout-Modal__background",children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,width:20,height:20,title:v.name,buttons:(0,e.createComponentVNode)(2,o.Button,{color:"red",icon:"times",tooltip:"Close",tooltipPosition:"top",onClick:function(){function C(){return h("")}return C}()}),children:(0,e.createComponentVNode)(2,o.LabeledList,{children:Object.entries(v.tweaks).map(function(C){var p=C[0],N=C[1];return N.map(function(V){var S=d.selected_gears[v.key][p];return(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:V.name,color:S?"":"gray",buttons:(0,e.createComponentVNode)(2,o.Button,{color:"transparent",icon:"pen",onClick:function(){function I(){return s("set_tweak",{gear:v.key,tweak:p})}return I}()}),children:[S||"Default",(0,e.createComponentVNode)(2,o.Box,{inline:!0,ml:1,width:1,height:1,verticalAlign:"middle",style:{"background-color":""+S}})]},p)})})})})})})}},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),f=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 D(M,R){return P("configure",{key:w,value:R,ref:x})}return D}()})},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 D(){return P("configure",{key:w,value:!A,ref:x})}return D}()})},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 D(){return P("configure",{key:w,ref:x})}return D}()}),(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),D=P.act;return(0,e.createComponentVNode)(2,t.Dropdown,{displayText:A,options:x,onSelected:function(){function M(R){return D("configure",{key:w,value:R,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,D=I.module_ref,M={number:(0,e.normalizeProps)((0,e.createComponentVNode)(2,f,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]]})},g=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})})]})},l=function(I,L){var w=I.active,A=I.userhealth,x=I.usermaxhealth,E=I.userbrute,P=I.userburn,D=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?D/x:0,ranges:{good:[-1/0,.2],average:[.2,.5],bad:[.5,1/0]},children:(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:w?D: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,D=I.statusbrute,M=I.statusburn,R=I.statustoxin,O=I.statusoxy,F=I.statustemp,_=I.statusnutrition,U=I.statusfingerprints,z=I.statusdna,$=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?D/P:0,ranges:{good:[-1/0,.2],average:[.2,.5],bad:[.5,1/0]},children:(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:w?D: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?R/P:0,ranges:{good:[-1/0,.2],average:[.2,.5],bad:[.5,1/0]},children:(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:R})})})}),(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?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,{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?_: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?z:"???"})]})}),!!w&&!!$&&(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"})})]}),$.map(function(G){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:G.name}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:G.type}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:[G.stage,"/",G.maxstage]}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:G.cure})]},G.name)})]})})],0)},m={rad_counter:g,health_analyzer:l,status_readout:c},i=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"})]})},u=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"})})})]})})},d=function(I){switch(I){case 1:return"Use";case 2:return"Toggle";case 3:return"Select"}},v=function(I,L){var w=(0,a.useBackend)(L),A=w.act,x=w.data,E=x.active,P=x.malfunctioning,D=x.locked,M=x.open,R=x.selected_module,O=x.complexity,F=x.complexity_max,_=x.wearer_name,U=x.wearer_job,z=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 $(){return A("activate")}return $}()}),children:z}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"ID Lock",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:D?"lock-open":"lock",content:D?"Unlock":"Lock",onClick:function(){function $(){return A("lock")}return $}()}),children:D?"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:R||"None"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Complexity",children:[O," (",F,")"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Occupant",children:[_,", ",U]})]})})},h=function(I,L){var w=(0,a.useBackend)(L),A=w.act,x=w.data,E=x.active,P=x.control,D=x.helmet,M=x.chestplate,R=x.gauntlets,O=x.boots,F=x.core,_=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:D||"None"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Chestplate",children:M||"None"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Gauntlets",children:R||"None"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Boots",children:O||"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:_/100,content:_+"%",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"})})]})},C=function(I,L){var w=(0,a.useBackend)(L),A=w.act,x=w.data,E=x.active,P=x.modules,D=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:D.length!==0&&D.map(function(M){var R=m[M.id];return(0,e.createComponentVNode)(2,t.Stack.Item,{children:[!E&&(0,e.createComponentVNode)(2,u),(0,e.normalizeProps)((0,e.createComponentVNode)(2,R,Object.assign({},M,{active:E})))]},M.ref)})||(0,e.createComponentVNode)(2,t.Box,{textAlign:"center",children:"No Info Modules Detected"})})})},p=function(I,L){var w=(0,a.useBackend)(L),A=w.act,x=w.data,E=x.complexity_max,P=x.modules,D=(0,a.useLocalState)(L,"module_configuration",null),M=D[0],R=D[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(O){return(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Collapsible,{title:O.module_name,children:(0,e.createComponentVNode)(2,t.Section,{children:[M===O.ref&&(0,e.createComponentVNode)(2,s,{configuration_data:O.configuration_data,module_ref:O.ref,onExit:function(){function F(){return R(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:[O.module_complexity,"/",E]}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:O.idle_power}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:O.active_power}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:O.use_power}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:[O.cooldown>0&&O.cooldown/10||"0","/",O.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:O.ref})}return F}(),icon:"bullseye",selected:O.module_active,tooltip:d(O.module_type),tooltipPosition:"left",disabled:!O.module_type}),(0,e.createComponentVNode)(2,t.Button,{onClick:function(){function F(){return R(O.ref)}return F}(),icon:"cog",selected:M===O.ref,tooltip:"Configure",tooltipPosition:"left",disabled:O.configuration_data.length===0}),(0,e.createComponentVNode)(2,t.Button,{onClick:function(){function F(){return A("pin",{ref:O.ref})}return F}(),icon:"thumbtack",selected:O.pinned,tooltip:"Pin",tooltipPosition:"left",disabled:!O.module_type})]})]})]}),(0,e.createComponentVNode)(2,t.Box,{children:O.description})]})})},O.ref)})||(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Box,{textAlign:"center",children:"No Modules Detected"})})})})},N=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,i)||(0,e.createComponentVNode)(2,t.Stack,{vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,v)}),(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,C)}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,p)})]})})}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,N)})})})}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),f=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(g,l){var c=(0,t.useBackend)(l),m=c.act,i=c.data,u=i.autolink,s=i.code,d=i.frequency,v=i.linkedMagnets,h=i.magnetConfiguration,C=i.path,p=i.pathPosition,N=i.probing,V=i.powerState,S=i.speed;return(0,e.createComponentVNode)(2,f.Window,{width:400,height:600,children:[(0,e.createComponentVNode)(2,b.ComplexModal),(0,e.createComponentVNode)(2,f.Window.Content,{scrollable:!0,children:[!u&&(0,e.createComponentVNode)(2,o.Section,{buttons:(0,e.createComponentVNode)(2,o.Button,{content:"Probe",icon:N?"spinner":"sync",iconSpin:!!N,disabled:N,onClick:function(){function I(){return m("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)(d/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 m("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 m("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 m("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 m("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)(l,"path_custom_input")}return I}()}),(0,e.createComponentVNode)(2,o.BlockQuote,{children:C.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===p,icon:A,confirmIcon:A,confirmContent:"",tooltip:x,onClick:function(){function E(){return m("path_remove",{index:L+1,code:I})}return E}()},L)})})]})]})}),v.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 m("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:h.electricityLevel.min,maxValue:h.electricityLevel.max,onChange:function(){function P(D,M){return m("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:h.magneticField.min,maxValue:h.magneticField.max,onChange:function(){function P(D,M){return m("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),f=r.MechBayConsole=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,l=k.data,c=l.recharge_port,m=c&&c.mech,i=m&&m.cell,u=m&&m.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:u?"Mech status: "+u:"Mech status",textAlign:"center",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"sync",content:"Sync",onClick:function(){function s(){return g("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."})||!m&&(0,e.createComponentVNode)(2,t.NoticeBox,{children:"No mech detected."})||(0,e.createComponentVNode)(2,t.ProgressBar,{value:m.health/m.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."})||!m&&(0,e.createComponentVNode)(2,t.NoticeBox,{children:"No mech detected."})||!i&&(0,e.createComponentVNode)(2,t.NoticeBox,{children:"No cell is installed."})||(0,e.createComponentVNode)(2,t.ProgressBar,{value:i.charge/i.maxcharge,ranges:{good:[.7,1/0],average:[.3,.7],bad:[-1/0,.3]},children:[(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:i.charge})," / "+i.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),f=n(98595),b=n(25328),y=r.MechaControlConsole=function(){function B(k,g){var l=(0,t.useBackend)(g),c=l.act,m=l.data,i=m.beacons,u=m.stored_data;return u.length?(0,e.createComponentVNode)(2,f.Window,{width:420,height:500,children:(0,e.createComponentVNode)(2,f.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:u.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,f.Window,{width:420,height:500,children:(0,e.createComponentVNode)(2,f.Window.Content,{scrollable:!0,children:i.length&&i.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 d(){return c("send_message",{mt:s.uid})}return d}(),children:"Message"}),(0,e.createComponentVNode)(2,o.Button,{icon:"eye",onClick:function(){function d(){return c("get_log",{mt:s.uid})}return d}(),children:"View Log"}),(0,e.createComponentVNode)(2,o.Button.Confirm,{color:"red",content:"Sabotage",icon:"bomb",onClick:function(){function d(){return c("shock",{mt:s.uid})}return d}()})],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),f=n(3939),b=n(98595),y=n(321),B=n(5485),k=n(22091),g={Minor:"lightgray",Medium:"good",Harmful:"average","Dangerous!":"bad","BIOHAZARD THREAT!":"darkred"},l={"*Deceased*":"deceased","*SSD*":"ssd","Physically Unfit":"physically_unfit",Disabled:"disabled"},c=function(A,x){(0,f.modalOpen)(A,"edit",{field:x.edit,value:x.value})},m=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:g[E.severity],children:E.severity})]})})})},i=r.MedicalRecords=function(){function w(A,x){var E=(0,t.useBackend)(x),P=E.data,D=P.loginState,M=P.screen;if(!D.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 R;return M===2?R=(0,e.createComponentVNode)(2,u):M===3?R=(0,e.createComponentVNode)(2,s):M===4?R=(0,e.createComponentVNode)(2,d):M===5?R=(0,e.createComponentVNode)(2,p):M===6?R=(0,e.createComponentVNode)(2,N):M===7&&(R=(0,e.createComponentVNode)(2,V)),(0,e.createComponentVNode)(2,b.Window,{width:800,height:900,children:[(0,e.createComponentVNode)(2,f.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),R]})})]})}return w}(),u=function(A,x){var E=(0,t.useBackend)(x),P=E.act,D=E.data,M=D.records,R=(0,t.useLocalState)(x,"searchText",""),O=R[0],F=R[1],_=(0,t.useLocalState)(x,"sortId","name"),U=_[0],z=_[1],$=(0,t.useLocalState)(x,"sortOrder",!0),G=$[0],X=$[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 J(){return P("screen",{screen:3})}return J}()})}),(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 J(se,ie){return F(ie)}return J}()})})]})}),(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)(O,function(J){return J.name+"|"+J.id+"|"+J.rank+"|"+J.p_stat+"|"+J.m_stat})).sort(function(J,se){var ie=G?1:-1;return J[U].localeCompare(se[U])*ie}).map(function(J){return(0,e.createComponentVNode)(2,o.Table.Row,{className:"MedicalRecords__listRow--"+l[J.p_stat],onClick:function(){function se(){return P("view_record",{view_record:J.ref})}return se}(),children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:[(0,e.createComponentVNode)(2,o.Icon,{name:"user"})," ",J.name]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:J.id}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:J.rank}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:J.p_stat}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:J.m_stat})]},J.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 D(){return P("del_all_med_records")}return D}()})})]})})},d=function(A,x){var E=(0,t.useBackend)(x),P=E.act,D=E.data,M=D.medical,R=D.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:R?"spinner":"print",disabled:R,iconSpin:!!R,content:"Print Record",ml:"0.5rem",onClick:function(){function O(){return P("print_record")}return O}()}),children:(0,e.createComponentVNode)(2,v)})}),!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 O(){return P("new_med_record")}return O}()}),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 O(){return P("del_med_record")}return O}()}),children:(0,e.createComponentVNode)(2,h)})}),(0,e.createComponentVNode)(2,C)],4)],0)},v=function(A,x){var E=(0,t.useBackend)(x),P=E.data,D=P.general;return!D||!D.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:D.fields.map(function(M,R){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 O(){return c(x,M)}return O}()})]},R)})})}),!!D.has_photos&&D.photos.map(function(M,R){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 #",R+1]},R)})]})},h=function(A,x){var E=(0,t.useBackend)(x),P=E.act,D=E.data,M=D.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(R,O){return(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:R.field,preserveWhitespace:!0,children:[(0,a.decodeHtmlEntities)(R.value),!!R.edit&&(0,e.createComponentVNode)(2,o.Button,{icon:"pen",ml:"0.5rem",mb:R.line_break?"1rem":"initial",onClick:function(){function F(){return c(x,R)}return F}()})]},O)})})})})},C=function(A,x){var E=(0,t.useBackend)(x),P=E.act,D=E.data,M=D.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 R(){return(0,f.modalOpen)(x,"add_comment")}return R}()}),children:M.comments.length===0?(0,e.createComponentVNode)(2,o.Box,{color:"label",children:"No comments found."}):M.comments.map(function(R,O){return(0,e.createComponentVNode)(2,o.Box,{children:[(0,e.createComponentVNode)(2,o.Box,{color:"label",inline:!0,children:R.header}),(0,e.createVNode)(1,"br"),R.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:O+1})}return F}()})]},O)})})})},p=function(A,x){var E=(0,t.useBackend)(x),P=E.act,D=E.data,M=D.virus,R=(0,t.useLocalState)(x,"searchText",""),O=R[0],F=R[1],_=(0,t.useLocalState)(x,"sortId2","name"),U=_[0],z=_[1],$=(0,t.useLocalState)(x,"sortOrder2",!0),G=$[0],X=$[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 J(se,ie){return F(ie)}return J}()})}),(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)(O,function(J){return J.name+"|"+J.max_stages+"|"+J.severity})).sort(function(J,se){var ie=G?1:-1;return J[U].localeCompare(se[U])*ie}).map(function(J){return(0,e.createComponentVNode)(2,o.Table.Row,{className:"MedicalRecords__listVirus--"+J.severity,onClick:function(){function se(){return P("vir",{vir:J.D})}return se}(),children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:[(0,e.createComponentVNode)(2,o.Icon,{name:"virus"})," ",J.name]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:J.max_stages}),(0,e.createComponentVNode)(2,o.Table.Cell,{color:g[J.severity],children:J.severity})]},J.id)})]})})})})],4)},N=function(A,x){var E=(0,t.useBackend)(x),P=E.act,D=E.data,M=D.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(R){return(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Section,{title:R.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:R.delivered,minValue:0,maxValue:R.deliverygoal,ranges:{good:[R.deliverygoal*.5,1/0],average:[R.deliverygoal*.25,R.deliverygoal*.5],bad:[-1/0,R.deliverygoal*.25]},children:[R.delivered," / ",R.deliverygoal," Units"]})})})}),(0,e.createComponentVNode)(2,o.Box,{children:R.report})]})},R.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,D=E.data,M=D.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(R){return(0,e.createComponentVNode)(2,o.Table.Row,{className:"MedicalRecords__listMedbot--"+R.on,children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:[(0,e.createComponentVNode)(2,o.Icon,{name:"medical"})," ",R.name]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:[R.area||"Unknown"," (",R.x,", ",R.y,")"]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:R.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:R.use_beaker?"Reservoir: "+R.total_volume+"/"+R.maximum_volume:"Using internal synthesizer"})]},R.id)})]})})})},S=function(A,x){var E=(0,t.useLocalState)(x,"sortId","name"),P=E[0],D=E[1],M=(0,t.useLocalState)(x,"sortOrder",!0),R=M[0],O=M[1],F=A.id,_=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?O(!R):(D(F),O(!0))}return U}(),children:[_,P===F&&(0,e.createComponentVNode)(2,o.Icon,{name:R?"sort-up":"sort-down",ml:"0.25rem;"})]})})},I=function(A,x){var E=(0,t.useLocalState)(x,"sortId2","name"),P=E[0],D=E[1],M=(0,t.useLocalState)(x,"sortOrder2",!0),R=M[0],O=M[1],F=A.id,_=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?O(!R):(D(F),O(!0))}return U}(),children:[_,P===F&&(0,e.createComponentVNode)(2,o.Icon,{name:R?"sort-up":"sort-down",ml:"0.25rem;"})]})})},L=function(A,x){var E=(0,t.useBackend)(x),P=E.act,D=E.data,M=D.screen,R=D.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 O(){P("screen",{screen:2})}return O}(),children:"List Records"}),(0,e.createComponentVNode)(2,o.Tabs.Tab,{icon:"database",selected:M===5,onClick:function(){function O(){P("screen",{screen:5})}return O}(),children:"Virus Database"}),(0,e.createComponentVNode)(2,o.Tabs.Tab,{icon:"vial",selected:M===6,onClick:function(){function O(){P("screen",{screen:6})}return O}(),children:"Virology Goals"}),(0,e.createComponentVNode)(2,o.Tabs.Tab,{icon:"plus-square",selected:M===7,onClick:function(){function O(){return P("screen",{screen:7})}return O}(),children:"Medibot Tracking"}),M===3&&(0,e.createComponentVNode)(2,o.Tabs.Tab,{icon:"wrench",selected:M===3,children:"Record Maintenance"}),M===4&&R&&!R.empty&&(0,e.createComponentVNode)(2,o.Tabs.Tab,{icon:"file",selected:M===4,children:["Record: ",R.fields[0].value]})]})})};(0,f.modalRegisterBodyOverride)("virus",m)},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),f=function(g,l){var c=(0,a.useBackend)(l),m=c.act,i=c.data,u=g.product,s=g.productImage,d=g.productCategory,v=i.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:u.name}),(0,e.createComponentVNode)(2,t.Table.Cell,{collapsing:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{disabled:u.price>v,icon:"shopping-cart",content:u.price,textAlign:"left",onClick:function(){function h(){return m("purchase",{name:u.name,category:d})}return h}()})})]})},b=function(g,l){var c=(0,a.useBackend)(l),m=c.data,i=(0,a.useLocalState)(l,"tabIndex",1),u=i[0],s=m.products,d=m.imagelist,v=["apparel","toy","decoration"];return(0,e.createComponentVNode)(2,t.Table,{children:s[v[u]].map(function(h){return(0,e.createComponentVNode)(2,f,{product:h,productImage:d[h.path],productCategory:v[u]},h.name)})})},y=r.MerchVendor=function(){function k(g,l){var c=(0,a.useBackend)(l),m=c.act,i=c.data,u=i.user_cash,s=i.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 d(){return m("change")}return d}()})],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.",u!==null&&(0,e.createComponentVNode)(2,t.Box,{mt:"0.5rem",children:["Your balance is ",(0,e.createVNode)(1,"b",null,[u||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(g,l){var c=(0,a.useBackend)(l),m=c.data,i=(0,a.useLocalState)(l,"tabIndex",1),u=i[0],s=i[1],d=m.login_state;return(0,e.createComponentVNode)(2,t.Tabs,{children:[(0,e.createComponentVNode)(2,t.Tabs.Tab,{icon:"dice",selected:u===1,onClick:function(){function v(){return s(1)}return v}(),children:"Toys"}),(0,e.createComponentVNode)(2,t.Tabs.Tab,{icon:"flag",selected:u===2,onClick:function(){function v(){return s(2)}return v}(),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),f=n(98595),b=["title","items","gridLayout"];function y(i,u){if(i==null)return{};var s={};for(var d in i)if({}.hasOwnProperty.call(i,d)){if(u.includes(d))continue;s[d]=i[d]}return s}var B={Alphabetical:function(){function i(u,s){return u-s}return i}(),Availability:function(){function i(u,s){return-(u.affordable-s.affordable)}return i}(),Price:function(){function i(u,s){return u.price-s.price}return i}()},k=r.MiningVendor=function(){function i(u,s){var d=(0,t.useLocalState)(s,"gridLayout",!1),v=d[0],h=d[1];return(0,e.createComponentVNode)(2,f.Window,{width:400,height:525,children:(0,e.createComponentVNode)(2,f.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,g),(0,e.createComponentVNode)(2,c,{gridLayout:v,setGridLayout:h}),(0,e.createComponentVNode)(2,l,{gridLayout:v})]})})})}return i}(),g=function(u,s){var d=(0,t.useBackend)(s),v=d.act,h=d.data,C=h.has_id,p=h.id;return(0,e.createComponentVNode)(2,o.NoticeBox,{success:C,children:C?(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Box,{inline:!0,verticalAlign:"middle",style:{float:"left"},children:["Logged in as ",p.name,".",(0,e.createVNode)(1,"br"),"You have ",p.points.toLocaleString("en-US")," points."]}),(0,e.createComponentVNode)(2,o.Button,{icon:"eject",content:"Eject ID",style:{float:"right"},onClick:function(){function N(){return v("logoff")}return N}()}),(0,e.createComponentVNode)(2,o.Box,{style:{clear:"both"}})],4):"Please insert an ID in order to make purchases."})},l=function(u,s){var d=(0,t.useBackend)(s),v=d.act,h=d.data,C=h.has_id,p=h.id,N=h.items,V=u.gridLayout,S=(0,t.useLocalState)(s,"search",""),I=S[0],L=S[1],w=(0,t.useLocalState)(s,"sort","Alphabetical"),A=w[0],x=w[1],E=(0,t.useLocalState)(s,"descending",!1),P=E[0],D=E[1],M=(0,a.createSearch)(I,function(F){return F[0]}),R=!1,O=Object.entries(N).map(function(F,_){var U=Object.entries(F[1]).filter(M).map(function(z){return z[1].affordable=C&&p.points>=z[1].price,z[1]}).sort(B[A]);if(U.length!==0)return P&&(U=U.reverse()),R=!0,(0,e.createComponentVNode)(2,m,{title:F[0],items:U,gridLayout:V},F[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:R?O:(0,e.createComponentVNode)(2,o.Box,{color:"label",children:"No items matching your criteria was found!"})})})},c=function(u,s){var d=u.gridLayout,v=u.setGridLayout,h=(0,t.useLocalState)(s,"search",""),C=h[0],p=h[1],N=(0,t.useLocalState)(s,"sort",""),V=N[0],S=N[1],I=(0,t.useLocalState)(s,"descending",!1),L=I[0],w=I[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 A(x,E){return p(E)}return A}()})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Button,{icon:d?"list":"table-cells-large",height:1.75,tooltip:d?"Toggle List Layout":"Toggle Grid Layout",tooltipPosition:"bottom-start",onClick:function(){function A(){return v(!d)}return A}()})}),(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 A(x){return S(x)}return A}()})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Button,{icon:L?"arrow-down":"arrow-up",height:1.75,tooltip:L?"Descending order":"Ascending order",tooltipPosition:"bottom-start",onClick:function(){function A(){return w(!L)}return A}()})})]})})},m=function(u,s){var d=(0,t.useBackend)(s),v=d.act,h=d.data,C=u.title,p=u.items,N=u.gridLayout,V=y(u,b);return(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Collapsible,Object.assign({open:!0,title:C},V,{children:p.map(function(S){return N?(0,e.createComponentVNode)(2,o.ImageButton,{mb:.5,imageSize:57.5,dmIcon:S.icon,dmIconState:S.icon_state,disabled:!h.has_id||h.id.points0&&(0,e.createComponentVNode)(2,o.Box,{className:"Newscaster__menuButton--unread",children:ae>=10?"9+":ae})}),(0,e.createComponentVNode)(2,s,{icon:"briefcase",title:"Job Openings",selected:O===1,onClick:function(){function le(){return x("jobs")}return le}()}),(0,e.createComponentVNode)(2,o.Divider)]}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:F.map(function(le){return(0,e.createComponentVNode)(2,s,{icon:le.icon,title:le.name,selected:O===2&&F[U-1]===le,onClick:function(){function Z(){return x("channel",{uid:le.uid})}return Z}(),children:le.unread>0&&(0,e.createComponentVNode)(2,o.Box,{className:"Newscaster__menuButton--unread",children:le.unread>=10?"9+":le.unread})},le)})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:[(0,e.createComponentVNode)(2,o.Divider),(!!P||!!D)&&(0,e.createFragment)([(0,e.createComponentVNode)(2,s,{security:!0,icon:"exclamation-circle",title:"Edit Wanted Notice",mb:"0.5rem",onClick:function(){function le(){return(0,y.modalOpen)(w,"wanted_notice")}return le}()}),(0,e.createComponentVNode)(2,s,{security:!0,icon:me?"minus-square":"minus-square-o",title:"Censor Mode: "+(me?"On":"Off"),mb:"0.5rem",onClick:function(){function le(){return q(!me)}return le}()}),(0,e.createComponentVNode)(2,o.Divider)],4),(0,e.createComponentVNode)(2,s,{icon:"pen-alt",title:"New Story",mb:"0.5rem",onClick:function(){function le(){return(0,y.modalOpen)(w,"create_story")}return le}()}),(0,e.createComponentVNode)(2,s,{icon:"plus-circle",title:"New Channel",onClick:function(){function le(){return(0,y.modalOpen)(w,"create_channel")}return le}()}),(0,e.createComponentVNode)(2,o.Divider),(0,e.createComponentVNode)(2,s,{icon:R?"spinner":"print",iconSpin:R,title:R?"Printing...":"Print Newspaper",onClick:function(){function le(){return x("print_newspaper")}return le}()}),(0,e.createComponentVNode)(2,s,{icon:M?"volume-mute":"volume-up",title:"Mute: "+(M?"On":"Off"),onClick:function(){function le(){return x("toggle_mute")}return le}()})]})]})}),(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,width:"100%",children:[(0,e.createComponentVNode)(2,B.TemporaryNotice),re]})]})})]})}return I}(),s=function(L,w){var A=(0,t.useBackend)(w),x=A.act,E=L.icon,P=E===void 0?"":E,D=L.iconSpin,M=L.selected,R=M===void 0?!1:M,O=L.security,F=O===void 0?!1:O,_=L.onClick,U=L.title,z=L.children,$=l(L,k);return(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Box,Object.assign({className:(0,a.classes)(["Newscaster__menuButton",R&&"Newscaster__menuButton--selected",F&&"Newscaster__menuButton--security"]),onClick:_},$,{children:[R&&(0,e.createComponentVNode)(2,o.Box,{className:"Newscaster__menuButton--selectedBar"}),(0,e.createComponentVNode)(2,o.Icon,{name:P,spin:D,size:"2"}),(0,e.createComponentVNode)(2,o.Box,{className:"Newscaster__menuButton--title",children:U}),z]})))},d=function(L,w){var A=(0,t.useBackend)(w),x=A.act,E=A.data,P=E.screen,D=E.is_admin,M=E.channel_idx,R=E.channel_can_manage,O=E.channels,F=E.stories,_=E.wanted,U=(0,t.useLocalState)(w,"fullStories",[]),z=U[0],$=U[1],G=(0,t.useLocalState)(w,"censorMode",!1),X=G[0],J=G[1],se=P===2&&M>-1?O[M-1]:null;return(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[!!_&&(0,e.createComponentVNode)(2,h,{story:_,wanted:!0}),(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Icon,{name:se?se.icon:"newspaper",mr:"0.5rem"}),se?se.name:"Headlines"],0),children:F.length>0?F.slice().reverse().map(function(ie){return!z.includes(ie.uid)&&ie.body.length+3>c?Object.assign({},ie,{body_short:ie.body.substr(0,c-4)+"..."}):ie}).map(function(ie,me){return(0,e.createComponentVNode)(2,h,{story:ie},me)}):(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."]})}),!!se&&(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)([X&&(0,e.createComponentVNode)(2,o.Button,{disabled:!!se.admin&&!D,selected:se.censored,icon:se.censored?"comment-slash":"comment",content:se.censored?"Uncensor Channel":"Censor Channel",mr:"0.5rem",onClick:function(){function ie(){return x("censor_channel",{uid:se.uid})}return ie}()}),(0,e.createComponentVNode)(2,o.Button,{disabled:!R,icon:"cog",content:"Manage",onClick:function(){function ie(){return(0,y.modalOpen)(w,"manage_channel",{uid:se.uid})}return ie}()})],0),children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Description",children:se.description||"N/A"}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Owner",children:se.author||"N/A"}),!!D&&(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Ckey",children:se.author_ckey}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Public",children:se.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(ie,me){return ie+me.view_count},0).toLocaleString()]})]})})]})},v=function(L,w){var A=(0,t.useBackend)(w),x=A.act,E=A.data,P=E.jobs,D=E.wanted,M=Object.entries(P).reduce(function(R,O){var F=O[0],_=O[1];return R+_.length},0);return(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[!!D&&(0,e.createComponentVNode)(2,h,{story:D,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?m.map(function(R){return Object.assign({},i[R],{id:R,jobs:P[R]})}).filter(function(R){return!!R&&R.jobs.length>0}).map(function(R){return(0,e.createComponentVNode)(2,o.Section,{className:(0,a.classes)(["Newscaster__jobCategory","Newscaster__jobCategory--"+R.id]),title:R.title,buttons:(0,e.createComponentVNode)(2,o.Box,{mt:"0.25rem",color:"label",children:R.fluff_text}),children:R.jobs.map(function(O){return(0,e.createComponentVNode)(2,o.Box,{class:(0,a.classes)(["Newscaster__jobOpening",!!O.is_command&&"Newscaster__jobOpening--command"]),children:["\u2022 ",O.title]},O.title)})},R.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."})]})]})},h=function(L,w){var A=(0,t.useBackend)(w),x=A.act,E=A.data,P=L.story,D=L.wanted,M=D===void 0?!1:D,R=E.is_admin,O=(0,t.useLocalState)(w,"fullStories",[]),F=O[0],_=O[1],U=(0,t.useLocalState)(w,"censorMode",!1),z=U[0],$=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&&z&&(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 G(){return x("censor_story",{uid:P.uid})}return G}()})}),(0,e.createComponentVNode)(2,o.Box,{inline:!0,children:[(0,e.createComponentVNode)(2,o.Icon,{name:"user"})," ",P.author," |\xA0",!!R&&(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,f.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,C,{name:"story_photo_"+P.uid+".png",float:"right",ml:"0.5rem"}),(P.body_short||P.body).split("\n").map(function(G,X){return(0,e.createComponentVNode)(2,o.Box,{children:G||(0,e.createVNode)(1,"br")},X)}),P.body_short&&(0,e.createComponentVNode)(2,o.Button,{content:"Read more..",mt:"0.5rem",onClick:function(){function G(){return _([].concat(F,[P.uid]))}return G}()}),(0,e.createComponentVNode)(2,o.Box,{clear:"right"})],0)})})},C=function(L,w){var A=L.name,x=l(L,g),E=(0,t.useLocalState)(w,"viewingPhoto",""),P=E[0],D=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 D(A)}return M}()},x)))},p=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}()})]})},N=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 D=L.id==="manage_channel",M=!!L.args.is_admin,R=L.args.scanned_user,O=(0,t.useLocalState)(w,"author",(P==null?void 0:P.author)||R||"Unknown"),F=O[0],_=O[1],U=(0,t.useLocalState)(w,"name",(P==null?void 0:P.name)||""),z=U[0],$=U[1],G=(0,t.useLocalState)(w,"description",(P==null?void 0:P.description)||""),X=G[0],J=G[1],se=(0,t.useLocalState)(w,"icon",(P==null?void 0:P.icon)||"newspaper"),ie=se[0],me=se[1],q=(0,t.useLocalState)(w,"isPublic",D?!!(P!=null&&P.public):!1),re=q[0],ae=q[1],le=(0,t.useLocalState)(w,"adminLocked",(P==null?void 0:P.admin)===1||!1),Z=le[0],ne=le[1];return(0,e.createComponentVNode)(2,o.Section,{m:"-1rem",pb:"1.5rem",title:D?"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,pe){return _(pe)}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:z,onInput:function(){function te(fe,pe){return $(pe)}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:X,onInput:function(){function te(fe,pe){return J(pe)}return te}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Icon",children:[(0,e.createComponentVNode)(2,o.Input,{disabled:!M,value:ie,width:"35%",mr:"0.5rem",onInput:function(){function te(fe,pe){return me(pe)}return te}()}),(0,e.createComponentVNode)(2,o.Icon,{name:ie,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:re,icon:re?"toggle-on":"toggle-off",content:re?"Yes":"No",onClick:function(){function te(){return ae(!re)}return te}()})}),M&&(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"CentComm Lock",verticalAlign:"top",children:(0,e.createComponentVNode)(2,o.Button,{selected:Z,icon:Z?"lock":"lock-open",content:Z?"On":"Off",tooltip:"Locking this channel will make it editable by nobody but CentComm officers.",tooltipPosition:"top",onClick:function(){function te(){return ne(!Z)}return te}()})})]})}),(0,e.createComponentVNode)(2,o.Button.Confirm,{disabled:F.trim().length===0||z.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:z.substr(0,49),description:X.substr(0,128),icon:ie,public:re?1:0,admin_locked:Z?1:0})}return te}()})]})},V=function(L,w){var A=(0,t.useBackend)(w),x=A.act,E=A.data,P=E.photo,D=E.channels,M=E.channel_idx,R=M===void 0?-1:M,O=!!L.args.is_admin,F=L.args.scanned_user,_=D.slice().sort(function(te,fe){if(R<0)return 0;var pe=D[R-1];if(pe.uid===te.uid)return-1;if(pe.uid===fe.uid)return 1}).filter(function(te){return O||!te.frozen&&(te.author===F||!!te.public)}),U=(0,t.useLocalState)(w,"author",F||"Unknown"),z=U[0],$=U[1],G=(0,t.useLocalState)(w,"channel",_.length>0?_[0].name:""),X=G[0],J=G[1],se=(0,t.useLocalState)(w,"title",""),ie=se[0],me=se[1],q=(0,t.useLocalState)(w,"body",""),re=q[0],ae=q[1],le=(0,t.useLocalState)(w,"adminLocked",!1),Z=le[0],ne=le[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:!O,width:"100%",value:z,onInput:function(){function te(fe,pe){return $(pe)}return te}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Channel",verticalAlign:"top",children:(0,e.createComponentVNode)(2,o.Dropdown,{selected:X,options:_.map(function(te){return te.name}),mb:"0",width:"100%",onSelected:function(){function te(fe){return J(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:ie,onInput:function(){function te(fe,pe){return me(pe)}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:re,onInput:function(){function te(fe,pe){return ae(pe)}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:ie,maxHeight:"13.5rem",overflow:"auto",children:(0,e.createComponentVNode)(2,o.Box,{mt:"0.5rem",children:[!!P&&(0,e.createComponentVNode)(2,C,{name:"inserted_photo_"+P.uid+".png",float:"right"}),re.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"})]})})}),O&&(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"CentComm Lock",verticalAlign:"top",children:(0,e.createComponentVNode)(2,o.Button,{selected:Z,icon:Z?"lock":"lock-open",content:Z?"On":"Off",tooltip:"Locking this story will make it censorable by nobody but CentComm officers.",tooltipPosition:"top",onClick:function(){function te(){return ne(!Z)}return te}()})})]})}),(0,e.createComponentVNode)(2,o.Button.Confirm,{disabled:z.trim().length===0||X.trim().length===0||ie.trim().length===0||re.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:z,channel:X,title:ie.substr(0,127),body:re.substr(0,1023),admin_locked:Z?1:0})}return te}()})]})},S=function(L,w){var A=(0,t.useBackend)(w),x=A.act,E=A.data,P=E.photo,D=E.wanted,M=!!L.args.is_admin,R=L.args.scanned_user,O=(0,t.useLocalState)(w,"author",(D==null?void 0:D.author)||R||"Unknown"),F=O[0],_=O[1],U=(0,t.useLocalState)(w,"name",(D==null?void 0:D.title.substr(8))||""),z=U[0],$=U[1],G=(0,t.useLocalState)(w,"description",(D==null?void 0:D.body)||""),X=G[0],J=G[1],se=(0,t.useLocalState)(w,"adminLocked",(D==null?void 0:D.admin_locked)===1||!1),ie=se[0],me=se[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 q(re,ae){return _(ae)}return q}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Name",children:(0,e.createComponentVNode)(2,o.Input,{width:"100%",value:z,maxLength:"128",onInput:function(){function q(re,ae){return $(ae)}return q}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Description",verticalAlign:"top",children:(0,e.createComponentVNode)(2,o.Input,{multiline:!0,width:"100%",value:X,maxLength:"512",rows:"4",onInput:function(){function q(re,ae){return J(ae)}return q}()})}),(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 q(){return x(P?"eject_photo":"attach_photo")}return q}()}),!!P&&(0,e.createComponentVNode)(2,C,{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:ie,icon:ie?"lock":"lock-open",content:ie?"On":"Off",tooltip:"Locking this wanted notice will make it editable by nobody but CentComm officers.",tooltipPosition:"top",onClick:function(){function q(){return me(!ie)}return q}()})})]})}),(0,e.createComponentVNode)(2,o.Button.Confirm,{disabled:!D,icon:"eraser",color:"danger",content:"Clear",position:"absolute",right:"7.25rem",bottom:"-0.75rem",onClick:function(){function q(){x("clear_wanted_notice"),(0,y.modalClose)(w)}return q}()}),(0,e.createComponentVNode)(2,o.Button.Confirm,{disabled:F.trim().length===0||z.trim().length===0||X.trim().length===0,icon:"check",color:"good",content:"Submit",position:"absolute",right:"1rem",bottom:"-0.75rem",onClick:function(){function q(){(0,y.modalAnswer)(w,L.id,"",{author:F,name:z.substr(0,127),description:X.substr(0,511),admin_locked:ie?1:0})}return q}()})]})};(0,y.modalRegisterBodyOverride)("create_channel",N),(0,y.modalRegisterBodyOverride)("manage_channel",N),(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),f=n(98595),b=r.Noticeboard=function(){function y(B,k){var g=(0,t.useBackend)(k),l=g.act,c=g.data,m=c.papers;return(0,e.createComponentVNode)(2,f.Window,{width:600,height:300,theme:"noticeboard",children:(0,e.createComponentVNode)(2,f.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,children:m.map(function(i){return(0,e.createComponentVNode)(2,o.Stack.Item,{align:"center",width:"22.45%",height:"85%",onClick:function(){function u(){return l("interact",{paper:i.ref})}return u}(),onContextMenu:function(){function u(s){s.preventDefault(),l("showFull",{paper:i.ref})}return u}(),children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,fontSize:.75,title:i.name,children:(0,a.decodeHtmlEntities)(i.contents)})},i.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),f=r.NuclearBomb=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,l=k.data;return l.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:l.authdisk?"eject":"id-card",selected:l.authdisk,content:l.diskname?l.diskname:"-----",tooltip:l.authdisk?"Eject Disk":"Insert Disk",onClick:function(){function c(){return g("auth")}return c}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Auth Code",children:(0,e.createComponentVNode)(2,t.Button,{icon:"key",disabled:!l.authdisk,selected:l.authcode,content:l.codemsg,onClick:function(){function c(){return g("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:l.anchored?"check":"times",selected:l.anchored,disabled:!l.authdisk,content:l.anchored?"YES":"NO",onClick:function(){function c(){return g("toggle_anchor")}return c}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Time Left",children:(0,e.createComponentVNode)(2,t.Button,{icon:"stopwatch",content:l.time,disabled:!l.authfull,tooltip:"Set Timer",onClick:function(){function c(){return g("set_time")}return c}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Safety",children:(0,e.createComponentVNode)(2,t.Button,{icon:l.safety?"check":"times",selected:l.safety,disabled:!l.authfull,content:l.safety?"ON":"OFF",tooltip:l.safety?"Disable Safety":"Enable Safety",onClick:function(){function c(){return g("toggle_safety")}return c}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Arm/Disarm",children:(0,e.createComponentVNode)(2,t.Button,{icon:(l.timer,"bomb"),disabled:l.safety||!l.authfull,color:"red",content:l.timer?"DISARM THE NUKE":"ARM THE NUKE",onClick:function(){function c(){return g("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 g("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),f=n(72253),b=n(36036),y=n(98595),B=r.NumberInputModal=function(){function g(l,c){var m=(0,f.useBackend)(c),i=m.act,u=m.data,s=u.init_value,d=u.large_buttons,v=u.message,h=v===void 0?"":v,C=u.timeout,p=u.title,N=(0,f.useLocalState)(c,"input",s),V=N[0],S=N[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(h.length/3),h.length>0&&d?5:0);return(0,e.createComponentVNode)(2,y.Window,{title:p,width:270,height:w,children:[C&&(0,e.createComponentVNode)(2,a.Loader,{value:C}),(0,e.createComponentVNode)(2,y.Window.Content,{onKeyDown:function(){function A(x){var E=window.event?x.which:x.keyCode;E===o.KEY_ENTER&&i("submit",{entry:V}),E===o.KEY_ESCAPE&&i("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:h})}),(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 g}(),k=function(l,c){var m=(0,f.useBackend)(c),i=m.act,u=m.data,s=u.min_value,d=u.max_value,v=u.init_value,h=u.round_value,C=l.input,p=l.onClick,N=l.onChange,V=Math.round(C!==s?Math.max(C/2,s):d/2),S=C===s&&s>0||C===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:C===s,icon:"angle-double-left",onClick:function(){function I(){return p(s)}return I}(),tooltip:C===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:!h,minValue:s,maxValue:d,onChange:function(){function I(L,w){return N(w)}return I}(),onEnter:function(){function I(L,w){return i("submit",{entry:w})}return I}(),value:C})}),(0,e.createComponentVNode)(2,b.Stack.Item,{children:(0,e.createComponentVNode)(2,b.Button,{disabled:C===d,icon:"angle-double-right",onClick:function(){function I(){return p(d)}return I}(),tooltip:C===d?"Max":"Max ("+d+")"})}),(0,e.createComponentVNode)(2,b.Stack.Item,{children:(0,e.createComponentVNode)(2,b.Button,{disabled:S,icon:"divide",onClick:function(){function I(){return p(V)}return I}(),tooltip:S?"Split":"Split ("+V+")"})}),(0,e.createComponentVNode)(2,b.Stack.Item,{children:(0,e.createComponentVNode)(2,b.Button,{disabled:C===v,icon:"redo",onClick:function(){function I(){return p(v)}return I}(),tooltip:v?"Reset ("+v+")":"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),f=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"],g=r.OperatingComputer=function(){function i(u,s){var d=(0,t.useBackend)(s),v=d.act,h=d.data,C=h.hasOccupant,p=h.choice,N;return p?N=(0,e.createComponentVNode)(2,m):N=C?(0,e.createComponentVNode)(2,l):(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,f.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,f.Stack.Item,{children:(0,e.createComponentVNode)(2,f.Tabs,{children:[(0,e.createComponentVNode)(2,f.Tabs.Tab,{selected:!p,icon:"user",onClick:function(){function V(){return v("choiceOff")}return V}(),children:"Patient"}),(0,e.createComponentVNode)(2,f.Tabs.Tab,{selected:!!p,icon:"cog",onClick:function(){function V(){return v("choiceOn")}return V}(),children:"Options"})]})}),(0,e.createComponentVNode)(2,f.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,f.Section,{fill:!0,scrollable:!0,children:N})})]})})})}return i}(),l=function(u,s){var d=(0,t.useBackend)(s),v=d.data,h=v.occupant,C=h.activeSurgeries;return(0,e.createComponentVNode)(2,f.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,f.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,f.Section,{fill:!0,title:"Patient",children:(0,e.createComponentVNode)(2,f.LabeledList,{children:[(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Name",children:h.name}),(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Status",color:b[h.stat][0],children:b[h.stat][1]}),(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Health",children:(0,e.createComponentVNode)(2,f.ProgressBar,{min:"0",max:h.maxHealth,value:h.health/h.maxHealth,ranges:{good:[.5,1/0],average:[0,.5],bad:[-1/0,0]}})}),y.map(function(p,N){return(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:p[0]+" Damage",children:(0,e.createComponentVNode)(2,f.ProgressBar,{min:"0",max:"100",value:h[p[1]]/100,ranges:B,children:(0,a.round)(h[p[1]])},N)},N)}),(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Temperature",children:(0,e.createComponentVNode)(2,f.ProgressBar,{min:"0",max:h.maxTemp,value:h.bodyTemperature/h.maxTemp,color:k[h.temperatureSuitability+3],children:[(0,a.round)(h.btCelsius),"\xB0C, ",(0,a.round)(h.btFaren),"\xB0F"]})}),!!h.hasBlood&&(0,e.createFragment)([(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Blood Level",children:(0,e.createComponentVNode)(2,f.ProgressBar,{min:"0",max:h.bloodMax,value:h.bloodLevel/h.bloodMax,ranges:{bad:[-1/0,.6],average:[.6,.9],good:[.6,1/0]},children:[h.bloodPercent,"%, ",h.bloodLevel,"cl"]})}),(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Pulse",children:[h.pulse," BPM"]})],4)]})})}),(0,e.createComponentVNode)(2,f.Stack.Item,{children:(0,e.createComponentVNode)(2,f.Section,{title:"Active surgeries",level:"2",children:h.inSurgery&&C?C.map(function(p,N){return(0,e.createComponentVNode)(2,f.Section,{style:{textTransform:"capitalize"},title:p.name+" ("+p.location+")",children:(0,e.createComponentVNode)(2,f.LabeledList,{children:(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Next Step",children:p.step},N)},N)},N)}):(0,e.createComponentVNode)(2,f.Box,{color:"label",children:"No procedure ongoing."})})})]})},c=function(){return(0,e.createComponentVNode)(2,f.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,f.Stack.Item,{grow:!0,align:"center",textAlign:"center",color:"label",children:[(0,e.createComponentVNode)(2,f.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,e.createVNode)(1,"br"),"No patient detected."]})})},m=function(u,s){var d=(0,t.useBackend)(s),v=d.act,h=d.data,C=h.verbose,p=h.health,N=h.healthAlarm,V=h.oxy,S=h.oxyAlarm,I=h.crit;return(0,e.createComponentVNode)(2,f.LabeledList,{children:[(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Loudspeaker",children:(0,e.createComponentVNode)(2,f.Button,{selected:C,icon:C?"toggle-on":"toggle-off",content:C?"On":"Off",onClick:function(){function L(){return v(C?"verboseOff":"verboseOn")}return L}()})}),(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Health Announcer",children:(0,e.createComponentVNode)(2,f.Button,{selected:p,icon:p?"toggle-on":"toggle-off",content:p?"On":"Off",onClick:function(){function L(){return v(p?"healthOff":"healthOn")}return L}()})}),(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Health Announcer Threshold",children:(0,e.createComponentVNode)(2,f.Knob,{bipolar:!0,minValue:-100,maxValue:100,value:N,stepPixelSize:5,ml:"0",onChange:function(){function L(w,A){return v("health_adj",{new:A})}return L}()})}),(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Oxygen Alarm",children:(0,e.createComponentVNode)(2,f.Button,{selected:V,icon:V?"toggle-on":"toggle-off",content:V?"On":"Off",onClick:function(){function L(){return v(V?"oxyOff":"oxyOn")}return L}()})}),(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Oxygen Alarm Threshold",children:(0,e.createComponentVNode)(2,f.Knob,{bipolar:!0,minValue:-100,maxValue:100,value:S,stepPixelSize:5,ml:"0",onChange:function(){function L(w,A){return v("oxy_adj",{new:A})}return L}()})}),(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Critical Alert",children:(0,e.createComponentVNode)(2,f.Button,{selected:I,icon:I?"toggle-on":"toggle-off",content:I?"On":"Off",onClick:function(){function L(){return v(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),f=n(98595),b=n(35840);function y(d,v){var h=typeof Symbol!="undefined"&&d[Symbol.iterator]||d["@@iterator"];if(h)return(h=h.call(d)).next.bind(h);if(Array.isArray(d)||(h=B(d))||v&&d&&typeof d.length=="number"){h&&(d=h);var C=0;return function(){return C>=d.length?{done:!0}:{done:!1,value:d[C++]}}}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,v){if(d){if(typeof d=="string")return k(d,v);var h={}.toString.call(d).slice(8,-1);return h==="Object"&&d.constructor&&(h=d.constructor.name),h==="Map"||h==="Set"?Array.from(d):h==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(h)?k(d,v):void 0}}function k(d,v){(v==null||v>d.length)&&(v=d.length);for(var h=0,C=Array(v);hh},m=function(v,h){var C=v.name,p=h.name;if(!C||!p)return 0;var N=C.match(g),V=p.match(g);if(N&&V&&C.replace(g,"")===p.replace(g,"")){var S=parseInt(N[1],10),I=parseInt(V[1],10);return S-I}return c(C,p)},i=function(v,h){var C=v.searchText,p=v.source,N=v.title,V=v.color,S=v.sorted,I=p.filter(l(C));return S&&I.sort(m),p.length>0&&(0,e.createComponentVNode)(2,o.Section,{title:N+" - ("+p.length+")",children:I.map(function(L){return(0,e.createComponentVNode)(2,u,{thing:L,color:V},L.name)})})},u=function(v,h){var C=(0,t.useBackend)(h),p=C.act,N=v.color,V=v.thing;return(0,e.createComponentVNode)(2,o.Button,{color:N,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)(["job_icons16x16",V.assigned_role_sprite])})," ",V.assigned_role]}):"",tooltipPosition:"bottom",onClick:function(){function S(){return p("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 d(v,h){for(var C=(0,t.useBackend)(h),p=C.act,N=C.data,V=N.alive,S=N.antagonists,I=N.highlights,L=N.response_teams,w=N.tourist,A=N.auto_observe,x=N.dead,E=N.ssd,P=N.ghosts,D=N.misc,M=N.npcs,R=(0,t.useLocalState)(h,"searchText",""),O=R[0],F=R[1],_={},U=y(S),z;!(z=U()).done;){var $=z.value;_[$.antag]===void 0&&(_[$.antag]=[]),_[$.antag].push($)}var G=Object.entries(_);G.sort(function(J,se){return c(J[0],se[0])});var X=function(){function J(se){for(var ie=0,me=[G.map(function(ae){var le=ae[0],Z=ae[1];return Z}),w,I,V,P,E,x,M,D];ie0&&(0,e.createComponentVNode)(2,o.Section,{title:"Antagonists",children:G.map(function(J){var se=J[0],ie=J[1];return(0,e.createComponentVNode)(2,o.Section,{title:se+" - ("+ie.length+")",level:2,children:ie.filter(l(O)).sort(m).map(function(me){return(0,e.createComponentVNode)(2,u,{color:"bad",thing:me},me.name)})},se)})}),I.length>0&&(0,e.createComponentVNode)(2,i,{title:"Highlights",source:I,searchText:O,color:"teal"}),(0,e.createComponentVNode)(2,i,{title:"Response Teams",source:L,searchText:O,color:"purple"}),(0,e.createComponentVNode)(2,i,{title:"Tourists",source:w,searchText:O,color:"violet"}),(0,e.createComponentVNode)(2,i,{title:"Alive",source:V,searchText:O,color:"good"}),(0,e.createComponentVNode)(2,i,{title:"Ghosts",source:P,searchText:O,color:"grey"}),(0,e.createComponentVNode)(2,i,{title:"SSD",source:E,searchText:O,color:"grey"}),(0,e.createComponentVNode)(2,i,{title:"Dead",source:x,searchText:O,sorted:!1}),(0,e.createComponentVNode)(2,i,{title:"NPCs",source:M,searchText:O,sorted:!1}),(0,e.createComponentVNode)(2,i,{title:"Misc",source:D,searchText:O,sorted:!1})]})})}return d}()},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),f=n(98595),b=n(9394);function y(d){if(d==null)throw new TypeError("Cannot destructure "+d)}var B=(0,b.createLogger)("OreRedemption"),k=function(v){return v.toLocaleString("en-US")+" pts"},g=r.OreRedemption=function(){function d(v,h){return(0,e.createComponentVNode)(2,f.Window,{width:490,height:750,children:(0,e.createComponentVNode)(2,f.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,l,{height:"100%"})}),(0,e.createComponentVNode)(2,c),(0,e.createComponentVNode)(2,m)]})})})}return d}(),l=function(v,h){var C=(0,t.useBackend)(h),p=C.act,N=C.data,V=N.id,S=N.points,I=N.disk,L=Object.assign({},(y(v),v));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 p("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 p("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(v,h){var C=(0,t.useBackend)(h),p=C.act,N=C.data,V=N.sheets,S=Object.assign({},(y(v),v));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,i,{title:"Sheets",columns:[["Available","25%"],["Ore Value","15%"],["Smelt","20%"]]}),V.map(function(I){return(0,e.createComponentVNode)(2,u,{ore:I},I.id)})]})))})},m=function(v,h){var C=(0,t.useBackend)(h),p=C.act,N=C.data,V=N.alloys,S=Object.assign({},(y(v),v));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,i,{title:"Alloys",columns:[["Recipe","50%"],["Available","11%"],["Smelt","20%"]]}),V.map(function(I){return(0,e.createComponentVNode)(2,s,{ore:I},I.id)})]})))})},i=function(v,h){var C;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:v.title}),(C=v.columns)==null?void 0:C.map(function(p){return(0,e.createComponentVNode)(2,o.Stack.Item,{basis:p[1],textAlign:"center",color:"label",bold:!0,children:p[0]},p)})]})})},u=function(v,h){var C=(0,t.useBackend)(h),p=C.act,N=v.ore;if(!(N.value&&N.amount<=0&&!(["metal","glass"].indexOf(N.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",N.id])}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:N.name})]})}),(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"20%",textAlign:"center",color:N.amount>=1?"good":"gray",bold:N.amount>=1,align:"center",children:N.amount.toLocaleString("en-US")}),(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"20%",textAlign:"center",align:"center",children:N.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(N.amount,50),stepPixelSize:6,onChange:function(){function V(S,I){return p(N.value?"sheet":"alloy",{id:N.id,amount:I})}return V}()})})]})})},s=function(v,h){var C=(0,t.useBackend)(h),p=C.act,N=v.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",N.id])})}),(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"30%",textAlign:"middle",align:"center",children:N.name}),(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"35%",textAlign:"middle",color:N.amount>=1?"good":"gray",align:"center",children:N.description}),(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"10%",textAlign:"center",color:N.amount>=1?"good":"gray",bold:N.amount>=1,align:"center",children:N.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(N.amount,50),stepPixelSize:6,onChange:function(){function V(S,I){return p(N.value?"sheet":"alloy",{id:N.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),f=n(71253),b=n(70752),y=function(g){var l;try{l=b("./"+g+".js")}catch(m){if(m.code==="MODULE_NOT_FOUND")return(0,f.routingError)("notFound",g);throw m}var c=l[g];return c||(0,f.routingError)("missingExport",g)},B=r.PAI=function(){function k(g,l){var c=(0,a.useBackend)(l),m=c.act,i=c.data,u=i.app_template,s=i.app_icon,d=i.app_title,v=y(u);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}),d,u!=="pai_main_menu"&&(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{ml:2,mb:0,content:"Back",icon:"arrow-left",onClick:function(){function h(){return m("Back")}return h}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Home",icon:"arrow-up",onClick:function(){function h(){return m("MASTER_back")}return h}()})],4)]}),children:(0,e.createComponentVNode)(2,v)})})})})})}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),f=n(71253),b=n(59395),y=function(c){var m;try{m=b("./"+c+".js")}catch(u){if(u.code==="MODULE_NOT_FOUND")return(0,f.routingError)("notFound",c);throw u}var i=m[c];return i||(0,f.routingError)("missingExport",c)},B=r.PDA=function(){function l(c,m){var i=(0,a.useBackend)(m),u=i.act,s=i.data,d=s.app,v=s.owner;if(!v)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 h=y(d.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:d.icon,mr:1}),d.name]}),children:(0,e.createComponentVNode)(2,h)})}),(0,e.createComponentVNode)(2,t.Stack.Item,{mt:7.5,children:(0,e.createComponentVNode)(2,g)})]})})})}return l}(),k=function(c,m){var i=(0,a.useBackend)(m),u=i.act,s=i.data,d=s.idInserted,v=s.idLink,h=s.stationTime,C=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 p(){return u("Authenticate")}return p}(),content:d?v:"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 p(){return u("Eject")}return p}(),content:C?["Eject "+C]:"No Cartridge Inserted"})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,textAlign:"right",bold:!0,mr:1,mt:.5,children:h})]})},g=function(c,m){var i=(0,a.useBackend)(m),u=i.act,s=i.data,d=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:[!!d.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:d.has_back?"white":"disabled",icon:"arrow-alt-circle-left-o",onClick:function(){function v(){return u("Back")}return v}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{basis:d.has_back?"33%":"100%",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,className:"PDA__footer__button",color:"transparent",iconColor:d.is_home?"disabled":"white",icon:"home",onClick:function(){function v(){u("Home")}return v}()})})]})})}},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),f=n(49968),b=r.Pacman=function(){function y(B,k){var g=(0,a.useBackend)(k),l=g.act,c=g.data,m=c.active,i=c.anchored,u=c.broken,s=c.emagged,d=c.fuel_type,v=c.fuel_usage,h=c.fuel_stored,C=c.fuel_cap,p=c.is_ai,N=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=h/C,E=N/V,P=w*L,D=Math.round(h/v*2),M=Math.round(D/60),R=D>120?M+" minutes":D+" seconds";return(0,e.createComponentVNode)(2,o.Window,{width:500,height:225,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[(u||!i)&&(0,e.createComponentVNode)(2,t.Section,{title:"Status",children:[!!u&&(0,e.createComponentVNode)(2,t.Box,{color:"orange",children:"The generator is malfunctioning!"}),!u&&!i&&(0,e.createComponentVNode)(2,t.Box,{color:"orange",children:"The generator needs to be anchored to the floor with a wrench."})]}),!u&&!!i&&(0,e.createVNode)(1,"div",null,[(0,e.createComponentVNode)(2,t.Section,{title:"Status",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:m?"power-off":"times",content:m?"On":"Off",tooltip:"Toggles the generator on/off. Requires fuel.",tooltipPosition:"left",disabled:!A,selected:m,onClick:function(){function O(){return l("toggle_power")}return O}()}),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 O(F,_){return l("change_power",{change_power:_})}return O}()}),"(",(0,f.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:[N," \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:m||p||!A,onClick:function(){function O(){return l("eject_fuel")}return O}()}),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:d}),(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(h/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:[v/1e3," dm\xB3/s"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Fuel depletion",children:[!!A&&(v?R:"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),f=r.PanDEMIC=function(){function i(u,s){var d=(0,a.useBackend)(s),v=d.data,h=v.beakerLoaded,C=v.beakerContainsBlood,p=v.beakerContainsVirus,N=v.resistances,V=N===void 0?[]:N,S;return h?C?C&&!p&&(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&&!p?(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,m,{align:"bottom"})]})})})}return i}(),b=function(u,s){var d=(0,a.useBackend)(s),v=d.act,h=d.data,C=h.beakerLoaded;return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{icon:"eject",content:"Eject",disabled:!C,onClick:function(){function p(){return v("eject_beaker")}return p}()}),(0,e.createComponentVNode)(2,t.Button.Confirm,{icon:"trash-alt",confirmIcon:"eraser",content:"Destroy",confirmContent:"Destroy",disabled:!C,onClick:function(){function p(){return v("destroy_eject_beaker")}return p}()})],4)},y=function(u,s){var d=(0,a.useBackend)(s),v=d.act,h=d.data,C=h.beakerContainsVirus,p=u.strain,N=p.commonName,V=p.description,S=p.diseaseAgent,I=p.bloodDNA,L=p.bloodType,w=p.possibleTreatments,A=p.transmissionRoute,x=p.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(!C)return(0,e.createComponentVNode)(2,t.LabeledList,{children:E});var P;return x&&(N!=null&&N!=="Unknown"?P=(0,e.createComponentVNode)(2,t.Button,{icon:"print",content:"Print Release Forms",onClick:function(){function D(){return v("print_release_forms",{strain_index:u.strainIndex})}return D}(),style:{"margin-left":"auto"}}):P=(0,e.createComponentVNode)(2,t.Button,{icon:"pen",content:"Name Disease",onClick:function(){function D(){return v("name_strain",{strain_index:u.strainIndex})}return D}(),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:[N!=null?N:"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(u,s){var d,v=(0,a.useBackend)(s),h=v.act,C=v.data,p=!!C.synthesisCooldown,N=(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{icon:p?"spinner":"clone",iconSpin:p,content:"Clone",disabled:p,onClick:function(){function V(){return h("clone_strain",{strain_index:u.strainIndex})}return V}()}),u.sectionButtons],0);return(0,e.createComponentVNode)(2,t.Flex.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:(d=u.sectionTitle)!=null?d:"Strain Information",buttons:N,children:(0,e.createComponentVNode)(2,y,{strain:u.strain,strainIndex:u.strainIndex})})})},k=function(u,s){var d,v=(0,a.useBackend)(s),h=v.act,C=v.data,p=C.selectedStrainIndex,N=C.strains,V=N[p-1];if(N.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(N.length===1){var S;return(0,e.createFragment)([(0,e.createComponentVNode)(2,B,{strain:N[0],strainIndex:1,sectionButtons:(0,e.createComponentVNode)(2,b)}),((S=N[0].symptoms)==null?void 0:S.length)>0&&(0,e.createComponentVNode)(2,l,{strain:N[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:N.map(function(L,w){var A;return(0,e.createComponentVNode)(2,t.Tabs.Tab,{icon:"virus",selected:p-1===w,onClick:function(){function x(){return h("switch_strain",{strain_index:w+1})}return x}(),children:(A=L.commonName)!=null?A:"Unknown"},w)})})}),(0,e.createComponentVNode)(2,B,{strain:V,strainIndex:p}),((d=V.symptoms)==null?void 0:d.length)>0&&(0,e.createComponentVNode)(2,l,{className:"remove-section-bottom-padding",strain:V})]})})})},g=function(u){return u.reduce(function(s,d){return s+d},0)},l=function(u){var s=u.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:u.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(d,v){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:d.name}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:d.stealth}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:d.resistance}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:d.stageSpeed}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:d.transmissibility})]},v)}),(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:g(s.map(function(d){return d.stealth}))}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:g(s.map(function(d){return d.resistance}))}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:g(s.map(function(d){return d.stageSpeed}))}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:g(s.map(function(d){return d.transmissibility}))})]})]})})})},c=["flask","vial","eye-dropper"],m=function(u,s){var d=(0,a.useBackend)(s),v=d.act,h=d.data,C=h.synthesisCooldown,p=h.beakerContainsVirus,N=h.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:N.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:!!C,onClick:function(){function I(){return v("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(25328),f=n(79646),b=n(36352),y=n(98595),B=n(35840),k=n(38307),g=function(u){switch(u){case 1:return"north";case 2:return"south";case 4:return"east";case 8:return"west";case 5:return"northeast";case 6:return"southeast";case 9:return"northwest";case 10:return"southwest"}return""},l=r.ParticleAccelerator=function(){function i(u,s){var d=(0,a.useBackend)(s),v=d.act,h=d.data,C=h.assembled,p=h.power,N=h.strength,V=h.max_strength,S=h.icon,I=h.layout_1,L=h.layout_2,w=h.layout_3,A=h.orientation;return(0,e.createComponentVNode)(2,y.Window,{width:395,height:C?160:A==="north"||A==="south"?540:465,children:(0,e.createComponentVNode)(2,y.Window.Content,{scrollable:!0,children:[(0,e.createComponentVNode)(2,t.Section,{title:"Control Panel",buttons:(0,e.createComponentVNode)(2,t.Button,{dmIcon:"sync",content:"Connect",onClick:function(){function x(){return v("scan")}return x}()}),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 x(){return v("power")}return x}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Strength",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"backward",disabled:!C||N===0,onClick:function(){function x(){return v("remove_strength")}return x}(),mr:"4px"}),N,(0,e.createComponentVNode)(2,t.Button,{icon:"forward",disabled:!C||N===V,onClick:function(){function x(){return v("add_strength")}return x}(),ml:"4px"})]})]})}),C?"":(0,e.createComponentVNode)(2,t.Section,{title:A?"EM Acceleration Chamber Orientation: "+(0,o.capitalize)(A):"Place EM Acceleration Chamber Next To Console",children:A===0?"":A==="north"||A==="south"?(0,e.createComponentVNode)(2,m):(0,e.createComponentVNode)(2,c)})]})})}return i}(),c=function(u,s){var d=(0,a.useBackend)(s),v=d.act,h=d.data,C=h.assembled,p=h.power,N=h.strength,V=h.max_strength,S=h.icon,I=h.layout_1,L=h.layout_2,w=h.layout_3,A=h.orientation;return(0,e.createComponentVNode)(2,t.Table,{children:[(0,e.createComponentVNode)(2,b.TableRow,{width:"40px",children:(A==="east"?I:w).slice().map(function(x){return(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Tooltip,{content:(0,e.createVNode)(1,"span",null,[x.name,(0,e.createTextVNode)(" "),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)(" "),"Status: "+x.status,(0,e.createVNode)(1,"br"),"Direction: "+g(x.dir)],0,{style:{wordWrap:"break-word"}}),children:(0,e.createComponentVNode)(2,t.ImageButton,{dmIcon:S,dmIconState:x.icon_state,dmDirection:x.dir,style:{"border-style":"solid","border-width":"2px","border-color":x.status==="good"?"green":x.status==="Incomplete"?"orange":"red",padding:"2px"}})})},x.name)})}),(0,e.createComponentVNode)(2,b.TableRow,{width:"40px",children:L.slice().map(function(x){return(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Tooltip,{content:(0,e.createVNode)(1,"span",null,[x.name,(0,e.createTextVNode)(" "),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)(" "),"Status: "+x.status,(0,e.createVNode)(1,"br"),"Direction: "+g(x.dir)],0,{style:{wordWrap:"break-word"}}),children:(0,e.createComponentVNode)(2,t.ImageButton,{dmIcon:S,dmIconState:x.icon_state,dmDirection:x.dir,style:{"border-style":"solid","border-width":"2px","border-color":x.status==="good"?"green":x.status==="Incomplete"?"orange":"red",padding:"2px"}})})},x.name)})}),(0,e.createComponentVNode)(2,b.TableRow,{width:"40px",children:(A==="east"?w:I).slice().map(function(x){return(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Tooltip,{content:(0,e.createVNode)(1,"span",null,[x.name,(0,e.createTextVNode)(" "),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)(" "),"Status: "+x.status,(0,e.createVNode)(1,"br"),"Direction: "+g(x.dir)],0,{style:{wordWrap:"break-word"}}),children:(0,e.createComponentVNode)(2,t.ImageButton,{dmIcon:S,dmIconState:x.icon_state,dmDirection:x.dir,style:{"border-style":"solid","border-width":"2px","border-color":x.status==="good"?"green":x.status==="Incomplete"?"orange":"red",padding:"2px"}})})},x.name)})})]})},m=function(u,s){var d=(0,a.useBackend)(s),v=d.act,h=d.data,C=h.assembled,p=h.power,N=h.strength,V=h.max_strength,S=h.icon,I=h.layout_1,L=h.layout_2,w=h.layout_3,A=h.orientation;return(0,e.createComponentVNode)(2,t.Grid,{children:[(0,e.createComponentVNode)(2,f.GridColumn,{width:"40px",children:(A==="north"?I:w).slice().map(function(x){return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Tooltip,{content:(0,e.createVNode)(1,"span",null,[x.name,(0,e.createTextVNode)(" "),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)(" "),"Status: "+x.status,(0,e.createVNode)(1,"br"),"Direction: "+g(x.dir)],0,{style:{wordWrap:"break-word"}}),children:(0,e.createComponentVNode)(2,t.ImageButton,{dmIcon:S,dmIconState:x.icon_state,dmDirection:x.dir,style:{"border-style":"solid","border-width":"2px","border-color":x.status==="good"?"green":x.status==="Incomplete"?"orange":"red",padding:"2px"}})})},x.name)})}),(0,e.createComponentVNode)(2,f.GridColumn,{children:L.slice().map(function(x){return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Tooltip,{content:(0,e.createVNode)(1,"span",null,[x.name,(0,e.createTextVNode)(" "),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)(" "),"Status: "+x.status,(0,e.createVNode)(1,"br"),"Direction: "+g(x.dir)],0,{style:{wordWrap:"break-word"}}),children:(0,e.createComponentVNode)(2,t.ImageButton,{dmIcon:S,dmIconState:x.icon_state,dmDirection:x.dir,style:{"border-style":"solid","border-width":"2px","border-color":x.status==="good"?"green":x.status==="Incomplete"?"orange":"red",padding:"2px"}})})},x.name)})}),(0,e.createComponentVNode)(2,f.GridColumn,{width:"40px",children:(A==="north"?w:I).slice().map(function(x){return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,tooltip:x.status,children:(0,e.createComponentVNode)(2,t.Tooltip,{content:(0,e.createVNode)(1,"span",null,[x.name,(0,e.createTextVNode)(" "),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)(" "),"Status: "+x.status,(0,e.createVNode)(1,"br"),"Direction: "+g(x.dir)],0,{style:{wordWrap:"break-word"}}),children:(0,e.createComponentVNode)(2,t.ImageButton,{dmIcon:S,dmIconState:x.icon_state,dmDirection:x.dir,style:{"border-style":"solid","border-width":"2px","border-color":x.status==="good"?"green":x.status==="Incomplete"?"orange":"red",padding:"2px"}})})},x.name)})})]})}},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),f=r.PdaPainter=function(){function k(g,l){var c=(0,a.useBackend)(l),m=c.data,i=m.has_pda;return(0,e.createComponentVNode)(2,o.Window,{width:510,height:505,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:i?(0,e.createComponentVNode)(2,y):(0,e.createComponentVNode)(2,b)})})}return k}(),b=function(g,l){var c=(0,a.useBackend)(l),m=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 i(){return m("insert_pda")}return i}()})]})})})},y=function(g,l){var c=(0,a.useBackend)(l),m=c.act,i=c.data,u=i.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(u).map(function(s){return(0,e.createComponentVNode)(2,t.Table.Row,{onClick:function(){function d(){return m("choose_pda",{selectedPda:s})}return d}(),children:[(0,e.createComponentVNode)(2,t.Table.Cell,{collapsing:!0,children:(0,e.createVNode)(1,"img",null,null,1,{src:"data:image/png;base64,"+u[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(g,l){var c=(0,a.useBackend)(l),m=c.act,i=c.data,u=i.current_appearance,s=i.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,"+u,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 d(){return m("eject_pda")}return d}()}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"paint-roller",content:"Paint PDA",onClick:function(){function d(){return m("paint_pda")}return d}()})]}),(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),f=r.PersonalCrafting=function(){function B(k,g){var l=(0,a.useBackend)(g),c=l.act,m=l.data,i=m.busy,u=m.category,s=m.display_craftable_only,d=m.display_compact,v=m.prev_cat,h=m.next_cat,C=m.subcategory,p=m.prev_subcat,N=m.next_subcat;return(0,e.createComponentVNode)(2,o.Window,{width:700,height:800,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[!!i&&(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:u,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:d?"check-square-o":"square-o",selected:d,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:v,icon:"arrow-left",onClick:function(){function V(){return c("backwardCat")}return V}()}),(0,e.createComponentVNode)(2,t.Button,{content:h,icon:"arrow-right",onClick:function(){function V(){return c("forwardCat")}return V}()})]}),C&&(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Button,{content:p,icon:"arrow-left",onClick:function(){function V(){return c("backwardSubCat")}return V}()}),(0,e.createComponentVNode)(2,t.Button,{content:N,icon:"arrow-right",onClick:function(){function V(){return c("forwardSubCat")}return V}()})]}),d?(0,e.createComponentVNode)(2,b):(0,e.createComponentVNode)(2,y)]})]})})}return B}(),b=function(k,g){var l=(0,a.useBackend)(g),c=l.act,m=l.data,i=m.display_craftable_only,u=m.can_craft,s=m.cant_craft;return(0,e.createComponentVNode)(2,t.Box,{mt:1,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[u.map(function(d){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:d.name,children:[(0,e.createComponentVNode)(2,t.Button,{icon:"hammer",content:"Craft",onClick:function(){function v(){return c("make",{make:d.ref})}return v}()}),d.catalyst_text&&(0,e.createComponentVNode)(2,t.Button,{tooltip:d.catalyst_text,content:"Catalysts",color:"transparent"}),(0,e.createComponentVNode)(2,t.Button,{tooltip:d.req_text,content:"Requirements",color:"transparent"}),d.tool_text&&(0,e.createComponentVNode)(2,t.Button,{tooltip:d.tool_text,content:"Tools",color:"transparent"})]},d.name)}),!i&&s.map(function(d){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:d.name,children:[(0,e.createComponentVNode)(2,t.Button,{icon:"hammer",content:"Craft",disabled:!0}),d.catalyst_text&&(0,e.createComponentVNode)(2,t.Button,{tooltip:d.catalyst_text,content:"Catalysts",color:"transparent"}),(0,e.createComponentVNode)(2,t.Button,{tooltip:d.req_text,content:"Requirements",color:"transparent"}),d.tool_text&&(0,e.createComponentVNode)(2,t.Button,{tooltip:d.tool_text,content:"Tools",color:"transparent"})]},d.name)})]})})},y=function(k,g){var l=(0,a.useBackend)(g),c=l.act,m=l.data,i=m.display_craftable_only,u=m.can_craft,s=m.cant_craft;return(0,e.createComponentVNode)(2,t.Box,{mt:1,children:[u.map(function(d){return(0,e.createComponentVNode)(2,t.Section,{title:d.name,buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"hammer",content:"Craft",onClick:function(){function v(){return c("make",{make:d.ref})}return v}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[d.catalyst_text&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Catalysts",children:d.catalyst_text}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Requirements",children:d.req_text}),d.tool_text&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Tools",children:d.tool_text})]})},d.name)}),!i&&s.map(function(d){return(0,e.createComponentVNode)(2,t.Section,{title:d.name,buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"hammer",content:"Craft",disabled:!0}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[d.catalyst_text&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Catalysts",children:d.catalyst_text}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Requirements",children:d.req_text}),d.tool_text&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Tools",children:d.tool_text})]})},d.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),f=r.Photocopier=function(){function B(k,g){var l=(0,a.useBackend)(g),c=l.act,m=l.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:m.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 i(){return c("minus")}return i}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"plus",textAlign:"center",content:"",onClick:function(){function i(){return c("add")}return i}()})]})]}),(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:m.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:!m.copyitem&&!m.mob,content:m.copyitem?m.copyitem:m.mob?m.mob+"'s ass!":"document",onClick:function(){function i(){return c("removedocument")}return i}()})})]}),(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:!m.folder,content:m.folder?m.folder:"folder",onClick:function(){function i(){return c("removefolder")}return i}()})})]})]}),(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,b)}),(0,e.createComponentVNode)(2,y)]})})})}return B}(),b=function(k,g){var l=(0,a.useBackend)(g),c=l.act,m=l.data,i=m.issilicon;return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"copy",float:"center",textAlign:"center",content:"Copy",onClick:function(){function u(){return c("copy")}return u}()}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"file-import",float:"center",textAlign:"center",content:"Scan",onClick:function(){function u(){return c("scandocument")}return u}()}),!!i&&(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 u(){return c("ai_text")}return u}()}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"image",color:"green",float:"center",textAlign:"center",content:"Print Image",onClick:function(){function u(){return c("ai_pic")}return u}()})],4)],0)},y=function(k,g){var l=(0,a.useBackend)(g),c=l.act,m=l.data;return(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Scanned Files",children:m.files.map(function(i){return(0,e.createComponentVNode)(2,t.Section,{title:i.name,buttons:(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Button,{icon:"print",content:"Print",disabled:m.toner<=0,onClick:function(){function u(){return c("filecopy",{uid:i.uid})}return u}()}),(0,e.createComponentVNode)(2,t.Button.Confirm,{icon:"trash-alt",content:"Delete",color:"bad",onClick:function(){function u(){return c("deletefile",{uid:i.uid})}return u}()})]})},i.name)})})}},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),f=["tempKey"];function b(g,l){if(g==null)return{};var c={};for(var m in g)if({}.hasOwnProperty.call(g,m)){if(l.includes(m))continue;c[m]=g[m]}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(l,c){var m=l.tempKey,i=b(l,f),u=y[m];if(!u)return null;var s=(0,a.useBackend)(c),d=s.data,v=s.act,h=d.currentTemp,C=u.label,p=u.icon,N=m===h,V=function(){v("setTemp",{temp:m})};return(0,e.normalizeProps)((0,e.createComponentVNode)(2,t.Button,Object.assign({color:"transparent",selected:N,onClick:V},i,{children:[(0,e.createComponentVNode)(2,t.Icon,{name:p}),C]})))},k=r.PoolController=function(){function g(l,c){for(var m=(0,a.useBackend)(c),i=m.data,u=i.emagged,s=i.currentTemp,d=y[s]||y.normal,v=d.label,h=d.color,C=[],p=0,N=Object.entries(y);p50?"battery-half":"battery-quarter")||h==="C"&&"bolt"||h==="F"&&"battery-full"||h==="M"&&"slash",color:h==="N"&&(C>50?"yellow":"red")||h==="C"&&"yellow"||h==="F"&&"green"||h==="M"&&"orange"}),(0,e.createComponentVNode)(2,B.Box,{inline:!0,width:"36px",textAlign:"right",children:(0,o.toFixed)(C)+"%"})],4)};u.defaultHooks=f.pureComponentHooks;var s=function(v){var h,C,p=v.status;switch(p){case"AOn":h=!0,C=!0;break;case"AOff":h=!0,C=!1;break;case"On":h=!1,C=!0;break;case"Off":h=!1,C=!1;break}var N=(C?"On":"Off")+(" ["+(h?"auto":"manual")+"]");return(0,e.createComponentVNode)(2,B.ColorBox,{color:C?"good":"bad",content:h?void 0:"M",title:N})};s.defaultHooks=f.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),f=n(3939),b=n(321),y=n(5485),B=n(98595),k=r.PrisonerImplantManager=function(){function g(l,c){var m=(0,a.useBackend)(c),i=m.act,u=m.data,s=u.loginState,d=u.prisonerInfo,v=u.chemicalInfo,h=u.trackingInfo,C;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 p=[1,5,10];return(0,e.createComponentVNode)(2,B.Window,{theme:"security",width:500,height:850,children:[(0,e.createComponentVNode)(2,f.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:d.name?"eject":"id-card",selected:d.name,content:d.name?d.name:"-----",tooltip:d.name?"Eject ID":"Insert ID",onClick:function(){function N(){return i("id_card")}return N}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Points",children:[d.points!==null?d.points:"-/-",(0,e.createComponentVNode)(2,t.Button,{ml:2,icon:"minus-square",disabled:d.points===null,content:"Reset",onClick:function(){function N(){return i("reset_points")}return N}()})]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Point Goal",children:[d.goal!==null?d.goal:"-/-",(0,e.createComponentVNode)(2,t.Button,{ml:2,icon:"pen",disabled:d.goal===null,content:"Edit",onClick:function(){function N(){return(0,f.modalOpen)(c,"set_points")}return N}()})]}),(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:d.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:h.map(function(N){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: ",N.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:N.location}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Health",children:N.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,f.modalOpen)(c,"warn",{uid:N.uid})}return V}()})})]})]},N.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:v.map(function(N){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: ",N.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:N.volume})}),p.map(function(V){return(0,e.createComponentVNode)(2,t.Button,{mt:2,disabled:N.volumec;return(0,e.createComponentVNode)(2,t.ImageButton,{fluid:!0,title:N.name,dmIcon:N.icon,dmIconState:N.icon_state,buttonsAlt:(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 g("purchase",{purchase:N.itemID})}return S}(),children:[N.cost,(0,e.createComponentVNode)(2,t.Icon,{m:0,mt:.25,name:"ticket",color:V?"bad":"good",size:1.6})]}),children:N.desc},N.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),f=n(3939),b=n(49148),y=r.RCD=function(){function i(u,s){return(0,e.createComponentVNode)(2,o.Window,{width:480,height:670,children:[(0,e.createComponentVNode)(2,f.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,l),(0,e.createComponentVNode)(2,c)]})})]})}return i}(),B=function(u,s){var d=(0,a.useBackend)(s),v=d.data,h=v.matter,C=v.max_matter,p=C*.7,N=C*.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:[p,1/0],average:[N,p],bad:[-1/0,N]},value:h,maxValue:C,children:(0,e.createComponentVNode)(2,t.Stack.Item,{textAlign:"center",children:h+" / "+C+" 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,g,{mode_type:"Floors and Walls"}),(0,e.createComponentVNode)(2,g,{mode_type:"Airlocks"}),(0,e.createComponentVNode)(2,g,{mode_type:"Windows"}),(0,e.createComponentVNode)(2,g,{mode_type:"Deconstruction"})]})})})},g=function(u,s){var d=(0,a.useBackend)(s),v=d.act,h=d.data,C=u.mode_type,p=h.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:C,selected:p===C?1:0,onClick:function(){function N(){return v("mode",{mode:C})}return N}()})})},l=function(u,s){var d=(0,a.useBackend)(s),v=d.act,h=d.data,C=h.door_name,p=h.electrochromic,N=h.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,C,0)],0),onClick:function(){function V(){return(0,f.modalOpen)(s,"renameAirlock")}return V}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:N===1&&(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:p?"toggle-on":"toggle-off",content:"Electrochromic",selected:p,onClick:function(){function V(){return v("electrochromic")}return V}()})})]})})})},c=function(u,s){var d=(0,a.useBackend)(s),v=d.act,h=d.data,C=h.tab,p=h.locked,N=h.one_access,V=h.selected_accesses,S=h.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:C===1,onClick:function(){function I(){return v("set_tab",{tab:1})}return I}(),children:"Airlock Types"}),(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:C===2,icon:"list",onClick:function(){function I(){return v("set_tab",{tab:2})}return I}(),children:"Airlock Access"})]})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:C===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,m,{check_number:0})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,m,{check_number:1})})]})}):C===2&&p?(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 v("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 v("set_lock",{new_lock:"lock"})}return I}()}),usedByRcd:1,rcdButtons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button.Checkbox,{checked:N,content:"One",onClick:function(){function I(){return v("set_one_access",{access:"one"})}return I}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{checked:!N,width:4,content:"All",onClick:function(){function I(){return v("set_one_access",{access:"all"})}return I}()})],4),accesses:S,selectedList:V,accessMod:function(){function I(L){return v("set",{access:L})}return I}(),grantAll:function(){function I(){return v("grant_all")}return I}(),denyAll:function(){function I(){return v("clear_all")}return I}(),grantDep:function(){function I(L){return v("grant_region",{region:L})}return I}(),denyDep:function(){function I(L){return v("deny_region",{region:L})}return I}()})})],4)},m=function(u,s){for(var d=(0,a.useBackend)(s),v=d.act,h=d.data,C=h.door_types_ui_list,p=h.door_type,N=u.check_number,V=[],S=0;Sf?w=(0,e.createComponentVNode)(2,t.Box,{color:"red",bold:!0,mb:1,children:"There are new 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 N("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>f?"envelope-open-text":"envelope",onClick:function(){function A(){return N("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 N("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 N("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 N("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 N("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 N("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 N("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 N("setScreen",{setScreen:8})}return A}()})})]})})},l=function(h,C){var p=(0,a.useBackend)(C),N=p.act,V=p.data,S=V.department,I=[],L;switch(h.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 N("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 N("writeInput",{write:w,priority:y})}return A}()}),(0,e.createComponentVNode)(2,t.Button,{content:"High Priority",icon:"exclamation-circle",onClick:function(){function A(){return N("writeInput",{write:w,priority:B})}return A}()})]},w)})})})})},c=function(h,C){var p=(0,a.useBackend)(C),N=p.act,V=p.data,S;switch(h.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 N("setScreen",{setScreen:0})}return I}()})})},m=function(h,C){var p=(0,a.useBackend)(C),N=p.act,V=p.data,S,I;switch(h.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 N("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)})})})},i=function(h,C){var p=(0,a.useBackend)(C),N=p.act,V=p.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 N("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 N("department",{department:S})}return A}()})})})],4)},u=function(h,C){var p=(0,a.useBackend)(C),N=p.act,V=p.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 N("setScreen",{setScreen:0})}return L}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Edit Message",icon:"edit",onClick:function(){function L(){return N("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 N("sendAnnouncement")}return L}()})]})})],4)},s=function(h,C){var p=(0,a.useBackend)(C),N=p.act,V=p.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 N("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 N("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 N("shipSelect",{shipSelect:w})}return A}()})},w)})})})})],4)},d=function(h,C){var p=(0,a.useBackend)(C),N=p.act,V=p.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 N("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 N("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),f=r.RndBackupConsole=function(){function y(B,k){var g=(0,a.useBackend)(k),l=g.act,c=g.data,m=c.network_name,i=c.has_disk,u=c.disk_name,s=c.linked,d=c.techs,v=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:m,icon:"unlink",selected:1,onClick:function(){function h(){return l("unlink")}return h}()}):"None"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Loaded Disk",children:i?(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{content:u+" (Last backup: "+v+")",icon:"save",selected:1,onClick:function(){function h(){return l("eject_disk")}return h}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"sign-in-alt",content:"Save all",onClick:function(){function h(){return l("saveall2disk")}return h}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"sign-out-alt",content:"Load all",onClick:function(){function h(){return l("saveall2network")}return h}()})],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(d).map(function(h){return!(d[h].network_level>0||d[h].disk_level>0)||(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:d[h].name}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:d[h].network_level||"None"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:d[h].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:!i||!s,onClick:function(){function C(){return l("savetech2network",{tech:h})}return C}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"sign-out-alt",content:"Load to disk",disabled:!i||!s,onClick:function(){function C(){return l("savetech2disk",{tech:h})}return C}()})]})]},h)})]})})})]})})}return y}(),b=r.LinkMenu=function(){function y(B,k){var g=(0,a.useBackend)(k),l=g.act,c=g.data,m=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"})]}),m.map(function(i){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:i.addr}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:i.net_id}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Link",icon:"link",onClick:function(){function u(){return l("linktonetworkcontroller",{target_controller:i.addr})}return u}()})})]},i.addr)})]})})}return y}()},68303:function(T,r,n){"use strict";r.__esModule=!0,r.AnalyzerMenu=void 0;var e=n(89005),a=n(35840),t=n(72253),o=n(36036),f=r.AnalyzerMenu=function(){function y(B,k){var g=(0,t.useBackend)(k),l=g.data,c=g.act,m=l.tech_levels,i=l.loaded_item,u=l.linked_analyzer,s=l.can_discover;return u?i?(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 d(){c("deconstruct")}return d}()}),(0,e.createComponentVNode)(2,o.Button,{content:"Eject",icon:"eject",onClick:function(){function d(){c("eject_item")}return d}()}),!s||(0,e.createComponentVNode)(2,o.Button,{content:"Discover",icon:"atom",onClick:function(){function d(){c("discover")}return d}()})],0),children:(0,e.createComponentVNode)(2,o.LabeledList,{children:(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Name",children:i.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"})]}),m.map(function(d){return(0,e.createComponentVNode)(2,b,{techLevel:d},d.id)})]})})],4):(0,e.createComponentVNode)(2,o.Section,{title:"Analysis Menu",children:"No item loaded. Standing by..."}):(0,e.createComponentVNode)(2,o.Section,{title:"Analysis Menu",children:"NO SCIENTIFIC ANALYZER LINKED TO CONSOLE"})}return y}(),b=function(B,k){var g=B.techLevel,l=g.name,c=g.desc,m=g.level,i=g.object_level,u=g.ui_icon,s=i!=null,d=s&&i>=m?Math.max(i,m+1):m;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:u})," ",l]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:m}),s?(0,e.createComponentVNode)(2,o.Table.Cell,{children:i}):(0,e.createComponentVNode)(2,o.Table.Cell,{className:"research-level-no-effect",children:"-"}),(0,e.createComponentVNode)(2,o.Table.Cell,{className:(0,a.classes)([d!==m&&"upgraded-level"]),children:d})]})}},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",f="tech",b=function(c,m){var i=(0,a.useBackend)(m),u=i.data,s=i.act,d=u.disk_data;return d?(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Name",children:d.name}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Level",children:d.level}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Description",children:d.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 v(){return s("updt_tech")}return v}()})})]}):null},y=function(c,m){var i=(0,a.useBackend)(m),u=i.data,s=i.act,d=u.disk_data;if(!d)return null;var v=d.name,h=d.lathe_types,C=d.materials,p=h.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:v}),p?(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Lathe Types",children:p}):null,(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Required Materials"})]}),C.map(function(N){return(0,e.createComponentVNode)(2,t.Box,{children:["- ",(0,e.createVNode)(1,"span",null,N.name,0,{style:{"text-transform":"capitalize"}})," x ",N.amount]},N.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 N(){return s("updt_design")}return N}()})})]})},B=function(c,m){var i=(0,a.useBackend)(m),u=i.act,s=i.data,d=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:!d,onClick:function(){function v(){return u("erase_disk")}return v}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Eject",icon:"eject",onClick:function(){function v(){u("eject_disk")}return v}()})],4)},c)))},k=function(c,m){var i=(0,a.useBackend)(m),u=i.data,s=i.act,d=u.disk_type,v=u.to_copy,h=c.title;return(0,e.createComponentVNode)(2,B,{title:h,children:(0,e.createComponentVNode)(2,t.Box,{overflowY:"auto",overflowX:"hidden",maxHeight:"450px",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:v.sort(function(C,p){return C.name.localeCompare(p.name)}).map(function(C){var p=C.name,N=C.id;return(0,e.createComponentVNode)(2,t.LabeledList.Item,{noColon:!0,label:p,children:(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-down",content:"Copy to Disk",onClick:function(){function V(){d===f?s("copy_tech",{id:N}):s("copy_design",{id:N})}return V}()})},N)})})})})},g=r.DataDiskMenu=function(){function l(c,m){var i=(0,a.useBackend)(m),u=i.data,s=u.disk_type,d=u.disk_data;if(!s)return(0,e.createComponentVNode)(2,t.Section,{title:"Data Disk",children:"No disk loaded."});switch(s){case o:return d?(0,e.createComponentVNode)(2,B,{title:"Design Disk",children:(0,e.createComponentVNode)(2,y)}):(0,e.createComponentVNode)(2,k,{title:"Design Disk"});case f:return d?(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 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),f=r.LatheCategory=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.data,l=k.act,c=g.category,m=g.matching_designs,i=g.menu,u=i===4,s=u?"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:m.map(function(d){var v=d.id,h=d.name,C=d.can_build,p=d.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:h,disabled:C<1,onClick:function(){function N(){return l(s,{id:v,amount:1})}return N}()})}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:C>=5?(0,e.createComponentVNode)(2,t.Button,{content:"x5",onClick:function(){function N(){return l(s,{id:v,amount:5})}return N}()}):null}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:C>=10?(0,e.createComponentVNode)(2,t.Button,{content:"x10",onClick:function(){function N(){return l(s,{id:v,amount:10})}return N}()}):null}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:p.map(function(N){return(0,e.createFragment)([" | ",(0,e.createVNode)(1,"span",N.is_red?"color-red":null,[N.amount,(0,e.createTextVNode)(" "),N.name],0)],0)})})]},v)})})]})}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 f(b,y){var B=(0,a.useBackend)(y),k=B.data,g=B.act,l=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 m(){var i=c?"disposeallP":"disposeallI";g(i)}return m}()}),(0,e.createComponentVNode)(2,t.LabeledList,{children:l.map(function(m){var i=m.volume,u=m.name,s=m.id;return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"* "+i+" of "+u,children:(0,e.createComponentVNode)(2,t.Button,{content:"Purge",icon:"trash",onClick:function(){function d(){var v=c?"disposeP":"disposeI";g(v,{id:s})}return d}()})},s)})})]})}return f}()},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),f=n(68198),b=r.LatheMainMenu=function(){function y(B,k){var g=(0,a.useBackend)(k),l=g.data,c=g.act,m=l.menu,i=l.categories,u=m===4?"Protolathe":"Circuit Imprinter";return(0,e.createComponentVNode)(2,t.Section,{title:u+" Menu",children:[(0,e.createComponentVNode)(2,o.LatheMaterials),(0,e.createComponentVNode)(2,f.LatheSearch),(0,e.createComponentVNode)(2,t.Divider),(0,e.createComponentVNode)(2,t.Flex,{wrap:"wrap",children:i.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 d(){c("setCategory",{category:s})}return d}()})},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 f(b,y){var B=(0,a.useBackend)(y),k=B.data,g=B.act,l=k.loaded_materials;return(0,e.createComponentVNode)(2,t.Section,{className:"RndConsole__LatheMaterialStorage",title:"Material Storage",children:(0,e.createComponentVNode)(2,t.Table,{children:l.map(function(c){var m=c.id,i=c.amount,u=c.name,s=function(){function C(p){var N=k.menu===4?"lathe_ejectsheet":"imprinter_ejectsheet";g(N,{id:m,amount:p})}return C}(),d=Math.floor(i/2e3),v=i<1,h=d===1?"":"s";return(0,e.createComponentVNode)(2,t.Table.Row,{className:v?"color-grey":"color-yellow",children:[(0,e.createComponentVNode)(2,t.Table.Cell,{minWidth:"210px",children:["* ",i," of ",u]}),(0,e.createComponentVNode)(2,t.Table.Cell,{minWidth:"110px",children:["(",d," sheet",h,")"]}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:i>=2e3?(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{content:"1x",icon:"eject",onClick:function(){function C(){return s(1)}return C}()}),(0,e.createComponentVNode)(2,t.Button,{content:"C",icon:"eject",onClick:function(){function C(){return s("custom")}return C}()}),i>=2e3*5?(0,e.createComponentVNode)(2,t.Button,{content:"5x",icon:"eject",onClick:function(){function C(){return s(5)}return C}()}):null,(0,e.createComponentVNode)(2,t.Button,{content:"All",icon:"eject",onClick:function(){function C(){return s(50)}return C}()})],0):null})]},m)})})})}return f}()},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 f(b,y){var B=(0,a.useBackend)(y),k=B.data,g=k.total_materials,l=k.max_materials,c=k.max_chemicals,m=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:g}),l?(0,e.createComponentVNode)(2,t.Table.Cell,{children:" / "+l}):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:m}),c?(0,e.createComponentVNode)(2,t.Table.Cell,{children:" / "+c}):null]})]})})}return f}()},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),f=n(70864),b=n(16830),y=n(42878),B=n(70497),k=["menu"];function g(u,s){if(u==null)return{};var d={};for(var v in u)if({}.hasOwnProperty.call(u,v)){if(s.includes(v))continue;d[v]=u[v]}return d}var l=t.Tabs.Tab,c=function(s,d){var v=(0,a.useBackend)(d),h=v.act,C=v.data,p=C.menu===o.MENU.LATHE?["nav_protolathe",C.submenu_protolathe]:["nav_imprinter",C.submenu_imprinter],N=p[0],V=p[1],S=s.menu,I=g(s,k);return(0,e.normalizeProps)((0,e.createComponentVNode)(2,l,Object.assign({selected:V===S,onClick:function(){function L(){return h(N,{menu:S})}return L}()},I)))},m=function(s){switch(s){case o.PRINTER_MENU.MAIN:return(0,e.createComponentVNode)(2,f.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)}},i=r.LatheMenu=function(){function u(s,d){var v=(0,a.useBackend)(d),h=v.data,C=h.menu,p=h.linked_lathe,N=h.linked_imprinter;return C===o.MENU.LATHE&&!p?(0,e.createComponentVNode)(2,t.Box,{children:"NO PROTOLATHE LINKED TO CONSOLE"}):C===o.MENU.IMPRINTER&&!N?(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"})]}),m(h.menu===o.MENU.LATHE?h.submenu_protolathe:h.submenu_imprinter)]})}return u}()},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 f(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 g(l,c){return k("search",{to_search:c})}return g}()})})}return f}()},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),f=r.LinkMenu=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,l=k.data,c=l.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(m){return(0,e.createComponentVNode)(2,o.Table.Row,{children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:m.addr}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:m.net_id}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:(0,e.createComponentVNode)(2,o.Button,{content:"Link",icon:"link",onClick:function(){function i(){return g("linktonetworkcontroller",{target_controller:m.addr})}return i}()})})]},m.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,f),(0,e.createComponentVNode)(2,b)]})}return y}(),f=function(B,k){var g=(0,a.useBackend)(k),l=g.act,c=g.data,m=c.sync,i=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 u(){l("unlink")}return u}()})})})},b=function(B,k){var g=(0,a.useBackend)(k),l=g.data,c=g.act,m=l.linked_analyzer,i=l.linked_lathe,u=l.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:"Scientific Analyzer",children:(0,e.createComponentVNode)(2,t.Button,{icon:"unlink",disabled:!m,content:m?"Unlink":"Undetected",onClick:function(){function s(){return c("disconnect",{item:"analyze"})}return s}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Protolathe",children:(0,e.createComponentVNode)(2,t.Button,{icon:"unlink",disabled:!i,content:i?"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:!u,content:u?"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),f=n(35840),b=n(37556),y=n(9681),B=n(81421),k=n(6256),g=n(68303),l=["menu"];function c(p,N){if(p==null)return{};var V={};for(var S in p)if({}.hasOwnProperty.call(p,S)){if(N.includes(S))continue;V[S]=p[S]}return V}var m=o.Tabs.Tab,i=r.MENU={MAIN:0,DISK:2,ANALYZE:3,LATHE:4,IMPRINTER:5,SETTINGS:6},u=r.PRINTER_MENU={MAIN:0,SEARCH:1,MATERIALS:2,CHEMICALS:3},s=function(N){switch(N){case i.MAIN:return(0,e.createComponentVNode)(2,C);case i.DISK:return(0,e.createComponentVNode)(2,b.DataDiskMenu);case i.ANALYZE:return(0,e.createComponentVNode)(2,g.AnalyzerMenu);case i.LATHE:case i.IMPRINTER:return(0,e.createComponentVNode)(2,y.LatheMenu);case i.SETTINGS:return(0,e.createComponentVNode)(2,k.SettingsMenu);default:return"UNKNOWN MENU"}},d=function(N,V){var S=(0,a.useBackend)(V),I=S.act,L=S.data,w=L.menu,A=N.menu,x=c(N,l);return(0,e.normalizeProps)((0,e.createComponentVNode)(2,m,Object.assign({selected:w===A,onClick:function(){function E(){return I("nav",{menu:A})}return E}()},x)))},v=r.RndConsole=function(){function p(N,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_analyzer,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,d,{icon:"flask",menu:i.MAIN,children:"Research"}),!!A&&(0,e.createComponentVNode)(2,d,{icon:"microscope",menu:i.ANALYZE,children:"Analyze"}),!!x&&(0,e.createComponentVNode)(2,d,{icon:"print",menu:i.LATHE,children:"Protolathe"}),!!E&&(0,e.createComponentVNode)(2,d,{icon:"memory",menu:i.IMPRINTER,children:"Imprinter"}),(0,e.createComponentVNode)(2,d,{icon:"floppy-disk",menu:i.DISK,children:"Disk"}),(0,e.createComponentVNode)(2,d,{icon:"cog",menu:i.SETTINGS,children:"Settings"})]}),s(w),(0,e.createComponentVNode)(2,h)]})})})}return p}(),h=function(N,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},C=function(N,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,D=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:D})," ",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),f=n(98595),b=r.RndNetController=function(){function k(g,l){var c=(0,t.useBackend)(l),m=c.act,i=c.data,u=i.ion,s=(0,t.useLocalState)(l,"mainTabIndex",0),d=s[0],v=s[1],h=function(){function C(p){switch(p){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 C}();return(0,e.createComponentVNode)(2,f.Window,{width:900,height:600,children:(0,e.createComponentVNode)(2,f.Window.Content,{scrollable:!0,children:[(0,e.createComponentVNode)(2,o.Tabs,{children:[(0,e.createComponentVNode)(2,o.Tabs.Tab,{icon:"wrench",selected:d===0,onClick:function(){function C(){return v(0)}return C}(),children:"Network Management"},"ConfigPage"),(0,e.createComponentVNode)(2,o.Tabs.Tab,{icon:"floppy-disk",selected:d===1,onClick:function(){function C(){return v(1)}return C}(),children:"Design Management"},"DesignPage")]}),h(d)]})})}return k}(),y=function(g,l){var c=(0,t.useBackend)(l),m=c.act,i=c.data,u=(0,t.useLocalState)(l,"filterType","ALL"),s=u[0],d=u[1],v=i.network_password,h=i.network_name,C=i.devices,p=[];p.push(s),s==="MSC"&&(p.push("BCK"),p.push("PGN"));var N=s==="ALL"?C:C.filter(function(V){return p.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:h||"Unset",selected:h,icon:"edit",onClick:function(){function V(){return m("network_name")}return V}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Network Password",children:(0,e.createComponentVNode)(2,o.Button,{content:v||"Unset",selected:v,icon:"lock",onClick:function(){function V(){return m("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 d("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 d("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 d("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 d("MFB")}return V}(),icon:"industry",children:"Exosuit Fabricators"},"Mechfabs"),(0,e.createComponentVNode)(2,o.Tabs.Tab,{selected:s==="MSC",onClick:function(){function V(){return d("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"})]}),N.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 m("unlink_device",{dclass:V.dclass,uid:V.id})}return S}()})})]},V.id)})]})]})],4)},B=function(g,l){var c=(0,t.useBackend)(l),m=c.act,i=c.data,u=i.designs,s=(0,t.useLocalState)(l,"searchText",""),d=s[0],v=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 h(C,p){return v(p)}return h}()}),u.filter((0,a.createSearch)(d,function(h){return h.name})).map(function(h){return(0,e.createComponentVNode)(2,o.Button.Checkbox,{fluid:!0,content:h.name,checked:!h.blacklisted,onClick:function(){function C(){return m(h.blacklisted?"unblacklist_design":"blacklist_design",{d_uid:h.uid})}return C}()},h.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),f=n(98595),b=r.RndServer=function(){function k(g,l){var c=(0,a.useBackend)(l),m=c.act,i=c.data,u=i.active,s=i.network_name;return(0,e.createComponentVNode)(2,f.Window,{width:600,height:500,resizable:!0,children:(0,e.createComponentVNode)(2,f.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:u?"On":"Off",selected:u,icon:"power-off",onClick:function(){function d(){return m("toggle_active")}return d}()})}),(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(g,l){var c=(0,a.useBackend)(l),m=c.act,i=c.data,u=i.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:u}),(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 m("unlink")}return s}()})})]})})},B=function(g,l){var c=(0,a.useBackend)(l),m=c.act,i=c.data,u=i.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"})]}),u.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 d(){return m("link",{addr:s.addr})}return d}()})})]},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),f=n(25328),b=function(k,g){var l=k/g;return l<=.2?"good":l<=.5?"average":"bad"},y=r.RobotSelfDiagnosis=function(){function B(k,g){var l=(0,a.useBackend)(g),c=l.data,m=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:m.map(function(i,u){return(0,e.createComponentVNode)(2,t.Section,{title:(0,f.capitalize)(i.name),children:i.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:i.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(i.brute_damage,i.max_damage),children:i.brute_damage}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Burn Damage",color:b(i.electronic_damage,i.max_damage),children:i.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:i.powered?"good":"bad",children:i.powered?"Yes":"No"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Enabled",color:i.status?"good":"bad",children:i.status?"Yes":"No"})]})})]})},u)})})})}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),f=r.RoboticsControlConsole=function(){function y(B,k){var g=(0,a.useBackend)(k),l=g.act,c=g.data,m=c.can_hack,i=c.safety,u=c.show_lock_all,s=c.cyborgs,d=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:[!!u&&(0,e.createComponentVNode)(2,t.Section,{title:"Emergency Lock Down",children:[(0,e.createComponentVNode)(2,t.Button,{icon:i?"lock":"unlock",content:i?"Disable Safety":"Enable Safety",selected:i,onClick:function(){function v(){return l("arm",{})}return v}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"lock",disabled:i,content:"Lock ALL Cyborgs",color:"bad",onClick:function(){function v(){return l("masslock",{})}return v}()})]}),(0,e.createComponentVNode)(2,b,{cyborgs:d,can_hack:m})]})})}return y}(),b=function(B,k){var g=B.cyborgs,l=B.can_hack,c=(0,a.useBackend)(k),m=c.act,i=c.data,u="Detonate";return i.detonate_cooldown>0&&(u+=" ("+i.detonate_cooldown+"s)"),g.length?g.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 d(){return m("hackbot",{uid:s.uid})}return d}()}),(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:!i.auth,onClick:function(){function d(){return m("stopbot",{uid:s.uid})}return d}()}),(0,e.createComponentVNode)(2,t.Button.Confirm,{icon:"bomb",content:u,disabled:!i.auth||i.detonate_cooldown>0,color:"bad",onClick:function(){function d(){return m("killbot",{uid:s.uid})}return d}()})],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),f=r.Safe=function(){function k(g,l){var c=(0,a.useBackend)(l),m=c.act,i=c.data,u=i.dial,s=i.open,d=i.locked,v=i.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*u+"deg)","z-index":0}})]}),!s&&(0,e.createComponentVNode)(2,B)]})})}return k}(),b=function(g,l){var c=(0,a.useBackend)(l),m=c.act,i=c.data,u=i.dial,s=i.open,d=i.locked,v=function(C,p){return(0,e.createComponentVNode)(2,t.Button,{disabled:s||p&&!d,icon:"arrow-"+(p?"right":"left"),content:(p?"Right":"Left")+" "+C,iconRight:p,onClick:function(){function N(){return m(p?"turnleft":"turnright",{num:C})}return N}(),style:{"z-index":10}})};return(0,e.createComponentVNode)(2,t.Box,{className:"Safe--dialer",children:[(0,e.createComponentVNode)(2,t.Button,{disabled:d,icon:s?"lock":"lock-open",content:s?"Close":"Open",mb:"0.5rem",onClick:function(){function h(){return m("open")}return h}()}),(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,t.Box,{position:"absolute",children:[v(50),v(10),v(1)]}),(0,e.createComponentVNode)(2,t.Box,{className:"Safe--dialer--right",position:"absolute",right:"5px",children:[v(1,!0),v(10,!0),v(50,!0)]}),(0,e.createComponentVNode)(2,t.Box,{className:"Safe--dialer--number",children:u})]})},y=function(g,l){var c=(0,a.useBackend)(l),m=c.act,i=c.data,u=i.contents;return(0,e.createComponentVNode)(2,t.Box,{className:"Safe--contents",overflow:"auto",children:u.map(function(s,d){return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{mb:"0.5rem",onClick:function(){function v(){return m("retrieve",{index:d+1})}return v}(),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(g,l){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.SatelliteControlSatellitesList=r.SatelliteControlMapView=r.SatelliteControlFooter=r.SatelliteControl=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.SatelliteControl=function(){function k(g,l){var c=(0,a.useBackend)(l),m=c.act,i=c.data,u=(0,a.useLocalState)(l,"tabIndex",i.tabIndex),s=u[0],d=u[1],v=function(){function C(p){d(p),m("set_tab_index",{tab_index:p})}return C}(),h=function(){function C(p){switch(p){case 0:return(0,e.createComponentVNode)(2,b);case 1:return(0,e.createComponentVNode)(2,y);default:return"WE SHOULDN'T BE HERE!"}}return C}();return(0,e.createComponentVNode)(2,o.Window,{width:800,height:600,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(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.Tabs,{children:[(0,e.createComponentVNode)(2,t.Tabs.Tab,{icon:"table",selected:s===0,onClick:function(){function C(){return v(0)}return C}(),children:"Satellites"},"Satellites"),(0,e.createComponentVNode)(2,t.Tabs.Tab,{icon:"map-marked-alt",selected:s===1,onClick:function(){function C(){return v(1)}return C}(),children:"Map View"},"MapView")]})}),h(s),(0,e.createComponentVNode)(2,B)]})})})}return k}(),b=r.SatelliteControlSatellitesList=function(){function k(g,l){var c=(0,a.useBackend)(l),m=c.act,i=c.data,u=i.satellites;return(0,e.createComponentVNode)(2,t.Section,{title:"Satellite Network Control",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:u.map(function(s){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"#"+s.id,children:[s.mode," ",(0,e.createComponentVNode)(2,t.Button,{content:s.active?"Deactivate":"Activate",icon:"arrow-circle-right",onClick:function(){function d(){return m("toggle",{id:s.id})}return d}()})]},s.id)})})})}return k}(),y=r.SatelliteControlMapView=function(){function k(g,l){var c=(0,a.useBackend)(l),m=c.act,i=c.data,u=i.satellites,s=i.has_goal,d=i.defended,v=i.collisions,h=i.fake_meteors,C=i.zoom,p=i.offsetX,N=i.offsetY,V=0;return(0,e.createComponentVNode)(2,t.Box,{height:"100vh",mb:"0.5rem",overflow:"hidden",children:(0,e.createComponentVNode)(2,t.NanoMap,{zoom:C,offsetX:p,offsetY:N,onZoom:function(){function S(I){return m("set_zoom",{zoom:I})}return S}(),onOffsetChange:function(){function S(I,L){return m("set_offset",{offset_x:L.offsetX,offset_y:L.offsetY})}return S}(),children:[u.map(function(S){return(0,e.createComponentVNode)(2,t.NanoMap.MarkerIcon,{x:S.x,y:S.y,icon:"satellite",tooltip:S.active?"Shield Satellite":"Inactive Shield Satellite",color:S.active?"white":"grey",onClick:function(){function I(){return m("toggle",{id:S.id})}return I}()},V++)}),s&&d.map(function(S){return(0,e.createComponentVNode)(2,t.NanoMap.MarkerIcon,{x:S.x,y:S.y,icon:"circle",tooltip:"Successful Defense",color:"blue"},V++)}),s&&v.map(function(S){return(0,e.createComponentVNode)(2,t.NanoMap.MarkerIcon,{x:S.x,y:S.y,icon:"x",tooltip:"Meteor Hit",color:"red"},V++)}),s&&h.map(function(S){return(0,e.createComponentVNode)(2,t.NanoMap.MarkerIcon,{x:S.x,y:S.y,icon:"meteor",tooltip:"Incoming Meteor",color:"white"},V++)})]})})}return k}(),B=r.SatelliteControlFooter=function(){function k(g,l){var c=(0,a.useBackend)(l),m=c.act,i=c.data,u=i.notice,s=i.notice_color,d=i.has_goal,v=i.coverage,h=i.coverage_goal,C=i.testing;return(0,e.createFragment)([d&&(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Station Shield Coverage",children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,horizontal:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{grow:1,children:(0,e.createComponentVNode)(2,t.ProgressBar,{color:v>=h?"good":"average",value:v,maxValue:100,children:[v,"%"]})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Check coverage",disabled:C,onClick:function(){function p(){return m("begin_test")}return p}()})})]})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{color:s,children:u})],0)}return k}()},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),f=n(98595),b=n(36352),y=n(92986),B=r.SecureStorage=function(){function c(m,i){return(0,e.createComponentVNode)(2,f.Window,{theme:"securestorage",height:500,width:280,children:(0,e.createComponentVNode)(2,f.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,g)})})})})}return c}(),k=function(m,i){var u=(0,t.useBackend)(i),s=u.act,d=window.event?m.which:m.keyCode;if(d===y.KEY_ENTER){m.preventDefault(),s("keypad",{digit:"E"});return}if(d===y.KEY_ESCAPE){m.preventDefault(),s("keypad",{digit:"C"});return}if(d===y.KEY_BACKSPACE){m.preventDefault(),s("backspace");return}if(d>=y.KEY_0&&d<=y.KEY_9){m.preventDefault(),s("keypad",{digit:d-y.KEY_0});return}if(d>=y.KEY_NUMPAD_0&&d<=y.KEY_NUMPAD_9){m.preventDefault(),s("keypad",{digit:d-y.KEY_NUMPAD_0});return}},g=function(m,i){var u=(0,t.useBackend)(i),s=u.act,d=u.data,v=d.locked,h=d.no_passcode,C=d.emagged,p=d.user_entered_code,N=[["1","2","3"],["4","5","6"],["7","8","9"],["C","0","E"]],V=h?"":v?"bad":"good";return(0,e.createComponentVNode)(2,o.Section,{fill:!0,onKeyDown:function(){function S(I){return k(I,i)}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:C?"ERROR":p})}),(0,e.createComponentVNode)(2,o.Table,{children:N.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,l,{number:I})},I)})},S[0])})})]})},l=function(m,i){var u=(0,t.useBackend)(i),s=u.act,d=u.data,v=m.number;return(0,e.createComponentVNode)(2,o.Button,{fluid:!0,bold:!0,mb:"6px",content:v,textAlign:"center",fontSize:"60px",lineHeight:1.25,width:"80px",className:(0,a.classes)(["SecureStorage__Button","SecureStorage__Button--keypad","SecureStorage__Button--"+v]),onClick:function(){function h(){return s("keypad",{digit:v})}return h}()})}},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),f=n(98595),b=n(3939),y=n(321),B=n(5485),k=n(22091),g={"*Execute*":"execute","*Arrest*":"arrest",Incarcerated:"incarcerated",Parolled:"parolled",Released:"released",Demote:"demote",Search:"search",Monitor:"monitor"},l=function(p,N){(0,b.modalOpen)(p,"edit",{field:N.edit,value:N.value})},c=r.SecurityRecords=function(){function C(p,N){var V=(0,t.useBackend)(N),S=V.act,I=V.data,L=I.loginState,w=I.currentPage,A;if(L.logged_in)w===1?A=(0,e.createComponentVNode)(2,i):w===2&&(A=(0,e.createComponentVNode)(2,d));else return(0,e.createComponentVNode)(2,f.Window,{theme:"security",width:800,height:900,children:(0,e.createComponentVNode)(2,f.Window.Content,{children:(0,e.createComponentVNode)(2,B.LoginScreen)})});return(0,e.createComponentVNode)(2,f.Window,{theme:"security",width:800,height:900,children:[(0,e.createComponentVNode)(2,b.ComplexModal),(0,e.createComponentVNode)(2,f.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,m),A]})})]})}return C}(),m=function(p,N){var V=(0,t.useBackend)(N),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]})]})})},i=function(p,N){var V=(0,t.useBackend)(N),S=V.act,I=V.data,L=I.records,w=(0,t.useLocalState)(N,"searchText",""),A=w[0],x=w[1],E=(0,t.useLocalState)(N,"sortId","name"),P=E[0],D=E[1],M=(0,t.useLocalState)(N,"sortOrder",!0),R=M[0],O=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,u,{id:"name",children:"Name"}),(0,e.createComponentVNode)(2,u,{id:"id",children:"ID"}),(0,e.createComponentVNode)(2,u,{id:"rank",children:"Assignment"}),(0,e.createComponentVNode)(2,u,{id:"fingerprint",children:"Fingerprint"}),(0,e.createComponentVNode)(2,u,{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,_){var U=R?1:-1;return F[P].localeCompare(_[P])*U}).map(function(F){return(0,e.createComponentVNode)(2,o.Table.Row,{className:"SecurityRecords__listRow--"+g[F.status],onClick:function(){function _(){return S("view",{uid_gen:F.uid_gen,uid_sec:F.uid_sec})}return _}(),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)},u=function(p,N){var V=(0,t.useLocalState)(N,"sortId","name"),S=V[0],I=V[1],L=(0,t.useLocalState)(N,"sortOrder",!0),w=L[0],A=L[1],x=p.id,E=p.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(p,N){var V=(0,t.useBackend)(N),S=V.act,I=V.data,L=I.isPrinting,w=(0,t.useLocalState)(N,"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)(N,"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,D){return x(D)}return E}()})})]})},d=function(p,N){var V=(0,t.useBackend)(N),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,v)})}),!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 l(N,x)}return P}()})]},E)})})})})}),(0,e.createComponentVNode)(2,h)],4)],0)},v=function(p,N){var V=(0,t.useBackend)(N),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 l(N,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)})]})},h=function(p,N){var V=(0,t.useBackend)(N),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)(N,"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),f=n(98595),b=n(3939);function y(u,s){var d=typeof Symbol!="undefined"&&u[Symbol.iterator]||u["@@iterator"];if(d)return(d=d.call(u)).next.bind(d);if(Array.isArray(u)||(d=B(u))||s&&u&&typeof u.length=="number"){d&&(u=d);var v=0;return function(){return v>=u.length?{done:!0}:{done:!1,value:u[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(u,s){if(u){if(typeof u=="string")return k(u,s);var d={}.toString.call(u).slice(8,-1);return d==="Object"&&u.constructor&&(d=u.constructor.name),d==="Map"||d==="Set"?Array.from(u):d==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(d)?k(u,s):void 0}}function k(u,s){(s==null||s>u.length)&&(s=u.length);for(var d=0,v=Array(s);d=A},h=function(w,A){return w<=A},C=s.split(" "),p=[],N=function(){var w=I.value,A=w.split(":");if(A.length===0)return 0;if(A.length===1)return p.push(function(P){return(P.name+" ("+P.variant+")").toLocaleLowerCase().includes(A[0].toLocaleLowerCase())}),0;if(A.length>2)return{v:function(){function P(D){return!1}return P}()};var x,E=d;if(A[1][A[1].length-1]==="-"?(E=h,x=Number(A[1].substring(0,A[1].length-1))):A[1][A[1].length-1]==="+"?(E=v,x=Number(A[1].substring(0,A[1].length-1))):x=Number(A[1]),isNaN(x))return{v:function(){function P(D){return!1}return P}()};switch(A[0].toLocaleLowerCase()){case"l":case"life":case"lifespan":p.push(function(P){return E(P.lifespan,x)});break;case"e":case"end":case"endurance":p.push(function(P){return E(P.endurance,x)});break;case"m":case"mat":case"maturation":p.push(function(P){return E(P.maturation,x)});break;case"pr":case"prod":case"production":p.push(function(P){return E(P.production,x)});break;case"y":case"yield":p.push(function(P){return E(P.yield,x)});break;case"po":case"pot":case"potency":p.push(function(P){return E(P.potency,x)});break;case"s":case"stock":case"c":case"count":case"a":case"amount":p.push(function(P){return E(P.amount,x)});break;default:return{v:function(){function P(D){return!1}return P}()}}},V,S=y(C),I;!(I=S()).done;)if(V=N(),V!==0&&V)return V.v;return function(L){for(var w=0,A=p;w=1?Number(E):1)}return A}()})]})]})}},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),f=r.ShuttleConsole=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,l=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:l.status?l.status:(0,e.createComponentVNode)(2,t.NoticeBox,{color:"red",children:"Shuttle Missing"})}),!!l.shuttle&&(!!l.docking_ports_len&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Send to ",children:l.docking_ports.map(function(c){return(0,e.createComponentVNode)(2,t.Button,{icon:"chevron-right",content:c.name,onClick:function(){function m(){return g("move",{move:c.id})}return m}()},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"})}),!!l.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:!l.status,onClick:function(){function c(){return g("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),f=r.ShuttleManipulator=function(){function k(g,l){var c=(0,a.useLocalState)(l,"tabIndex",0),m=c[0],i=c[1],u=function(){function s(d){switch(d){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:m===0,onClick:function(){function s(){return i(0)}return s}(),icon:"info-circle",children:"Status"},"Status"),(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:m===1,onClick:function(){function s(){return i(1)}return s}(),icon:"file-import",children:"Templates"},"Templates"),(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:m===2,onClick:function(){function s(){return i(2)}return s}(),icon:"tools",children:"Modification"},"Modification")]}),u(m)]})})})}return k}(),b=function(g,l){var c=(0,a.useBackend)(l),m=c.act,i=c.data,u=i.shuttles;return(0,e.createComponentVNode)(2,t.Box,{children:u.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 d(){return m("jump_to",{type:"mobile",id:s.id})}return d}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Fast Travel",icon:"fast-forward",onClick:function(){function d(){return m("fast_travel",{id:s.id})}return d}()})]})]})},s.name)})})},y=function(g,l){var c=(0,a.useBackend)(l),m=c.act,i=c.data,u=i.templates_tabs,s=i.existing_shuttle,d=i.templates;return(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Tabs,{children:u.map(function(v){return(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:v===s.id,icon:"file",onClick:function(){function h(){return m("select_template_category",{cat:v})}return h}(),children:v},v)})}),!!s&&d[s.id].templates.map(function(v){return(0,e.createComponentVNode)(2,t.Section,{title:v.name,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[v.description&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Description",children:v.description}),v.admin_notes&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Admin Notes",children:v.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 h(){return m("select_template",{shuttle_id:v.shuttle_id})}return h}()})})]})},v.name)})]})},B=function(g,l){var c=(0,a.useBackend)(l),m=c.act,i=c.data,u=i.existing_shuttle,s=i.selected;return(0,e.createComponentVNode)(2,t.Box,{children:[u?(0,e.createComponentVNode)(2,t.Section,{title:"Selected Shuttle: "+u.name,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",children:u.status}),u.timer&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Timer",children:u.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 d(){return m("jump_to",{type:"mobile",id:u.id})}return d}()})})]})}):(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 d(){return m("preview",{shuttle_id:s.shuttle_id})}return d}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Load",icon:"download",onClick:function(){function d(){return m("load",{shuttle_id:s.shuttle_id})}return d}()})]})]})}):(0,e.createComponentVNode)(2,t.Section,{title:"Selected Template: None"})]})}},86013:function(T,r,n){"use strict";r.__esModule=!0,r.SingularityMonitor=void 0;var e=n(89005),a=n(88510),t=n(64795),o=n(44879),f=n(72253),b=n(36036),y=n(76910),B=n(98595),k=n(36352),g=r.SingularityMonitor=function(){function i(u,s){var d=(0,f.useBackend)(s),v=d.act,h=d.data;return h.active===0?(0,e.createComponentVNode)(2,c):(0,e.createComponentVNode)(2,m)}return i}(),l=function(u){return Math.log2(16+Math.max(0,u))-4},c=function(u,s){var d=(0,f.useBackend)(s),v=d.act,h=d.data,C=h.singularities,p=C===void 0?[]:C;return(0,e.createComponentVNode)(2,B.Window,{width:450,height:185,children:(0,e.createComponentVNode)(2,B.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,b.Section,{fill:!0,title:"Detected Singularities",buttons:(0,e.createComponentVNode)(2,b.Button,{icon:"sync",content:"Refresh",onClick:function(){function N(){return v("refresh")}return N}()}),children:(0,e.createComponentVNode)(2,b.Table,{children:p.map(function(N){return(0,e.createComponentVNode)(2,b.Table.Row,{children:[(0,e.createComponentVNode)(2,b.Table.Cell,{children:N.singularity_id+". "+N.area_name}),(0,e.createComponentVNode)(2,b.Table.Cell,{collapsing:!0,color:"label",children:"Stage:"}),(0,e.createComponentVNode)(2,b.Table.Cell,{collapsing:!0,width:"120px",children:(0,e.createComponentVNode)(2,b.ProgressBar,{value:N.stage,minValue:0,maxValue:6,ranges:{good:[1,2],average:[3,4],bad:[5,6]},children:(0,o.toFixed)(N.stage)})}),(0,e.createComponentVNode)(2,b.Table.Cell,{collapsing:!0,children:(0,e.createComponentVNode)(2,b.Button,{content:"Details",onClick:function(){function V(){return v("view",{view:N.singularity_id})}return V}()})})]},N.singularity_id)})})})})})},m=function(u,s){var d=(0,f.useBackend)(s),v=d.act,h=d.data,C=h.active,p=h.singulo_stage,N=h.singulo_potential_stage,V=h.singulo_energy,S=h.singulo_high,I=h.singulo_low,L=h.generators,w=L===void 0?[]:L;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:"Stage",children:(0,e.createComponentVNode)(2,b.ProgressBar,{value:p,minValue:0,maxValue:6,ranges:{good:[1,2],average:[3,4],bad:[5,6]},children:(0,o.toFixed)(p)})}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Potential Stage",children:(0,e.createComponentVNode)(2,b.ProgressBar,{value:N,minValue:0,maxValue:6,ranges:{good:[1,p+.5],average:[p+.5,p+1.5],bad:[p+1.5,p+2]},children:(0,o.toFixed)(N)})}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Energy",children:(0,e.createComponentVNode)(2,b.ProgressBar,{value:V,minValue:I,maxValue:S,ranges:{good:[.67*S+.33*I,S],average:[.33*S+.67*I,.67*S+.33*I],bad:[I,.33*S+.67*I]},children:(0,o.toFixed)(V)+"MJ"})})]})})}),(0,e.createComponentVNode)(2,b.Stack.Item,{grow:!0,basis:0,children:(0,e.createComponentVNode)(2,b.Section,{fill:!0,scrollable:!0,title:"Field Generators",buttons:(0,e.createComponentVNode)(2,b.Button,{icon:"arrow-left",content:"Back",onClick:function(){function A(){return v("back")}return A}()}),children:(0,e.createComponentVNode)(2,b.LabeledList,{children:w.map(function(A){return(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Remaining Charge",children:(0,e.createComponentVNode)(2,b.ProgressBar,{value:A.charge,minValue:0,maxValue:125,ranges:{good:[80,125],average:[30,80],bad:[0,30]},children:(0,o.toFixed)(A.charge)})},A.gen_index)})})})})]})})})}},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),f=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"],g=r.Sleeper=function(){function d(v,h){var C=(0,t.useBackend)(h),p=C.act,N=C.data,V=N.hasOccupant,S=V?(0,e.createComponentVNode)(2,l):(0,e.createComponentVNode)(2,s);return(0,e.createComponentVNode)(2,f.Window,{width:550,height:760,children:(0,e.createComponentVNode)(2,f.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,i)})]})})})}return d}(),l=function(v,h){var C=(0,t.useBackend)(h),p=C.act,N=C.data,V=N.occupant;return(0,e.createFragment)([(0,e.createComponentVNode)(2,c),(0,e.createComponentVNode)(2,m),(0,e.createComponentVNode)(2,u)],4)},c=function(v,h){var C=(0,t.useBackend)(h),p=C.act,N=C.data,V=N.occupant,S=N.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 p("auto_eject_dead_"+(S?"off":"on"))}return I}()}),(0,e.createComponentVNode)(2,o.Button,{icon:"user-slash",content:"Eject",onClick:function(){function I(){return p("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)]})})},m=function(v,h){var C=(0,t.useBackend)(h),p=C.data,N=p.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:N[V[1]]/100,ranges:B,children:(0,a.round)(N[V[1]],0)},S)},S)})})})},i=function(v,h){var C=(0,t.useBackend)(h),p=C.act,N=C.data,V=N.hasOccupant,S=N.isBeakerLoaded,I=N.beakerMaxSpace,L=N.beakerFreeSpace,w=N.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 p("togglefilter")}return x}()}),(0,e.createComponentVNode)(2,o.Button,{disabled:!S,icon:"eject",content:"Eject",onClick:function(){function x(){return p("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."})})},u=function(v,h){var C=(0,t.useBackend)(h),p=C.act,N=C.data,V=N.occupant,S=N.chemicals,I=N.maxchem,L=N.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,D){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 p("chemical",{chemid:w.id,amount:P})}return M}()},D)})]})})},A)})})},s=function(v,h){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),f=r.SlotMachine=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,l=k.data;if(l.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 l.plays===1?c=l.plays+" player has tried their luck today!":c=l.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:l.money})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"10 credits to spin",children:(0,e.createComponentVNode)(2,t.Button,{icon:"coins",disabled:l.working,content:l.working?"Spinning...":"Spin",onClick:function(){function m(){return g("spin")}return m}()})})]}),(0,e.createComponentVNode)(2,t.Box,{bold:!0,lineHeight:2,color:l.resultlvl,children:l.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),f=r.Smartfridge=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,l=k.data,c=l.secure,m=l.can_dry,i=l.drying,u=l.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:m?"Drying rack":"Contents",buttons:!!m&&(0,e.createComponentVNode)(2,t.Button,{width:4,icon:i?"power-off":"times",content:i?"On":"Off",selected:i,onClick:function(){function s(){return g("drying")}return s}()}),children:[!u&&(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."]})}),!!u&&u.slice().sort(function(s,d){return s.display_name.localeCompare(d.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 d(){return g("vend",{index:s.vend,amount:1})}return d}()}),(0,e.createComponentVNode)(2,t.NumberInput,{width:"40px",minValue:0,value:0,maxValue:s.quantity,step:1,stepPixelSize:3,onChange:function(){function d(v,h){return g("vend",{index:s.vend,amount:h})}return d}()}),(0,e.createComponentVNode)(2,t.Button,{width:4,icon:"arrow-down",content:"All",tooltip:"Dispense all.",tooltipPosition:"bottom-start",onClick:function(){function d(){return g("vend",{index:s.vend,amount:s.quantity})}return d}()})]})]},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),f=n(98595),b=1e3,y=r.Smes=function(){function B(k,g){var l=(0,a.useBackend)(g),c=l.act,m=l.data,i=m.capacityPercent,u=m.capacity,s=m.charge,d=m.inputAttempt,v=m.inputting,h=m.inputLevel,C=m.inputLevelMax,p=m.inputAvailable,N=m.outputPowernet,V=m.outputAttempt,S=m.outputting,I=m.outputLevel,L=m.outputLevelMax,w=m.outputUsed,A=i>=100&&"good"||v&&"average"||"bad",x=S&&"good"||s>0&&"average"||"bad";return(0,e.createComponentVNode)(2,f.Window,{width:340,height:345,children:(0,e.createComponentVNode)(2,f.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:i*.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:d?"sync-alt":"times",selected:d,onClick:function(){function E(){return c("tryinput")}return E}(),children:d?"Auto":"Off"}),children:(0,e.createComponentVNode)(2,t.Box,{color:A,children:i>=100&&"Fully Charged"||v&&"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:h===0,onClick:function(){function E(){return c("input",{target:"min"})}return E}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"backward",disabled:h===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:h/b,fillValue:p/b,minValue:0,maxValue:C/b,step:5,stepPixelSize:4,format:function(){function E(P){return(0,o.formatPower)(P*b,1)}return E}(),onChange:function(){function E(P,D){return c("input",{target:D*b})}return E}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Button,{icon:"forward",disabled:h===C,onClick:function(){function E(){return c("input",{adjust:1e4})}return E}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"fast-forward",disabled:h===C,onClick:function(){function E(){return c("input",{target:"max"})}return E}()})]})]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Available",children:(0,o.formatPower)(p)})]})}),(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:N?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,D){return c("output",{target:D*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),f=r.SolarControl=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,l=k.data,c=0,m=1,i=2,u=l.generated,s=l.generated_ratio,d=l.tracking_state,v=l.tracking_rate,h=l.connected_panels,C=l.connected_tracker,p=l.cdir,N=l.direction,V=l.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 g("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:C?"good":"bad",children:C?"OK":"N/A"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Solar panels",color:h>0?"good":"bad",children:h})]})}),(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:u+" W"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Panel orientation",children:[p,"\xB0 (",N,")"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Tracker rotation",children:[d===i&&(0,e.createComponentVNode)(2,t.Box,{children:" Automated "}),d===m&&(0,e.createComponentVNode)(2,t.Box,{children:[" ",v,"\xB0/h (",V,")"," "]}),d===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:[d!==i&&(0,e.createComponentVNode)(2,t.NumberInput,{unit:"\xB0",step:1,stepPixelSize:1,minValue:0,maxValue:359,value:p,onDrag:function(){function S(I,L){return g("cdir",{cdir:L})}return S}()}),d===i&&(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:d===c,onClick:function(){function S(){return g("track",{track:c})}return S}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"clock-o",content:"Timed",selected:d===m,onClick:function(){function S(){return g("track",{track:m})}return S}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"sync",content:"Auto",selected:d===i,disabled:!C,onClick:function(){function S(){return g("track",{track:i})}return S}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Tracker rotation",children:[d===m&&(0,e.createComponentVNode)(2,t.NumberInput,{unit:"\xB0/h",step:1,stepPixelSize:1,minValue:-7200,maxValue:7200,value:v,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 g("tdir",{tdir:L})}return S}()}),d===c&&(0,e.createComponentVNode)(2,t.Box,{lineHeight:"19px",children:" Tracker offline "}),d===i&&(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),f=r.SpawnersMenu=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,l=k.data,c=l.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(m){return(0,e.createComponentVNode)(2,t.Section,{mb:.5,title:m.name+" ("+m.amount_left+" left)",level:2,buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{icon:"chevron-circle-right",content:"Jump",onClick:function(){function i(){return g("jump",{ID:m.uids})}return i}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"chevron-circle-right",content:"Spawn",onClick:function(){function i(){return g("spawn",{ID:m.uids})}return i}()})],4),children:[(0,e.createComponentVNode)(2,t.Box,{style:{"white-space":"pre-wrap"},mb:1,fontSize:"16px",children:m.desc}),!!m.fluff&&(0,e.createComponentVNode)(2,t.Box,{style:{"white-space":"pre-wrap"},textColor:"#878787",fontSize:"14px",children:m.fluff}),!!m.important_info&&(0,e.createComponentVNode)(2,t.Box,{style:{"white-space":"pre-wrap"},mt:1,bold:!0,color:"red",fontSize:"18px",children:m.important_info})]},m.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),f=r.SpecMenu=function(){function g(l,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 g}(),b=function(l,c){var m=(0,a.useBackend)(c),i=m.act,u=m.data,s=u.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 d(){return i("hemomancer")}return d}()}),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(l,c){var m=(0,a.useBackend)(c),i=m.act,u=m.data,s=u.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 d(){return i("umbrae")}return d}()}),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(l,c){var m=(0,a.useBackend)(c),i=m.act,u=m.data,s=u.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 d(){return i("gargantua")}return d}()}),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(l,c){var m=(0,a.useBackend)(c),i=m.act,u=m.data,s=u.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 d(){return i("dantalion")}return d}()}),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),f=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(d,v){var h=(0,a.useBackend)(v),C=h.data,p=C.amount,N=C.recipes,V=(0,a.useLocalState)(v,"searchText",""),S=V[0],I=V[1],L=g(N,(0,f.createSearch)(S)),w=(0,a.useLocalState)(v,"",!1),A=w[0],x=w[1];return(0,e.createComponentVNode)(2,y.Section,{fill:!0,scrollable:!0,title:"Amount: "+p,buttons:(0,e.createFragment)([A&&(0,e.createComponentVNode)(2,y.Input,{width:12.5,value:S,placeholder:"Find recipe",onInput:function(){function E(P,D){return I(D)}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,i,{recipes:L}):(0,e.createComponentVNode)(2,y.NoticeBox,{children:"No recipes found!"})})},g=function s(d,v){var h=(0,o.flow)([(0,t.map)(function(C){var p=C[0],N=C[1];return l(N)?v(p)?C:[p,s(N,v)]:v(p)?C:[p,void 0]}),(0,t.filter)(function(C){var p=C[0],N=C[1];return N!==void 0}),(0,t.sortBy)(function(C){var p=C[0],N=C[1];return p}),(0,t.sortBy)(function(C){var p=C[0],N=C[1];return!l(N)}),(0,t.reduce)(function(C,p){var N=p[0],V=p[1];return C[N]=V,C},{})])(Object.entries(d));return Object.keys(h).length?h:void 0},l=function(d){return d.uid===void 0},c=function(d,v){return d.required_amount>v?0:Math.floor(v/d.required_amount)},m=function(d,v){for(var h=(0,a.useBackend)(v),C=h.act,p=d.recipe,N=d.max_possible_multiplier,V=Math.min(N,Math.floor(p.max_result_amount/p.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*p.result_amount+"x",onClick:function(){function P(){return C("make",{recipe_uid:p.uid,multiplier:E})}return P}()}))},w=0,A=S;w1?I+"x ":"",M=L>1?"s":"",R=""+D+V,O=L+" sheet"+M,F=c(S,N);return(0,e.createComponentVNode)(2,y.ImageButton,{fluid:!0,base64:P,dmIcon:x,dmIconState:E,imageSize:32,disabled:!F,tooltip:O,buttons:w>1&&F>1&&(0,e.createComponentVNode)(2,m,{recipe:S,max_possible_multiplier:F}),onClick:function(){function _(){return C("make",{recipe_uid:A,multiplier:1})}return _}(),children:R})}},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),f=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 g=(0,a.useBackend)(k),l=g.data,c=l.alarms||[],m=c.Fire||[],i=c.Atmosphere||[],u=c.Power||[];return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Section,{title:"Fire Alarms",children:(0,e.createVNode)(1,"ul",null,[m.length===0&&(0,e.createVNode)(1,"li","color-good","Systems Nominal",16),m.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,[i.length===0&&(0,e.createVNode)(1,"li","color-good","Systems Nominal",16),i.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,[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)})],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),f=n(36036),b=n(98595),y=function(l){return l[l.SetupFutureStationTraits=0]="SetupFutureStationTraits",l[l.ViewStationTraits=1]="ViewStationTraits",l}(y||{}),B=function(c,m){var i=(0,o.useBackend)(m),u=i.act,s=i.data,d=s.future_station_traits,v=(0,o.useLocalState)(m,"selectedFutureTrait",null),h=v[0],C=v[1],p=Object.fromEntries(s.valid_station_traits.map(function(V){return[V.name,V.path]})),N=Object.keys(p);return N.sort(),(0,e.createComponentVNode)(2,f.Box,{children:[(0,e.createComponentVNode)(2,f.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,f.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,f.Dropdown,{displayText:!h&&"Select trait to add...",onSelected:C,options:N,selected:h,width:"100%"})}),(0,e.createComponentVNode)(2,f.Stack.Item,{children:(0,e.createComponentVNode)(2,f.Button,{color:"green",icon:"plus",onClick:function(){function V(){if(h){var S=p[h],I=[S];if(d){var L,w=d.map(function(A){return A.path});if(w.indexOf(S)!==-1)return;I=(L=I).concat.apply(L,w)}u("setup_future_traits",{station_traits:I})}}return V}(),children:"Add"})})]}),(0,e.createComponentVNode)(2,f.Divider),Array.isArray(d)?d.length>0?(0,e.createComponentVNode)(2,f.Stack,{vertical:!0,fill:!0,children:d.map(function(V){return(0,e.createComponentVNode)(2,f.Stack.Item,{children:(0,e.createComponentVNode)(2,f.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,f.Stack.Item,{grow:!0,children:V.name}),(0,e.createComponentVNode)(2,f.Stack.Item,{children:(0,e.createComponentVNode)(2,f.Button,{color:"red",icon:"times",onClick:function(){function S(){u("setup_future_traits",{station_traits:(0,a.filterMap)(d,function(I){if(I.path!==V.path)return I.path})})}return S}(),children:"Delete"})})]})},V.path)})}):(0,e.createComponentVNode)(2,f.Box,{textAlign:"center",children:[(0,e.createComponentVNode)(2,f.Box,{children:"No station traits will run next round."}),(0,e.createComponentVNode)(2,f.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 u("clear_future_traits")}return V}(),children:"Run Station Traits Normally"})]}):(0,e.createComponentVNode)(2,f.Box,{textAlign:"center",children:[(0,e.createComponentVNode)(2,f.Box,{children:"No future station traits are planned."}),(0,e.createComponentVNode)(2,f.Button,{mt:1,fluid:!0,color:"red",icon:"times",onClick:function(){function V(){return u("setup_future_traits",{station_traits:[]})}return V}(),children:"Prevent station traits from running next round"})]})]})},k=function(c,m){var i=(0,o.useBackend)(m),u=i.act,s=i.data;return s.current_traits.length>0?(0,e.createComponentVNode)(2,f.Stack,{vertical:!0,fill:!0,children:s.current_traits.map(function(d){return(0,e.createComponentVNode)(2,f.Stack.Item,{children:(0,e.createComponentVNode)(2,f.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,f.Stack.Item,{grow:!0,children:d.name}),(0,e.createComponentVNode)(2,f.Stack.Item,{children:(0,e.createComponentVNode)(2,f.Button.Confirm,{content:"Revert",color:"red",disabled:s.too_late_to_revert||!d.can_revert,tooltip:!d.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 v(){return u("revert",{ref:d.ref})}return v}()})})]})},d.ref)})}):(0,e.createComponentVNode)(2,f.Box,{textAlign:"center",children:"There are no active station traits."})},g=r.StationTraitsPanel=function(){function l(c,m){var i=(0,o.useLocalState)(m,"station_traits_tab",y.ViewStationTraits),u=i[0],s=i[1],d;switch(u){case y.SetupFutureStationTraits:d=(0,e.createComponentVNode)(2,B);break;case y.ViewStationTraits:d=(0,e.createComponentVNode)(2,k);break;default:(0,t.exhaustiveCheck)(u)}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,f.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,f.Stack.Item,{children:(0,e.createComponentVNode)(2,f.Tabs,{children:[(0,e.createComponentVNode)(2,f.Tabs.Tab,{icon:"eye",selected:u===y.ViewStationTraits,onClick:function(){function v(){return s(y.ViewStationTraits)}return v}(),children:"View"}),(0,e.createComponentVNode)(2,f.Tabs.Tab,{icon:"edit",selected:u===y.SetupFutureStationTraits,onClick:function(){function v(){return s(y.SetupFutureStationTraits)}return v}(),children:"Edit"})]})}),(0,e.createComponentVNode)(2,f.Stack.Item,{m:0,children:[(0,e.createComponentVNode)(2,f.Divider),d]})]})})})}return l}()},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),f=n(36036),b=n(98595),y=5,B=9,k=function(h){return h===0?5:9},g="64px",l=function(h){return h[0]+"/"+h[1]},c=function(h){var C=h.align,p=h.children;return(0,e.createComponentVNode)(2,f.Box,{style:{position:"absolute",left:C==="left"?"6px":"48px","text-align":C,"text-shadow":"2px 2px 2px #000",top:"2px"},children:p})},m={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"}},i={eyes:{displayName:"eyewear",gridSpot:l([0,0]),image:"inventory-glasses.png"},head:{displayName:"headwear",gridSpot:l([0,1]),image:"inventory-head.png"},mask:{displayName:"mask",gridSpot:l([1,1]),image:"inventory-mask.png"},neck:{displayName:"neck",gridSpot:l([1,0]),image:"inventory-neck.png"},pet_collar:{displayName:"collar",gridSpot:l([1,1]),image:"inventory-collar.png"},right_ear:{displayName:"right ear",gridSpot:l([0,2]),image:"inventory-ears.png"},left_ear:{displayName:"left ear",gridSpot:l([1,2]),image:"inventory-ears.png"},parrot_headset:{displayName:"headset",gridSpot:l([1,2]),image:"inventory-ears.png"},handcuffs:{displayName:"handcuffs",gridSpot:l([1,3])},legcuffs:{displayName:"legcuffs",gridSpot:l([1,4])},jumpsuit:{displayName:"uniform",gridSpot:l([2,0]),image:"inventory-uniform.png"},suit:{displayName:"suit",gridSpot:l([2,1]),image:"inventory-suit.png"},gloves:{displayName:"gloves",gridSpot:l([2,2]),image:"inventory-gloves.png"},right_hand:{displayName:"right hand",gridSpot:l([2,3]),image:"inventory-hand_r.png",additionalComponent:(0,e.createComponentVNode)(2,c,{align:"left",children:"R"})},left_hand:{displayName:"left hand",gridSpot:l([2,4]),image:"inventory-hand_l.png",additionalComponent:(0,e.createComponentVNode)(2,c,{align:"right",children:"L"})},shoes:{displayName:"shoes",gridSpot:l([3,1]),image:"inventory-shoes.png"},suit_storage:{displayName:"suit storage",gridSpot:l([4,0]),image:"inventory-suit_storage.png"},id:{displayName:"ID",gridSpot:l([4,1]),image:"inventory-id.png"},belt:{displayName:"belt",gridSpot:l([4,2]),image:"inventory-belt.png"},back:{displayName:"backpack",gridSpot:l([4,3]),image:"inventory-back.png"},left_pocket:{displayName:"left pocket",gridSpot:l([3,4]),image:"inventory-pocket.png"},right_pocket:{displayName:"right pocket",gridSpot:l([3,3]),image:"inventory-pocket.png"},pda:{displayName:"PDA",gridSpot:l([4,4]),image:"inventory-pda.png"}},u={eyes:{displayName:"eyewear",gridSpot:l([0,0]),image:"inventory-glasses.png"},head:{displayName:"headwear",gridSpot:l([0,1]),image:"inventory-head.png"},mask:{displayName:"mask",gridSpot:l([1,1]),image:"inventory-mask.png"},neck:{displayName:"neck",gridSpot:l([1,0]),image:"inventory-neck.png"},pet_collar:{displayName:"collar",gridSpot:l([1,1]),image:"inventory-collar.png"},right_ear:{displayName:"right ear",gridSpot:l([0,2]),image:"inventory-ears.png"},left_ear:{displayName:"left ear",gridSpot:l([1,2]),image:"inventory-ears.png"},parrot_headset:{displayName:"headset",gridSpot:l([1,2]),image:"inventory-ears.png"},handcuffs:{displayName:"handcuffs",gridSpot:l([1,3])},legcuffs:{displayName:"legcuffs",gridSpot:l([1,4])},jumpsuit:{displayName:"uniform",gridSpot:l([2,0]),image:"inventory-uniform.png"},suit:{displayName:"suit",gridSpot:l([2,1]),image:"inventory-suit.png"},gloves:{displayName:"gloves",gridSpot:l([2,2]),image:"inventory-gloves.png"},right_hand:{displayName:"right hand",gridSpot:l([4,4]),image:"inventory-hand_r.png",additionalComponent:(0,e.createComponentVNode)(2,c,{align:"left",children:"R"})},left_hand:{displayName:"left hand",gridSpot:l([4,5]),image:"inventory-hand_l.png",additionalComponent:(0,e.createComponentVNode)(2,c,{align:"right",children:"L"})},shoes:{displayName:"shoes",gridSpot:l([3,1]),image:"inventory-shoes.png"},suit_storage:{displayName:"suit storage",gridSpot:l([4,0]),image:"inventory-suit_storage.png"},id:{displayName:"ID",gridSpot:l([4,1]),image:"inventory-id.png"},belt:{displayName:"belt",gridSpot:l([4,2]),image:"inventory-belt.png"},back:{displayName:"backpack",gridSpot:l([4,3]),image:"inventory-back.png"},left_pocket:{displayName:"left pocket",gridSpot:l([4,7]),image:"inventory-pocket.png"},right_pocket:{displayName:"right pocket",gridSpot:l([4,6]),image:"inventory-pocket.png"},pda:{displayName:"PDA",gridSpot:l([4,8]),image:"inventory-pda.png"}},s=function(v){return v[v.Completely=1]="Completely",v[v.Hidden=2]="Hidden",v}(s||{}),d=r.StripMenu=function(){function v(h,C){var p=(0,o.useBackend)(C),N=p.act,V=p.data,S=new Map;if(V.show_mode===0)for(var I=0,L=Object.keys(V.items);I=.01})},(0,a.sortBy)(function(x){return-x.amount})])(h.gases||[]),A=Math.max.apply(Math,[1].concat(w.map(function(x){return x.portion})));return(0,e.createComponentVNode)(2,B.Window,{width:550,height:250,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:p/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:N,minValue:0,maxValue:5e3,ranges:{good:[-1/0,5e3],average:[5e3,7e3],bad:[7e3,1/0]},children:(0,o.toFixed)(N)+" MeV/cm3"})}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Gas Coefficient",children:(0,e.createComponentVNode)(2,b.ProgressBar,{value:L,minValue:1,maxValue:5.25,ranges:{bad:[1,1.55],average:[1.55,5.25],good:[5.25,1/0]},children:L.toFixed(2)})}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Temperature",children:(0,e.createComponentVNode)(2,b.ProgressBar,{value:l(V),minValue:0,maxValue:l(1e4),ranges:{teal:[-1/0,l(80)],good:[l(80),l(373)],average:[l(373),l(1e3)],bad:[l(1e3),1/0]},children:(0,o.toFixed)(V)+" K"})}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Mole Per Tile",children:(0,e.createComponentVNode)(2,b.ProgressBar,{value:I,minValue:0,maxValue:12e3,ranges:{teal:[-1/0,100],average:[100,11333],good:[11333,12e3],bad:[12e3,1/0]},children:(0,o.toFixed)(I)+" mol"})}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Pressure",children:(0,e.createComponentVNode)(2,b.ProgressBar,{value:l(S),minValue:0,maxValue:l(5e4),ranges:{good:[l(1),l(300)],average:[-1/0,l(1e3)],bad:[l(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 x(){return v("back")}return x}()}),children:(0,e.createComponentVNode)(2,b.LabeledList,{children:w.map(function(x){return(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:(0,y.getGasLabel)(x.name),children:(0,e.createComponentVNode)(2,b.ProgressBar,{color:(0,y.getGasColor)(x.name),value:x.portion,minValue:0,maxValue:A,children:(0,o.toFixed)(x.amount)+" mol ("+x.portion+"%)"})},x.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),f=r.SyndicateComputerSimple=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,l=k.data;return(0,e.createComponentVNode)(2,o.Window,{theme:"syndicate",width:400,height:400,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:l.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 m(){return g(c.buttonact)}return m}()}),children:[c.status,!!c.bullets&&(0,e.createComponentVNode)(2,t.Box,{children:c.bullets.map(function(m){return(0,e.createComponentVNode)(2,t.Box,{children:m},m)})})]},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),f=function(B){return B.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,")},b=r.TEG=function(){function y(B,k){var g=(0,a.useBackend)(k),l=g.act,c=g.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 m(){return l("check")}return m}()})]})})}):(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:[f(c.cold_inlet_temp)," K, ",f(c.cold_inlet_pressure)," kPa"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Cold Outlet",children:[f(c.cold_outlet_temp)," K, ",f(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:[f(c.hot_inlet_temp)," K, ",f(c.hot_inlet_pressure)," kPa"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Hot Outlet",children:[f(c.hot_outlet_temp)," K, ",f(c.hot_outlet_pressure)," kPa"]})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Power Output",children:[f(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}()},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),f=r.TachyonArray=function(){function y(B,k){var g=(0,a.useBackend)(k),l=g.act,c=g.data,m=c.records,i=m===void 0?[]:m,u=c.explosion_target,s=c.toxins_tech,d=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:u}),(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:!i.length||d,align:"center",onClick:function(){function v(){return l("print_logs")}return v}()}),(0,e.createComponentVNode)(2,t.Button.Confirm,{icon:"trash",content:"Delete All Logs",disabled:!i.length,color:"bad",align:"center",onClick:function(){function v(){return l("delete_logs")}return v}()})]})]})}),i.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 g=(0,a.useBackend)(k),l=g.act,c=g.data,m=c.records,i=m===void 0?[]:m;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"})]}),i.map(function(u){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:u.logged_time}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:u.epicenter}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:u.actual_size_message}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:u.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 l("delete_record",{index:u.index})}return s}()})})]},u.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),f=r.Tank=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,l=k.data,c;return l.has_mask?c=(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Mask",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,width:"76%",icon:l.connected?"check":"times",content:l.connected?"Internals On":"Internals Off",selected:l.connected,onClick:function(){function m(){return g("internals")}return m}()})}):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:l.tankPressure/1013,ranges:{good:[.35,1/0],average:[.15,.35],bad:[-1/0,.15]},children:l.tankPressure+" kPa"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Release Pressure",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"fast-backward",disabled:l.ReleasePressure===l.minReleasePressure,tooltip:"Min",onClick:function(){function m(){return g("pressure",{pressure:"min"})}return m}()}),(0,e.createComponentVNode)(2,t.NumberInput,{animated:!0,value:parseFloat(l.releasePressure),width:"65px",unit:"kPa",minValue:l.minReleasePressure,maxValue:l.maxReleasePressure,onChange:function(){function m(i,u){return g("pressure",{pressure:u})}return m}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"fast-forward",disabled:l.ReleasePressure===l.maxReleasePressure,tooltip:"Max",onClick:function(){function m(){return g("pressure",{pressure:"max"})}return m}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"undo",content:"",disabled:l.ReleasePressure===l.defaultReleasePressure,tooltip:"Reset",onClick:function(){function m(){return g("pressure",{pressure:"reset"})}return m}()})]}),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),f=r.TankDispenser=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,l=k.data,c=l.o_tanks,m=l.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 i(){return g("oxygen")}return i}()})}),(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{mt:1,fluid:!0,content:"Dispense Plasma Tank ("+m+")",disabled:m===0,icon:"arrow-circle-down",onClick:function(){function i(){return g("plasma")}return i}()})})]})})})}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),f=r.TcommsCore=function(){function g(l,c){var m=(0,a.useBackend)(c),i=m.act,u=m.data,s=u.ion,d=(0,a.useLocalState)(c,"tabIndex",0),v=d[0],h=d[1],C=function(){function p(N){switch(N){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 p}();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:v===0,onClick:function(){function p(){return h(0)}return p}(),children:"Configuration"},"ConfigPage"),(0,e.createComponentVNode)(2,t.Tabs.Tab,{icon:"link",selected:v===1,onClick:function(){function p(){return h(1)}return p}(),children:"Device Linkage"},"LinkagePage"),(0,e.createComponentVNode)(2,t.Tabs.Tab,{icon:"user-times",selected:v===2,onClick:function(){function p(){return h(2)}return p}(),children:"User Filtering"},"FilterPage")]}),C(v)]})})}return g}(),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(l,c){var m=(0,a.useBackend)(c),i=m.act,u=m.data,s=u.active,d=u.sectors_available,v=u.nttc_toggle_jobs,h=u.nttc_toggle_job_color,C=u.nttc_toggle_name_color,p=u.nttc_toggle_command_bold,N=u.nttc_job_indicator_type,V=u.nttc_setting_language,S=u.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 i("toggle_active")}return I}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Sector Coverage",children:d})]})}),(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:v?"On":"Off",selected:v,icon:"user-tag",onClick:function(){function I(){return i("nttc_toggle_jobs")}return I}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Job Departmentalisation",children:(0,e.createComponentVNode)(2,t.Button,{content:h?"On":"Off",selected:h,icon:"clipboard-list",onClick:function(){function I(){return i("nttc_toggle_job_color")}return I}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Name Departmentalisation",children:(0,e.createComponentVNode)(2,t.Button,{content:C?"On":"Off",selected:C,icon:"user-tag",onClick:function(){function I(){return i("nttc_toggle_name_color")}return I}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Command Amplification",children:(0,e.createComponentVNode)(2,t.Button,{content:p?"On":"Off",selected:p,icon:"volume-up",onClick:function(){function I(){return i("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:N||"Unset",selected:N,icon:"pencil-alt",onClick:function(){function I(){return i("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 i("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 i("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 i("import")}return I}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Export Configuration",icon:"file-export",onClick:function(){function I(){return i("export")}return I}()})]})],4)},B=function(l,c){var m=(0,a.useBackend)(c),i=m.act,u=m.data,s=u.link_password,d=u.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 v(){return i("change_password")}return v}()})})}),(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"})]}),d.map(function(v){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:v.addr}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:v.net_id}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:v.sector}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:v.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 h(){return i("unlink",{addr:v.addr})}return h}()})})]},v.addr)})]})]})},k=function(l,c){var m=(0,a.useBackend)(c),i=m.act,u=m.data,s=u.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 d(){return i("add_filter")}return d}()}),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(d){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:d}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Remove",icon:"user-times",onClick:function(){function v(){return i("remove_filter",{user:d})}return v}()})})]},d)})]})})}},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),f=r.TcommsRelay=function(){function B(k,g){var l=(0,a.useBackend)(g),c=l.act,m=l.data,i=m.linked,u=m.active,s=m.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:u?"On":"Off",selected:u,icon:"power-off",onClick:function(){function d(){return c("toggle_active")}return d}()})}),(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 d(){return c("network_id")}return d}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Link Status",children:i===1?(0,e.createComponentVNode)(2,t.Box,{color:"green",children:"Linked"}):(0,e.createComponentVNode)(2,t.Box,{color:"red",children:"Unlinked"})})]})}),i===1?(0,e.createComponentVNode)(2,b):(0,e.createComponentVNode)(2,y)]})})}return B}(),b=function(k,g){var l=(0,a.useBackend)(g),c=l.act,m=l.data,i=m.linked_core_id,u=m.linked_core_addr,s=m.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:i}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Linked Core Address",children:u}),(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 d(){return c("toggle_hidden_link")}return d}()})}),(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 d(){return c("unlink")}return d}()})})]})})},y=function(k,g){var l=(0,a.useBackend)(g),c=l.act,m=l.data,i=m.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"})]}),i.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:u.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:u.addr})}return s}()})})]},u.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),f=r.Teleporter=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,l=k.data,c=l.targetsTeleport?l.targetsTeleport:{},m=0,i=1,u=2,s=l.calibrated,d=l.calibrating,v=l.powerstation,h=l.regime,C=l.teleporterhub,p=l.target,N=l.locked,V=l.adv_beacon_allowed,S=l.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:[(!v||!C)&&(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Error",children:[C,!v&&(0,e.createComponentVNode)(2,t.Box,{color:"bad",children:" Powerstation not linked "}),v&&!C&&(0,e.createComponentVNode)(2,t.Box,{color:"bad",children:" Teleporter hub not linked "})]}),v&&C&&(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 g("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:[h===m&&(0,e.createComponentVNode)(2,t.Dropdown,{width:18.2,selected:p,disabled:d,options:Object.keys(c),color:p!=="None"?"default":"bad",onSelected:function(){function I(L){return g("settarget",{x:c[L].x,y:c[L].y,z:c[L].z,tptarget:c[L].pretarget})}return I}()}),h===i&&(0,e.createComponentVNode)(2,t.Dropdown,{width:18.2,selected:p,disabled:d,options:Object.keys(c),color:p!=="None"?"default":"bad",onSelected:function(){function I(L){return g("settarget",{x:c[L].x,y:c[L].y,z:c[L].z,tptarget:c[L].pretarget})}return I}()}),h===u&&(0,e.createComponentVNode)(2,t.Box,{children:p})]})]}),(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:h===i?"good":null,onClick:function(){function I(){return g("setregime",{regime:i})}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:h===m?"good":null,onClick:function(){function I(){return g("setregime",{regime:m})}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:h===u?"good":null,disabled:!N,onClick:function(){function I(){return g("setregime",{regime:u})}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:[p!=="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:d&&(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||d),onClick:function(){function I(){return g("calibrate")}return I}()})})]}),p==="None"&&(0,e.createComponentVNode)(2,t.Box,{lineHeight:"21px",children:"No target set"})]})]})]}),!!(N&&v&&C&&h===u)&&(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 g("load")}return I}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Eject",tooltip:"Ejects the GPS device",icon:"eject",onClick:function(){function I(){return g("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),f=r.TelescienceConsole=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,l=k.data,c=l.last_msg,m=l.linked_pad,i=l.held_gps,u=l.lastdata,s=l.power_levels,d=l.current_max_power,v=l.current_power,h=l.current_bearing,C=l.current_elevation,p=l.current_sector,N=l.working,V=l.max_z,S=(0,a.useLocalState)(B,"dummyrot",h),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,!(u.length>0)||(0,e.createVNode)(1,"ul",null,u.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:m===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:N,value:h,onDrag:function(){function w(A,x){return L(x)}return w}(),onChange:function(){function w(A,x){return g("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:N,value:C,onChange:function(){function w(A,x){return g("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:v===w,disabled:A>=d-1||N,onClick:function(){function x(){return g("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:p,disabled:N,onChange:function(){function w(A,x){return g("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:N,onClick:function(){function w(){return g("pad_send")}return w}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Receive",disabled:N,onClick:function(){function w(){return g("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:N,onClick:function(){function w(){return g("recal_crystals")}return w}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Eject Crystals",disabled:N,onClick:function(){function w(){return g("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:i===1?(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{disabled:i===0||N,content:"Eject GPS",onClick:function(){function w(){return g("eject_gps")}return w}()}),(0,e.createComponentVNode)(2,t.Button,{disabled:i===0||N,content:"Store Coordinates",onClick:function(){function w(){return g("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),f=n(98595),b=r.TempGun=function(){function g(l,c){var m=(0,t.useBackend)(c),i=m.act,u=m.data,s=u.target_temperature,d=u.temperature,v=u.max_temp,h=u.min_temp;return(0,e.createComponentVNode)(2,f.Window,{width:250,height:121,children:(0,e.createComponentVNode)(2,f.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:h,maxValue:v,value:s,format:function(){function C(p){return(0,a.toFixed)(p,2)}return C}(),width:"50px",onDrag:function(){function C(p,N){return i("target_temperature",{target_temperature:N})}return C}()}),"\xB0C"]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Current Temperature",children:(0,e.createComponentVNode)(2,o.Box,{color:y(d),bold:d>500-273.15,children:[(0,e.createComponentVNode)(2,o.AnimatedNumber,{value:(0,a.round)(d,2)}),"\xB0C"]})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Power Cost",children:(0,e.createComponentVNode)(2,o.Box,{color:k(d),children:B(d)})})]})})})})}return g}(),y=function(l){return l<=-100?"blue":l<=0?"teal":l<=100?"green":l<=200?"orange":"red"},B=function(l){return l<=100-273.15?"High":l<=250-273.15?"Medium":l<=300-273.15?"Low":l<=400-273.15?"Medium":"High"},k=function(l){return l<=100-273.15?"red":l<=250-273.15?"orange":l<=300-273.15?"green":l<=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),f=n(92986),b=n(36036),y=n(98595),B=r.sanitizeMultiline=function(){function c(m){return m.replace(/(\n|\r\n){3,}/,"\n\n")}return c}(),k=r.removeAllSkiplines=function(){function c(m){return m.replace(/[\r\n]+/,"")}return c}(),g=r.TextInputModal=function(){function c(m,i){var u=(0,o.useBackend)(i),s=u.act,d=u.data,v=d.max_length,h=d.message,C=h===void 0?"":h,p=d.multiline,N=d.placeholder,V=d.timeout,S=d.title,I=(0,o.useLocalState)(i,"input",N||""),L=I[0],w=I[1],A=function(){function P(D){if(D!==L){var M=p?B(D):k(D);w(M)}}return P}(),x=p||L.length>=40,E=130+(C.length>40?Math.ceil(C.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(D){var M=window.event?D.which:D.keyCode;M===f.KEY_ENTER&&(!x||!D.shiftKey)&&s("submit",{entry:L}),M===f.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:C})}),(0,e.createComponentVNode)(2,b.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,l,{input:L,onChange:A})}),(0,e.createComponentVNode)(2,b.Stack.Item,{children:(0,e.createComponentVNode)(2,t.InputButtons,{input:L,message:L.length+"/"+v})})]})})})]})}return c}(),l=function(m,i){var u=(0,o.useBackend)(i),s=u.act,d=u.data,v=d.max_length,h=d.multiline,C=m.input,p=m.onChange,N=h||C.length>=40;return(0,e.createComponentVNode)(2,b.TextArea,{autoFocus:!0,autoSelect:!0,height:h||C.length>=40?"100%":"1.8rem",maxLength:v,onEscape:function(){function V(){return s("cancel")}return V}(),onEnter:function(){function V(S,I){N&&S.shiftKey||(S.preventDefault(),s("submit",{entry:I}))}return V}(),onChange:function(){function V(S,I){return p(I)}return V}(),placeholder:"Type something...",value:C})}},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),f=n(98595),b=r.ThermoMachine=function(){function y(B,k){var g=(0,t.useBackend)(k),l=g.act,c=g.data;return(0,e.createComponentVNode)(2,f.Window,{width:300,height:225,children:(0,e.createComponentVNode)(2,f.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 m(i){return(0,a.toFixed)(i,2)}return m}()})," K"]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Pressure",children:[(0,e.createComponentVNode)(2,o.AnimatedNumber,{value:c.pressure,format:function(){function m(i){return(0,a.toFixed)(i,2)}return m}()})," 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 m(){return l("power")}return m}()}),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 m(){return l("cooling")}return m}()})}),(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 m(){return l("target",{target:c.min})}return m}()}),(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 m(i,u){return l("target",{target:u})}return m}()}),(0,e.createComponentVNode)(2,o.Button,{icon:"fast-forward",disabled:c.target===c.max,title:"Maximum Temperature",onClick:function(){function m(){return l("target",{target:c.max})}return m}()}),(0,e.createComponentVNode)(2,o.Button,{icon:"sync",disabled:c.target===c.initial,title:"Room Temperature",onClick:function(){function m(){return l("target",{target:c.initial})}return m}()})]})]})})]})})}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),f=r.TransferValve=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,l=k.data,c=l.tank_one,m=l.tank_two,i=l.attached_device,u=l.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:u?"unlock":"lock",content:u?"Open":"Closed",disabled:!c||!m,onClick:function(){function s(){return g("toggle")}return s}()})})})}),(0,e.createComponentVNode)(2,t.Section,{title:"Assembly",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"cog",content:"Configure Assembly",disabled:!i,onClick:function(){function s(){return g("device")}return s}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Attachment",children:i?(0,e.createComponentVNode)(2,t.Button,{icon:"eject",content:i,disabled:!i,onClick:function(){function s(){return g("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 g("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:m?(0,e.createComponentVNode)(2,t.Button,{icon:"eject",content:m,disabled:!m,onClick:function(){function s(){return g("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),f=n(44879),b=r.TurbineComputer=function(){function k(g,l){var c=(0,a.useBackend)(l),m=c.act,i=c.data,u=i.compressor,s=i.compressor_broken,d=i.turbine,v=i.turbine_broken,h=i.online,C=!!(u&&!s&&d&&!v);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:h?"power-off":"times",content:h?"Online":"Offline",selected:h,disabled:!C,onClick:function(){function p(){return m("toggle_power")}return p}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"times",content:"Disconnect",onClick:function(){function p(){return m("disconnect")}return p}()})],4),children:C?(0,e.createComponentVNode)(2,B):(0,e.createComponentVNode)(2,y)})})})}return k}(),y=function(g,l){var c=(0,a.useBackend)(l),m=c.data,i=m.compressor,u=m.compressor_broken,s=m.turbine,d=m.turbine_broken,v=m.online;return(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Compressor Status",color:!i||u?"bad":"good",children:u?i?"Offline":"Missing":"Online"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Turbine Status",color:!s||d?"bad":"good",children:d?s?"Offline":"Missing":"Online"})]})},B=function(g,l){var c=(0,a.useBackend)(l),m=c.data,i=m.rpm,u=m.temperature,s=m.power,d=m.bearing_heat;return(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Turbine Speed",children:[i," RPM"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Internal Temp",children:[u," 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:d,minValue:0,maxValue:100,ranges:{good:[-1/0,60],average:[60,90],bad:[90,1/0]},children:(0,f.toFixed)(d)+"%"})})]})}},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),f=n(72253),b=n(36036),y=n(98595),B=n(3939),k=function(h){switch(h){case 0:return(0,e.createComponentVNode)(2,l);case 1:return(0,e.createComponentVNode)(2,c);case 2:return(0,e.createComponentVNode)(2,d);default:return"SOMETHING WENT VERY WRONG PLEASE AHELP"}},g=r.Uplink=function(){function v(h,C){var p=(0,f.useBackend)(C),N=p.act,V=p.data,S=V.cart,I=(0,f.useLocalState)(C,"tabIndex",0),L=I[0],w=I[1],A=(0,f.useLocalState)(C,"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 N("lock")}return P}(),icon:"lock",children:"Lock Uplink"},"LockUplink")]})}),(0,e.createComponentVNode)(2,b.Stack.Item,{grow:!0,children:k(L)})]})})]})}return v}(),l=function(h,C){var p=(0,f.useBackend)(C),N=p.act,V=p.data,S=V.crystals,I=V.cats,L=(0,f.useLocalState)(C,"uplinkItems",I[0].items),w=L[0],A=L[1],x=(0,f.useLocalState)(C,"searchText",""),E=x[0],P=x[1],D=function(U,z){z===void 0&&(z="");var $=(0,o.createSearch)(z,function(G){var X=G.hijack_only===1?"|hijack":"";return G.name+"|"+G.desc+"|"+G.cost+"tc"+X});return(0,t.flow)([(0,a.filter)(function(G){return G==null?void 0:G.name}),z&&(0,a.filter)($),(0,a.sortBy)(function(G){return G==null?void 0:G.name})])(U)},M=function(U){if(P(U),U==="")return A(I[0].items);A(D(I.map(function(z){return z.items}).flat(),U))},R=(0,f.useLocalState)(C,"showDesc",1),O=R[0],F=R[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:O,onClick:function(){function _(){return F(!O)}return _}()}),(0,e.createComponentVNode)(2,b.Button,{content:"Random Item",icon:"question",onClick:function(){function _(){return N("buyRandom")}return _}()}),(0,e.createComponentVNode)(2,b.Button,{content:"Refund Currently Held Item",icon:"undo",onClick:function(){function _(){return N("refund")}return _}()})],4),children:(0,e.createComponentVNode)(2,b.Input,{fluid:!0,placeholder:"Search Equipment",onInput:function(){function _(U,z){M(z)}return _}(),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(_){return(0,e.createComponentVNode)(2,b.Tabs.Tab,{selected:E!==""?!1:_.items===w,onClick:function(){function U(){A(_.items),P("")}return U}(),children:_.cat},_)})})})}),(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(_){return(0,e.createComponentVNode)(2,b.Stack.Item,{p:1,backgroundColor:"rgba(255, 0, 0, 0.1)",children:(0,e.createComponentVNode)(2,i,{i:_,showDecription:O},(0,o.decodeHtmlEntities)(_.name))},(0,o.decodeHtmlEntities)(_.name))})})})})]})]})},c=function(h,C){var p=(0,f.useBackend)(C),N=p.act,V=p.data,S=V.cart,I=V.crystals,L=V.cart_price,w=(0,f.useLocalState)(C,"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 N("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 N("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,i,{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,m)]})},m=function(h,C){var p=(0,f.useBackend)(C),N=p.act,V=p.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 N("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,i,{grow:!0,i:L})},w)})})})})},i=function(h,C){var p=h.i,N=h.showDecription,V=N===void 0?1:N,S=h.buttons,I=S===void 0?(0,e.createComponentVNode)(2,u,{i:p}):S;return(0,e.createComponentVNode)(2,b.Section,{title:(0,o.decodeHtmlEntities)(p.name),showBottom:V,buttons:I,children:V?(0,e.createComponentVNode)(2,b.Box,{italic:!0,children:(0,o.decodeHtmlEntities)(p.desc)}):null})},u=function(h,C){var p=(0,f.useBackend)(C),N=p.act,V=p.data,S=h.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 N("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 N("buyItem",{item:S.obj_path})}return L}(),disabled:S.cost>I})],4)},s=function(h,C){var p=(0,f.useBackend)(C),N=p.act,V=p.data,S=h.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 N("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 N("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 N("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 N("set_cart_item_quantity",{item:S.obj_path,quantity:++S.amount})}return L}(),disabled:S.limit!==-1&&S.amount>=S.limit})]})},d=function(h,C){var p=(0,f.useBackend)(C),N=p.act,V=p.data,S=V.exploitable,I=(0,f.useLocalState)(C,"selectedRecord",S[0]),L=I[0],w=I[1],A=(0,f.useLocalState)(C,"searchText",""),x=A[0],E=A[1],P=function(R,O){O===void 0&&(O="");var F=(0,o.createSearch)(O,function(_){return _.name});return(0,t.flow)([(0,a.filter)(function(_){return _==null?void 0:_.name}),O&&(0,a.filter)(F),(0,a.sortBy)(function(_){return _.name})])(R)},D=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(R,O){return E(O)}return M}()}),(0,e.createComponentVNode)(2,b.Tabs,{vertical:!0,children:D.map(function(M){return(0,e.createComponentVNode)(2,b.Tabs.Tab,{selected:M===L,onClick:function(){function R(){return w(M)}return R}(),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),f=function(B,k){var g=(0,a.useBackend)(k),l=g.act,c=g.data,m=B.product,i=B.productStock,u=B.productIcon,s=B.productIconState,d=c.chargesMoney,v=c.user,h=c.usermoney,C=c.inserted_cash,p=c.vend_ready,N=c.inserted_item_name,V=!d||m.price===0,S="ERROR!",I="";V?(S="FREE",I="arrow-circle-down"):(S=m.price,I="shopping-cart");var L=!p||i===0||!V&&m.price>h&&m.price>C;return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{collapsing:!0,children:(0,e.createComponentVNode)(2,t.DmIcon,{verticalAlign:"middle",icon:u,icon_state:s,fallback:(0,e.createComponentVNode)(2,t.Icon,{p:.66,name:"spinner",size:2,spin:!0})})}),(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:m.name}),(0,e.createComponentVNode)(2,t.Table.Cell,{collapsing:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,t.Box,{color:i<=0&&"bad"||i<=m.max_amount/2&&"average"||"good",children:[i," in stock"]})}),(0,e.createComponentVNode)(2,t.Table.Cell,{collapsing:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,disabled:L,icon:I,content:S,textAlign:"left",onClick:function(){function w(){return l("vend",{inum:m.inum})}return w}()})})]})},b=r.Vending=function(){function y(B,k){var g=(0,a.useBackend)(k),l=g.act,c=g.data,m=c.user,i=c.usermoney,u=c.inserted_cash,s=c.chargesMoney,d=c.product_records,v=d===void 0?[]:d,h=c.hidden_records,C=h===void 0?[]:h,p=c.stock,N=c.vend_ready,V=c.inserted_item_name,S=c.panel_open,I=c.speaker,L;return L=[].concat(v),c.extended_inventory&&(L=[].concat(L,C)),L=L.filter(function(w){return!!w}),(0,e.createComponentVNode)(2,o.Window,{title:"Vending Machine",width:450,height:Math.min((s?171:89)+L.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 w(){return l("eject_item",{})}return w}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{disabled:!u,icon:"money-bill-wave-alt",content:u?(0,e.createFragment)([(0,e.createVNode)(1,"b",null,u,0),(0,e.createTextVNode)(" credits")],0):"Dispense Change",tooltip:u?"Dispense Change":null,textAlign:"left",onClick:function(){function w(){return l("change")}return w}()})})]}),children:m&&(0,e.createComponentVNode)(2,t.Box,{children:["Welcome, ",(0,e.createVNode)(1,"b",null,m.name,0),", ",(0,e.createVNode)(1,"b",null,m.job||"Unemployed",0),"!",(0,e.createVNode)(1,"br"),"Your balance is ",(0,e.createVNode)(1,"b",null,[i,(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 w(){return l("toggle_voice",{})}return w}()})})}),(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:L.map(function(w){return(0,e.createComponentVNode)(2,f,{product:w,productStock:p[w.name],productIcon:w.icon,productIconState:w.icon_state},w.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),f=r.VolumeMixer=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,l=k.data,c=l.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(m,i){return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Box,{fontSize:"1.25rem",color:"label",mt:i>0&&"0.5rem",children:m.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 u(){return g("volume",{channel:m.num,volume:0})}return u}()})})}),(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:m.volume,onChange:function(){function u(s,d){return g("volume",{channel:m.num,volume:d})}return u}()})}),(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 u(){return g("volume",{channel:m.num,volume:100})}return u}()})})})]})})],4,m.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),f=r.VotePanel=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,l=k.data,c=l.remaining,m=l.question,i=l.choices,u=l.user_vote,s=l.counts,d=l.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:m,children:[(0,e.createComponentVNode)(2,t.Box,{mb:1.5,ml:.5,children:["Time remaining: ",Math.round(c/10),"s"]}),i.map(function(v){return(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{mb:1,fluid:!0,translucent:!0,lineHeight:3,multiLine:v,content:v+(d?" ("+(s[v]||0)+")":""),onClick:function(){function h(){return g("vote",{target:v})}return h}(),selected:v===u})},v)})]})})})}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),f=r.Wires=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,l=k.data,c=l.wires||[],m=l.status||[],i=56+c.length*23+(status?0:15+m.length*17);return(0,e.createComponentVNode)(2,o.Window,{width:350,height:i,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(u){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{className:"candystripe",label:u.color_name,labelColor:u.seen_color,color:u.seen_color,buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{content:u.cut?"Mend":"Cut",onClick:function(){function s(){return g("cut",{wire:u.color})}return s}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Pulse",onClick:function(){function s(){return g("pulse",{wire:u.color})}return s}()}),(0,e.createComponentVNode)(2,t.Button,{content:u.attached?"Detach":"Attach",onClick:function(){function s(){return g("attach",{wire:u.color})}return s}()})],4),children:!!u.wire&&(0,e.createVNode)(1,"i",null,[(0,e.createTextVNode)("("),u.wire,(0,e.createTextVNode)(")")],0)},u.seen_color)})})})}),!!m.length&&(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{children:m.map(function(u){return(0,e.createComponentVNode)(2,t.Box,{color:"lightgray",children:u},u)})})})]})})})}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),f=r.WizardApprenticeContract=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,l=k.data,c=l.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 m(){return g("fire")}return m}()})]}),(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 m(){return g("translocation")}return m}()})]}),(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 m(){return g("restoration")}return m}()})]}),(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 m(){return g("stealth")}return m}()})]}),(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 m(){return g("honk")}return m}()})]}),(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 f(g,l){var c=typeof Symbol!="undefined"&&g[Symbol.iterator]||g["@@iterator"];if(c)return(c=c.call(g)).next.bind(c);if(Array.isArray(g)||(c=b(g))||l&&g&&typeof g.length=="number"){c&&(g=c);var m=0;return function(){return m>=g.length?{done:!0}:{done:!1,value:g[m++]}}}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(g,l){if(g){if(typeof g=="string")return y(g,l);var c={}.toString.call(g).slice(8,-1);return c==="Object"&&g.constructor&&(c=g.constructor.name),c==="Map"||c==="Set"?Array.from(g):c==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c)?y(g,l):void 0}}function y(g,l){(l==null||l>g.length)&&(l=g.length);for(var c=0,m=Array(l);c0&&!V.includes(O.ref)&&!p.includes(O.ref),checked:p.includes(O.ref),onClick:function(){function F(){return S(O.ref)}return F}()},O.desc)})]})]})})}return g}()},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),f=function(B,k,g,l,c){return Bl?"average":B>c?"bad":"good"},b=r.AtmosScan=function(){function y(B,k){var g=B.data.aircontents;return(0,e.createComponentVNode)(2,o.Box,{children:(0,e.createComponentVNode)(2,o.LabeledList,{children:(0,a.filter)(function(l){return l.val!=="0"||l.entry==="Pressure"||l.entry==="Temperature"})(g).map(function(l){return(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:l.entry,color:f(l.val,l.bad_low,l.poor_low,l.poor_high,l.bad_high),children:[l.val,l.units]},l.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")},f=r.BeakerContents=function(){function b(y){var B=y.beakerLoaded,k=y.beakerContents,g=k===void 0?[]:k,l=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."})||g.length===0&&(0,e.createComponentVNode)(2,a.Stack.Item,{color:"label",children:"Beaker is empty."}),g.map(function(c,m){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),!!l&&(0,e.createComponentVNode)(2,a.Stack.Item,{children:l(c,m)})]},c.name)})]})}return b}();f.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 f(b,y){var B=(0,a.useBackend)(y),k=B.act,g=B.data,l=g.locked,c=g.noaccess,m=g.maintpanel,i=g.on,u=g.autopatrol,s=g.canhack,d=g.emagged,v=g.remote_disabled;return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.NoticeBox,{children:["Swipe an ID card to ",l?"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:i?"power-off":"times",content:i?"On":"Off",selected:i,disabled:c,onClick:function(){function h(){return k("power")}return h}()})}),u!==null&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Patrol",children:(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:u,content:"Auto Patrol",disabled:c,onClick:function(){function h(){return k("autopatrol")}return h}()})}),!!m&&(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:d?"bad":"good",children:d?"DISABLED!":"Enabled"})}),!!s&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Hacking",children:(0,e.createComponentVNode)(2,t.Button,{icon:"terminal",content:d?"Restore Safties":"Hack",disabled:c,color:"bad",onClick:function(){function h(){return k("hack")}return h}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Remote Access",children:(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:!v,content:"AI Remote Control",disabled:c,onClick:function(){function h(){return k("disableremote")}return h}()})})]})})],4)}return f}()},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={},f=r.modalOpen=function(){function g(l,c,m){var i=(0,a.useBackend)(l),u=i.act,s=i.data,d=Object.assign(s.modal?s.modal.args:{},m||{});u("modal_open",{id:c,arguments:JSON.stringify(d)})}return g}(),b=r.modalRegisterBodyOverride=function(){function g(l,c){o[l]=c}return g}(),y=r.modalAnswer=function(){function g(l,c,m,i){var u=(0,a.useBackend)(l),s=u.act,d=u.data;if(d.modal){var v=Object.assign(d.modal.args||{},i||{});s("modal_answer",{id:c,answer:m,arguments:JSON.stringify(v)})}}return g}(),B=r.modalClose=function(){function g(l,c){var m=(0,a.useBackend)(l),i=m.act;i("modal_close",{id:c})}return g}(),k=r.ComplexModal=function(){function g(l,c){var m=(0,a.useBackend)(c),i=m.data;if(i.modal){var u=i.modal,s=u.id,d=u.text,v=u.type,h,C=(0,e.createComponentVNode)(2,t.Button,{className:"Button--modal",icon:"arrow-left",content:"Cancel",onClick:function(){function L(){return B(c)}return L}()}),p,N,V="auto";if(o[s])p=o[s](i.modal,c);else if(v==="input"){var S=i.modal.value;h=function(){function L(w){return y(c,s,S)}return L}(),p=(0,e.createComponentVNode)(2,t.Input,{value:i.modal.value,placeholder:"ENTER to submit",width:"100%",my:"0.5rem",autofocus:!0,onChange:function(){function L(w,A){S=A}return L}()}),N=(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(v==="choice"){var I=typeof i.modal.choices=="object"?Object.values(i.modal.choices):i.modal.choices;p=(0,e.createComponentVNode)(2,t.Dropdown,{options:I,selected:i.modal.value,width:"100%",my:"0.5rem",onSelected:function(){function L(w){return y(c,s,w)}return L}()}),V="initial"}else v==="bento"?p=(0,e.createComponentVNode)(2,t.Stack,{spacingPrecise:"1",wrap:"wrap",my:"0.5rem",maxHeight:"1%",children:i.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(i.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)})}):v==="boolean"&&(N=(0,e.createComponentVNode)(2,t.Box,{mt:"0.5rem",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"times",content:i.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:i.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:l.maxWidth||window.innerWidth/2+"px",maxHeight:l.maxHeight||window.innerHeight/2+"px",onEnter:h,mx:"auto",overflowY:V,"padding-bottom":"5px",children:[d&&(0,e.createComponentVNode)(2,t.Box,{inline:!0,children:d}),o[s]&&C,p,N]})}}return g}()},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),f=n(76910),b=f.COLORS.department,y=["Captain","Head of Security","Chief Engineer","Chief Medical Officer","Research Director","Head of Personnel","Quartermaster"],B=function(m){return y.indexOf(m)!==-1?"green":"orange"},k=function(m){if(y.indexOf(m)!==-1)return!0},g=function(m){return m.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"})]}),m.map(function(i){return(0,e.createComponentVNode)(2,t.Table.Row,{color:B(i.rank),bold:k(i.rank),children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,o.decodeHtmlEntities)(i.name)}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,o.decodeHtmlEntities)(i.rank)}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:i.active})]},i.name+i.rank)})]})},l=r.CrewManifest=function(){function c(m,i){var u=(0,a.useBackend)(i),s=u.act,d;if(m.data)d=m.data;else{var v=(0,a.useBackend)(i),h=v.data;d=h}var C=d,p=C.manifest,N=p.heads,V=p.sec,S=p.eng,I=p.med,L=p.sci,w=p.ser,A=p.sup,x=p.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:g(N)}),(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:g(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:g(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:g(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:g(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:g(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:g(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:g(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 f(b,y){var B=(0,t.useBackend)(y),k=B.act,g=B.data,l=g.large_buttons,c=g.swapped_buttons,m=b.input,i=b.message,u=b.disabled,s=(0,e.createComponentVNode)(2,a.Button,{color:"good",content:"Submit",bold:!!l,fluid:!!l,onClick:function(){function v(){return k("submit",{entry:m})}return v}(),textAlign:"center",tooltip:l&&i,disabled:u,width:!l&&6}),d=(0,e.createComponentVNode)(2,a.Button,{color:"bad",content:"Cancel",bold:!!l,fluid:!!l,onClick:function(){function v(){return k("cancel")}return v}(),textAlign:"center",width:!l&&6});return(0,e.createComponentVNode)(2,a.Flex,{fill:!0,align:"center",direction:c?"row-reverse":"row",justify:"space-around",children:[l?(0,e.createComponentVNode)(2,a.Flex.Item,{grow:!0,ml:c?.5:0,mr:c?0:.5,children:d}):(0,e.createComponentVNode)(2,a.Flex.Item,{children:d}),!l&&i&&(0,e.createComponentVNode)(2,a.Flex.Item,{children:(0,e.createComponentVNode)(2,a.Box,{color:"label",textAlign:"center",children:i})}),l?(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 f}()},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 f(b,y){var B=(0,a.useBackend)(y),k=B.act,g=B.data,l=b.siliconUser,c=l===void 0?g.siliconUser:l,m=b.locked,i=m===void 0?g.locked:m,u=b.normallyLocked,s=u===void 0?g.normallyLocked:u,d=b.onLockStatusChange,v=d===void 0?function(){return k("lock")}:d,h=b.accessText,C=h===void 0?"an ID card":h;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 p(){v&&v(!i)}return p}()})})]})}):(0,e.createComponentVNode)(2,t.NoticeBox,{children:["Swipe ",C," to ",i?"unlock":"lock"," this interface."]})}return f}()},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 f(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 f}()},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 f(b,y){var B=(0,a.useBackend)(y),k=B.act,g=B.data,l=g.loginState;if(g)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: ",l.name," (",l.rank,")"]}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Button,{icon:"eject",disabled:!l.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 f}()},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 f(b,y){var B=(0,a.useBackend)(y),k=B.act,g=B.data,l=g.loginState,c=g.isAI,m=g.isRobot,i=g.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:l.id?l.id:"----------",ml:"0.5rem",onClick:function(){function u(){return k("login_insert")}return u}()})]}),(0,e.createComponentVNode)(2,t.Button,{icon:"sign-in-alt",disabled:!l.id,content:"Login",onClick:function(){function u(){return k("login_login",{login_type:1})}return u}()}),!!c&&(0,e.createComponentVNode)(2,t.Button,{icon:"sign-in-alt",content:"Login as AI",onClick:function(){function u(){return k("login_login",{login_type:2})}return u}()}),!!m&&(0,e.createComponentVNode)(2,t.Button,{icon:"sign-in-alt",content:"Login as Cyborg",onClick:function(){function u(){return k("login_login",{login_type:3})}return u}()}),!!i&&(0,e.createComponentVNode)(2,t.Button,{icon:"sign-in-alt",content:"CentComm Secure Login",onClick:function(){function u(){return k("login_login",{login_type:4})}return u}()})]})})})}return f}()},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 f(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 f}();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),f=r.Signaler=function(){function b(y,B){var k=(0,t.useBackend)(B),g=k.act,l=y.data,c=l.code,m=l.frequency,i=l.minFrequency,u=l.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:i/10,maxValue:u/10,value:m/10,format:function(){function s(d){return(0,a.toFixed)(d,1)}return s}(),width:"80px",onDrag:function(){function s(d,v){return g("freq",{freq:v})}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(d,v){return g("code",{code:v})}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 g("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),f=n(88510),b=n(36036),y=r.SimpleRecords=function(){function g(l,c){var m=l.data.records;return(0,e.createComponentVNode)(2,b.Box,{children:m?(0,e.createComponentVNode)(2,k,{data:l.data,recordType:l.recordType}):(0,e.createComponentVNode)(2,B,{data:l.data})})}return g}(),B=function(l,c){var m=(0,a.useBackend)(c),i=m.act,u=l.data.recordsList,s=(0,a.useLocalState)(c,"searchText",""),d=s[0],v=s[1],h=function(N,V){V===void 0&&(V="");var S=(0,t.createSearch)(V,function(I){return I.Name});return(0,o.flow)([(0,f.filter)(function(I){return I==null?void 0:I.Name}),V&&(0,f.filter)(S),(0,f.sortBy)(function(I){return I.Name})])(u)},C=h(u,d);return(0,e.createComponentVNode)(2,b.Box,{children:[(0,e.createComponentVNode)(2,b.Input,{fluid:!0,mb:1,placeholder:"Search records...",onInput:function(){function p(N,V){return v(V)}return p}()}),C.map(function(p){return(0,e.createComponentVNode)(2,b.Box,{children:(0,e.createComponentVNode)(2,b.Button,{mb:.5,content:p.Name,icon:"user",onClick:function(){function N(){return i("Records",{target:p.uid})}return N}()})},p)})]})},k=function(l,c){var m=(0,a.useBackend)(c),i=m.act,u=l.data.records,s=u.general,d=u.medical,v=u.security,h;switch(l.recordType){case"MED":h=(0,e.createComponentVNode)(2,b.Section,{level:2,title:"Medical Data",children:d?(0,e.createComponentVNode)(2,b.LabeledList,{children:[(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Blood Type",children:d.blood_type}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Minor Disabilities",children:d.mi_dis}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Details",children:d.mi_dis_d}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Major Disabilities",children:d.ma_dis}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Details",children:d.ma_dis_d}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Allergies",children:d.alg}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Details",children:d.alg_d}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Current Diseases",children:d.cdi}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Details",children:d.cdi_d}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Important Notes",preserveWhitespace:!0,children:d.notes})]}):(0,e.createComponentVNode)(2,b.Box,{color:"red",bold:!0,children:"Medical record lost!"})});break;case"SEC":h=(0,e.createComponentVNode)(2,b.Section,{level:2,title:"Security Data",children:v?(0,e.createComponentVNode)(2,b.LabeledList,{children:[(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Criminal Status",children:v.criminal}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Minor Crimes",children:v.mi_crim}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Details",children:v.mi_crim_d}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Major Crimes",children:v.ma_crim}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Details",children:v.ma_crim_d}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Important Notes",preserveWhitespace:!0,children:v.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!"})}),h]})}},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 f(b,y){var B,k=(0,a.useBackend)(y),g=k.act,l=k.data,c=l.temp;if(c){var m=(B={},B[c.style]=!0,B);return(0,e.normalizeProps)((0,e.createComponentVNode)(2,t.NoticeBox,Object.assign({},m,{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 i(){return g("cleartemp")}return i}()})})]})})))}}return f}()},95213:function(T,r,n){"use strict";r.__esModule=!0,r.goonstation_PTL=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(49968),f=n(98595);/** + */function m(w,A){w.prototype=Object.create(A.prototype),w.prototype.constructor=w,i(w,A)}function i(w,A){return i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(x,E){return x.__proto__=E,x},i(w,A)}function u(w,A){if(w==null)return{};var x={};for(var E in w)if({}.hasOwnProperty.call(w,E)){if(A.includes(E))continue;x[E]=w[E]}return x}var s=r.ColorPickerModal=function(){function w(A,x){var E=(0,t.useBackend)(x),P=E.data,D=P.timeout,M=P.message,R=P.title,O=P.autofocus,F=P.default_color,_=F===void 0?"#000000":F,U=(0,t.useLocalState)(x,"color_picker_choice",(0,S.hexToHsva)(_)),z=U[0],$=U[1];return(0,e.createComponentVNode)(2,f.Window,{height:400,title:R,width:600,theme:"generic",children:[!!D&&(0,e.createComponentVNode)(2,a.Loader,{value:D}),(0,e.createComponentVNode)(2,f.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[M&&(0,e.createComponentVNode)(2,o.Stack.Item,{m:1,children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,children:(0,e.createComponentVNode)(2,o.Box,{color:"label",overflow:"hidden",children:M})})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,children:[!!O&&(0,e.createComponentVNode)(2,o.Autofocus),(0,e.createComponentVNode)(2,d,{color:z,setColor:$,defaultColor:_})]})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,l.InputButtons,{input:(0,S.hsvaToHex)(z)})})]})})]})}return w}(),d=r.ColorSelector=function(){function w(A,x){var E=A.color,P=A.setColor,D=A.defaultColor,M=function(){function F(_){P(function(U){return Object.assign({},U,_)})}return F}(),R=(0,S.hsvaToRgba)(E),O=(0,S.hsvaToHex)(E);return(0,e.createComponentVNode)(2,o.Flex,{direction:"row",children:[(0,e.createComponentVNode)(2,o.Flex.Item,{mr:2,children:(0,e.createComponentVNode)(2,o.Stack,{vertical:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createVNode)(1,"div","react-colorful",[(0,e.createComponentVNode)(2,N,{hsva:E,onChange:M}),(0,e.createComponentVNode)(2,V,{hue:E.h,onChange:M,className:"react-colorful__last-control"})],4)}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:[(0,e.createComponentVNode)(2,o.Box,{inline:!0,width:"100px",height:"20px",textAlign:"center",children:"Current"}),(0,e.createComponentVNode)(2,o.Box,{inline:!0,width:"100px",height:"20px",textAlign:"center",children:"Previous"}),(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,o.Tooltip,{content:O,position:"bottom",children:(0,e.createComponentVNode)(2,o.Box,{inline:!0,width:"100px",height:"30px",backgroundColor:O})}),(0,e.createComponentVNode)(2,o.Tooltip,{content:D,position:"bottom",children:(0,e.createComponentVNode)(2,o.Box,{inline:!0,width:"100px",height:"30px",backgroundColor:D})})]})]})}),(0,e.createComponentVNode)(2,o.Flex.Item,{grow:!0,fontSize:"15px",lineHeight:"24px",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,{children:(0,e.createComponentVNode)(2,o.Box,{textColor:"label",children:"Hex:"})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,height:"24px",children:(0,e.createComponentVNode)(2,h,{fluid:!0,color:(0,S.hsvaToHex)(E).substring(1),onChange:function(){function F(_){g.logger.info(_),P((0,S.hexToHsva)(_))}return F}(),prefixed:!0})})]})}),(0,e.createComponentVNode)(2,o.Stack.Divider),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Stack,{children:[(0,e.createComponentVNode)(2,o.Stack.Item,{width:"25px",children:(0,e.createComponentVNode)(2,o.Box,{textColor:"label",children:"H:"})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,V,{hue:E.h,onChange:M})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,v,{value:E.h,callback:function(){function F(_,U){return M({h:U})}return F}(),max:360,unit:"\xB0"})})]})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Stack,{children:[(0,e.createComponentVNode)(2,o.Stack.Item,{width:"25px",children:(0,e.createComponentVNode)(2,o.Box,{textColor:"label",children:"S:"})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,y,{color:E,onChange:M})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,v,{value:E.s,callback:function(){function F(_,U){return M({s:U})}return F}(),unit:"%"})})]})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Stack,{children:[(0,e.createComponentVNode)(2,o.Stack.Item,{width:"25px",children:(0,e.createComponentVNode)(2,o.Box,{textColor:"label",children:"V:"})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,I,{color:E,onChange:M})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,v,{value:E.v,callback:function(){function F(_,U){return M({v:U})}return F}(),unit:"%"})})]})}),(0,e.createComponentVNode)(2,o.Stack.Divider),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Stack,{children:[(0,e.createComponentVNode)(2,o.Stack.Item,{width:"25px",children:(0,e.createComponentVNode)(2,o.Box,{textColor:"label",children:"R:"})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,L,{color:E,onChange:M,target:"r"})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,v,{value:R.r,callback:function(){function F(_,U){R.r=U,M((0,S.rgbaToHsva)(R))}return F}(),max:255})})]})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Stack,{children:[(0,e.createComponentVNode)(2,o.Stack.Item,{width:"25px",children:(0,e.createComponentVNode)(2,o.Box,{textColor:"label",children:"G:"})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,L,{color:E,onChange:M,target:"g"})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,v,{value:R.g,callback:function(){function F(_,U){R.g=U,M((0,S.rgbaToHsva)(R))}return F}(),max:255})})]})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Stack,{children:[(0,e.createComponentVNode)(2,o.Stack.Item,{width:"25px",children:(0,e.createComponentVNode)(2,o.Box,{textColor:"label",children:"B:"})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,L,{color:E,onChange:M,target:"b"})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,v,{value:R.b,callback:function(){function F(_,U){R.b=U,M((0,S.rgbaToHsva)(R))}return F}(),max:255})})]})})]})})]})}return w}(),v=function(A){var x=A.value,E=A.callback,P=A.min,D=P===void 0?0:P,M=A.max,R=M===void 0?100:M,O=A.unit;return(0,e.createComponentVNode)(2,o.NumberInput,{width:"70px",value:Math.round(x),step:1,minValue:D,maxValue:R,onChange:E,unit:O})},C=function(A){return"#"+A},h=r.HexColorInput=function(){function w(A){var x=A.prefixed,E=A.alpha,P=A.color,D=A.fluid,M=A.onChange,R=u(A,c),O=function(){function _(U){return U.replace(/([^0-9A-F]+)/gi,"").substring(0,E?8:6)}return _}(),F=function(){function _(U){return(0,S.validHex)(U,E)}return _}();return(0,e.normalizeProps)((0,e.createComponentVNode)(2,p,Object.assign({},R,{fluid:D,color:P,onChange:M,escape:O,format:x?C:void 0,validate:F})))}return w}(),p=r.ColorInput=function(w){function A(E){var P;return P=w.call(this)||this,P.props=void 0,P.state=void 0,P.handleInput=function(D){var M=P.props.escape(D.currentTarget.value);P.setState({localValue:M})},P.handleBlur=function(D){D.currentTarget&&(P.props.validate(D.currentTarget.value)?P.props.onChange(P.props.escape?P.props.escape(D.currentTarget.value):D.currentTarget.value):P.setState({localValue:P.props.escape(P.props.color)}))},P.props=E,P.state={localValue:P.props.escape(P.props.color)},P}m(A,w);var x=A.prototype;return x.componentDidUpdate=function(){function E(P,D){P.color!==this.props.color&&this.setState({localValue:this.props.escape(this.props.color)})}return E}(),x.render=function(){function E(){return(0,e.createComponentVNode)(2,o.Box,{className:(0,k.classes)(["Input",this.props.fluid&&"Input--fluid"]),children:[(0,e.createVNode)(1,"div","Input__baseline",".",16),(0,e.createVNode)(64,"input","Input__input",null,1,{value:this.props.format?this.props.format(this.state.localValue):this.state.localValue,spellCheck:"false",onInput:this.handleInput,onBlur:this.handleBlur})]})}return E}(),A}(e.Component),N=function(A){var x=A.hsva,E=A.onChange,P=function(O){E({s:O.left*100,v:100-O.top*100})},D=function(O){E({s:(0,b.clamp)(x.s+O.left*100,0,100),v:(0,b.clamp)(x.v-O.top*100,0,100)})},M={"background-color":(0,S.hsvaToHslString)({h:x.h,s:100,v:100,a:1})+" !important"};return(0,e.createVNode)(1,"div","react-colorful__saturation_value",(0,e.createComponentVNode)(2,B.Interactive,{onMove:P,onKey:D,"aria-label":"Color","aria-valuetext":"Saturation "+Math.round(x.s)+"%, Brightness "+Math.round(x.v)+"%",children:(0,e.createComponentVNode)(2,o.Pointer,{className:"react-colorful__saturation_value-pointer",top:1-x.v/100,left:x.s/100,color:(0,S.hsvaToHslString)(x)})}),2,{style:M})},V=function(A){var x=A.className,E=A.hue,P=A.onChange,D=function(F){P({h:360*F.left})},M=function(F){P({h:(0,b.clamp)(E+F.left*360,0,360)})},R=(0,k.classes)(["react-colorful__hue",x]);return(0,e.createVNode)(1,"div",R,(0,e.createComponentVNode)(2,B.Interactive,{onMove:D,onKey:M,"aria-label":"Hue","aria-valuenow":Math.round(E),"aria-valuemax":"360","aria-valuemin":"0",children:(0,e.createComponentVNode)(2,o.Pointer,{className:"react-colorful__hue-pointer",left:E/360,color:(0,S.hsvaToHslString)({h:E,s:100,v:100,a:1})})}),2)},y=function(A){var x=A.className,E=A.color,P=A.onChange,D=function(F){P({s:100*F.left})},M=function(F){P({s:(0,b.clamp)(E.s+F.left*100,0,100)})},R=(0,k.classes)(["react-colorful__saturation",x]);return(0,e.createVNode)(1,"div",R,(0,e.createComponentVNode)(2,B.Interactive,{style:{background:"linear-gradient(to right, "+(0,S.hsvaToHslString)({h:E.h,s:0,v:E.v,a:1})+", "+(0,S.hsvaToHslString)({h:E.h,s:100,v:E.v,a:1})+")"},onMove:D,onKey:M,"aria-label":"Saturation","aria-valuenow":Math.round(E.s),"aria-valuemax":"100","aria-valuemin":"0",children:(0,e.createComponentVNode)(2,o.Pointer,{className:"react-colorful__saturation-pointer",left:E.s/100,color:(0,S.hsvaToHslString)({h:E.h,s:E.s,v:E.v,a:1})})}),2)},I=function(A){var x=A.className,E=A.color,P=A.onChange,D=function(F){P({v:100*F.left})},M=function(F){P({v:(0,b.clamp)(E.v+F.left*100,0,100)})},R=(0,k.classes)(["react-colorful__value",x]);return(0,e.createVNode)(1,"div",R,(0,e.createComponentVNode)(2,B.Interactive,{style:{background:"linear-gradient(to right, "+(0,S.hsvaToHslString)({h:E.h,s:E.s,v:0,a:1})+", "+(0,S.hsvaToHslString)({h:E.h,s:E.s,v:100,a:1})+")"},onMove:D,onKey:M,"aria-label":"Value","aria-valuenow":Math.round(E.s),"aria-valuemax":"100","aria-valuemin":"0",children:(0,e.createComponentVNode)(2,o.Pointer,{className:"react-colorful__value-pointer",left:E.v/100,color:(0,S.hsvaToHslString)({h:E.h,s:E.s,v:E.v,a:1})})}),2)},L=function(A){var x=A.className,E=A.color,P=A.onChange,D=A.target,M=(0,S.hsvaToRgba)(E),R=function($){M[D]=$,P((0,S.rgbaToHsva)(M))},O=function($){R(255*$.left)},F=function($){R((0,b.clamp)(M[D]+$.left*255,0,255))},_=(0,k.classes)(["react-colorful__"+D,x]),U=D==="r"?"rgb("+Math.round(M.r)+",0,0)":D==="g"?"rgb(0,"+Math.round(M.g)+",0)":"rgb(0,0,"+Math.round(M.b)+")";return(0,e.createVNode)(1,"div",_,(0,e.createComponentVNode)(2,B.Interactive,{onMove:O,onKey:F,"aria-valuenow":M[D],"aria-valuemax":"100","aria-valuemin":"0",children:(0,e.createComponentVNode)(2,o.Pointer,{className:"react-colorful__"+D+"-pointer",left:M[D]/255,color:U})}),2)}},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),f=r.ColourMatrixTester=function(){function b(S,B){var k=(0,a.useBackend)(B),g=k.act,l=k.data,c=l.colour_data,m=[[{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:m.map(function(i){return(0,e.createComponentVNode)(2,t.Stack,{textAlign:"center",textColor:"label",children:i.map(function(u){return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,mt:1,children:[u.name,":\xA0",(0,e.createComponentVNode)(2,t.NumberInput,{width:4,value:c[u.idx],step:.05,minValue:-5,maxValue:5,stepPixelSize:5,onChange:function(){function s(d,v){return g("setvalue",{idx:u.idx+1,value:v})}return s}()})]},u.name)})},i)})})})})})}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),f=function(s){switch(s){case 1:return(0,e.createComponentVNode)(2,B);case 2:return(0,e.createComponentVNode)(2,l);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,i);default:return"ERROR. Unknown menu_state. Please contact NT Technical Support."}},b=r.CommunicationsComputer=function(){function u(s,d){var v=(0,a.useBackend)(d),C=v.act,h=v.data,p=h.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,S),f(p)]})})})}return u}(),S=function(s,d){var v=(0,a.useBackend)(d),C=v.act,h=v.data,p=h.authenticated,N=h.noauthbutton,V=h.esc_section,y=h.esc_callable,I=h.esc_recallable,L=h.esc_status,w=h.authhead,A=h.is_ai,x=h.lastCallLoc,E=!1,P;return p?p===1?P="Command":p===2?P="Captain":p===3?P="CentComm Officer":p===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:p?"sign-out-alt":"id-card",selected:p,disabled:N,content:p?"Log Out ("+P+")":"Log In",onClick:function(){function D(){return C("auth")}return D}()})})})})}),(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}),!!y&&(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 D(){return C("callshuttle")}return D}()})}),!!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 D(){return C("cancelshuttle")}return D}()})}),!!x&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Last Call/Recall From",children:x})]})})})],4)},B=function(s,d){var v=(0,a.useBackend)(d),C=v.act,h=v.data,p=h.is_admin;return p?(0,e.createComponentVNode)(2,k):(0,e.createComponentVNode)(2,g)},k=function(s,d){var v=(0,a.useBackend)(d),C=v.act,h=v.data,p=h.is_admin,N=h.gamma_armory_location,V=h.admin_levels,y=h.authenticated,I=h.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,m,{levels:V,required_access:p,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:!p,onClick:function(){function L(){return C("send_to_cc_announcement_page")}return L}()}),y===4&&(0,e.createComponentVNode)(2,t.Button,{icon:"plus",content:"Make Other Announcement",disabled:!p,onClick:function(){function L(){return C("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:!p,onClick:function(){function L(){return C("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:!p,onClick:function(){function L(){return C("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:!p,onClick:function(){function L(){return C("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:N?"Send Gamma Armory":"Recall Gamma Armory",disabled:!p,onClick:function(){function L(){return C("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:!p,onClick:function(){function L(){return C("view_econ")}return L}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"fax",content:"Fax Manager",disabled:!p,onClick:function(){function L(){return C("view_fax")}return L}()})]})]})}),(0,e.createComponentVNode)(2,t.Collapsible,{title:"View Command accessible controls",children:(0,e.createComponentVNode)(2,g)})]})},g=function(s,d){var v=(0,a.useBackend)(d),C=v.act,h=v.data,p=h.msg_cooldown,N=h.emagged,V=h.cc_cooldown,y=h.security_level_color,I=h.str_security_level,L=h.levels,w=h.authcapt,A=h.authhead,x=h.messages,E="Make Priority Announcement";p>0&&(E+=" ("+p+"s)");var P=N?"Message [UNKNOWN]":"Message CentComm",D="Request Authentication Codes";return V>0&&(P+=" ("+V+"s)",D+=" ("+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:y,children:I}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Change Alert",children:(0,e.createComponentVNode)(2,m,{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||p>0,onClick:function(){function M(){return C("announce")}return M}()})}),!!N&&(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 C("MessageSyndicate")}return M}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"sync-alt",content:"Reset Relays",disabled:!w,onClick:function(){function M(){return C("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 C("MessageCentcomm")}return M}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Nuclear Device",children:(0,e.createComponentVNode)(2,t.Button,{icon:"bomb",content:D,disabled:!w||V>0,onClick:function(){function M(){return C("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 C("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 C("messagelist")}return M}()})})]})})})],4)},l=function(s,d){var v=(0,a.useBackend)(d),C=v.act,h=v.data,p=h.stat_display,N=h.authhead,V=h.current_message_title,y=p.presets.map(function(L){return(0,e.createComponentVNode)(2,t.Button,{content:L.label,selected:L.name===p.type,disabled:!N,onClick:function(){function w(){return C("setstat",{statdisp:L.name})}return w}()},L.name)}),I=p.alerts.map(function(L){return(0,e.createComponentVNode)(2,t.Button,{content:L.label,selected:L.alert===p.icon,disabled:!N,onClick:function(){function w(){return C("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 C("main")}return L}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Presets",children:y}),(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:p.line_1,disabled:!N,onClick:function(){function L(){return C("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:p.line_2,disabled:!N,onClick:function(){function L(){return C("setmsg2")}return L}()})})]})})})},c=function(s,d){var v=(0,a.useBackend)(d),C=v.act,h=v.data,p=h.authhead,N=h.current_message_title,V=h.current_message,y=h.messages,I=h.security_level,L;if(N)L=(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:N,buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"times",content:"Return To Message List",disabled:!p,onClick:function(){function A(){return C("messagelist")}return A}()}),children:(0,e.createComponentVNode)(2,t.Box,{children:V})})});else{var w=y.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:!p||N===A.title,onClick:function(){function x(){return C("messagelist",{msgid:A.id})}return x}()}),(0,e.createComponentVNode)(2,t.Button.Confirm,{icon:"times",content:"Delete",disabled:!p,onClick:function(){function x(){return C("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 C("main")}return A}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:w})})}return(0,e.createComponentVNode)(2,t.Box,{children:L})},m=function(s,d){var v=(0,a.useBackend)(d),C=v.act,h=v.data,p=s.levels,N=s.required_access,V=s.use_confirm,y=h.security_level;return V?p.map(function(I){return(0,e.createComponentVNode)(2,t.Button.Confirm,{icon:I.icon,content:I.name,disabled:!N||I.id===y,tooltip:I.tooltip,onClick:function(){function L(){return C("newalertlevel",{level:I.id})}return L}()},I.name)}):p.map(function(I){return(0,e.createComponentVNode)(2,t.Button,{icon:I.icon,content:I.name,disabled:!N||I.id===y,tooltip:I.tooltip,onClick:function(){function L(){return C("newalertlevel",{level:I.id})}return L}()},I.name)})},i=function(s,d){var v=(0,a.useBackend)(d),C=v.act,h=v.data,p=h.is_admin,N=h.possible_cc_sounds;if(!p)return C("main");var V=(0,a.useLocalState)(d,"subtitle",""),y=V[0],I=V[1],L=(0,a.useLocalState)(d,"text",""),w=L[0],A=L[1],x=(0,a.useLocalState)(d,"classified",0),E=x[0],P=x[1],D=(0,a.useLocalState)(d,"beepsound","Beep"),M=D[0],R=D[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 O(){return C("main")}return O}()}),children:[(0,e.createComponentVNode)(2,t.Input,{placeholder:"Enter Subtitle here.",fluid:!0,value:y,onChange:function(){function O(F,_){return I(_)}return O}(),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 O(F,_){return A(_)}return O}()}),(0,e.createComponentVNode)(2,t.Button.Confirm,{content:"Send Announcement",fluid:!0,icon:"paper-plane",center:!0,mt:"5px",textAlign:"center",onClick:function(){function O(){return C("make_cc_announcement",{subtitle:y,text:w,classified:E,beepsound:M})}return O}()}),(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:N,selected:M,onSelected:function(){function O(F){return R(F)}return O}(),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 O(){return C("test_sound",{sound:M})}return O}()})}),(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 O(){return P(!E)}return O}()})})]})]})})}},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),f=r.CompostBin=function(){function b(S,B){var k=(0,a.useBackend)(B),g=k.act,l=k.data,c=l.biomass,m=l.compost,i=l.biomass_capacity,u=l.compost_capacity,s=l.potassium,d=l.potassium_capacity,v=l.potash,C=l.potash_capacity,h=(0,a.useSharedState)(B,"vendAmount",1),p=h[0],N=h[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:i,ranges:{good:[i*.5,1/0],average:[i*.25,i*.5],bad:[-1/0,i*.25]},children:[c," / ",i," Units"]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Compost",children:(0,e.createComponentVNode)(2,t.ProgressBar,{ml:.5,mt:1,width:20,value:m,minValue:0,maxValue:u,ranges:{good:[u*.5,1/0],average:[u*.25,u*.5],bad:[-1/0,u*.25]},children:[m," / ",u," 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:d,ranges:{good:[d*.5,1/0],average:[d*.25,d*.5],bad:[-1/0,d*.25]},children:[s," / ",d," Units"]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Potash",children:(0,e.createComponentVNode)(2,t.ProgressBar,{ml:.5,mt:1,width:20,value:v,minValue:0,maxValue:C,ranges:{good:[C*.5,1/0],average:[C*.25,C*.5],bad:[-1/0,C*.25]},children:[v," / ",C," 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:p,width:"32px",minValue:1,maxValue:10,stepPixelSize:7,onChange:function(){function V(y,I){return N(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:m<25*p,icon:"arrow-circle-down",onClick:function(){function V(){return g("create",{amount:p})}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),f=n(73379),b=n(98595);function S(C,h){C.prototype=Object.create(h.prototype),C.prototype.constructor=C,B(C,h)}function B(C,h){return B=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,N){return p.__proto__=N,p},B(C,h)}var k={1:["ACTIVE","good"],2:["COMPLETED","good"],3:["FAILED","bad"]},g=["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"],l=r.Contractor=function(){function C(h,p){var N=(0,t.useBackend)(p),V=N.act,y=N.data,I;y.unauthorized?I=(0,e.createComponentVNode)(2,o.Flex.Item,{grow:"1",backgroundColor:"rgba(0, 0, 0, 0.8)",children:(0,e.createComponentVNode)(2,d,{height:"100%",allMessages:["ERROR: UNAUTHORIZED USER"],finishedTimeout:100,onFinished:function(){function x(){}return x}()})}):y.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,m)}),(0,e.createComponentVNode)(2,o.Flex.Item,{grow:"1",overflow:"hidden",children:y.page===1?(0,e.createComponentVNode)(2,i,{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,d,{height:"100%",allMessages:g,finishedTimeout:3e3,onFinished:function(){function x(){return V("complete_load_animation")}return x}()})});var L=(0,t.useLocalState)(p,"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,v),(0,e.createComponentVNode)(2,b.Window.Content,{className:"Contractor",children:(0,e.createComponentVNode)(2,o.Flex,{direction:"column",height:"100%",children:I})})]})}return C}(),c=function(h,p){var N=(0,t.useBackend)(p),V=N.act,y=N.data,I=y.tc_available,L=y.tc_paid_out,w=y.completed_contracts,A=y.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"]})},h,{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"})]})})]})})))},m=function(h,p){var N=(0,t.useBackend)(p),V=N.act,y=N.data,I=y.page;return(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Tabs,Object.assign({},h,{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"]})]})))},i=function(h,p){var N=(0,t.useBackend)(p),V=N.act,y=N.data,I=y.contracts,L=y.contract_active,w=y.can_extract,A=!!L&&I.filter(function(M){return M.status===1})[0],x=A&&A.time_left>0,E=(0,t.useLocalState)(p,"viewingPhoto",""),P=E[0],D=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,f.Countdown,{timeLeft:A.time_left,format:function(){function M(R,O){return" ("+O.substr(3)+")"}return M}()})],onClick:function(){function M(){return V("extract")}return M}()})},h,{children:I.slice().sort(function(M,R){return M.status===1?-1:R.status===1?1:M.status-R.status}).map(function(M){var R;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 O(){return D("target_photo_"+M.uid+".png")}return O}()})})]}),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 O(){return V("abort")}return O}()})]}),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",u(M)]}),(R=M.difficulties)==null?void 0:R.map(function(O,F){return(0,e.createComponentVNode)(2,o.Button.Confirm,{disabled:!!L,content:O.name+" ("+O.reward+" TC)",onClick:function(){function _(){return V("activate",{uid:M.uid,difficulty:F+1})}return _}()},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)})})))},u=function(h){if(!(!h.objective||h.status>1)){var p=h.objective.locs.user_area_id,N=h.objective.locs.user_coords,V=h.objective.locs.target_area_id,y=h.objective.locs.target_coords,I=p===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(y[1]-N[1],y[0]-N[0])),lineHeight:I?null:"0.85",size:"1.5"})})}},s=function(h,p){var N=(0,t.useBackend)(p),V=N.act,y=N.data,I=y.rep,L=y.buyables;return(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Section,Object.assign({title:"Available Purchases",overflow:"auto"},h,{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)})})))},d=function(C){function h(N){var V;return V=C.call(this,N)||this,V.timer=null,V.state={currentIndex:0,currentDisplay:[]},V}S(h,C);var p=h.prototype;return p.tick=function(){function N(){var V=this.props,y=this.state;if(y.currentIndex<=V.allMessages.length){this.setState(function(L){return{currentIndex:L.currentIndex+1}});var I=y.currentDisplay;I.push(V.allMessages[y.currentIndex])}else clearTimeout(this.timer),setTimeout(V.onFinished,V.finishedTimeout)}return N}(),p.componentDidMount=function(){function N(){var V=this,y=this.props.linesPerSecond,I=y===void 0?2.5:y;this.timer=setInterval(function(){return V.tick()},1e3/I)}return N}(),p.componentWillUnmount=function(){function N(){clearTimeout(this.timer)}return N}(),p.render=function(){function N(){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 N}(),h}(e.Component),v=function(h,p){var N=(0,t.useLocalState)(p,"viewingPhoto",""),V=N[0],y=N[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 y("")}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),f=r.ConveyorSwitch=function(){function b(S,B){var k=(0,a.useBackend)(B),g=k.act,l=k.data,c=l.slowFactor,m=l.oneWay,i=l.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:i>0?"forward":i<0?"reverse":"neutral"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Allow reverse",children:(0,e.createComponentVNode)(2,t.Button.Checkbox,{checked:!m,onClick:function(){function u(){return g("toggleOneWay")}return u}()})}),(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 u(){return g("slowFactor",{value:c-5})}return u}()})," "]}),(0,e.createComponentVNode)(2,t.Flex.Item,{mx:"1px",children:[" ",(0,e.createComponentVNode)(2,t.Button,{icon:"angle-left",onClick:function(){function u(){return g("slowFactor",{value:c-1})}return u}()})," "]}),(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 u(s){return s+"x"}return u}(),onChange:function(){function u(s,d){return g("slowFactor",{value:d})}return u}()})}),(0,e.createComponentVNode)(2,t.Flex.Item,{mx:"1px",children:[" ",(0,e.createComponentVNode)(2,t.Button,{icon:"angle-right",onClick:function(){function u(){return g("slowFactor",{value:c+1})}return u}()})," "]}),(0,e.createComponentVNode)(2,t.Flex.Item,{mx:"1px",children:[" ",(0,e.createComponentVNode)(2,t.Button,{icon:"angle-double-right",onClick:function(){function u(){return g("slowFactor",{value:c+5})}return u}()})," "]})]})})]})})})})}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),f=n(36036),b=n(36352),S=n(76910),B=n(98595),k=n(96184),g=["color"];function l(v,C){if(v==null)return{};var h={};for(var p in v)if({}.hasOwnProperty.call(v,p)){if(C.includes(p))continue;h[p]=v[p]}return h}var c=function(C,h){return C.dead?"Deceased":parseInt(C.health,10)<=h?"Critical":parseInt(C.stat,10)===1?"Unconscious":"Living"},m=function(C,h){return C.dead?"red":parseInt(C.health,10)<=h?"orange":parseInt(C.stat,10)===1?"blue":"green"},i=r.CrewMonitor=function(){function v(C,h){var p=(0,o.useBackend)(h),N=p.act,V=p.data,y=(0,o.useLocalState)(h,"tabIndex",V.tabIndex),I=y[0],L=y[1],w=function(){function x(E){L(E),N("set_tab_index",{tab_index:E})}return x}(),A=function(){function x(E){switch(E){case 0:return(0,e.createComponentVNode)(2,u);case 1:return(0,e.createComponentVNode)(2,d);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,f.Stack,{fill:!0,vertical:!0,fillPositionedParent:!0,children:[(0,e.createComponentVNode)(2,f.Stack.Item,{children:(0,e.createComponentVNode)(2,f.Tabs,{children:[(0,e.createComponentVNode)(2,f.Tabs.Tab,{icon:"table",selected:I===0,onClick:function(){function x(){return w(0)}return x}(),children:"Data View"},"DataView"),(0,e.createComponentVNode)(2,f.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 v}(),u=function(C,h){var p=(0,o.useBackend)(h),N=p.act,V=p.data,y=V.possible_levels,I=V.viewing_current_z_level,L=V.is_advanced,w=V.highlightedNames,A=(0,a.sortBy)(function(M){return!w.includes(M.name)},function(M){return M.name})(V.crewmembers||[]),x=(0,o.useLocalState)(h,"search",""),E=x[0],P=x[1],D=(0,t.createSearch)(E,function(M){return M.name+"|"+M.assignment+"|"+M.area});return(0,e.createComponentVNode)(2,f.Section,{fill:!0,scrollable:!0,backgroundColor:"transparent",children:[(0,e.createComponentVNode)(2,f.Stack,{children:[(0,e.createComponentVNode)(2,f.Stack.Item,{width:"100%",ml:"5px",children:(0,e.createComponentVNode)(2,f.Input,{placeholder:"Search by name, assignment or location..",width:"100%",onInput:function(){function M(R,O){return P(O)}return M}()})}),(0,e.createComponentVNode)(2,f.Stack.Item,{children:L?(0,e.createComponentVNode)(2,f.Dropdown,{mr:"5px",width:"50px",options:y,selected:I,onSelected:function(){function M(R){return N("switch_level",{new_level:R})}return M}()}):null})]}),(0,e.createComponentVNode)(2,f.Table,{m:"0.5rem",children:[(0,e.createComponentVNode)(2,f.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,f.Table.Cell,{children:(0,e.createComponentVNode)(2,f.Button,{tooltip:"Clear highlights",icon:"square-xmark",onClick:function(){function M(){return N("clear_highlighted_names")}return M}()})}),(0,e.createComponentVNode)(2,f.Table.Cell,{children:"Name"}),(0,e.createComponentVNode)(2,f.Table.Cell,{children:"Status"}),(0,e.createComponentVNode)(2,f.Table.Cell,{children:"Location"})]}),A.filter(D).map(function(M,R){var O=w.includes(M.name);return(0,e.createComponentVNode)(2,f.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 F(){return N(O?"remove_highlighted_name":"add_highlighted_name",{name:M.name})}return F}()})}),(0,e.createComponentVNode)(2,b.TableCell,{children:[M.name," (",M.assignment,")"]}),(0,e.createComponentVNode)(2,b.TableCell,{children:[(0,e.createComponentVNode)(2,f.Box,{inline:!0,color:m(M,V.critThreshold),children:c(M,V.critThreshold)}),M.sensor_type>=2||V.ignoreSensors?(0,e.createComponentVNode)(2,f.Box,{inline:!0,ml:1,children:["(",(0,e.createComponentVNode)(2,f.Box,{inline:!0,color:S.COLORS.damageType.oxy,children:M.oxy}),"|",(0,e.createComponentVNode)(2,f.Box,{inline:!0,color:S.COLORS.damageType.toxin,children:M.tox}),"|",(0,e.createComponentVNode)(2,f.Box,{inline:!0,color:S.COLORS.damageType.burn,children:M.fire}),"|",(0,e.createComponentVNode)(2,f.Box,{inline:!0,color:S.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,f.Button,{fluid:!0,icon:"location-arrow",content:M.area+" ("+M.x+", "+M.y+")",onClick:function(){function F(){return N("track",{track:M.ref})}return F}()}):M.area+" ("+M.x+", "+M.y+")":(0,e.createComponentVNode)(2,f.Box,{inline:!0,color:"grey",children:"Not Available"})})]},R)})]})]})},s=function(C,h){var p=C.color,N=l(C,g);return(0,e.normalizeProps)((0,e.createComponentVNode)(2,f.NanoMap.Marker,Object.assign({},N,{children:(0,e.createVNode)(1,"span","highlighted-marker color-border-"+p)})))},d=function(C,h){var p=(0,o.useBackend)(h),N=p.act,V=p.data,y=V.highlightedNames;return(0,e.createComponentVNode)(2,f.Box,{height:"100vh",mb:"0.5rem",overflow:"hidden",children:(0,e.createComponentVNode)(2,f.NanoMap,{zoom:V.zoom,offsetX:V.offsetX,offsetY:V.offsetY,onZoom:function(){function I(L){return N("set_zoom",{zoom:L})}return I}(),onOffsetChange:function(){function I(L,w){return N("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=m(I,V.critThreshold),w=y.includes(I.name),A=function(){return V.isObserver?N("track",{track:I.ref}):null},x=function(){return N(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,f.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),f=[{label:"Resp.",type:"oxyLoss"},{label:"Toxin",type:"toxLoss"},{label:"Brute",type:"bruteLoss"},{label:"Burn",type:"fireLoss"}],b=[["good","Conscious"],["average","Unconscious"],["bad","DEAD"]],S=r.Cryo=function(){function g(l,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 g}(),B=function(l,c){var m=(0,a.useBackend)(c),i=m.act,u=m.data,s=u.isOperating,d=u.hasOccupant,v=u.occupant,C=v===void 0?[]:v,h=u.cellTemperature,p=u.cellTemperatureStatus,N=u.isBeakerLoaded,V=u.cooldownProgress,y=u.auto_eject_healthy,I=u.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 i("ejectOccupant")}return L}(),disabled:!d,children:"Eject"}),children:d?(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Occupant",children:C.name||"Unknown"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Health",children:(0,e.createComponentVNode)(2,t.ProgressBar,{min:C.health,max:C.maxHealth,value:C.health/C.maxHealth,color:C.health>0?"good":"average",children:(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:Math.round(C.health)})})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",color:b[C.stat][0],children:b[C.stat][1]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Temperature",children:[(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:Math.round(C.bodyTemperature)})," K"]}),(0,e.createComponentVNode)(2,t.LabeledList.Divider),f.map(function(L){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:L.label,children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:C[L.type]/100,ranges:{bad:[.01,1/0]},children:(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:Math.round(C[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 i("ejectBeaker")}return L}(),disabled:!N,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 i(s?"switchOff":"switchOn")}return L}(),selected:s,children:s?"On":"Off"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Temperature",color:p,children:[(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:h})," 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:!N&&"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:y?"toggle-on":"toggle-off",selected:y,onClick:function(){function L(){return i(y?"auto_eject_healthy_off":"auto_eject_healthy_on")}return L}(),children:y?"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 i(I?"auto_eject_dead_off":"auto_eject_dead_on")}return L}(),children:I?"On":"Off"})})]})})})],4)},k=function(l,c){var m=(0,a.useBackend)(c),i=m.act,u=m.data,s=u.isBeakerLoaded,d=u.beakerLabel,v=u.beakerVolume;return s?(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Box,{inline:!0,color:!d&&"average",children:[d||"No label",":"]}),(0,e.createComponentVNode)(2,t.Box,{inline:!0,color:!v&&"bad",ml:1,children:v?(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:v,format:function(){function C(h){return Math.round(h)+" units remaining"}return C}()}):"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),f=n(25328),b=r.CryopodConsole=function(){function k(g,l){var c=(0,a.useBackend)(l),m=c.data,i=m.account_name,u=m.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, "+(i||"[REDACTED]")+"!",children:"This automated cryogenic freezing unit will safely store your corporeal form until your next assignment."}),(0,e.createComponentVNode)(2,S),!!u&&(0,e.createComponentVNode)(2,B)]})})}return k}(),S=function(g,l){var c=(0,a.useBackend)(l),m=c.data,i=m.frozen_crew;return(0,e.createComponentVNode)(2,t.Collapsible,{title:"Stored Crew",children:i.length?(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:i.map(function(u,s){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:u.name,children:u.rank},s)})})}):(0,e.createComponentVNode)(2,t.NoticeBox,{children:"No stored crew!"})})},B=function(g,l){var c=(0,a.useBackend)(l),m=c.act,i=c.data,u=i.frozen_items,s=function(v){var C=v.toString();return C.startsWith("the ")&&(C=C.slice(4,C.length)),(0,f.toTitleCase)(C)};return(0,e.createComponentVNode)(2,t.Collapsible,{title:"Stored Items",children:u.length?(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:u.map(function(d){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:s(d.name),buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-down",content:"Drop",mr:1,onClick:function(){function v(){return m("one_item",{item:d.uid})}return v}()})},d)})})}),(0,e.createComponentVNode)(2,t.Button,{content:"Drop All Items",color:"red",onClick:function(){function d(){return m("all_items")}return d}()})],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),f=n(3939),b=[["good","Alive"],["average","Critical"],["bad","DEAD"]],S=[["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 p(N,V){var y=(0,a.useBackend)(V),I=y.act,L=y.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,C,{duration:w})),(0,e.createComponentVNode)(2,o.Window,{width:660,height:775,children:[(0,e.createComponentVNode)(2,f.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,g)}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,l)})]})})]})}return p}(),g=function(N,V){var y=(0,a.useBackend)(V),I=y.act,L=y.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."})})},l=function(N,V){var y=(0,a.useBackend)(V),I=y.act,L=y.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,i)],4):w==="se"?E=(0,e.createFragment)([(0,e.createComponentVNode)(2,m),(0,e.createComponentVNode)(2,i)],4):w==="buffer"?E=(0,e.createComponentVNode)(2,u):w==="rejuvenators"&&(E=(0,e.createComponentVNode)(2,v)),(0,e.createComponentVNode)(2,t.Section,{fill:!0,children:[(0,e.createComponentVNode)(2,t.Tabs,{children:S.map(function(P,D){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]},D)})}),E]})},c=function(N,V){var y=(0,a.useBackend)(V),I=y.act,L=y.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,h,{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(D){return D.toString(16).toUpperCase()}return P}(),ml:"0",onChange:function(){function P(D,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}()})]})},m=function(N,V){var y=(0,a.useBackend)(V),I=y.act,L=y.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,h,{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}()})]})},i=function(N,V){var y=(0,a.useBackend)(V),I=y.act,L=y.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}()})]})},u=function(N,V){var y=(0,a.useBackend)(V),I=y.act,L=y.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,d)})]})},s=function(N,V){var y=(0,a.useBackend)(V),I=y.act,L=y.data,w=N.id,A=N.name,x=N.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 D(){return I("bufferOption",{option:"clear",id:w})}return D}()}),(0,e.createComponentVNode)(2,t.Button,{disabled:!x.data,icon:"pen",content:"Rename",onClick:function(){function D(){return I("bufferOption",{option:"changeLabel",id:w})}return D}()}),(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 D(){return I("bufferOption",{option:"saveDisk",id:w})}return D}()})],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 D(){return I("bufferOption",{option:"saveUI",id:w})}return D}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-circle-down",content:"Subject U.I and U.E.",mb:"0",onClick:function(){function D(){return I("bufferOption",{option:"saveUIAndUE",id:w})}return D}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-circle-down",content:"Subject S.E.",mb:"0",onClick:function(){function D(){return I("bufferOption",{option:"saveSE",id:w})}return D}()}),(0,e.createComponentVNode)(2,t.Button,{disabled:!L.hasDisk||!L.disk.data,icon:"arrow-circle-down",content:"From Disk",mb:"0",onClick:function(){function D(){return I("bufferOption",{option:"loadDisk",id:w})}return D}()})]}),!!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 D(){return I("bufferOption",{option:"createInjector",id:w})}return D}()}),(0,e.createComponentVNode)(2,t.Button,{disabled:!E,icon:E?"syringe":"spinner",iconSpin:!E,content:"Block Injector",mb:"0",onClick:function(){function D(){return I("bufferOption",{option:"createInjector",id:w,block:1})}return D}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"user",content:"Subject",mb:"0",onClick:function(){function D(){return I("bufferOption",{option:"transfer",id:w})}return D}()})]})],4)]}),!x.data&&(0,e.createComponentVNode)(2,t.Box,{color:"label",mt:"0.5rem",children:"This buffer is empty."})]})})},d=function(N,V){var y=(0,a.useBackend)(V),I=y.act,L=y.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."]})})},v=function(N,V){var y=(0,a.useBackend)(V),I=y.act,L=y.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 D(){return I("injectRejuvenators",{amount:E})}return D}()},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)]})})})},C=function(N,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 "),N.duration,(0,e.createTextVNode)(" second"),N.duration===1?"":"s"],0)})]})},h=function(N,V){for(var y=(0,a.useBackend)(V),I=y.act,L=y.data,w=N.dnaString,A=N.selectedBlock,x=N.selectedSubblock,E=N.blockSize,P=N.action,D=w.split(""),M=0,R=[],O=function(){for(var U=F/E+1,z=[],$=function(){var J=G+1;z.push((0,e.createComponentVNode)(2,t.Button,{selected:A===U&&x===J,content:D[F+G],mb:"0",onClick:function(){function se(){return I(P,{block:U,subblock:J})}return se}()}))},G=0;Gd.spawnpoints?"red":"green",children:[d.total," total, versus ",d.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 N(){return s("dispatch_ert",{silent:h})}return N}()})})]})})})},g=function(m,i){var u=(0,a.useBackend)(i),s=u.act,d=u.data,v=d.ert_request_messages;return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,children:v&&v.length?v.map(function(C){return(0,e.createComponentVNode)(2,t.Section,{title:C.time,buttons:(0,e.createComponentVNode)(2,t.Button,{content:C.sender_real_name,onClick:function(){function h(){return s("view_player_panel",{uid:C.sender_uid})}return h}(),tooltip:"View player panel"}),children:C.message},(0,f.decodeHtmlEntities)(C.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."]})})})})},l=function(m,i){var u=(0,a.useBackend)(i),s=u.act,d=u.data,v=(0,a.useLocalState)(i,"text",""),C=v[0],h=v[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:C,onChange:function(){function p(N,V){return h(V)}return p}()}),(0,e.createComponentVNode)(2,t.Button.Confirm,{content:"Deny ERT",fluid:!0,icon:"times",center:!0,mt:2,textAlign:"center",onClick:function(){function p(){return s("deny_ert",{reason:C})}return p}()})]})})}},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),f=n(3939),b=r.EconomyManager=function(){function B(k,g){return(0,e.createComponentVNode)(2,o.Window,{width:600,height:325,children:[(0,e.createComponentVNode)(2,f.ComplexModal),(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,className:"Layout__content--flexColumn",children:(0,e.createComponentVNode)(2,S)})]})}return B}(),S=function(k,g){var l=(0,a.useBackend)(g),c=l.act,m=l.data,i=m.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 u(){return c("payroll_modification",{mod_type:"global"})}return u}()})}),(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 u(){return c("payroll_modification",{mod_type:"department"})}return u}()})}),(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 u(){return c("payroll_modification",{mod_type:"department_members"})}return u}()})}),(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 u(){return c("payroll_modification",{mod_type:"crew_member"})}return u}()})})]}),(0,e.createVNode)(1,"hr"),(0,e.createComponentVNode)(2,t.Box,{mb:.5,children:["Next Payroll in: ",i," Minutes"]}),(0,e.createComponentVNode)(2,t.Button,{icon:"angle-double-left",width:"auto",color:"bad",content:"Delay Payroll",onClick:function(){function u(){return c("delay_payroll")}return u}()}),(0,e.createComponentVNode)(2,t.Button,{width:"auto",content:"Set Payroll Time",onClick:function(){function u(){return c("set_payroll")}return u}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"angle-double-right",width:"auto",color:"good",content:"Accelerate Payroll",onClick:function(){function u(){return c("accelerate_payroll")}return u}()})]}),(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),f=n(98595),b=r.Electropack=function(){function S(B,k){var g=(0,t.useBackend)(k),l=g.act,c=g.data,m=c.power,i=c.code,u=c.frequency,s=c.minFrequency,d=c.maxFrequency;return(0,e.createComponentVNode)(2,f.Window,{width:360,height:135,children:(0,e.createComponentVNode)(2,f.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:m?"power-off":"times",content:m?"On":"Off",selected:m,onClick:function(){function v(){return l("power")}return v}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Frequency",buttons:(0,e.createComponentVNode)(2,o.Button,{icon:"sync",content:"Reset",onClick:function(){function v(){return l("reset",{reset:"freq"})}return v}()}),children:(0,e.createComponentVNode)(2,o.NumberInput,{animate:!0,unit:"kHz",step:.2,stepPixelSize:6,minValue:s/10,maxValue:d/10,value:u/10,format:function(){function v(C){return(0,a.toFixed)(C,1)}return v}(),width:"80px",onChange:function(){function v(C,h){return l("freq",{freq:h})}return v}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Code",buttons:(0,e.createComponentVNode)(2,o.Button,{icon:"sync",content:"Reset",onClick:function(){function v(){return l("reset",{reset:"code"})}return v}()}),children:(0,e.createComponentVNode)(2,o.NumberInput,{animate:!0,step:1,stepPixelSize:6,minValue:1,maxValue:100,value:i,width:"80px",onChange:function(){function v(C,h){return l("code",{code:h})}return v}()})})]})})})})}return S}()},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),f=n(98595),b=r.Emojipedia=function(){function B(k,g){var l=(0,t.useBackend)(g),c=l.data,m=c.emoji_list,i=(0,t.useLocalState)(g,"searchText",""),u=i[0],s=i[1],d=m.filter(function(v){return v.name.toLowerCase().includes(u.toLowerCase())});return(0,e.createComponentVNode)(2,f.Window,{width:325,height:400,children:(0,e.createComponentVNode)(2,f.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:u,onInput:function(){function v(C,h){return s(h)}return v}()}),(0,e.createComponentVNode)(2,o.Button,{tooltip:"Click on an emoji to copy its tag!",tooltipPosition:"bottom",icon:"circle-question"})],4),children:d.map(function(v){return(0,e.createComponentVNode)(2,o.Button,{m:1,color:"transparent",className:(0,a.classes)(["emoji16x16","emoji-"+v.name]),style:{transform:"scale(1.5)"},tooltip:v.name,onClick:function(){function C(){S(v.name)}return C}()},v.name)})})})})}return B}(),S=function(k){var g=document.createElement("input"),l=":"+k+":";g.value=l,document.body.appendChild(g),g.select(),document.execCommand("copy"),document.body.removeChild(g)}},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),f=n(98595),b=n(64795),S=n(88510),B=r.EvolutionMenu=function(){function l(c,m){return(0,e.createComponentVNode)(2,f.Window,{width:480,height:580,theme:"changeling",children:(0,e.createComponentVNode)(2,f.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,k),(0,e.createComponentVNode)(2,g)]})})})}return l}(),k=function(c,m){var i=(0,t.useBackend)(m),u=i.act,s=i.data,d=s.evo_points,v=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:d}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:[(0,e.createComponentVNode)(2,o.Button,{ml:2.5,disabled:!v,content:"Readapt",icon:"sync",onClick:function(){function C(){return u("readapt")}return C}()}),(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"})]})]})})})},g=function(c,m){var i=(0,t.useBackend)(m),u=i.act,s=i.data,d=s.evo_points,v=s.ability_tabs,C=s.purchased_abilities,h=s.view_mode,p=(0,t.useLocalState)(m,"selectedTab",v[0]),N=p[0],V=p[1],y=(0,t.useLocalState)(m,"searchText",""),I=y[0],L=y[1],w=(0,t.useLocalState)(m,"ability_tabs",v[0].abilities),A=w[0],x=w[1],E=function(R,O){if(O===void 0&&(O=""),!R||R.length===0)return[];var F=(0,a.createSearch)(O,function(_){return _.name+"|"+_.description});return(0,b.flow)([(0,S.filter)(function(_){return _==null?void 0:_.name}),(0,S.filter)(F),(0,S.sortBy)(function(_){return _==null?void 0:_.name})])(R)},P=function(R){if(L(R),R==="")return x(N.abilities);x(E(v.map(function(O){return O.abilities}).flat(),R))},D=function(R){V(R),x(R.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(R,O){P(O)}return M}(),value:I}),(0,e.createComponentVNode)(2,o.Button,{icon:h?"square-o":"check-square-o",selected:!h,content:"Compact",onClick:function(){function M(){return u("set_view_mode",{mode:0})}return M}()}),(0,e.createComponentVNode)(2,o.Button,{icon:h?"check-square-o":"square-o",selected:h,content:"Expanded",onClick:function(){function M(){return u("set_view_mode",{mode:1})}return M}()})],4),children:[(0,e.createComponentVNode)(2,o.Tabs,{children:v.map(function(M){return(0,e.createComponentVNode)(2,o.Tabs.Tab,{selected:I===""&&N===M,onClick:function(){function R(){D(M)}return R}(),children:M.category},M)})}),A.map(function(M,R){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}),C.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>d||C.includes(M.power_path),content:"Evolve",onClick:function(){function O(){return u("purchase",{power_path:M.power_path})}return O}()})})]}),!!h&&(0,e.createComponentVNode)(2,o.Stack,{color:"#8a8a8a",my:1,ml:1.5,width:"95%",children:M.description+" "+M.helptext})]},R)})]})})}},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),f=n(36036),b=n(73379),S=n(98595),B=["id","amount","lineDisplay","onClick"];function k(p,N){if(p==null)return{};var V={};for(var y in p)if({}.hasOwnProperty.call(p,y)){if(N.includes(y))continue;V[y]=p[y]}return V}var g=2e3,l={bananium:"clown",tranquillite:"mime"},c=r.ExosuitFabricator=function(){function p(N,V){var y=(0,o.useBackend)(V),I=y.act,L=y.data,w=L.building,A=L.linked;return A?(0,e.createComponentVNode)(2,S.Window,{width:950,height:625,children:(0,e.createComponentVNode)(2,S.Window.Content,{className:"Exofab",children:[(0,e.createComponentVNode)(2,h),(0,e.createComponentVNode)(2,f.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,f.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,f.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,f.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,i)}),w&&(0,e.createComponentVNode)(2,f.Stack.Item,{children:(0,e.createComponentVNode)(2,u)})]})}),(0,e.createComponentVNode)(2,f.Stack.Item,{width:"30%",children:(0,e.createComponentVNode)(2,f.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,f.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,m)}),(0,e.createComponentVNode)(2,f.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,s)})]})})]})]})}):(0,e.createComponentVNode)(2,C)}return p}(),m=function(N,V){var y=(0,o.useBackend)(V),I=y.act,L=y.data,w=L.materials,A=L.capacity,x=Object.values(w).reduce(function(E,P){return E+P},0);return(0,e.createComponentVNode)(2,f.Section,{fill:!0,scrollable:!0,title:"Materials",className:"Exofab__materials",buttons:(0,e.createComponentVNode)(2,f.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,d,{mt:-2,id:E,bold:E==="metal"||E==="glass",onClick:function(){function P(){return I("withdraw",{id:E})}return P}()},E)})})},i=function(N,V){var y=(0,o.useBackend)(V),I=y.act,L=y.data,w=L.curCategory,A=L.categories,x=L.designs,E=L.syncing,P=(0,o.useLocalState)(V,"searchText",""),D=P[0],M=P[1],R=(0,t.createSearch)(D,function(z){return z.name}),O=x.filter(R),F=(0,o.useLocalState)(V,"levelsModal",!1),_=F[0],U=F[1];return(0,e.createComponentVNode)(2,f.Section,{fill:!0,scrollable:!0,className:"Exofab__designs",title:(0,e.createComponentVNode)(2,f.Dropdown,{width:"19rem",className:"Exofab__dropdown",selected:w,options:A,onSelected:function(){function z($){return I("category",{cat:$})}return z}()}),buttons:(0,e.createComponentVNode)(2,f.Box,{mt:"2px",children:[(0,e.createComponentVNode)(2,f.Button,{icon:"plus",content:"Queue all",onClick:function(){function z(){return I("queueall")}return z}()}),(0,e.createComponentVNode)(2,f.Button,{icon:"info",content:"Show current tech levels",onClick:function(){function z(){return U(!0)}return z}()}),(0,e.createComponentVNode)(2,f.Button,{icon:"unlink",color:"red",tooltip:"Disconnect from R&D network",onClick:function(){function z(){return I("unlink")}return z}()})]}),children:[(0,e.createComponentVNode)(2,f.Input,{placeholder:"Search by name...",mb:"0.5rem",width:"100%",onInput:function(){function z($,G){return M(G)}return z}()}),O.map(function(z){return(0,e.createComponentVNode)(2,v,{design:z},z.id)}),O.length===0&&(0,e.createComponentVNode)(2,f.Box,{color:"label",children:"No designs found."})]})},u=function(N,V){var y=(0,o.useBackend)(V),I=y.act,L=y.data,w=L.building,A=L.buildStart,x=L.buildEnd,E=L.worldTime;return(0,e.createComponentVNode)(2,f.Section,{className:"Exofab__building",stretchContents:!0,children:(0,e.createComponentVNode)(2,f.ProgressBar.Countdown,{start:A,current:E,end:x,children:(0,e.createComponentVNode)(2,f.Stack,{children:[(0,e.createComponentVNode)(2,f.Stack.Item,{children:(0,e.createComponentVNode)(2,f.Icon,{name:"cog",spin:!0})}),(0,e.createComponentVNode)(2,f.Stack.Item,{children:["Building ",w,"\xA0(",(0,e.createComponentVNode)(2,b.Countdown,{current:E,timeLeft:x-E,format:function(){function P(D,M){return M.substr(3)}return P}()}),")"]})]})})})},s=function(N,V){var y=(0,o.useBackend)(V),I=y.act,L=y.data,w=L.queue,A=L.processingQueue,x=Object.entries(L.queueDeficit).filter(function(P){return P[1]<0}),E=w.reduce(function(P,D){return P+D.time},0);return(0,e.createComponentVNode)(2,f.Section,{fill:!0,scrollable:!0,className:"Exofab__queue",title:"Queue",buttons:(0,e.createComponentVNode)(2,f.Box,{children:[(0,e.createComponentVNode)(2,f.Button,{selected:A,icon:A?"toggle-on":"toggle-off",content:"Process",onClick:function(){function P(){return I("process")}return P}()}),(0,e.createComponentVNode)(2,f.Button,{disabled:w.length===0,icon:"eraser",content:"Clear",onClick:function(){function P(){return I("unqueueall")}return P}()})]}),children:(0,e.createComponentVNode)(2,f.Stack,{fill:!0,vertical:!0,children:w.length===0?(0,e.createComponentVNode)(2,f.Box,{color:"label",children:"The queue is empty."}):(0,e.createFragment)([(0,e.createComponentVNode)(2,f.Stack.Item,{className:"Exofab__queue--queue",grow:!0,overflow:"auto",children:w.map(function(P,D){return(0,e.createComponentVNode)(2,f.Box,{color:P.notEnough&&"bad",children:[D+1,". ",P.name,D>0&&(0,e.createComponentVNode)(2,f.Button,{icon:"arrow-up",onClick:function(){function M(){return I("queueswap",{from:D+1,to:D})}return M}()}),D0&&(0,e.createComponentVNode)(2,f.Stack.Item,{className:"Exofab__queue--time",children:[(0,e.createComponentVNode)(2,f.Divider),"Processing time:",(0,e.createComponentVNode)(2,f.Icon,{name:"clock",mx:"0.5rem"}),(0,e.createComponentVNode)(2,f.Box,{inline:!0,bold:!0,children:new Date(E/10*1e3).toISOString().substr(14,5)})]}),Object.keys(x).length>0&&(0,e.createComponentVNode)(2,f.Stack.Item,{className:"Exofab__queue--deficit",shrink:"0",children:[(0,e.createComponentVNode)(2,f.Divider),"Lacking materials to complete:",x.map(function(P){return(0,e.createComponentVNode)(2,f.Box,{children:(0,e.createComponentVNode)(2,d,{id:P[0],amount:-P[1],lineDisplay:!0})},P[0])})]})],0)})})},d=function(N,V){var y=(0,o.useBackend)(V),I=y.act,L=y.data,w=N.id,A=N.amount,x=N.lineDisplay,E=N.onClick,P=k(N,B),D=L.materials[w]||0,M=A||D;if(!(M<=0&&!(w==="metal"||w==="glass"))){var R=A&&A>D;return(0,e.normalizeProps)((0,e.createComponentVNode)(2,f.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,f.Stack.Item,{className:(0,a.classes)(["materials32x32",w])}),(0,e.createComponentVNode)(2,f.Stack.Item,{className:"Exofab__material--amount",color:R&&"bad",ml:0,mr:1,children:M.toLocaleString("en-US")})],4):(0,e.createFragment)([(0,e.createComponentVNode)(2,f.Stack.Item,{basis:"content",children:(0,e.createComponentVNode)(2,f.Button,{width:"85%",color:"transparent",onClick:E,children:(0,e.createComponentVNode)(2,f.Box,{mt:1,className:(0,a.classes)(["materials32x32",w])})})}),(0,e.createComponentVNode)(2,f.Stack.Item,{grow:"1",children:[(0,e.createComponentVNode)(2,f.Box,{className:"Exofab__material--name",children:w}),(0,e.createComponentVNode)(2,f.Box,{className:"Exofab__material--amount",children:[M.toLocaleString("en-US")," cm\xB3 (",Math.round(M/g*10)/10," ","sheets)"]})]})],4)})))}},v=function(N,V){var y=(0,o.useBackend)(V),I=y.act,L=y.data,w=N.design;return(0,e.createComponentVNode)(2,f.Box,{className:"Exofab__design",children:[(0,e.createComponentVNode)(2,f.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,f.Button,{icon:"plus-circle",onClick:function(){function A(){return I("queue",{id:w.id})}return A}()}),(0,e.createComponentVNode)(2,f.Box,{className:"Exofab__design--cost",children:Object.entries(w.cost).map(function(A){return(0,e.createComponentVNode)(2,f.Box,{children:(0,e.createComponentVNode)(2,d,{id:A[0],amount:A[1],lineDisplay:!0})},A[0])})}),(0,e.createComponentVNode)(2,f.Stack,{className:"Exofab__design--time",children:(0,e.createComponentVNode)(2,f.Stack.Item,{children:[(0,e.createComponentVNode)(2,f.Icon,{name:"clock"}),w.time>0?(0,e.createFragment)([w.time/10,(0,e.createTextVNode)(" seconds")],0):"Instant"]})})]})},C=function(N,V){var y=(0,o.useBackend)(V),I=y.act,L=y.data,w=L.controllers;return(0,e.createComponentVNode)(2,S.Window,{children:(0,e.createComponentVNode)(2,S.Window.Content,{children:(0,e.createComponentVNode)(2,f.Section,{title:"Setup Linkage",children:(0,e.createComponentVNode)(2,f.Table,{m:"0.5rem",children:[(0,e.createComponentVNode)(2,f.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,f.Table.Cell,{children:"Network Address"}),(0,e.createComponentVNode)(2,f.Table.Cell,{children:"Network ID"}),(0,e.createComponentVNode)(2,f.Table.Cell,{children:"Link"})]}),w.map(function(A){return(0,e.createComponentVNode)(2,f.Table.Row,{children:[(0,e.createComponentVNode)(2,f.Table.Cell,{children:A.addr}),(0,e.createComponentVNode)(2,f.Table.Cell,{children:A.net_id}),(0,e.createComponentVNode)(2,f.Table.Cell,{children:(0,e.createComponentVNode)(2,f.Button,{content:"Link",icon:"link",onClick:function(){function x(){return I("linktonetworkcontroller",{target_controller:A.addr})}return x}()})})]},A.addr)})]})})})})},h=function(N,V){var y=(0,o.useBackend)(V),I=y.act,L=y.data,w=L.tech_levels,A=(0,o.useLocalState)(V,"levelsModal",!1),x=A[0],E=A[1];return x?(0,e.createComponentVNode)(2,f.Modal,{maxWidth:"75%",width:window.innerWidth+"px",maxHeight:window.innerHeight*.75+"px",mx:"auto",children:(0,e.createComponentVNode)(2,f.Section,{title:"Current tech levels",buttons:(0,e.createComponentVNode)(2,f.Button,{content:"Close",onClick:function(){function P(){E(!1)}return P}()}),children:(0,e.createComponentVNode)(2,f.LabeledList,{children:w.map(function(P){var D=P.name,M=P.level;return(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:D,children:M},D)})})})}):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),f=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"}]]),S=r.ExperimentConsole=function(){function B(k,g){var l=(0,a.useBackend)(g),c=l.act,m=l.data,i=m.open,u=m.feedback,s=m.occupant,d=m.occupant_name,v=m.occupant_status,C=function(){function p(){if(!s)return(0,e.createComponentVNode)(2,t.NoticeBox,{children:"No specimen detected."});var N=function(){function y(){return f.get(v)}return y}(),V=N();return(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Name",children:d}),(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(y){return(0,e.createComponentVNode)(2,t.Button,{icon:b.get(y).icon,content:b.get(y).label,onClick:function(){function I(){return c("experiment",{experiment_type:y})}return I}()},y)})})]})}return p}(),h=C();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:u})})}),(0,e.createComponentVNode)(2,t.Section,{title:"Scanner",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"eject",content:"Eject",disabled:!i,onClick:function(){function p(){return c("door")}return p}()}),children:h})]})})}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),f=0,b=1013,S=function(g){var l="good",c=80,m=95,i=110,u=120;return gi?l="average":g>u&&(l="bad"),l},B=r.ExternalAirlockController=function(){function k(g,l){var c=(0,a.useBackend)(l),m=c.act,i=c.data,u=i.chamber_pressure,s=i.exterior_status,d=i.interior_status,v=i.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:S(u),value:u,minValue:f,maxValue:b,children:[u," kPa"]})})})}),(0,e.createComponentVNode)(2,t.Section,{title:"Actions",buttons:(0,e.createComponentVNode)(2,t.Button,{content:"Abort",icon:"ban",color:"red",disabled:!v,onClick:function(){function C(){return m("abort")}return C}()}),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:v,onClick:function(){function C(){return m("cycle_ext")}return C}()}),(0,e.createComponentVNode)(2,t.Button,{width:"50%",content:"Cycle to Interior",icon:"arrow-circle-right",disabled:v,onClick:function(){function C(){return m("cycle_int")}return C}()})]}),(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Button,{width:"49%",content:"Force Exterior Door",icon:"exclamation-triangle",color:d==="open"?"red":v?"yellow":null,onClick:function(){function C(){return m("force_ext")}return C}()}),(0,e.createComponentVNode)(2,t.Button,{width:"50%",content:"Force Interior Door",icon:"exclamation-triangle",color:d==="open"?"red":v?"yellow":null,onClick:function(){function C(){return m("force_int")}return C}()})]})]})]})})}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),f=r.FaxMachine=function(){function b(S,B){var k=(0,a.useBackend)(B),g=k.act,l=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:l.scan_name?"eject":"id-card",selected:l.scan_name,content:l.scan_name?l.scan_name:"-----",tooltip:l.scan_name?"Eject ID":"Insert ID",onClick:function(){function c(){return g("scan")}return c}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Authorize",children:(0,e.createComponentVNode)(2,t.Button,{icon:l.authenticated?"sign-out-alt":"id-card",selected:l.authenticated,disabled:l.nologin,content:l.realauth?"Log Out":"Log In",onClick:function(){function c(){return g("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:l.network}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Document",children:[(0,e.createComponentVNode)(2,t.Button,{icon:l.paper?"eject":"paperclip",disabled:!l.authenticated&&!l.paper,content:l.paper?l.paper:"-----",onClick:function(){function c(){return g("paper")}return c}()}),!!l.paper&&(0,e.createComponentVNode)(2,t.Button,{icon:"pencil-alt",content:"Rename",onClick:function(){function c(){return g("rename")}return c}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Sending To",children:(0,e.createComponentVNode)(2,t.Button,{icon:"print",content:l.destination?l.destination:"-----",disabled:!l.authenticated,onClick:function(){function c(){return g("dept")}return c}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Action",children:(0,e.createComponentVNode)(2,t.Button,{icon:"envelope",content:l.sendError?l.sendError:"Send",disabled:!l.paper||!l.destination||!l.authenticated||l.sendError,onClick:function(){function c(){return g("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),f=r.FilingCabinet=function(){function b(S,B){var k=(0,a.useBackend)(B),g=k.act,l=k.data,c=k.config,m=l.contents,i=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:[!m&&(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 ",i," is empty."]})}),!!m&&m.slice().map(function(u){return(0,e.createComponentVNode)(2,t.Stack,{mt:.5,className:"candystripe",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:"80%",children:u.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 g("retrieve",{index:u.index})}return s}()})})]},u)})]})})})})}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),f=function(k,g){var l=(0,a.useBackend)(g),c=l.act,m=l.data,i=k.icon_state,u=k.direction,s=k.isSelected,d=k.onSelect;return(0,e.createComponentVNode)(2,t.DmIcon,{icon:m.icon,icon_state:i,direction:u,onClick:d,style:{"border-style":s&&"solid"||"none","border-width":"2px","border-color":"orange",padding:s&&"0px"||"2px"}})},b={NORTH:1,SOUTH:2,EAST:4,WEST:8},S=r.FloorPainter=function(){function B(k,g){var l=(0,a.useBackend)(g),c=l.act,m=l.data,i=m.availableStyles,u=m.selectedStyle,s=m.selectedDir;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.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{icon:"chevron-left",onClick:function(){function d(){return c("cycle_style",{offset:-1})}return d}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Dropdown,{options:i,selected:u,width:"150px",nochevron:!0,onSelected:function(){function d(v){return c("select_style",{style:v})}return d}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{icon:"chevron-right",onClick:function(){function d(){return c("cycle_style",{offset:1})}return d}()})})]}),(0,e.createComponentVNode)(2,t.Box,{mt:"5px",mb:"5px",children:(0,e.createComponentVNode)(2,t.Flex,{overflowY:"auto",maxHeight:"239px",wrap:"wrap",children:i.map(function(d){return(0,e.createComponentVNode)(2,t.Flex.Item,{children:(0,e.createComponentVNode)(2,f,{icon_state:d,isSelected:u===d,onSelect:function(){function v(){return c("select_style",{style:d})}return v}()})},d)})})}),(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:[b.NORTH,null,b.SOUTH].map(function(d){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[d+b.WEST,d,d+b.EAST].map(function(v){return(0,e.createComponentVNode)(2,t.Table.Cell,{style:{"vertical-align":"middle","text-align":"center"},children:v===null?(0,e.createComponentVNode)(2,t.Icon,{name:"arrows-alt",size:3}):(0,e.createComponentVNode)(2,f,{icon_state:u,direction:v,isSelected:v===s,onSelect:function(){function C(){return c("select_direction",{direction:v})}return C}()})},v)})},d)})})})})]})})})}return B}()},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),f=n(98595),b=function(i){return i?"("+i.join(", ")+")":"ERROR"},S=function(i,u){if(!(!i||!u)){if(i[2]!==u[2])return null;var s=Math.atan2(u[1]-i[1],u[0]-i[0]),d=Math.sqrt(Math.pow(u[1]-i[1],2)+Math.pow(u[0]-i[0],2));return{angle:(0,a.rad2deg)(s),distance:d}}},B=r.GPS=function(){function m(i,u){var s=(0,t.useBackend)(u),d=s.data,v=d.emped,C=d.active,h=d.area,p=d.position,N=d.saved;return(0,e.createComponentVNode)(2,f.Window,{width:400,height:600,children:(0,e.createComponentVNode)(2,f.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:v?(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,g)}),C?(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,l,{area:h,position:p})}),N&&(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,l,{title:"Saved Position",position:N})}),(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 m}(),k=function(i,u){var s=i.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."]})})})})},g=function(i,u){var s=(0,t.useBackend)(u),d=s.act,v=s.data,C=v.active,h=v.tag,p=v.same_z,N=(0,t.useLocalState)(u,"newTag",h),V=N[0],y=N[1];return(0,e.createComponentVNode)(2,o.Section,{title:"Settings",buttons:(0,e.createComponentVNode)(2,o.Button,{selected:C,icon:C?"toggle-on":"toggle-off",content:C?"On":"Off",onClick:function(){function I(){return d("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:h,onEnter:function(){function I(){return d("tag",{newtag:V})}return I}(),onInput:function(){function I(L,w){return y(w)}return I}()}),(0,e.createComponentVNode)(2,o.Button,{disabled:h===V,width:"20px",mb:"0",ml:"0.25rem",onClick:function(){function I(){return d("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:!p,icon:p?"compress":"expand",content:p?"Local Sector":"Global",onClick:function(){function I(){return d("same_z")}return I}()})})]})})},l=function(i,u){var s=i.title,d=i.area,v=i.position;return(0,e.createComponentVNode)(2,o.Section,{title:s||"Position",children:(0,e.createComponentVNode)(2,o.Box,{fontSize:"1.5rem",children:[d&&(0,e.createFragment)([d,(0,e.createVNode)(1,"br")],0),b(v)]})})},c=function(i,u){var s=(0,t.useBackend)(u),d=s.data,v=d.position,C=d.signals;return(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Section,Object.assign({fill:!0,scrollable:!0,title:"Signals"},i,{children:(0,e.createComponentVNode)(2,o.Table,{children:C.map(function(h){return Object.assign({},h,S(v,h.position))}).map(function(h,p){return(0,e.createComponentVNode)(2,o.Table.Row,{backgroundColor:p%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:h.tag}),(0,e.createComponentVNode)(2,o.Table.Cell,{verticalAlign:"middle",color:"grey",children:h.area}),(0,e.createComponentVNode)(2,o.Table.Cell,{verticalAlign:"middle",collapsing:!0,children:h.distance!==void 0&&(0,e.createComponentVNode)(2,o.Box,{opacity:Math.max(1-Math.min(h.distance,100)/100,.5),children:[(0,e.createComponentVNode)(2,o.Icon,{name:h.distance>0?"arrow-right":"circle",rotation:-h.angle}),"\xA0",Math.floor(h.distance)+"m"]})}),(0,e.createComponentVNode)(2,o.Table.Cell,{verticalAlign:"middle",pr:"0.25rem",collapsing:!0,children:b(h.position)})]},p)})})})))}},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),f=n(98595),b=r.GeneModder=function(){function u(s,d){var v=(0,a.useBackend)(d),C=v.data,h=C.has_seed;return(0,e.createComponentVNode)(2,f.Window,{width:950,height:650,children:[(0,e.createVNode)(1,"div","GeneModder__left",(0,e.createComponentVNode)(2,f.Window.Content,{children:(0,e.createComponentVNode)(2,i,{scrollable:!0})}),2),(0,e.createVNode)(1,"div","GeneModder__right",(0,e.createComponentVNode)(2,f.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%"}),h===0?(0,e.createComponentVNode)(2,B):(0,e.createComponentVNode)(2,S)]})}),2)]})}return u}(),S=function(s,d){var v=(0,a.useBackend)(d),C=v.act,h=v.data,p=h.disk;return(0,e.createComponentVNode)(2,t.Section,{title:"Genes",fill:!0,scrollable:!0,children:[(0,e.createComponentVNode)(2,g),(0,e.createComponentVNode)(2,l),(0,e.createComponentVNode)(2,c)]})},B=function(s,d){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,d){var v=(0,a.useBackend)(d),C=v.act,h=v.data,p=h.has_seed,N=h.seed,V=h.has_disk,y=h.disk,I,L;return p?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,"+N.image,style:{"vertical-align":"middle",width:"32px",margin:"-1px","margin-left":"-11px"}}),(0,e.createComponentVNode)(2,t.Button,{content:N.name,onClick:function(){function w(){return C("eject_seed")}return w}()}),(0,e.createComponentVNode)(2,t.Button,{ml:"3px",icon:"pen",tooltip:"Name Variant",onClick:function(){function w(){return C("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 C("eject_seed")}return w}()})}),V?L=y.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 C("select_empty_disk")}return w}()})})})]})})},g=function(s,d){var v=(0,a.useBackend)(d),C=v.act,h=v.data,p=h.disk,N=h.core_genes;return(0,e.createComponentVNode)(2,t.Collapsible,{title:"Core Genes",open:!0,children:[N.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:!(p!=null&&p.can_extract),icon:"save",onClick:function(){function y(){return C("extract",{id:V.id})}return y}()})})]},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:!(p!=null&&p.can_extract),icon:"save",onClick:function(){function V(){return C("bulk_extract_core")}return V}()})})})]},"Core Genes")},l=function(s,d){var v=(0,a.useBackend)(d),C=v.data,h=C.reagent_genes,p=C.has_reagent;return(0,e.createComponentVNode)(2,m,{title:"Reagent Genes",gene_set:h,do_we_show:p})},c=function(s,d){var v=(0,a.useBackend)(d),C=v.data,h=C.trait_genes,p=C.has_trait;return(0,e.createComponentVNode)(2,m,{title:"Trait Genes",gene_set:h,do_we_show:p})},m=function(s,d){var v=s.title,C=s.gene_set,h=s.do_we_show,p=(0,a.useBackend)(d),N=p.act,V=p.data,y=V.disk;return(0,e.createComponentVNode)(2,t.Collapsible,{title:v,open:!0,children:h?C.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:!(y!=null&&y.can_extract),icon:"save",onClick:function(){function L(){return N("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 N("remove",{id:I.id})}return L}()})})]},I)}):(0,e.createComponentVNode)(2,t.Stack.Item,{children:"No Genes Detected"})},v)},i=function(s,d){var v=s.title,C=s.gene_set,h=s.do_we_show,p=(0,a.useBackend)(d),N=p.act,V=p.data,y=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 N("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)||!y,icon:"arrow-circle-down",onClick:function(){function E(){return N("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||!y,content:"Replace",onClick:function(){function E(){return N("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 N("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 N("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 N("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 N("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 N("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 N("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 N("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 N("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 N("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 N("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 N("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),f=r.GenericCrewManifest=function(){function b(S,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),f=r.GhostHudPanel=function(){function S(B,k){var g=(0,a.useBackend)(k),l=g.data,c=l.security,m=l.medical,i=l.diagnostic,u=l.pressure,s=l.radioactivity,d=l.ahud;return(0,e.createComponentVNode)(2,o.Window,{width:250,height:217,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:m}),(0,e.createComponentVNode)(2,b,{label:"Security",type:"security",is_active:c}),(0,e.createComponentVNode)(2,b,{label:"Diagnostic",type:"diagnostic",is_active:i}),(0,e.createComponentVNode)(2,b,{label:"Pressure",type:"pressure",is_active:u}),(0,e.createComponentVNode)(2,t.Divider),(0,e.createComponentVNode)(2,b,{label:"Radioactivity",type:"radioactivity",is_active:s,act_on:"rads_on",act_off:"rads_off"}),(0,e.createComponentVNode)(2,t.Divider),(0,e.createComponentVNode)(2,b,{label:"Antag HUD",is_active:d,act_on:"ahud_on",act_off:"ahud_off"})]})})})}return S}(),b=function(B,k){var g=(0,a.useBackend)(k),l=g.act,c=B.label,m=B.type,i=m===void 0?null:m,u=B.is_active,s=B.act_on,d=s===void 0?"hud_on":s,v=B.act_off,C=v===void 0?"hud_off":v;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:u?"On":"Off",icon:u?"toggle-on":"toggle-off",selected:u,onClick:function(){function h(){return l(u?C:d,{hud_type:i})}return h}()})})]})}},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),f=r.GlandDispenser=function(){function b(S,B){var k=(0,a.useBackend)(B),g=k.act,l=k.data,c=l.glands,m=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:m.map(function(i){return(0,e.createComponentVNode)(2,t.Button,{width:"60px",height:"60px",m:.75,textAlign:"center",fontSize:"17px",lineHeight:"55px",icon:"eject",backgroundColor:i.color,content:i.amount||"0",disabled:!i.amount,onClick:function(){function u(){return g("dispense",{gland_id:i.id})}return u}()},i.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),f=r.GravityGen=function(){function b(S,B){var k=(0,a.useBackend)(B),g=k.act,l=k.data,c=l.charging_state,m=l.charge_count,i=l.breaker,u=l.ext_power,s=function(){function v(C){return C>0?(0,e.createComponentVNode)(2,t.Box,{inline:!0,color:"average",children:["[ ",C===1?"Charging":"Discharging"," ]"]}):(0,e.createComponentVNode)(2,t.Box,{inline:!0,color:u?"good":"bad",children:["[ ",u?"Powered":"Unpowered"," ]"]})}return v}(),d=function(){function v(C){if(C>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 v}();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:[d(c),(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Generator Status",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:i?"power-off":"times",content:i?"Online":"Offline",color:i?"green":"red",px:1.5,onClick:function(){function v(){return g("breaker")}return v}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Power Status",color:u?"good":"bad",children:s(c)}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Gravity Charge",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:m/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),f=n(49148),b=r.GuestPass=function(){function S(B,k){var g=(0,a.useBackend)(k),l=g.act,c=g.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 m(){return l("mode",{mode:0})}return m}(),children:"Issue Pass"}),(0,e.createComponentVNode)(2,t.Tabs.Tab,{icon:"scroll",selected:c.showlogs,onClick:function(){function m(){return l("mode",{mode:1})}return m}(),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 m(){return l("scan")}return m}()})})})})}),(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 m(){return l("giv_name")}return m}()})}),(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 m(){return l("reason")}return m}()})}),(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 m(){return l("duration")}return m}()})})]})})}),!c.showlogs&&(c.scan_name?(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,f.AccessList,{sectionButtons:(0,e.createComponentVNode)(2,t.Button,{icon:"id-card",content:c.printmsg,disabled:!c.canprint,onClick:function(){function m(){return l("issue")}return m}()}),grantableList:c.grantableList,accesses:c.regions,selectedList:c.selectedAccess,accessMod:function(){function m(i){return l("access",{access:i})}return m}(),grantAll:function(){function m(){return l("grant_all")}return m}(),denyAll:function(){function m(){return l("clear_all")}return m}(),grantDep:function(){function m(i){return l("grant_region",{region:i})}return m}(),denyDep:function(){function m(i){return l("deny_region",{region:i})}return m}()})}):(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 m(){return l("print")}return m}()}),children:!!c.issue_log.length&&(0,e.createComponentVNode)(2,t.LabeledList,{children:c.issue_log.map(function(m,i){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{children:m},i)})})||(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 S}()},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),f=[1,5,10,20,30,50],b=null,S=r.HandheldChemDispenser=function(){function g(l,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 g}(),B=function(l,c){var m=(0,a.useBackend)(c),i=m.act,u=m.data,s=u.amount,d=u.energy,v=u.maxEnergy,C=u.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:d,minValue:0,maxValue:v,ranges:{good:[v*.5,1/0],average:[v*.25,v*.5],bad:[-1/0,v*.25]},children:[d," / ",v," Units"]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Amount",verticalAlign:"middle",children:(0,e.createComponentVNode)(2,t.Stack,{children:f.map(function(h,p){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===h,content:h,onClick:function(){function N(){return i("amount",{amount:h})}return N}()})},p)})})}),(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:C==="dispense",content:"Dispense",m:"0",width:"32%",onClick:function(){function h(){return i("mode",{mode:"dispense"})}return h}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"cog",selected:C==="remove",content:"Remove",m:"0",width:"32%",onClick:function(){function h(){return i("mode",{mode:"remove"})}return h}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"cog",selected:C==="isolate",content:"Isolate",m:"0",width:"32%",onClick:function(){function h(){return i("mode",{mode:"isolate"})}return h}()})]})})]})})})},k=function(l,c){for(var m=(0,a.useBackend)(c),i=m.act,u=m.data,s=u.chemicals,d=s===void 0?[]:s,v=u.current_reagent,C=[],h=0;h<(d.length+1)%3;h++)C.push(!0);return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,height:"18%",children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:u.glass?"Drink Selector":"Chemical Selector",children:[d.map(function(p,N){return(0,e.createComponentVNode)(2,t.Button,{width:"32%",icon:"arrow-circle-down",overflow:"hidden",textOverflow:"ellipsis",selected:v===p.id,content:p.title,style:{"margin-left":"2px"},onClick:function(){function V(){return i("dispense",{reagent:p.id})}return V}()},N)}),C.map(function(p,N){return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:"1",basis:"25%"},N)})]})})}},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),f=n(98595),b=r.HealthSensor=function(){function B(k,g){var l=(0,t.useBackend)(g),c=l.act,m=l.data,i=m.on,u=m.user_health,s=m.minHealth,d=m.maxHealth,v=m.alarm_health;return(0,e.createComponentVNode)(2,f.Window,{width:300,height:125,children:(0,e.createComponentVNode)(2,f.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:i?"On":"Off",color:i?null:"red",selected:i,onClick:function(){function C(){return c("scan_toggle")}return C}()})}),(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:d,value:v,format:function(){function C(h){return(0,a.toFixed)(h,1)}return C}(),width:"80px",onDrag:function(){function C(h,p){return c("alarm_health",{alarm_health:p})}return C}()})}),u!==null&&(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"User health",children:(0,e.createComponentVNode)(2,o.Box,{color:S(u),bold:u>=100,children:(0,e.createComponentVNode)(2,o.AnimatedNumber,{value:u})})})]})})})})}return B}(),S=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),f=r.Holodeck=function(){function S(B,k){var g=(0,a.useBackend)(k),l=g.act,c=g.data,m=(0,a.useLocalState)(k,"currentDeck",""),i=m[0],u=m[1],s=(0,a.useLocalState)(k,"showReload",!1),d=s[0],v=s[1],C=c.decks,h=c.ai_override,p=c.emagged,N=function(){function V(y){l("select_deck",{deck:y}),u(y),v(!0),setTimeout(function(){v(!1)},3e3)}return V}();return(0,e.createComponentVNode)(2,o.Window,{width:400,height:320,children:[d&&(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)," ",i]})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Available Programs",children:[C.map(function(V){return(0,e.createComponentVNode)(2,t.Button,{width:15.5,color:"transparent",content:V,selected:V===i,onClick:function(){function y(){return N(V)}return y}()},V)}),(0,e.createVNode)(1,"hr",null,null,1,{color:"gray"}),(0,e.createComponentVNode)(2,t.LabeledList,{children:[!!h&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Override Protocols",children:(0,e.createComponentVNode)(2,t.Button,{content:p?"Turn On":"Turn Off",color:p?"good":"bad",onClick:function(){function V(){return l("ai_override")}return V}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Safety Protocols",children:(0,e.createComponentVNode)(2,t.Box,{color:p?"bad":"good",children:[p?"Off":"On",!!p&&(0,e.createComponentVNode)(2,t.Button,{ml:9.5,width:15.5,color:"red",content:"Wildlife Simulation",onClick:function(){function V(){return l("wildlifecarp")}return V}()})]})})]})]})})]})})]})}return S}(),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),f=n(98595),b=r.Instrument=function(){function l(c,m){var i=(0,t.useBackend)(m),u=i.act,s=i.data;return(0,e.createComponentVNode)(2,f.Window,{width:600,height:505,children:[(0,e.createComponentVNode)(2,S),(0,e.createComponentVNode)(2,f.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,B),(0,e.createComponentVNode)(2,g)]})})]})}return l}(),S=function(c,m){var i=(0,t.useBackend)(m),u=i.act,s=i.data,d=s.help;if(d)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 v(){return u("help")}return v}()})]})})})},B=function(c,m){var i=(0,t.useBackend)(m),u=i.act,s=i.data,d=s.lines,v=s.playing,C=s.repeat,h=s.maxRepeats,p=s.tempo,N=s.minTempo,V=s.maxTempo,y=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 u("help")}return x}()}),(0,e.createComponentVNode)(2,o.Button,{icon:"file",content:"New",onClick:function(){function x(){return u("newsong")}return x}()}),(0,e.createComponentVNode)(2,o.Button,{icon:"upload",content:"Import",onClick:function(){function x(){return u("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:v,disabled:d.length===0||C<0,icon:"play",content:"Play",onClick:function(){function x(){return u("play")}return x}()}),(0,e.createComponentVNode)(2,o.Button,{disabled:!v,icon:"stop",content:"Stop",onClick:function(){function x(){return u("stop")}return x}()})]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Repeat",children:(0,e.createComponentVNode)(2,o.Slider,{animated:!0,minValue:0,maxValue:h,value:C,stepPixelSize:59,onChange:function(){function x(E,P){return u("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:p>=V,content:"-",as:"span",mr:"0.5rem",onClick:function(){function x(){return u("tempo",{new:p+y})}return x}()}),(0,a.round)(600/p)," BPM",(0,e.createComponentVNode)(2,o.Button,{disabled:p<=N,content:"+",as:"span",ml:"0.5rem",onClick:function(){function x(){return u("tempo",{new:p-y})}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 u("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,m){var i=(0,t.useBackend)(m),u=i.act,s=i.data,d=s.allowedInstrumentNames,v=s.instrumentLoaded,C=s.instrument,h=s.canNoteShift,p=s.noteShift,N=s.noteShiftMin,V=s.noteShiftMax,y=s.sustainMode,I=s.sustainLinearDuration,L=s.sustainExponentialDropoff,w=s.legacy,A=s.sustainDropoffVolume,x=s.sustainHeldNote,E,P;return y===1?(E="Linear",P=(0,e.createComponentVNode)(2,o.Slider,{minValue:.1,maxValue:5,value:I,step:.5,stepPixelSize:85,format:function(){function D(M){return(0,a.round)(M*100)/100+" seconds"}return D}(),onChange:function(){function D(M,R){return u("setlinearfalloff",{new:R/10})}return D}()})):y===2&&(E="Exponential",P=(0,e.createComponentVNode)(2,o.Slider,{minValue:1.025,maxValue:10,value:L,step:.01,format:function(){function D(M){return(0,a.round)(M*1e3)/1e3+"% per decisecond"}return D}(),onChange:function(){function D(M,R){return u("setexpfalloff",{new:R})}return D}()})),d.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:v?(0,e.createComponentVNode)(2,o.Dropdown,{options:d,selected:C,width:"50%",onSelected:function(){function D(M){return u("switchinstrument",{name:M})}return D}()}):(0,e.createComponentVNode)(2,o.Box,{color:"bad",children:"None!"})}),!!(!w&&h)&&(0,e.createFragment)([(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Note Shift/Note Transpose",children:(0,e.createComponentVNode)(2,o.Slider,{minValue:N,maxValue:V,value:p,stepPixelSize:2,format:function(){function D(M){return M+" keys / "+(0,a.round)(M/12*100)/100+" octaves"}return D}(),onChange:function(){function D(M,R){return u("setnoteshift",{new:R})}return D}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Sustain Mode",children:[(0,e.createComponentVNode)(2,o.Dropdown,{options:["Linear","Exponential"],selected:E,mb:"0.4rem",onSelected:function(){function D(M){return u("setsustainmode",{new:M})}return D}()}),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 D(M,R){return u("setdropoffvolume",{new:R})}return D}()})}),(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 D(){return u("togglesustainhold")}return D}()})})],4)]}),(0,e.createComponentVNode)(2,o.Button,{icon:"redo",content:"Reset to Default",mt:"0.5rem",onClick:function(){function D(){return u("reset")}return D}()})]})})})},g=function(c,m){var i=(0,t.useBackend)(m),u=i.act,s=i.data,d=s.playing,v=s.lines,C=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:!C||d,icon:"plus",content:"Add Line",onClick:function(){function h(){return u("newline",{line:v.length+1})}return h}()}),(0,e.createComponentVNode)(2,o.Button,{selected:!C,icon:C?"chevron-up":"chevron-down",onClick:function(){function h(){return u("edit")}return h}()})],4),children:!!C&&(v.length>0?(0,e.createComponentVNode)(2,o.LabeledList,{children:v.map(function(h,p){return(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:p+1,buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Button,{disabled:d,icon:"pen",onClick:function(){function N(){return u("modifyline",{line:p+1})}return N}()}),(0,e.createComponentVNode)(2,o.Button,{disabled:d,icon:"trash",onClick:function(){function N(){return u("deleteline",{line:p+1})}return N}()})],4),children:h},p)})}):(0,e.createComponentVNode)(2,o.Box,{color:"label",children:"Song is empty."}))})}},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),f=n(98595),b=n(19203),S=n(51057),B=function(i){return i.key!==a.KEY.Alt&&i.key!==a.KEY.Control&&i.key!==a.KEY.Shift&&i.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"},g=3,l=function(i){var u="";if(i.altKey&&(u+="Alt"),i.ctrlKey&&(u+="Ctrl"),i.shiftKey&&!(i.keyCode>=48&&i.keyCode<=57)&&(u+="Shift"),i.location===g&&(u+="Numpad"),B(i))if(i.shiftKey&&i.keyCode>=48&&i.keyCode<=57){var s=i.keyCode-48;u+="Shift"+s}else{var d=i.key.toUpperCase();u+=k[d]||d}return u},c=r.KeyComboModal=function(){function m(i,u){var s=(0,t.useBackend)(u),d=s.act,v=s.data,C=v.init_value,h=v.large_buttons,p=v.message,N=p===void 0?"":p,V=v.title,y=v.timeout,I=(0,t.useLocalState)(u,"input",C),L=I[0],w=I[1],A=(0,t.useLocalState)(u,"binding",!0),x=A[0],E=A[1],P=function(){function R(O){if(!x){O.key===a.KEY.Enter&&d("submit",{entry:L}),(0,a.isEscape)(O.key)&&d("cancel");return}if(O.preventDefault(),B(O)){D(l(O)),E(!1);return}else if(O.key===a.KEY.Escape){D(C),E(!1);return}}return R}(),D=function(){function R(O){O!==L&&w(O)}return R}(),M=130+(N.length>30?Math.ceil(N.length/3):0)+(N.length&&h?5:0);return(0,e.createComponentVNode)(2,f.Window,{title:V,width:240,height:M,children:[y&&(0,e.createComponentVNode)(2,S.Loader,{value:y}),(0,e.createComponentVNode)(2,f.Window.Content,{onKeyDown:function(){function R(O){P(O)}return R}(),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:N})}),(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 R(){D(C),E(!0)}return R}()})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,b.InputButtons,{input:L})})]})]})})]})}return m}()},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),f=r.KeycardAuth=function(){function b(S,B){var k=(0,a.useBackend)(B),g=k.act,l=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(!l.swiping&&!l.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:!l.redAvailable,onClick:function(){function i(){return g("triggerevent",{triggerevent:"Red Alert"})}return i}(),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 i(){return g("triggerevent",{triggerevent:"Emergency Response Team"})}return i}(),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 i(){return g("triggerevent",{triggerevent:"Grant Emergency Maintenance Access"})}return i}(),content:"Grant"}),(0,e.createComponentVNode)(2,t.Button,{icon:"door-closed",onClick:function(){function i(){return g("triggerevent",{triggerevent:"Revoke Emergency Maintenance Access"})}return i}(),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 i(){return g("triggerevent",{triggerevent:"Activate Station-Wide Emergency Access"})}return i}(),content:"Grant"}),(0,e.createComponentVNode)(2,t.Button,{icon:"door-closed",onClick:function(){function i(){return g("triggerevent",{triggerevent:"Deactivate Station-Wide Emergency Access"})}return i}(),content:"Revoke"})]})]})})]})});var m=(0,e.createComponentVNode)(2,t.Box,{color:"red",children:"Waiting for YOU to swipe your ID..."});return!l.hasSwiped&&!l.ertreason&&l.event==="Emergency Response Team"?m=(0,e.createComponentVNode)(2,t.Box,{color:"red",children:"Fill out the reason for your ERT request."}):l.hasConfirm?m=(0,e.createComponentVNode)(2,t.Box,{color:"green",children:"Request Confirmed!"}):l.isRemote?m=(0,e.createComponentVNode)(2,t.Box,{color:"orange",children:"Swipe your card to CONFIRM the remote request."}):l.hasSwiped&&(m=(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,l.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:l.ertreason?"":"red",icon:l.ertreason?"check":"pencil-alt",content:l.ertreason?l.ertreason:"-----",disabled:l.busy,onClick:function(){function i(){return g("ert")}return i}()})})}),(0,e.createComponentVNode)(2,t.Section,{title:l.event,buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-circle-left",content:"Back",disabled:l.busy||l.hasConfirm,onClick:function(){function i(){return g("reset")}return i}()}),children:m})]})})}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),f=n(62411),b=r.KitchenMachine=function(){function B(k,g){var l=(0,a.useBackend)(g),c=l.data,m=l.config,i=c.ingredients,u=c.operating,s=m.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,f.Operating,{operating:u,name:s}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,S)}),(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:i.map(function(d){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:d.name}),2),(0,e.createVNode)(1,"td",null,(0,e.createComponentVNode)(2,t.Table.Cell,{collapsing:!0,textAlign:"center",children:[d.amount," ",d.units]}),2)]},d.name)})})})})]})})})}return B}(),S=function(k,g){var l=(0,a.useBackend)(g),c=l.act,m=l.data,i=m.inactive,u=m.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:i,tooltip:i?u:"",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:i,tooltip:i?u:"",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),f=r.LawManager=function(){function k(g,l){var c=(0,a.useBackend)(l),m=c.act,i=c.data,u=i.isAdmin,s=i.isSlaved,d=i.isMalf,v=i.isAIMalf,C=i.view;return(0,e.createComponentVNode)(2,o.Window,{width:800,height:d?620:365,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[!!(u&&s)&&(0,e.createComponentVNode)(2,t.NoticeBox,{children:["This unit is slaved to ",s,"."]}),!!(d||v)&&(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Button,{content:"Law Management",selected:C===0,onClick:function(){function h(){return m("set_view",{set_view:0})}return h}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Lawsets",selected:C===1,onClick:function(){function h(){return m("set_view",{set_view:1})}return h}()})]}),C===0&&(0,e.createComponentVNode)(2,b),C===1&&(0,e.createComponentVNode)(2,S)]})})}return k}(),b=function(g,l){var c=(0,a.useBackend)(l),m=c.act,i=c.data,u=i.has_zeroth_laws,s=i.zeroth_laws,d=i.has_ion_laws,v=i.ion_laws,C=i.ion_law_nr,h=i.has_inherent_laws,p=i.inherent_laws,N=i.has_supplied_laws,V=i.supplied_laws,y=i.channels,I=i.channel,L=i.isMalf,w=i.isAdmin,A=i.zeroth_law,x=i.ion_law,E=i.inherent_law,P=i.supplied_law,D=i.supplied_law_position;return(0,e.createFragment)([!!u&&(0,e.createComponentVNode)(2,B,{title:"ERR_NULL_VALUE",laws:s,ctx:l}),!!d&&(0,e.createComponentVNode)(2,B,{title:C,laws:v,ctx:l}),!!h&&(0,e.createComponentVNode)(2,B,{title:"Inherent",laws:p,ctx:l}),!!N&&(0,e.createComponentVNode)(2,B,{title:"Supplied",laws:V,ctx:l}),(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:y.map(function(M){return(0,e.createComponentVNode)(2,t.Button,{content:M.channel,selected:M.channel===I,onClick:function(){function R(){return m("law_channel",{law_channel:M.channel})}return R}()},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 m("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 m("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&&!u)&&(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 m("change_zeroth_law")}return M}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Add",icon:"plus",onClick:function(){function M(){return m("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 m("change_ion_law")}return M}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Add",icon:"plus",onClick:function(){function M(){return m("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 m("change_inherent_law")}return M}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Add",icon:"plus",onClick:function(){function M(){return m("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:D,onClick:function(){function M(){return m("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 m("change_supplied_law")}return M}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Add",icon:"plus",onClick:function(){function M(){return m("add_supplied_law")}return M}()})]})]})]})})],0)},S=function(g,l){var c=(0,a.useBackend)(l),m=c.act,i=c.data,u=i.law_sets;return(0,e.createComponentVNode)(2,t.Box,{children:u.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 d(){return m("transfer_laws",{transfer_laws:s.ref})}return d}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[s.laws.has_ion_laws>0&&s.laws.ion_laws.map(function(d){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:d.index,children:d.law},d.index)}),s.laws.has_zeroth_laws>0&&s.laws.zeroth_laws.map(function(d){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:d.index,children:d.law},d.index)}),s.laws.has_inherent_laws>0&&s.laws.inherent_laws.map(function(d){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:d.index,children:d.law},d.index)}),s.laws.has_supplied_laws>0&&s.laws.inherent_laws.map(function(d){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:d.index,children:d.law},d.index)})]})},s.name)})})},B=function(g,l){var c=(0,a.useBackend)(g.ctx),m=c.act,i=c.data,u=i.isMalf;return(0,e.createComponentVNode)(2,t.Section,{title:g.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?"})]}),g.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 d(){return m("state_law",{ref:s.ref,state_law:s.state?0:1})}return d}()}),!!u&&(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{content:"Edit",icon:"pencil-alt",onClick:function(){function d(){return m("edit_law",{edit_law:s.ref})}return d}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Delete",icon:"trash",color:"red",onClick:function(){function d(){return m("delete_law",{delete_law:s.ref})}return d}()})],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),f=n(3939),b=r.LibraryComputer=function(){function C(h,p){return(0,e.createComponentVNode)(2,o.Window,{width:1050,height:600,children:[(0,e.createComponentVNode)(2,f.ComplexModal),(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,l),(0,e.createComponentVNode)(2,c)]})})]})}return C}(),S=function(h,p){var N=(0,a.useBackend)(p),V=N.act,y=N.data,I=h.args,L=y.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,f.modalOpen)(p,"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,f.modalOpen)(p,"rate_info",{bookid:I.id})}return w}()})]})},B=function(h,p){var N=(0,a.useBackend)(p),V=N.act,y=N.data,I=h.args,L=y.selected_report,w=y.report_categories,A=y.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(h,p){var N=(0,a.useBackend)(p),V=N.act,y=N.data,I=y.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"})]})]})},g=function(h,p){var N=(0,a.useBackend)(p),V=N.act,y=N.data,I=h.args,L=y.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}()})]})},l=function(h,p){var N=(0,a.useBackend)(p),V=N.data,y=(0,a.useLocalState)(p,"tabIndex",0),I=y[0],L=y[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(h,p){var N=(0,a.useLocalState)(p,"tabIndex",0),V=N[0];switch(V){case 0:return(0,e.createComponentVNode)(2,i);case 1:return(0,e.createComponentVNode)(2,u);case 2:return(0,e.createComponentVNode)(2,s);case 3:return(0,e.createComponentVNode)(2,d);case 4:return(0,e.createComponentVNode)(2,v);default:return"You are somehow on a tab that doesn't exist! Please let a coder know."}},m=function(h,p){var N=(0,a.useBackend)(p),V=N.act,y=N.data,I=y.searchcontent,L=y.book_categories,w=y.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,f.modalOpen)(p,"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,f.modalOpen)(p,"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,f.modalOpen)(p,"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,f.modalOpen)(p,"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}()})]})]})},i=function(h,p){var N=(0,a.useBackend)(p),V=N.act,y=N.data,I=y.external_booklist,L=y.archive_pagenumber,w=y.num_pages,A=y.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,f.modalOpen)(p,"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,m),(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,f.modalOpen)(p,"expand_info",{bookid:x.id})}return E}()})]})]},x.id)})]})]})},u=function(h,p){var N=(0,a.useBackend)(p),V=N.act,y=N.data,I=y.programmatic_booklist,L=y.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,f.modalOpen)(p,"expand_info",{bookid:w.id})}return x}()})]})]},A)})]})})},s=function(h,p){var N=(0,a.useBackend)(p),V=N.act,y=N.data,I=y.selectedbook,L=y.book_categories,w=y.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,f.modalOpen)(p,"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,f.modalOpen)(p,"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,f.modalOpen)(p,"edit_selected_summary")}return x}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{children:I.summary})]})})]})]})},d=function(h,p){var N=(0,a.useBackend)(p),V=N.act,y=N.data,I=y.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)})]})})},v=function(h,p){var N=(0,a.useBackend)(p),V=N.act,y=N.data,I=y.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,f.modalRegisterBodyOverride)("expand_info",S),(0,f.modalRegisterBodyOverride)("report_book",B),(0,f.modalRegisterBodyOverride)("rate_info",g)},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),f=n(3939),b=r.LibraryManager=function(){function l(c,m){return(0,e.createComponentVNode)(2,o.Window,{width:600,height:600,children:[(0,e.createComponentVNode)(2,f.ComplexModal),(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,className:"Layout__content--flexColumn",children:(0,e.createComponentVNode)(2,S)})]})}return l}(),S=function(c,m){var i=(0,a.useBackend)(m),u=i.act,s=i.data,d=s.pagestate;switch(d){case 1:return(0,e.createComponentVNode)(2,B);case 2:return(0,e.createComponentVNode)(2,g);case 3:return(0,e.createComponentVNode)(2,k);default:return"WE SHOULDN'T BE HERE!"}},B=function(c,m){var i=(0,a.useBackend)(m),u=i.act,s=i.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 d(){return(0,f.modalOpen)(m,"specify_ssid_delete")}return d}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"user-slash",width:"auto",color:"danger",content:"Delete All Books By CKEY",onClick:function(){function d(){return(0,f.modalOpen)(m,"specify_ckey_delete")}return d}()}),(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,t.Button,{icon:"search",width:"auto",content:"View All Books By CKEY",onClick:function(){function d(){return(0,f.modalOpen)(m,"specify_ckey_search")}return d}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"search",width:"auto",content:"View All Reported Books",onClick:function(){function d(){return u("view_reported_books")}return d}()})]})},k=function(c,m){var i=(0,a.useBackend)(m),u=i.act,s=i.data,d=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 v(){return u("return")}return v}()}),(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"})]}),d.map(function(v){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:v.uploader_ckey}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:v.id}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"left",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"book"}),v.title]}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"left",children:v.author}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"left",children:v.report_description}),(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:v.reporter_ckey}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:[(0,e.createComponentVNode)(2,t.Button.Confirm,{content:"Delete",icon:"trash",onClick:function(){function C(){return u("delete_book",{bookid:v.id})}return C}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Unflag",icon:"flag",color:"caution",onClick:function(){function C(){return u("unflag_book",{bookid:v.id})}return C}()}),(0,e.createComponentVNode)(2,t.Button,{content:"View",onClick:function(){function C(){return u("view_book",{bookid:v.id})}return C}()})]})]},v.id)})]})})},g=function(c,m){var i=(0,a.useBackend)(m),u=i.act,s=i.data,d=s.ckey,v=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 ",d,(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 C(){return u("return")}return C}()}),(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"})]}),v.map(function(C){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:C.id}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"left",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"book"}),C.title]}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"left",children:C.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 h(){return u("delete_book",{bookid:C.id})}return h}()}),(0,e.createComponentVNode)(2,t.Button,{content:"View",onClick:function(){function h(){return u("view_book",{bookid:C.id})}return h}()})]})]},C.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),f=n(72253),b=n(92986),S=n(98595),B=r.ListInputModal=function(){function l(c,m){var i=(0,f.useBackend)(m),u=i.act,s=i.data,d=s.items,v=d===void 0?[]:d,C=s.message,h=C===void 0?"":C,p=s.init_value,N=s.timeout,V=s.title,y=(0,f.useLocalState)(m,"selected",v.indexOf(p)),I=y[0],L=y[1],w=(0,f.useLocalState)(m,"searchBarVisible",v.length>10),A=w[0],x=w[1],E=(0,f.useLocalState)(m,"searchQuery",""),P=E[0],D=E[1],M=function(){function G(X){var J=z.length-1;if(X===b.KEY_DOWN)if(I===null||I===J){var se;L(0),(se=document.getElementById("0"))==null||se.scrollIntoView()}else{var ie;L(I+1),(ie=document.getElementById((I+1).toString()))==null||ie.scrollIntoView()}else if(X===b.KEY_UP)if(I===null||I===0){var me;L(J),(me=document.getElementById(J.toString()))==null||me.scrollIntoView()}else{var q;L(I-1),(q=document.getElementById((I-1).toString()))==null||q.scrollIntoView()}}return G}(),R=function(){function G(X){X!==I&&L(X)}return G}(),O=function(){function G(){x(!1),x(!0)}return G}(),F=function(){function G(X){var J=String.fromCharCode(X),se=v.find(function(q){return q==null?void 0:q.toLowerCase().startsWith(J==null?void 0:J.toLowerCase())});if(se){var ie,me=v.indexOf(se);L(me),(ie=document.getElementById(me.toString()))==null||ie.scrollIntoView()}}return G}(),_=function(){function G(X){var J;X!==P&&(D(X),L(0),(J=document.getElementById("0"))==null||J.scrollIntoView())}return G}(),U=function(){function G(){x(!A),D("")}return G}(),z=v.filter(function(G){return G==null?void 0:G.toLowerCase().includes(P.toLowerCase())}),$=330+Math.ceil(h.length/3);return A||setTimeout(function(){var G;return(G=document.getElementById(I.toString()))==null?void 0:G.focus()},1),(0,e.createComponentVNode)(2,S.Window,{title:V,width:325,height:$,children:[N&&(0,e.createComponentVNode)(2,a.Loader,{value:N}),(0,e.createComponentVNode)(2,S.Window.Content,{onKeyDown:function(){function G(X){var J=window.event?X.which:X.keyCode;(J===b.KEY_DOWN||J===b.KEY_UP)&&(X.preventDefault(),M(J)),J===b.KEY_ENTER&&(X.preventDefault(),u("submit",{entry:z[I]})),!A&&J>=b.KEY_A&&J<=b.KEY_Z&&(X.preventDefault(),F(J)),J===b.KEY_ESCAPE&&(X.preventDefault(),u("cancel"))}return G}(),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 G(){return U()}return G}()}),className:"ListInput__Section",fill:!0,title:h,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:z,onClick:R,onFocusSearch:O,searchBarVisible:A,selected:I})}),(0,e.createComponentVNode)(2,o.Stack.Item,{m:0,children:A&&(0,e.createComponentVNode)(2,g,{filteredItems:z,onSearch:_,searchQuery:P,selected:I})}),(0,e.createComponentVNode)(2,o.Stack.Item,{mt:.5,children:(0,e.createComponentVNode)(2,t.InputButtons,{input:z[I]})})]})})})]})}return l}(),k=function(c,m){var i=(0,f.useBackend)(m),u=i.act,s=c.filteredItems,d=c.onClick,v=c.onFocusSearch,C=c.searchBarVisible,h=c.selected;return(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,tabIndex:0,children:s.map(function(p,N){return(0,e.createComponentVNode)(2,o.Button,{fluid:!0,color:"transparent",id:N,onClick:function(){function V(){return d(N)}return V}(),onDblClick:function(){function V(y){y.preventDefault(),u("submit",{entry:s[h]})}return V}(),onKeyDown:function(){function V(y){var I=window.event?y.which:y.keyCode;C&&I>=b.KEY_A&&I<=b.KEY_Z&&(y.preventDefault(),v())}return V}(),selected:N===h,style:{animation:"none",transition:"none"},children:p.replace(/^\w/,function(V){return V.toUpperCase()})},N)})})},g=function(c,m){var i=(0,f.useBackend)(m),u=i.act,s=c.filteredItems,d=c.onSearch,v=c.searchQuery,C=c.selected;return(0,e.createComponentVNode)(2,o.Input,{width:"100%",autoFocus:!0,autoSelect:!0,onEnter:function(){function h(p){p.preventDefault(),u("submit",{entry:s[C]})}return h}(),onInput:function(){function h(p,N){return d(N)}return h}(),placeholder:"Search...",value:v})}},26826:function(T,r,n){"use strict";r.__esModule=!0,r.Loadout=void 0;var e=n(89005),a=n(25328),t=n(72253),o=n(36036),f=n(98595),b={Default:function(){function c(m,i){return m.gear.gear_tier-i.gear.gear_tier}return c}(),Alphabetical:function(){function c(m,i){return m.gear.name.toLowerCase().localeCompare(i.gear.name.toLowerCase())}return c}(),Cost:function(){function c(m,i){return m.gear.cost-i.gear.cost}return c}()},S=r.Loadout=function(){function c(m,i){var u=(0,t.useBackend)(i),s=u.act,d=u.data,v=(0,t.useLocalState)(i,"search",!1),C=v[0],h=v[1],p=(0,t.useLocalState)(i,"searchText",""),N=p[0],V=p[1],y=(0,t.useLocalState)(i,"category",Object.keys(d.gears)[0]),I=y[0],L=y[1],w=(0,t.useLocalState)(i,"tweakedGear",""),A=w[0],x=w[1];return(0,e.createComponentVNode)(2,f.Window,{width:1105,height:650,children:[A&&(0,e.createComponentVNode)(2,l,{tweakedGear:A,setTweakedGear:x}),(0,e.createComponentVNode)(2,f.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,B,{category:I,setCategory:L})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"25%",children:(0,e.createComponentVNode)(2,g,{setTweakedGear:x})}),(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"75%",children:(0,e.createComponentVNode)(2,k,{category:I,search:C,setSearch:h,searchText:N,setSearchText:V})})]})})]})})]})}return c}(),B=function(m,i){var u=(0,t.useBackend)(i),s=u.act,d=u.data,v=m.category,C=m.setCategory;return(0,e.createComponentVNode)(2,o.Tabs,{fluid:!0,textAlign:"center",style:{"flex-wrap":"wrap-reverse"},children:Object.keys(d.gears).map(function(h){return(0,e.createComponentVNode)(2,o.Tabs.Tab,{selected:h===v,style:{"white-space":"nowrap"},onClick:function(){function p(){return C(h)}return p}(),children:h},h)})})},k=function(m,i){var u=(0,t.useBackend)(i),s=u.act,d=u.data,v=d.user_tier,C=d.gear_slots,h=d.max_gear_slots,p=m.category,N=m.search,V=m.setSearch,y=m.searchText,I=m.setSearchText,L=(0,t.useLocalState)(i,"sortType","Default"),w=L[0],A=L[1],x=(0,t.useLocalState)(i,"sortReverse",!1),E=x[0],P=x[1],D=(0,a.createSearch)(y,function(R){return R.name}),M;return y.length>2?M=Object.entries(d.gears).reduce(function(R,O){var F=O[0],_=O[1];return R.concat(Object.entries(_).map(function(U){var z=U[0],$=U[1];return{key:z,gear:$}}))},[]).filter(function(R){var O=R.gear;return D(O)}):M=Object.entries(d.gears[p]).map(function(R){var O=R[0],F=R[1];return{key:O,gear:F}}),M.sort(b[w]),E&&(M=M.reverse()),(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:p,buttons:(0,e.createComponentVNode)(2,o.Stack,{children:[(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Dropdown,{height:1.66,selected:w,options:Object.keys(b),onSelected:function(){function R(O){return A(O)}return R}()})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Button,{icon:E?"arrow-down-wide-short":"arrow-down-short-wide",tooltip:E?"Ascending order":"Descending order",tooltipPosition:"bottom-end",onClick:function(){function R(){return P(!E)}return R}()})}),N&&(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Input,{width:20,placeholder:"Search...",value:y,onInput:function(){function R(O){return I(O.target.value)}return R}()})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Button,{icon:"magnifying-glass",selected:N,tooltip:"Toggle search field",tooltipPosition:"bottom-end",onClick:function(){function R(){V(!N),I("")}return R}()})})]}),children:M.map(function(R){var O=R.key,F=R.gear,_=12,U=Object.keys(d.selected_gears).includes(O),z=F.cost===1?F.cost+" Point":F.cost+" Points",$=(0,e.createComponentVNode)(2,o.Box,{children:[F.name.length>_&&(0,e.createComponentVNode)(2,o.Box,{children:F.name}),F.gear_tier>v&&(0,e.createComponentVNode)(2,o.Box,{mt:F.name.length>_&&1.5,textColor:"red",children:"That gear is only available at a higher donation tier than you are on."})]}),G=(0,e.createFragment)([F.allowed_roles&&(0,e.createComponentVNode)(2,o.Button,{width:"22px",color:"transparent",icon:"user",tooltip:(0,e.createComponentVNode)(2,o.Section,{m:-1,title:"Allowed Roles",children:F.allowed_roles.map(function(J){return(0,e.createComponentVNode)(2,o.Box,{children:J},J)})}),tooltipPosition:"left"}),Object.entries(F.tweaks).map(function(J){var se=J[0],ie=J[1];return ie.map(function(me){return(0,e.createComponentVNode)(2,o.Button,{width:"22px",color:"transparent",icon:me.icon,tooltip:me.tooltip,tooltipPosition:"top"},se)})}),(0,e.createComponentVNode)(2,o.Button,{width:"22px",color:"transparent",icon:"info",tooltip:F.desc,tooltipPosition:"top"})],0),X=(0,e.createComponentVNode)(2,o.Box,{class:"Loadout-InfoBox",children:[(0,e.createComponentVNode)(2,o.Box,{style:{"flex-grow":1},fontSize:1,color:"gold",opacity:.75,children:F.gear_tier>0&&"Tier "+F.gear_tier}),(0,e.createComponentVNode)(2,o.Box,{fontSize:.75,opacity:.66,children:z})]});return(0,e.createComponentVNode)(2,o.ImageButton,{m:.5,imageSize:84,dmIcon:F.icon,dmIconState:F.icon_state,tooltip:(F.name.length>_||F.gear_tier>0)&&$,tooltipPosition:"bottom",selected:U,disabled:F.gear_tier>v||C+F.cost>h&&!U,buttons:G,buttonsAlt:X,onClick:function(){function J(){return s("toggle_gear",{gear:O})}return J}(),children:F.name},O)})})},g=function(m,i){var u=(0,t.useBackend)(i),s=u.act,d=u.data,v=m.setTweakedGear,C=Object.entries(d.gears).reduce(function(h,p){var N=p[0],V=p[1],y=Object.entries(V).filter(function(I){var L=I[0];return Object.keys(d.selected_gears).includes(L)}).map(function(I){var L=I[0],w=I[1];return Object.assign({key:L},w)});return h.concat(y)},[]);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,{fill:!0,scrollable:!0,title:"Selected Equipment",buttons:(0,e.createComponentVNode)(2,o.Button.Confirm,{icon:"trash",tooltip:"Clear Loadout",tooltipPosition:"bottom-end",onClick:function(){function h(){return s("clear_loadout")}return h}()}),children:C.map(function(h){return(0,e.createComponentVNode)(2,o.ImageButton,{fluid:!0,imageSize:32,dmIcon:h.icon,dmIconState:h.icon_state,buttons:(0,e.createFragment)([Object.entries(h.tweaks).length>0&&(0,e.createComponentVNode)(2,o.Button,{translucent:!0,icon:"gears",iconColor:"gray",width:"33px",onClick:function(){function p(){return v(h)}return p}()}),(0,e.createComponentVNode)(2,o.Button,{translucent:!0,icon:"times",iconColor:"red",width:"32px",onClick:function(){function p(){return s("toggle_gear",{gear:h.key})}return p}()})],0),children:h.name},h.key)})})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Section,{children:(0,e.createComponentVNode)(2,o.ProgressBar,{value:d.gear_slots,maxValue:d.max_gear_slots,ranges:{bad:[d.max_gear_slots,1/0],average:[d.max_gear_slots*.66,d.max_gear_slots],good:[0,d.max_gear_slots*.66]},children:(0,e.createComponentVNode)(2,o.Box,{textAlign:"center",children:["Used points ",d.gear_slots,"/",d.max_gear_slots]})})})})]})},l=function(m,i){var u=(0,t.useBackend)(i),s=u.act,d=u.data,v=m.tweakedGear,C=m.setTweakedGear;return(0,e.createComponentVNode)(2,o.Dimmer,{children:(0,e.createComponentVNode)(2,o.Box,{className:"Loadout-Modal__background",children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,width:20,height:20,title:v.name,buttons:(0,e.createComponentVNode)(2,o.Button,{color:"red",icon:"times",tooltip:"Close",tooltipPosition:"top",onClick:function(){function h(){return C("")}return h}()}),children:(0,e.createComponentVNode)(2,o.LabeledList,{children:Object.entries(v.tweaks).map(function(h){var p=h[0],N=h[1];return N.map(function(V){var y=d.selected_gears[v.key][p];return(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:V.name,color:y?"":"gray",buttons:(0,e.createComponentVNode)(2,o.Button,{color:"transparent",icon:"pen",onClick:function(){function I(){return s("set_tweak",{gear:v.key,tweak:p})}return I}()}),children:[y||"Default",(0,e.createComponentVNode)(2,o.Box,{inline:!0,ml:1,width:1,height:1,verticalAlign:"middle",style:{"background-color":""+y}})]},p)})})})})})})}},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),f=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 D(M,R){return P("configure",{key:w,value:R,ref:x})}return D}()})},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 D(){return P("configure",{key:w,value:!A,ref:x})}return D}()})},S=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 D(){return P("configure",{key:w,ref:x})}return D}()}),(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),D=P.act;return(0,e.createComponentVNode)(2,t.Dropdown,{displayText:A,options:x,onSelected:function(){function M(R){return D("configure",{key:w,value:R,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,D=I.module_ref,M={number:(0,e.normalizeProps)((0,e.createComponentVNode)(2,f,Object.assign({},I))),bool:(0,e.normalizeProps)((0,e.createComponentVNode)(2,b,Object.assign({},I))),color:(0,e.normalizeProps)((0,e.createComponentVNode)(2,S,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]]})},g=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})})]})},l=function(I,L){var w=I.active,A=I.userhealth,x=I.usermaxhealth,E=I.userbrute,P=I.userburn,D=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?D/x:0,ranges:{good:[-1/0,.2],average:[.2,.5],bad:[.5,1/0]},children:(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:w?D: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,D=I.statusbrute,M=I.statusburn,R=I.statustoxin,O=I.statusoxy,F=I.statustemp,_=I.statusnutrition,U=I.statusfingerprints,z=I.statusdna,$=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?D/P:0,ranges:{good:[-1/0,.2],average:[.2,.5],bad:[.5,1/0]},children:(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:w?D: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?R/P:0,ranges:{good:[-1/0,.2],average:[.2,.5],bad:[.5,1/0]},children:(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:R})})})}),(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?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,{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?_: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?z:"???"})]})}),!!w&&!!$&&(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"})})]}),$.map(function(G){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:G.name}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:G.type}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:[G.stage,"/",G.maxstage]}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:G.cure})]},G.name)})]})})],0)},m={rad_counter:g,health_analyzer:l,status_readout:c},i=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"})]})},u=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"})})})]})})},d=function(I){switch(I){case 1:return"Use";case 2:return"Toggle";case 3:return"Select"}},v=function(I,L){var w=(0,a.useBackend)(L),A=w.act,x=w.data,E=x.active,P=x.malfunctioning,D=x.locked,M=x.open,R=x.selected_module,O=x.complexity,F=x.complexity_max,_=x.wearer_name,U=x.wearer_job,z=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 $(){return A("activate")}return $}()}),children:z}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"ID Lock",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:D?"lock-open":"lock",content:D?"Unlock":"Lock",onClick:function(){function $(){return A("lock")}return $}()}),children:D?"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:R||"None"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Complexity",children:[O," (",F,")"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Occupant",children:[_,", ",U]})]})})},C=function(I,L){var w=(0,a.useBackend)(L),A=w.act,x=w.data,E=x.active,P=x.control,D=x.helmet,M=x.chestplate,R=x.gauntlets,O=x.boots,F=x.core,_=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:D||"None"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Chestplate",children:M||"None"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Gauntlets",children:R||"None"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Boots",children:O||"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:_/100,content:_+"%",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"})})]})},h=function(I,L){var w=(0,a.useBackend)(L),A=w.act,x=w.data,E=x.active,P=x.modules,D=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:D.length!==0&&D.map(function(M){var R=m[M.id];return(0,e.createComponentVNode)(2,t.Stack.Item,{children:[!E&&(0,e.createComponentVNode)(2,u),(0,e.normalizeProps)((0,e.createComponentVNode)(2,R,Object.assign({},M,{active:E})))]},M.ref)})||(0,e.createComponentVNode)(2,t.Box,{textAlign:"center",children:"No Info Modules Detected"})})})},p=function(I,L){var w=(0,a.useBackend)(L),A=w.act,x=w.data,E=x.complexity_max,P=x.modules,D=(0,a.useLocalState)(L,"module_configuration",null),M=D[0],R=D[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(O){return(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Collapsible,{title:O.module_name,children:(0,e.createComponentVNode)(2,t.Section,{children:[M===O.ref&&(0,e.createComponentVNode)(2,s,{configuration_data:O.configuration_data,module_ref:O.ref,onExit:function(){function F(){return R(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:[O.module_complexity,"/",E]}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:O.idle_power}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:O.active_power}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:O.use_power}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:[O.cooldown>0&&O.cooldown/10||"0","/",O.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:O.ref})}return F}(),icon:"bullseye",selected:O.module_active,tooltip:d(O.module_type),tooltipPosition:"left",disabled:!O.module_type}),(0,e.createComponentVNode)(2,t.Button,{onClick:function(){function F(){return R(O.ref)}return F}(),icon:"cog",selected:M===O.ref,tooltip:"Configure",tooltipPosition:"left",disabled:O.configuration_data.length===0}),(0,e.createComponentVNode)(2,t.Button,{onClick:function(){function F(){return A("pin",{ref:O.ref})}return F}(),icon:"thumbtack",selected:O.pinned,tooltip:"Pin",tooltipPosition:"left",disabled:!O.module_type})]})]})]}),(0,e.createComponentVNode)(2,t.Box,{children:O.description})]})})},O.ref)})||(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Box,{textAlign:"center",children:"No Modules Detected"})})})})},N=r.MODsuitContent=function(){function y(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,i)||(0,e.createComponentVNode)(2,t.Stack,{vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,v)}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,C)}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,h)}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,p)})]})})}return y}(),V=r.MODsuit=function(){function y(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,N)})})})}return y}()},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),f=n(98595),b=n(3939),S=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(g,l){var c=(0,t.useBackend)(l),m=c.act,i=c.data,u=i.autolink,s=i.code,d=i.frequency,v=i.linkedMagnets,C=i.magnetConfiguration,h=i.path,p=i.pathPosition,N=i.probing,V=i.powerState,y=i.speed;return(0,e.createComponentVNode)(2,f.Window,{width:400,height:600,children:[(0,e.createComponentVNode)(2,b.ComplexModal),(0,e.createComponentVNode)(2,f.Window.Content,{scrollable:!0,children:[!u&&(0,e.createComponentVNode)(2,o.Section,{buttons:(0,e.createComponentVNode)(2,o.Button,{content:"Probe",icon:N?"spinner":"sync",iconSpin:!!N,disabled:N,onClick:function(){function I(){return m("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)(d/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 m("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:y.value,minValue:y.min,maxValue:y.max,onChange:function(){function I(L,w){return m("set_speed",{speed:w})}return I}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Path",children:[Array.from(S.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 m("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 m("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)(l,"path_custom_input")}return I}()}),(0,e.createComponentVNode)(2,o.BlockQuote,{children:h.map(function(I,L){var w=S.get(I)||{icon:"question"},A=w.icon,x=w.tooltip;return(0,e.createComponentVNode)(2,o.Button.Confirm,{selected:L+2===p,icon:A,confirmIcon:A,confirmContent:"",tooltip:x,onClick:function(){function E(){return m("path_remove",{index:L+1,code:I})}return E}()},L)})})]})]})}),v.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 m("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:C.electricityLevel.min,maxValue:C.electricityLevel.max,onChange:function(){function P(D,M){return m("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:C.magneticField.min,maxValue:C.magneticField.max,onChange:function(){function P(D,M){return m("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),f=r.MechBayConsole=function(){function b(S,B){var k=(0,a.useBackend)(B),g=k.act,l=k.data,c=l.recharge_port,m=c&&c.mech,i=m&&m.cell,u=m&&m.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:u?"Mech status: "+u:"Mech status",textAlign:"center",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"sync",content:"Sync",onClick:function(){function s(){return g("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."})||!m&&(0,e.createComponentVNode)(2,t.NoticeBox,{children:"No mech detected."})||(0,e.createComponentVNode)(2,t.ProgressBar,{value:m.health/m.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."})||!m&&(0,e.createComponentVNode)(2,t.NoticeBox,{children:"No mech detected."})||!i&&(0,e.createComponentVNode)(2,t.NoticeBox,{children:"No cell is installed."})||(0,e.createComponentVNode)(2,t.ProgressBar,{value:i.charge/i.maxcharge,ranges:{good:[.7,1/0],average:[.3,.7],bad:[-1/0,.3]},children:[(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:i.charge})," / "+i.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),f=n(98595),b=n(25328),S=r.MechaControlConsole=function(){function B(k,g){var l=(0,t.useBackend)(g),c=l.act,m=l.data,i=m.beacons,u=m.stored_data;return u.length?(0,e.createComponentVNode)(2,f.Window,{width:420,height:500,children:(0,e.createComponentVNode)(2,f.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:u.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,f.Window,{width:420,height:500,children:(0,e.createComponentVNode)(2,f.Window.Content,{scrollable:!0,children:i.length&&i.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 d(){return c("send_message",{mt:s.uid})}return d}(),children:"Message"}),(0,e.createComponentVNode)(2,o.Button,{icon:"eye",onClick:function(){function d(){return c("get_log",{mt:s.uid})}return d}(),children:"View Log"}),(0,e.createComponentVNode)(2,o.Button.Confirm,{color:"red",content:"Sabotage",icon:"bomb",onClick:function(){function d(){return c("shock",{mt:s.uid})}return d}()})],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),f=n(3939),b=n(98595),S=n(321),B=n(5485),k=n(22091),g={Minor:"lightgray",Medium:"good",Harmful:"average","Dangerous!":"bad","BIOHAZARD THREAT!":"darkred"},l={"*Deceased*":"deceased","*SSD*":"ssd","Physically Unfit":"physically_unfit",Disabled:"disabled"},c=function(A,x){(0,f.modalOpen)(A,"edit",{field:x.edit,value:x.value})},m=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:g[E.severity],children:E.severity})]})})})},i=r.MedicalRecords=function(){function w(A,x){var E=(0,t.useBackend)(x),P=E.data,D=P.loginState,M=P.screen;if(!D.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 R;return M===2?R=(0,e.createComponentVNode)(2,u):M===3?R=(0,e.createComponentVNode)(2,s):M===4?R=(0,e.createComponentVNode)(2,d):M===5?R=(0,e.createComponentVNode)(2,p):M===6?R=(0,e.createComponentVNode)(2,N):M===7&&(R=(0,e.createComponentVNode)(2,V)),(0,e.createComponentVNode)(2,b.Window,{width:800,height:900,children:[(0,e.createComponentVNode)(2,f.ComplexModal),(0,e.createComponentVNode)(2,b.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,S.LoginInfo),(0,e.createComponentVNode)(2,k.TemporaryNotice),(0,e.createComponentVNode)(2,L),R]})})]})}return w}(),u=function(A,x){var E=(0,t.useBackend)(x),P=E.act,D=E.data,M=D.records,R=(0,t.useLocalState)(x,"searchText",""),O=R[0],F=R[1],_=(0,t.useLocalState)(x,"sortId","name"),U=_[0],z=_[1],$=(0,t.useLocalState)(x,"sortOrder",!0),G=$[0],X=$[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 J(){return P("screen",{screen:3})}return J}()})}),(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 J(se,ie){return F(ie)}return J}()})})]})}),(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,y,{id:"name",children:"Name"}),(0,e.createComponentVNode)(2,y,{id:"id",children:"ID"}),(0,e.createComponentVNode)(2,y,{id:"rank",children:"Assignment"}),(0,e.createComponentVNode)(2,y,{id:"p_stat",children:"Patient Status"}),(0,e.createComponentVNode)(2,y,{id:"m_stat",children:"Mental Status"})]}),M.filter((0,a.createSearch)(O,function(J){return J.name+"|"+J.id+"|"+J.rank+"|"+J.p_stat+"|"+J.m_stat})).sort(function(J,se){var ie=G?1:-1;return J[U].localeCompare(se[U])*ie}).map(function(J){return(0,e.createComponentVNode)(2,o.Table.Row,{className:"MedicalRecords__listRow--"+l[J.p_stat],onClick:function(){function se(){return P("view_record",{view_record:J.ref})}return se}(),children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:[(0,e.createComponentVNode)(2,o.Icon,{name:"user"})," ",J.name]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:J.id}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:J.rank}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:J.p_stat}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:J.m_stat})]},J.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 D(){return P("del_all_med_records")}return D}()})})]})})},d=function(A,x){var E=(0,t.useBackend)(x),P=E.act,D=E.data,M=D.medical,R=D.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:R?"spinner":"print",disabled:R,iconSpin:!!R,content:"Print Record",ml:"0.5rem",onClick:function(){function O(){return P("print_record")}return O}()}),children:(0,e.createComponentVNode)(2,v)})}),!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 O(){return P("new_med_record")}return O}()}),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 O(){return P("del_med_record")}return O}()}),children:(0,e.createComponentVNode)(2,C)})}),(0,e.createComponentVNode)(2,h)],4)],0)},v=function(A,x){var E=(0,t.useBackend)(x),P=E.data,D=P.general;return!D||!D.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:D.fields.map(function(M,R){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 O(){return c(x,M)}return O}()})]},R)})})}),!!D.has_photos&&D.photos.map(function(M,R){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 #",R+1]},R)})]})},C=function(A,x){var E=(0,t.useBackend)(x),P=E.act,D=E.data,M=D.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(R,O){return(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:R.field,preserveWhitespace:!0,children:[(0,a.decodeHtmlEntities)(R.value),!!R.edit&&(0,e.createComponentVNode)(2,o.Button,{icon:"pen",ml:"0.5rem",mb:R.line_break?"1rem":"initial",onClick:function(){function F(){return c(x,R)}return F}()})]},O)})})})})},h=function(A,x){var E=(0,t.useBackend)(x),P=E.act,D=E.data,M=D.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 R(){return(0,f.modalOpen)(x,"add_comment")}return R}()}),children:M.comments.length===0?(0,e.createComponentVNode)(2,o.Box,{color:"label",children:"No comments found."}):M.comments.map(function(R,O){return(0,e.createComponentVNode)(2,o.Box,{children:[(0,e.createComponentVNode)(2,o.Box,{color:"label",inline:!0,children:R.header}),(0,e.createVNode)(1,"br"),R.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:O+1})}return F}()})]},O)})})})},p=function(A,x){var E=(0,t.useBackend)(x),P=E.act,D=E.data,M=D.virus,R=(0,t.useLocalState)(x,"searchText",""),O=R[0],F=R[1],_=(0,t.useLocalState)(x,"sortId2","name"),U=_[0],z=_[1],$=(0,t.useLocalState)(x,"sortOrder2",!0),G=$[0],X=$[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 J(se,ie){return F(ie)}return J}()})}),(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)(O,function(J){return J.name+"|"+J.max_stages+"|"+J.severity})).sort(function(J,se){var ie=G?1:-1;return J[U].localeCompare(se[U])*ie}).map(function(J){return(0,e.createComponentVNode)(2,o.Table.Row,{className:"MedicalRecords__listVirus--"+J.severity,onClick:function(){function se(){return P("vir",{vir:J.D})}return se}(),children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:[(0,e.createComponentVNode)(2,o.Icon,{name:"virus"})," ",J.name]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:J.max_stages}),(0,e.createComponentVNode)(2,o.Table.Cell,{color:g[J.severity],children:J.severity})]},J.id)})]})})})})],4)},N=function(A,x){var E=(0,t.useBackend)(x),P=E.act,D=E.data,M=D.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(R){return(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Section,{title:R.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:R.delivered,minValue:0,maxValue:R.deliverygoal,ranges:{good:[R.deliverygoal*.5,1/0],average:[R.deliverygoal*.25,R.deliverygoal*.5],bad:[-1/0,R.deliverygoal*.25]},children:[R.delivered," / ",R.deliverygoal," Units"]})})})}),(0,e.createComponentVNode)(2,o.Box,{children:R.report})]})},R.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,D=E.data,M=D.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(R){return(0,e.createComponentVNode)(2,o.Table.Row,{className:"MedicalRecords__listMedbot--"+R.on,children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:[(0,e.createComponentVNode)(2,o.Icon,{name:"medical"})," ",R.name]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:[R.area||"Unknown"," (",R.x,", ",R.y,")"]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:R.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:R.use_beaker?"Reservoir: "+R.total_volume+"/"+R.maximum_volume:"Using internal synthesizer"})]},R.id)})]})})})},y=function(A,x){var E=(0,t.useLocalState)(x,"sortId","name"),P=E[0],D=E[1],M=(0,t.useLocalState)(x,"sortOrder",!0),R=M[0],O=M[1],F=A.id,_=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?O(!R):(D(F),O(!0))}return U}(),children:[_,P===F&&(0,e.createComponentVNode)(2,o.Icon,{name:R?"sort-up":"sort-down",ml:"0.25rem;"})]})})},I=function(A,x){var E=(0,t.useLocalState)(x,"sortId2","name"),P=E[0],D=E[1],M=(0,t.useLocalState)(x,"sortOrder2",!0),R=M[0],O=M[1],F=A.id,_=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?O(!R):(D(F),O(!0))}return U}(),children:[_,P===F&&(0,e.createComponentVNode)(2,o.Icon,{name:R?"sort-up":"sort-down",ml:"0.25rem;"})]})})},L=function(A,x){var E=(0,t.useBackend)(x),P=E.act,D=E.data,M=D.screen,R=D.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 O(){P("screen",{screen:2})}return O}(),children:"List Records"}),(0,e.createComponentVNode)(2,o.Tabs.Tab,{icon:"database",selected:M===5,onClick:function(){function O(){P("screen",{screen:5})}return O}(),children:"Virus Database"}),(0,e.createComponentVNode)(2,o.Tabs.Tab,{icon:"vial",selected:M===6,onClick:function(){function O(){P("screen",{screen:6})}return O}(),children:"Virology Goals"}),(0,e.createComponentVNode)(2,o.Tabs.Tab,{icon:"plus-square",selected:M===7,onClick:function(){function O(){return P("screen",{screen:7})}return O}(),children:"Medibot Tracking"}),M===3&&(0,e.createComponentVNode)(2,o.Tabs.Tab,{icon:"wrench",selected:M===3,children:"Record Maintenance"}),M===4&&R&&!R.empty&&(0,e.createComponentVNode)(2,o.Tabs.Tab,{icon:"file",selected:M===4,children:["Record: ",R.fields[0].value]})]})})};(0,f.modalRegisterBodyOverride)("virus",m)},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),f=function(g,l){var c=(0,a.useBackend)(l),m=c.act,i=c.data,u=g.product,s=g.productImage,d=g.productCategory,v=i.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:u.name}),(0,e.createComponentVNode)(2,t.Table.Cell,{collapsing:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{disabled:u.price>v,icon:"shopping-cart",content:u.price,textAlign:"left",onClick:function(){function C(){return m("purchase",{name:u.name,category:d})}return C}()})})]})},b=function(g,l){var c=(0,a.useBackend)(l),m=c.data,i=(0,a.useLocalState)(l,"tabIndex",1),u=i[0],s=m.products,d=m.imagelist,v=["apparel","toy","decoration"];return(0,e.createComponentVNode)(2,t.Table,{children:s[v[u]].map(function(C){return(0,e.createComponentVNode)(2,f,{product:C,productImage:d[C.path],productCategory:v[u]},C.name)})})},S=r.MerchVendor=function(){function k(g,l){var c=(0,a.useBackend)(l),m=c.act,i=c.data,u=i.user_cash,s=i.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 d(){return m("change")}return d}()})],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.",u!==null&&(0,e.createComponentVNode)(2,t.Box,{mt:"0.5rem",children:["Your balance is ",(0,e.createVNode)(1,"b",null,[u||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(g,l){var c=(0,a.useBackend)(l),m=c.data,i=(0,a.useLocalState)(l,"tabIndex",1),u=i[0],s=i[1],d=m.login_state;return(0,e.createComponentVNode)(2,t.Tabs,{children:[(0,e.createComponentVNode)(2,t.Tabs.Tab,{icon:"dice",selected:u===1,onClick:function(){function v(){return s(1)}return v}(),children:"Toys"}),(0,e.createComponentVNode)(2,t.Tabs.Tab,{icon:"flag",selected:u===2,onClick:function(){function v(){return s(2)}return v}(),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),f=n(98595),b=["title","items","gridLayout"];function S(i,u){if(i==null)return{};var s={};for(var d in i)if({}.hasOwnProperty.call(i,d)){if(u.includes(d))continue;s[d]=i[d]}return s}var B={Alphabetical:function(){function i(u,s){return u-s}return i}(),Availability:function(){function i(u,s){return-(u.affordable-s.affordable)}return i}(),Price:function(){function i(u,s){return u.price-s.price}return i}()},k=r.MiningVendor=function(){function i(u,s){var d=(0,t.useLocalState)(s,"gridLayout",!1),v=d[0],C=d[1];return(0,e.createComponentVNode)(2,f.Window,{width:400,height:525,children:(0,e.createComponentVNode)(2,f.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,g),(0,e.createComponentVNode)(2,c,{gridLayout:v,setGridLayout:C}),(0,e.createComponentVNode)(2,l,{gridLayout:v})]})})})}return i}(),g=function(u,s){var d=(0,t.useBackend)(s),v=d.act,C=d.data,h=C.has_id,p=C.id;return(0,e.createComponentVNode)(2,o.NoticeBox,{success:h,children:h?(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Box,{inline:!0,verticalAlign:"middle",style:{float:"left"},children:["Logged in as ",p.name,".",(0,e.createVNode)(1,"br"),"You have ",p.points.toLocaleString("en-US")," points."]}),(0,e.createComponentVNode)(2,o.Button,{icon:"eject",content:"Eject ID",style:{float:"right"},onClick:function(){function N(){return v("logoff")}return N}()}),(0,e.createComponentVNode)(2,o.Box,{style:{clear:"both"}})],4):"Please insert an ID in order to make purchases."})},l=function(u,s){var d=(0,t.useBackend)(s),v=d.act,C=d.data,h=C.has_id,p=C.id,N=C.items,V=u.gridLayout,y=(0,t.useLocalState)(s,"search",""),I=y[0],L=y[1],w=(0,t.useLocalState)(s,"sort","Alphabetical"),A=w[0],x=w[1],E=(0,t.useLocalState)(s,"descending",!1),P=E[0],D=E[1],M=(0,a.createSearch)(I,function(F){return F[0]}),R=!1,O=Object.entries(N).map(function(F,_){var U=Object.entries(F[1]).filter(M).map(function(z){return z[1].affordable=h&&p.points>=z[1].price,z[1]}).sort(B[A]);if(U.length!==0)return P&&(U=U.reverse()),R=!0,(0,e.createComponentVNode)(2,m,{title:F[0],items:U,gridLayout:V},F[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:R?O:(0,e.createComponentVNode)(2,o.Box,{color:"label",children:"No items matching your criteria was found!"})})})},c=function(u,s){var d=u.gridLayout,v=u.setGridLayout,C=(0,t.useLocalState)(s,"search",""),h=C[0],p=C[1],N=(0,t.useLocalState)(s,"sort",""),V=N[0],y=N[1],I=(0,t.useLocalState)(s,"descending",!1),L=I[0],w=I[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 A(x,E){return p(E)}return A}()})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Button,{icon:d?"list":"table-cells-large",height:1.75,tooltip:d?"Toggle List Layout":"Toggle Grid Layout",tooltipPosition:"bottom-start",onClick:function(){function A(){return v(!d)}return A}()})}),(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 A(x){return y(x)}return A}()})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Button,{icon:L?"arrow-down":"arrow-up",height:1.75,tooltip:L?"Descending order":"Ascending order",tooltipPosition:"bottom-start",onClick:function(){function A(){return w(!L)}return A}()})})]})})},m=function(u,s){var d=(0,t.useBackend)(s),v=d.act,C=d.data,h=u.title,p=u.items,N=u.gridLayout,V=S(u,b);return(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Collapsible,Object.assign({open:!0,title:h},V,{children:p.map(function(y){return N?(0,e.createComponentVNode)(2,o.ImageButton,{mb:.5,imageSize:57.5,dmIcon:y.icon,dmIconState:y.icon_state,disabled:!C.has_id||C.id.points0&&(0,e.createComponentVNode)(2,o.Box,{className:"Newscaster__menuButton--unread",children:ae>=10?"9+":ae})}),(0,e.createComponentVNode)(2,s,{icon:"briefcase",title:"Job Openings",selected:O===1,onClick:function(){function le(){return x("jobs")}return le}()}),(0,e.createComponentVNode)(2,o.Divider)]}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:F.map(function(le){return(0,e.createComponentVNode)(2,s,{icon:le.icon,title:le.name,selected:O===2&&F[U-1]===le,onClick:function(){function Z(){return x("channel",{uid:le.uid})}return Z}(),children:le.unread>0&&(0,e.createComponentVNode)(2,o.Box,{className:"Newscaster__menuButton--unread",children:le.unread>=10?"9+":le.unread})},le)})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:[(0,e.createComponentVNode)(2,o.Divider),(!!P||!!D)&&(0,e.createFragment)([(0,e.createComponentVNode)(2,s,{security:!0,icon:"exclamation-circle",title:"Edit Wanted Notice",mb:"0.5rem",onClick:function(){function le(){return(0,S.modalOpen)(w,"wanted_notice")}return le}()}),(0,e.createComponentVNode)(2,s,{security:!0,icon:me?"minus-square":"minus-square-o",title:"Censor Mode: "+(me?"On":"Off"),mb:"0.5rem",onClick:function(){function le(){return q(!me)}return le}()}),(0,e.createComponentVNode)(2,o.Divider)],4),(0,e.createComponentVNode)(2,s,{icon:"pen-alt",title:"New Story",mb:"0.5rem",onClick:function(){function le(){return(0,S.modalOpen)(w,"create_story")}return le}()}),(0,e.createComponentVNode)(2,s,{icon:"plus-circle",title:"New Channel",onClick:function(){function le(){return(0,S.modalOpen)(w,"create_channel")}return le}()}),(0,e.createComponentVNode)(2,o.Divider),(0,e.createComponentVNode)(2,s,{icon:R?"spinner":"print",iconSpin:R,title:R?"Printing...":"Print Newspaper",onClick:function(){function le(){return x("print_newspaper")}return le}()}),(0,e.createComponentVNode)(2,s,{icon:M?"volume-mute":"volume-up",title:"Mute: "+(M?"On":"Off"),onClick:function(){function le(){return x("toggle_mute")}return le}()})]})]})}),(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,width:"100%",children:[(0,e.createComponentVNode)(2,B.TemporaryNotice),re]})]})})]})}return I}(),s=function(L,w){var A=(0,t.useBackend)(w),x=A.act,E=L.icon,P=E===void 0?"":E,D=L.iconSpin,M=L.selected,R=M===void 0?!1:M,O=L.security,F=O===void 0?!1:O,_=L.onClick,U=L.title,z=L.children,$=l(L,k);return(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Box,Object.assign({className:(0,a.classes)(["Newscaster__menuButton",R&&"Newscaster__menuButton--selected",F&&"Newscaster__menuButton--security"]),onClick:_},$,{children:[R&&(0,e.createComponentVNode)(2,o.Box,{className:"Newscaster__menuButton--selectedBar"}),(0,e.createComponentVNode)(2,o.Icon,{name:P,spin:D,size:"2"}),(0,e.createComponentVNode)(2,o.Box,{className:"Newscaster__menuButton--title",children:U}),z]})))},d=function(L,w){var A=(0,t.useBackend)(w),x=A.act,E=A.data,P=E.screen,D=E.is_admin,M=E.channel_idx,R=E.channel_can_manage,O=E.channels,F=E.stories,_=E.wanted,U=(0,t.useLocalState)(w,"fullStories",[]),z=U[0],$=U[1],G=(0,t.useLocalState)(w,"censorMode",!1),X=G[0],J=G[1],se=P===2&&M>-1?O[M-1]:null;return(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[!!_&&(0,e.createComponentVNode)(2,C,{story:_,wanted:!0}),(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Icon,{name:se?se.icon:"newspaper",mr:"0.5rem"}),se?se.name:"Headlines"],0),children:F.length>0?F.slice().reverse().map(function(ie){return!z.includes(ie.uid)&&ie.body.length+3>c?Object.assign({},ie,{body_short:ie.body.substr(0,c-4)+"..."}):ie}).map(function(ie,me){return(0,e.createComponentVNode)(2,C,{story:ie},me)}):(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."]})}),!!se&&(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)([X&&(0,e.createComponentVNode)(2,o.Button,{disabled:!!se.admin&&!D,selected:se.censored,icon:se.censored?"comment-slash":"comment",content:se.censored?"Uncensor Channel":"Censor Channel",mr:"0.5rem",onClick:function(){function ie(){return x("censor_channel",{uid:se.uid})}return ie}()}),(0,e.createComponentVNode)(2,o.Button,{disabled:!R,icon:"cog",content:"Manage",onClick:function(){function ie(){return(0,S.modalOpen)(w,"manage_channel",{uid:se.uid})}return ie}()})],0),children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Description",children:se.description||"N/A"}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Owner",children:se.author||"N/A"}),!!D&&(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Ckey",children:se.author_ckey}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Public",children:se.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(ie,me){return ie+me.view_count},0).toLocaleString()]})]})})]})},v=function(L,w){var A=(0,t.useBackend)(w),x=A.act,E=A.data,P=E.jobs,D=E.wanted,M=Object.entries(P).reduce(function(R,O){var F=O[0],_=O[1];return R+_.length},0);return(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[!!D&&(0,e.createComponentVNode)(2,C,{story:D,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?m.map(function(R){return Object.assign({},i[R],{id:R,jobs:P[R]})}).filter(function(R){return!!R&&R.jobs.length>0}).map(function(R){return(0,e.createComponentVNode)(2,o.Section,{className:(0,a.classes)(["Newscaster__jobCategory","Newscaster__jobCategory--"+R.id]),title:R.title,buttons:(0,e.createComponentVNode)(2,o.Box,{mt:"0.25rem",color:"label",children:R.fluff_text}),children:R.jobs.map(function(O){return(0,e.createComponentVNode)(2,o.Box,{class:(0,a.classes)(["Newscaster__jobOpening",!!O.is_command&&"Newscaster__jobOpening--command"]),children:["\u2022 ",O.title]},O.title)})},R.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."})]})]})},C=function(L,w){var A=(0,t.useBackend)(w),x=A.act,E=A.data,P=L.story,D=L.wanted,M=D===void 0?!1:D,R=E.is_admin,O=(0,t.useLocalState)(w,"fullStories",[]),F=O[0],_=O[1],U=(0,t.useLocalState)(w,"censorMode",!1),z=U[0],$=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&&z&&(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 G(){return x("censor_story",{uid:P.uid})}return G}()})}),(0,e.createComponentVNode)(2,o.Box,{inline:!0,children:[(0,e.createComponentVNode)(2,o.Icon,{name:"user"})," ",P.author," |\xA0",!!R&&(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,f.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,h,{name:"story_photo_"+P.uid+".png",float:"right",ml:"0.5rem"}),(P.body_short||P.body).split("\n").map(function(G,X){return(0,e.createComponentVNode)(2,o.Box,{children:G||(0,e.createVNode)(1,"br")},X)}),P.body_short&&(0,e.createComponentVNode)(2,o.Button,{content:"Read more..",mt:"0.5rem",onClick:function(){function G(){return _([].concat(F,[P.uid]))}return G}()}),(0,e.createComponentVNode)(2,o.Box,{clear:"right"})],0)})})},h=function(L,w){var A=L.name,x=l(L,g),E=(0,t.useLocalState)(w,"viewingPhoto",""),P=E[0],D=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 D(A)}return M}()},x)))},p=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}()})]})},N=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,S.modalClose)(w);return}var D=L.id==="manage_channel",M=!!L.args.is_admin,R=L.args.scanned_user,O=(0,t.useLocalState)(w,"author",(P==null?void 0:P.author)||R||"Unknown"),F=O[0],_=O[1],U=(0,t.useLocalState)(w,"name",(P==null?void 0:P.name)||""),z=U[0],$=U[1],G=(0,t.useLocalState)(w,"description",(P==null?void 0:P.description)||""),X=G[0],J=G[1],se=(0,t.useLocalState)(w,"icon",(P==null?void 0:P.icon)||"newspaper"),ie=se[0],me=se[1],q=(0,t.useLocalState)(w,"isPublic",D?!!(P!=null&&P.public):!1),re=q[0],ae=q[1],le=(0,t.useLocalState)(w,"adminLocked",(P==null?void 0:P.admin)===1||!1),Z=le[0],ne=le[1];return(0,e.createComponentVNode)(2,o.Section,{m:"-1rem",pb:"1.5rem",title:D?"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,pe){return _(pe)}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:z,onInput:function(){function te(fe,pe){return $(pe)}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:X,onInput:function(){function te(fe,pe){return J(pe)}return te}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Icon",children:[(0,e.createComponentVNode)(2,o.Input,{disabled:!M,value:ie,width:"35%",mr:"0.5rem",onInput:function(){function te(fe,pe){return me(pe)}return te}()}),(0,e.createComponentVNode)(2,o.Icon,{name:ie,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:re,icon:re?"toggle-on":"toggle-off",content:re?"Yes":"No",onClick:function(){function te(){return ae(!re)}return te}()})}),M&&(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"CentComm Lock",verticalAlign:"top",children:(0,e.createComponentVNode)(2,o.Button,{selected:Z,icon:Z?"lock":"lock-open",content:Z?"On":"Off",tooltip:"Locking this channel will make it editable by nobody but CentComm officers.",tooltipPosition:"top",onClick:function(){function te(){return ne(!Z)}return te}()})})]})}),(0,e.createComponentVNode)(2,o.Button.Confirm,{disabled:F.trim().length===0||z.trim().length===0,icon:"check",color:"good",content:"Submit",position:"absolute",right:"1rem",bottom:"-0.75rem",onClick:function(){function te(){(0,S.modalAnswer)(w,L.id,"",{author:F,name:z.substr(0,49),description:X.substr(0,128),icon:ie,public:re?1:0,admin_locked:Z?1:0})}return te}()})]})},V=function(L,w){var A=(0,t.useBackend)(w),x=A.act,E=A.data,P=E.photo,D=E.channels,M=E.channel_idx,R=M===void 0?-1:M,O=!!L.args.is_admin,F=L.args.scanned_user,_=D.slice().sort(function(te,fe){if(R<0)return 0;var pe=D[R-1];if(pe.uid===te.uid)return-1;if(pe.uid===fe.uid)return 1}).filter(function(te){return O||!te.frozen&&(te.author===F||!!te.public)}),U=(0,t.useLocalState)(w,"author",F||"Unknown"),z=U[0],$=U[1],G=(0,t.useLocalState)(w,"channel",_.length>0?_[0].name:""),X=G[0],J=G[1],se=(0,t.useLocalState)(w,"title",""),ie=se[0],me=se[1],q=(0,t.useLocalState)(w,"body",""),re=q[0],ae=q[1],le=(0,t.useLocalState)(w,"adminLocked",!1),Z=le[0],ne=le[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:!O,width:"100%",value:z,onInput:function(){function te(fe,pe){return $(pe)}return te}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Channel",verticalAlign:"top",children:(0,e.createComponentVNode)(2,o.Dropdown,{selected:X,options:_.map(function(te){return te.name}),mb:"0",width:"100%",onSelected:function(){function te(fe){return J(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:ie,onInput:function(){function te(fe,pe){return me(pe)}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:re,onInput:function(){function te(fe,pe){return ae(pe)}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:ie,maxHeight:"13.5rem",overflow:"auto",children:(0,e.createComponentVNode)(2,o.Box,{mt:"0.5rem",children:[!!P&&(0,e.createComponentVNode)(2,h,{name:"inserted_photo_"+P.uid+".png",float:"right"}),re.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"})]})})}),O&&(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"CentComm Lock",verticalAlign:"top",children:(0,e.createComponentVNode)(2,o.Button,{selected:Z,icon:Z?"lock":"lock-open",content:Z?"On":"Off",tooltip:"Locking this story will make it censorable by nobody but CentComm officers.",tooltipPosition:"top",onClick:function(){function te(){return ne(!Z)}return te}()})})]})}),(0,e.createComponentVNode)(2,o.Button.Confirm,{disabled:z.trim().length===0||X.trim().length===0||ie.trim().length===0||re.trim().length===0,icon:"check",color:"good",content:"Submit",position:"absolute",right:"1rem",bottom:"-0.75rem",onClick:function(){function te(){(0,S.modalAnswer)(w,"create_story","",{author:z,channel:X,title:ie.substr(0,127),body:re.substr(0,1023),admin_locked:Z?1:0})}return te}()})]})},y=function(L,w){var A=(0,t.useBackend)(w),x=A.act,E=A.data,P=E.photo,D=E.wanted,M=!!L.args.is_admin,R=L.args.scanned_user,O=(0,t.useLocalState)(w,"author",(D==null?void 0:D.author)||R||"Unknown"),F=O[0],_=O[1],U=(0,t.useLocalState)(w,"name",(D==null?void 0:D.title.substr(8))||""),z=U[0],$=U[1],G=(0,t.useLocalState)(w,"description",(D==null?void 0:D.body)||""),X=G[0],J=G[1],se=(0,t.useLocalState)(w,"adminLocked",(D==null?void 0:D.admin_locked)===1||!1),ie=se[0],me=se[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 q(re,ae){return _(ae)}return q}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Name",children:(0,e.createComponentVNode)(2,o.Input,{width:"100%",value:z,maxLength:"128",onInput:function(){function q(re,ae){return $(ae)}return q}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Description",verticalAlign:"top",children:(0,e.createComponentVNode)(2,o.Input,{multiline:!0,width:"100%",value:X,maxLength:"512",rows:"4",onInput:function(){function q(re,ae){return J(ae)}return q}()})}),(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 q(){return x(P?"eject_photo":"attach_photo")}return q}()}),!!P&&(0,e.createComponentVNode)(2,h,{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:ie,icon:ie?"lock":"lock-open",content:ie?"On":"Off",tooltip:"Locking this wanted notice will make it editable by nobody but CentComm officers.",tooltipPosition:"top",onClick:function(){function q(){return me(!ie)}return q}()})})]})}),(0,e.createComponentVNode)(2,o.Button.Confirm,{disabled:!D,icon:"eraser",color:"danger",content:"Clear",position:"absolute",right:"7.25rem",bottom:"-0.75rem",onClick:function(){function q(){x("clear_wanted_notice"),(0,S.modalClose)(w)}return q}()}),(0,e.createComponentVNode)(2,o.Button.Confirm,{disabled:F.trim().length===0||z.trim().length===0||X.trim().length===0,icon:"check",color:"good",content:"Submit",position:"absolute",right:"1rem",bottom:"-0.75rem",onClick:function(){function q(){(0,S.modalAnswer)(w,L.id,"",{author:F,name:z.substr(0,127),description:X.substr(0,511),admin_locked:ie?1:0})}return q}()})]})};(0,S.modalRegisterBodyOverride)("create_channel",N),(0,S.modalRegisterBodyOverride)("manage_channel",N),(0,S.modalRegisterBodyOverride)("create_story",V),(0,S.modalRegisterBodyOverride)("wanted_notice",y)},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),f=n(98595),b=r.Noticeboard=function(){function S(B,k){var g=(0,t.useBackend)(k),l=g.act,c=g.data,m=c.papers;return(0,e.createComponentVNode)(2,f.Window,{width:600,height:300,theme:"noticeboard",children:(0,e.createComponentVNode)(2,f.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,children:m.map(function(i){return(0,e.createComponentVNode)(2,o.Stack.Item,{align:"center",width:"22.45%",height:"85%",onClick:function(){function u(){return l("interact",{paper:i.ref})}return u}(),onContextMenu:function(){function u(s){s.preventDefault(),l("showFull",{paper:i.ref})}return u}(),children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,fontSize:.75,title:i.name,children:(0,a.decodeHtmlEntities)(i.contents)})},i.ref)})})})})}return S}()},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),f=r.NuclearBomb=function(){function b(S,B){var k=(0,a.useBackend)(B),g=k.act,l=k.data;return l.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:l.authdisk?"eject":"id-card",selected:l.authdisk,content:l.diskname?l.diskname:"-----",tooltip:l.authdisk?"Eject Disk":"Insert Disk",onClick:function(){function c(){return g("auth")}return c}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Auth Code",children:(0,e.createComponentVNode)(2,t.Button,{icon:"key",disabled:!l.authdisk,selected:l.authcode,content:l.codemsg,onClick:function(){function c(){return g("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:l.anchored?"check":"times",selected:l.anchored,disabled:!l.authdisk,content:l.anchored?"YES":"NO",onClick:function(){function c(){return g("toggle_anchor")}return c}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Time Left",children:(0,e.createComponentVNode)(2,t.Button,{icon:"stopwatch",content:l.time,disabled:!l.authfull,tooltip:"Set Timer",onClick:function(){function c(){return g("set_time")}return c}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Safety",children:(0,e.createComponentVNode)(2,t.Button,{icon:l.safety?"check":"times",selected:l.safety,disabled:!l.authfull,content:l.safety?"ON":"OFF",tooltip:l.safety?"Disable Safety":"Enable Safety",onClick:function(){function c(){return g("toggle_safety")}return c}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Arm/Disarm",children:(0,e.createComponentVNode)(2,t.Button,{icon:(l.timer,"bomb"),disabled:l.safety||!l.authfull,color:"red",content:l.timer?"DISARM THE NUKE":"ARM THE NUKE",onClick:function(){function c(){return g("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 g("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),f=n(72253),b=n(36036),S=n(98595),B=r.NumberInputModal=function(){function g(l,c){var m=(0,f.useBackend)(c),i=m.act,u=m.data,s=u.init_value,d=u.large_buttons,v=u.message,C=v===void 0?"":v,h=u.timeout,p=u.title,N=(0,f.useLocalState)(c,"input",s),V=N[0],y=N[1],I=function(){function A(x){x!==V&&y(x)}return A}(),L=function(){function A(x){x!==V&&y(x)}return A}(),w=140+Math.max(Math.ceil(C.length/3),C.length>0&&d?5:0);return(0,e.createComponentVNode)(2,S.Window,{title:p,width:270,height:w,children:[h&&(0,e.createComponentVNode)(2,a.Loader,{value:h}),(0,e.createComponentVNode)(2,S.Window.Content,{onKeyDown:function(){function A(x){var E=window.event?x.which:x.keyCode;E===o.KEY_ENTER&&i("submit",{entry:V}),E===o.KEY_ESCAPE&&i("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:C})}),(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 g}(),k=function(l,c){var m=(0,f.useBackend)(c),i=m.act,u=m.data,s=u.min_value,d=u.max_value,v=u.init_value,C=u.round_value,h=l.input,p=l.onClick,N=l.onChange,V=Math.round(h!==s?Math.max(h/2,s):d/2),y=h===s&&s>0||h===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:h===s,icon:"angle-double-left",onClick:function(){function I(){return p(s)}return I}(),tooltip:h===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:!C,minValue:s,maxValue:d,onChange:function(){function I(L,w){return N(w)}return I}(),onEnter:function(){function I(L,w){return i("submit",{entry:w})}return I}(),value:h})}),(0,e.createComponentVNode)(2,b.Stack.Item,{children:(0,e.createComponentVNode)(2,b.Button,{disabled:h===d,icon:"angle-double-right",onClick:function(){function I(){return p(d)}return I}(),tooltip:h===d?"Max":"Max ("+d+")"})}),(0,e.createComponentVNode)(2,b.Stack.Item,{children:(0,e.createComponentVNode)(2,b.Button,{disabled:y,icon:"divide",onClick:function(){function I(){return p(V)}return I}(),tooltip:y?"Split":"Split ("+V+")"})}),(0,e.createComponentVNode)(2,b.Stack.Item,{children:(0,e.createComponentVNode)(2,b.Button,{disabled:h===v,icon:"redo",onClick:function(){function I(){return p(v)}return I}(),tooltip:v?"Reset ("+v+")":"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),f=n(36036),b=[["good","Conscious"],["average","Unconscious"],["bad","DEAD"]],S=[["Resp.","oxyLoss"],["Toxin","toxLoss"],["Brute","bruteLoss"],["Burn","fireLoss"]],B={average:[.25,.5],bad:[.5,1/0]},k=["bad","average","average","good","average","average","bad"],g=r.OperatingComputer=function(){function i(u,s){var d=(0,t.useBackend)(s),v=d.act,C=d.data,h=C.hasOccupant,p=C.choice,N;return p?N=(0,e.createComponentVNode)(2,m):N=h?(0,e.createComponentVNode)(2,l):(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,f.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,f.Stack.Item,{children:(0,e.createComponentVNode)(2,f.Tabs,{children:[(0,e.createComponentVNode)(2,f.Tabs.Tab,{selected:!p,icon:"user",onClick:function(){function V(){return v("choiceOff")}return V}(),children:"Patient"}),(0,e.createComponentVNode)(2,f.Tabs.Tab,{selected:!!p,icon:"cog",onClick:function(){function V(){return v("choiceOn")}return V}(),children:"Options"})]})}),(0,e.createComponentVNode)(2,f.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,f.Section,{fill:!0,scrollable:!0,children:N})})]})})})}return i}(),l=function(u,s){var d=(0,t.useBackend)(s),v=d.data,C=v.occupant,h=C.activeSurgeries;return(0,e.createComponentVNode)(2,f.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,f.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,f.Section,{fill:!0,title:"Patient",children:(0,e.createComponentVNode)(2,f.LabeledList,{children:[(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Name",children:C.name}),(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Status",color:b[C.stat][0],children:b[C.stat][1]}),(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Health",children:(0,e.createComponentVNode)(2,f.ProgressBar,{min:"0",max:C.maxHealth,value:C.health/C.maxHealth,ranges:{good:[.5,1/0],average:[0,.5],bad:[-1/0,0]}})}),S.map(function(p,N){return(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:p[0]+" Damage",children:(0,e.createComponentVNode)(2,f.ProgressBar,{min:"0",max:"100",value:C[p[1]]/100,ranges:B,children:(0,a.round)(C[p[1]])},N)},N)}),(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Temperature",children:(0,e.createComponentVNode)(2,f.ProgressBar,{min:"0",max:C.maxTemp,value:C.bodyTemperature/C.maxTemp,color:k[C.temperatureSuitability+3],children:[(0,a.round)(C.btCelsius),"\xB0C, ",(0,a.round)(C.btFaren),"\xB0F"]})}),!!C.hasBlood&&(0,e.createFragment)([(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Blood Level",children:(0,e.createComponentVNode)(2,f.ProgressBar,{min:"0",max:C.bloodMax,value:C.bloodLevel/C.bloodMax,ranges:{bad:[-1/0,.6],average:[.6,.9],good:[.6,1/0]},children:[C.bloodPercent,"%, ",C.bloodLevel,"cl"]})}),(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Pulse",children:[C.pulse," BPM"]})],4)]})})}),(0,e.createComponentVNode)(2,f.Stack.Item,{children:(0,e.createComponentVNode)(2,f.Section,{title:"Active surgeries",level:"2",children:C.inSurgery&&h?h.map(function(p,N){return(0,e.createComponentVNode)(2,f.Section,{style:{textTransform:"capitalize"},title:p.name+" ("+p.location+")",children:(0,e.createComponentVNode)(2,f.LabeledList,{children:(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Next Step",children:p.step},N)},N)},N)}):(0,e.createComponentVNode)(2,f.Box,{color:"label",children:"No procedure ongoing."})})})]})},c=function(){return(0,e.createComponentVNode)(2,f.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,f.Stack.Item,{grow:!0,align:"center",textAlign:"center",color:"label",children:[(0,e.createComponentVNode)(2,f.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,e.createVNode)(1,"br"),"No patient detected."]})})},m=function(u,s){var d=(0,t.useBackend)(s),v=d.act,C=d.data,h=C.verbose,p=C.health,N=C.healthAlarm,V=C.oxy,y=C.oxyAlarm,I=C.crit;return(0,e.createComponentVNode)(2,f.LabeledList,{children:[(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Loudspeaker",children:(0,e.createComponentVNode)(2,f.Button,{selected:h,icon:h?"toggle-on":"toggle-off",content:h?"On":"Off",onClick:function(){function L(){return v(h?"verboseOff":"verboseOn")}return L}()})}),(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Health Announcer",children:(0,e.createComponentVNode)(2,f.Button,{selected:p,icon:p?"toggle-on":"toggle-off",content:p?"On":"Off",onClick:function(){function L(){return v(p?"healthOff":"healthOn")}return L}()})}),(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Health Announcer Threshold",children:(0,e.createComponentVNode)(2,f.Knob,{bipolar:!0,minValue:-100,maxValue:100,value:N,stepPixelSize:5,ml:"0",onChange:function(){function L(w,A){return v("health_adj",{new:A})}return L}()})}),(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Oxygen Alarm",children:(0,e.createComponentVNode)(2,f.Button,{selected:V,icon:V?"toggle-on":"toggle-off",content:V?"On":"Off",onClick:function(){function L(){return v(V?"oxyOff":"oxyOn")}return L}()})}),(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Oxygen Alarm Threshold",children:(0,e.createComponentVNode)(2,f.Knob,{bipolar:!0,minValue:-100,maxValue:100,value:y,stepPixelSize:5,ml:"0",onChange:function(){function L(w,A){return v("oxy_adj",{new:A})}return L}()})}),(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Critical Alert",children:(0,e.createComponentVNode)(2,f.Button,{selected:I,icon:I?"toggle-on":"toggle-off",content:I?"On":"Off",onClick:function(){function L(){return v(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),f=n(98595),b=n(35840);function S(d,v){var C=typeof Symbol!="undefined"&&d[Symbol.iterator]||d["@@iterator"];if(C)return(C=C.call(d)).next.bind(C);if(Array.isArray(d)||(C=B(d))||v&&d&&typeof d.length=="number"){C&&(d=C);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,v){if(d){if(typeof d=="string")return k(d,v);var C={}.toString.call(d).slice(8,-1);return C==="Object"&&d.constructor&&(C=d.constructor.name),C==="Map"||C==="Set"?Array.from(d):C==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(C)?k(d,v):void 0}}function k(d,v){(v==null||v>d.length)&&(v=d.length);for(var C=0,h=Array(v);CC},m=function(v,C){var h=v.name,p=C.name;if(!h||!p)return 0;var N=h.match(g),V=p.match(g);if(N&&V&&h.replace(g,"")===p.replace(g,"")){var y=parseInt(N[1],10),I=parseInt(V[1],10);return y-I}return c(h,p)},i=function(v,C){var h=v.searchText,p=v.source,N=v.title,V=v.color,y=v.sorted,I=p.filter(l(h));return y&&I.sort(m),p.length>0&&(0,e.createComponentVNode)(2,o.Section,{title:N+" - ("+p.length+")",children:I.map(function(L){return(0,e.createComponentVNode)(2,u,{thing:L,color:V},L.name)})})},u=function(v,C){var h=(0,t.useBackend)(C),p=h.act,N=v.color,V=v.thing;return(0,e.createComponentVNode)(2,o.Button,{color:N,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)(["job_icons16x16",V.assigned_role_sprite])})," ",V.assigned_role]}):"",tooltipPosition:"bottom",onClick:function(){function y(){return p("orbit",{ref:V.ref})}return y}(),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 d(v,C){for(var h=(0,t.useBackend)(C),p=h.act,N=h.data,V=N.alive,y=N.antagonists,I=N.highlights,L=N.response_teams,w=N.tourist,A=N.auto_observe,x=N.dead,E=N.ssd,P=N.ghosts,D=N.misc,M=N.npcs,R=(0,t.useLocalState)(C,"searchText",""),O=R[0],F=R[1],_={},U=S(y),z;!(z=U()).done;){var $=z.value;_[$.antag]===void 0&&(_[$.antag]=[]),_[$.antag].push($)}var G=Object.entries(_);G.sort(function(J,se){return c(J[0],se[0])});var X=function(){function J(se){for(var ie=0,me=[G.map(function(ae){var le=ae[0],Z=ae[1];return Z}),w,I,V,P,E,x,M,D];ie0&&(0,e.createComponentVNode)(2,o.Section,{title:"Antagonists",children:G.map(function(J){var se=J[0],ie=J[1];return(0,e.createComponentVNode)(2,o.Section,{title:se+" - ("+ie.length+")",level:2,children:ie.filter(l(O)).sort(m).map(function(me){return(0,e.createComponentVNode)(2,u,{color:"bad",thing:me},me.name)})},se)})}),I.length>0&&(0,e.createComponentVNode)(2,i,{title:"Highlights",source:I,searchText:O,color:"teal"}),(0,e.createComponentVNode)(2,i,{title:"Response Teams",source:L,searchText:O,color:"purple"}),(0,e.createComponentVNode)(2,i,{title:"Tourists",source:w,searchText:O,color:"violet"}),(0,e.createComponentVNode)(2,i,{title:"Alive",source:V,searchText:O,color:"good"}),(0,e.createComponentVNode)(2,i,{title:"Ghosts",source:P,searchText:O,color:"grey"}),(0,e.createComponentVNode)(2,i,{title:"SSD",source:E,searchText:O,color:"grey"}),(0,e.createComponentVNode)(2,i,{title:"Dead",source:x,searchText:O,sorted:!1}),(0,e.createComponentVNode)(2,i,{title:"NPCs",source:M,searchText:O,sorted:!1}),(0,e.createComponentVNode)(2,i,{title:"Misc",source:D,searchText:O,sorted:!1})]})})}return d}()},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),f=n(98595),b=n(9394);function S(d){if(d==null)throw new TypeError("Cannot destructure "+d)}var B=(0,b.createLogger)("OreRedemption"),k=function(v){return v.toLocaleString("en-US")+" pts"},g=r.OreRedemption=function(){function d(v,C){return(0,e.createComponentVNode)(2,f.Window,{width:490,height:750,children:(0,e.createComponentVNode)(2,f.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,l,{height:"100%"})}),(0,e.createComponentVNode)(2,c),(0,e.createComponentVNode)(2,m)]})})})}return d}(),l=function(v,C){var h=(0,t.useBackend)(C),p=h.act,N=h.data,V=N.id,y=N.points,I=N.disk,L=Object.assign({},(S(v),v));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:y>0?"good":"grey",bold:y>0&&"good",children:k(y)})}),(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 p("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 p("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(v,C){var h=(0,t.useBackend)(C),p=h.act,N=h.data,V=N.sheets,y=Object.assign({},(S(v),v));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"},y,{children:[(0,e.createComponentVNode)(2,i,{title:"Sheets",columns:[["Available","25%"],["Ore Value","15%"],["Smelt","20%"]]}),V.map(function(I){return(0,e.createComponentVNode)(2,u,{ore:I},I.id)})]})))})},m=function(v,C){var h=(0,t.useBackend)(C),p=h.act,N=h.data,V=N.alloys,y=Object.assign({},(S(v),v));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"},y,{children:[(0,e.createComponentVNode)(2,i,{title:"Alloys",columns:[["Recipe","50%"],["Available","11%"],["Smelt","20%"]]}),V.map(function(I){return(0,e.createComponentVNode)(2,s,{ore:I},I.id)})]})))})},i=function(v,C){var h;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:v.title}),(h=v.columns)==null?void 0:h.map(function(p){return(0,e.createComponentVNode)(2,o.Stack.Item,{basis:p[1],textAlign:"center",color:"label",bold:!0,children:p[0]},p)})]})})},u=function(v,C){var h=(0,t.useBackend)(C),p=h.act,N=v.ore;if(!(N.value&&N.amount<=0&&!(["metal","glass"].indexOf(N.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",N.id])}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:N.name})]})}),(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"20%",textAlign:"center",color:N.amount>=1?"good":"gray",bold:N.amount>=1,align:"center",children:N.amount.toLocaleString("en-US")}),(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"20%",textAlign:"center",align:"center",children:N.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(N.amount,50),stepPixelSize:6,onChange:function(){function V(y,I){return p(N.value?"sheet":"alloy",{id:N.id,amount:I})}return V}()})})]})})},s=function(v,C){var h=(0,t.useBackend)(C),p=h.act,N=v.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",N.id])})}),(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"30%",textAlign:"middle",align:"center",children:N.name}),(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"35%",textAlign:"middle",color:N.amount>=1?"good":"gray",align:"center",children:N.description}),(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"10%",textAlign:"center",color:N.amount>=1?"good":"gray",bold:N.amount>=1,align:"center",children:N.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(N.amount,50),stepPixelSize:6,onChange:function(){function V(y,I){return p(N.value?"sheet":"alloy",{id:N.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),f=n(71253),b=n(70752),S=function(g){var l;try{l=b("./"+g+".js")}catch(m){if(m.code==="MODULE_NOT_FOUND")return(0,f.routingError)("notFound",g);throw m}var c=l[g];return c||(0,f.routingError)("missingExport",g)},B=r.PAI=function(){function k(g,l){var c=(0,a.useBackend)(l),m=c.act,i=c.data,u=i.app_template,s=i.app_icon,d=i.app_title,v=S(u);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}),d,u!=="pai_main_menu"&&(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{ml:2,mb:0,content:"Back",icon:"arrow-left",onClick:function(){function C(){return m("Back")}return C}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Home",icon:"arrow-up",onClick:function(){function C(){return m("MASTER_back")}return C}()})],4)]}),children:(0,e.createComponentVNode)(2,v)})})})})})}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),f=n(71253),b=n(59395),S=function(c){var m;try{m=b("./"+c+".js")}catch(u){if(u.code==="MODULE_NOT_FOUND")return(0,f.routingError)("notFound",c);throw u}var i=m[c];return i||(0,f.routingError)("missingExport",c)},B=r.PDA=function(){function l(c,m){var i=(0,a.useBackend)(m),u=i.act,s=i.data,d=s.app,v=s.owner;if(!v)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 C=S(d.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:d.icon,mr:1}),d.name]}),children:(0,e.createComponentVNode)(2,C)})}),(0,e.createComponentVNode)(2,t.Stack.Item,{mt:7.5,children:(0,e.createComponentVNode)(2,g)})]})})})}return l}(),k=function(c,m){var i=(0,a.useBackend)(m),u=i.act,s=i.data,d=s.idInserted,v=s.idLink,C=s.stationTime,h=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 p(){return u("Authenticate")}return p}(),content:d?v:"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 p(){return u("Eject")}return p}(),content:h?["Eject "+h]:"No Cartridge Inserted"})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,textAlign:"right",bold:!0,mr:1,mt:.5,children:C})]})},g=function(c,m){var i=(0,a.useBackend)(m),u=i.act,s=i.data,d=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:[!!d.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:d.has_back?"white":"disabled",icon:"arrow-alt-circle-left-o",onClick:function(){function v(){return u("Back")}return v}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{basis:d.has_back?"33%":"100%",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,className:"PDA__footer__button",color:"transparent",iconColor:d.is_home?"disabled":"white",icon:"home",onClick:function(){function v(){u("Home")}return v}()})})]})})}},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),f=n(49968),b=r.Pacman=function(){function S(B,k){var g=(0,a.useBackend)(k),l=g.act,c=g.data,m=c.active,i=c.anchored,u=c.broken,s=c.emagged,d=c.fuel_type,v=c.fuel_usage,C=c.fuel_stored,h=c.fuel_cap,p=c.is_ai,N=c.tmp_current,V=c.tmp_max,y=c.tmp_overheat,I=c.output_max,L=c.power_gen,w=c.output_set,A=c.has_fuel,x=C/h,E=N/V,P=w*L,D=Math.round(C/v*2),M=Math.round(D/60),R=D>120?M+" minutes":D+" seconds";return(0,e.createComponentVNode)(2,o.Window,{width:500,height:225,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[(u||!i)&&(0,e.createComponentVNode)(2,t.Section,{title:"Status",children:[!!u&&(0,e.createComponentVNode)(2,t.Box,{color:"orange",children:"The generator is malfunctioning!"}),!u&&!i&&(0,e.createComponentVNode)(2,t.Box,{color:"orange",children:"The generator needs to be anchored to the floor with a wrench."})]}),!u&&!!i&&(0,e.createVNode)(1,"div",null,[(0,e.createComponentVNode)(2,t.Section,{title:"Status",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:m?"power-off":"times",content:m?"On":"Off",tooltip:"Toggles the generator on/off. Requires fuel.",tooltipPosition:"left",disabled:!A,selected:m,onClick:function(){function O(){return l("toggle_power")}return O}()}),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 O(F,_){return l("change_power",{change_power:_})}return O}()}),"(",(0,f.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:[N," \u2103"]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",children:[y>50&&(0,e.createComponentVNode)(2,t.Box,{color:"red",children:"CRITICAL OVERHEAT!"}),y>20&&y<=50&&(0,e.createComponentVNode)(2,t.Box,{color:"orange",children:"WARNING: Overheating!"}),y>1&&y<=20&&(0,e.createComponentVNode)(2,t.Box,{color:"orange",children:"Temperature High"}),y===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:m||p||!A,onClick:function(){function O(){return l("eject_fuel")}return O}()}),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:d}),(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(C/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:[v/1e3," dm\xB3/s"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Fuel depletion",children:[!!A&&(v?R:"N/A"),!A&&(0,e.createComponentVNode)(2,t.Box,{color:"red",children:"Out of fuel"})]})]})})]})})],4)]})})}return S}()},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),f=r.PanDEMIC=function(){function i(u,s){var d=(0,a.useBackend)(s),v=d.data,C=v.beakerLoaded,h=v.beakerContainsBlood,p=v.beakerContainsVirus,N=v.resistances,V=N===void 0?[]:N,y;return C?h?h&&!p&&(y=(0,e.createFragment)([(0,e.createTextVNode)("No disease detected in provided blood sample.")],4)):y=(0,e.createFragment)([(0,e.createTextVNode)("No blood sample found in the loaded container.")],4):y=(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:[y&&!p?(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:y})}):(0,e.createComponentVNode)(2,k),(V==null?void 0:V.length)>0&&(0,e.createComponentVNode)(2,m,{align:"bottom"})]})})})}return i}(),b=function(u,s){var d=(0,a.useBackend)(s),v=d.act,C=d.data,h=C.beakerLoaded;return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{icon:"eject",content:"Eject",disabled:!h,onClick:function(){function p(){return v("eject_beaker")}return p}()}),(0,e.createComponentVNode)(2,t.Button.Confirm,{icon:"trash-alt",confirmIcon:"eraser",content:"Destroy",confirmContent:"Destroy",disabled:!h,onClick:function(){function p(){return v("destroy_eject_beaker")}return p}()})],4)},S=function(u,s){var d=(0,a.useBackend)(s),v=d.act,C=d.data,h=C.beakerContainsVirus,p=u.strain,N=p.commonName,V=p.description,y=p.diseaseAgent,I=p.bloodDNA,L=p.bloodType,w=p.possibleTreatments,A=p.transmissionRoute,x=p.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(!h)return(0,e.createComponentVNode)(2,t.LabeledList,{children:E});var P;return x&&(N!=null&&N!=="Unknown"?P=(0,e.createComponentVNode)(2,t.Button,{icon:"print",content:"Print Release Forms",onClick:function(){function D(){return v("print_release_forms",{strain_index:u.strainIndex})}return D}(),style:{"margin-left":"auto"}}):P=(0,e.createComponentVNode)(2,t.Button,{icon:"pen",content:"Name Disease",onClick:function(){function D(){return v("name_strain",{strain_index:u.strainIndex})}return D}(),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:[N!=null?N:"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:y}),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(u,s){var d,v=(0,a.useBackend)(s),C=v.act,h=v.data,p=!!h.synthesisCooldown,N=(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{icon:p?"spinner":"clone",iconSpin:p,content:"Clone",disabled:p,onClick:function(){function V(){return C("clone_strain",{strain_index:u.strainIndex})}return V}()}),u.sectionButtons],0);return(0,e.createComponentVNode)(2,t.Flex.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:(d=u.sectionTitle)!=null?d:"Strain Information",buttons:N,children:(0,e.createComponentVNode)(2,S,{strain:u.strain,strainIndex:u.strainIndex})})})},k=function(u,s){var d,v=(0,a.useBackend)(s),C=v.act,h=v.data,p=h.selectedStrainIndex,N=h.strains,V=N[p-1];if(N.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(N.length===1){var y;return(0,e.createFragment)([(0,e.createComponentVNode)(2,B,{strain:N[0],strainIndex:1,sectionButtons:(0,e.createComponentVNode)(2,b)}),((y=N[0].symptoms)==null?void 0:y.length)>0&&(0,e.createComponentVNode)(2,l,{strain:N[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:N.map(function(L,w){var A;return(0,e.createComponentVNode)(2,t.Tabs.Tab,{icon:"virus",selected:p-1===w,onClick:function(){function x(){return C("switch_strain",{strain_index:w+1})}return x}(),children:(A=L.commonName)!=null?A:"Unknown"},w)})})}),(0,e.createComponentVNode)(2,B,{strain:V,strainIndex:p}),((d=V.symptoms)==null?void 0:d.length)>0&&(0,e.createComponentVNode)(2,l,{className:"remove-section-bottom-padding",strain:V})]})})})},g=function(u){return u.reduce(function(s,d){return s+d},0)},l=function(u){var s=u.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:u.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(d,v){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:d.name}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:d.stealth}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:d.resistance}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:d.stageSpeed}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:d.transmissibility})]},v)}),(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:g(s.map(function(d){return d.stealth}))}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:g(s.map(function(d){return d.resistance}))}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:g(s.map(function(d){return d.stageSpeed}))}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:g(s.map(function(d){return d.transmissibility}))})]})]})})})},c=["flask","vial","eye-dropper"],m=function(u,s){var d=(0,a.useBackend)(s),v=d.act,C=d.data,h=C.synthesisCooldown,p=C.beakerContainsVirus,N=C.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:N.map(function(V,y){return(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Button,{icon:c[y%c.length],disabled:!!h,onClick:function(){function I(){return v("clone_vaccine",{resistance_index:y+1})}return I}(),mr:"0.5em"}),V]},y)})})})})}},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(25328),f=n(79646),b=n(36352),S=n(98595),B=n(35840),k=n(38307),g=function(u){switch(u){case 1:return"north";case 2:return"south";case 4:return"east";case 8:return"west";case 5:return"northeast";case 6:return"southeast";case 9:return"northwest";case 10:return"southwest"}return""},l=r.ParticleAccelerator=function(){function i(u,s){var d=(0,a.useBackend)(s),v=d.act,C=d.data,h=C.assembled,p=C.power,N=C.strength,V=C.max_strength,y=C.icon,I=C.layout_1,L=C.layout_2,w=C.layout_3,A=C.orientation;return(0,e.createComponentVNode)(2,S.Window,{width:395,height:h?160:A==="north"||A==="south"?540:465,children:(0,e.createComponentVNode)(2,S.Window.Content,{scrollable:!0,children:[(0,e.createComponentVNode)(2,t.Section,{title:"Control Panel",buttons:(0,e.createComponentVNode)(2,t.Button,{dmIcon:"sync",content:"Connect",onClick:function(){function x(){return v("scan")}return x}()}),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:h?"good":"bad",children:h?"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:!h,onClick:function(){function x(){return v("power")}return x}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Strength",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"backward",disabled:!h||N===0,onClick:function(){function x(){return v("remove_strength")}return x}(),mr:"4px"}),N,(0,e.createComponentVNode)(2,t.Button,{icon:"forward",disabled:!h||N===V,onClick:function(){function x(){return v("add_strength")}return x}(),ml:"4px"})]})]})}),h?"":(0,e.createComponentVNode)(2,t.Section,{title:A?"EM Acceleration Chamber Orientation: "+(0,o.capitalize)(A):"Place EM Acceleration Chamber Next To Console",children:A===0?"":A==="north"||A==="south"?(0,e.createComponentVNode)(2,m):(0,e.createComponentVNode)(2,c)})]})})}return i}(),c=function(u,s){var d=(0,a.useBackend)(s),v=d.act,C=d.data,h=C.assembled,p=C.power,N=C.strength,V=C.max_strength,y=C.icon,I=C.layout_1,L=C.layout_2,w=C.layout_3,A=C.orientation;return(0,e.createComponentVNode)(2,t.Table,{children:[(0,e.createComponentVNode)(2,b.TableRow,{width:"40px",children:(A==="east"?I:w).slice().map(function(x){return(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Tooltip,{content:(0,e.createVNode)(1,"span",null,[x.name,(0,e.createTextVNode)(" "),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)(" "),"Status: "+x.status,(0,e.createVNode)(1,"br"),"Direction: "+g(x.dir)],0,{style:{wordWrap:"break-word"}}),children:(0,e.createComponentVNode)(2,t.ImageButton,{dmIcon:y,dmIconState:x.icon_state,dmDirection:x.dir,style:{"border-style":"solid","border-width":"2px","border-color":x.status==="good"?"green":x.status==="Incomplete"?"orange":"red",padding:"2px"}})})},x.name)})}),(0,e.createComponentVNode)(2,b.TableRow,{width:"40px",children:L.slice().map(function(x){return(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Tooltip,{content:(0,e.createVNode)(1,"span",null,[x.name,(0,e.createTextVNode)(" "),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)(" "),"Status: "+x.status,(0,e.createVNode)(1,"br"),"Direction: "+g(x.dir)],0,{style:{wordWrap:"break-word"}}),children:(0,e.createComponentVNode)(2,t.ImageButton,{dmIcon:y,dmIconState:x.icon_state,dmDirection:x.dir,style:{"border-style":"solid","border-width":"2px","border-color":x.status==="good"?"green":x.status==="Incomplete"?"orange":"red",padding:"2px"}})})},x.name)})}),(0,e.createComponentVNode)(2,b.TableRow,{width:"40px",children:(A==="east"?w:I).slice().map(function(x){return(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Tooltip,{content:(0,e.createVNode)(1,"span",null,[x.name,(0,e.createTextVNode)(" "),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)(" "),"Status: "+x.status,(0,e.createVNode)(1,"br"),"Direction: "+g(x.dir)],0,{style:{wordWrap:"break-word"}}),children:(0,e.createComponentVNode)(2,t.ImageButton,{dmIcon:y,dmIconState:x.icon_state,dmDirection:x.dir,style:{"border-style":"solid","border-width":"2px","border-color":x.status==="good"?"green":x.status==="Incomplete"?"orange":"red",padding:"2px"}})})},x.name)})})]})},m=function(u,s){var d=(0,a.useBackend)(s),v=d.act,C=d.data,h=C.assembled,p=C.power,N=C.strength,V=C.max_strength,y=C.icon,I=C.layout_1,L=C.layout_2,w=C.layout_3,A=C.orientation;return(0,e.createComponentVNode)(2,t.Grid,{children:[(0,e.createComponentVNode)(2,f.GridColumn,{width:"40px",children:(A==="north"?I:w).slice().map(function(x){return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Tooltip,{content:(0,e.createVNode)(1,"span",null,[x.name,(0,e.createTextVNode)(" "),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)(" "),"Status: "+x.status,(0,e.createVNode)(1,"br"),"Direction: "+g(x.dir)],0,{style:{wordWrap:"break-word"}}),children:(0,e.createComponentVNode)(2,t.ImageButton,{dmIcon:y,dmIconState:x.icon_state,dmDirection:x.dir,style:{"border-style":"solid","border-width":"2px","border-color":x.status==="good"?"green":x.status==="Incomplete"?"orange":"red",padding:"2px"}})})},x.name)})}),(0,e.createComponentVNode)(2,f.GridColumn,{children:L.slice().map(function(x){return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Tooltip,{content:(0,e.createVNode)(1,"span",null,[x.name,(0,e.createTextVNode)(" "),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)(" "),"Status: "+x.status,(0,e.createVNode)(1,"br"),"Direction: "+g(x.dir)],0,{style:{wordWrap:"break-word"}}),children:(0,e.createComponentVNode)(2,t.ImageButton,{dmIcon:y,dmIconState:x.icon_state,dmDirection:x.dir,style:{"border-style":"solid","border-width":"2px","border-color":x.status==="good"?"green":x.status==="Incomplete"?"orange":"red",padding:"2px"}})})},x.name)})}),(0,e.createComponentVNode)(2,f.GridColumn,{width:"40px",children:(A==="north"?w:I).slice().map(function(x){return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,tooltip:x.status,children:(0,e.createComponentVNode)(2,t.Tooltip,{content:(0,e.createVNode)(1,"span",null,[x.name,(0,e.createTextVNode)(" "),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)(" "),"Status: "+x.status,(0,e.createVNode)(1,"br"),"Direction: "+g(x.dir)],0,{style:{wordWrap:"break-word"}}),children:(0,e.createComponentVNode)(2,t.ImageButton,{dmIcon:y,dmIconState:x.icon_state,dmDirection:x.dir,style:{"border-style":"solid","border-width":"2px","border-color":x.status==="good"?"green":x.status==="Incomplete"?"orange":"red",padding:"2px"}})})},x.name)})})]})}},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),f=r.PdaPainter=function(){function k(g,l){var c=(0,a.useBackend)(l),m=c.data,i=m.has_pda;return(0,e.createComponentVNode)(2,o.Window,{width:510,height:505,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:i?(0,e.createComponentVNode)(2,S):(0,e.createComponentVNode)(2,b)})})}return k}(),b=function(g,l){var c=(0,a.useBackend)(l),m=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 i(){return m("insert_pda")}return i}()})]})})})},S=function(g,l){var c=(0,a.useBackend)(l),m=c.act,i=c.data,u=i.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(u).map(function(s){return(0,e.createComponentVNode)(2,t.Table.Row,{onClick:function(){function d(){return m("choose_pda",{selectedPda:s})}return d}(),children:[(0,e.createComponentVNode)(2,t.Table.Cell,{collapsing:!0,children:(0,e.createVNode)(1,"img",null,null,1,{src:"data:image/png;base64,"+u[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(g,l){var c=(0,a.useBackend)(l),m=c.act,i=c.data,u=i.current_appearance,s=i.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,"+u,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 d(){return m("eject_pda")}return d}()}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"paint-roller",content:"Paint PDA",onClick:function(){function d(){return m("paint_pda")}return d}()})]}),(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),f=r.PersonalCrafting=function(){function B(k,g){var l=(0,a.useBackend)(g),c=l.act,m=l.data,i=m.busy,u=m.category,s=m.display_craftable_only,d=m.display_compact,v=m.prev_cat,C=m.next_cat,h=m.subcategory,p=m.prev_subcat,N=m.next_subcat;return(0,e.createComponentVNode)(2,o.Window,{width:700,height:800,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[!!i&&(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:u,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:d?"check-square-o":"square-o",selected:d,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:v,icon:"arrow-left",onClick:function(){function V(){return c("backwardCat")}return V}()}),(0,e.createComponentVNode)(2,t.Button,{content:C,icon:"arrow-right",onClick:function(){function V(){return c("forwardCat")}return V}()})]}),h&&(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Button,{content:p,icon:"arrow-left",onClick:function(){function V(){return c("backwardSubCat")}return V}()}),(0,e.createComponentVNode)(2,t.Button,{content:N,icon:"arrow-right",onClick:function(){function V(){return c("forwardSubCat")}return V}()})]}),d?(0,e.createComponentVNode)(2,b):(0,e.createComponentVNode)(2,S)]})]})})}return B}(),b=function(k,g){var l=(0,a.useBackend)(g),c=l.act,m=l.data,i=m.display_craftable_only,u=m.can_craft,s=m.cant_craft;return(0,e.createComponentVNode)(2,t.Box,{mt:1,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[u.map(function(d){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:d.name,children:[(0,e.createComponentVNode)(2,t.Button,{icon:"hammer",content:"Craft",onClick:function(){function v(){return c("make",{make:d.ref})}return v}()}),d.catalyst_text&&(0,e.createComponentVNode)(2,t.Button,{tooltip:d.catalyst_text,content:"Catalysts",color:"transparent"}),(0,e.createComponentVNode)(2,t.Button,{tooltip:d.req_text,content:"Requirements",color:"transparent"}),d.tool_text&&(0,e.createComponentVNode)(2,t.Button,{tooltip:d.tool_text,content:"Tools",color:"transparent"})]},d.name)}),!i&&s.map(function(d){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:d.name,children:[(0,e.createComponentVNode)(2,t.Button,{icon:"hammer",content:"Craft",disabled:!0}),d.catalyst_text&&(0,e.createComponentVNode)(2,t.Button,{tooltip:d.catalyst_text,content:"Catalysts",color:"transparent"}),(0,e.createComponentVNode)(2,t.Button,{tooltip:d.req_text,content:"Requirements",color:"transparent"}),d.tool_text&&(0,e.createComponentVNode)(2,t.Button,{tooltip:d.tool_text,content:"Tools",color:"transparent"})]},d.name)})]})})},S=function(k,g){var l=(0,a.useBackend)(g),c=l.act,m=l.data,i=m.display_craftable_only,u=m.can_craft,s=m.cant_craft;return(0,e.createComponentVNode)(2,t.Box,{mt:1,children:[u.map(function(d){return(0,e.createComponentVNode)(2,t.Section,{title:d.name,buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"hammer",content:"Craft",onClick:function(){function v(){return c("make",{make:d.ref})}return v}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[d.catalyst_text&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Catalysts",children:d.catalyst_text}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Requirements",children:d.req_text}),d.tool_text&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Tools",children:d.tool_text})]})},d.name)}),!i&&s.map(function(d){return(0,e.createComponentVNode)(2,t.Section,{title:d.name,buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"hammer",content:"Craft",disabled:!0}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[d.catalyst_text&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Catalysts",children:d.catalyst_text}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Requirements",children:d.req_text}),d.tool_text&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Tools",children:d.tool_text})]})},d.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),f=r.Photocopier=function(){function B(k,g){var l=(0,a.useBackend)(g),c=l.act,m=l.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:m.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 i(){return c("minus")}return i}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"plus",textAlign:"center",content:"",onClick:function(){function i(){return c("add")}return i}()})]})]}),(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:m.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:!m.copyitem&&!m.mob,content:m.copyitem?m.copyitem:m.mob?m.mob+"'s ass!":"document",onClick:function(){function i(){return c("removedocument")}return i}()})})]}),(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:!m.folder,content:m.folder?m.folder:"folder",onClick:function(){function i(){return c("removefolder")}return i}()})})]})]}),(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,b)}),(0,e.createComponentVNode)(2,S)]})})})}return B}(),b=function(k,g){var l=(0,a.useBackend)(g),c=l.act,m=l.data,i=m.issilicon;return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"copy",float:"center",textAlign:"center",content:"Copy",onClick:function(){function u(){return c("copy")}return u}()}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"file-import",float:"center",textAlign:"center",content:"Scan",onClick:function(){function u(){return c("scandocument")}return u}()}),!!i&&(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 u(){return c("ai_text")}return u}()}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"image",color:"green",float:"center",textAlign:"center",content:"Print Image",onClick:function(){function u(){return c("ai_pic")}return u}()})],4)],0)},S=function(k,g){var l=(0,a.useBackend)(g),c=l.act,m=l.data;return(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Scanned Files",children:m.files.map(function(i){return(0,e.createComponentVNode)(2,t.Section,{title:i.name,buttons:(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Button,{icon:"print",content:"Print",disabled:m.toner<=0,onClick:function(){function u(){return c("filecopy",{uid:i.uid})}return u}()}),(0,e.createComponentVNode)(2,t.Button.Confirm,{icon:"trash-alt",content:"Delete",color:"bad",onClick:function(){function u(){return c("deletefile",{uid:i.uid})}return u}()})]})},i.name)})})}},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),f=["tempKey"];function b(g,l){if(g==null)return{};var c={};for(var m in g)if({}.hasOwnProperty.call(g,m)){if(l.includes(m))continue;c[m]=g[m]}return c}var S={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(l,c){var m=l.tempKey,i=b(l,f),u=S[m];if(!u)return null;var s=(0,a.useBackend)(c),d=s.data,v=s.act,C=d.currentTemp,h=u.label,p=u.icon,N=m===C,V=function(){v("setTemp",{temp:m})};return(0,e.normalizeProps)((0,e.createComponentVNode)(2,t.Button,Object.assign({color:"transparent",selected:N,onClick:V},i,{children:[(0,e.createComponentVNode)(2,t.Icon,{name:p}),h]})))},k=r.PoolController=function(){function g(l,c){for(var m=(0,a.useBackend)(c),i=m.data,u=i.emagged,s=i.currentTemp,d=S[s]||S.normal,v=d.label,C=d.color,h=[],p=0,N=Object.entries(S);p50?"battery-half":"battery-quarter")||C==="C"&&"bolt"||C==="F"&&"battery-full"||C==="M"&&"slash",color:C==="N"&&(h>50?"yellow":"red")||C==="C"&&"yellow"||C==="F"&&"green"||C==="M"&&"orange"}),(0,e.createComponentVNode)(2,B.Box,{inline:!0,width:"36px",textAlign:"right",children:(0,o.toFixed)(h)+"%"})],4)};u.defaultHooks=f.pureComponentHooks;var s=function(v){var C,h,p=v.status;switch(p){case"AOn":C=!0,h=!0;break;case"AOff":C=!0,h=!1;break;case"On":C=!1,h=!0;break;case"Off":C=!1,h=!1;break}var N=(h?"On":"Off")+(" ["+(C?"auto":"manual")+"]");return(0,e.createComponentVNode)(2,B.ColorBox,{color:h?"good":"bad",content:C?void 0:"M",title:N})};s.defaultHooks=f.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),f=n(3939),b=n(321),S=n(5485),B=n(98595),k=r.PrisonerImplantManager=function(){function g(l,c){var m=(0,a.useBackend)(c),i=m.act,u=m.data,s=u.loginState,d=u.prisonerInfo,v=u.chemicalInfo,C=u.trackingInfo,h;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,S.LoginScreen)})});var p=[1,5,10];return(0,e.createComponentVNode)(2,B.Window,{theme:"security",width:500,height:850,children:[(0,e.createComponentVNode)(2,f.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:d.name?"eject":"id-card",selected:d.name,content:d.name?d.name:"-----",tooltip:d.name?"Eject ID":"Insert ID",onClick:function(){function N(){return i("id_card")}return N}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Points",children:[d.points!==null?d.points:"-/-",(0,e.createComponentVNode)(2,t.Button,{ml:2,icon:"minus-square",disabled:d.points===null,content:"Reset",onClick:function(){function N(){return i("reset_points")}return N}()})]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Point Goal",children:[d.goal!==null?d.goal:"-/-",(0,e.createComponentVNode)(2,t.Button,{ml:2,icon:"pen",disabled:d.goal===null,content:"Edit",onClick:function(){function N(){return(0,f.modalOpen)(c,"set_points")}return N}()})]}),(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:d.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:C.map(function(N){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: ",N.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:N.location}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Health",children:N.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,f.modalOpen)(c,"warn",{uid:N.uid})}return V}()})})]})]},N.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:v.map(function(N){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: ",N.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:N.volume})}),p.map(function(V){return(0,e.createComponentVNode)(2,t.Button,{mt:2,disabled:N.volumec;return(0,e.createComponentVNode)(2,t.ImageButton,{fluid:!0,title:N.name,dmIcon:N.icon,dmIconState:N.icon_state,buttonsAlt:(0,e.createComponentVNode)(2,t.Button,{bold:!0,translucent:!0,fontSize:1.5,tooltip:V&&"Not enough tickets",disabled:V,onClick:function(){function y(){return g("purchase",{purchase:N.itemID})}return y}(),children:[N.cost,(0,e.createComponentVNode)(2,t.Icon,{m:0,mt:.25,name:"ticket",color:V?"bad":"good",size:1.6})]}),children:N.desc},N.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),f=n(3939),b=n(49148),S=r.RCD=function(){function i(u,s){return(0,e.createComponentVNode)(2,o.Window,{width:480,height:670,children:[(0,e.createComponentVNode)(2,f.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,l),(0,e.createComponentVNode)(2,c)]})})]})}return i}(),B=function(u,s){var d=(0,a.useBackend)(s),v=d.data,C=v.matter,h=v.max_matter,p=h*.7,N=h*.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:[p,1/0],average:[N,p],bad:[-1/0,N]},value:C,maxValue:h,children:(0,e.createComponentVNode)(2,t.Stack.Item,{textAlign:"center",children:C+" / "+h+" 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,g,{mode_type:"Floors and Walls"}),(0,e.createComponentVNode)(2,g,{mode_type:"Airlocks"}),(0,e.createComponentVNode)(2,g,{mode_type:"Windows"}),(0,e.createComponentVNode)(2,g,{mode_type:"Deconstruction"})]})})})},g=function(u,s){var d=(0,a.useBackend)(s),v=d.act,C=d.data,h=u.mode_type,p=C.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:h,selected:p===h?1:0,onClick:function(){function N(){return v("mode",{mode:h})}return N}()})})},l=function(u,s){var d=(0,a.useBackend)(s),v=d.act,C=d.data,h=C.door_name,p=C.electrochromic,N=C.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,h,0)],0),onClick:function(){function V(){return(0,f.modalOpen)(s,"renameAirlock")}return V}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:N===1&&(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:p?"toggle-on":"toggle-off",content:"Electrochromic",selected:p,onClick:function(){function V(){return v("electrochromic")}return V}()})})]})})})},c=function(u,s){var d=(0,a.useBackend)(s),v=d.act,C=d.data,h=C.tab,p=C.locked,N=C.one_access,V=C.selected_accesses,y=C.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:h===1,onClick:function(){function I(){return v("set_tab",{tab:1})}return I}(),children:"Airlock Types"}),(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:h===2,icon:"list",onClick:function(){function I(){return v("set_tab",{tab:2})}return I}(),children:"Airlock Access"})]})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:h===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,m,{check_number:0})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,m,{check_number:1})})]})}):h===2&&p?(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 v("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 v("set_lock",{new_lock:"lock"})}return I}()}),usedByRcd:1,rcdButtons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button.Checkbox,{checked:N,content:"One",onClick:function(){function I(){return v("set_one_access",{access:"one"})}return I}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{checked:!N,width:4,content:"All",onClick:function(){function I(){return v("set_one_access",{access:"all"})}return I}()})],4),accesses:y,selectedList:V,accessMod:function(){function I(L){return v("set",{access:L})}return I}(),grantAll:function(){function I(){return v("grant_all")}return I}(),denyAll:function(){function I(){return v("clear_all")}return I}(),grantDep:function(){function I(L){return v("grant_region",{region:L})}return I}(),denyDep:function(){function I(L){return v("deny_region",{region:L})}return I}()})})],4)},m=function(u,s){for(var d=(0,a.useBackend)(s),v=d.act,C=d.data,h=C.door_types_ui_list,p=C.door_type,N=u.check_number,V=[],y=0;yf?w=(0,e.createComponentVNode)(2,t.Box,{color:"red",bold:!0,mb:1,children:"There are new 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 N("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:y>f?"envelope-open-text":"envelope",onClick:function(){function A(){return N("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 N("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 N("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 N("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 N("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 N("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 N("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 N("setScreen",{setScreen:8})}return A}()})})]})})},l=function(C,h){var p=(0,a.useBackend)(h),N=p.act,V=p.data,y=V.department,I=[],L;switch(C.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 N("setScreen",{setScreen:0})}return w}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:I.filter(function(w){return w!==y}).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 N("writeInput",{write:w,priority:S})}return A}()}),(0,e.createComponentVNode)(2,t.Button,{content:"High Priority",icon:"exclamation-circle",onClick:function(){function A(){return N("writeInput",{write:w,priority:B})}return A}()})]},w)})})})})},c=function(C,h){var p=(0,a.useBackend)(h),N=p.act,V=p.data,y;switch(C.type){case"SUCCESS":y="Message sent successfully";break;case"FAIL":y="Unable to contact messaging server";break}return(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:y,buttons:(0,e.createComponentVNode)(2,t.Button,{content:"Back",icon:"arrow-left",onClick:function(){function I(){return N("setScreen",{setScreen:0})}return I}()})})},m=function(C,h){var p=(0,a.useBackend)(h),N=p.act,V=p.data,y,I;switch(C.type){case"MESSAGES":y=V.message_log,I="Message Log";break;case"SHIPPING":y=V.shipping_log,I="Shipping label print log";break}return y.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 N("setScreen",{setScreen:0})}return L}()}),children:y.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)})})})},i=function(C,h){var p=(0,a.useBackend)(h),N=p.act,V=p.data,y=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 N("setScreen",{setScreen:0})}return A}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Recipient",children:y}),(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 N("department",{department:y})}return A}()})})})],4)},u=function(C,h){var p=(0,a.useBackend)(h),N=p.act,V=p.data,y=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 N("setScreen",{setScreen:0})}return L}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Edit Message",icon:"edit",onClick:function(){function L(){return N("writeAnnouncement")}return L}()})],4),children:y})}),(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&&y),onClick:function(){function L(){return N("sendAnnouncement")}return L}()})]})})],4)},s=function(C,h){var p=(0,a.useBackend)(h),N=p.act,V=p.data,y=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 N("setScreen",{setScreen:0})}return w}()}),children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Destination",children:y}),(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:!(y&&I),onClick:function(){function w(){return N("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:y===w?"Selected":"Select",selected:y===w,onClick:function(){function A(){return N("shipSelect",{shipSelect:w})}return A}()})},w)})})})})],4)},d=function(C,h){var p=(0,a.useBackend)(h),N=p.act,V=p.data,y=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 N("setScreen",{setScreen:0})}return L}()})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{children:[I?y?(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:!(y&&I),onClick:function(){function L(){return N("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),f=r.RndBackupConsole=function(){function S(B,k){var g=(0,a.useBackend)(k),l=g.act,c=g.data,m=c.network_name,i=c.has_disk,u=c.disk_name,s=c.linked,d=c.techs,v=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:m,icon:"unlink",selected:1,onClick:function(){function C(){return l("unlink")}return C}()}):"None"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Loaded Disk",children:i?(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{content:u+" (Last backup: "+v+")",icon:"save",selected:1,onClick:function(){function C(){return l("eject_disk")}return C}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"sign-in-alt",content:"Save all",onClick:function(){function C(){return l("saveall2disk")}return C}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"sign-out-alt",content:"Load all",onClick:function(){function C(){return l("saveall2network")}return C}()})],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(d).map(function(C){return!(d[C].network_level>0||d[C].disk_level>0)||(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:d[C].name}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:d[C].network_level||"None"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:d[C].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:!i||!s,onClick:function(){function h(){return l("savetech2network",{tech:C})}return h}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"sign-out-alt",content:"Load to disk",disabled:!i||!s,onClick:function(){function h(){return l("savetech2disk",{tech:C})}return h}()})]})]},C)})]})})})]})})}return S}(),b=r.LinkMenu=function(){function S(B,k){var g=(0,a.useBackend)(k),l=g.act,c=g.data,m=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"})]}),m.map(function(i){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:i.addr}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:i.net_id}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Link",icon:"link",onClick:function(){function u(){return l("linktonetworkcontroller",{target_controller:i.addr})}return u}()})})]},i.addr)})]})})}return S}()},68303:function(T,r,n){"use strict";r.__esModule=!0,r.AnalyzerMenu=void 0;var e=n(89005),a=n(35840),t=n(72253),o=n(36036),f=r.AnalyzerMenu=function(){function S(B,k){var g=(0,t.useBackend)(k),l=g.data,c=g.act,m=l.tech_levels,i=l.loaded_item,u=l.linked_analyzer,s=l.can_discover;return u?i?(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 d(){c("deconstruct")}return d}()}),(0,e.createComponentVNode)(2,o.Button,{content:"Eject",icon:"eject",onClick:function(){function d(){c("eject_item")}return d}()}),!s||(0,e.createComponentVNode)(2,o.Button,{content:"Discover",icon:"atom",onClick:function(){function d(){c("discover")}return d}()})],0),children:(0,e.createComponentVNode)(2,o.LabeledList,{children:(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Name",children:i.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"})]}),m.map(function(d){return(0,e.createComponentVNode)(2,b,{techLevel:d},d.id)})]})})],4):(0,e.createComponentVNode)(2,o.Section,{title:"Analysis Menu",children:"No item loaded. Standing by..."}):(0,e.createComponentVNode)(2,o.Section,{title:"Analysis Menu",children:"NO SCIENTIFIC ANALYZER LINKED TO CONSOLE"})}return S}(),b=function(B,k){var g=B.techLevel,l=g.name,c=g.desc,m=g.level,i=g.object_level,u=g.ui_icon,s=i!=null,d=s&&i>=m?Math.max(i,m+1):m;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:u})," ",l]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:m}),s?(0,e.createComponentVNode)(2,o.Table.Cell,{children:i}):(0,e.createComponentVNode)(2,o.Table.Cell,{className:"research-level-no-effect",children:"-"}),(0,e.createComponentVNode)(2,o.Table.Cell,{className:(0,a.classes)([d!==m&&"upgraded-level"]),children:d})]})}},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",f="tech",b=function(c,m){var i=(0,a.useBackend)(m),u=i.data,s=i.act,d=u.disk_data;return d?(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Name",children:d.name}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Level",children:d.level}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Description",children:d.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 v(){return s("updt_tech")}return v}()})})]}):null},S=function(c,m){var i=(0,a.useBackend)(m),u=i.data,s=i.act,d=u.disk_data;if(!d)return null;var v=d.name,C=d.lathe_types,h=d.materials,p=C.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:v}),p?(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Lathe Types",children:p}):null,(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Required Materials"})]}),h.map(function(N){return(0,e.createComponentVNode)(2,t.Box,{children:["- ",(0,e.createVNode)(1,"span",null,N.name,0,{style:{"text-transform":"capitalize"}})," x ",N.amount]},N.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 N(){return s("updt_design")}return N}()})})]})},B=function(c,m){var i=(0,a.useBackend)(m),u=i.act,s=i.data,d=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:!d,onClick:function(){function v(){return u("erase_disk")}return v}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Eject",icon:"eject",onClick:function(){function v(){u("eject_disk")}return v}()})],4)},c)))},k=function(c,m){var i=(0,a.useBackend)(m),u=i.data,s=i.act,d=u.disk_type,v=u.to_copy,C=c.title;return(0,e.createComponentVNode)(2,B,{title:C,children:(0,e.createComponentVNode)(2,t.Box,{overflowY:"auto",overflowX:"hidden",maxHeight:"450px",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:v.sort(function(h,p){return h.name.localeCompare(p.name)}).map(function(h){var p=h.name,N=h.id;return(0,e.createComponentVNode)(2,t.LabeledList.Item,{noColon:!0,label:p,children:(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-down",content:"Copy to Disk",onClick:function(){function V(){d===f?s("copy_tech",{id:N}):s("copy_design",{id:N})}return V}()})},N)})})})})},g=r.DataDiskMenu=function(){function l(c,m){var i=(0,a.useBackend)(m),u=i.data,s=u.disk_type,d=u.disk_data;if(!s)return(0,e.createComponentVNode)(2,t.Section,{title:"Data Disk",children:"No disk loaded."});switch(s){case o:return d?(0,e.createComponentVNode)(2,B,{title:"Design Disk",children:(0,e.createComponentVNode)(2,S)}):(0,e.createComponentVNode)(2,k,{title:"Design Disk"});case f:return d?(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 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),f=r.LatheCategory=function(){function b(S,B){var k=(0,a.useBackend)(B),g=k.data,l=k.act,c=g.category,m=g.matching_designs,i=g.menu,u=i===4,s=u?"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:m.map(function(d){var v=d.id,C=d.name,h=d.can_build,p=d.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:C,disabled:h<1,onClick:function(){function N(){return l(s,{id:v,amount:1})}return N}()})}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:h>=5?(0,e.createComponentVNode)(2,t.Button,{content:"x5",onClick:function(){function N(){return l(s,{id:v,amount:5})}return N}()}):null}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:h>=10?(0,e.createComponentVNode)(2,t.Button,{content:"x10",onClick:function(){function N(){return l(s,{id:v,amount:10})}return N}()}):null}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:p.map(function(N){return(0,e.createFragment)([" | ",(0,e.createVNode)(1,"span",N.is_red?"color-red":null,[N.amount,(0,e.createTextVNode)(" "),N.name],0)],0)})})]},v)})})]})}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 f(b,S){var B=(0,a.useBackend)(S),k=B.data,g=B.act,l=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 m(){var i=c?"disposeallP":"disposeallI";g(i)}return m}()}),(0,e.createComponentVNode)(2,t.LabeledList,{children:l.map(function(m){var i=m.volume,u=m.name,s=m.id;return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"* "+i+" of "+u,children:(0,e.createComponentVNode)(2,t.Button,{content:"Purge",icon:"trash",onClick:function(){function d(){var v=c?"disposeP":"disposeI";g(v,{id:s})}return d}()})},s)})})]})}return f}()},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),f=n(68198),b=r.LatheMainMenu=function(){function S(B,k){var g=(0,a.useBackend)(k),l=g.data,c=g.act,m=l.menu,i=l.categories,u=m===4?"Protolathe":"Circuit Imprinter";return(0,e.createComponentVNode)(2,t.Section,{title:u+" Menu",children:[(0,e.createComponentVNode)(2,o.LatheMaterials),(0,e.createComponentVNode)(2,f.LatheSearch),(0,e.createComponentVNode)(2,t.Divider),(0,e.createComponentVNode)(2,t.Flex,{wrap:"wrap",children:i.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 d(){c("setCategory",{category:s})}return d}()})},s)})})]})}return S}()},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 f(b,S){var B=(0,a.useBackend)(S),k=B.data,g=B.act,l=k.loaded_materials;return(0,e.createComponentVNode)(2,t.Section,{className:"RndConsole__LatheMaterialStorage",title:"Material Storage",children:(0,e.createComponentVNode)(2,t.Table,{children:l.map(function(c){var m=c.id,i=c.amount,u=c.name,s=function(){function h(p){var N=k.menu===4?"lathe_ejectsheet":"imprinter_ejectsheet";g(N,{id:m,amount:p})}return h}(),d=Math.floor(i/2e3),v=i<1,C=d===1?"":"s";return(0,e.createComponentVNode)(2,t.Table.Row,{className:v?"color-grey":"color-yellow",children:[(0,e.createComponentVNode)(2,t.Table.Cell,{minWidth:"210px",children:["* ",i," of ",u]}),(0,e.createComponentVNode)(2,t.Table.Cell,{minWidth:"110px",children:["(",d," sheet",C,")"]}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:i>=2e3?(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{content:"1x",icon:"eject",onClick:function(){function h(){return s(1)}return h}()}),(0,e.createComponentVNode)(2,t.Button,{content:"C",icon:"eject",onClick:function(){function h(){return s("custom")}return h}()}),i>=2e3*5?(0,e.createComponentVNode)(2,t.Button,{content:"5x",icon:"eject",onClick:function(){function h(){return s(5)}return h}()}):null,(0,e.createComponentVNode)(2,t.Button,{content:"All",icon:"eject",onClick:function(){function h(){return s(50)}return h}()})],0):null})]},m)})})})}return f}()},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 f(b,S){var B=(0,a.useBackend)(S),k=B.data,g=k.total_materials,l=k.max_materials,c=k.max_chemicals,m=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:g}),l?(0,e.createComponentVNode)(2,t.Table.Cell,{children:" / "+l}):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:m}),c?(0,e.createComponentVNode)(2,t.Table.Cell,{children:" / "+c}):null]})]})})}return f}()},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),f=n(70864),b=n(16830),S=n(42878),B=n(70497),k=["menu"];function g(u,s){if(u==null)return{};var d={};for(var v in u)if({}.hasOwnProperty.call(u,v)){if(s.includes(v))continue;d[v]=u[v]}return d}var l=t.Tabs.Tab,c=function(s,d){var v=(0,a.useBackend)(d),C=v.act,h=v.data,p=h.menu===o.MENU.LATHE?["nav_protolathe",h.submenu_protolathe]:["nav_imprinter",h.submenu_imprinter],N=p[0],V=p[1],y=s.menu,I=g(s,k);return(0,e.normalizeProps)((0,e.createComponentVNode)(2,l,Object.assign({selected:V===y,onClick:function(){function L(){return C(N,{menu:y})}return L}()},I)))},m=function(s){switch(s){case o.PRINTER_MENU.MAIN:return(0,e.createComponentVNode)(2,f.LatheMainMenu);case o.PRINTER_MENU.SEARCH:return(0,e.createComponentVNode)(2,b.LatheCategory);case o.PRINTER_MENU.MATERIALS:return(0,e.createComponentVNode)(2,S.LatheMaterialStorage);case o.PRINTER_MENU.CHEMICALS:return(0,e.createComponentVNode)(2,B.LatheChemicalStorage)}},i=r.LatheMenu=function(){function u(s,d){var v=(0,a.useBackend)(d),C=v.data,h=C.menu,p=C.linked_lathe,N=C.linked_imprinter;return h===o.MENU.LATHE&&!p?(0,e.createComponentVNode)(2,t.Box,{children:"NO PROTOLATHE LINKED TO CONSOLE"}):h===o.MENU.IMPRINTER&&!N?(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"})]}),m(C.menu===o.MENU.LATHE?C.submenu_protolathe:C.submenu_imprinter)]})}return u}()},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 f(b,S){var B=(0,a.useBackend)(S),k=B.act;return(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Input,{placeholder:"Search...",onEnter:function(){function g(l,c){return k("search",{to_search:c})}return g}()})})}return f}()},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),f=r.LinkMenu=function(){function b(S,B){var k=(0,a.useBackend)(B),g=k.act,l=k.data,c=l.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(m){return(0,e.createComponentVNode)(2,o.Table.Row,{children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:m.addr}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:m.net_id}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:(0,e.createComponentVNode)(2,o.Button,{content:"Link",icon:"link",onClick:function(){function i(){return g("linktonetworkcontroller",{target_controller:m.addr})}return i}()})})]},m.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 S(B,k){return(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,f),(0,e.createComponentVNode)(2,b)]})}return S}(),f=function(B,k){var g=(0,a.useBackend)(k),l=g.act,c=g.data,m=c.sync,i=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 u(){l("unlink")}return u}()})})})},b=function(B,k){var g=(0,a.useBackend)(k),l=g.data,c=g.act,m=l.linked_analyzer,i=l.linked_lathe,u=l.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:"Scientific Analyzer",children:(0,e.createComponentVNode)(2,t.Button,{icon:"unlink",disabled:!m,content:m?"Unlink":"Undetected",onClick:function(){function s(){return c("disconnect",{item:"analyze"})}return s}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Protolathe",children:(0,e.createComponentVNode)(2,t.Button,{icon:"unlink",disabled:!i,content:i?"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:!u,content:u?"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),f=n(35840),b=n(37556),S=n(9681),B=n(81421),k=n(6256),g=n(68303),l=["menu"];function c(p,N){if(p==null)return{};var V={};for(var y in p)if({}.hasOwnProperty.call(p,y)){if(N.includes(y))continue;V[y]=p[y]}return V}var m=o.Tabs.Tab,i=r.MENU={MAIN:0,DISK:2,ANALYZE:3,LATHE:4,IMPRINTER:5,SETTINGS:6},u=r.PRINTER_MENU={MAIN:0,SEARCH:1,MATERIALS:2,CHEMICALS:3},s=function(N){switch(N){case i.MAIN:return(0,e.createComponentVNode)(2,h);case i.DISK:return(0,e.createComponentVNode)(2,b.DataDiskMenu);case i.ANALYZE:return(0,e.createComponentVNode)(2,g.AnalyzerMenu);case i.LATHE:case i.IMPRINTER:return(0,e.createComponentVNode)(2,S.LatheMenu);case i.SETTINGS:return(0,e.createComponentVNode)(2,k.SettingsMenu);default:return"UNKNOWN MENU"}},d=function(N,V){var y=(0,a.useBackend)(V),I=y.act,L=y.data,w=L.menu,A=N.menu,x=c(N,l);return(0,e.normalizeProps)((0,e.createComponentVNode)(2,m,Object.assign({selected:w===A,onClick:function(){function E(){return I("nav",{menu:A})}return E}()},x)))},v=r.RndConsole=function(){function p(N,V){var y=(0,a.useBackend)(V),I=y.act,L=y.data;if(!L.linked)return(0,e.createComponentVNode)(2,B.LinkMenu);var w=L.menu,A=L.linked_analyzer,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,d,{icon:"flask",menu:i.MAIN,children:"Research"}),!!A&&(0,e.createComponentVNode)(2,d,{icon:"microscope",menu:i.ANALYZE,children:"Analyze"}),!!x&&(0,e.createComponentVNode)(2,d,{icon:"print",menu:i.LATHE,children:"Protolathe"}),!!E&&(0,e.createComponentVNode)(2,d,{icon:"memory",menu:i.IMPRINTER,children:"Imprinter"}),(0,e.createComponentVNode)(2,d,{icon:"floppy-disk",menu:i.DISK,children:"Disk"}),(0,e.createComponentVNode)(2,d,{icon:"cog",menu:i.SETTINGS,children:"Settings"})]}),s(w),(0,e.createComponentVNode)(2,C)]})})})}return p}(),C=function(N,V){var y=(0,a.useBackend)(V),I=y.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},h=function(N,V){var y=(0,a.useBackend)(V),I=y.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,D=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:D})," ",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),f=n(98595),b=r.RndNetController=function(){function k(g,l){var c=(0,t.useBackend)(l),m=c.act,i=c.data,u=i.ion,s=(0,t.useLocalState)(l,"mainTabIndex",0),d=s[0],v=s[1],C=function(){function h(p){switch(p){case 0:return(0,e.createComponentVNode)(2,S);case 1:return(0,e.createComponentVNode)(2,B);default:return"SOMETHING WENT VERY WRONG PLEASE AHELP"}}return h}();return(0,e.createComponentVNode)(2,f.Window,{width:900,height:600,children:(0,e.createComponentVNode)(2,f.Window.Content,{scrollable:!0,children:[(0,e.createComponentVNode)(2,o.Tabs,{children:[(0,e.createComponentVNode)(2,o.Tabs.Tab,{icon:"wrench",selected:d===0,onClick:function(){function h(){return v(0)}return h}(),children:"Network Management"},"ConfigPage"),(0,e.createComponentVNode)(2,o.Tabs.Tab,{icon:"floppy-disk",selected:d===1,onClick:function(){function h(){return v(1)}return h}(),children:"Design Management"},"DesignPage")]}),C(d)]})})}return k}(),S=function(g,l){var c=(0,t.useBackend)(l),m=c.act,i=c.data,u=(0,t.useLocalState)(l,"filterType","ALL"),s=u[0],d=u[1],v=i.network_password,C=i.network_name,h=i.devices,p=[];p.push(s),s==="MSC"&&(p.push("BCK"),p.push("PGN"));var N=s==="ALL"?h:h.filter(function(V){return p.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:C||"Unset",selected:C,icon:"edit",onClick:function(){function V(){return m("network_name")}return V}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Network Password",children:(0,e.createComponentVNode)(2,o.Button,{content:v||"Unset",selected:v,icon:"lock",onClick:function(){function V(){return m("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 d("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 d("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 d("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 d("MFB")}return V}(),icon:"industry",children:"Exosuit Fabricators"},"Mechfabs"),(0,e.createComponentVNode)(2,o.Tabs.Tab,{selected:s==="MSC",onClick:function(){function V(){return d("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"})]}),N.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 y(){return m("unlink_device",{dclass:V.dclass,uid:V.id})}return y}()})})]},V.id)})]})]})],4)},B=function(g,l){var c=(0,t.useBackend)(l),m=c.act,i=c.data,u=i.designs,s=(0,t.useLocalState)(l,"searchText",""),d=s[0],v=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 C(h,p){return v(p)}return C}()}),u.filter((0,a.createSearch)(d,function(C){return C.name})).map(function(C){return(0,e.createComponentVNode)(2,o.Button.Checkbox,{fluid:!0,content:C.name,checked:!C.blacklisted,onClick:function(){function h(){return m(C.blacklisted?"unblacklist_design":"blacklist_design",{d_uid:C.uid})}return h}()},C.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),f=n(98595),b=r.RndServer=function(){function k(g,l){var c=(0,a.useBackend)(l),m=c.act,i=c.data,u=i.active,s=i.network_name;return(0,e.createComponentVNode)(2,f.Window,{width:600,height:500,resizable:!0,children:(0,e.createComponentVNode)(2,f.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:u?"On":"Off",selected:u,icon:"power-off",onClick:function(){function d(){return m("toggle_active")}return d}()})}),(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,S)]})})}return k}(),S=function(g,l){var c=(0,a.useBackend)(l),m=c.act,i=c.data,u=i.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:u}),(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 m("unlink")}return s}()})})]})})},B=function(g,l){var c=(0,a.useBackend)(l),m=c.act,i=c.data,u=i.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"})]}),u.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 d(){return m("link",{addr:s.addr})}return d}()})})]},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),f=n(25328),b=function(k,g){var l=k/g;return l<=.2?"good":l<=.5?"average":"bad"},S=r.RobotSelfDiagnosis=function(){function B(k,g){var l=(0,a.useBackend)(g),c=l.data,m=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:m.map(function(i,u){return(0,e.createComponentVNode)(2,t.Section,{title:(0,f.capitalize)(i.name),children:i.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:i.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(i.brute_damage,i.max_damage),children:i.brute_damage}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Burn Damage",color:b(i.electronic_damage,i.max_damage),children:i.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:i.powered?"good":"bad",children:i.powered?"Yes":"No"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Enabled",color:i.status?"good":"bad",children:i.status?"Yes":"No"})]})})]})},u)})})})}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),f=r.RoboticsControlConsole=function(){function S(B,k){var g=(0,a.useBackend)(k),l=g.act,c=g.data,m=c.can_hack,i=c.safety,u=c.show_lock_all,s=c.cyborgs,d=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:[!!u&&(0,e.createComponentVNode)(2,t.Section,{title:"Emergency Lock Down",children:[(0,e.createComponentVNode)(2,t.Button,{icon:i?"lock":"unlock",content:i?"Disable Safety":"Enable Safety",selected:i,onClick:function(){function v(){return l("arm",{})}return v}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"lock",disabled:i,content:"Lock ALL Cyborgs",color:"bad",onClick:function(){function v(){return l("masslock",{})}return v}()})]}),(0,e.createComponentVNode)(2,b,{cyborgs:d,can_hack:m})]})})}return S}(),b=function(B,k){var g=B.cyborgs,l=B.can_hack,c=(0,a.useBackend)(k),m=c.act,i=c.data,u="Detonate";return i.detonate_cooldown>0&&(u+=" ("+i.detonate_cooldown+"s)"),g.length?g.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 d(){return m("hackbot",{uid:s.uid})}return d}()}),(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:!i.auth,onClick:function(){function d(){return m("stopbot",{uid:s.uid})}return d}()}),(0,e.createComponentVNode)(2,t.Button.Confirm,{icon:"bomb",content:u,disabled:!i.auth||i.detonate_cooldown>0,color:"bad",onClick:function(){function d(){return m("killbot",{uid:s.uid})}return d}()})],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),f=r.Safe=function(){function k(g,l){var c=(0,a.useBackend)(l),m=c.act,i=c.data,u=i.dial,s=i.open,d=i.locked,v=i.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,S):(0,e.createComponentVNode)(2,t.Box,{as:"img",className:"Safe--dial",src:"safe_dial.png",style:{transform:"rotate(-"+3.6*u+"deg)","z-index":0}})]}),!s&&(0,e.createComponentVNode)(2,B)]})})}return k}(),b=function(g,l){var c=(0,a.useBackend)(l),m=c.act,i=c.data,u=i.dial,s=i.open,d=i.locked,v=function(h,p){return(0,e.createComponentVNode)(2,t.Button,{disabled:s||p&&!d,icon:"arrow-"+(p?"right":"left"),content:(p?"Right":"Left")+" "+h,iconRight:p,onClick:function(){function N(){return m(p?"turnleft":"turnright",{num:h})}return N}(),style:{"z-index":10}})};return(0,e.createComponentVNode)(2,t.Box,{className:"Safe--dialer",children:[(0,e.createComponentVNode)(2,t.Button,{disabled:d,icon:s?"lock":"lock-open",content:s?"Close":"Open",mb:"0.5rem",onClick:function(){function C(){return m("open")}return C}()}),(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,t.Box,{position:"absolute",children:[v(50),v(10),v(1)]}),(0,e.createComponentVNode)(2,t.Box,{className:"Safe--dialer--right",position:"absolute",right:"5px",children:[v(1,!0),v(10,!0),v(50,!0)]}),(0,e.createComponentVNode)(2,t.Box,{className:"Safe--dialer--number",children:u})]})},S=function(g,l){var c=(0,a.useBackend)(l),m=c.act,i=c.data,u=i.contents;return(0,e.createComponentVNode)(2,t.Box,{className:"Safe--contents",overflow:"auto",children:u.map(function(s,d){return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{mb:"0.5rem",onClick:function(){function v(){return m("retrieve",{index:d+1})}return v}(),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(g,l){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.SatelliteControlSatellitesList=r.SatelliteControlMapView=r.SatelliteControlFooter=r.SatelliteControl=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.SatelliteControl=function(){function k(g,l){var c=(0,a.useBackend)(l),m=c.act,i=c.data,u=(0,a.useLocalState)(l,"tabIndex",i.tabIndex),s=u[0],d=u[1],v=function(){function h(p){d(p),m("set_tab_index",{tab_index:p})}return h}(),C=function(){function h(p){switch(p){case 0:return(0,e.createComponentVNode)(2,b);case 1:return(0,e.createComponentVNode)(2,S);default:return"WE SHOULDN'T BE HERE!"}}return h}();return(0,e.createComponentVNode)(2,o.Window,{width:800,height:600,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(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.Tabs,{children:[(0,e.createComponentVNode)(2,t.Tabs.Tab,{icon:"table",selected:s===0,onClick:function(){function h(){return v(0)}return h}(),children:"Satellites"},"Satellites"),(0,e.createComponentVNode)(2,t.Tabs.Tab,{icon:"map-marked-alt",selected:s===1,onClick:function(){function h(){return v(1)}return h}(),children:"Map View"},"MapView")]})}),C(s),(0,e.createComponentVNode)(2,B)]})})})}return k}(),b=r.SatelliteControlSatellitesList=function(){function k(g,l){var c=(0,a.useBackend)(l),m=c.act,i=c.data,u=i.satellites;return(0,e.createComponentVNode)(2,t.Section,{title:"Satellite Network Control",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:u.map(function(s){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"#"+s.id,children:[s.mode," ",(0,e.createComponentVNode)(2,t.Button,{content:s.active?"Deactivate":"Activate",icon:"arrow-circle-right",onClick:function(){function d(){return m("toggle",{id:s.id})}return d}()})]},s.id)})})})}return k}(),S=r.SatelliteControlMapView=function(){function k(g,l){var c=(0,a.useBackend)(l),m=c.act,i=c.data,u=i.satellites,s=i.has_goal,d=i.defended,v=i.collisions,C=i.fake_meteors,h=i.zoom,p=i.offsetX,N=i.offsetY,V=0;return(0,e.createComponentVNode)(2,t.Box,{height:"100vh",mb:"0.5rem",overflow:"hidden",children:(0,e.createComponentVNode)(2,t.NanoMap,{zoom:h,offsetX:p,offsetY:N,onZoom:function(){function y(I){return m("set_zoom",{zoom:I})}return y}(),onOffsetChange:function(){function y(I,L){return m("set_offset",{offset_x:L.offsetX,offset_y:L.offsetY})}return y}(),children:[u.map(function(y){return(0,e.createComponentVNode)(2,t.NanoMap.MarkerIcon,{x:y.x,y:y.y,icon:"satellite",tooltip:y.active?"Shield Satellite":"Inactive Shield Satellite",color:y.active?"white":"grey",onClick:function(){function I(){return m("toggle",{id:y.id})}return I}()},V++)}),s&&d.map(function(y){return(0,e.createComponentVNode)(2,t.NanoMap.MarkerIcon,{x:y.x,y:y.y,icon:"circle",tooltip:"Successful Defense",color:"blue"},V++)}),s&&v.map(function(y){return(0,e.createComponentVNode)(2,t.NanoMap.MarkerIcon,{x:y.x,y:y.y,icon:"x",tooltip:"Meteor Hit",color:"red"},V++)}),s&&C.map(function(y){return(0,e.createComponentVNode)(2,t.NanoMap.MarkerIcon,{x:y.x,y:y.y,icon:"meteor",tooltip:"Incoming Meteor",color:"white"},V++)})]})})}return k}(),B=r.SatelliteControlFooter=function(){function k(g,l){var c=(0,a.useBackend)(l),m=c.act,i=c.data,u=i.notice,s=i.notice_color,d=i.has_goal,v=i.coverage,C=i.coverage_goal,h=i.testing;return(0,e.createFragment)([d&&(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Station Shield Coverage",children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,horizontal:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{grow:1,children:(0,e.createComponentVNode)(2,t.ProgressBar,{color:v>=C?"good":"average",value:v,maxValue:100,children:[v,"%"]})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Check coverage",disabled:h,onClick:function(){function p(){return m("begin_test")}return p}()})})]})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{color:s,children:u})],0)}return k}()},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),f=n(98595),b=n(36352),S=n(92986),B=r.SecureStorage=function(){function c(m,i){return(0,e.createComponentVNode)(2,f.Window,{theme:"securestorage",height:500,width:280,children:(0,e.createComponentVNode)(2,f.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,g)})})})})}return c}(),k=function(m,i){var u=(0,t.useBackend)(i),s=u.act,d=window.event?m.which:m.keyCode;if(d===S.KEY_ENTER){m.preventDefault(),s("keypad",{digit:"E"});return}if(d===S.KEY_ESCAPE){m.preventDefault(),s("keypad",{digit:"C"});return}if(d===S.KEY_BACKSPACE){m.preventDefault(),s("backspace");return}if(d>=S.KEY_0&&d<=S.KEY_9){m.preventDefault(),s("keypad",{digit:d-S.KEY_0});return}if(d>=S.KEY_NUMPAD_0&&d<=S.KEY_NUMPAD_9){m.preventDefault(),s("keypad",{digit:d-S.KEY_NUMPAD_0});return}},g=function(m,i){var u=(0,t.useBackend)(i),s=u.act,d=u.data,v=d.locked,C=d.no_passcode,h=d.emagged,p=d.user_entered_code,N=[["1","2","3"],["4","5","6"],["7","8","9"],["C","0","E"]],V=C?"":v?"bad":"good";return(0,e.createComponentVNode)(2,o.Section,{fill:!0,onKeyDown:function(){function y(I){return k(I,i)}return y}(),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:h?"ERROR":p})}),(0,e.createComponentVNode)(2,o.Table,{children:N.map(function(y){return(0,e.createComponentVNode)(2,b.TableRow,{children:y.map(function(I){return(0,e.createComponentVNode)(2,b.TableCell,{children:(0,e.createComponentVNode)(2,l,{number:I})},I)})},y[0])})})]})},l=function(m,i){var u=(0,t.useBackend)(i),s=u.act,d=u.data,v=m.number;return(0,e.createComponentVNode)(2,o.Button,{fluid:!0,bold:!0,mb:"6px",content:v,textAlign:"center",fontSize:"60px",lineHeight:1.25,width:"80px",className:(0,a.classes)(["SecureStorage__Button","SecureStorage__Button--keypad","SecureStorage__Button--"+v]),onClick:function(){function C(){return s("keypad",{digit:v})}return C}()})}},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),f=n(98595),b=n(3939),S=n(321),B=n(5485),k=n(22091),g={"*Execute*":"execute","*Arrest*":"arrest",Incarcerated:"incarcerated",Parolled:"parolled",Released:"released",Demote:"demote",Search:"search",Monitor:"monitor"},l=function(p,N){(0,b.modalOpen)(p,"edit",{field:N.edit,value:N.value})},c=r.SecurityRecords=function(){function h(p,N){var V=(0,t.useBackend)(N),y=V.act,I=V.data,L=I.loginState,w=I.currentPage,A;if(L.logged_in)w===1?A=(0,e.createComponentVNode)(2,i):w===2&&(A=(0,e.createComponentVNode)(2,d));else return(0,e.createComponentVNode)(2,f.Window,{theme:"security",width:800,height:900,children:(0,e.createComponentVNode)(2,f.Window.Content,{children:(0,e.createComponentVNode)(2,B.LoginScreen)})});return(0,e.createComponentVNode)(2,f.Window,{theme:"security",width:800,height:900,children:[(0,e.createComponentVNode)(2,b.ComplexModal),(0,e.createComponentVNode)(2,f.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,S.LoginInfo),(0,e.createComponentVNode)(2,k.TemporaryNotice),(0,e.createComponentVNode)(2,m),A]})})]})}return h}(),m=function(p,N){var V=(0,t.useBackend)(N),y=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 y("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]})]})})},i=function(p,N){var V=(0,t.useBackend)(N),y=V.act,I=V.data,L=I.records,w=(0,t.useLocalState)(N,"searchText",""),A=w[0],x=w[1],E=(0,t.useLocalState)(N,"sortId","name"),P=E[0],D=E[1],M=(0,t.useLocalState)(N,"sortOrder",!0),R=M[0],O=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,u,{id:"name",children:"Name"}),(0,e.createComponentVNode)(2,u,{id:"id",children:"ID"}),(0,e.createComponentVNode)(2,u,{id:"rank",children:"Assignment"}),(0,e.createComponentVNode)(2,u,{id:"fingerprint",children:"Fingerprint"}),(0,e.createComponentVNode)(2,u,{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,_){var U=R?1:-1;return F[P].localeCompare(_[P])*U}).map(function(F){return(0,e.createComponentVNode)(2,o.Table.Row,{className:"SecurityRecords__listRow--"+g[F.status],onClick:function(){function _(){return y("view",{uid_gen:F.uid_gen,uid_sec:F.uid_sec})}return _}(),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)},u=function(p,N){var V=(0,t.useLocalState)(N,"sortId","name"),y=V[0],I=V[1],L=(0,t.useLocalState)(N,"sortOrder",!0),w=L[0],A=L[1],x=p.id,E=p.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:y!==x&&"transparent",fluid:!0,onClick:function(){function P(){y===x?A(!w):(I(x),A(!0))}return P}(),children:[E,y===x&&(0,e.createComponentVNode)(2,o.Icon,{name:w?"sort-up":"sort-down",ml:"0.25rem;"})]})})})},s=function(p,N){var V=(0,t.useBackend)(N),y=V.act,I=V.data,L=I.isPrinting,w=(0,t.useLocalState)(N,"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 y("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)(N,"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,D){return x(D)}return E}()})})]})},d=function(p,N){var V=(0,t.useBackend)(N),y=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 y("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 y("delete_general")}return x}()})],4),children:(0,e.createComponentVNode)(2,v)})}),!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 y("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 y("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 l(N,x)}return P}()})]},E)})})})})}),(0,e.createComponentVNode)(2,C)],4)],0)},v=function(p,N){var V=(0,t.useBackend)(N),y=V.data,I=y.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 l(N,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)})]})},C=function(p,N){var V=(0,t.useBackend)(N),y=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)(N,"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 y("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),f=n(98595),b=n(3939);function S(u,s){var d=typeof Symbol!="undefined"&&u[Symbol.iterator]||u["@@iterator"];if(d)return(d=d.call(u)).next.bind(d);if(Array.isArray(u)||(d=B(u))||s&&u&&typeof u.length=="number"){d&&(u=d);var v=0;return function(){return v>=u.length?{done:!0}:{done:!1,value:u[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(u,s){if(u){if(typeof u=="string")return k(u,s);var d={}.toString.call(u).slice(8,-1);return d==="Object"&&u.constructor&&(d=u.constructor.name),d==="Map"||d==="Set"?Array.from(u):d==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(d)?k(u,s):void 0}}function k(u,s){(s==null||s>u.length)&&(s=u.length);for(var d=0,v=Array(s);d=A},C=function(w,A){return w<=A},h=s.split(" "),p=[],N=function(){var w=I.value,A=w.split(":");if(A.length===0)return 0;if(A.length===1)return p.push(function(P){return(P.name+" ("+P.variant+")").toLocaleLowerCase().includes(A[0].toLocaleLowerCase())}),0;if(A.length>2)return{v:function(){function P(D){return!1}return P}()};var x,E=d;if(A[1][A[1].length-1]==="-"?(E=C,x=Number(A[1].substring(0,A[1].length-1))):A[1][A[1].length-1]==="+"?(E=v,x=Number(A[1].substring(0,A[1].length-1))):x=Number(A[1]),isNaN(x))return{v:function(){function P(D){return!1}return P}()};switch(A[0].toLocaleLowerCase()){case"l":case"life":case"lifespan":p.push(function(P){return E(P.lifespan,x)});break;case"e":case"end":case"endurance":p.push(function(P){return E(P.endurance,x)});break;case"m":case"mat":case"maturation":p.push(function(P){return E(P.maturation,x)});break;case"pr":case"prod":case"production":p.push(function(P){return E(P.production,x)});break;case"y":case"yield":p.push(function(P){return E(P.yield,x)});break;case"po":case"pot":case"potency":p.push(function(P){return E(P.potency,x)});break;case"s":case"stock":case"c":case"count":case"a":case"amount":p.push(function(P){return E(P.amount,x)});break;default:return{v:function(){function P(D){return!1}return P}()}}},V,y=S(h),I;!(I=y()).done;)if(V=N(),V!==0&&V)return V.v;return function(L){for(var w=0,A=p;w=1?Number(E):1)}return A}()})]})]})}},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),f=r.ShuttleConsole=function(){function b(S,B){var k=(0,a.useBackend)(B),g=k.act,l=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:l.status?l.status:(0,e.createComponentVNode)(2,t.NoticeBox,{color:"red",children:"Shuttle Missing"})}),!!l.shuttle&&(!!l.docking_ports_len&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Send to ",children:l.docking_ports.map(function(c){return(0,e.createComponentVNode)(2,t.Button,{icon:"chevron-right",content:c.name,onClick:function(){function m(){return g("move",{move:c.id})}return m}()},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"})}),!!l.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:!l.status,onClick:function(){function c(){return g("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),f=r.ShuttleManipulator=function(){function k(g,l){var c=(0,a.useLocalState)(l,"tabIndex",0),m=c[0],i=c[1],u=function(){function s(d){switch(d){case 0:return(0,e.createComponentVNode)(2,b);case 1:return(0,e.createComponentVNode)(2,S);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:m===0,onClick:function(){function s(){return i(0)}return s}(),icon:"info-circle",children:"Status"},"Status"),(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:m===1,onClick:function(){function s(){return i(1)}return s}(),icon:"file-import",children:"Templates"},"Templates"),(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:m===2,onClick:function(){function s(){return i(2)}return s}(),icon:"tools",children:"Modification"},"Modification")]}),u(m)]})})})}return k}(),b=function(g,l){var c=(0,a.useBackend)(l),m=c.act,i=c.data,u=i.shuttles;return(0,e.createComponentVNode)(2,t.Box,{children:u.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 d(){return m("jump_to",{type:"mobile",id:s.id})}return d}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Fast Travel",icon:"fast-forward",onClick:function(){function d(){return m("fast_travel",{id:s.id})}return d}()})]})]})},s.name)})})},S=function(g,l){var c=(0,a.useBackend)(l),m=c.act,i=c.data,u=i.templates_tabs,s=i.existing_shuttle,d=i.templates;return(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Tabs,{children:u.map(function(v){return(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:v===s.id,icon:"file",onClick:function(){function C(){return m("select_template_category",{cat:v})}return C}(),children:v},v)})}),!!s&&d[s.id].templates.map(function(v){return(0,e.createComponentVNode)(2,t.Section,{title:v.name,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[v.description&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Description",children:v.description}),v.admin_notes&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Admin Notes",children:v.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 C(){return m("select_template",{shuttle_id:v.shuttle_id})}return C}()})})]})},v.name)})]})},B=function(g,l){var c=(0,a.useBackend)(l),m=c.act,i=c.data,u=i.existing_shuttle,s=i.selected;return(0,e.createComponentVNode)(2,t.Box,{children:[u?(0,e.createComponentVNode)(2,t.Section,{title:"Selected Shuttle: "+u.name,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",children:u.status}),u.timer&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Timer",children:u.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 d(){return m("jump_to",{type:"mobile",id:u.id})}return d}()})})]})}):(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 d(){return m("preview",{shuttle_id:s.shuttle_id})}return d}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Load",icon:"download",onClick:function(){function d(){return m("load",{shuttle_id:s.shuttle_id})}return d}()})]})]})}):(0,e.createComponentVNode)(2,t.Section,{title:"Selected Template: None"})]})}},86013:function(T,r,n){"use strict";r.__esModule=!0,r.SingularityMonitor=void 0;var e=n(89005),a=n(88510),t=n(64795),o=n(44879),f=n(72253),b=n(36036),S=n(76910),B=n(98595),k=n(36352),g=r.SingularityMonitor=function(){function i(u,s){var d=(0,f.useBackend)(s),v=d.act,C=d.data;return C.active===0?(0,e.createComponentVNode)(2,c):(0,e.createComponentVNode)(2,m)}return i}(),l=function(u){return Math.log2(16+Math.max(0,u))-4},c=function(u,s){var d=(0,f.useBackend)(s),v=d.act,C=d.data,h=C.singularities,p=h===void 0?[]:h;return(0,e.createComponentVNode)(2,B.Window,{width:450,height:185,children:(0,e.createComponentVNode)(2,B.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,b.Section,{fill:!0,title:"Detected Singularities",buttons:(0,e.createComponentVNode)(2,b.Button,{icon:"sync",content:"Refresh",onClick:function(){function N(){return v("refresh")}return N}()}),children:(0,e.createComponentVNode)(2,b.Table,{children:p.map(function(N){return(0,e.createComponentVNode)(2,b.Table.Row,{children:[(0,e.createComponentVNode)(2,b.Table.Cell,{children:N.singularity_id+". "+N.area_name}),(0,e.createComponentVNode)(2,b.Table.Cell,{collapsing:!0,color:"label",children:"Stage:"}),(0,e.createComponentVNode)(2,b.Table.Cell,{collapsing:!0,width:"120px",children:(0,e.createComponentVNode)(2,b.ProgressBar,{value:N.stage,minValue:0,maxValue:6,ranges:{good:[1,2],average:[3,4],bad:[5,6]},children:(0,o.toFixed)(N.stage)})}),(0,e.createComponentVNode)(2,b.Table.Cell,{collapsing:!0,children:(0,e.createComponentVNode)(2,b.Button,{content:"Details",onClick:function(){function V(){return v("view",{view:N.singularity_id})}return V}()})})]},N.singularity_id)})})})})})},m=function(u,s){var d=(0,f.useBackend)(s),v=d.act,C=d.data,h=C.active,p=C.singulo_stage,N=C.singulo_potential_stage,V=C.singulo_energy,y=C.singulo_high,I=C.singulo_low,L=C.generators,w=L===void 0?[]:L;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:"Stage",children:(0,e.createComponentVNode)(2,b.ProgressBar,{value:p,minValue:0,maxValue:6,ranges:{good:[1,2],average:[3,4],bad:[5,6]},children:(0,o.toFixed)(p)})}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Potential Stage",children:(0,e.createComponentVNode)(2,b.ProgressBar,{value:N,minValue:0,maxValue:6,ranges:{good:[1,p+.5],average:[p+.5,p+1.5],bad:[p+1.5,p+2]},children:(0,o.toFixed)(N)})}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Energy",children:(0,e.createComponentVNode)(2,b.ProgressBar,{value:V,minValue:I,maxValue:y,ranges:{good:[.67*y+.33*I,y],average:[.33*y+.67*I,.67*y+.33*I],bad:[I,.33*y+.67*I]},children:(0,o.toFixed)(V)+"MJ"})})]})})}),(0,e.createComponentVNode)(2,b.Stack.Item,{grow:!0,basis:0,children:(0,e.createComponentVNode)(2,b.Section,{fill:!0,scrollable:!0,title:"Field Generators",buttons:(0,e.createComponentVNode)(2,b.Button,{icon:"arrow-left",content:"Back",onClick:function(){function A(){return v("back")}return A}()}),children:(0,e.createComponentVNode)(2,b.LabeledList,{children:w.map(function(A){return(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Remaining Charge",children:(0,e.createComponentVNode)(2,b.ProgressBar,{value:A.charge,minValue:0,maxValue:125,ranges:{good:[80,125],average:[30,80],bad:[0,30]},children:(0,o.toFixed)(A.charge)})},A.gen_index)})})})})]})})})}},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),f=n(98595),b=[["good","Alive"],["average","Critical"],["bad","DEAD"]],S=[["Resp.","oxyLoss"],["Toxin","toxLoss"],["Brute","bruteLoss"],["Burn","fireLoss"]],B={average:[.25,.5],bad:[.5,1/0]},k=["bad","average","average","good","average","average","bad"],g=r.Sleeper=function(){function d(v,C){var h=(0,t.useBackend)(C),p=h.act,N=h.data,V=N.hasOccupant,y=V?(0,e.createComponentVNode)(2,l):(0,e.createComponentVNode)(2,s);return(0,e.createComponentVNode)(2,f.Window,{width:550,height:760,children:(0,e.createComponentVNode)(2,f.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:y}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,i)})]})})})}return d}(),l=function(v,C){var h=(0,t.useBackend)(C),p=h.act,N=h.data,V=N.occupant;return(0,e.createFragment)([(0,e.createComponentVNode)(2,c),(0,e.createComponentVNode)(2,m),(0,e.createComponentVNode)(2,u)],4)},c=function(v,C){var h=(0,t.useBackend)(C),p=h.act,N=h.data,V=N.occupant,y=N.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:y?"toggle-on":"toggle-off",selected:y,content:y?"On":"Off",onClick:function(){function I(){return p("auto_eject_dead_"+(y?"off":"on"))}return I}()}),(0,e.createComponentVNode)(2,o.Button,{icon:"user-slash",content:"Eject",onClick:function(){function I(){return p("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)]})})},m=function(v,C){var h=(0,t.useBackend)(C),p=h.data,N=p.occupant;return(0,e.createComponentVNode)(2,o.Section,{title:"Occupant Damage",children:(0,e.createComponentVNode)(2,o.LabeledList,{children:S.map(function(V,y){return(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:V[0],children:(0,e.createComponentVNode)(2,o.ProgressBar,{min:"0",max:"100",value:N[V[1]]/100,ranges:B,children:(0,a.round)(N[V[1]],0)},y)},y)})})})},i=function(v,C){var h=(0,t.useBackend)(C),p=h.act,N=h.data,V=N.hasOccupant,y=N.isBeakerLoaded,I=N.beakerMaxSpace,L=N.beakerFreeSpace,w=N.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:!y||L<=0||!V,selected:A,icon:A?"toggle-on":"toggle-off",content:A?"Active":"Inactive",onClick:function(){function x(){return p("togglefilter")}return x}()}),(0,e.createComponentVNode)(2,o.Button,{disabled:!y,icon:"eject",content:"Eject",onClick:function(){function x(){return p("removebeaker")}return x}()})],4),children:y?(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."})})},u=function(v,C){var h=(0,t.useBackend)(C),p=h.act,N=h.data,V=N.occupant,y=N.chemicals,I=N.maxchem,L=N.amounts;return(0,e.createComponentVNode)(2,o.Section,{title:"Occupant Chemicals",children:y.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,D){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 p("chemical",{chemid:w.id,amount:P})}return M}()},D)})]})})},A)})})},s=function(v,C){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),f=r.SlotMachine=function(){function b(S,B){var k=(0,a.useBackend)(B),g=k.act,l=k.data;if(l.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 l.plays===1?c=l.plays+" player has tried their luck today!":c=l.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:l.money})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"10 credits to spin",children:(0,e.createComponentVNode)(2,t.Button,{icon:"coins",disabled:l.working,content:l.working?"Spinning...":"Spin",onClick:function(){function m(){return g("spin")}return m}()})})]}),(0,e.createComponentVNode)(2,t.Box,{bold:!0,lineHeight:2,color:l.resultlvl,children:l.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),f=r.Smartfridge=function(){function b(S,B){var k=(0,a.useBackend)(B),g=k.act,l=k.data,c=l.secure,m=l.can_dry,i=l.drying,u=l.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:m?"Drying rack":"Contents",buttons:!!m&&(0,e.createComponentVNode)(2,t.Button,{width:4,icon:i?"power-off":"times",content:i?"On":"Off",selected:i,onClick:function(){function s(){return g("drying")}return s}()}),children:[!u&&(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."]})}),!!u&&u.slice().sort(function(s,d){return s.display_name.localeCompare(d.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 d(){return g("vend",{index:s.vend,amount:1})}return d}()}),(0,e.createComponentVNode)(2,t.NumberInput,{width:"40px",minValue:0,value:0,maxValue:s.quantity,step:1,stepPixelSize:3,onChange:function(){function d(v,C){return g("vend",{index:s.vend,amount:C})}return d}()}),(0,e.createComponentVNode)(2,t.Button,{width:4,icon:"arrow-down",content:"All",tooltip:"Dispense all.",tooltipPosition:"bottom-start",onClick:function(){function d(){return g("vend",{index:s.vend,amount:s.quantity})}return d}()})]})]},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),f=n(98595),b=1e3,S=r.Smes=function(){function B(k,g){var l=(0,a.useBackend)(g),c=l.act,m=l.data,i=m.capacityPercent,u=m.capacity,s=m.charge,d=m.inputAttempt,v=m.inputting,C=m.inputLevel,h=m.inputLevelMax,p=m.inputAvailable,N=m.outputPowernet,V=m.outputAttempt,y=m.outputting,I=m.outputLevel,L=m.outputLevelMax,w=m.outputUsed,A=i>=100&&"good"||v&&"average"||"bad",x=y&&"good"||s>0&&"average"||"bad";return(0,e.createComponentVNode)(2,f.Window,{width:340,height:345,children:(0,e.createComponentVNode)(2,f.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:i*.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:d?"sync-alt":"times",selected:d,onClick:function(){function E(){return c("tryinput")}return E}(),children:d?"Auto":"Off"}),children:(0,e.createComponentVNode)(2,t.Box,{color:A,children:i>=100&&"Fully Charged"||v&&"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:C===0,onClick:function(){function E(){return c("input",{target:"min"})}return E}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"backward",disabled:C===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:C/b,fillValue:p/b,minValue:0,maxValue:h/b,step:5,stepPixelSize:4,format:function(){function E(P){return(0,o.formatPower)(P*b,1)}return E}(),onChange:function(){function E(P,D){return c("input",{target:D*b})}return E}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Button,{icon:"forward",disabled:C===h,onClick:function(){function E(){return c("input",{adjust:1e4})}return E}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"fast-forward",disabled:C===h,onClick:function(){function E(){return c("input",{target:"max"})}return E}()})]})]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Available",children:(0,o.formatPower)(p)})]})}),(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:N?y?"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,D){return c("output",{target:D*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),f=r.SolarControl=function(){function b(S,B){var k=(0,a.useBackend)(B),g=k.act,l=k.data,c=0,m=1,i=2,u=l.generated,s=l.generated_ratio,d=l.tracking_state,v=l.tracking_rate,C=l.connected_panels,h=l.connected_tracker,p=l.cdir,N=l.direction,V=l.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 y(){return g("refresh")}return y}()}),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:h?"good":"bad",children:h?"OK":"N/A"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Solar panels",color:C>0?"good":"bad",children:C})]})}),(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:u+" W"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Panel orientation",children:[p,"\xB0 (",N,")"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Tracker rotation",children:[d===i&&(0,e.createComponentVNode)(2,t.Box,{children:" Automated "}),d===m&&(0,e.createComponentVNode)(2,t.Box,{children:[" ",v,"\xB0/h (",V,")"," "]}),d===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:[d!==i&&(0,e.createComponentVNode)(2,t.NumberInput,{unit:"\xB0",step:1,stepPixelSize:1,minValue:0,maxValue:359,value:p,onDrag:function(){function y(I,L){return g("cdir",{cdir:L})}return y}()}),d===i&&(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:d===c,onClick:function(){function y(){return g("track",{track:c})}return y}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"clock-o",content:"Timed",selected:d===m,onClick:function(){function y(){return g("track",{track:m})}return y}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"sync",content:"Auto",selected:d===i,disabled:!h,onClick:function(){function y(){return g("track",{track:i})}return y}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Tracker rotation",children:[d===m&&(0,e.createComponentVNode)(2,t.NumberInput,{unit:"\xB0/h",step:1,stepPixelSize:1,minValue:-7200,maxValue:7200,value:v,format:function(){function y(I){var L=Math.sign(I)>0?"+":"-";return L+Math.abs(I)}return y}(),onDrag:function(){function y(I,L){return g("tdir",{tdir:L})}return y}()}),d===c&&(0,e.createComponentVNode)(2,t.Box,{lineHeight:"19px",children:" Tracker offline "}),d===i&&(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),f=r.SpawnersMenu=function(){function b(S,B){var k=(0,a.useBackend)(B),g=k.act,l=k.data,c=l.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(m){return(0,e.createComponentVNode)(2,t.Section,{mb:.5,title:m.name+" ("+m.amount_left+" left)",level:2,buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{icon:"chevron-circle-right",content:"Jump",onClick:function(){function i(){return g("jump",{ID:m.uids})}return i}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"chevron-circle-right",content:"Spawn",onClick:function(){function i(){return g("spawn",{ID:m.uids})}return i}()})],4),children:[(0,e.createComponentVNode)(2,t.Box,{style:{"white-space":"pre-wrap"},mb:1,fontSize:"16px",children:m.desc}),!!m.fluff&&(0,e.createComponentVNode)(2,t.Box,{style:{"white-space":"pre-wrap"},textColor:"#878787",fontSize:"14px",children:m.fluff}),!!m.important_info&&(0,e.createComponentVNode)(2,t.Box,{style:{"white-space":"pre-wrap"},mt:1,bold:!0,color:"red",fontSize:"18px",children:m.important_info})]},m.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),f=r.SpecMenu=function(){function g(l,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,S),(0,e.createComponentVNode)(2,B),(0,e.createComponentVNode)(2,k)]})})})}return g}(),b=function(l,c){var m=(0,a.useBackend)(c),i=m.act,u=m.data,s=u.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 d(){return i("hemomancer")}return d}()}),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)]})})},S=function(l,c){var m=(0,a.useBackend)(c),i=m.act,u=m.data,s=u.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 d(){return i("umbrae")}return d}()}),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(l,c){var m=(0,a.useBackend)(c),i=m.act,u=m.data,s=u.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 d(){return i("gargantua")}return d}()}),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(l,c){var m=(0,a.useBackend)(c),i=m.act,u=m.data,s=u.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 d(){return i("dantalion")}return d}()}),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),f=n(25328),b=n(98595),S=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(d,v){var C=(0,a.useBackend)(v),h=C.data,p=h.amount,N=h.recipes,V=(0,a.useLocalState)(v,"searchText",""),y=V[0],I=V[1],L=g(N,(0,f.createSearch)(y)),w=(0,a.useLocalState)(v,"",!1),A=w[0],x=w[1];return(0,e.createComponentVNode)(2,S.Section,{fill:!0,scrollable:!0,title:"Amount: "+p,buttons:(0,e.createFragment)([A&&(0,e.createComponentVNode)(2,S.Input,{width:12.5,value:y,placeholder:"Find recipe",onInput:function(){function E(P,D){return I(D)}return E}()}),(0,e.createComponentVNode)(2,S.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,i,{recipes:L}):(0,e.createComponentVNode)(2,S.NoticeBox,{children:"No recipes found!"})})},g=function s(d,v){var C=(0,o.flow)([(0,t.map)(function(h){var p=h[0],N=h[1];return l(N)?v(p)?h:[p,s(N,v)]:v(p)?h:[p,void 0]}),(0,t.filter)(function(h){var p=h[0],N=h[1];return N!==void 0}),(0,t.sortBy)(function(h){var p=h[0],N=h[1];return p}),(0,t.sortBy)(function(h){var p=h[0],N=h[1];return!l(N)}),(0,t.reduce)(function(h,p){var N=p[0],V=p[1];return h[N]=V,h},{})])(Object.entries(d));return Object.keys(C).length?C:void 0},l=function(d){return d.uid===void 0},c=function(d,v){return d.required_amount>v?0:Math.floor(v/d.required_amount)},m=function(d,v){for(var C=(0,a.useBackend)(v),h=C.act,p=d.recipe,N=d.max_possible_multiplier,V=Math.min(N,Math.floor(p.max_result_amount/p.result_amount)),y=[5,10,25],I=[],L=function(){var E=A[w];V>=E&&I.push((0,e.createComponentVNode)(2,S.Button,{bold:!0,translucent:!0,fontSize:.85,width:"32px",content:E*p.result_amount+"x",onClick:function(){function P(){return h("make",{recipe_uid:p.uid,multiplier:E})}return P}()}))},w=0,A=y;w1?I+"x ":"",M=L>1?"s":"",R=""+D+V,O=L+" sheet"+M,F=c(y,N);return(0,e.createComponentVNode)(2,S.ImageButton,{fluid:!0,base64:P,dmIcon:x,dmIconState:E,imageSize:32,disabled:!F,tooltip:O,buttons:w>1&&F>1&&(0,e.createComponentVNode)(2,m,{recipe:y,max_possible_multiplier:F}),onClick:function(){function _(){return h("make",{recipe_uid:A,multiplier:1})}return _}(),children:R})}},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),f=r.StationAlertConsole=function(){function S(){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 S}(),b=r.StationAlertConsoleContent=function(){function S(B,k){var g=(0,a.useBackend)(k),l=g.data,c=l.alarms||[],m=c.Fire||[],i=c.Atmosphere||[],u=c.Power||[];return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Section,{title:"Fire Alarms",children:(0,e.createVNode)(1,"ul",null,[m.length===0&&(0,e.createVNode)(1,"li","color-good","Systems Nominal",16),m.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,[i.length===0&&(0,e.createVNode)(1,"li","color-good","Systems Nominal",16),i.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,[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)})],4)}return S}()},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),f=n(36036),b=n(98595),S=function(l){return l[l.SetupFutureStationTraits=0]="SetupFutureStationTraits",l[l.ViewStationTraits=1]="ViewStationTraits",l}(S||{}),B=function(c,m){var i=(0,o.useBackend)(m),u=i.act,s=i.data,d=s.future_station_traits,v=(0,o.useLocalState)(m,"selectedFutureTrait",null),C=v[0],h=v[1],p=Object.fromEntries(s.valid_station_traits.map(function(V){return[V.name,V.path]})),N=Object.keys(p);return N.sort(),(0,e.createComponentVNode)(2,f.Box,{children:[(0,e.createComponentVNode)(2,f.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,f.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,f.Dropdown,{displayText:!C&&"Select trait to add...",onSelected:h,options:N,selected:C,width:"100%"})}),(0,e.createComponentVNode)(2,f.Stack.Item,{children:(0,e.createComponentVNode)(2,f.Button,{color:"green",icon:"plus",onClick:function(){function V(){if(C){var y=p[C],I=[y];if(d){var L,w=d.map(function(A){return A.path});if(w.indexOf(y)!==-1)return;I=(L=I).concat.apply(L,w)}u("setup_future_traits",{station_traits:I})}}return V}(),children:"Add"})})]}),(0,e.createComponentVNode)(2,f.Divider),Array.isArray(d)?d.length>0?(0,e.createComponentVNode)(2,f.Stack,{vertical:!0,fill:!0,children:d.map(function(V){return(0,e.createComponentVNode)(2,f.Stack.Item,{children:(0,e.createComponentVNode)(2,f.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,f.Stack.Item,{grow:!0,children:V.name}),(0,e.createComponentVNode)(2,f.Stack.Item,{children:(0,e.createComponentVNode)(2,f.Button,{color:"red",icon:"times",onClick:function(){function y(){u("setup_future_traits",{station_traits:(0,a.filterMap)(d,function(I){if(I.path!==V.path)return I.path})})}return y}(),children:"Delete"})})]})},V.path)})}):(0,e.createComponentVNode)(2,f.Box,{textAlign:"center",children:[(0,e.createComponentVNode)(2,f.Box,{children:"No station traits will run next round."}),(0,e.createComponentVNode)(2,f.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 u("clear_future_traits")}return V}(),children:"Run Station Traits Normally"})]}):(0,e.createComponentVNode)(2,f.Box,{textAlign:"center",children:[(0,e.createComponentVNode)(2,f.Box,{children:"No future station traits are planned."}),(0,e.createComponentVNode)(2,f.Button,{mt:1,fluid:!0,color:"red",icon:"times",onClick:function(){function V(){return u("setup_future_traits",{station_traits:[]})}return V}(),children:"Prevent station traits from running next round"})]})]})},k=function(c,m){var i=(0,o.useBackend)(m),u=i.act,s=i.data;return s.current_traits.length>0?(0,e.createComponentVNode)(2,f.Stack,{vertical:!0,fill:!0,children:s.current_traits.map(function(d){return(0,e.createComponentVNode)(2,f.Stack.Item,{children:(0,e.createComponentVNode)(2,f.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,f.Stack.Item,{grow:!0,children:d.name}),(0,e.createComponentVNode)(2,f.Stack.Item,{children:(0,e.createComponentVNode)(2,f.Button.Confirm,{content:"Revert",color:"red",disabled:s.too_late_to_revert||!d.can_revert,tooltip:!d.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 v(){return u("revert",{ref:d.ref})}return v}()})})]})},d.ref)})}):(0,e.createComponentVNode)(2,f.Box,{textAlign:"center",children:"There are no active station traits."})},g=r.StationTraitsPanel=function(){function l(c,m){var i=(0,o.useLocalState)(m,"station_traits_tab",S.ViewStationTraits),u=i[0],s=i[1],d;switch(u){case S.SetupFutureStationTraits:d=(0,e.createComponentVNode)(2,B);break;case S.ViewStationTraits:d=(0,e.createComponentVNode)(2,k);break;default:(0,t.exhaustiveCheck)(u)}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,f.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,f.Stack.Item,{children:(0,e.createComponentVNode)(2,f.Tabs,{children:[(0,e.createComponentVNode)(2,f.Tabs.Tab,{icon:"eye",selected:u===S.ViewStationTraits,onClick:function(){function v(){return s(S.ViewStationTraits)}return v}(),children:"View"}),(0,e.createComponentVNode)(2,f.Tabs.Tab,{icon:"edit",selected:u===S.SetupFutureStationTraits,onClick:function(){function v(){return s(S.SetupFutureStationTraits)}return v}(),children:"Edit"})]})}),(0,e.createComponentVNode)(2,f.Stack.Item,{m:0,children:[(0,e.createComponentVNode)(2,f.Divider),d]})]})})})}return l}()},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),f=n(36036),b=n(98595),S=5,B=9,k=function(C){return C===0?5:9},g="64px",l=function(C){return C[0]+"/"+C[1]},c=function(C){var h=C.align,p=C.children;return(0,e.createComponentVNode)(2,f.Box,{style:{position:"absolute",left:h==="left"?"6px":"48px","text-align":h,"text-shadow":"2px 2px 2px #000",top:"2px"},children:p})},m={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"}},i={eyes:{displayName:"eyewear",gridSpot:l([0,0]),image:"inventory-glasses.png"},head:{displayName:"headwear",gridSpot:l([0,1]),image:"inventory-head.png"},mask:{displayName:"mask",gridSpot:l([1,1]),image:"inventory-mask.png"},neck:{displayName:"neck",gridSpot:l([1,0]),image:"inventory-neck.png"},pet_collar:{displayName:"collar",gridSpot:l([1,1]),image:"inventory-collar.png"},right_ear:{displayName:"right ear",gridSpot:l([0,2]),image:"inventory-ears.png"},left_ear:{displayName:"left ear",gridSpot:l([1,2]),image:"inventory-ears.png"},parrot_headset:{displayName:"headset",gridSpot:l([1,2]),image:"inventory-ears.png"},handcuffs:{displayName:"handcuffs",gridSpot:l([1,3])},legcuffs:{displayName:"legcuffs",gridSpot:l([1,4])},jumpsuit:{displayName:"uniform",gridSpot:l([2,0]),image:"inventory-uniform.png"},suit:{displayName:"suit",gridSpot:l([2,1]),image:"inventory-suit.png"},gloves:{displayName:"gloves",gridSpot:l([2,2]),image:"inventory-gloves.png"},right_hand:{displayName:"right hand",gridSpot:l([2,3]),image:"inventory-hand_r.png",additionalComponent:(0,e.createComponentVNode)(2,c,{align:"left",children:"R"})},left_hand:{displayName:"left hand",gridSpot:l([2,4]),image:"inventory-hand_l.png",additionalComponent:(0,e.createComponentVNode)(2,c,{align:"right",children:"L"})},shoes:{displayName:"shoes",gridSpot:l([3,1]),image:"inventory-shoes.png"},suit_storage:{displayName:"suit storage",gridSpot:l([4,0]),image:"inventory-suit_storage.png"},id:{displayName:"ID",gridSpot:l([4,1]),image:"inventory-id.png"},belt:{displayName:"belt",gridSpot:l([4,2]),image:"inventory-belt.png"},back:{displayName:"backpack",gridSpot:l([4,3]),image:"inventory-back.png"},left_pocket:{displayName:"left pocket",gridSpot:l([3,4]),image:"inventory-pocket.png"},right_pocket:{displayName:"right pocket",gridSpot:l([3,3]),image:"inventory-pocket.png"},pda:{displayName:"PDA",gridSpot:l([4,4]),image:"inventory-pda.png"}},u={eyes:{displayName:"eyewear",gridSpot:l([0,0]),image:"inventory-glasses.png"},head:{displayName:"headwear",gridSpot:l([0,1]),image:"inventory-head.png"},mask:{displayName:"mask",gridSpot:l([1,1]),image:"inventory-mask.png"},neck:{displayName:"neck",gridSpot:l([1,0]),image:"inventory-neck.png"},pet_collar:{displayName:"collar",gridSpot:l([1,1]),image:"inventory-collar.png"},right_ear:{displayName:"right ear",gridSpot:l([0,2]),image:"inventory-ears.png"},left_ear:{displayName:"left ear",gridSpot:l([1,2]),image:"inventory-ears.png"},parrot_headset:{displayName:"headset",gridSpot:l([1,2]),image:"inventory-ears.png"},handcuffs:{displayName:"handcuffs",gridSpot:l([1,3])},legcuffs:{displayName:"legcuffs",gridSpot:l([1,4])},jumpsuit:{displayName:"uniform",gridSpot:l([2,0]),image:"inventory-uniform.png"},suit:{displayName:"suit",gridSpot:l([2,1]),image:"inventory-suit.png"},gloves:{displayName:"gloves",gridSpot:l([2,2]),image:"inventory-gloves.png"},right_hand:{displayName:"right hand",gridSpot:l([4,4]),image:"inventory-hand_r.png",additionalComponent:(0,e.createComponentVNode)(2,c,{align:"left",children:"R"})},left_hand:{displayName:"left hand",gridSpot:l([4,5]),image:"inventory-hand_l.png",additionalComponent:(0,e.createComponentVNode)(2,c,{align:"right",children:"L"})},shoes:{displayName:"shoes",gridSpot:l([3,1]),image:"inventory-shoes.png"},suit_storage:{displayName:"suit storage",gridSpot:l([4,0]),image:"inventory-suit_storage.png"},id:{displayName:"ID",gridSpot:l([4,1]),image:"inventory-id.png"},belt:{displayName:"belt",gridSpot:l([4,2]),image:"inventory-belt.png"},back:{displayName:"backpack",gridSpot:l([4,3]),image:"inventory-back.png"},left_pocket:{displayName:"left pocket",gridSpot:l([4,7]),image:"inventory-pocket.png"},right_pocket:{displayName:"right pocket",gridSpot:l([4,6]),image:"inventory-pocket.png"},pda:{displayName:"PDA",gridSpot:l([4,8]),image:"inventory-pda.png"}},s=function(v){return v[v.Completely=1]="Completely",v[v.Hidden=2]="Hidden",v}(s||{}),d=r.StripMenu=function(){function v(C,h){var p=(0,o.useBackend)(h),N=p.act,V=p.data,y=new Map;if(V.show_mode===0)for(var I=0,L=Object.keys(V.items);I=.01})},(0,a.sortBy)(function(x){return-x.amount})])(C.gases||[]),A=Math.max.apply(Math,[1].concat(w.map(function(x){return x.portion})));return(0,e.createComponentVNode)(2,B.Window,{width:550,height:250,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:p/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:N,minValue:0,maxValue:5e3,ranges:{good:[-1/0,5e3],average:[5e3,7e3],bad:[7e3,1/0]},children:(0,o.toFixed)(N)+" MeV/cm3"})}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Gas Coefficient",children:(0,e.createComponentVNode)(2,b.ProgressBar,{value:L,minValue:1,maxValue:5.25,ranges:{bad:[1,1.55],average:[1.55,5.25],good:[5.25,1/0]},children:L.toFixed(2)})}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Temperature",children:(0,e.createComponentVNode)(2,b.ProgressBar,{value:l(V),minValue:0,maxValue:l(1e4),ranges:{teal:[-1/0,l(80)],good:[l(80),l(373)],average:[l(373),l(1e3)],bad:[l(1e3),1/0]},children:(0,o.toFixed)(V)+" K"})}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Mole Per Tile",children:(0,e.createComponentVNode)(2,b.ProgressBar,{value:I,minValue:0,maxValue:12e3,ranges:{teal:[-1/0,100],average:[100,11333],good:[11333,12e3],bad:[12e3,1/0]},children:(0,o.toFixed)(I)+" mol"})}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Pressure",children:(0,e.createComponentVNode)(2,b.ProgressBar,{value:l(y),minValue:0,maxValue:l(5e4),ranges:{good:[l(1),l(300)],average:[-1/0,l(1e3)],bad:[l(1e3),1/0]},children:(0,o.toFixed)(y)+" 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 x(){return v("back")}return x}()}),children:(0,e.createComponentVNode)(2,b.LabeledList,{children:w.map(function(x){return(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:(0,S.getGasLabel)(x.name),children:(0,e.createComponentVNode)(2,b.ProgressBar,{color:(0,S.getGasColor)(x.name),value:x.portion,minValue:0,maxValue:A,children:(0,o.toFixed)(x.amount)+" mol ("+x.portion+"%)"})},x.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),f=r.SyndicateComputerSimple=function(){function b(S,B){var k=(0,a.useBackend)(B),g=k.act,l=k.data;return(0,e.createComponentVNode)(2,o.Window,{theme:"syndicate",width:400,height:400,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:l.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 m(){return g(c.buttonact)}return m}()}),children:[c.status,!!c.bullets&&(0,e.createComponentVNode)(2,t.Box,{children:c.bullets.map(function(m){return(0,e.createComponentVNode)(2,t.Box,{children:m},m)})})]},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),f=function(B){return B.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,")},b=r.TEG=function(){function S(B,k){var g=(0,a.useBackend)(k),l=g.act,c=g.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 m(){return l("check")}return m}()})]})})}):(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:[f(c.cold_inlet_temp)," K, ",f(c.cold_inlet_pressure)," kPa"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Cold Outlet",children:[f(c.cold_outlet_temp)," K, ",f(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:[f(c.hot_inlet_temp)," K, ",f(c.hot_inlet_pressure)," kPa"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Hot Outlet",children:[f(c.hot_outlet_temp)," K, ",f(c.hot_outlet_pressure)," kPa"]})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Power Output",children:[f(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 S}()},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),f=r.TachyonArray=function(){function S(B,k){var g=(0,a.useBackend)(k),l=g.act,c=g.data,m=c.records,i=m===void 0?[]:m,u=c.explosion_target,s=c.toxins_tech,d=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:u}),(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:!i.length||d,align:"center",onClick:function(){function v(){return l("print_logs")}return v}()}),(0,e.createComponentVNode)(2,t.Button.Confirm,{icon:"trash",content:"Delete All Logs",disabled:!i.length,color:"bad",align:"center",onClick:function(){function v(){return l("delete_logs")}return v}()})]})]})}),i.length?(0,e.createComponentVNode)(2,b):(0,e.createComponentVNode)(2,t.NoticeBox,{children:"No Records"})]})})}return S}(),b=r.TachyonArrayContent=function(){function S(B,k){var g=(0,a.useBackend)(k),l=g.act,c=g.data,m=c.records,i=m===void 0?[]:m;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"})]}),i.map(function(u){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:u.logged_time}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:u.epicenter}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:u.actual_size_message}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:u.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 l("delete_record",{index:u.index})}return s}()})})]},u.index)})]})})})})}return S}()},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),f=r.Tank=function(){function b(S,B){var k=(0,a.useBackend)(B),g=k.act,l=k.data,c;return l.has_mask?c=(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Mask",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,width:"76%",icon:l.connected?"check":"times",content:l.connected?"Internals On":"Internals Off",selected:l.connected,onClick:function(){function m(){return g("internals")}return m}()})}):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:l.tankPressure/1013,ranges:{good:[.35,1/0],average:[.15,.35],bad:[-1/0,.15]},children:l.tankPressure+" kPa"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Release Pressure",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"fast-backward",disabled:l.ReleasePressure===l.minReleasePressure,tooltip:"Min",onClick:function(){function m(){return g("pressure",{pressure:"min"})}return m}()}),(0,e.createComponentVNode)(2,t.NumberInput,{animated:!0,value:parseFloat(l.releasePressure),width:"65px",unit:"kPa",minValue:l.minReleasePressure,maxValue:l.maxReleasePressure,onChange:function(){function m(i,u){return g("pressure",{pressure:u})}return m}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"fast-forward",disabled:l.ReleasePressure===l.maxReleasePressure,tooltip:"Max",onClick:function(){function m(){return g("pressure",{pressure:"max"})}return m}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"undo",content:"",disabled:l.ReleasePressure===l.defaultReleasePressure,tooltip:"Reset",onClick:function(){function m(){return g("pressure",{pressure:"reset"})}return m}()})]}),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),f=r.TankDispenser=function(){function b(S,B){var k=(0,a.useBackend)(B),g=k.act,l=k.data,c=l.o_tanks,m=l.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 i(){return g("oxygen")}return i}()})}),(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{mt:1,fluid:!0,content:"Dispense Plasma Tank ("+m+")",disabled:m===0,icon:"arrow-circle-down",onClick:function(){function i(){return g("plasma")}return i}()})})]})})})}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),f=r.TcommsCore=function(){function g(l,c){var m=(0,a.useBackend)(c),i=m.act,u=m.data,s=u.ion,d=(0,a.useLocalState)(c,"tabIndex",0),v=d[0],C=d[1],h=function(){function p(N){switch(N){case 0:return(0,e.createComponentVNode)(2,S);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 p}();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:v===0,onClick:function(){function p(){return C(0)}return p}(),children:"Configuration"},"ConfigPage"),(0,e.createComponentVNode)(2,t.Tabs.Tab,{icon:"link",selected:v===1,onClick:function(){function p(){return C(1)}return p}(),children:"Device Linkage"},"LinkagePage"),(0,e.createComponentVNode)(2,t.Tabs.Tab,{icon:"user-times",selected:v===2,onClick:function(){function p(){return C(2)}return p}(),children:"User Filtering"},"FilterPage")]}),h(v)]})})}return g}(),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."})},S=function(l,c){var m=(0,a.useBackend)(c),i=m.act,u=m.data,s=u.active,d=u.sectors_available,v=u.nttc_toggle_jobs,C=u.nttc_toggle_job_color,h=u.nttc_toggle_name_color,p=u.nttc_toggle_command_bold,N=u.nttc_job_indicator_type,V=u.nttc_setting_language,y=u.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 i("toggle_active")}return I}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Sector Coverage",children:d})]})}),(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:v?"On":"Off",selected:v,icon:"user-tag",onClick:function(){function I(){return i("nttc_toggle_jobs")}return I}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Job Departmentalisation",children:(0,e.createComponentVNode)(2,t.Button,{content:C?"On":"Off",selected:C,icon:"clipboard-list",onClick:function(){function I(){return i("nttc_toggle_job_color")}return I}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Name Departmentalisation",children:(0,e.createComponentVNode)(2,t.Button,{content:h?"On":"Off",selected:h,icon:"user-tag",onClick:function(){function I(){return i("nttc_toggle_name_color")}return I}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Command Amplification",children:(0,e.createComponentVNode)(2,t.Button,{content:p?"On":"Off",selected:p,icon:"volume-up",onClick:function(){function I(){return i("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:N||"Unset",selected:N,icon:"pencil-alt",onClick:function(){function I(){return i("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 i("nttc_setting_language")}return I}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Network ID",children:(0,e.createComponentVNode)(2,t.Button,{content:y||"Unset",selected:y,icon:"server",onClick:function(){function I(){return i("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 i("import")}return I}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Export Configuration",icon:"file-export",onClick:function(){function I(){return i("export")}return I}()})]})],4)},B=function(l,c){var m=(0,a.useBackend)(c),i=m.act,u=m.data,s=u.link_password,d=u.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 v(){return i("change_password")}return v}()})})}),(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"})]}),d.map(function(v){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:v.addr}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:v.net_id}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:v.sector}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:v.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 C(){return i("unlink",{addr:v.addr})}return C}()})})]},v.addr)})]})]})},k=function(l,c){var m=(0,a.useBackend)(c),i=m.act,u=m.data,s=u.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 d(){return i("add_filter")}return d}()}),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(d){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:d}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Remove",icon:"user-times",onClick:function(){function v(){return i("remove_filter",{user:d})}return v}()})})]},d)})]})})}},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),f=r.TcommsRelay=function(){function B(k,g){var l=(0,a.useBackend)(g),c=l.act,m=l.data,i=m.linked,u=m.active,s=m.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:u?"On":"Off",selected:u,icon:"power-off",onClick:function(){function d(){return c("toggle_active")}return d}()})}),(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 d(){return c("network_id")}return d}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Link Status",children:i===1?(0,e.createComponentVNode)(2,t.Box,{color:"green",children:"Linked"}):(0,e.createComponentVNode)(2,t.Box,{color:"red",children:"Unlinked"})})]})}),i===1?(0,e.createComponentVNode)(2,b):(0,e.createComponentVNode)(2,S)]})})}return B}(),b=function(k,g){var l=(0,a.useBackend)(g),c=l.act,m=l.data,i=m.linked_core_id,u=m.linked_core_addr,s=m.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:i}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Linked Core Address",children:u}),(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 d(){return c("toggle_hidden_link")}return d}()})}),(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 d(){return c("unlink")}return d}()})})]})})},S=function(k,g){var l=(0,a.useBackend)(g),c=l.act,m=l.data,i=m.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"})]}),i.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:u.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:u.addr})}return s}()})})]},u.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),f=r.Teleporter=function(){function b(S,B){var k=(0,a.useBackend)(B),g=k.act,l=k.data,c=l.targetsTeleport?l.targetsTeleport:{},m=0,i=1,u=2,s=l.calibrated,d=l.calibrating,v=l.powerstation,C=l.regime,h=l.teleporterhub,p=l.target,N=l.locked,V=l.adv_beacon_allowed,y=l.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:[(!v||!h)&&(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Error",children:[h,!v&&(0,e.createComponentVNode)(2,t.Box,{color:"bad",children:" Powerstation not linked "}),v&&!h&&(0,e.createComponentVNode)(2,t.Box,{color:"bad",children:" Teleporter hub not linked "})]}),v&&h&&(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:y,icon:y?"toggle-on":"toggle-off",content:y?"Enabled":"Disabled",onClick:function(){function I(){return g("advanced_beacon_locking",{on:y?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:[C===m&&(0,e.createComponentVNode)(2,t.Dropdown,{width:18.2,selected:p,disabled:d,options:Object.keys(c),color:p!=="None"?"default":"bad",onSelected:function(){function I(L){return g("settarget",{x:c[L].x,y:c[L].y,z:c[L].z,tptarget:c[L].pretarget})}return I}()}),C===i&&(0,e.createComponentVNode)(2,t.Dropdown,{width:18.2,selected:p,disabled:d,options:Object.keys(c),color:p!=="None"?"default":"bad",onSelected:function(){function I(L){return g("settarget",{x:c[L].x,y:c[L].y,z:c[L].z,tptarget:c[L].pretarget})}return I}()}),C===u&&(0,e.createComponentVNode)(2,t.Box,{children:p})]})]}),(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:C===i?"good":null,onClick:function(){function I(){return g("setregime",{regime:i})}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:C===m?"good":null,onClick:function(){function I(){return g("setregime",{regime:m})}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:C===u?"good":null,disabled:!N,onClick:function(){function I(){return g("setregime",{regime:u})}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:[p!=="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:d&&(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||d),onClick:function(){function I(){return g("calibrate")}return I}()})})]}),p==="None"&&(0,e.createComponentVNode)(2,t.Box,{lineHeight:"21px",children:"No target set"})]})]})]}),!!(N&&v&&h&&C===u)&&(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 g("load")}return I}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Eject",tooltip:"Ejects the GPS device",icon:"eject",onClick:function(){function I(){return g("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),f=r.TelescienceConsole=function(){function b(S,B){var k=(0,a.useBackend)(B),g=k.act,l=k.data,c=l.last_msg,m=l.linked_pad,i=l.held_gps,u=l.lastdata,s=l.power_levels,d=l.current_max_power,v=l.current_power,C=l.current_bearing,h=l.current_elevation,p=l.current_sector,N=l.working,V=l.max_z,y=(0,a.useLocalState)(B,"dummyrot",C),I=y[0],L=y[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,!(u.length>0)||(0,e.createVNode)(1,"ul",null,u.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:m===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:N,value:C,onDrag:function(){function w(A,x){return L(x)}return w}(),onChange:function(){function w(A,x){return g("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:N,value:h,onChange:function(){function w(A,x){return g("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:v===w,disabled:A>=d-1||N,onClick:function(){function x(){return g("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:p,disabled:N,onChange:function(){function w(A,x){return g("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:N,onClick:function(){function w(){return g("pad_send")}return w}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Receive",disabled:N,onClick:function(){function w(){return g("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:N,onClick:function(){function w(){return g("recal_crystals")}return w}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Eject Crystals",disabled:N,onClick:function(){function w(){return g("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:i===1?(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{disabled:i===0||N,content:"Eject GPS",onClick:function(){function w(){return g("eject_gps")}return w}()}),(0,e.createComponentVNode)(2,t.Button,{disabled:i===0||N,content:"Store Coordinates",onClick:function(){function w(){return g("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),f=n(98595),b=r.TempGun=function(){function g(l,c){var m=(0,t.useBackend)(c),i=m.act,u=m.data,s=u.target_temperature,d=u.temperature,v=u.max_temp,C=u.min_temp;return(0,e.createComponentVNode)(2,f.Window,{width:250,height:121,children:(0,e.createComponentVNode)(2,f.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:C,maxValue:v,value:s,format:function(){function h(p){return(0,a.toFixed)(p,2)}return h}(),width:"50px",onDrag:function(){function h(p,N){return i("target_temperature",{target_temperature:N})}return h}()}),"\xB0C"]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Current Temperature",children:(0,e.createComponentVNode)(2,o.Box,{color:S(d),bold:d>500-273.15,children:[(0,e.createComponentVNode)(2,o.AnimatedNumber,{value:(0,a.round)(d,2)}),"\xB0C"]})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Power Cost",children:(0,e.createComponentVNode)(2,o.Box,{color:k(d),children:B(d)})})]})})})})}return g}(),S=function(l){return l<=-100?"blue":l<=0?"teal":l<=100?"green":l<=200?"orange":"red"},B=function(l){return l<=100-273.15?"High":l<=250-273.15?"Medium":l<=300-273.15?"Low":l<=400-273.15?"Medium":"High"},k=function(l){return l<=100-273.15?"red":l<=250-273.15?"orange":l<=300-273.15?"green":l<=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),f=n(92986),b=n(36036),S=n(98595),B=r.sanitizeMultiline=function(){function c(m){return m.replace(/(\n|\r\n){3,}/,"\n\n")}return c}(),k=r.removeAllSkiplines=function(){function c(m){return m.replace(/[\r\n]+/,"")}return c}(),g=r.TextInputModal=function(){function c(m,i){var u=(0,o.useBackend)(i),s=u.act,d=u.data,v=d.max_length,C=d.message,h=C===void 0?"":C,p=d.multiline,N=d.placeholder,V=d.timeout,y=d.title,I=(0,o.useLocalState)(i,"input",N||""),L=I[0],w=I[1],A=function(){function P(D){if(D!==L){var M=p?B(D):k(D);w(M)}}return P}(),x=p||L.length>=40,E=130+(h.length>40?Math.ceil(h.length/4):0)+(x?80:0);return(0,e.createComponentVNode)(2,S.Window,{title:y,width:325,height:E,children:[V&&(0,e.createComponentVNode)(2,a.Loader,{value:V}),(0,e.createComponentVNode)(2,S.Window.Content,{onKeyDown:function(){function P(D){var M=window.event?D.which:D.keyCode;M===f.KEY_ENTER&&(!x||!D.shiftKey)&&s("submit",{entry:L}),M===f.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:h})}),(0,e.createComponentVNode)(2,b.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,l,{input:L,onChange:A})}),(0,e.createComponentVNode)(2,b.Stack.Item,{children:(0,e.createComponentVNode)(2,t.InputButtons,{input:L,message:L.length+"/"+v})})]})})})]})}return c}(),l=function(m,i){var u=(0,o.useBackend)(i),s=u.act,d=u.data,v=d.max_length,C=d.multiline,h=m.input,p=m.onChange,N=C||h.length>=40;return(0,e.createComponentVNode)(2,b.TextArea,{autoFocus:!0,autoSelect:!0,height:C||h.length>=40?"100%":"1.8rem",maxLength:v,onEscape:function(){function V(){return s("cancel")}return V}(),onEnter:function(){function V(y,I){N&&y.shiftKey||(y.preventDefault(),s("submit",{entry:I}))}return V}(),onChange:function(){function V(y,I){return p(I)}return V}(),placeholder:"Type something...",value:h})}},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),f=n(98595),b=r.ThermoMachine=function(){function S(B,k){var g=(0,t.useBackend)(k),l=g.act,c=g.data;return(0,e.createComponentVNode)(2,f.Window,{width:300,height:225,children:(0,e.createComponentVNode)(2,f.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 m(i){return(0,a.toFixed)(i,2)}return m}()})," K"]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Pressure",children:[(0,e.createComponentVNode)(2,o.AnimatedNumber,{value:c.pressure,format:function(){function m(i){return(0,a.toFixed)(i,2)}return m}()})," 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 m(){return l("power")}return m}()}),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 m(){return l("cooling")}return m}()})}),(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 m(){return l("target",{target:c.min})}return m}()}),(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 m(i,u){return l("target",{target:u})}return m}()}),(0,e.createComponentVNode)(2,o.Button,{icon:"fast-forward",disabled:c.target===c.max,title:"Maximum Temperature",onClick:function(){function m(){return l("target",{target:c.max})}return m}()}),(0,e.createComponentVNode)(2,o.Button,{icon:"sync",disabled:c.target===c.initial,title:"Room Temperature",onClick:function(){function m(){return l("target",{target:c.initial})}return m}()})]})]})})]})})}return S}()},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),f=r.TransferValve=function(){function b(S,B){var k=(0,a.useBackend)(B),g=k.act,l=k.data,c=l.tank_one,m=l.tank_two,i=l.attached_device,u=l.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:u?"unlock":"lock",content:u?"Open":"Closed",disabled:!c||!m,onClick:function(){function s(){return g("toggle")}return s}()})})})}),(0,e.createComponentVNode)(2,t.Section,{title:"Assembly",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"cog",content:"Configure Assembly",disabled:!i,onClick:function(){function s(){return g("device")}return s}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Attachment",children:i?(0,e.createComponentVNode)(2,t.Button,{icon:"eject",content:i,disabled:!i,onClick:function(){function s(){return g("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 g("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:m?(0,e.createComponentVNode)(2,t.Button,{icon:"eject",content:m,disabled:!m,onClick:function(){function s(){return g("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),f=n(44879),b=r.TurbineComputer=function(){function k(g,l){var c=(0,a.useBackend)(l),m=c.act,i=c.data,u=i.compressor,s=i.compressor_broken,d=i.turbine,v=i.turbine_broken,C=i.online,h=!!(u&&!s&&d&&!v);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:C?"power-off":"times",content:C?"Online":"Offline",selected:C,disabled:!h,onClick:function(){function p(){return m("toggle_power")}return p}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"times",content:"Disconnect",onClick:function(){function p(){return m("disconnect")}return p}()})],4),children:h?(0,e.createComponentVNode)(2,B):(0,e.createComponentVNode)(2,S)})})})}return k}(),S=function(g,l){var c=(0,a.useBackend)(l),m=c.data,i=m.compressor,u=m.compressor_broken,s=m.turbine,d=m.turbine_broken,v=m.online;return(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Compressor Status",color:!i||u?"bad":"good",children:u?i?"Offline":"Missing":"Online"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Turbine Status",color:!s||d?"bad":"good",children:d?s?"Offline":"Missing":"Online"})]})},B=function(g,l){var c=(0,a.useBackend)(l),m=c.data,i=m.rpm,u=m.temperature,s=m.power,d=m.bearing_heat;return(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Turbine Speed",children:[i," RPM"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Internal Temp",children:[u," 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:d,minValue:0,maxValue:100,ranges:{good:[-1/0,60],average:[60,90],bad:[90,1/0]},children:(0,f.toFixed)(d)+"%"})})]})}},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),f=n(72253),b=n(36036),S=n(98595),B=n(3939),k=function(C){switch(C){case 0:return(0,e.createComponentVNode)(2,l);case 1:return(0,e.createComponentVNode)(2,c);case 2:return(0,e.createComponentVNode)(2,d);default:return"SOMETHING WENT VERY WRONG PLEASE AHELP"}},g=r.Uplink=function(){function v(C,h){var p=(0,f.useBackend)(h),N=p.act,V=p.data,y=V.cart,I=(0,f.useLocalState)(h,"tabIndex",0),L=I[0],w=I[1],A=(0,f.useLocalState)(h,"searchText",""),x=A[0],E=A[1];return(0,e.createComponentVNode)(2,S.Window,{width:900,height:600,theme:"syndicate",children:[(0,e.createComponentVNode)(2,B.ComplexModal),(0,e.createComponentVNode)(2,S.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 ",y&&y.length?"("+y.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 N("lock")}return P}(),icon:"lock",children:"Lock Uplink"},"LockUplink")]})}),(0,e.createComponentVNode)(2,b.Stack.Item,{grow:!0,children:k(L)})]})})]})}return v}(),l=function(C,h){var p=(0,f.useBackend)(h),N=p.act,V=p.data,y=V.crystals,I=V.cats,L=(0,f.useLocalState)(h,"uplinkItems",I[0].items),w=L[0],A=L[1],x=(0,f.useLocalState)(h,"searchText",""),E=x[0],P=x[1],D=function(U,z){z===void 0&&(z="");var $=(0,o.createSearch)(z,function(G){var X=G.hijack_only===1?"|hijack":"";return G.name+"|"+G.desc+"|"+G.cost+"tc"+X});return(0,t.flow)([(0,a.filter)(function(G){return G==null?void 0:G.name}),z&&(0,a.filter)($),(0,a.sortBy)(function(G){return G==null?void 0:G.name})])(U)},M=function(U){if(P(U),U==="")return A(I[0].items);A(D(I.map(function(z){return z.items}).flat(),U))},R=(0,f.useLocalState)(h,"showDesc",1),O=R[0],F=R[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: "+y+"TC",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,b.Button.Checkbox,{content:"Show Descriptions",checked:O,onClick:function(){function _(){return F(!O)}return _}()}),(0,e.createComponentVNode)(2,b.Button,{content:"Random Item",icon:"question",onClick:function(){function _(){return N("buyRandom")}return _}()}),(0,e.createComponentVNode)(2,b.Button,{content:"Refund Currently Held Item",icon:"undo",onClick:function(){function _(){return N("refund")}return _}()})],4),children:(0,e.createComponentVNode)(2,b.Input,{fluid:!0,placeholder:"Search Equipment",onInput:function(){function _(U,z){M(z)}return _}(),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(_){return(0,e.createComponentVNode)(2,b.Tabs.Tab,{selected:E!==""?!1:_.items===w,onClick:function(){function U(){A(_.items),P("")}return U}(),children:_.cat},_)})})})}),(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(_){return(0,e.createComponentVNode)(2,b.Stack.Item,{p:1,backgroundColor:"rgba(255, 0, 0, 0.1)",children:(0,e.createComponentVNode)(2,i,{i:_,showDecription:O},(0,o.decodeHtmlEntities)(_.name))},(0,o.decodeHtmlEntities)(_.name))})})})})]})]})},c=function(C,h){var p=(0,f.useBackend)(h),N=p.act,V=p.data,y=V.cart,I=V.crystals,L=V.cart_price,w=(0,f.useLocalState)(h,"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 N("empty_cart")}return E}(),disabled:!y}),(0,e.createComponentVNode)(2,b.Button,{content:"Purchase Cart ("+L+"TC)",icon:"shopping-cart",onClick:function(){function E(){return N("purchase_cart")}return E}(),disabled:!y||L>I})],4),children:(0,e.createComponentVNode)(2,b.Stack,{vertical:!0,children:y?y.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,i,{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,m)]})},m=function(C,h){var p=(0,f.useBackend)(h),N=p.act,V=p.data,y=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 N("shuffle_lucky_numbers")}return L}()}),children:(0,e.createComponentVNode)(2,b.Stack,{wrap:!0,children:I.map(function(L){return y[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,i,{grow:!0,i:L})},w)})})})})},i=function(C,h){var p=C.i,N=C.showDecription,V=N===void 0?1:N,y=C.buttons,I=y===void 0?(0,e.createComponentVNode)(2,u,{i:p}):y;return(0,e.createComponentVNode)(2,b.Section,{title:(0,o.decodeHtmlEntities)(p.name),showBottom:V,buttons:I,children:V?(0,e.createComponentVNode)(2,b.Box,{italic:!0,children:(0,o.decodeHtmlEntities)(p.desc)}):null})},u=function(C,h){var p=(0,f.useBackend)(h),N=p.act,V=p.data,y=C.i,I=V.crystals;return(0,e.createFragment)([(0,e.createComponentVNode)(2,b.Button,{icon:"shopping-cart",color:y.hijack_only===1&&"red",tooltip:"Add to cart.",tooltipPosition:"left",onClick:function(){function L(){return N("add_to_cart",{item:y.obj_path})}return L}(),disabled:y.cost>I}),(0,e.createComponentVNode)(2,b.Button,{content:"Buy ("+y.cost+"TC)"+(y.refundable?" [Refundable]":""),color:y.hijack_only===1&&"red",tooltip:y.hijack_only===1&&"Hijack Agents Only!",tooltipPosition:"left",onClick:function(){function L(){return N("buyItem",{item:y.obj_path})}return L}(),disabled:y.cost>I})],4)},s=function(C,h){var p=(0,f.useBackend)(h),N=p.act,V=p.data,y=C.i,I=V.exploitable;return(0,e.createComponentVNode)(2,b.Stack,{children:[(0,e.createComponentVNode)(2,b.Button,{icon:"times",content:"("+y.cost*y.amount+"TC)",tooltip:"Remove from cart.",tooltipPosition:"left",onClick:function(){function L(){return N("remove_from_cart",{item:y.obj_path})}return L}()}),(0,e.createComponentVNode)(2,b.Button,{icon:"minus",tooltip:y.limit===0&&"Discount already redeemed!",ml:"5px",onClick:function(){function L(){return N("set_cart_item_quantity",{item:y.obj_path,quantity:--y.amount})}return L}(),disabled:y.amount<=0}),(0,e.createComponentVNode)(2,b.Button.Input,{content:y.amount,width:"45px",tooltipPosition:"bottom-end",tooltip:y.limit===0&&"Discount already redeemed!",onCommit:function(){function L(w,A){return N("set_cart_item_quantity",{item:y.obj_path,quantity:A})}return L}(),disabled:y.limit!==-1&&y.amount>=y.limit&&y.amount<=0}),(0,e.createComponentVNode)(2,b.Button,{mb:.3,icon:"plus",tooltipPosition:"bottom-start",tooltip:y.limit===0&&"Discount already redeemed!",onClick:function(){function L(){return N("set_cart_item_quantity",{item:y.obj_path,quantity:++y.amount})}return L}(),disabled:y.limit!==-1&&y.amount>=y.limit})]})},d=function(C,h){var p=(0,f.useBackend)(h),N=p.act,V=p.data,y=V.exploitable,I=(0,f.useLocalState)(h,"selectedRecord",y[0]),L=I[0],w=I[1],A=(0,f.useLocalState)(h,"searchText",""),x=A[0],E=A[1],P=function(R,O){O===void 0&&(O="");var F=(0,o.createSearch)(O,function(_){return _.name});return(0,t.flow)([(0,a.filter)(function(_){return _==null?void 0:_.name}),O&&(0,a.filter)(F),(0,a.sortBy)(function(_){return _.name})])(R)},D=P(y,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(R,O){return E(O)}return M}()}),(0,e.createComponentVNode)(2,b.Tabs,{vertical:!0,children:D.map(function(M){return(0,e.createComponentVNode)(2,b.Tabs.Tab,{selected:M===L,onClick:function(){function R(){return w(M)}return R}(),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),f=function(B,k){var g=(0,a.useBackend)(k),l=g.act,c=g.data,m=B.product,i=B.productStock,u=B.productIcon,s=B.productIconState,d=c.chargesMoney,v=c.user,C=c.usermoney,h=c.inserted_cash,p=c.vend_ready,N=c.inserted_item_name,V=!d||m.price===0,y="ERROR!",I="";V?(y="FREE",I="arrow-circle-down"):(y=m.price,I="shopping-cart");var L=!p||i===0||!V&&m.price>C&&m.price>h;return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{collapsing:!0,children:(0,e.createComponentVNode)(2,t.DmIcon,{verticalAlign:"middle",icon:u,icon_state:s,fallback:(0,e.createComponentVNode)(2,t.Icon,{p:.66,name:"spinner",size:2,spin:!0})})}),(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:m.name}),(0,e.createComponentVNode)(2,t.Table.Cell,{collapsing:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,t.Box,{color:i<=0&&"bad"||i<=m.max_amount/2&&"average"||"good",children:[i," in stock"]})}),(0,e.createComponentVNode)(2,t.Table.Cell,{collapsing:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,disabled:L,icon:I,content:y,textAlign:"left",onClick:function(){function w(){return l("vend",{inum:m.inum})}return w}()})})]})},b=r.Vending=function(){function S(B,k){var g=(0,a.useBackend)(k),l=g.act,c=g.data,m=c.user,i=c.usermoney,u=c.inserted_cash,s=c.chargesMoney,d=c.product_records,v=d===void 0?[]:d,C=c.hidden_records,h=C===void 0?[]:C,p=c.stock,N=c.vend_ready,V=c.inserted_item_name,y=c.panel_open,I=c.speaker,L;return L=[].concat(v),c.extended_inventory&&(L=[].concat(L,h)),L=L.filter(function(w){return!!w}),(0,e.createComponentVNode)(2,o.Window,{title:"Vending Machine",width:450,height:Math.min((s?171:89)+L.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 w(){return l("eject_item",{})}return w}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{disabled:!u,icon:"money-bill-wave-alt",content:u?(0,e.createFragment)([(0,e.createVNode)(1,"b",null,u,0),(0,e.createTextVNode)(" credits")],0):"Dispense Change",tooltip:u?"Dispense Change":null,textAlign:"left",onClick:function(){function w(){return l("change")}return w}()})})]}),children:m&&(0,e.createComponentVNode)(2,t.Box,{children:["Welcome, ",(0,e.createVNode)(1,"b",null,m.name,0),", ",(0,e.createVNode)(1,"b",null,m.job||"Unemployed",0),"!",(0,e.createVNode)(1,"br"),"Your balance is ",(0,e.createVNode)(1,"b",null,[i,(0,e.createTextVNode)(" credits")],0),".",(0,e.createVNode)(1,"br")]})})}),!!y&&(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 w(){return l("toggle_voice",{})}return w}()})})}),(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:L.map(function(w){return(0,e.createComponentVNode)(2,f,{product:w,productStock:p[w.name],productIcon:w.icon,productIconState:w.icon_state},w.name)})})})})]})})})}return S}()},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),f=r.VolumeMixer=function(){function b(S,B){var k=(0,a.useBackend)(B),g=k.act,l=k.data,c=l.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(m,i){return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Box,{fontSize:"1.25rem",color:"label",mt:i>0&&"0.5rem",children:m.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 u(){return g("volume",{channel:m.num,volume:0})}return u}()})})}),(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:m.volume,onChange:function(){function u(s,d){return g("volume",{channel:m.num,volume:d})}return u}()})}),(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 u(){return g("volume",{channel:m.num,volume:100})}return u}()})})})]})})],4,m.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),f=r.VotePanel=function(){function b(S,B){var k=(0,a.useBackend)(B),g=k.act,l=k.data,c=l.remaining,m=l.question,i=l.choices,u=l.user_vote,s=l.counts,d=l.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:m,children:[(0,e.createComponentVNode)(2,t.Box,{mb:1.5,ml:.5,children:["Time remaining: ",Math.round(c/10),"s"]}),i.map(function(v){return(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{mb:1,fluid:!0,translucent:!0,lineHeight:3,multiLine:v,content:v+(d?" ("+(s[v]||0)+")":""),onClick:function(){function C(){return g("vote",{target:v})}return C}(),selected:v===u})},v)})]})})})}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),f=r.Wires=function(){function b(S,B){var k=(0,a.useBackend)(B),g=k.act,l=k.data,c=l.wires||[],m=l.status||[],i=56+c.length*23+(status?0:15+m.length*17);return(0,e.createComponentVNode)(2,o.Window,{width:350,height:i,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(u){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{className:"candystripe",label:u.color_name,labelColor:u.seen_color,color:u.seen_color,buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{content:u.cut?"Mend":"Cut",onClick:function(){function s(){return g("cut",{wire:u.color})}return s}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Pulse",onClick:function(){function s(){return g("pulse",{wire:u.color})}return s}()}),(0,e.createComponentVNode)(2,t.Button,{content:u.attached?"Detach":"Attach",onClick:function(){function s(){return g("attach",{wire:u.color})}return s}()})],4),children:!!u.wire&&(0,e.createVNode)(1,"i",null,[(0,e.createTextVNode)("("),u.wire,(0,e.createTextVNode)(")")],0)},u.seen_color)})})})}),!!m.length&&(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{children:m.map(function(u){return(0,e.createComponentVNode)(2,t.Box,{color:"lightgray",children:u},u)})})})]})})})}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),f=r.WizardApprenticeContract=function(){function b(S,B){var k=(0,a.useBackend)(B),g=k.act,l=k.data,c=l.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 m(){return g("fire")}return m}()})]}),(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 m(){return g("translocation")}return m}()})]}),(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 m(){return g("restoration")}return m}()})]}),(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 m(){return g("stealth")}return m}()})]}),(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 m(){return g("honk")}return m}()})]}),(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 f(g,l){var c=typeof Symbol!="undefined"&&g[Symbol.iterator]||g["@@iterator"];if(c)return(c=c.call(g)).next.bind(c);if(Array.isArray(g)||(c=b(g))||l&&g&&typeof g.length=="number"){c&&(g=c);var m=0;return function(){return m>=g.length?{done:!0}:{done:!1,value:g[m++]}}}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(g,l){if(g){if(typeof g=="string")return S(g,l);var c={}.toString.call(g).slice(8,-1);return c==="Object"&&g.constructor&&(c=g.constructor.name),c==="Map"||c==="Set"?Array.from(g):c==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c)?S(g,l):void 0}}function S(g,l){(l==null||l>g.length)&&(l=g.length);for(var c=0,m=Array(l);c0&&!V.includes(O.ref)&&!p.includes(O.ref),checked:p.includes(O.ref),onClick:function(){function F(){return y(O.ref)}return F}()},O.desc)})]})]})})}return g}()},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),f=function(B,k,g,l,c){return Bl?"average":B>c?"bad":"good"},b=r.AtmosScan=function(){function S(B,k){var g=B.data.aircontents;return(0,e.createComponentVNode)(2,o.Box,{children:(0,e.createComponentVNode)(2,o.LabeledList,{children:(0,a.filter)(function(l){return l.val!=="0"||l.entry==="Pressure"||l.entry==="Temperature"})(g).map(function(l){return(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:l.entry,color:f(l.val,l.bad_low,l.poor_low,l.poor_high,l.bad_high),children:[l.val,l.units]},l.entry)})})})}return S}()},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(S){return S+" unit"+(S===1?"":"s")},f=r.BeakerContents=function(){function b(S){var B=S.beakerLoaded,k=S.beakerContents,g=k===void 0?[]:k,l=S.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."})||g.length===0&&(0,e.createComponentVNode)(2,a.Stack.Item,{color:"label",children:"Beaker is empty."}),g.map(function(c,m){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),!!l&&(0,e.createComponentVNode)(2,a.Stack.Item,{children:l(c,m)})]},c.name)})]})}return b}();f.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 f(b,S){var B=(0,a.useBackend)(S),k=B.act,g=B.data,l=g.locked,c=g.noaccess,m=g.maintpanel,i=g.on,u=g.autopatrol,s=g.canhack,d=g.emagged,v=g.remote_disabled;return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.NoticeBox,{children:["Swipe an ID card to ",l?"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:i?"power-off":"times",content:i?"On":"Off",selected:i,disabled:c,onClick:function(){function C(){return k("power")}return C}()})}),u!==null&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Patrol",children:(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:u,content:"Auto Patrol",disabled:c,onClick:function(){function C(){return k("autopatrol")}return C}()})}),!!m&&(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:d?"bad":"good",children:d?"DISABLED!":"Enabled"})}),!!s&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Hacking",children:(0,e.createComponentVNode)(2,t.Button,{icon:"terminal",content:d?"Restore Safties":"Hack",disabled:c,color:"bad",onClick:function(){function C(){return k("hack")}return C}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Remote Access",children:(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:!v,content:"AI Remote Control",disabled:c,onClick:function(){function C(){return k("disableremote")}return C}()})})]})})],4)}return f}()},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={},f=r.modalOpen=function(){function g(l,c,m){var i=(0,a.useBackend)(l),u=i.act,s=i.data,d=Object.assign(s.modal?s.modal.args:{},m||{});u("modal_open",{id:c,arguments:JSON.stringify(d)})}return g}(),b=r.modalRegisterBodyOverride=function(){function g(l,c){o[l]=c}return g}(),S=r.modalAnswer=function(){function g(l,c,m,i){var u=(0,a.useBackend)(l),s=u.act,d=u.data;if(d.modal){var v=Object.assign(d.modal.args||{},i||{});s("modal_answer",{id:c,answer:m,arguments:JSON.stringify(v)})}}return g}(),B=r.modalClose=function(){function g(l,c){var m=(0,a.useBackend)(l),i=m.act;i("modal_close",{id:c})}return g}(),k=r.ComplexModal=function(){function g(l,c){var m=(0,a.useBackend)(c),i=m.data;if(i.modal){var u=i.modal,s=u.id,d=u.text,v=u.type,C,h=(0,e.createComponentVNode)(2,t.Button,{className:"Button--modal",icon:"arrow-left",content:"Cancel",onClick:function(){function L(){return B(c)}return L}()}),p,N,V="auto";if(o[s])p=o[s](i.modal,c);else if(v==="input"){var y=i.modal.value;C=function(){function L(w){return S(c,s,y)}return L}(),p=(0,e.createComponentVNode)(2,t.Input,{value:i.modal.value,placeholder:"ENTER to submit",width:"100%",my:"0.5rem",autofocus:!0,onChange:function(){function L(w,A){y=A}return L}()}),N=(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 S(c,s,y)}return L}()}),(0,e.createComponentVNode)(2,t.Box,{clear:"both"})]})}else if(v==="choice"){var I=typeof i.modal.choices=="object"?Object.values(i.modal.choices):i.modal.choices;p=(0,e.createComponentVNode)(2,t.Dropdown,{options:I,selected:i.modal.value,width:"100%",my:"0.5rem",onSelected:function(){function L(w){return S(c,s,w)}return L}()}),V="initial"}else v==="bento"?p=(0,e.createComponentVNode)(2,t.Stack,{spacingPrecise:"1",wrap:"wrap",my:"0.5rem",maxHeight:"1%",children:i.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(i.modal.value,10),onClick:function(){function A(){return S(c,s,w+1)}return A}(),children:(0,e.createVNode)(1,"img",null,null,1,{src:L})})},w)})}):v==="boolean"&&(N=(0,e.createComponentVNode)(2,t.Box,{mt:"0.5rem",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"times",content:i.modal.no_text,color:"bad",float:"left",mb:"0",onClick:function(){function L(){return S(c,s,0)}return L}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"check",content:i.modal.yes_text,color:"good",float:"right",m:"0",onClick:function(){function L(){return S(c,s,1)}return L}()}),(0,e.createComponentVNode)(2,t.Box,{clear:"both"})]}));return(0,e.createComponentVNode)(2,t.Modal,{maxWidth:l.maxWidth||window.innerWidth/2+"px",maxHeight:l.maxHeight||window.innerHeight/2+"px",onEnter:C,mx:"auto",overflowY:V,"padding-bottom":"5px",children:[d&&(0,e.createComponentVNode)(2,t.Box,{inline:!0,children:d}),o[s]&&h,p,N]})}}return g}()},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),f=n(76910),b=f.COLORS.department,S=["Captain","Head of Security","Chief Engineer","Chief Medical Officer","Research Director","Head of Personnel","Quartermaster"],B=function(m){return S.indexOf(m)!==-1?"green":"orange"},k=function(m){if(S.indexOf(m)!==-1)return!0},g=function(m){return m.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"})]}),m.map(function(i){return(0,e.createComponentVNode)(2,t.Table.Row,{color:B(i.rank),bold:k(i.rank),children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,o.decodeHtmlEntities)(i.name)}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,o.decodeHtmlEntities)(i.rank)}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:i.active})]},i.name+i.rank)})]})},l=r.CrewManifest=function(){function c(m,i){var u=(0,a.useBackend)(i),s=u.act,d;if(m.data)d=m.data;else{var v=(0,a.useBackend)(i),C=v.data;d=C}var h=d,p=h.manifest,N=p.heads,V=p.sec,y=p.eng,I=p.med,L=p.sci,w=p.ser,A=p.sup,x=p.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:g(N)}),(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:g(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:g(y)}),(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:g(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:g(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:g(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:g(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:g(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 f(b,S){var B=(0,t.useBackend)(S),k=B.act,g=B.data,l=g.large_buttons,c=g.swapped_buttons,m=b.input,i=b.message,u=b.disabled,s=(0,e.createComponentVNode)(2,a.Button,{color:"good",content:"Submit",bold:!!l,fluid:!!l,onClick:function(){function v(){return k("submit",{entry:m})}return v}(),textAlign:"center",tooltip:l&&i,disabled:u,width:!l&&6}),d=(0,e.createComponentVNode)(2,a.Button,{color:"bad",content:"Cancel",bold:!!l,fluid:!!l,onClick:function(){function v(){return k("cancel")}return v}(),textAlign:"center",width:!l&&6});return(0,e.createComponentVNode)(2,a.Flex,{fill:!0,align:"center",direction:c?"row-reverse":"row",justify:"space-around",children:[l?(0,e.createComponentVNode)(2,a.Flex.Item,{grow:!0,ml:c?.5:0,mr:c?0:.5,children:d}):(0,e.createComponentVNode)(2,a.Flex.Item,{children:d}),!l&&i&&(0,e.createComponentVNode)(2,a.Flex.Item,{children:(0,e.createComponentVNode)(2,a.Box,{color:"label",textAlign:"center",children:i})}),l?(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 f}()},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 f(b,S){var B=(0,a.useBackend)(S),k=B.act,g=B.data,l=b.siliconUser,c=l===void 0?g.siliconUser:l,m=b.locked,i=m===void 0?g.locked:m,u=b.normallyLocked,s=u===void 0?g.normallyLocked:u,d=b.onLockStatusChange,v=d===void 0?function(){return k("lock")}:d,C=b.accessText,h=C===void 0?"an ID card":C;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 p(){v&&v(!i)}return p}()})})]})}):(0,e.createComponentVNode)(2,t.NoticeBox,{children:["Swipe ",h," to ",i?"unlock":"lock"," this interface."]})}return f}()},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 f(b){var S=b.value;return(0,e.createVNode)(1,"div","AlertModal__Loader",(0,e.createComponentVNode)(2,t.Box,{className:"AlertModal__LoaderProgress",style:{width:(0,a.clamp01)(S)*100+"%"}}),2)}return f}()},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 f(b,S){var B=(0,a.useBackend)(S),k=B.act,g=B.data,l=g.loginState;if(g)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: ",l.name," (",l.rank,")"]}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Button,{icon:"eject",disabled:!l.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 f}()},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 f(b,S){var B=(0,a.useBackend)(S),k=B.act,g=B.data,l=g.loginState,c=g.isAI,m=g.isRobot,i=g.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:l.id?l.id:"----------",ml:"0.5rem",onClick:function(){function u(){return k("login_insert")}return u}()})]}),(0,e.createComponentVNode)(2,t.Button,{icon:"sign-in-alt",disabled:!l.id,content:"Login",onClick:function(){function u(){return k("login_login",{login_type:1})}return u}()}),!!c&&(0,e.createComponentVNode)(2,t.Button,{icon:"sign-in-alt",content:"Login as AI",onClick:function(){function u(){return k("login_login",{login_type:2})}return u}()}),!!m&&(0,e.createComponentVNode)(2,t.Button,{icon:"sign-in-alt",content:"Login as Cyborg",onClick:function(){function u(){return k("login_login",{login_type:3})}return u}()}),!!i&&(0,e.createComponentVNode)(2,t.Button,{icon:"sign-in-alt",content:"CentComm Secure Login",onClick:function(){function u(){return k("login_login",{login_type:4})}return u}()})]})})})}return f}()},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 f(b){var S=b.operating,B=b.name;if(S)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 f}();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),f=r.Signaler=function(){function b(S,B){var k=(0,t.useBackend)(B),g=k.act,l=S.data,c=l.code,m=l.frequency,i=l.minFrequency,u=l.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:i/10,maxValue:u/10,value:m/10,format:function(){function s(d){return(0,a.toFixed)(d,1)}return s}(),width:"80px",onDrag:function(){function s(d,v){return g("freq",{freq:v})}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(d,v){return g("code",{code:v})}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 g("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),f=n(88510),b=n(36036),S=r.SimpleRecords=function(){function g(l,c){var m=l.data.records;return(0,e.createComponentVNode)(2,b.Box,{children:m?(0,e.createComponentVNode)(2,k,{data:l.data,recordType:l.recordType}):(0,e.createComponentVNode)(2,B,{data:l.data})})}return g}(),B=function(l,c){var m=(0,a.useBackend)(c),i=m.act,u=l.data.recordsList,s=(0,a.useLocalState)(c,"searchText",""),d=s[0],v=s[1],C=function(N,V){V===void 0&&(V="");var y=(0,t.createSearch)(V,function(I){return I.Name});return(0,o.flow)([(0,f.filter)(function(I){return I==null?void 0:I.Name}),V&&(0,f.filter)(y),(0,f.sortBy)(function(I){return I.Name})])(u)},h=C(u,d);return(0,e.createComponentVNode)(2,b.Box,{children:[(0,e.createComponentVNode)(2,b.Input,{fluid:!0,mb:1,placeholder:"Search records...",onInput:function(){function p(N,V){return v(V)}return p}()}),h.map(function(p){return(0,e.createComponentVNode)(2,b.Box,{children:(0,e.createComponentVNode)(2,b.Button,{mb:.5,content:p.Name,icon:"user",onClick:function(){function N(){return i("Records",{target:p.uid})}return N}()})},p)})]})},k=function(l,c){var m=(0,a.useBackend)(c),i=m.act,u=l.data.records,s=u.general,d=u.medical,v=u.security,C;switch(l.recordType){case"MED":C=(0,e.createComponentVNode)(2,b.Section,{level:2,title:"Medical Data",children:d?(0,e.createComponentVNode)(2,b.LabeledList,{children:[(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Blood Type",children:d.blood_type}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Minor Disabilities",children:d.mi_dis}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Details",children:d.mi_dis_d}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Major Disabilities",children:d.ma_dis}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Details",children:d.ma_dis_d}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Allergies",children:d.alg}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Details",children:d.alg_d}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Current Diseases",children:d.cdi}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Details",children:d.cdi_d}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Important Notes",preserveWhitespace:!0,children:d.notes})]}):(0,e.createComponentVNode)(2,b.Box,{color:"red",bold:!0,children:"Medical record lost!"})});break;case"SEC":C=(0,e.createComponentVNode)(2,b.Section,{level:2,title:"Security Data",children:v?(0,e.createComponentVNode)(2,b.LabeledList,{children:[(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Criminal Status",children:v.criminal}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Minor Crimes",children:v.mi_crim}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Details",children:v.mi_crim_d}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Major Crimes",children:v.ma_crim}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Details",children:v.ma_crim_d}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Important Notes",preserveWhitespace:!0,children:v.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!"})}),C]})}},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 f(b,S){var B,k=(0,a.useBackend)(S),g=k.act,l=k.data,c=l.temp;if(c){var m=(B={},B[c.style]=!0,B);return(0,e.normalizeProps)((0,e.createComponentVNode)(2,t.NoticeBox,Object.assign({},m,{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 i(){return g("cleartemp")}return i}()})})]})})))}}return f}()},95213:function(T,r,n){"use strict";r.__esModule=!0,r.goonstation_PTL=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(49968),f=n(98595);/** * @file * @copyright 2020 * @author Sovexe (https://github.com/Sovexe) * @license ISC - */var b=r.goonstation_PTL=function(){function g(l,c){var m=(0,a.useBackend)(c),i=m.data,u=i.total_earnings,s=i.total_energy,d=i.name,v=d===void 0?"Power Transmission Laser":d;return(0,e.createComponentVNode)(2,f.Window,{title:"Power Transmission Laser",width:"310",height:"485",children:(0,e.createComponentVNode)(2,f.Window.Content,{children:[(0,e.createComponentVNode)(2,y),(0,e.createComponentVNode)(2,B),(0,e.createComponentVNode)(2,k),(0,e.createComponentVNode)(2,t.NoticeBox,{success:!0,children:["Earned Credits : ",u?(0,o.formatMoney)(u):0]}),(0,e.createComponentVNode)(2,t.NoticeBox,{success:!0,children:["Energy Sold : ",s?(0,o.formatSiUnit)(s,0,"J"):"0 J"]})]})})}return g}(),y=function(l,c){var m=(0,a.useBackend)(c),i=m.data,u=i.max_capacity,s=i.held_power,d=i.input_total,v=i.max_grid_load;return(0,e.createComponentVNode)(2,t.Section,{title:"Status",children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Reserve energy",children:s?(0,o.formatSiUnit)(s,0,"J"):"0 J"})}),(0,e.createComponentVNode)(2,t.ProgressBar,{mt:"0.5em",mb:"0.5em",ranges:{good:[.8,1/0],average:[.5,.8],bad:[-1/0,.5]},value:s/u}),(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Grid Saturation"})}),(0,e.createComponentVNode)(2,t.ProgressBar,{mt:"0.5em",ranges:{good:[.8,1/0],average:[.5,.8],bad:[-1/0,.5]},value:Math.min(d,u-s)/v})]})},B=function(l,c){var m=(0,a.useBackend)(c),i=m.act,u=m.data,s=u.input_total,d=u.accepting_power,v=u.sucking_power,h=u.input_number,C=u.power_format;return(0,e.createComponentVNode)(2,t.Section,{title:"Input Controls",children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Input Circuit",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"power-off",color:d?"green":"red",onClick:function(){function p(){return i("toggle_input")}return p}(),children:d?"Enabled":"Disabled"}),children:(0,e.createComponentVNode)(2,t.Box,{color:v&&"good"||d&&"average"||"bad",children:v&&"Online"||d&&"Idle"||"Offline"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Input Level",children:s?(0,o.formatPower)(s):"0 W"})]}),(0,e.createComponentVNode)(2,t.Box,{mt:"0.5em",children:[(0,e.createComponentVNode)(2,t.NumberInput,{mr:"0.5em",animated:!0,size:1.25,inline:!0,step:1,stepPixelSize:2,minValue:0,maxValue:999,value:h,onChange:function(){function p(N,V){return i("set_input",{set_input:V})}return p}()}),(0,e.createComponentVNode)(2,t.Button,{selected:C===1,onClick:function(){function p(){return i("inputW")}return p}(),children:"W"}),(0,e.createComponentVNode)(2,t.Button,{selected:C===Math.pow(10,3),onClick:function(){function p(){return i("inputKW")}return p}(),children:"KW"}),(0,e.createComponentVNode)(2,t.Button,{selected:C===Math.pow(10,6),onClick:function(){function p(){return i("inputMW")}return p}(),children:"MW"}),(0,e.createComponentVNode)(2,t.Button,{selected:C===Math.pow(10,9),onClick:function(){function p(){return i("inputGW")}return p}(),children:"GW"})]})]})},k=function(l,c){var m=(0,a.useBackend)(c),i=m.act,u=m.data,s=u.output_total,d=u.firing,v=u.accepting_power,h=u.output_number,C=u.output_multiplier,p=u.target,N=u.held_power;return(0,e.createComponentVNode)(2,t.Section,{title:"Output Controls",children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Laser Circuit",buttons:(0,e.createComponentVNode)(2,t.Stack,{Horizontal:!0,children:[(0,e.createComponentVNode)(2,t.Button,{icon:"crosshairs",color:p===""?"green":"red",onClick:function(){function V(){return i("target")}return V}(),children:p}),(0,e.createComponentVNode)(2,t.Button,{icon:"power-off",color:d?"green":"red",disabled:!d&&Nu,onClick:function(){function S(){return k("purchaseSoftware",{key:V.key})}return S}()},V.key)}),c.filter(function(V){return!N[V.key]}).length===0&&"No software available!"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Installed Software",children:[m.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)}),m.length===0&&"No software installed!"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Installed Toggles",children:[i.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)}),i.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===d,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:v.map(function(V){return(0,e.createComponentVNode)(2,t.Button,{content:V.name,selected:V.name===h,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:C.map(function(V){return(0,e.createComponentVNode)(2,t.Button,{content:V.name,selected:V.icon===p,onClick:function(){function S(){return k("setChassis",{chassis_to_change:V.icon})}return S}()},V.id)})})]})})}return f}()},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 f(b,y){var B=(0,a.useBackend)(y),k=B.act,g=B.data;return(0,e.createComponentVNode)(2,t.CrewManifest,{data:g.app_data})}return f}()},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 f(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 f}()},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 f(b,y){var B=(0,a.useBackend)(y),k=B.act,g=B.data,l=g.app_data.active_convo;return l?(0,e.createComponentVNode)(2,t.ActiveConversation,{data:g.app_data}):(0,e.createComponentVNode)(2,t.MessengerList,{data:g.app_data})}return f}()},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),f=r.pai_radio=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,l=k.data,c=l.app_data,m=c.minFrequency,i=c.maxFrequency,u=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:m/10,maxValue:i/10,value:u/10,format:function(){function d(v){return(0,t.toFixed)(v,1)}return d}(),onChange:function(){function d(v,h){return g("freq",{freq:h})}return d}()}),(0,e.createComponentVNode)(2,o.Button,{tooltip:"Reset",icon:"undo",onClick:function(){function d(){return g("freq",{freq:"145.9"})}return d}()})]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Broadcast Nearby Speech",children:(0,e.createComponentVNode)(2,o.Button,{onClick:function(){function d(){return g("toggleBroadcast")}return d}(),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 f(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 f}()},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 f(b,y){var B=(0,a.useBackend)(y),k=B.act,g=B.data;return(0,e.createComponentVNode)(2,t.Signaler,{data:g.app_data})}return f}()},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 f(b,y){var B=(0,a.useBackend)(y),k=B.data;return(0,e.createComponentVNode)(2,t.AtmosScan,{data:k})}return f}()},2395:function(T,r,n){"use strict";r.__esModule=!0,r.pda_games=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(1331),f=r.pda_games=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,l=k.data,c=l.games,m=function(){function i(u){switch(u){case"Minesweeper":return(0,e.createComponentVNode)(2,o.IconStack,{children:[(0,e.createComponentVNode)(2,o.Icon,{ml:"0",mt:"10px",name:"flag",size:"6",color:"gray",rotation:30}),(0,e.createComponentVNode)(2,o.Icon,{ml:"9px",mt:"23px",name:"bomb",size:"3",color:"black"})]});default:return(0,e.createComponentVNode)(2,o.Icon,{ml:"16px",mt:"10px",name:"gamepad",size:"6"})}}return i}();return(0,e.createComponentVNode)(2,t.Box,{children:c.map(function(i){return(0,e.createComponentVNode)(2,t.Button,{width:"33%",textAlign:"center",translucent:!0,onClick:function(){function u(){return g("play",{id:i.id})}return u}(),children:[m(i.name),(0,e.createComponentVNode)(2,t.Box,{children:i.name})]},i.name)})})}return b}()},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 f(b,y){var B=(0,a.useBackend)(y),k=B.act,g=B.data,l=g.janitor,c=l.user_loc,m=l.mops,i=l.buckets,u=l.cleanbots,s=l.carts,d=l.janicarts;return(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Current Location",children:[c.x,",",c.y]}),m&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Mop Locations",children:m.map(function(v){return(0,e.createComponentVNode)(2,t.Box,{children:[v.x,",",v.y," (",v.dir,") - ",v.status]},v)})}),i&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Mop Bucket Locations",children:i.map(function(v){return(0,e.createComponentVNode)(2,t.Box,{children:[v.x,",",v.y," (",v.dir,") - [",v.volume,"/",v.max_volume,"]"]},v)})}),u&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Cleanbot Locations",children:u.map(function(v){return(0,e.createComponentVNode)(2,t.Box,{children:[v.x,",",v.y," (",v.dir,") - ",v.status]},v)})}),s&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Janitorial Cart Locations",children:s.map(function(v){return(0,e.createComponentVNode)(2,t.Box,{children:[v.x,",",v.y," (",v.dir,") - [",v.volume,"/",v.max_volume,"]"]},v)})}),d&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Janicart Locations",children:d.map(function(v){return(0,e.createComponentVNode)(2,t.Box,{children:[v.x,",",v.y," (",v.direction_from_user,")"]},v)})})]})}return f}()},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),f=r.pda_main_menu=function(){function b(y,B){var k=(0,t.useBackend)(B),g=k.act,l=k.data,c=l.owner,m=l.ownjob,i=l.idInserted,u=l.categories,s=l.pai,d=l.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,", ",m]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"ID",children:(0,e.createComponentVNode)(2,o.Button,{icon:"sync",content:"Update PDA Info",disabled:!i,onClick:function(){function v(){return g("UpdateInfo")}return v}()})})]})})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Section,{title:"Functions",children:(0,e.createComponentVNode)(2,o.LabeledList,{children:u.map(function(v){var h=l.apps[v];return!h||!h.length?null:(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:v,children:h.map(function(C){return(0,e.createComponentVNode)(2,o.Button,{icon:C.uid in d?C.notify_icon:C.icon,iconSpin:C.uid in d,color:C.uid in d?"red":"transparent",content:C.name,onClick:function(){function p(){return g("StartProgram",{program:C.uid})}return p}()},C.uid)})},v)})})})}),(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 v(){return g("pai",{option:1})}return v}()}),(0,e.createComponentVNode)(2,o.Button,{fluid:!0,icon:"eject",content:"Eject pAI",onClick:function(){function v(){return g("pai",{option:2})}return v}()})]})})]})}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 f(b,y){var B=(0,a.useBackend)(y),k=B.act,g=B.data;return(0,e.createComponentVNode)(2,t.CrewManifest)}return f}()},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 f(b,y){var B=(0,a.useBackend)(y),k=B.data;return(0,e.createComponentVNode)(2,t.SimpleRecords,{data:k,recordType:"MED"})}return f}()},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),f=r.pda_messenger=function(){function k(g,l){var c=(0,t.useBackend)(l),m=c.act,i=c.data,u=i.active_convo;return u?(0,e.createComponentVNode)(2,b,{data:i}):(0,e.createComponentVNode)(2,y,{data:i})}return k}(),b=r.ActiveConversation=function(){function k(g,l){var c=(0,t.useBackend)(l),m=c.act,i=g.data,u=i.convo_name,s=i.convo_job,d=i.messages,v=i.active_convo,h=(0,t.useLocalState)(l,"clipboardMode",!1),C=h[0],p=h[1],N=(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:"Conversation with "+u+" ("+s+")",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Button,{icon:"eye",selected:C,tooltip:"Enter Clipboard Mode",tooltipPosition:"bottom-start",onClick:function(){function V(){return p(!C)}return V}()}),(0,e.createComponentVNode)(2,o.Button,{icon:"comment",onClick:function(){function V(){return m("Message",{target:v})}return V}(),content:"Reply"})],4),children:(0,a.filter)(function(V){return V.target===v})(d).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 C&&(N=(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:"Conversation with "+u+" ("+s+")",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Button,{icon:"eye",selected:C,tooltip:"Exit Clipboard Mode",tooltipPosition:"bottom-start",onClick:function(){function V(){return p(!C)}return V}()}),(0,e.createComponentVNode)(2,o.Button,{icon:"comment",onClick:function(){function V(){return m("Message",{target:v})}return V}(),content:"Reply"})],4),children:(0,a.filter)(function(V){return V.target===v})(d).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 m("Clear",{option:"Convo"})}return V}()})})})}),N]})}return k}(),y=r.MessengerList=function(){function k(g,l){var c=(0,t.useBackend)(l),m=c.act,i=g.data,u=i.convopdas,s=i.pdas,d=i.charges,v=i.silent,h=i.toff,C=i.ringtone_list,p=i.ringtone,N=(0,t.useLocalState)(l,"searchTerm",""),V=N[0],S=N[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:!v,icon:v?"volume-mute":"volume-up",onClick:function(){function I(){return m("Toggle Ringer")}return I}(),children:["Ringer: ",v?"Off":"On"]}),(0,e.createComponentVNode)(2,o.Button,{color:h?"bad":"green",icon:"power-off",onClick:function(){function I(){return m("Toggle Messenger")}return I}(),children:["Messenger: ",h?"Off":"On"]}),(0,e.createComponentVNode)(2,o.Button,{icon:"trash",color:"bad",onClick:function(){function I(){return m("Clear",{option:"All"})}return I}(),children:"Delete All Conversations"}),(0,e.createComponentVNode)(2,o.Button,{icon:"bell",onClick:function(){function I(){return m("Ringtone")}return I}(),children:"Set Custom Ringtone"}),(0,e.createComponentVNode)(2,o.Dropdown,{selected:p,width:"100px",options:Object.keys(C),onSelected:function(){function I(L){return m("Available_Ringtones",{selected_ringtone:L})}return I}()})]})}),!h&&(0,e.createComponentVNode)(2,o.Box,{children:[!!d&&(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:[d," charges left."]})})}),!u.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:i,pdas:u,msgAct:"Select Conversation",searchTerm:V}),(0,e.createComponentVNode)(2,B,{title:"Other PDAs",pdas:s,msgAct:"Message",data:i,searchTerm:V})]})}return k}(),B=function(g,l){var c=(0,t.useBackend)(l),m=c.act,i=g.data,u=g.pdas,s=g.title,d=g.msgAct,v=g.searchTerm,h=i.charges,C=i.plugins;return!u||!u.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:u.filter(function(p){return p.Name.toLowerCase().includes(v.toLowerCase())}).map(function(p){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:p.Name,onClick:function(){function N(){return m(d,{target:p.uid})}return N}()})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:!!h&&C.map(function(N){return(0,e.createComponentVNode)(2,o.Button,{icon:N.icon,content:N.name,onClick:function(){function V(){return m("Messenger Plugin",{plugin:N.uid,target:p.uid})}return V}()},N.uid)})})]},p.uid)})})}},90382:function(T,r,n){"use strict";r.__esModule=!0,r.pda_minesweeper=r.MineSweeperLeaderboard=r.MineSweeperGame=void 0;var e=n(89005),a=n(72253),t=n(36036),o=r.pda_minesweeper=function(){function B(k,g){var l=(0,a.useBackend)(g),c=l.act,m=l.data,i=(0,a.useLocalState)(g,"window","Game"),u=i[0],s=i[1],d={Game:"Leaderboard",Leaderboard:"Game"};return(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,textAlign:"center",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:u==="Game"?(0,e.createComponentVNode)(2,f):(0,e.createComponentVNode)(2,b)}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,translucent:!0,fontSize:2,lineHeight:1.75,icon:u==="Game"?"book":"gamepad",onClick:function(){function v(){return s(d[u])}return v}(),children:d[u]})})]})}return B}(),f=r.MineSweeperGame=function(){function B(k,g){var l=(0,a.useBackend)(g),c=l.act,m=l.data,i=m.matrix,u=m.flags,s=m.bombs,d={1:"blue",2:"green",3:"red",4:"darkblue",5:"brown",6:"lightblue",7:"black",8:"white"},v=function(){function h(C,p,N){c("Square",{X:C,Y:p,mode:N})}return h}();return(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:Object.keys(i).map(function(h){return(0,e.createComponentVNode)(2,t.Box,{children:Object.keys(i[h]).map(function(C){return(0,e.createComponentVNode)(2,t.Button,{m:.25,height:2,width:2,className:i[h][C].open?"Minesweeper__open":"Minesweeper__closed",bold:!0,color:"transparent",icon:i[h][C].open?i[h][C].bomb?"bomb":"":i[h][C].flag?"flag":"",textColor:i[h][C].open?i[h][C].bomb?"black":d[i[h][C].around]:i[h][C].flag?"red":"gray",onClick:function(){function p(N){return v(h,C,"bomb")}return p}(),onContextMenu:function(){function p(N){event.preventDefault(),v(h,C,"flag")}return p}(),children:i[h][C].open&&!i[h][C].bomb&&i[h][C].around?i[h][C].around:" "},C)})},h)})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,className:"Minesweeper__infobox",children:(0,e.createComponentVNode)(2,t.Stack,{vertical:!0,textAlign:"left",pt:1,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{pl:2,fontSize:2,children:[(0,e.createComponentVNode)(2,t.Icon,{name:"bomb",color:"gray"})," : ",s]}),(0,e.createComponentVNode)(2,t.Stack.Divider),(0,e.createComponentVNode)(2,t.Stack.Item,{pl:2,fontSize:2,children:[(0,e.createComponentVNode)(2,t.Icon,{name:"flag",color:"red"})," : ",u]})]})})]})}return B}(),b=r.MineSweeperLeaderboard=function(){function B(k,g){var l=(0,a.useBackend)(g),c=l.act,m=l.data,i=m.leaderboard,u=(0,a.useLocalState)(g,"sortId","time"),s=u[0],d=u[1],v=(0,a.useLocalState)(g,"sortOrder",!1),h=v[0],C=v[1];return(0,e.createComponentVNode)(2,t.Table,{className:"Minesweeper__list",children:[(0,e.createComponentVNode)(2,t.Table.Row,{bold:!0,children:[(0,e.createComponentVNode)(2,y,{id:"name",children:"Nick"}),(0,e.createComponentVNode)(2,y,{id:"time",children:"Time"})]}),i&&i.sort(function(p,N){var V=h?1:-1;return p[s].localeCompare(N[s])*V}).map(function(p,N){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:p.name}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:p.time})]},N)})]})}return B}(),y=function(k,g){var l=(0,a.useLocalState)(g,"sortId","time"),c=l[0],m=l[1],i=(0,a.useLocalState)(g,"sortOrder",!1),u=i[0],s=i[1],d=k.id,v=k.children;return(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,color:"transparent",onClick:function(){function h(){c===d?s(!u):(m(d),s(!0))}return h}(),children:[v,c===d&&(0,e.createComponentVNode)(2,t.Icon,{name:u?"sort-up":"sort-down",ml:"0.25rem;"})]})})}},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 g=(0,a.useBackend)(k),l=g.act,c=g.data,m=c.mulebot,i=m.active;return(0,e.createComponentVNode)(2,t.Box,{children:i?(0,e.createComponentVNode)(2,b):(0,e.createComponentVNode)(2,f)})}return y}(),f=function(B,k){var g=(0,a.useBackend)(k),l=g.act,c=g.data,m=c.mulebot,i=m.bots;return i.map(function(u){return(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{content:u.Name,icon:"cog",onClick:function(){function s(){return l("control",{bot:u.uid})}return s}()})},u.Name)})},b=function(B,k){var g=(0,a.useBackend)(k),l=g.act,c=g.data,m=c.mulebot,i=m.botstatus,u=m.active,s=i.mode,d=i.loca,v=i.load,h=i.powr,C=i.dest,p=i.home,N=i.retn,V=i.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:u,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:d}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",children:S}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Power",children:[h,"%"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Home",children:p}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Destination",children:(0,e.createComponentVNode)(2,t.Button,{content:C?C+" (Set)":"None (Set)",onClick:function(){function I(){return l("target")}return I}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Current Load",children:(0,e.createComponentVNode)(2,t.Button,{content:v?v+" (Unload)":"None",disabled:!v,onClick:function(){function I(){return l("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 l("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:N?"Yes":"No",selected:N,onClick:function(){function I(){return l("set_auto_return",{autoret:N?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 l("stop")}return I}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Proceed",icon:"play",onClick:function(){function I(){return l("start")}return I}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Return Home",icon:"home",onClick:function(){function I(){return l("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),f=r.pda_nanobank=function(){function i(u,s){var d=(0,t.useBackend)(s),v=d.act,h=d.data,C=h.logged_in,p=h.owner_name,N=h.money;return C?(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:p}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Account Balance",children:["$",N]})]})}),(0,e.createComponentVNode)(2,o.Box,{children:[(0,e.createComponentVNode)(2,b),(0,e.createComponentVNode)(2,y)]})],4):(0,e.createComponentVNode)(2,l)}return i}(),b=function(u,s){var d=(0,t.useBackend)(s),v=d.data,h=v.is_premium,C=(0,t.useLocalState)(s,"tabIndex",1),p=C[0],N=C[1];return(0,e.createComponentVNode)(2,o.Tabs,{mt:2,children:[(0,e.createComponentVNode)(2,o.Tabs.Tab,{selected:p===1,onClick:function(){function V(){return N(1)}return V}(),children:[(0,e.createComponentVNode)(2,o.Icon,{mr:1,name:"list"}),"Transfers"]}),(0,e.createComponentVNode)(2,o.Tabs.Tab,{selected:p===2,onClick:function(){function V(){return N(2)}return V}(),children:[(0,e.createComponentVNode)(2,o.Icon,{mr:1,name:"list"}),"Account Actions"]}),(0,e.createComponentVNode)(2,o.Tabs.Tab,{selected:p===3,onClick:function(){function V(){return N(3)}return V}(),children:[(0,e.createComponentVNode)(2,o.Icon,{mr:1,name:"list"}),"Transaction History"]}),!!h&&(0,e.createComponentVNode)(2,o.Tabs.Tab,{selected:p===4,onClick:function(){function V(){return N(4)}return V}(),children:[(0,e.createComponentVNode)(2,o.Icon,{mr:1,name:"list"}),"Supply Orders"]})]})},y=function(u,s){var d=(0,t.useLocalState)(s,"tabIndex",1),v=d[0],h=(0,t.useBackend)(s),C=h.data,p=C.db_status;if(!p)return(0,e.createComponentVNode)(2,o.Box,{children:"Account Database Connection Severed"});switch(v){case 1:return(0,e.createComponentVNode)(2,B);case 2:return(0,e.createComponentVNode)(2,k);case 3:return(0,e.createComponentVNode)(2,g);case 4:return(0,e.createComponentVNode)(2,m);default:return"You are somehow on a tab that doesn't exist! Please let a coder know."}},B=function(u,s){var d,v=(0,t.useBackend)(s),h=v.act,C=v.data,p=C.requests,N=C.available_accounts,V=C.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],D=E[1],M=[];return N.map(function(R){return M[R.name]=R.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 R(O,F){return D(F)}return R}()}),(0,e.createComponentVNode)(2,o.Dropdown,{mt:.6,width:"190px",options:N.filter((0,a.createSearch)(P,function(R){return R.name})).map(function(R){return R.name}),selected:(d=N.filter(function(R){return R.UID===I})[0])==null?void 0:d.name,onSelected:function(){function R(O){return L(M[O])}return R}()})]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Amount",children:(0,e.createComponentVNode)(2,o.Input,{placeholder:"Up to 5000",onInput:function(){function R(O,F){return x(F)}return R}()})}),(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&&d.map(function(h){return(0,e.createComponentVNode)(2,t.Box,{children:["#",h.Number,' - "',h.Name,'" for "',h.OrderedBy,'"']},h)})}),(0,e.createComponentVNode)(2,t.Section,{title:"Approved Orders",children:s>0&&u.map(function(h){return(0,e.createComponentVNode)(2,t.Box,{children:["#",h.Number,' - "',h.Name,'" for "',h.ApprovedBy,'"']},h)})})]})}return f}()},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),f=["className","theme","children"],b=["className","scrollable","children"];/** + */var b=r.goonstation_PTL=function(){function g(l,c){var m=(0,a.useBackend)(c),i=m.data,u=i.total_earnings,s=i.total_energy,d=i.name,v=d===void 0?"Power Transmission Laser":d;return(0,e.createComponentVNode)(2,f.Window,{title:"Power Transmission Laser",width:"310",height:"485",children:(0,e.createComponentVNode)(2,f.Window.Content,{children:[(0,e.createComponentVNode)(2,S),(0,e.createComponentVNode)(2,B),(0,e.createComponentVNode)(2,k),(0,e.createComponentVNode)(2,t.NoticeBox,{success:!0,children:["Earned Credits : ",u?(0,o.formatMoney)(u):0]}),(0,e.createComponentVNode)(2,t.NoticeBox,{success:!0,children:["Energy Sold : ",s?(0,o.formatSiUnit)(s,0,"J"):"0 J"]})]})})}return g}(),S=function(l,c){var m=(0,a.useBackend)(c),i=m.data,u=i.max_capacity,s=i.held_power,d=i.input_total,v=i.max_grid_load;return(0,e.createComponentVNode)(2,t.Section,{title:"Status",children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Reserve energy",children:s?(0,o.formatSiUnit)(s,0,"J"):"0 J"})}),(0,e.createComponentVNode)(2,t.ProgressBar,{mt:"0.5em",mb:"0.5em",ranges:{good:[.8,1/0],average:[.5,.8],bad:[-1/0,.5]},value:s/u}),(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Grid Saturation"})}),(0,e.createComponentVNode)(2,t.ProgressBar,{mt:"0.5em",ranges:{good:[.8,1/0],average:[.5,.8],bad:[-1/0,.5]},value:Math.min(d,u-s)/v})]})},B=function(l,c){var m=(0,a.useBackend)(c),i=m.act,u=m.data,s=u.input_total,d=u.accepting_power,v=u.sucking_power,C=u.input_number,h=u.power_format;return(0,e.createComponentVNode)(2,t.Section,{title:"Input Controls",children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Input Circuit",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"power-off",color:d?"green":"red",onClick:function(){function p(){return i("toggle_input")}return p}(),children:d?"Enabled":"Disabled"}),children:(0,e.createComponentVNode)(2,t.Box,{color:v&&"good"||d&&"average"||"bad",children:v&&"Online"||d&&"Idle"||"Offline"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Input Level",children:s?(0,o.formatPower)(s):"0 W"})]}),(0,e.createComponentVNode)(2,t.Box,{mt:"0.5em",children:[(0,e.createComponentVNode)(2,t.NumberInput,{mr:"0.5em",animated:!0,size:1.25,inline:!0,step:1,stepPixelSize:2,minValue:0,maxValue:999,value:C,onChange:function(){function p(N,V){return i("set_input",{set_input:V})}return p}()}),(0,e.createComponentVNode)(2,t.Button,{selected:h===1,onClick:function(){function p(){return i("inputW")}return p}(),children:"W"}),(0,e.createComponentVNode)(2,t.Button,{selected:h===Math.pow(10,3),onClick:function(){function p(){return i("inputKW")}return p}(),children:"KW"}),(0,e.createComponentVNode)(2,t.Button,{selected:h===Math.pow(10,6),onClick:function(){function p(){return i("inputMW")}return p}(),children:"MW"}),(0,e.createComponentVNode)(2,t.Button,{selected:h===Math.pow(10,9),onClick:function(){function p(){return i("inputGW")}return p}(),children:"GW"})]})]})},k=function(l,c){var m=(0,a.useBackend)(c),i=m.act,u=m.data,s=u.output_total,d=u.firing,v=u.accepting_power,C=u.output_number,h=u.output_multiplier,p=u.target,N=u.held_power;return(0,e.createComponentVNode)(2,t.Section,{title:"Output Controls",children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Laser Circuit",buttons:(0,e.createComponentVNode)(2,t.Stack,{Horizontal:!0,children:[(0,e.createComponentVNode)(2,t.Button,{icon:"crosshairs",color:p===""?"green":"red",onClick:function(){function V(){return i("target")}return V}(),children:p}),(0,e.createComponentVNode)(2,t.Button,{icon:"power-off",color:d?"green":"red",disabled:!d&&Nu,onClick:function(){function y(){return k("purchaseSoftware",{key:V.key})}return y}()},V.key)}),c.filter(function(V){return!N[V.key]}).length===0&&"No software available!"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Installed Software",children:[m.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 y(){return k("startSoftware",{software_key:V.key})}return y}()},V.key)}),m.length===0&&"No software installed!"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Installed Toggles",children:[i.map(function(V){return(0,e.createComponentVNode)(2,t.Button,{content:V.name,icon:V.icon,selected:V.active,onClick:function(){function y(){return k("setToggle",{toggle_key:V.key})}return y}()},V.key)}),i.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===d,onClick:function(){function y(){return k("setEmotion",{emotion:V.id})}return y}()},V.id)})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Select Speaking State",children:v.map(function(V){return(0,e.createComponentVNode)(2,t.Button,{content:V.name,selected:V.name===C,onClick:function(){function y(){return k("setSpeechStyle",{speech_state:V.name})}return y}()},V.id)})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Select Chassis Type",children:h.map(function(V){return(0,e.createComponentVNode)(2,t.Button,{content:V.name,selected:V.icon===p,onClick:function(){function y(){return k("setChassis",{chassis_to_change:V.icon})}return y}()},V.id)})})]})})}return f}()},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 f(b,S){var B=(0,a.useBackend)(S),k=B.act,g=B.data;return(0,e.createComponentVNode)(2,t.CrewManifest,{data:g.app_data})}return f}()},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 f(b,S){var B=(0,a.useBackend)(S),k=B.data;return(0,e.createComponentVNode)(2,t.SimpleRecords,{data:k.app_data,recordType:"MED"})}return f}()},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 f(b,S){var B=(0,a.useBackend)(S),k=B.act,g=B.data,l=g.app_data.active_convo;return l?(0,e.createComponentVNode)(2,t.ActiveConversation,{data:g.app_data}):(0,e.createComponentVNode)(2,t.MessengerList,{data:g.app_data})}return f}()},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),f=r.pai_radio=function(){function b(S,B){var k=(0,a.useBackend)(B),g=k.act,l=k.data,c=l.app_data,m=c.minFrequency,i=c.maxFrequency,u=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:m/10,maxValue:i/10,value:u/10,format:function(){function d(v){return(0,t.toFixed)(v,1)}return d}(),onChange:function(){function d(v,C){return g("freq",{freq:C})}return d}()}),(0,e.createComponentVNode)(2,o.Button,{tooltip:"Reset",icon:"undo",onClick:function(){function d(){return g("freq",{freq:"145.9"})}return d}()})]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Broadcast Nearby Speech",children:(0,e.createComponentVNode)(2,o.Button,{onClick:function(){function d(){return g("toggleBroadcast")}return d}(),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 f(b,S){var B=(0,a.useBackend)(S),k=B.data;return(0,e.createComponentVNode)(2,t.SimpleRecords,{data:k.app_data,recordType:"SEC"})}return f}()},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 f(b,S){var B=(0,a.useBackend)(S),k=B.act,g=B.data;return(0,e.createComponentVNode)(2,t.Signaler,{data:g.app_data})}return f}()},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 f(b,S){var B=(0,a.useBackend)(S),k=B.data;return(0,e.createComponentVNode)(2,t.AtmosScan,{data:k})}return f}()},2395:function(T,r,n){"use strict";r.__esModule=!0,r.pda_games=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(1331),f=r.pda_games=function(){function b(S,B){var k=(0,a.useBackend)(B),g=k.act,l=k.data,c=l.games,m=function(){function i(u){switch(u){case"Minesweeper":return(0,e.createComponentVNode)(2,o.IconStack,{children:[(0,e.createComponentVNode)(2,o.Icon,{ml:"0",mt:"10px",name:"flag",size:"6",color:"gray",rotation:30}),(0,e.createComponentVNode)(2,o.Icon,{ml:"9px",mt:"23px",name:"bomb",size:"3",color:"black"})]});default:return(0,e.createComponentVNode)(2,o.Icon,{ml:"16px",mt:"10px",name:"gamepad",size:"6"})}}return i}();return(0,e.createComponentVNode)(2,t.Box,{children:c.map(function(i){return(0,e.createComponentVNode)(2,t.Button,{width:"33%",textAlign:"center",translucent:!0,onClick:function(){function u(){return g("play",{id:i.id})}return u}(),children:[m(i.name),(0,e.createComponentVNode)(2,t.Box,{children:i.name})]},i.name)})})}return b}()},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 f(b,S){var B=(0,a.useBackend)(S),k=B.act,g=B.data,l=g.janitor,c=l.user_loc,m=l.mops,i=l.buckets,u=l.cleanbots,s=l.carts,d=l.janicarts;return(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Current Location",children:[c.x,",",c.y]}),m&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Mop Locations",children:m.map(function(v){return(0,e.createComponentVNode)(2,t.Box,{children:[v.x,",",v.y," (",v.dir,") - ",v.status]},v)})}),i&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Mop Bucket Locations",children:i.map(function(v){return(0,e.createComponentVNode)(2,t.Box,{children:[v.x,",",v.y," (",v.dir,") - [",v.volume,"/",v.max_volume,"]"]},v)})}),u&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Cleanbot Locations",children:u.map(function(v){return(0,e.createComponentVNode)(2,t.Box,{children:[v.x,",",v.y," (",v.dir,") - ",v.status]},v)})}),s&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Janitorial Cart Locations",children:s.map(function(v){return(0,e.createComponentVNode)(2,t.Box,{children:[v.x,",",v.y," (",v.dir,") - [",v.volume,"/",v.max_volume,"]"]},v)})}),d&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Janicart Locations",children:d.map(function(v){return(0,e.createComponentVNode)(2,t.Box,{children:[v.x,",",v.y," (",v.direction_from_user,")"]},v)})})]})}return f}()},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),f=r.pda_main_menu=function(){function b(S,B){var k=(0,t.useBackend)(B),g=k.act,l=k.data,c=l.owner,m=l.ownjob,i=l.idInserted,u=l.categories,s=l.pai,d=l.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,", ",m]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"ID",children:(0,e.createComponentVNode)(2,o.Button,{icon:"sync",content:"Update PDA Info",disabled:!i,onClick:function(){function v(){return g("UpdateInfo")}return v}()})})]})})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Section,{title:"Functions",children:(0,e.createComponentVNode)(2,o.LabeledList,{children:u.map(function(v){var C=l.apps[v];return!C||!C.length?null:(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:v,children:C.map(function(h){return(0,e.createComponentVNode)(2,o.Button,{icon:h.uid in d?h.notify_icon:h.icon,iconSpin:h.uid in d,color:h.uid in d?"red":"transparent",content:h.name,onClick:function(){function p(){return g("StartProgram",{program:h.uid})}return p}()},h.uid)})},v)})})})}),(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 v(){return g("pai",{option:1})}return v}()}),(0,e.createComponentVNode)(2,o.Button,{fluid:!0,icon:"eject",content:"Eject pAI",onClick:function(){function v(){return g("pai",{option:2})}return v}()})]})})]})}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 f(b,S){var B=(0,a.useBackend)(S),k=B.act,g=B.data;return(0,e.createComponentVNode)(2,t.CrewManifest)}return f}()},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 f(b,S){var B=(0,a.useBackend)(S),k=B.data;return(0,e.createComponentVNode)(2,t.SimpleRecords,{data:k,recordType:"MED"})}return f}()},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),f=r.pda_messenger=function(){function k(g,l){var c=(0,t.useBackend)(l),m=c.act,i=c.data,u=i.active_convo;return u?(0,e.createComponentVNode)(2,b,{data:i}):(0,e.createComponentVNode)(2,S,{data:i})}return k}(),b=r.ActiveConversation=function(){function k(g,l){var c=(0,t.useBackend)(l),m=c.act,i=g.data,u=i.convo_name,s=i.convo_job,d=i.messages,v=i.active_convo,C=(0,t.useLocalState)(l,"clipboardMode",!1),h=C[0],p=C[1],N=(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:"Conversation with "+u+" ("+s+")",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Button,{icon:"eye",selected:h,tooltip:"Enter Clipboard Mode",tooltipPosition:"bottom-start",onClick:function(){function V(){return p(!h)}return V}()}),(0,e.createComponentVNode)(2,o.Button,{icon:"comment",onClick:function(){function V(){return m("Message",{target:v})}return V}(),content:"Reply"})],4),children:(0,a.filter)(function(V){return V.target===v})(d).map(function(V,y){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]})]},y)})});return h&&(N=(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:"Conversation with "+u+" ("+s+")",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Button,{icon:"eye",selected:h,tooltip:"Exit Clipboard Mode",tooltipPosition:"bottom-start",onClick:function(){function V(){return p(!h)}return V}()}),(0,e.createComponentVNode)(2,o.Button,{icon:"comment",onClick:function(){function V(){return m("Message",{target:v})}return V}(),content:"Reply"})],4),children:(0,a.filter)(function(V){return V.target===v})(d).map(function(V,y){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})]},y)})})),(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 m("Clear",{option:"Convo"})}return V}()})})})}),N]})}return k}(),S=r.MessengerList=function(){function k(g,l){var c=(0,t.useBackend)(l),m=c.act,i=g.data,u=i.convopdas,s=i.pdas,d=i.charges,v=i.silent,C=i.toff,h=i.ringtone_list,p=i.ringtone,N=(0,t.useLocalState)(l,"searchTerm",""),V=N[0],y=N[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:!v,icon:v?"volume-mute":"volume-up",onClick:function(){function I(){return m("Toggle Ringer")}return I}(),children:["Ringer: ",v?"Off":"On"]}),(0,e.createComponentVNode)(2,o.Button,{color:C?"bad":"green",icon:"power-off",onClick:function(){function I(){return m("Toggle Messenger")}return I}(),children:["Messenger: ",C?"Off":"On"]}),(0,e.createComponentVNode)(2,o.Button,{icon:"trash",color:"bad",onClick:function(){function I(){return m("Clear",{option:"All"})}return I}(),children:"Delete All Conversations"}),(0,e.createComponentVNode)(2,o.Button,{icon:"bell",onClick:function(){function I(){return m("Ringtone")}return I}(),children:"Set Custom Ringtone"}),(0,e.createComponentVNode)(2,o.Dropdown,{selected:p,width:"100px",options:Object.keys(h),onSelected:function(){function I(L){return m("Available_Ringtones",{selected_ringtone:L})}return I}()})]})}),!C&&(0,e.createComponentVNode)(2,o.Box,{children:[!!d&&(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:[d," charges left."]})})}),!u.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){y(w)}return I}()})]})]})||(0,e.createComponentVNode)(2,o.Box,{color:"bad",children:"Messenger Offline."})]}),(0,e.createComponentVNode)(2,B,{title:"Current Conversations",data:i,pdas:u,msgAct:"Select Conversation",searchTerm:V}),(0,e.createComponentVNode)(2,B,{title:"Other PDAs",pdas:s,msgAct:"Message",data:i,searchTerm:V})]})}return k}(),B=function(g,l){var c=(0,t.useBackend)(l),m=c.act,i=g.data,u=g.pdas,s=g.title,d=g.msgAct,v=g.searchTerm,C=i.charges,h=i.plugins;return!u||!u.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:u.filter(function(p){return p.Name.toLowerCase().includes(v.toLowerCase())}).map(function(p){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:p.Name,onClick:function(){function N(){return m(d,{target:p.uid})}return N}()})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:!!C&&h.map(function(N){return(0,e.createComponentVNode)(2,o.Button,{icon:N.icon,content:N.name,onClick:function(){function V(){return m("Messenger Plugin",{plugin:N.uid,target:p.uid})}return V}()},N.uid)})})]},p.uid)})})}},90382:function(T,r,n){"use strict";r.__esModule=!0,r.pda_minesweeper=r.MineSweeperLeaderboard=r.MineSweeperGame=void 0;var e=n(89005),a=n(72253),t=n(36036),o=r.pda_minesweeper=function(){function B(k,g){var l=(0,a.useBackend)(g),c=l.act,m=l.data,i=(0,a.useLocalState)(g,"window","Game"),u=i[0],s=i[1],d={Game:"Leaderboard",Leaderboard:"Game"};return(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,textAlign:"center",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:u==="Game"?(0,e.createComponentVNode)(2,f):(0,e.createComponentVNode)(2,b)}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,translucent:!0,fontSize:2,lineHeight:1.75,icon:u==="Game"?"book":"gamepad",onClick:function(){function v(){return s(d[u])}return v}(),children:d[u]})})]})}return B}(),f=r.MineSweeperGame=function(){function B(k,g){var l=(0,a.useBackend)(g),c=l.act,m=l.data,i=m.matrix,u=m.flags,s=m.bombs,d={1:"blue",2:"green",3:"red",4:"darkblue",5:"brown",6:"lightblue",7:"black",8:"white"},v=function(){function C(h,p,N){c("Square",{X:h,Y:p,mode:N})}return C}();return(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:Object.keys(i).map(function(C){return(0,e.createComponentVNode)(2,t.Box,{children:Object.keys(i[C]).map(function(h){return(0,e.createComponentVNode)(2,t.Button,{m:.25,height:2,width:2,className:i[C][h].open?"Minesweeper__open":"Minesweeper__closed",bold:!0,color:"transparent",icon:i[C][h].open?i[C][h].bomb?"bomb":"":i[C][h].flag?"flag":"",textColor:i[C][h].open?i[C][h].bomb?"black":d[i[C][h].around]:i[C][h].flag?"red":"gray",onClick:function(){function p(N){return v(C,h,"bomb")}return p}(),onContextMenu:function(){function p(N){event.preventDefault(),v(C,h,"flag")}return p}(),children:i[C][h].open&&!i[C][h].bomb&&i[C][h].around?i[C][h].around:" "},h)})},C)})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,className:"Minesweeper__infobox",children:(0,e.createComponentVNode)(2,t.Stack,{vertical:!0,textAlign:"left",pt:1,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{pl:2,fontSize:2,children:[(0,e.createComponentVNode)(2,t.Icon,{name:"bomb",color:"gray"})," : ",s]}),(0,e.createComponentVNode)(2,t.Stack.Divider),(0,e.createComponentVNode)(2,t.Stack.Item,{pl:2,fontSize:2,children:[(0,e.createComponentVNode)(2,t.Icon,{name:"flag",color:"red"})," : ",u]})]})})]})}return B}(),b=r.MineSweeperLeaderboard=function(){function B(k,g){var l=(0,a.useBackend)(g),c=l.act,m=l.data,i=m.leaderboard,u=(0,a.useLocalState)(g,"sortId","time"),s=u[0],d=u[1],v=(0,a.useLocalState)(g,"sortOrder",!1),C=v[0],h=v[1];return(0,e.createComponentVNode)(2,t.Table,{className:"Minesweeper__list",children:[(0,e.createComponentVNode)(2,t.Table.Row,{bold:!0,children:[(0,e.createComponentVNode)(2,S,{id:"name",children:"Nick"}),(0,e.createComponentVNode)(2,S,{id:"time",children:"Time"})]}),i&&i.sort(function(p,N){var V=C?1:-1;return p[s].localeCompare(N[s])*V}).map(function(p,N){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:p.name}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:p.time})]},N)})]})}return B}(),S=function(k,g){var l=(0,a.useLocalState)(g,"sortId","time"),c=l[0],m=l[1],i=(0,a.useLocalState)(g,"sortOrder",!1),u=i[0],s=i[1],d=k.id,v=k.children;return(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,color:"transparent",onClick:function(){function C(){c===d?s(!u):(m(d),s(!0))}return C}(),children:[v,c===d&&(0,e.createComponentVNode)(2,t.Icon,{name:u?"sort-up":"sort-down",ml:"0.25rem;"})]})})}},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 S(B,k){var g=(0,a.useBackend)(k),l=g.act,c=g.data,m=c.mulebot,i=m.active;return(0,e.createComponentVNode)(2,t.Box,{children:i?(0,e.createComponentVNode)(2,b):(0,e.createComponentVNode)(2,f)})}return S}(),f=function(B,k){var g=(0,a.useBackend)(k),l=g.act,c=g.data,m=c.mulebot,i=m.bots;return i.map(function(u){return(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{content:u.Name,icon:"cog",onClick:function(){function s(){return l("control",{bot:u.uid})}return s}()})},u.Name)})},b=function(B,k){var g=(0,a.useBackend)(k),l=g.act,c=g.data,m=c.mulebot,i=m.botstatus,u=m.active,s=i.mode,d=i.loca,v=i.load,C=i.powr,h=i.dest,p=i.home,N=i.retn,V=i.pick,y;switch(s){case 0:y="Ready";break;case 1:y="Loading/Unloading";break;case 2:case 12:y="Navigating to delivery location";break;case 3:y="Navigating to Home";break;case 4:y="Waiting for clear path";break;case 5:case 6:y="Calculating navigation path";break;case 7:y="Unable to locate destination";break;default:y=s;break}return(0,e.createComponentVNode)(2,t.Section,{title:u,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:d}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",children:y}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Power",children:[C,"%"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Home",children:p}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Destination",children:(0,e.createComponentVNode)(2,t.Button,{content:h?h+" (Set)":"None (Set)",onClick:function(){function I(){return l("target")}return I}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Current Load",children:(0,e.createComponentVNode)(2,t.Button,{content:v?v+" (Unload)":"None",disabled:!v,onClick:function(){function I(){return l("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 l("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:N?"Yes":"No",selected:N,onClick:function(){function I(){return l("set_auto_return",{autoret:N?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 l("stop")}return I}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Proceed",icon:"play",onClick:function(){function I(){return l("start")}return I}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Return Home",icon:"home",onClick:function(){function I(){return l("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),f=r.pda_nanobank=function(){function i(u,s){var d=(0,t.useBackend)(s),v=d.act,C=d.data,h=C.logged_in,p=C.owner_name,N=C.money;return h?(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:p}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Account Balance",children:["$",N]})]})}),(0,e.createComponentVNode)(2,o.Box,{children:[(0,e.createComponentVNode)(2,b),(0,e.createComponentVNode)(2,S)]})],4):(0,e.createComponentVNode)(2,l)}return i}(),b=function(u,s){var d=(0,t.useBackend)(s),v=d.data,C=v.is_premium,h=(0,t.useLocalState)(s,"tabIndex",1),p=h[0],N=h[1];return(0,e.createComponentVNode)(2,o.Tabs,{mt:2,children:[(0,e.createComponentVNode)(2,o.Tabs.Tab,{selected:p===1,onClick:function(){function V(){return N(1)}return V}(),children:[(0,e.createComponentVNode)(2,o.Icon,{mr:1,name:"list"}),"Transfers"]}),(0,e.createComponentVNode)(2,o.Tabs.Tab,{selected:p===2,onClick:function(){function V(){return N(2)}return V}(),children:[(0,e.createComponentVNode)(2,o.Icon,{mr:1,name:"list"}),"Account Actions"]}),(0,e.createComponentVNode)(2,o.Tabs.Tab,{selected:p===3,onClick:function(){function V(){return N(3)}return V}(),children:[(0,e.createComponentVNode)(2,o.Icon,{mr:1,name:"list"}),"Transaction History"]}),!!C&&(0,e.createComponentVNode)(2,o.Tabs.Tab,{selected:p===4,onClick:function(){function V(){return N(4)}return V}(),children:[(0,e.createComponentVNode)(2,o.Icon,{mr:1,name:"list"}),"Supply Orders"]})]})},S=function(u,s){var d=(0,t.useLocalState)(s,"tabIndex",1),v=d[0],C=(0,t.useBackend)(s),h=C.data,p=h.db_status;if(!p)return(0,e.createComponentVNode)(2,o.Box,{children:"Account Database Connection Severed"});switch(v){case 1:return(0,e.createComponentVNode)(2,B);case 2:return(0,e.createComponentVNode)(2,k);case 3:return(0,e.createComponentVNode)(2,g);case 4:return(0,e.createComponentVNode)(2,m);default:return"You are somehow on a tab that doesn't exist! Please let a coder know."}},B=function(u,s){var d,v=(0,t.useBackend)(s),C=v.act,h=v.data,p=h.requests,N=h.available_accounts,V=h.money,y=(0,t.useLocalState)(s,"selectedAccount"),I=y[0],L=y[1],w=(0,t.useLocalState)(s,"transferAmount"),A=w[0],x=w[1],E=(0,t.useLocalState)(s,"searchText",""),P=E[0],D=E[1],M=[];return N.map(function(R){return M[R.name]=R.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 R(O,F){return D(F)}return R}()}),(0,e.createComponentVNode)(2,o.Dropdown,{mt:.6,width:"190px",options:N.filter((0,a.createSearch)(P,function(R){return R.name})).map(function(R){return R.name}),selected:(d=N.filter(function(R){return R.UID===I})[0])==null?void 0:d.name,onSelected:function(){function R(O){return L(M[O])}return R}()})]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Amount",children:(0,e.createComponentVNode)(2,o.Input,{placeholder:"Up to 5000",onInput:function(){function R(O,F){return x(F)}return R}()})}),(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&&d.map(function(C){return(0,e.createComponentVNode)(2,t.Box,{children:["#",C.Number,' - "',C.Name,'" for "',C.OrderedBy,'"']},C)})}),(0,e.createComponentVNode)(2,t.Section,{title:"Approved Orders",children:s>0&&u.map(function(C){return(0,e.createComponentVNode)(2,t.Box,{children:["#",C.Number,' - "',C.Name,'" for "',C.ApprovedBy,'"']},C)})})]})}return f}()},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),f=["className","theme","children"],b=["className","scrollable","children"];/** * @file * @copyright 2020 Aleksej Komarov * @license MIT - */function y(g,l){if(g==null)return{};var c={};for(var m in g)if({}.hasOwnProperty.call(g,m)){if(l.includes(m))continue;c[m]=g[m]}return c}var B=r.Layout=function(){function g(l){var c=l.className,m=l.theme,i=m===void 0?"nanotrasen":m,u=l.children,s=y(l,f);return document.documentElement.className="theme-"+i,(0,e.createVNode)(1,"div","theme-"+i,(0,e.normalizeProps)((0,e.createVNode)(1,"div",(0,a.classes)(["Layout",c].concat((0,t.computeBoxClassName)(s))),u,0,Object.assign({},(0,t.computeBoxProps)(s)))),2)}return g}(),k=function(l){var c=l.className,m=l.scrollable,i=l.children,u=y(l,b);return(0,e.normalizeProps)((0,e.createVNode)(1,"div",(0,a.classes)(["Layout__content",m&&"Layout__content--scrollable",c,(0,t.computeBoxClassName)(u)]),i,0,Object.assign({},(0,t.computeBoxProps)(u))))};k.defaultHooks={onComponentDidMount:function(){function g(l){return(0,o.addScrollableNode)(l)}return g}(),onComponentWillUnmount:function(){function g(l){return(0,o.removeScrollableNode)(l)}return g}()},B.Content=k},96945:function(T,r,n){"use strict";r.__esModule=!0,r.Pane=void 0;var e=n(89005),a=n(35840),t=n(72253),o=n(36036),f=n(99851),b=n(17617),y=["theme","children","className"],B=["className","fitted","children"];/** + */function S(g,l){if(g==null)return{};var c={};for(var m in g)if({}.hasOwnProperty.call(g,m)){if(l.includes(m))continue;c[m]=g[m]}return c}var B=r.Layout=function(){function g(l){var c=l.className,m=l.theme,i=m===void 0?"nanotrasen":m,u=l.children,s=S(l,f);return document.documentElement.className="theme-"+i,(0,e.createVNode)(1,"div","theme-"+i,(0,e.normalizeProps)((0,e.createVNode)(1,"div",(0,a.classes)(["Layout",c].concat((0,t.computeBoxClassName)(s))),u,0,Object.assign({},(0,t.computeBoxProps)(s)))),2)}return g}(),k=function(l){var c=l.className,m=l.scrollable,i=l.children,u=S(l,b);return(0,e.normalizeProps)((0,e.createVNode)(1,"div",(0,a.classes)(["Layout__content",m&&"Layout__content--scrollable",c,(0,t.computeBoxClassName)(u)]),i,0,Object.assign({},(0,t.computeBoxProps)(u))))};k.defaultHooks={onComponentDidMount:function(){function g(l){return(0,o.addScrollableNode)(l)}return g}(),onComponentWillUnmount:function(){function g(l){return(0,o.removeScrollableNode)(l)}return g}()},B.Content=k},96945:function(T,r,n){"use strict";r.__esModule=!0,r.Pane=void 0;var e=n(89005),a=n(35840),t=n(72253),o=n(36036),f=n(99851),b=n(17617),S=["theme","children","className"],B=["className","fitted","children"];/** * @file * @copyright 2020 Aleksej Komarov * @license MIT - */function k(c,m){if(c==null)return{};var i={};for(var u in c)if({}.hasOwnProperty.call(c,u)){if(m.includes(u))continue;i[u]=c[u]}return i}var g=r.Pane=function(){function c(m,i){var u=m.theme,s=m.children,d=m.className,v=k(m,y),h=(0,t.useBackend)(i),C=h.suspended,p=(0,f.useDebug)(i),N=p.debugLayout;return(0,e.normalizeProps)((0,e.createComponentVNode)(2,b.Layout,Object.assign({className:(0,a.classes)(["Window",d]),theme:u},v,{children:(0,e.createComponentVNode)(2,o.Box,{fillPositionedParent:!0,className:N&&"debug-layout",children:!C&&s})})))}return c}(),l=function(m){var i=m.className,u=m.fitted,s=m.children,d=k(m,B);return(0,e.normalizeProps)((0,e.createComponentVNode)(2,b.Layout.Content,Object.assign({className:(0,a.classes)(["Window__content",i])},d,{children:u&&s||(0,e.createVNode)(1,"div","Window__contentPadding",s,0)})))};g.Content=l},34827:function(T,r,n){"use strict";r.__esModule=!0,r.Window=void 0;var e=n(89005),a=n(35840),t=n(85307),o=n(25328),f=n(72253),b=n(36036),y=n(76910),B=n(99851),k=n(77384),g=n(35421),l=n(9394),c=n(17617),m=["className","fitted","children"];function i(V,S){if(V==null)return{};var I={};for(var L in V)if({}.hasOwnProperty.call(V,L)){if(S.includes(L))continue;I[L]=V[L]}return I}function u(V,S){V.prototype=Object.create(S.prototype),V.prototype.constructor=V,s(V,S)}function s(V,S){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(I,L){return I.__proto__=L,I},s(V,S)}/** + */function k(c,m){if(c==null)return{};var i={};for(var u in c)if({}.hasOwnProperty.call(c,u)){if(m.includes(u))continue;i[u]=c[u]}return i}var g=r.Pane=function(){function c(m,i){var u=m.theme,s=m.children,d=m.className,v=k(m,S),C=(0,t.useBackend)(i),h=C.suspended,p=(0,f.useDebug)(i),N=p.debugLayout;return(0,e.normalizeProps)((0,e.createComponentVNode)(2,b.Layout,Object.assign({className:(0,a.classes)(["Window",d]),theme:u},v,{children:(0,e.createComponentVNode)(2,o.Box,{fillPositionedParent:!0,className:N&&"debug-layout",children:!h&&s})})))}return c}(),l=function(m){var i=m.className,u=m.fitted,s=m.children,d=k(m,B);return(0,e.normalizeProps)((0,e.createComponentVNode)(2,b.Layout.Content,Object.assign({className:(0,a.classes)(["Window__content",i])},d,{children:u&&s||(0,e.createVNode)(1,"div","Window__contentPadding",s,0)})))};g.Content=l},34827:function(T,r,n){"use strict";r.__esModule=!0,r.Window=void 0;var e=n(89005),a=n(35840),t=n(85307),o=n(25328),f=n(72253),b=n(36036),S=n(76910),B=n(99851),k=n(77384),g=n(35421),l=n(9394),c=n(17617),m=["className","fitted","children"];function i(V,y){if(V==null)return{};var I={};for(var L in V)if({}.hasOwnProperty.call(V,L)){if(y.includes(L))continue;I[L]=V[L]}return I}function u(V,y){V.prototype=Object.create(y.prototype),V.prototype.constructor=V,s(V,y)}function s(V,y){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(I,L){return I.__proto__=L,I},s(V,y)}/** * @file * @copyright 2020 Aleksej Komarov * @license MIT -*/var d=(0,l.createLogger)("Window"),v=[400,600],h=r.Window=function(V){function S(){return V.apply(this,arguments)||this}u(S,V);var I=S.prototype;return I.componentDidMount=function(){function L(){var w=(0,f.useBackend)(this.context),A=w.suspended;A||(d.log("mounting"),this.updateGeometry())}return L}(),I.componentDidUpdate=function(){function L(w){var A=this.props.width!==w.width||this.props.height!==w.height;A&&this.updateGeometry()}return L}(),I.updateGeometry=function(){function L(){var w,A=(0,f.useBackend)(this.context),x=A.config,E=Object.assign({size:v},x.window);this.props.width&&this.props.height&&(E.size=[this.props.width,this.props.height]),(w=x.window)!=null&&w.key&&(0,g.setWindowKey)(x.window.key),(0,g.recallWindowGeometry)(E)}return L}(),I.render=function(){function L(){var w,A=this.props,x=A.theme,E=A.title,P=A.children,D=(0,f.useBackend)(this.context),M=D.config,R=D.suspended,O=(0,B.useDebug)(this.context),F=O.debugLayout,_=(0,t.useDispatch)(this.context),U=(w=M.window)==null?void 0:w.fancy,z=M.user&&(M.user.observer?M.status2?m-2:0),u=2;u=o){var s=[c].concat(i).map(function(d){return typeof d=="string"?d:d instanceof Error?d.stack||String(d):JSON.stringify(d)}).filter(function(d){return d}).join(" ")+"\nUser Agent: "+navigator.userAgent;Byond.sendMessage({type:"log",message:s})}},B=r.createLogger=function(){function g(l){return{debug:function(){function c(){for(var m=arguments.length,i=new Array(m),u=0;u2?m-2:0),u=2;u=o){var s=[c].concat(i).map(function(d){return typeof d=="string"?d:d instanceof Error?d.stack||String(d):JSON.stringify(d)}).filter(function(d){return d}).join(" ")+"\nUser Agent: "+navigator.userAgent;Byond.sendMessage({type:"log",message:s})}},B=r.createLogger=function(){function g(l){return{debug:function(){function c(){for(var m=arguments.length,i=new Array(m),u=0;u0;){var p=h.shift(),N=p(v);try{C=b(N)}catch(S){if(S.code!=="MODULE_NOT_FOUND")throw S}}if(!C)return y("notFound",v);var V=C[v];return V||y("missingExport",v)}return l}()},72178:function(T,r,n){"use strict";r.__esModule=!0,r.configureStore=r.StoreProvider=void 0;var e=n(64795),a=n(85307),t=n(89005),o=n(79140),f=n(72253),b=n(99851),y=n(9394);function B(u,s){u.prototype=Object.create(s.prototype),u.prototype.constructor=u,k(u,s)}function k(u,s){return k=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(d,v){return d.__proto__=v,d},k(u,s)}/** + */var b=n(32054),S=function(c,m){return function(){return(0,e.createComponentVNode)(2,f.Window,{children:(0,e.createComponentVNode)(2,f.Window.Content,{scrollable:!0,children:[c==="notFound"&&(0,e.createVNode)(1,"div",null,[(0,e.createTextVNode)("Interface "),(0,e.createVNode)(1,"b",null,m,0),(0,e.createTextVNode)(" was not found.")],4),c==="missingExport"&&(0,e.createVNode)(1,"div",null,[(0,e.createTextVNode)("Interface "),(0,e.createVNode)(1,"b",null,m,0),(0,e.createTextVNode)(" is missing an export.")],4)]})})}},B=function(){return(0,e.createComponentVNode)(2,f.Window,{children:(0,e.createComponentVNode)(2,f.Window.Content,{scrollable:!0})})},k=function(){return(0,e.createComponentVNode)(2,f.Window,{height:130,title:"Loading",width:150,children:(0,e.createComponentVNode)(2,f.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{align:"center",fill:!0,justify:"center",vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Icon,{color:"blue",name:"toolbox",spin:!0,size:4})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:"Please wait..."})]})})})},g=r.getRoutedComponent=function(){function l(c){var m=c.getState(),i=(0,a.selectBackend)(m),u=i.suspended,s=i.config;if(u)return B;if(s.refreshing)return k;if(0)var d;for(var v=s==null?void 0:s.interface,C=[function(y){return"./"+y+".tsx"},function(y){return"./"+y+".js"},function(y){return"./"+y+"/index.tsx"},function(y){return"./"+y+"/index.js"}],h;!h&&C.length>0;){var p=C.shift(),N=p(v);try{h=b(N)}catch(y){if(y.code!=="MODULE_NOT_FOUND")throw y}}if(!h)return S("notFound",v);var V=h[v];return V||S("missingExport",v)}return l}()},72178:function(T,r,n){"use strict";r.__esModule=!0,r.configureStore=r.StoreProvider=void 0;var e=n(64795),a=n(85307),t=n(89005),o=n(79140),f=n(72253),b=n(99851),S=n(9394);function B(u,s){u.prototype=Object.create(s.prototype),u.prototype.constructor=u,k(u,s)}function k(u,s){return k=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(d,v){return d.__proto__=v,d},k(u,s)}/** * @file * @copyright 2020 Aleksej Komarov * @license MIT -*/var g=(0,y.createLogger)("store"),l=r.configureStore=function(){function u(s){var d,v;s===void 0&&(s={});var h=s,C=h.sideEffects,p=C===void 0?!0:C,N=(0,e.flow)([(0,a.combineReducers)({debug:b.debugReducer,backend:f.backendReducer}),s.reducer]),V=p?[].concat(((d=s.middleware)==null?void 0:d.pre)||[],[o.assetMiddleware,f.backendMiddleware],((v=s.middleware)==null?void 0:v.post)||[]):[],S=a.applyMiddleware.apply(void 0,V),I=(0,a.createStore)(N,S);return window.__store__=I,window.__augmentStack__=m(I),I}return u}(),c=function(s){return function(d){return function(v){var h=v.type,C=v.payload;return h==="update"||h==="backend/update"?g.debug("action",{type:h}):g.debug("action",v),d(v)}}},m=function(s){return function(d,v){var h,C;v?typeof v=="object"&&!v.stack&&(v.stack=d):(v=new Error(d.split("\n")[0]),v.stack=d),g.log("FatalError:",v);var p=s.getState(),N=p==null||(h=p.backend)==null?void 0:h.config,V=d;return V+="\nUser Agent: "+navigator.userAgent,V+="\nState: "+JSON.stringify({ckey:N==null||(C=N.client)==null?void 0:C.ckey,interface:N==null?void 0:N.interface,window:N==null?void 0:N.window}),V}},i=r.StoreProvider=function(u){function s(){return u.apply(this,arguments)||this}B(s,u);var d=s.prototype;return d.getChildContext=function(){function v(){var h=this.props.store;return{store:h}}return v}(),d.render=function(){function v(){return this.props.children}return v}(),s}(t.Component)},51364:function(T,r,n){"use strict";r.__esModule=!0,r.meta=void 0;var e=n(89005),a=n(36036);/** +*/var g=(0,S.createLogger)("store"),l=r.configureStore=function(){function u(s){var d,v;s===void 0&&(s={});var C=s,h=C.sideEffects,p=h===void 0?!0:h,N=(0,e.flow)([(0,a.combineReducers)({debug:b.debugReducer,backend:f.backendReducer}),s.reducer]),V=p?[].concat(((d=s.middleware)==null?void 0:d.pre)||[],[o.assetMiddleware,f.backendMiddleware],((v=s.middleware)==null?void 0:v.post)||[]):[],y=a.applyMiddleware.apply(void 0,V),I=(0,a.createStore)(N,y);return window.__store__=I,window.__augmentStack__=m(I),I}return u}(),c=function(s){return function(d){return function(v){var C=v.type,h=v.payload;return C==="update"||C==="backend/update"?g.debug("action",{type:C}):g.debug("action",v),d(v)}}},m=function(s){return function(d,v){var C,h;v?typeof v=="object"&&!v.stack&&(v.stack=d):(v=new Error(d.split("\n")[0]),v.stack=d),g.log("FatalError:",v);var p=s.getState(),N=p==null||(C=p.backend)==null?void 0:C.config,V=d;return V+="\nUser Agent: "+navigator.userAgent,V+="\nState: "+JSON.stringify({ckey:N==null||(h=N.client)==null?void 0:h.ckey,interface:N==null?void 0:N.interface,window:N==null?void 0:N.window}),V}},i=r.StoreProvider=function(u){function s(){return u.apply(this,arguments)||this}B(s,u);var d=s.prototype;return d.getChildContext=function(){function v(){var C=this.props.store;return{store:C}}return v}(),d.render=function(){function v(){return this.props.children}return v}(),s}(t.Component)},51364:function(T,r,n){"use strict";r.__esModule=!0,r.meta=void 0;var e=n(89005),a=n(36036);/** * @file * @copyright 2021 Aleksej Komarov * @license MIT - */var t=r.meta={title:"Blink",render:function(){function f(){return(0,e.createComponentVNode)(2,o)}return f}()},o=function(b,y){return(0,e.createComponentVNode)(2,a.Section,{children:(0,e.createComponentVNode)(2,a.Blink,{children:"Blink"})})}},32453:function(T,r,n){"use strict";r.__esModule=!0,r.meta=void 0;var e=n(89005),a=n(36036),t=n(37168);/** + */var t=r.meta={title:"Blink",render:function(){function f(){return(0,e.createComponentVNode)(2,o)}return f}()},o=function(b,S){return(0,e.createComponentVNode)(2,a.Section,{children:(0,e.createComponentVNode)(2,a.Blink,{children:"Blink"})})}},32453:function(T,r,n){"use strict";r.__esModule=!0,r.meta=void 0;var e=n(89005),a=n(36036),t=n(37168);/** * @file * @copyright 2021 Aleksej Komarov * @license MIT - */var o=r.meta={title:"BlockQuote",render:function(){function b(){return(0,e.createComponentVNode)(2,f)}return b}()},f=function(y,B){return(0,e.createComponentVNode)(2,a.Section,{children:(0,e.createComponentVNode)(2,a.BlockQuote,{children:(0,e.createComponentVNode)(2,t.BoxWithSampleText)})})}},83531:function(T,r,n){"use strict";r.__esModule=!0,r.meta=void 0;var e=n(89005),a=n(36036);/** + */var o=r.meta={title:"BlockQuote",render:function(){function b(){return(0,e.createComponentVNode)(2,f)}return b}()},f=function(S,B){return(0,e.createComponentVNode)(2,a.Section,{children:(0,e.createComponentVNode)(2,a.BlockQuote,{children:(0,e.createComponentVNode)(2,t.BoxWithSampleText)})})}},83531:function(T,r,n){"use strict";r.__esModule=!0,r.meta=void 0;var e=n(89005),a=n(36036);/** * @file * @copyright 2021 Aleksej Komarov * @license MIT - */var t=r.meta={title:"Box",render:function(){function f(){return(0,e.createComponentVNode)(2,o)}return f}()},o=function(b,y){return(0,e.createComponentVNode)(2,a.Section,{children:[(0,e.createComponentVNode)(2,a.Box,{bold:!0,children:"bold"}),(0,e.createComponentVNode)(2,a.Box,{italic:!0,children:"italic"}),(0,e.createComponentVNode)(2,a.Box,{opacity:.5,children:"opacity 0.5"}),(0,e.createComponentVNode)(2,a.Box,{opacity:.25,children:"opacity 0.25"}),(0,e.createComponentVNode)(2,a.Box,{m:2,children:"m: 2"}),(0,e.createComponentVNode)(2,a.Box,{textAlign:"left",children:"left"}),(0,e.createComponentVNode)(2,a.Box,{textAlign:"center",children:"center"}),(0,e.createComponentVNode)(2,a.Box,{textAlign:"right",children:"right"})]})}},74198:function(T,r,n){"use strict";r.__esModule=!0,r.meta=void 0;var e=n(89005),a=n(72253),t=n(36036);/** + */var t=r.meta={title:"Box",render:function(){function f(){return(0,e.createComponentVNode)(2,o)}return f}()},o=function(b,S){return(0,e.createComponentVNode)(2,a.Section,{children:[(0,e.createComponentVNode)(2,a.Box,{bold:!0,children:"bold"}),(0,e.createComponentVNode)(2,a.Box,{italic:!0,children:"italic"}),(0,e.createComponentVNode)(2,a.Box,{opacity:.5,children:"opacity 0.5"}),(0,e.createComponentVNode)(2,a.Box,{opacity:.25,children:"opacity 0.25"}),(0,e.createComponentVNode)(2,a.Box,{m:2,children:"m: 2"}),(0,e.createComponentVNode)(2,a.Box,{textAlign:"left",children:"left"}),(0,e.createComponentVNode)(2,a.Box,{textAlign:"center",children:"center"}),(0,e.createComponentVNode)(2,a.Box,{textAlign:"right",children:"right"})]})}},74198:function(T,r,n){"use strict";r.__esModule=!0,r.meta=void 0;var e=n(89005),a=n(72253),t=n(36036);/** * @file * @copyright 2021 Aleksej Komarov * @license MIT - */var o=r.meta={title:"Button",render:function(){function B(){return(0,e.createComponentVNode)(2,y)}return B}()},f=["red","orange","yellow","olive","green","teal","blue","violet","purple","pink","brown","grey","gold"],b=["good","average","bad","black","white"],y=function(k,g){var l=(0,a.useLocalState)(g,"translucent",!1),c=l[0],m=l[1];return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.Box,{mb:1,children:[(0,e.createComponentVNode)(2,t.Button,{content:"Simple"}),(0,e.createComponentVNode)(2,t.Button,{selected:!0,content:"Selected"}),(0,e.createComponentVNode)(2,t.Button,{altSelected:!0,content:"Alt Selected"}),(0,e.createComponentVNode)(2,t.Button,{disabled:!0,content:"Disabled"}),(0,e.createComponentVNode)(2,t.Button,{color:"transparent",content:"Transparent"}),(0,e.createComponentVNode)(2,t.Button,{icon:"cog",content:"Icon"}),(0,e.createComponentVNode)(2,t.Button,{icon:"power-off"}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,content:"Fluid"}),(0,e.createComponentVNode)(2,t.Button,{my:1,lineHeight:2,minWidth:15,textAlign:"center",content:"With Box props"})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Color States",buttons:(0,e.createComponentVNode)(2,t.Button.Checkbox,{checked:c,onClick:function(){function i(){return m(!c)}return i}(),content:"Translucent"}),children:b.map(function(i){return(0,e.createComponentVNode)(2,t.Button,{translucent:c,color:i,content:i},i)})}),(0,e.createComponentVNode)(2,t.Section,{title:"Available Colors",children:f.map(function(i){return(0,e.createComponentVNode)(2,t.Button,{translucent:c,color:i,content:i},i)})}),(0,e.createComponentVNode)(2,t.Section,{title:"Text Colors",children:f.map(function(i){return(0,e.createComponentVNode)(2,t.Box,{inline:!0,mx:"7px",color:i,children:i},i)})})],4)}},51956:function(T,r,n){"use strict";r.__esModule=!0,r.meta=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(9394);/** + */var o=r.meta={title:"Button",render:function(){function B(){return(0,e.createComponentVNode)(2,S)}return B}()},f=["red","orange","yellow","olive","green","teal","blue","violet","purple","pink","brown","grey","gold"],b=["good","average","bad","black","white"],S=function(k,g){var l=(0,a.useLocalState)(g,"translucent",!1),c=l[0],m=l[1];return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.Box,{mb:1,children:[(0,e.createComponentVNode)(2,t.Button,{content:"Simple"}),(0,e.createComponentVNode)(2,t.Button,{selected:!0,content:"Selected"}),(0,e.createComponentVNode)(2,t.Button,{altSelected:!0,content:"Alt Selected"}),(0,e.createComponentVNode)(2,t.Button,{disabled:!0,content:"Disabled"}),(0,e.createComponentVNode)(2,t.Button,{color:"transparent",content:"Transparent"}),(0,e.createComponentVNode)(2,t.Button,{icon:"cog",content:"Icon"}),(0,e.createComponentVNode)(2,t.Button,{icon:"power-off"}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,content:"Fluid"}),(0,e.createComponentVNode)(2,t.Button,{my:1,lineHeight:2,minWidth:15,textAlign:"center",content:"With Box props"})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Color States",buttons:(0,e.createComponentVNode)(2,t.Button.Checkbox,{checked:c,onClick:function(){function i(){return m(!c)}return i}(),content:"Translucent"}),children:b.map(function(i){return(0,e.createComponentVNode)(2,t.Button,{translucent:c,color:i,content:i},i)})}),(0,e.createComponentVNode)(2,t.Section,{title:"Available Colors",children:f.map(function(i){return(0,e.createComponentVNode)(2,t.Button,{translucent:c,color:i,content:i},i)})}),(0,e.createComponentVNode)(2,t.Section,{title:"Text Colors",children:f.map(function(i){return(0,e.createComponentVNode)(2,t.Box,{inline:!0,mx:"7px",color:i,children:i},i)})})],4)}},51956:function(T,r,n){"use strict";r.__esModule=!0,r.meta=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(9394);/** * @file * @copyright 2021 Aleksej Komarov * @license MIT - */var f=r.meta={title:"ByondUi",render:function(){function y(){return(0,e.createComponentVNode)(2,b)}return y}()},b=function(B,k){var g=(0,a.useLocalState)(k,"byondUiEvalCode","Byond.winset('"+Byond.windowId+"', {\n 'is-visible': true,\n})"),l=g[0],c=g[1];return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Section,{title:"Button",children:(0,e.createComponentVNode)(2,t.ByondUi,{params:{type:"button",text:"Button"}})}),(0,e.createComponentVNode)(2,t.Section,{title:"Make BYOND calls",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"chevron-right",onClick:function(){function m(){return setTimeout(function(){try{var i=new Function("return ("+l+")")();i&&i.then?(o.logger.log("Promise"),i.then(o.logger.log)):o.logger.log(i)}catch(u){o.logger.log(u)}})}return m}(),children:"Evaluate"}),children:(0,e.createComponentVNode)(2,t.Box,{as:"textarea",width:"100%",height:"10em",onChange:function(){function m(i){return c(i.target.value)}return m}(),children:l})})],4)}},17466:function(T,r,n){"use strict";r.__esModule=!0,r.meta=void 0;var e=n(89005),a=n(36036),t=n(37168);/** + */var f=r.meta={title:"ByondUi",render:function(){function S(){return(0,e.createComponentVNode)(2,b)}return S}()},b=function(B,k){var g=(0,a.useLocalState)(k,"byondUiEvalCode","Byond.winset('"+Byond.windowId+"', {\n 'is-visible': true,\n})"),l=g[0],c=g[1];return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Section,{title:"Button",children:(0,e.createComponentVNode)(2,t.ByondUi,{params:{type:"button",text:"Button"}})}),(0,e.createComponentVNode)(2,t.Section,{title:"Make BYOND calls",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"chevron-right",onClick:function(){function m(){return setTimeout(function(){try{var i=new Function("return ("+l+")")();i&&i.then?(o.logger.log("Promise"),i.then(o.logger.log)):o.logger.log(i)}catch(u){o.logger.log(u)}})}return m}(),children:"Evaluate"}),children:(0,e.createComponentVNode)(2,t.Box,{as:"textarea",width:"100%",height:"10em",onChange:function(){function m(i){return c(i.target.value)}return m}(),children:l})})],4)}},17466:function(T,r,n){"use strict";r.__esModule=!0,r.meta=void 0;var e=n(89005),a=n(36036),t=n(37168);/** * @file * @copyright 2021 Aleksej Komarov * @license MIT - */var o=r.meta={title:"Collapsible",render:function(){function b(){return(0,e.createComponentVNode)(2,f)}return b}()},f=function(y,B){return(0,e.createComponentVNode)(2,a.Section,{children:(0,e.createComponentVNode)(2,a.Collapsible,{title:"Collapsible Demo",buttons:(0,e.createComponentVNode)(2,a.Button,{icon:"cog"}),children:(0,e.createComponentVNode)(2,t.BoxWithSampleText)})})}},89241:function(T,r,n){"use strict";r.__esModule=!0,r.meta=void 0;var e=n(89005),a=n(72253),t=n(36036);/** + */var o=r.meta={title:"Collapsible",render:function(){function b(){return(0,e.createComponentVNode)(2,f)}return b}()},f=function(S,B){return(0,e.createComponentVNode)(2,a.Section,{children:(0,e.createComponentVNode)(2,a.Collapsible,{title:"Collapsible Demo",buttons:(0,e.createComponentVNode)(2,a.Button,{icon:"cog"}),children:(0,e.createComponentVNode)(2,t.BoxWithSampleText)})})}},89241:function(T,r,n){"use strict";r.__esModule=!0,r.meta=void 0;var e=n(89005),a=n(72253),t=n(36036);/** * @file * @copyright 2021 Aleksej Komarov * @license MIT - */var o=r.meta={title:"Flex & Sections",render:function(){function b(){return(0,e.createComponentVNode)(2,f)}return b}()},f=function(y,B){var k=(0,a.useLocalState)(B,"fs_grow",1),g=k[0],l=k[1],c=(0,a.useLocalState)(B,"fs_direction","column"),m=c[0],i=c[1],u=(0,a.useLocalState)(B,"fs_fill",!0),s=u[0],d=u[1],v=(0,a.useLocalState)(B,"fs_title",!0),h=v[0],C=v[1];return(0,e.createComponentVNode)(2,t.Flex,{height:"100%",direction:"column",children:[(0,e.createComponentVNode)(2,t.Flex.Item,{mb:1,children:(0,e.createComponentVNode)(2,t.Section,{children:[(0,e.createComponentVNode)(2,t.Button,{fluid:!0,onClick:function(){function p(){return i(m==="column"?"row":"column")}return p}(),children:'Flex direction="'+m+'"'}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,onClick:function(){function p(){return l(+!g)}return p}(),children:"Flex.Item grow={"+g+"}"}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,onClick:function(){function p(){return d(!s)}return p}(),children:"Section fill={"+String(s)+"}"}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,selected:h,onClick:function(){function p(){return C(!h)}return p}(),children:"Section title"})]})}),(0,e.createComponentVNode)(2,t.Flex.Item,{grow:1,children:(0,e.createComponentVNode)(2,t.Flex,{height:"100%",direction:m,children:[(0,e.createComponentVNode)(2,t.Flex.Item,{mr:m==="row"&&1,mb:m==="column"&&1,grow:g,children:(0,e.createComponentVNode)(2,t.Section,{title:h&&"Section 1",fill:s,children:"Content"})}),(0,e.createComponentVNode)(2,t.Flex.Item,{grow:g,children:(0,e.createComponentVNode)(2,t.Section,{title:h&&"Section 2",fill:s,children:"Content"})})]})})]})}},48779:function(T,r,n){"use strict";r.__esModule=!0,r.meta=void 0;var e=n(89005),a=n(72253),t=n(36036);/** + */var o=r.meta={title:"Flex & Sections",render:function(){function b(){return(0,e.createComponentVNode)(2,f)}return b}()},f=function(S,B){var k=(0,a.useLocalState)(B,"fs_grow",1),g=k[0],l=k[1],c=(0,a.useLocalState)(B,"fs_direction","column"),m=c[0],i=c[1],u=(0,a.useLocalState)(B,"fs_fill",!0),s=u[0],d=u[1],v=(0,a.useLocalState)(B,"fs_title",!0),C=v[0],h=v[1];return(0,e.createComponentVNode)(2,t.Flex,{height:"100%",direction:"column",children:[(0,e.createComponentVNode)(2,t.Flex.Item,{mb:1,children:(0,e.createComponentVNode)(2,t.Section,{children:[(0,e.createComponentVNode)(2,t.Button,{fluid:!0,onClick:function(){function p(){return i(m==="column"?"row":"column")}return p}(),children:'Flex direction="'+m+'"'}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,onClick:function(){function p(){return l(+!g)}return p}(),children:"Flex.Item grow={"+g+"}"}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,onClick:function(){function p(){return d(!s)}return p}(),children:"Section fill={"+String(s)+"}"}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,selected:C,onClick:function(){function p(){return h(!C)}return p}(),children:"Section title"})]})}),(0,e.createComponentVNode)(2,t.Flex.Item,{grow:1,children:(0,e.createComponentVNode)(2,t.Flex,{height:"100%",direction:m,children:[(0,e.createComponentVNode)(2,t.Flex.Item,{mr:m==="row"&&1,mb:m==="column"&&1,grow:g,children:(0,e.createComponentVNode)(2,t.Section,{title:C&&"Section 1",fill:s,children:"Content"})}),(0,e.createComponentVNode)(2,t.Flex.Item,{grow:g,children:(0,e.createComponentVNode)(2,t.Section,{title:C&&"Section 2",fill:s,children:"Content"})})]})})]})}},48779:function(T,r,n){"use strict";r.__esModule=!0,r.meta=void 0;var e=n(89005),a=n(72253),t=n(36036);/** * @file * @copyright 2024 Aylong (https://github.com/AyIong) * @license MIT - */var o=r.meta={title:"ImageButton",render:function(){function B(){return(0,e.createComponentVNode)(2,y)}return B}()},f=["red","orange","yellow","olive","green","teal","blue","violet","purple","pink","brown","grey","gold"],b=["good","average","bad","black","white"],y=function(k,g){var l=(0,a.useLocalState)(g,"fluid1",!0),c=l[0],m=l[1],i=(0,a.useLocalState)(g,"fluid2",!1),u=i[0],s=i[1],d=(0,a.useLocalState)(g,"fluid3",!1),v=d[0],h=d[1],C=(0,a.useLocalState)(g,"disabled",!1),p=C[0],N=C[1],V=(0,a.useLocalState)(g,"selected",!1),S=V[0],I=V[1],L=(0,a.useLocalState)(g,"addImage",!1),w=L[0],A=L[1],x=(0,a.useLocalState)(g,"base64",""),E=x[0],P=x[1],D=(0,a.useLocalState)(g,"title","Image Button"),M=D[0],R=D[1],O=(0,a.useLocalState)(g,"content","You can put anything in there"),F=O[0],_=O[1],U=(0,a.useLocalState)(g,"imageSize",64),z=U[0],$=U[1];return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Section,{children:[(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{basis:"50%",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:w?(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"base64",children:(0,e.createComponentVNode)(2,t.Input,{value:E,onInput:function(){function G(X,J){return P(J)}return G}()})}):(0,e.createFragment)([(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Title",children:(0,e.createComponentVNode)(2,t.Input,{value:M,onInput:function(){function G(X,J){return R(J)}return G}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Content",children:(0,e.createComponentVNode)(2,t.Input,{value:F,onInput:function(){function G(X,J){return _(J)}return G}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Image Size",children:(0,e.createComponentVNode)(2,t.Slider,{width:10,value:z,minValue:0,maxValue:256,step:1,onChange:function(){function G(X,J){return $(J)}return G}()})})],4)})}),(0,e.createComponentVNode)(2,t.Stack.Item,{basis:"50%",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.Button.Checkbox,{fluid:!0,checked:c,onClick:function(){function G(){return m(!c)}return G}(),children:"Fluid"})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:p,onClick:function(){function G(){return N(!p)}return G}(),children:"Disabled"})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:S,onClick:function(){function G(){return I(!S)}return G}(),children:"Selected"})})]})})]}),(0,e.createComponentVNode)(2,t.Stack.Item,{mt:1,children:(0,e.createComponentVNode)(2,t.ImageButton,{m:!c&&0,fluid:c,base64:E,imageSize:z,title:M,tooltip:!c&&F,disabled:p,selected:S,buttonsAlt:c,buttons:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,translucent:c,compact:!c,color:!c&&"transparent",selected:w,onClick:function(){function G(){return A(!w)}return G}(),children:"Add Image"}),children:F})})]}),(0,e.createComponentVNode)(2,t.Section,{title:"Color States",buttons:(0,e.createComponentVNode)(2,t.Button.Checkbox,{checked:u,onClick:function(){function G(){return s(!u)}return G}(),children:"Fluid"}),children:b.map(function(G){return(0,e.createComponentVNode)(2,t.ImageButton,{fluid:u,color:G,imageSize:u?24:48,children:G},G)})}),(0,e.createComponentVNode)(2,t.Section,{title:"Available Colors",buttons:(0,e.createComponentVNode)(2,t.Button.Checkbox,{checked:v,onClick:function(){function G(){return h(!v)}return G}(),children:"Fluid"}),children:f.map(function(G){return(0,e.createComponentVNode)(2,t.ImageButton,{fluid:v,color:G,imageSize:v?24:48,children:G},G)})})],4)}},21394:function(T,r,n){"use strict";r.__esModule=!0,r.meta=void 0;var e=n(89005),a=n(72253),t=n(36036);/** + */var o=r.meta={title:"ImageButton",render:function(){function B(){return(0,e.createComponentVNode)(2,S)}return B}()},f=["red","orange","yellow","olive","green","teal","blue","violet","purple","pink","brown","grey","gold"],b=["good","average","bad","black","white"],S=function(k,g){var l=(0,a.useLocalState)(g,"fluid1",!0),c=l[0],m=l[1],i=(0,a.useLocalState)(g,"fluid2",!1),u=i[0],s=i[1],d=(0,a.useLocalState)(g,"fluid3",!1),v=d[0],C=d[1],h=(0,a.useLocalState)(g,"disabled",!1),p=h[0],N=h[1],V=(0,a.useLocalState)(g,"selected",!1),y=V[0],I=V[1],L=(0,a.useLocalState)(g,"addImage",!1),w=L[0],A=L[1],x=(0,a.useLocalState)(g,"base64",""),E=x[0],P=x[1],D=(0,a.useLocalState)(g,"title","Image Button"),M=D[0],R=D[1],O=(0,a.useLocalState)(g,"content","You can put anything in there"),F=O[0],_=O[1],U=(0,a.useLocalState)(g,"imageSize",64),z=U[0],$=U[1];return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Section,{children:[(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{basis:"50%",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:w?(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"base64",children:(0,e.createComponentVNode)(2,t.Input,{value:E,onInput:function(){function G(X,J){return P(J)}return G}()})}):(0,e.createFragment)([(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Title",children:(0,e.createComponentVNode)(2,t.Input,{value:M,onInput:function(){function G(X,J){return R(J)}return G}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Content",children:(0,e.createComponentVNode)(2,t.Input,{value:F,onInput:function(){function G(X,J){return _(J)}return G}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Image Size",children:(0,e.createComponentVNode)(2,t.Slider,{width:10,value:z,minValue:0,maxValue:256,step:1,onChange:function(){function G(X,J){return $(J)}return G}()})})],4)})}),(0,e.createComponentVNode)(2,t.Stack.Item,{basis:"50%",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.Button.Checkbox,{fluid:!0,checked:c,onClick:function(){function G(){return m(!c)}return G}(),children:"Fluid"})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:p,onClick:function(){function G(){return N(!p)}return G}(),children:"Disabled"})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:y,onClick:function(){function G(){return I(!y)}return G}(),children:"Selected"})})]})})]}),(0,e.createComponentVNode)(2,t.Stack.Item,{mt:1,children:(0,e.createComponentVNode)(2,t.ImageButton,{m:!c&&0,fluid:c,base64:E,imageSize:z,title:M,tooltip:!c&&F,disabled:p,selected:y,buttonsAlt:c,buttons:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,translucent:c,compact:!c,color:!c&&"transparent",selected:w,onClick:function(){function G(){return A(!w)}return G}(),children:"Add Image"}),children:F})})]}),(0,e.createComponentVNode)(2,t.Section,{title:"Color States",buttons:(0,e.createComponentVNode)(2,t.Button.Checkbox,{checked:u,onClick:function(){function G(){return s(!u)}return G}(),children:"Fluid"}),children:b.map(function(G){return(0,e.createComponentVNode)(2,t.ImageButton,{fluid:u,color:G,imageSize:u?24:48,children:G},G)})}),(0,e.createComponentVNode)(2,t.Section,{title:"Available Colors",buttons:(0,e.createComponentVNode)(2,t.Button.Checkbox,{checked:v,onClick:function(){function G(){return C(!v)}return G}(),children:"Fluid"}),children:f.map(function(G){return(0,e.createComponentVNode)(2,t.ImageButton,{fluid:v,color:G,imageSize:v?24:48,children:G},G)})})],4)}},21394:function(T,r,n){"use strict";r.__esModule=!0,r.meta=void 0;var e=n(89005),a=n(72253),t=n(36036);/** * @file * @copyright 2021 Aleksej Komarov * @license MIT - */var o=r.meta={title:"Input",render:function(){function b(){return(0,e.createComponentVNode)(2,f)}return b}()},f=function(y,B){var k=(0,a.useLocalState)(B,"number",0),g=k[0],l=k[1],c=(0,a.useLocalState)(B,"text","Sample text"),m=c[0],i=c[1];return(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Input (onChange)",children:(0,e.createComponentVNode)(2,t.Input,{value:m,onChange:function(){function u(s,d){return i(d)}return u}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Input (onInput)",children:(0,e.createComponentVNode)(2,t.Input,{value:m,onInput:function(){function u(s,d){return i(d)}return u}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"NumberInput (onChange)",children:(0,e.createComponentVNode)(2,t.NumberInput,{animated:!0,width:"40px",step:1,stepPixelSize:5,value:g,minValue:-100,maxValue:100,onChange:function(){function u(s,d){return l(d)}return u}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"NumberInput (onDrag)",children:(0,e.createComponentVNode)(2,t.NumberInput,{animated:!0,width:"40px",step:1,stepPixelSize:5,value:g,minValue:-100,maxValue:100,onDrag:function(){function u(s,d){return l(d)}return u}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Slider (onDrag)",children:(0,e.createComponentVNode)(2,t.Slider,{step:1,stepPixelSize:5,value:g,minValue:-100,maxValue:100,onDrag:function(){function u(s,d){return l(d)}return u}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Knob (onDrag)",children:[(0,e.createComponentVNode)(2,t.Knob,{inline:!0,size:1,step:1,stepPixelSize:2,value:g,minValue:-100,maxValue:100,onDrag:function(){function u(s,d){return l(d)}return u}()}),(0,e.createComponentVNode)(2,t.Knob,{ml:1,inline:!0,bipolar:!0,size:1,step:1,stepPixelSize:2,value:g,minValue:-100,maxValue:100,onDrag:function(){function u(s,d){return l(d)}return u}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Rotating Icon",children:(0,e.createComponentVNode)(2,t.Box,{inline:!0,position:"relative",children:(0,e.createComponentVNode)(2,t.DraggableControl,{value:g,minValue:-100,maxValue:100,dragMatrix:[0,-1],step:1,stepPixelSize:5,onDrag:function(){function u(s,d){return l(d)}return u}(),children:function(){function u(s){return(0,e.createComponentVNode)(2,t.Box,{onMouseDown:s.handleDragStart,children:[(0,e.createComponentVNode)(2,t.Icon,{size:4,color:"yellow",name:"times",rotation:s.displayValue*4}),s.inputElement]})}return u}()})})})]})})}},43932:function(T,r,n){"use strict";r.__esModule=!0,r.meta=void 0;var e=n(89005),a=n(36036),t=r.meta={title:"Popper",render:function(){function f(){return(0,e.createComponentVNode)(2,o)}return f}()},o=function(){return(0,e.createFragment)([(0,e.createComponentVNode)(2,a.Popper,{popperContent:(0,e.createComponentVNode)(2,a.Box,{style:{background:"white",border:"2px solid blue"},children:"Loogatme!"}),options:{placement:"bottom"},children:(0,e.createComponentVNode)(2,a.Box,{style:{border:"5px solid white",height:"300px",width:"200px"}})}),(0,e.createComponentVNode)(2,a.Popper,{popperContent:(0,e.createComponentVNode)(2,a.Box,{style:{background:"white",border:"2px solid blue"},children:"I am on the right!"}),options:{placement:"right"},children:(0,e.createComponentVNode)(2,a.Box,{style:{border:"5px solid white",height:"500px",width:"100px"}})})],4)}},33270:function(T,r,n){"use strict";r.__esModule=!0,r.meta=void 0;var e=n(89005),a=n(72253),t=n(36036);/** + */var o=r.meta={title:"Input",render:function(){function b(){return(0,e.createComponentVNode)(2,f)}return b}()},f=function(S,B){var k=(0,a.useLocalState)(B,"number",0),g=k[0],l=k[1],c=(0,a.useLocalState)(B,"text","Sample text"),m=c[0],i=c[1];return(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Input (onChange)",children:(0,e.createComponentVNode)(2,t.Input,{value:m,onChange:function(){function u(s,d){return i(d)}return u}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Input (onInput)",children:(0,e.createComponentVNode)(2,t.Input,{value:m,onInput:function(){function u(s,d){return i(d)}return u}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"NumberInput (onChange)",children:(0,e.createComponentVNode)(2,t.NumberInput,{animated:!0,width:"40px",step:1,stepPixelSize:5,value:g,minValue:-100,maxValue:100,onChange:function(){function u(s,d){return l(d)}return u}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"NumberInput (onDrag)",children:(0,e.createComponentVNode)(2,t.NumberInput,{animated:!0,width:"40px",step:1,stepPixelSize:5,value:g,minValue:-100,maxValue:100,onDrag:function(){function u(s,d){return l(d)}return u}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Slider (onDrag)",children:(0,e.createComponentVNode)(2,t.Slider,{step:1,stepPixelSize:5,value:g,minValue:-100,maxValue:100,onDrag:function(){function u(s,d){return l(d)}return u}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Knob (onDrag)",children:[(0,e.createComponentVNode)(2,t.Knob,{inline:!0,size:1,step:1,stepPixelSize:2,value:g,minValue:-100,maxValue:100,onDrag:function(){function u(s,d){return l(d)}return u}()}),(0,e.createComponentVNode)(2,t.Knob,{ml:1,inline:!0,bipolar:!0,size:1,step:1,stepPixelSize:2,value:g,minValue:-100,maxValue:100,onDrag:function(){function u(s,d){return l(d)}return u}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Rotating Icon",children:(0,e.createComponentVNode)(2,t.Box,{inline:!0,position:"relative",children:(0,e.createComponentVNode)(2,t.DraggableControl,{value:g,minValue:-100,maxValue:100,dragMatrix:[0,-1],step:1,stepPixelSize:5,onDrag:function(){function u(s,d){return l(d)}return u}(),children:function(){function u(s){return(0,e.createComponentVNode)(2,t.Box,{onMouseDown:s.handleDragStart,children:[(0,e.createComponentVNode)(2,t.Icon,{size:4,color:"yellow",name:"times",rotation:s.displayValue*4}),s.inputElement]})}return u}()})})})]})})}},43932:function(T,r,n){"use strict";r.__esModule=!0,r.meta=void 0;var e=n(89005),a=n(36036),t=r.meta={title:"Popper",render:function(){function f(){return(0,e.createComponentVNode)(2,o)}return f}()},o=function(){return(0,e.createFragment)([(0,e.createComponentVNode)(2,a.Popper,{popperContent:(0,e.createComponentVNode)(2,a.Box,{style:{background:"white",border:"2px solid blue"},children:"Loogatme!"}),options:{placement:"bottom"},children:(0,e.createComponentVNode)(2,a.Box,{style:{border:"5px solid white",height:"300px",width:"200px"}})}),(0,e.createComponentVNode)(2,a.Popper,{popperContent:(0,e.createComponentVNode)(2,a.Box,{style:{background:"white",border:"2px solid blue"},children:"I am on the right!"}),options:{placement:"right"},children:(0,e.createComponentVNode)(2,a.Box,{style:{border:"5px solid white",height:"500px",width:"100px"}})})],4)}},33270:function(T,r,n){"use strict";r.__esModule=!0,r.meta=void 0;var e=n(89005),a=n(72253),t=n(36036);/** * @file * @copyright 2021 Aleksej Komarov * @license MIT - */var o=r.meta={title:"ProgressBar",render:function(){function b(){return(0,e.createComponentVNode)(2,f)}return b}()},f=function(y,B){var k=(0,a.useLocalState)(B,"progress",.5),g=k[0],l=k[1];return(0,e.createComponentVNode)(2,t.Section,{children:[(0,e.createComponentVNode)(2,t.ProgressBar,{ranges:{good:[.5,1/0],bad:[-1/0,.1],average:[0,.5]},minValue:-1,maxValue:1,value:g,children:["Value: ",Number(g).toFixed(1)]}),(0,e.createComponentVNode)(2,t.Box,{mt:1,children:[(0,e.createComponentVNode)(2,t.Button,{content:"-0.1",onClick:function(){function c(){return l(g-.1)}return c}()}),(0,e.createComponentVNode)(2,t.Button,{content:"+0.1",onClick:function(){function c(){return l(g+.1)}return c}()})]})]})}},77766:function(T,r,n){"use strict";r.__esModule=!0,r.meta=void 0;var e=n(89005),a=n(36036);/** + */var o=r.meta={title:"ProgressBar",render:function(){function b(){return(0,e.createComponentVNode)(2,f)}return b}()},f=function(S,B){var k=(0,a.useLocalState)(B,"progress",.5),g=k[0],l=k[1];return(0,e.createComponentVNode)(2,t.Section,{children:[(0,e.createComponentVNode)(2,t.ProgressBar,{ranges:{good:[.5,1/0],bad:[-1/0,.1],average:[0,.5]},minValue:-1,maxValue:1,value:g,children:["Value: ",Number(g).toFixed(1)]}),(0,e.createComponentVNode)(2,t.Box,{mt:1,children:[(0,e.createComponentVNode)(2,t.Button,{content:"-0.1",onClick:function(){function c(){return l(g-.1)}return c}()}),(0,e.createComponentVNode)(2,t.Button,{content:"+0.1",onClick:function(){function c(){return l(g+.1)}return c}()})]})]})}},77766:function(T,r,n){"use strict";r.__esModule=!0,r.meta=void 0;var e=n(89005),a=n(36036);/** * @file * @copyright 2021 Aleksej Komarov * @license MIT - */var t=r.meta={title:"Stack",render:function(){function y(){return(0,e.createComponentVNode)(2,b)}return y}()},o=function(){return(0,e.createComponentVNode)(2,a.Box,{inline:!0,width:1,height:1,children:"A"})},f=function(){return(0,e.createFragment)([(0,e.createComponentVNode)(2,a.Stack.Item,{children:(0,e.createComponentVNode)(2,o)}),(0,e.createComponentVNode)(2,a.Stack.Divider),(0,e.createComponentVNode)(2,a.Stack.Item,{children:(0,e.createComponentVNode)(2,o)})],4)},b=function(B,k){return(0,e.createComponentVNode)(2,a.Section,{fill:!0,children:(0,e.createComponentVNode)(2,a.Stack,{fill:!0,className:"debug-layout",children:[(0,e.createComponentVNode)(2,f),(0,e.createComponentVNode)(2,a.Stack.Item,{grow:1,children:(0,e.createComponentVNode)(2,a.Stack,{fill:!0,vertical:!0,zebra:!0,children:[(0,e.createComponentVNode)(2,f),(0,e.createComponentVNode)(2,a.Stack.Item,{children:(0,e.createComponentVNode)(2,a.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,f),(0,e.createComponentVNode)(2,a.Stack.Item,{grow:1}),(0,e.createComponentVNode)(2,f),(0,e.createComponentVNode)(2,f)]})}),(0,e.createComponentVNode)(2,a.Stack.Item,{grow:1}),(0,e.createComponentVNode)(2,f)]})})]})})}},30187:function(T,r,n){"use strict";r.__esModule=!0,r.meta=void 0;var e=n(89005),a=n(27108),t=n(36036),o=n(49968);/** + */var t=r.meta={title:"Stack",render:function(){function S(){return(0,e.createComponentVNode)(2,b)}return S}()},o=function(){return(0,e.createComponentVNode)(2,a.Box,{inline:!0,width:1,height:1,children:"A"})},f=function(){return(0,e.createFragment)([(0,e.createComponentVNode)(2,a.Stack.Item,{children:(0,e.createComponentVNode)(2,o)}),(0,e.createComponentVNode)(2,a.Stack.Divider),(0,e.createComponentVNode)(2,a.Stack.Item,{children:(0,e.createComponentVNode)(2,o)})],4)},b=function(B,k){return(0,e.createComponentVNode)(2,a.Section,{fill:!0,children:(0,e.createComponentVNode)(2,a.Stack,{fill:!0,className:"debug-layout",children:[(0,e.createComponentVNode)(2,f),(0,e.createComponentVNode)(2,a.Stack.Item,{grow:1,children:(0,e.createComponentVNode)(2,a.Stack,{fill:!0,vertical:!0,zebra:!0,children:[(0,e.createComponentVNode)(2,f),(0,e.createComponentVNode)(2,a.Stack.Item,{children:(0,e.createComponentVNode)(2,a.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,f),(0,e.createComponentVNode)(2,a.Stack.Item,{grow:1}),(0,e.createComponentVNode)(2,f),(0,e.createComponentVNode)(2,f)]})}),(0,e.createComponentVNode)(2,a.Stack.Item,{grow:1}),(0,e.createComponentVNode)(2,f)]})})]})})}},30187:function(T,r,n){"use strict";r.__esModule=!0,r.meta=void 0;var e=n(89005),a=n(27108),t=n(36036),o=n(49968);/** * @file * @copyright 2021 Aleksej Komarov * @license MIT - */var f=r.meta={title:"Storage",render:function(){function y(){return(0,e.createComponentVNode)(2,b)}return y}()},b=function(B,k){return window.localStorage?(0,e.createComponentVNode)(2,t.Section,{title:"Local Storage",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"recycle",onClick:function(){function g(){localStorage.clear(),a.storage.clear()}return g}(),children:"Clear"}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Keys in use",children:localStorage.length}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Remaining space",children:(0,o.formatSiUnit)(localStorage.remainingSpace,0,"B")})]})}):(0,e.createComponentVNode)(2,t.NoticeBox,{children:"Local storage is not available."})}},46554:function(T,r,n){"use strict";r.__esModule=!0,r.meta=void 0;var e=n(89005),a=n(72253),t=n(36036);/** + */var f=r.meta={title:"Storage",render:function(){function S(){return(0,e.createComponentVNode)(2,b)}return S}()},b=function(B,k){return window.localStorage?(0,e.createComponentVNode)(2,t.Section,{title:"Local Storage",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"recycle",onClick:function(){function g(){localStorage.clear(),a.storage.clear()}return g}(),children:"Clear"}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Keys in use",children:localStorage.length}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Remaining space",children:(0,o.formatSiUnit)(localStorage.remainingSpace,0,"B")})]})}):(0,e.createComponentVNode)(2,t.NoticeBox,{children:"Local storage is not available."})}},46554:function(T,r,n){"use strict";r.__esModule=!0,r.meta=void 0;var e=n(89005),a=n(72253),t=n(36036);/** * @file * @copyright 2021 Aleksej Komarov * @license MIT - */var o=r.meta={title:"Tabs",render:function(){function y(){return(0,e.createComponentVNode)(2,b)}return y}()},f=["Tab #1","Tab #2","Tab #3","Tab #4"],b=function(B,k){var g=(0,a.useLocalState)(k,"tabIndex",0),l=g[0],c=g[1],m=(0,a.useLocalState)(k,"tabProps",{}),i=m[0],u=m[1];return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Section,{children:[(0,e.createComponentVNode)(2,t.Button.Checkbox,{inline:!0,content:"vertical",checked:i.vertical,onClick:function(){function s(){return u(Object.assign({},i,{vertical:!i.vertical}))}return s}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{inline:!0,content:"leftSlot",checked:i.leftSlot,onClick:function(){function s(){return u(Object.assign({},i,{leftSlot:!i.leftSlot}))}return s}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{inline:!0,content:"rightSlot",checked:i.rightSlot,onClick:function(){function s(){return u(Object.assign({},i,{rightSlot:!i.rightSlot}))}return s}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{inline:!0,content:"icon",checked:i.icon,onClick:function(){function s(){return u(Object.assign({},i,{icon:!i.icon}))}return s}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{inline:!0,content:"fluid",checked:i.fluid,onClick:function(){function s(){return u(Object.assign({},i,{fluid:!i.fluid}))}return s}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{inline:!0,content:"left aligned",checked:i.leftAligned,onClick:function(){function s(){return u(Object.assign({},i,{leftAligned:!i.leftAligned}))}return s}()})]}),(0,e.createComponentVNode)(2,t.Section,{fitted:!0,children:(0,e.createComponentVNode)(2,t.Tabs,{vertical:i.vertical,fluid:i.fluid,textAlign:i.leftAligned&&"left",children:f.map(function(s,d){return(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:d===l,icon:i.icon&&"info-circle",leftSlot:i.leftSlot&&(0,e.createComponentVNode)(2,t.Button,{circular:!0,compact:!0,color:"transparent",icon:"times"}),rightSlot:i.rightSlot&&(0,e.createComponentVNode)(2,t.Button,{circular:!0,compact:!0,color:"transparent",icon:"times"}),onClick:function(){function v(){return c(d)}return v}(),children:s},d)})})})],4)}},53276:function(T,r,n){"use strict";r.__esModule=!0,r.meta=void 0;var e=n(89005),a=n(72253),t=n(36036);/** + */var o=r.meta={title:"Tabs",render:function(){function S(){return(0,e.createComponentVNode)(2,b)}return S}()},f=["Tab #1","Tab #2","Tab #3","Tab #4"],b=function(B,k){var g=(0,a.useLocalState)(k,"tabIndex",0),l=g[0],c=g[1],m=(0,a.useLocalState)(k,"tabProps",{}),i=m[0],u=m[1];return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Section,{children:[(0,e.createComponentVNode)(2,t.Button.Checkbox,{inline:!0,content:"vertical",checked:i.vertical,onClick:function(){function s(){return u(Object.assign({},i,{vertical:!i.vertical}))}return s}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{inline:!0,content:"leftSlot",checked:i.leftSlot,onClick:function(){function s(){return u(Object.assign({},i,{leftSlot:!i.leftSlot}))}return s}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{inline:!0,content:"rightSlot",checked:i.rightSlot,onClick:function(){function s(){return u(Object.assign({},i,{rightSlot:!i.rightSlot}))}return s}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{inline:!0,content:"icon",checked:i.icon,onClick:function(){function s(){return u(Object.assign({},i,{icon:!i.icon}))}return s}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{inline:!0,content:"fluid",checked:i.fluid,onClick:function(){function s(){return u(Object.assign({},i,{fluid:!i.fluid}))}return s}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{inline:!0,content:"left aligned",checked:i.leftAligned,onClick:function(){function s(){return u(Object.assign({},i,{leftAligned:!i.leftAligned}))}return s}()})]}),(0,e.createComponentVNode)(2,t.Section,{fitted:!0,children:(0,e.createComponentVNode)(2,t.Tabs,{vertical:i.vertical,fluid:i.fluid,textAlign:i.leftAligned&&"left",children:f.map(function(s,d){return(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:d===l,icon:i.icon&&"info-circle",leftSlot:i.leftSlot&&(0,e.createComponentVNode)(2,t.Button,{circular:!0,compact:!0,color:"transparent",icon:"times"}),rightSlot:i.rightSlot&&(0,e.createComponentVNode)(2,t.Button,{circular:!0,compact:!0,color:"transparent",icon:"times"}),onClick:function(){function v(){return c(d)}return v}(),children:s},d)})})})],4)}},53276:function(T,r,n){"use strict";r.__esModule=!0,r.meta=void 0;var e=n(89005),a=n(72253),t=n(36036);/** * @file * @copyright 2021 Aleksej Komarov * @license MIT - */var o=r.meta={title:"Themes",render:function(){function b(){return(0,e.createComponentVNode)(2,f)}return b}()},f=function(y,B){var k=(0,a.useLocalState)(B,"kitchenSinkTheme"),g=k[0],l=k[1];return(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Use theme",children:(0,e.createComponentVNode)(2,t.Input,{placeholder:"theme_name",value:g,onInput:function(){function c(m,i){return l(i)}return c}()})})})})}},28717:function(T,r,n){"use strict";r.__esModule=!0,r.meta=void 0;var e=n(89005),a=n(36036);/** + */var o=r.meta={title:"Themes",render:function(){function b(){return(0,e.createComponentVNode)(2,f)}return b}()},f=function(S,B){var k=(0,a.useLocalState)(B,"kitchenSinkTheme"),g=k[0],l=k[1];return(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Use theme",children:(0,e.createComponentVNode)(2,t.Input,{placeholder:"theme_name",value:g,onInput:function(){function c(m,i){return l(i)}return c}()})})})})}},28717:function(T,r,n){"use strict";r.__esModule=!0,r.meta=void 0;var e=n(89005),a=n(36036);/** * @file * @copyright 2021 Aleksej Komarov * @license MIT - */var t=r.meta={title:"Tooltip",render:function(){function f(){return(0,e.createComponentVNode)(2,o)}return f}()},o=function(){var b=["top","left","right","bottom","bottom-start","bottom-end"];return(0,e.createComponentVNode)(2,a.Section,{children:[(0,e.createComponentVNode)(2,a.Box,{children:[(0,e.createComponentVNode)(2,a.Tooltip,{content:"Tooltip text.",children:(0,e.createComponentVNode)(2,a.Box,{inline:!0,position:"relative",mr:1,children:"Box (hover me)."})}),(0,e.createComponentVNode)(2,a.Button,{tooltip:"Tooltip text.",content:"Button"})]}),(0,e.createComponentVNode)(2,a.Box,{mt:1,children:b.map(function(y){return(0,e.createComponentVNode)(2,a.Button,{color:"transparent",tooltip:"Tooltip text.",tooltipPosition:y,content:y},y)})})]})}},37168:function(T,r,n){"use strict";r.__esModule=!0,r.BoxWithSampleText=void 0;var e=n(89005),a=n(36036);/** + */var t=r.meta={title:"Tooltip",render:function(){function f(){return(0,e.createComponentVNode)(2,o)}return f}()},o=function(){var b=["top","left","right","bottom","bottom-start","bottom-end"];return(0,e.createComponentVNode)(2,a.Section,{children:[(0,e.createComponentVNode)(2,a.Box,{children:[(0,e.createComponentVNode)(2,a.Tooltip,{content:"Tooltip text.",children:(0,e.createComponentVNode)(2,a.Box,{inline:!0,position:"relative",mr:1,children:"Box (hover me)."})}),(0,e.createComponentVNode)(2,a.Button,{tooltip:"Tooltip text.",content:"Button"})]}),(0,e.createComponentVNode)(2,a.Box,{mt:1,children:b.map(function(S){return(0,e.createComponentVNode)(2,a.Button,{color:"transparent",tooltip:"Tooltip text.",tooltipPosition:S,content:S},S)})})]})}},37168:function(T,r,n){"use strict";r.__esModule=!0,r.BoxWithSampleText=void 0;var e=n(89005),a=n(36036);/** * @file * @copyright 2021 Aleksej Komarov * @license MIT - */var t=r.BoxWithSampleText=function(){function o(f){return(0,e.normalizeProps)((0,e.createComponentVNode)(2,a.Box,Object.assign({},f,{children:[(0,e.createComponentVNode)(2,a.Box,{italic:!0,children:"Jackdaws love my big sphinx of quartz."}),(0,e.createComponentVNode)(2,a.Box,{mt:1,bold:!0,children:"The wide electrification of the southern provinces will give a powerful impetus to the growth of agriculture."})]})))}return o}()},67160:function(){},23542:function(){},30386:function(){},98996:function(){},50578:function(){},4444:function(){},77870:function(){},23632:function(){},56492:function(){},39108:function(){},11714:function(){},73492:function(){},49641:function(){},17570:function(){},61858:function(){},32882:function(){},70752:function(T,r,n){var e={"./pai_atmosphere.js":80818,"./pai_bioscan.js":23903,"./pai_directives.js":64988,"./pai_doorjack.js":13813,"./pai_main_menu.js":66025,"./pai_manifest.js":2983,"./pai_medrecords.js":40758,"./pai_messenger.js":98599,"./pai_radio.js":50775,"./pai_secrecords.js":48623,"./pai_signaler.js":47297};function a(o){var f=t(o);return n(f)}function t(o){if(!n.o(e,o)){var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}return e[o]}a.keys=function(){return Object.keys(e)},a.resolve=t,T.exports=a,a.id=70752},59395:function(T,r,n){var e={"./pda_atmos_scan.js":78532,"./pda_games.js":2395,"./pda_janitor.js":40253,"./pda_main_menu.js":58293,"./pda_manifest.js":58059,"./pda_medical.js":18147,"./pda_messenger.js":77595,"./pda_minesweeper.js":90382,"./pda_mule.js":24635,"./pda_nanobank.js":23734,"./pda_notes.js":97085,"./pda_power.js":57513,"./pda_secbot.js":99808,"./pda_security.js":77168,"./pda_signaler.js":21773,"./pda_status_display.js":81857,"./pda_supplyrecords.js":70287};function a(o){var f=t(o);return n(f)}function t(o){if(!n.o(e,o)){var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}return e[o]}a.keys=function(){return Object.keys(e)},a.resolve=t,T.exports=a,a.id=59395},32054:function(T,r,n){var e={"./AICard":1090,"./AICard.js":1090,"./AIFixer":39454,"./AIFixer.js":39454,"./APC":88422,"./APC.js":88422,"./ATM":99660,"./ATM.js":99660,"./AccountsUplinkTerminal":86423,"./AccountsUplinkTerminal.js":86423,"./AdminAntagMenu":23001,"./AdminAntagMenu.js":23001,"./AgentCard":39683,"./AgentCard.tsx":39683,"./AiAirlock":56793,"./AiAirlock.js":56793,"./AirAlarm":72475,"./AirAlarm.js":72475,"./AirlockAccessController":12333,"./AirlockAccessController.js":12333,"./AirlockElectronics":28736,"./AirlockElectronics.js":28736,"./AlertModal":47365,"./AlertModal.tsx":47365,"./AppearanceChanger":71824,"./AppearanceChanger.js":71824,"./AtmosAlertConsole":72285,"./AtmosAlertConsole.js":72285,"./AtmosControl":65805,"./AtmosControl.js":65805,"./AtmosFilter":87816,"./AtmosFilter.js":87816,"./AtmosMixer":52977,"./AtmosMixer.js":52977,"./AtmosPump":11748,"./AtmosPump.js":11748,"./AtmosTankControl":69321,"./AtmosTankControl.js":69321,"./AugmentMenu":92444,"./AugmentMenu.js":92444,"./Autolathe":59179,"./Autolathe.js":59179,"./BioChipPad":5147,"./BioChipPad.js":5147,"./Biogenerator":64273,"./Biogenerator.js":64273,"./BloomEdit":47823,"./BloomEdit.js":47823,"./BlueSpaceArtilleryControl":18621,"./BlueSpaceArtilleryControl.js":18621,"./BluespaceTap":27629,"./BluespaceTap.js":27629,"./BodyScanner":33758,"./BodyScanner.js":33758,"./BookBinder":67963,"./BookBinder.js":67963,"./BotCall":61925,"./BotCall.js":61925,"./BotClean":20464,"./BotClean.js":20464,"./BotFloor":69479,"./BotFloor.js":69479,"./BotHonk":59887,"./BotHonk.js":59887,"./BotMed":80063,"./BotMed.js":80063,"./BotSecurity":74439,"./BotSecurity.js":74439,"./BrigCells":10833,"./BrigCells.js":10833,"./BrigTimer":45761,"./BrigTimer.js":45761,"./CameraConsole":26300,"./CameraConsole.js":26300,"./Canister":52927,"./Canister.js":52927,"./CardComputer":51793,"./CardComputer.js":51793,"./CargoConsole":64083,"./CargoConsole.js":64083,"./Chameleon":36232,"./Chameleon.tsx":36232,"./ChangelogView":87331,"./ChangelogView.js":87331,"./CheckboxListInputModal":91360,"./CheckboxListInputModal.tsx":91360,"./ChemDispenser":36108,"./ChemDispenser.js":36108,"./ChemHeater":13146,"./ChemHeater.js":13146,"./ChemMaster":56541,"./ChemMaster.tsx":56541,"./CloningConsole":37173,"./CloningConsole.js":37173,"./CloningPod":98723,"./CloningPod.js":98723,"./CoinMint":18259,"./CoinMint.tsx":18259,"./ColorPickerModal":93858,"./ColorPickerModal.tsx":93858,"./ColourMatrixTester":8444,"./ColourMatrixTester.js":8444,"./CommunicationsComputer":63818,"./CommunicationsComputer.js":63818,"./CompostBin":20562,"./CompostBin.js":20562,"./Contractor":21813,"./Contractor.js":21813,"./ConveyorSwitch":54151,"./ConveyorSwitch.js":54151,"./CrewMonitor":73169,"./CrewMonitor.js":73169,"./Cryo":63987,"./Cryo.js":63987,"./CryopodConsole":86099,"./CryopodConsole.js":86099,"./DNAModifier":12692,"./DNAModifier.js":12692,"./DecalPainter":76430,"./DecalPainter.js":76430,"./DestinationTagger":41074,"./DestinationTagger.js":41074,"./DisposalBin":46500,"./DisposalBin.js":46500,"./DnaVault":33233,"./DnaVault.js":33233,"./DroneConsole":33681,"./DroneConsole.js":33681,"./EFTPOS":17263,"./EFTPOS.js":17263,"./ERTManager":76382,"./ERTManager.js":76382,"./EconomyManager":90217,"./EconomyManager.js":90217,"./Electropack":82565,"./Electropack.js":82565,"./Emojipedia":11243,"./Emojipedia.tsx":11243,"./EvolutionMenu":36730,"./EvolutionMenu.js":36730,"./ExosuitFabricator":17370,"./ExosuitFabricator.js":17370,"./ExperimentConsole":59128,"./ExperimentConsole.js":59128,"./ExternalAirlockController":97086,"./ExternalAirlockController.js":97086,"./FaxMachine":96142,"./FaxMachine.js":96142,"./FilingCabinet":74123,"./FilingCabinet.js":74123,"./FloorPainter":83767,"./FloorPainter.js":83767,"./GPS":53424,"./GPS.js":53424,"./GeneModder":89124,"./GeneModder.js":89124,"./GenericCrewManifest":73053,"./GenericCrewManifest.js":73053,"./GhostHudPanel":42914,"./GhostHudPanel.js":42914,"./GlandDispenser":25825,"./GlandDispenser.js":25825,"./GravityGen":10270,"./GravityGen.js":10270,"./GuestPass":48657,"./GuestPass.js":48657,"./HandheldChemDispenser":67834,"./HandheldChemDispenser.js":67834,"./HealthSensor":46098,"./HealthSensor.js":46098,"./Holodeck":36771,"./Holodeck.js":36771,"./Instrument":25471,"./Instrument.js":25471,"./KeyComboModal":13618,"./KeyComboModal.tsx":13618,"./KeycardAuth":35655,"./KeycardAuth.js":35655,"./KitchenMachine":62955,"./KitchenMachine.js":62955,"./LawManager":9525,"./LawManager.js":9525,"./LibraryComputer":85066,"./LibraryComputer.js":85066,"./LibraryManager":9516,"./LibraryManager.js":9516,"./ListInputModal":90447,"./ListInputModal.tsx":90447,"./Loadout":26826,"./Loadout.tsx":26826,"./MODsuit":77613,"./MODsuit.js":77613,"./MagnetController":78624,"./MagnetController.js":78624,"./MechBayConsole":72106,"./MechBayConsole.js":72106,"./MechaControlConsole":7466,"./MechaControlConsole.js":7466,"./MedicalRecords":79625,"./MedicalRecords.js":79625,"./MerchVendor":54989,"./MerchVendor.js":54989,"./MiningVendor":87684,"./MiningVendor.js":87684,"./NTRecruiter":59783,"./NTRecruiter.js":59783,"./Newscaster":64713,"./Newscaster.js":64713,"./Noticeboard":48286,"./Noticeboard.tsx":48286,"./NuclearBomb":41166,"./NuclearBomb.js":41166,"./NumberInputModal":52416,"./NumberInputModal.tsx":52416,"./OperatingComputer":1218,"./OperatingComputer.js":1218,"./Orbit":46892,"./Orbit.js":46892,"./OreRedemption":15421,"./OreRedemption.js":15421,"./PAI":52754,"./PAI.js":52754,"./PDA":85175,"./PDA.js":85175,"./Pacman":68654,"./Pacman.js":68654,"./PanDEMIC":1701,"./PanDEMIC.tsx":1701,"./ParticleAccelerator":67921,"./ParticleAccelerator.js":67921,"./PdaPainter":71432,"./PdaPainter.js":71432,"./PersonalCrafting":33388,"./PersonalCrafting.js":33388,"./Photocopier":56150,"./Photocopier.js":56150,"./PoolController":84676,"./PoolController.js":84676,"./PortablePump":57003,"./PortablePump.js":57003,"./PortableScrubber":70069,"./PortableScrubber.js":70069,"./PortableTurret":59955,"./PortableTurret.js":59955,"./PowerMonitor":61631,"./PowerMonitor.js":61631,"./PrisonerImplantManager":50992,"./PrisonerImplantManager.js":50992,"./PrisonerShuttleConsole":53952,"./PrisonerShuttleConsole.js":53952,"./PrizeCounter":97852,"./PrizeCounter.tsx":97852,"./RCD":94813,"./RCD.js":94813,"./RPD":18738,"./RPD.js":18738,"./Radio":80299,"./Radio.js":80299,"./RankedListInputModal":14846,"./RankedListInputModal.tsx":14846,"./ReagentGrinder":48125,"./ReagentGrinder.js":48125,"./ReagentsEditor":58262,"./ReagentsEditor.tsx":58262,"./RemoteSignaler":30207,"./RemoteSignaler.js":30207,"./RequestConsole":25472,"./RequestConsole.js":25472,"./RndBackupConsole":9861,"./RndBackupConsole.js":9861,"./RndConsole":12644,"./RndConsole/":12644,"./RndConsole/AnalyzerMenu":68303,"./RndConsole/AnalyzerMenu.js":68303,"./RndConsole/DataDiskMenu":37556,"./RndConsole/DataDiskMenu.js":37556,"./RndConsole/LatheCategory":16830,"./RndConsole/LatheCategory.js":16830,"./RndConsole/LatheChemicalStorage":70497,"./RndConsole/LatheChemicalStorage.js":70497,"./RndConsole/LatheMainMenu":70864,"./RndConsole/LatheMainMenu.js":70864,"./RndConsole/LatheMaterialStorage":42878,"./RndConsole/LatheMaterialStorage.js":42878,"./RndConsole/LatheMaterials":52662,"./RndConsole/LatheMaterials.js":52662,"./RndConsole/LatheMenu":9681,"./RndConsole/LatheMenu.js":9681,"./RndConsole/LatheSearch":68198,"./RndConsole/LatheSearch.js":68198,"./RndConsole/LinkMenu":81421,"./RndConsole/LinkMenu.js":81421,"./RndConsole/SettingsMenu":6256,"./RndConsole/SettingsMenu.js":6256,"./RndConsole/index":12644,"./RndConsole/index.js":12644,"./RndNetController":29205,"./RndNetController.js":29205,"./RndServer":63315,"./RndServer.js":63315,"./RobotSelfDiagnosis":26109,"./RobotSelfDiagnosis.js":26109,"./RoboticsControlConsole":97997,"./RoboticsControlConsole.js":97997,"./Safe":54431,"./Safe.js":54431,"./SatelliteControl":29740,"./SatelliteControl.js":29740,"./SecureStorage":44162,"./SecureStorage.js":44162,"./SecurityRecords":6272,"./SecurityRecords.js":6272,"./SeedExtractor":5099,"./SeedExtractor.js":5099,"./ShuttleConsole":2916,"./ShuttleConsole.js":2916,"./ShuttleManipulator":39401,"./ShuttleManipulator.js":39401,"./SingularityMonitor":86013,"./SingularityMonitor.js":86013,"./Sleeper":88284,"./Sleeper.js":88284,"./SlotMachine":21597,"./SlotMachine.js":21597,"./Smartfridge":46348,"./Smartfridge.js":46348,"./Smes":86162,"./Smes.js":86162,"./SolarControl":63584,"./SolarControl.js":63584,"./SpawnersMenu":38096,"./SpawnersMenu.js":38096,"./SpecMenu":30586,"./SpecMenu.js":30586,"./StackCraft":95152,"./StackCraft.js":95152,"./StationAlertConsole":38307,"./StationAlertConsole.js":38307,"./StationTraitsPanel":96091,"./StationTraitsPanel.tsx":96091,"./StripMenu":39409,"./StripMenu.tsx":39409,"./SuitStorage":69514,"./SuitStorage.js":69514,"./SupermatterMonitor":15022,"./SupermatterMonitor.js":15022,"./SyndicateComputerSimple":46029,"./SyndicateComputerSimple.js":46029,"./TEG":36372,"./TEG.js":36372,"./TachyonArray":56441,"./TachyonArray.js":56441,"./Tank":1754,"./Tank.js":1754,"./TankDispenser":7579,"./TankDispenser.js":7579,"./TcommsCore":16136,"./TcommsCore.js":16136,"./TcommsRelay":88046,"./TcommsRelay.js":88046,"./Teleporter":20802,"./Teleporter.js":20802,"./TelescienceConsole":48517,"./TelescienceConsole.js":48517,"./TempGun":21800,"./TempGun.js":21800,"./TextInputModal":24410,"./TextInputModal.tsx":24410,"./ThermoMachine":25036,"./ThermoMachine.js":25036,"./TransferValve":20035,"./TransferValve.js":20035,"./TurbineComputer":78166,"./TurbineComputer.js":78166,"./Uplink":52847,"./Uplink.js":52847,"./Vending":12261,"./Vending.js":12261,"./VolumeMixer":68971,"./VolumeMixer.js":68971,"./VotePanel":2510,"./VotePanel.js":2510,"./Wires":30138,"./Wires.js":30138,"./WizardApprenticeContract":21400,"./WizardApprenticeContract.js":21400,"./common/AccessList":49148,"./common/AccessList.js":49148,"./common/AtmosScan":26991,"./common/AtmosScan.js":26991,"./common/BeakerContents":85870,"./common/BeakerContents.js":85870,"./common/BotStatus":92963,"./common/BotStatus.js":92963,"./common/ComplexModal":3939,"./common/ComplexModal.js":3939,"./common/CrewManifest":41874,"./common/CrewManifest.js":41874,"./common/InputButtons":19203,"./common/InputButtons.tsx":19203,"./common/InterfaceLockNoticeBox":195,"./common/InterfaceLockNoticeBox.js":195,"./common/Loader":51057,"./common/Loader.tsx":51057,"./common/LoginInfo":321,"./common/LoginInfo.js":321,"./common/LoginScreen":5485,"./common/LoginScreen.js":5485,"./common/Operating":62411,"./common/Operating.js":62411,"./common/Signaler":13545,"./common/Signaler.js":13545,"./common/SimpleRecords":41984,"./common/SimpleRecords.js":41984,"./common/TemporaryNotice":22091,"./common/TemporaryNotice.js":22091,"./goonstation_PTL":95213,"./goonstation_PTL/":95213,"./goonstation_PTL/index":95213,"./goonstation_PTL/index.js":95213,"./pai/pai_atmosphere":80818,"./pai/pai_atmosphere.js":80818,"./pai/pai_bioscan":23903,"./pai/pai_bioscan.js":23903,"./pai/pai_directives":64988,"./pai/pai_directives.js":64988,"./pai/pai_doorjack":13813,"./pai/pai_doorjack.js":13813,"./pai/pai_main_menu":66025,"./pai/pai_main_menu.js":66025,"./pai/pai_manifest":2983,"./pai/pai_manifest.js":2983,"./pai/pai_medrecords":40758,"./pai/pai_medrecords.js":40758,"./pai/pai_messenger":98599,"./pai/pai_messenger.js":98599,"./pai/pai_radio":50775,"./pai/pai_radio.js":50775,"./pai/pai_secrecords":48623,"./pai/pai_secrecords.js":48623,"./pai/pai_signaler":47297,"./pai/pai_signaler.js":47297,"./pda/pda_atmos_scan":78532,"./pda/pda_atmos_scan.js":78532,"./pda/pda_games":2395,"./pda/pda_games.js":2395,"./pda/pda_janitor":40253,"./pda/pda_janitor.js":40253,"./pda/pda_main_menu":58293,"./pda/pda_main_menu.js":58293,"./pda/pda_manifest":58059,"./pda/pda_manifest.js":58059,"./pda/pda_medical":18147,"./pda/pda_medical.js":18147,"./pda/pda_messenger":77595,"./pda/pda_messenger.js":77595,"./pda/pda_minesweeper":90382,"./pda/pda_minesweeper.js":90382,"./pda/pda_mule":24635,"./pda/pda_mule.js":24635,"./pda/pda_nanobank":23734,"./pda/pda_nanobank.js":23734,"./pda/pda_notes":97085,"./pda/pda_notes.js":97085,"./pda/pda_power":57513,"./pda/pda_power.js":57513,"./pda/pda_secbot":99808,"./pda/pda_secbot.js":99808,"./pda/pda_security":77168,"./pda/pda_security.js":77168,"./pda/pda_signaler":21773,"./pda/pda_signaler.js":21773,"./pda/pda_status_display":81857,"./pda/pda_status_display.js":81857,"./pda/pda_supplyrecords":70287,"./pda/pda_supplyrecords.js":70287};function a(o){var f=t(o);return n(f)}function t(o){if(!n.o(e,o)){var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}return e[o]}a.keys=function(){return Object.keys(e)},a.resolve=t,T.exports=a,a.id=32054},4085:function(T,r,n){var e={"./Blink.stories.js":51364,"./BlockQuote.stories.js":32453,"./Box.stories.js":83531,"./Button.stories.js":74198,"./ByondUi.stories.js":51956,"./Collapsible.stories.js":17466,"./Flex.stories.js":89241,"./ImageButton.stories.js":48779,"./Input.stories.js":21394,"./Popper.stories.js":43932,"./ProgressBar.stories.js":33270,"./Stack.stories.js":77766,"./Storage.stories.js":30187,"./Tabs.stories.js":46554,"./Themes.stories.js":53276,"./Tooltip.stories.js":28717};function a(o){var f=t(o);return n(f)}function t(o){if(!n.o(e,o)){var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}return e[o]}a.keys=function(){return Object.keys(e)},a.resolve=t,T.exports=a,a.id=4085},10320:function(T,r,n){"use strict";var e=n(55747),a=n(89393),t=TypeError;T.exports=function(o){if(e(o))return o;throw new t(a(o)+" is not a function")}},32606:function(T,r,n){"use strict";var e=n(1031),a=n(89393),t=TypeError;T.exports=function(o){if(e(o))return o;throw new t(a(o)+" is not a constructor")}},35908:function(T,r,n){"use strict";var e=n(45015),a=String,t=TypeError;T.exports=function(o){if(e(o))return o;throw new t("Can't set "+a(o)+" as a prototype")}},80575:function(T,r,n){"use strict";var e=n(24697),a=n(80674),t=n(74595).f,o=e("unscopables"),f=Array.prototype;f[o]===void 0&&t(f,o,{configurable:!0,value:a(null)}),T.exports=function(b){f[o][b]=!0}},35483:function(T,r,n){"use strict";var e=n(50233).charAt;T.exports=function(a,t,o){return t+(o?e(a,t).length:1)}},60077:function(T,r,n){"use strict";var e=n(21287),a=TypeError;T.exports=function(t,o){if(e(o,t))return t;throw new a("Incorrect invocation")}},30365:function(T,r,n){"use strict";var e=n(77568),a=String,t=TypeError;T.exports=function(o){if(e(o))return o;throw new t(a(o)+" is not an object")}},70377:function(T){"use strict";T.exports=typeof ArrayBuffer!="undefined"&&typeof DataView!="undefined"},3782:function(T,r,n){"use strict";var e=n(40033);T.exports=e(function(){if(typeof ArrayBuffer=="function"){var a=new ArrayBuffer(8);Object.isExtensible(a)&&Object.defineProperty(a,"a",{value:8})}})},4246:function(T,r,n){"use strict";var e=n(70377),a=n(58310),t=n(74685),o=n(55747),f=n(77568),b=n(45299),y=n(2281),B=n(89393),k=n(37909),g=n(55938),l=n(73936),c=n(21287),m=n(36917),i=n(76649),u=n(24697),s=n(16738),d=n(5419),v=d.enforce,h=d.get,C=t.Int8Array,p=C&&C.prototype,N=t.Uint8ClampedArray,V=N&&N.prototype,S=C&&m(C),I=p&&m(p),L=Object.prototype,w=t.TypeError,A=u("toStringTag"),x=s("TYPED_ARRAY_TAG"),E="TypedArrayConstructor",P=e&&!!i&&y(t.opera)!=="Opera",D=!1,M,R,O,F={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},_={BigInt64Array:8,BigUint64Array:8},U=function(){function ie(me){if(!f(me))return!1;var q=y(me);return q==="DataView"||b(F,q)||b(_,q)}return ie}(),z=function ie(me){var q=m(me);if(f(q)){var re=h(q);return re&&b(re,E)?re[E]:ie(q)}},$=function(me){if(!f(me))return!1;var q=y(me);return b(F,q)||b(_,q)},G=function(me){if($(me))return me;throw new w("Target is not a typed array")},X=function(me){if(o(me)&&(!i||c(S,me)))return me;throw new w(B(me)+" is not a typed array constructor")},J=function(me,q,re,ae){if(a){if(re)for(var le in F){var Z=t[le];if(Z&&b(Z.prototype,me))try{delete Z.prototype[me]}catch(ne){try{Z.prototype[me]=q}catch(te){}}}(!I[me]||re)&&g(I,me,re?q:P&&p[me]||q,ae)}},se=function(me,q,re){var ae,le;if(a){if(i){if(re){for(ae in F)if(le=t[ae],le&&b(le,me))try{delete le[me]}catch(Z){}}if(!S[me]||re)try{return g(S,me,re?q:P&&S[me]||q)}catch(Z){}else return}for(ae in F)le=t[ae],le&&(!le[me]||re)&&g(le,me,q)}};for(M in F)R=t[M],O=R&&R.prototype,O?v(O)[E]=R:P=!1;for(M in _)R=t[M],O=R&&R.prototype,O&&(v(O)[E]=R);if((!P||!o(S)||S===Function.prototype)&&(S=function(){function ie(){throw new w("Incorrect invocation")}return ie}(),P))for(M in F)t[M]&&i(t[M],S);if((!P||!I||I===L)&&(I=S.prototype,P))for(M in F)t[M]&&i(t[M].prototype,I);if(P&&m(V)!==I&&i(V,I),a&&!b(I,A)){D=!0,l(I,A,{configurable:!0,get:function(){function ie(){return f(this)?this[x]:void 0}return ie}()});for(M in F)t[M]&&k(t[M],x,M)}T.exports={NATIVE_ARRAY_BUFFER_VIEWS:P,TYPED_ARRAY_TAG:D&&x,aTypedArray:G,aTypedArrayConstructor:X,exportTypedArrayMethod:J,exportTypedArrayStaticMethod:se,getTypedArrayConstructor:z,isView:U,isTypedArray:$,TypedArray:S,TypedArrayPrototype:I}},37336:function(T,r,n){"use strict";var e=n(74685),a=n(67250),t=n(58310),o=n(70377),f=n(70520),b=n(37909),y=n(73936),B=n(30145),k=n(40033),g=n(60077),l=n(61365),c=n(10188),m=n(43806),i=n(95867),u=n(91784),s=n(36917),d=n(76649),v=n(88471),h=n(54602),C=n(5781),p=n(5774),N=n(84925),V=n(5419),S=f.PROPER,I=f.CONFIGURABLE,L="ArrayBuffer",w="DataView",A="prototype",x="Wrong length",E="Wrong index",P=V.getterFor(L),D=V.getterFor(w),M=V.set,R=e[L],O=R,F=O&&O[A],_=e[w],U=_&&_[A],z=Object.prototype,$=e.Array,G=e.RangeError,X=a(v),J=a([].reverse),se=u.pack,ie=u.unpack,me=function(Ne){return[Ne&255]},q=function(Ne){return[Ne&255,Ne>>8&255]},re=function(Ne){return[Ne&255,Ne>>8&255,Ne>>16&255,Ne>>24&255]},ae=function(Ne){return Ne[3]<<24|Ne[2]<<16|Ne[1]<<8|Ne[0]},le=function(Ne){return se(i(Ne),23,4)},Z=function(Ne){return se(Ne,52,8)},ne=function(Ne,Be,be){y(Ne[A],Be,{configurable:!0,get:function(){function Le(){return be(this)[Be]}return Le}()})},te=function(Ne,Be,be,Le){var we=D(Ne),xe=m(be),Re=!!Le;if(xe+Be>we.byteLength)throw new G(E);var He=we.bytes,ye=xe+we.byteOffset,de=h(He,ye,ye+Be);return Re?de:J(de)},fe=function(Ne,Be,be,Le,we,xe){var Re=D(Ne),He=m(be),ye=Le(+we),de=!!xe;if(He+Be>Re.byteLength)throw new G(E);for(var he=Re.bytes,ke=He+Re.byteOffset,ve=0;vewe)throw new G("Wrong offset");if(be=be===void 0?we-xe:c(be),xe+be>we)throw new G(x);M(this,{type:w,buffer:Ne,byteLength:be,byteOffset:xe,bytes:Le.bytes}),t||(this.buffer=Ne,this.byteLength=be,this.byteOffset=xe)}return Ce}(),U=_[A],t&&(ne(O,"byteLength",P),ne(_,"buffer",D),ne(_,"byteLength",D),ne(_,"byteOffset",D)),B(U,{getInt8:function(){function Ce(Ne){return te(this,1,Ne)[0]<<24>>24}return Ce}(),getUint8:function(){function Ce(Ne){return te(this,1,Ne)[0]}return Ce}(),getInt16:function(){function Ce(Ne){var Be=te(this,2,Ne,arguments.length>1?arguments[1]:!1);return(Be[1]<<8|Be[0])<<16>>16}return Ce}(),getUint16:function(){function Ce(Ne){var Be=te(this,2,Ne,arguments.length>1?arguments[1]:!1);return Be[1]<<8|Be[0]}return Ce}(),getInt32:function(){function Ce(Ne){return ae(te(this,4,Ne,arguments.length>1?arguments[1]:!1))}return Ce}(),getUint32:function(){function Ce(Ne){return ae(te(this,4,Ne,arguments.length>1?arguments[1]:!1))>>>0}return Ce}(),getFloat32:function(){function Ce(Ne){return ie(te(this,4,Ne,arguments.length>1?arguments[1]:!1),23)}return Ce}(),getFloat64:function(){function Ce(Ne){return ie(te(this,8,Ne,arguments.length>1?arguments[1]:!1),52)}return Ce}(),setInt8:function(){function Ce(Ne,Be){fe(this,1,Ne,me,Be)}return Ce}(),setUint8:function(){function Ce(Ne,Be){fe(this,1,Ne,me,Be)}return Ce}(),setInt16:function(){function Ce(Ne,Be){fe(this,2,Ne,q,Be,arguments.length>2?arguments[2]:!1)}return Ce}(),setUint16:function(){function Ce(Ne,Be){fe(this,2,Ne,q,Be,arguments.length>2?arguments[2]:!1)}return Ce}(),setInt32:function(){function Ce(Ne,Be){fe(this,4,Ne,re,Be,arguments.length>2?arguments[2]:!1)}return Ce}(),setUint32:function(){function Ce(Ne,Be){fe(this,4,Ne,re,Be,arguments.length>2?arguments[2]:!1)}return Ce}(),setFloat32:function(){function Ce(Ne,Be){fe(this,4,Ne,le,Be,arguments.length>2?arguments[2]:!1)}return Ce}(),setFloat64:function(){function Ce(Ne,Be){fe(this,8,Ne,Z,Be,arguments.length>2?arguments[2]:!1)}return Ce}()});else{var pe=S&&R.name!==L;!k(function(){R(1)})||!k(function(){new R(-1)})||k(function(){return new R,new R(1.5),new R(NaN),R.length!==1||pe&&!I})?(O=function(){function Ce(Ne){return g(this,F),C(new R(m(Ne)),this,O)}return Ce}(),O[A]=F,F.constructor=O,p(O,R)):pe&&I&&b(R,"name",L),d&&s(U)!==z&&d(U,z);var ce=new _(new O(2)),Ve=a(U.setInt8);ce.setInt8(0,2147483648),ce.setInt8(1,2147483649),(ce.getInt8(0)||!ce.getInt8(1))&&B(U,{setInt8:function(){function Ce(Ne,Be){Ve(this,Ne,Be<<24>>24)}return Ce}(),setUint8:function(){function Ce(Ne,Be){Ve(this,Ne,Be<<24>>24)}return Ce}()},{unsafe:!0})}N(O,L),N(_,w),T.exports={ArrayBuffer:O,DataView:_}},71447:function(T,r,n){"use strict";var e=n(46771),a=n(13912),t=n(24760),o=n(95108),f=Math.min;T.exports=[].copyWithin||function(){function b(y,B){var k=e(this),g=t(k),l=a(y,g),c=a(B,g),m=arguments.length>2?arguments[2]:void 0,i=f((m===void 0?g:a(m,g))-c,g-l),u=1;for(c0;)c in k?k[l]=k[c]:o(k,l),l+=u,c+=u;return k}return b}()},88471:function(T,r,n){"use strict";var e=n(46771),a=n(13912),t=n(24760);T.exports=function(){function o(f){for(var b=e(this),y=t(b),B=arguments.length,k=a(B>1?arguments[1]:void 0,y),g=B>2?arguments[2]:void 0,l=g===void 0?y:a(g,y);l>k;)b[k++]=f;return b}return o}()},35601:function(T,r,n){"use strict";var e=n(22603).forEach,a=n(55528),t=a("forEach");T.exports=t?[].forEach:function(){function o(f){return e(this,f,arguments.length>1?arguments[1]:void 0)}return o}()},78008:function(T,r,n){"use strict";var e=n(24760);T.exports=function(a,t,o){for(var f=0,b=arguments.length>2?o:e(t),y=new a(b);b>f;)y[f]=t[f++];return y}},73174:function(T,r,n){"use strict";var e=n(75754),a=n(91495),t=n(46771),o=n(40125),f=n(76571),b=n(1031),y=n(24760),B=n(60102),k=n(77455),g=n(59201),l=Array;T.exports=function(){function c(m){var i=t(m),u=b(this),s=arguments.length,d=s>1?arguments[1]:void 0,v=d!==void 0;v&&(d=e(d,s>2?arguments[2]:void 0));var h=g(i),C=0,p,N,V,S,I,L;if(h&&!(this===l&&f(h)))for(N=u?new this:[],S=k(i,h),I=S.next;!(V=a(I,S)).done;C++)L=v?o(S,d,[V.value,C],!0):V.value,B(N,C,L);else for(p=y(i),N=u?new this(p):l(p);p>C;C++)L=v?d(i[C],C):i[C],B(N,C,L);return N.length=C,N}return c}()},14211:function(T,r,n){"use strict";var e=n(57591),a=n(13912),t=n(24760),o=function(b){return function(y,B,k){var g=e(y),l=t(g);if(l===0)return!b&&-1;var c=a(k,l),m;if(b&&B!==B){for(;l>c;)if(m=g[c++],m!==m)return!0}else for(;l>c;c++)if((b||c in g)&&g[c]===B)return b||c||0;return!b&&-1}};T.exports={includes:o(!0),indexOf:o(!1)}},22603:function(T,r,n){"use strict";var e=n(75754),a=n(67250),t=n(37457),o=n(46771),f=n(24760),b=n(57823),y=a([].push),B=function(g){var l=g===1,c=g===2,m=g===3,i=g===4,u=g===6,s=g===7,d=g===5||u;return function(v,h,C,p){for(var N=o(v),V=t(N),S=f(V),I=e(h,C),L=0,w=p||b,A=l?w(v,S):c||s?w(v,0):void 0,x,E;S>L;L++)if((d||L in V)&&(x=V[L],E=I(x,L,N),g))if(l)A[L]=E;else if(E)switch(g){case 3:return!0;case 5:return x;case 6:return L;case 2:y(A,x)}else switch(g){case 4:return!1;case 7:y(A,x)}return u?-1:m||i?i:A}};T.exports={forEach:B(0),map:B(1),filter:B(2),some:B(3),every:B(4),find:B(5),findIndex:B(6),filterReject:B(7)}},1325:function(T,r,n){"use strict";var e=n(61267),a=n(57591),t=n(61365),o=n(24760),f=n(55528),b=Math.min,y=[].lastIndexOf,B=!!y&&1/[1].lastIndexOf(1,-0)<0,k=f("lastIndexOf"),g=B||!k;T.exports=g?function(){function l(c){if(B)return e(y,this,arguments)||0;var m=a(this),i=o(m);if(i===0)return-1;var u=i-1;for(arguments.length>1&&(u=b(u,t(arguments[1]))),u<0&&(u=i+u);u>=0;u--)if(u in m&&m[u]===c)return u||0;return-1}return l}():y},44091:function(T,r,n){"use strict";var e=n(40033),a=n(24697),t=n(5026),o=a("species");T.exports=function(f){return t>=51||!e(function(){var b=[],y=b.constructor={};return y[o]=function(){return{foo:1}},b[f](Boolean).foo!==1})}},55528:function(T,r,n){"use strict";var e=n(40033);T.exports=function(a,t){var o=[][a];return!!o&&e(function(){o.call(null,t||function(){return 1},1)})}},56844:function(T,r,n){"use strict";var e=n(10320),a=n(46771),t=n(37457),o=n(24760),f=TypeError,b="Reduce of empty array with no initial value",y=function(k){return function(g,l,c,m){var i=a(g),u=t(i),s=o(i);if(e(l),s===0&&c<2)throw new f(b);var d=k?s-1:0,v=k?-1:1;if(c<2)for(;;){if(d in u){m=u[d],d+=v;break}if(d+=v,k?d<0:s<=d)throw new f(b)}for(;k?d>=0:s>d;d+=v)d in u&&(m=l(m,u[d],d,i));return m}};T.exports={left:y(!1),right:y(!0)}},13345:function(T,r,n){"use strict";var e=n(58310),a=n(37386),t=TypeError,o=Object.getOwnPropertyDescriptor,f=e&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(b){return b instanceof TypeError}}();T.exports=f?function(b,y){if(a(b)&&!o(b,"length").writable)throw new t("Cannot set read only .length");return b.length=y}:function(b,y){return b.length=y}},54602:function(T,r,n){"use strict";var e=n(67250);T.exports=e([].slice)},90274:function(T,r,n){"use strict";var e=n(54602),a=Math.floor,t=function o(f,b){var y=f.length;if(y<8)for(var B=1,k,g;B0;)f[g]=f[--g];g!==B++&&(f[g]=k)}else for(var l=a(y/2),c=o(e(f,0,l),b),m=o(e(f,l),b),i=c.length,u=m.length,s=0,d=0;s1?arguments[1]:void 0),E;E=E?E.next:A.first;)for(x(E.value,E.key,this);E&&E.removed;)E=E.previous}return L}(),has:function(){function L(w){return!!I(this,w)}return L}()}),t(N,h?{get:function(){function L(w){var A=I(this,w);return A&&A.value}return L}(),set:function(){function L(w,A){return S(this,w===0?0:w,A)}return L}()}:{add:function(){function L(w){return S(this,w=w===0?0:w,w)}return L}()}),l&&a(N,"size",{configurable:!0,get:function(){function L(){return V(this).size}return L}()}),p}return s}(),setStrong:function(){function s(d,v,h){var C=v+" Iterator",p=u(v),N=u(C);B(d,v,function(V,S){i(this,{type:C,target:V,state:p(V),kind:S,last:void 0})},function(){for(var V=N(this),S=V.kind,I=V.last;I&&I.removed;)I=I.previous;return!V.target||!(V.last=I=I?I.next:V.state.first)?(V.target=void 0,k(void 0,!0)):k(S==="keys"?I.key:S==="values"?I.value:[I.key,I.value],!1)},h?"entries":"values",!h,!0),g(v)}return s}()}},39895:function(T,r,n){"use strict";var e=n(67250),a=n(30145),t=n(81969).getWeakData,o=n(60077),f=n(30365),b=n(42871),y=n(77568),B=n(49450),k=n(22603),g=n(45299),l=n(5419),c=l.set,m=l.getterFor,i=k.find,u=k.findIndex,s=e([].splice),d=0,v=function(N){return N.frozen||(N.frozen=new h)},h=function(){this.entries=[]},C=function(N,V){return i(N.entries,function(S){return S[0]===V})};h.prototype={get:function(){function p(N){var V=C(this,N);if(V)return V[1]}return p}(),has:function(){function p(N){return!!C(this,N)}return p}(),set:function(){function p(N,V){var S=C(this,N);S?S[1]=V:this.entries.push([N,V])}return p}(),delete:function(){function p(N){var V=u(this.entries,function(S){return S[0]===N});return~V&&s(this.entries,V,1),!!~V}return p}()},T.exports={getConstructor:function(){function p(N,V,S,I){var L=N(function(E,P){o(E,w),c(E,{type:V,id:d++,frozen:void 0}),b(P)||B(P,E[I],{that:E,AS_ENTRIES:S})}),w=L.prototype,A=m(V),x=function(){function E(P,D,M){var R=A(P),O=t(f(D),!0);return O===!0?v(R).set(D,M):O[R.id]=M,P}return E}();return a(w,{delete:function(){function E(P){var D=A(this);if(!y(P))return!1;var M=t(P);return M===!0?v(D).delete(P):M&&g(M,D.id)&&delete M[D.id]}return E}(),has:function(){function E(P){var D=A(this);if(!y(P))return!1;var M=t(P);return M===!0?v(D).has(P):M&&g(M,D.id)}return E}()}),a(w,S?{get:function(){function E(P){var D=A(this);if(y(P)){var M=t(P);return M===!0?v(D).get(P):M?M[D.id]:void 0}}return E}(),set:function(){function E(P,D){return x(this,P,D)}return E}()}:{add:function(){function E(P){return x(this,P,!0)}return E}()}),L}return p}()}},45150:function(T,r,n){"use strict";var e=n(63964),a=n(74685),t=n(67250),o=n(41314),f=n(55938),b=n(81969),y=n(49450),B=n(60077),k=n(55747),g=n(42871),l=n(77568),c=n(40033),m=n(92490),i=n(84925),u=n(5781);T.exports=function(s,d,v){var h=s.indexOf("Map")!==-1,C=s.indexOf("Weak")!==-1,p=h?"set":"add",N=a[s],V=N&&N.prototype,S=N,I={},L=function(R){var O=t(V[R]);f(V,R,R==="add"?function(){function F(_){return O(this,_===0?0:_),this}return F}():R==="delete"?function(F){return C&&!l(F)?!1:O(this,F===0?0:F)}:R==="get"?function(){function F(_){return C&&!l(_)?void 0:O(this,_===0?0:_)}return F}():R==="has"?function(){function F(_){return C&&!l(_)?!1:O(this,_===0?0:_)}return F}():function(){function F(_,U){return O(this,_===0?0:_,U),this}return F}())},w=o(s,!k(N)||!(C||V.forEach&&!c(function(){new N().entries().next()})));if(w)S=v.getConstructor(d,s,h,p),b.enable();else if(o(s,!0)){var A=new S,x=A[p](C?{}:-0,1)!==A,E=c(function(){A.has(1)}),P=m(function(M){new N(M)}),D=!C&&c(function(){for(var M=new N,R=5;R--;)M[p](R,R);return!M.has(-0)});P||(S=d(function(M,R){B(M,V);var O=u(new N,M,S);return g(R)||y(R,O[p],{that:O,AS_ENTRIES:h}),O}),S.prototype=V,V.constructor=S),(E||D)&&(L("delete"),L("has"),h&&L("get")),(D||x)&&L(p),C&&V.clear&&delete V.clear}return I[s]=S,e({global:!0,constructor:!0,forced:S!==N},I),i(S,s),C||v.setStrong(S,s,h),S}},5774:function(T,r,n){"use strict";var e=n(45299),a=n(97921),t=n(27193),o=n(74595);T.exports=function(f,b,y){for(var B=a(b),k=o.f,g=t.f,l=0;l"+g+""}},5959:function(T){"use strict";T.exports=function(r,n){return{value:r,done:n}}},37909:function(T,r,n){"use strict";var e=n(58310),a=n(74595),t=n(87458);T.exports=e?function(o,f,b){return a.f(o,f,t(1,b))}:function(o,f,b){return o[f]=b,o}},87458:function(T){"use strict";T.exports=function(r,n){return{enumerable:!(r&1),configurable:!(r&2),writable:!(r&4),value:n}}},60102:function(T,r,n){"use strict";var e=n(58310),a=n(74595),t=n(87458);T.exports=function(o,f,b){e?a.f(o,f,t(0,b)):o[f]=b}},67206:function(T,r,n){"use strict";var e=n(67250),a=n(40033),t=n(24051).start,o=RangeError,f=isFinite,b=Math.abs,y=Date.prototype,B=y.toISOString,k=e(y.getTime),g=e(y.getUTCDate),l=e(y.getUTCFullYear),c=e(y.getUTCHours),m=e(y.getUTCMilliseconds),i=e(y.getUTCMinutes),u=e(y.getUTCMonth),s=e(y.getUTCSeconds);T.exports=a(function(){return B.call(new Date(-50000000000001))!=="0385-07-25T07:06:39.999Z"})||!a(function(){B.call(new Date(NaN))})?function(){function d(){if(!f(k(this)))throw new o("Invalid time value");var v=this,h=l(v),C=m(v),p=h<0?"-":h>9999?"+":"";return p+t(b(h),p?6:4,0)+"-"+t(u(v)+1,2,0)+"-"+t(g(v),2,0)+"T"+t(c(v),2,0)+":"+t(i(v),2,0)+":"+t(s(v),2,0)+"."+t(C,3,0)+"Z"}return d}():B},10886:function(T,r,n){"use strict";var e=n(30365),a=n(13396),t=TypeError;T.exports=function(o){if(e(this),o==="string"||o==="default")o="string";else if(o!=="number")throw new t("Incorrect hint");return a(this,o)}},73936:function(T,r,n){"use strict";var e=n(20001),a=n(74595);T.exports=function(t,o,f){return f.get&&e(f.get,o,{getter:!0}),f.set&&e(f.set,o,{setter:!0}),a.f(t,o,f)}},55938:function(T,r,n){"use strict";var e=n(55747),a=n(74595),t=n(20001),o=n(18231);T.exports=function(f,b,y,B){B||(B={});var k=B.enumerable,g=B.name!==void 0?B.name:b;if(e(y)&&t(y,g,B),B.global)k?f[b]=y:o(b,y);else{try{B.unsafe?f[b]&&(k=!0):delete f[b]}catch(l){}k?f[b]=y:a.f(f,b,{value:y,enumerable:!1,configurable:!B.nonConfigurable,writable:!B.nonWritable})}return f}},30145:function(T,r,n){"use strict";var e=n(55938);T.exports=function(a,t,o){for(var f in t)e(a,f,t[f],o);return a}},18231:function(T,r,n){"use strict";var e=n(74685),a=Object.defineProperty;T.exports=function(t,o){try{a(e,t,{value:o,configurable:!0,writable:!0})}catch(f){e[t]=o}return o}},95108:function(T,r,n){"use strict";var e=n(89393),a=TypeError;T.exports=function(t,o){if(!delete t[o])throw new a("Cannot delete property "+e(o)+" of "+e(t))}},58310:function(T,r,n){"use strict";var e=n(40033);T.exports=!e(function(){return Object.defineProperty({},1,{get:function(){function a(){return 7}return a}()})[1]!==7})},12689:function(T,r,n){"use strict";var e=n(74685),a=n(77568),t=e.document,o=a(t)&&a(t.createElement);T.exports=function(f){return o?t.createElement(f):{}}},21291:function(T){"use strict";var r=TypeError,n=9007199254740991;T.exports=function(e){if(e>n)throw r("Maximum allowed index exceeded");return e}},652:function(T,r,n){"use strict";var e=n(63318),a=e.match(/firefox\/(\d+)/i);T.exports=!!a&&+a[1]},8180:function(T,r,n){"use strict";var e=n(73730),a=n(81702);T.exports=!e&&!a&&typeof window=="object"&&typeof document=="object"},49197:function(T){"use strict";T.exports=typeof Bun=="function"&&Bun&&typeof Bun.version=="string"},73730:function(T){"use strict";T.exports=typeof Deno=="object"&&Deno&&typeof Deno.version=="object"},19228:function(T,r,n){"use strict";var e=n(63318);T.exports=/MSIE|Trident/.test(e)},51802:function(T,r,n){"use strict";var e=n(63318);T.exports=/ipad|iphone|ipod/i.test(e)&&typeof Pebble!="undefined"},83433:function(T,r,n){"use strict";var e=n(63318);T.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(e)},81702:function(T,r,n){"use strict";var e=n(74685),a=n(7462);T.exports=a(e.process)==="process"},63383:function(T,r,n){"use strict";var e=n(63318);T.exports=/web0s(?!.*chrome)/i.test(e)},63318:function(T){"use strict";T.exports=typeof navigator!="undefined"&&String(navigator.userAgent)||""},5026:function(T,r,n){"use strict";var e=n(74685),a=n(63318),t=e.process,o=e.Deno,f=t&&t.versions||o&&o.version,b=f&&f.v8,y,B;b&&(y=b.split("."),B=y[0]>0&&y[0]<4?1:+(y[0]+y[1])),!B&&a&&(y=a.match(/Edge\/(\d+)/),(!y||y[1]>=74)&&(y=a.match(/Chrome\/(\d+)/),y&&(B=+y[1]))),T.exports=B},9342:function(T,r,n){"use strict";var e=n(63318),a=e.match(/AppleWebKit\/(\d+)\./);T.exports=!!a&&+a[1]},89453:function(T){"use strict";T.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},63964:function(T,r,n){"use strict";var e=n(74685),a=n(27193).f,t=n(37909),o=n(55938),f=n(18231),b=n(5774),y=n(41314);T.exports=function(B,k){var g=B.target,l=B.global,c=B.stat,m,i,u,s,d,v;if(l?i=e:c?i=e[g]||f(g,{}):i=e[g]&&e[g].prototype,i)for(u in k){if(d=k[u],B.dontCallGetSet?(v=a(i,u),s=v&&v.value):s=i[u],m=y(l?u:g+(c?".":"#")+u,B.forced),!m&&s!==void 0){if(typeof d==typeof s)continue;b(d,s)}(B.sham||s&&s.sham)&&t(d,"sham",!0),o(i,u,d,B)}}},40033:function(T){"use strict";T.exports=function(r){try{return!!r()}catch(n){return!0}}},79942:function(T,r,n){"use strict";n(79669);var e=n(91495),a=n(55938),t=n(14489),o=n(40033),f=n(24697),b=n(37909),y=f("species"),B=RegExp.prototype;T.exports=function(k,g,l,c){var m=f(k),i=!o(function(){var v={};return v[m]=function(){return 7},""[k](v)!==7}),u=i&&!o(function(){var v=!1,h=/a/;return k==="split"&&(h={},h.constructor={},h.constructor[y]=function(){return h},h.flags="",h[m]=/./[m]),h.exec=function(){return v=!0,null},h[m](""),!v});if(!i||!u||l){var s=/./[m],d=g(m,""[k],function(v,h,C,p,N){var V=h.exec;return V===t||V===B.exec?i&&!N?{done:!0,value:e(s,h,C,p)}:{done:!0,value:e(v,C,h,p)}:{done:!1}});a(String.prototype,k,d[0]),a(B,m,d[1])}c&&b(B[m],"sham",!0)}},65561:function(T,r,n){"use strict";var e=n(37386),a=n(24760),t=n(21291),o=n(75754),f=function b(y,B,k,g,l,c,m,i){for(var u=l,s=0,d=m?o(m,i):!1,v,h;s0&&e(v)?(h=a(v),u=b(y,B,v,h,u,c-1)-1):(t(u+1),y[u]=v),u++),s++;return u};T.exports=f},50730:function(T,r,n){"use strict";var e=n(40033);T.exports=!e(function(){return Object.isExtensible(Object.preventExtensions({}))})},61267:function(T,r,n){"use strict";var e=n(55050),a=Function.prototype,t=a.apply,o=a.call;T.exports=typeof Reflect=="object"&&Reflect.apply||(e?o.bind(t):function(){return o.apply(t,arguments)})},75754:function(T,r,n){"use strict";var e=n(71138),a=n(10320),t=n(55050),o=e(e.bind);T.exports=function(f,b){return a(f),b===void 0?f:t?o(f,b):function(){return f.apply(b,arguments)}}},55050:function(T,r,n){"use strict";var e=n(40033);T.exports=!e(function(){var a=function(){}.bind();return typeof a!="function"||a.hasOwnProperty("prototype")})},66284:function(T,r,n){"use strict";var e=n(67250),a=n(10320),t=n(77568),o=n(45299),f=n(54602),b=n(55050),y=Function,B=e([].concat),k=e([].join),g={},l=function(m,i,u){if(!o(g,i)){for(var s=[],d=0;d]*>)/g,B=/\$([$&'`]|\d{1,2})/g;T.exports=function(k,g,l,c,m,i){var u=l+k.length,s=c.length,d=B;return m!==void 0&&(m=a(m),d=y),f(i,d,function(v,h){var C;switch(o(h,0)){case"$":return"$";case"&":return k;case"`":return b(g,0,l);case"'":return b(g,u);case"<":C=m[b(h,1,-1)];break;default:var p=+h;if(p===0)return v;if(p>s){var N=t(p/10);return N===0?v:N<=s?c[N-1]===void 0?o(h,1):c[N-1]+o(h,1):v}C=c[p-1]}return C===void 0?"":C})}},74685:function(T,r,n){"use strict";var e=function(t){return t&&t.Math===Math&&t};T.exports=e(typeof globalThis=="object"&&globalThis)||e(typeof window=="object"&&window)||e(typeof self=="object"&&self)||e(typeof n.g=="object"&&n.g)||e(!1)||function(){return this}()||Function("return this")()},45299:function(T,r,n){"use strict";var e=n(67250),a=n(46771),t=e({}.hasOwnProperty);T.exports=Object.hasOwn||function(){function o(f,b){return t(a(f),b)}return o}()},79195:function(T){"use strict";T.exports={}},72259:function(T){"use strict";T.exports=function(r,n){try{arguments.length}catch(e){}}},5315:function(T,r,n){"use strict";var e=n(4009);T.exports=e("document","documentElement")},36223:function(T,r,n){"use strict";var e=n(58310),a=n(40033),t=n(12689);T.exports=!e&&!a(function(){return Object.defineProperty(t("div"),"a",{get:function(){function o(){return 7}return o}()}).a!==7})},91784:function(T){"use strict";var r=Array,n=Math.abs,e=Math.pow,a=Math.floor,t=Math.log,o=Math.LN2,f=function(B,k,g){var l=r(g),c=g*8-k-1,m=(1<>1,u=k===23?e(2,-24)-e(2,-77):0,s=B<0||B===0&&1/B<0?1:0,d=0,v,h,C;for(B=n(B),B!==B||B===1/0?(h=B!==B?1:0,v=m):(v=a(t(B)/o),C=e(2,-v),B*C<1&&(v--,C*=2),v+i>=1?B+=u/C:B+=u*e(2,1-i),B*C>=2&&(v++,C/=2),v+i>=m?(h=0,v=m):v+i>=1?(h=(B*C-1)*e(2,k),v+=i):(h=B*e(2,i-1)*e(2,k),v=0));k>=8;)l[d++]=h&255,h/=256,k-=8;for(v=v<0;)l[d++]=v&255,v/=256,c-=8;return l[--d]|=s*128,l},b=function(B,k){var g=B.length,l=g*8-k-1,c=(1<>1,i=l-7,u=g-1,s=B[u--],d=s&127,v;for(s>>=7;i>0;)d=d*256+B[u--],i-=8;for(v=d&(1<<-i)-1,d>>=-i,i+=k;i>0;)v=v*256+B[u--],i-=8;if(d===0)d=1-m;else{if(d===c)return v?NaN:s?-1/0:1/0;v+=e(2,k),d-=m}return(s?-1:1)*v*e(2,d-k)};T.exports={pack:f,unpack:b}},37457:function(T,r,n){"use strict";var e=n(67250),a=n(40033),t=n(7462),o=Object,f=e("".split);T.exports=a(function(){return!o("z").propertyIsEnumerable(0)})?function(b){return t(b)==="String"?f(b,""):o(b)}:o},5781:function(T,r,n){"use strict";var e=n(55747),a=n(77568),t=n(76649);T.exports=function(o,f,b){var y,B;return t&&e(y=f.constructor)&&y!==b&&a(B=y.prototype)&&B!==b.prototype&&t(o,B),o}},40492:function(T,r,n){"use strict";var e=n(67250),a=n(55747),t=n(40095),o=e(Function.toString);a(t.inspectSource)||(t.inspectSource=function(f){return o(f)}),T.exports=t.inspectSource},81969:function(T,r,n){"use strict";var e=n(63964),a=n(67250),t=n(79195),o=n(77568),f=n(45299),b=n(74595).f,y=n(37310),B=n(81644),k=n(81834),g=n(16738),l=n(50730),c=!1,m=g("meta"),i=0,u=function(N){b(N,m,{value:{objectID:"O"+i++,weakData:{}}})},s=function(N,V){if(!o(N))return typeof N=="symbol"?N:(typeof N=="string"?"S":"P")+N;if(!f(N,m)){if(!k(N))return"F";if(!V)return"E";u(N)}return N[m].objectID},d=function(N,V){if(!f(N,m)){if(!k(N))return!0;if(!V)return!1;u(N)}return N[m].weakData},v=function(N){return l&&c&&k(N)&&!f(N,m)&&u(N),N},h=function(){C.enable=function(){},c=!0;var N=y.f,V=a([].splice),S={};S[m]=1,N(S).length&&(y.f=function(I){for(var L=N(I),w=0,A=L.length;wI;I++)if(w=P(i[I]),w&&y(m,w))return w;return new c(!1)}V=B(i,S)}for(A=h?i.next:V.next;!(x=a(A,V)).done;){try{w=P(x.value)}catch(D){g(V,"throw",D)}if(typeof w=="object"&&w&&y(m,w))return w}return new c(!1)}},28649:function(T,r,n){"use strict";var e=n(91495),a=n(30365),t=n(78060);T.exports=function(o,f,b){var y,B;a(o);try{if(y=t(o,"return"),!y){if(f==="throw")throw b;return b}y=e(y,o)}catch(k){B=!0,y=k}if(f==="throw")throw b;if(B)throw y;return a(y),b}},5656:function(T,r,n){"use strict";var e=n(67635).IteratorPrototype,a=n(80674),t=n(87458),o=n(84925),f=n(83967),b=function(){return this};T.exports=function(y,B,k,g){var l=B+" Iterator";return y.prototype=a(e,{next:t(+!g,k)}),o(y,l,!1,!0),f[l]=b,y}},65574:function(T,r,n){"use strict";var e=n(63964),a=n(91495),t=n(4493),o=n(70520),f=n(55747),b=n(5656),y=n(36917),B=n(76649),k=n(84925),g=n(37909),l=n(55938),c=n(24697),m=n(83967),i=n(67635),u=o.PROPER,s=o.CONFIGURABLE,d=i.IteratorPrototype,v=i.BUGGY_SAFARI_ITERATORS,h=c("iterator"),C="keys",p="values",N="entries",V=function(){return this};T.exports=function(S,I,L,w,A,x,E){b(L,I,w);var P=function(X){if(X===A&&F)return F;if(!v&&X&&X in R)return R[X];switch(X){case C:return function(){function J(){return new L(this,X)}return J}();case p:return function(){function J(){return new L(this,X)}return J}();case N:return function(){function J(){return new L(this,X)}return J}()}return function(){return new L(this)}},D=I+" Iterator",M=!1,R=S.prototype,O=R[h]||R["@@iterator"]||A&&R[A],F=!v&&O||P(A),_=I==="Array"&&R.entries||O,U,z,$;if(_&&(U=y(_.call(new S)),U!==Object.prototype&&U.next&&(!t&&y(U)!==d&&(B?B(U,d):f(U[h])||l(U,h,V)),k(U,D,!0,!0),t&&(m[D]=V))),u&&A===p&&O&&O.name!==p&&(!t&&s?g(R,"name",p):(M=!0,F=function(){function G(){return a(O,this)}return G}())),A)if(z={values:P(p),keys:x?F:P(C),entries:P(N)},E)for($ in z)(v||M||!($ in R))&&l(R,$,z[$]);else e({target:I,proto:!0,forced:v||M},z);return(!t||E)&&R[h]!==F&&l(R,h,F,{name:A}),m[I]=F,z}},67635:function(T,r,n){"use strict";var e=n(40033),a=n(55747),t=n(77568),o=n(80674),f=n(36917),b=n(55938),y=n(24697),B=n(4493),k=y("iterator"),g=!1,l,c,m;[].keys&&(m=[].keys(),"next"in m?(c=f(f(m)),c!==Object.prototype&&(l=c)):g=!0);var i=!t(l)||e(function(){var u={};return l[k].call(u)!==u});i?l={}:B&&(l=o(l)),a(l[k])||b(l,k,function(){return this}),T.exports={IteratorPrototype:l,BUGGY_SAFARI_ITERATORS:g}},83967:function(T){"use strict";T.exports={}},24760:function(T,r,n){"use strict";var e=n(10188);T.exports=function(a){return e(a.length)}},20001:function(T,r,n){"use strict";var e=n(67250),a=n(40033),t=n(55747),o=n(45299),f=n(58310),b=n(70520).CONFIGURABLE,y=n(40492),B=n(5419),k=B.enforce,g=B.get,l=String,c=Object.defineProperty,m=e("".slice),i=e("".replace),u=e([].join),s=f&&!a(function(){return c(function(){},"length",{value:8}).length!==8}),d=String(String).split("String"),v=T.exports=function(h,C,p){m(l(C),0,7)==="Symbol("&&(C="["+i(l(C),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),p&&p.getter&&(C="get "+C),p&&p.setter&&(C="set "+C),(!o(h,"name")||b&&h.name!==C)&&(f?c(h,"name",{value:C,configurable:!0}):h.name=C),s&&p&&o(p,"arity")&&h.length!==p.arity&&c(h,"length",{value:p.arity});try{p&&o(p,"constructor")&&p.constructor?f&&c(h,"prototype",{writable:!1}):h.prototype&&(h.prototype=void 0)}catch(V){}var N=k(h);return o(N,"source")||(N.source=u(d,typeof C=="string"?C:"")),h};Function.prototype.toString=v(function(){function h(){return t(this)&&g(this).source||y(this)}return h}(),"toString")},82040:function(T){"use strict";var r=Math.expm1,n=Math.exp;T.exports=!r||r(10)>22025.465794806718||r(10)<22025.465794806718||r(-2e-17)!==-2e-17?function(){function e(a){var t=+a;return t===0?t:t>-1e-6&&t<1e-6?t+t*t/2:n(t)-1}return e}():r},14950:function(T,r,n){"use strict";var e=n(22172),a=Math.abs,t=2220446049250313e-31,o=1/t,f=function(y){return y+o-o};T.exports=function(b,y,B,k){var g=+b,l=a(g),c=e(g);if(lB||i!==i?c*(1/0):c*i}},95867:function(T,r,n){"use strict";var e=n(14950),a=11920928955078125e-23,t=34028234663852886e22,o=11754943508222875e-54;T.exports=Math.fround||function(){function f(b){return e(b,a,t,o)}return f}()},75002:function(T){"use strict";var r=Math.log,n=Math.LOG10E;T.exports=Math.log10||function(){function e(a){return r(a)*n}return e}()},90874:function(T){"use strict";var r=Math.log;T.exports=Math.log1p||function(){function n(e){var a=+e;return a>-1e-8&&a<1e-8?a-a*a/2:r(1+a)}return n}()},22172:function(T){"use strict";T.exports=Math.sign||function(){function r(n){var e=+n;return e===0||e!==e?e:e<0?-1:1}return r}()},21119:function(T){"use strict";var r=Math.ceil,n=Math.floor;T.exports=Math.trunc||function(){function e(a){var t=+a;return(t>0?n:r)(t)}return e}()},37713:function(T,r,n){"use strict";var e=n(74685),a=n(44915),t=n(75754),o=n(60375).set,f=n(9547),b=n(83433),y=n(51802),B=n(63383),k=n(81702),g=e.MutationObserver||e.WebKitMutationObserver,l=e.document,c=e.process,m=e.Promise,i=a("queueMicrotask"),u,s,d,v,h;if(!i){var C=new f,p=function(){var V,S;for(k&&(V=c.domain)&&V.exit();S=C.get();)try{S()}catch(I){throw C.head&&u(),I}V&&V.enter()};!b&&!k&&!B&&g&&l?(s=!0,d=l.createTextNode(""),new g(p).observe(d,{characterData:!0}),u=function(){d.data=s=!s}):!y&&m&&m.resolve?(v=m.resolve(void 0),v.constructor=m,h=t(v.then,v),u=function(){h(p)}):k?u=function(){c.nextTick(p)}:(o=t(o,e),u=function(){o(p)}),i=function(V){C.head||u(),C.add(V)}}T.exports=i},81837:function(T,r,n){"use strict";var e=n(10320),a=TypeError,t=function(f){var b,y;this.promise=new f(function(B,k){if(b!==void 0||y!==void 0)throw new a("Bad Promise constructor");b=B,y=k}),this.resolve=e(b),this.reject=e(y)};T.exports.f=function(o){return new t(o)}},86213:function(T,r,n){"use strict";var e=n(72586),a=TypeError;T.exports=function(t){if(e(t))throw new a("The method doesn't accept regular expressions");return t}},3294:function(T,r,n){"use strict";var e=n(74685),a=e.isFinite;T.exports=Number.isFinite||function(){function t(o){return typeof o=="number"&&a(o)}return t}()},28506:function(T,r,n){"use strict";var e=n(74685),a=n(40033),t=n(67250),o=n(12605),f=n(92648).trim,b=n(4198),y=t("".charAt),B=e.parseFloat,k=e.Symbol,g=k&&k.iterator,l=1/B(b+"-0")!==-1/0||g&&!a(function(){B(Object(g))});T.exports=l?function(){function c(m){var i=f(o(m)),u=B(i);return u===0&&y(i,0)==="-"?-0:u}return c}():B},13693:function(T,r,n){"use strict";var e=n(74685),a=n(40033),t=n(67250),o=n(12605),f=n(92648).trim,b=n(4198),y=e.parseInt,B=e.Symbol,k=B&&B.iterator,g=/^[+-]?0x/i,l=t(g.exec),c=y(b+"08")!==8||y(b+"0x16")!==22||k&&!a(function(){y(Object(k))});T.exports=c?function(){function m(i,u){var s=f(o(i));return y(s,u>>>0||(l(g,s)?16:10))}return m}():y},41143:function(T,r,n){"use strict";var e=n(58310),a=n(67250),t=n(91495),o=n(40033),f=n(18450),b=n(89235),y=n(12867),B=n(46771),k=n(37457),g=Object.assign,l=Object.defineProperty,c=a([].concat);T.exports=!g||o(function(){if(e&&g({b:1},g(l({},"a",{enumerable:!0,get:function(){function d(){l(this,"b",{value:3,enumerable:!1})}return d}()}),{b:2})).b!==1)return!0;var m={},i={},u=Symbol("assign detection"),s="abcdefghijklmnopqrst";return m[u]=7,s.split("").forEach(function(d){i[d]=d}),g({},m)[u]!==7||f(g({},i)).join("")!==s})?function(){function m(i,u){for(var s=B(i),d=arguments.length,v=1,h=b.f,C=y.f;d>v;)for(var p=k(arguments[v++]),N=h?c(f(p),h(p)):f(p),V=N.length,S=0,I;V>S;)I=N[S++],(!e||t(C,p,I))&&(s[I]=p[I]);return s}return m}():g},80674:function(T,r,n){"use strict";var e=n(30365),a=n(24239),t=n(89453),o=n(79195),f=n(5315),b=n(12689),y=n(19417),B=">",k="<",g="prototype",l="script",c=y("IE_PROTO"),m=function(){},i=function(C){return k+l+B+C+k+"/"+l+B},u=function(C){C.write(i("")),C.close();var p=C.parentWindow.Object;return C=null,p},s=function(){var C=b("iframe"),p="java"+l+":",N;return C.style.display="none",f.appendChild(C),C.src=String(p),N=C.contentWindow.document,N.open(),N.write(i("document.F=Object")),N.close(),N.F},d,v=function(){try{d=new ActiveXObject("htmlfile")}catch(p){}v=typeof document!="undefined"?document.domain&&d?u(d):s():u(d);for(var C=t.length;C--;)delete v[g][t[C]];return v()};o[c]=!0,T.exports=Object.create||function(){function h(C,p){var N;return C!==null?(m[g]=e(C),N=new m,m[g]=null,N[c]=C):N=v(),p===void 0?N:a.f(N,p)}return h}()},24239:function(T,r,n){"use strict";var e=n(58310),a=n(80944),t=n(74595),o=n(30365),f=n(57591),b=n(18450);r.f=e&&!a?Object.defineProperties:function(){function y(B,k){o(B);for(var g=f(k),l=b(k),c=l.length,m=0,i;c>m;)t.f(B,i=l[m++],g[i]);return B}return y}()},74595:function(T,r,n){"use strict";var e=n(58310),a=n(36223),t=n(80944),o=n(30365),f=n(767),b=TypeError,y=Object.defineProperty,B=Object.getOwnPropertyDescriptor,k="enumerable",g="configurable",l="writable";r.f=e?t?function(){function c(m,i,u){if(o(m),i=f(i),o(u),typeof m=="function"&&i==="prototype"&&"value"in u&&l in u&&!u[l]){var s=B(m,i);s&&s[l]&&(m[i]=u.value,u={configurable:g in u?u[g]:s[g],enumerable:k in u?u[k]:s[k],writable:!1})}return y(m,i,u)}return c}():y:function(){function c(m,i,u){if(o(m),i=f(i),o(u),a)try{return y(m,i,u)}catch(s){}if("get"in u||"set"in u)throw new b("Accessors not supported");return"value"in u&&(m[i]=u.value),m}return c}()},27193:function(T,r,n){"use strict";var e=n(58310),a=n(91495),t=n(12867),o=n(87458),f=n(57591),b=n(767),y=n(45299),B=n(36223),k=Object.getOwnPropertyDescriptor;r.f=e?k:function(){function g(l,c){if(l=f(l),c=b(c),B)try{return k(l,c)}catch(m){}if(y(l,c))return o(!a(t.f,l,c),l[c])}return g}()},81644:function(T,r,n){"use strict";var e=n(7462),a=n(57591),t=n(37310).f,o=n(54602),f=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],b=function(B){try{return t(B)}catch(k){return o(f)}};T.exports.f=function(){function y(B){return f&&e(B)==="Window"?b(B):t(a(B))}return y}()},37310:function(T,r,n){"use strict";var e=n(53726),a=n(89453),t=a.concat("length","prototype");r.f=Object.getOwnPropertyNames||function(){function o(f){return e(f,t)}return o}()},89235:function(T,r){"use strict";r.f=Object.getOwnPropertySymbols},36917:function(T,r,n){"use strict";var e=n(45299),a=n(55747),t=n(46771),o=n(19417),f=n(9225),b=o("IE_PROTO"),y=Object,B=y.prototype;T.exports=f?y.getPrototypeOf:function(k){var g=t(k);if(e(g,b))return g[b];var l=g.constructor;return a(l)&&g instanceof l?l.prototype:g instanceof y?B:null}},81834:function(T,r,n){"use strict";var e=n(40033),a=n(77568),t=n(7462),o=n(3782),f=Object.isExtensible,b=e(function(){f(1)});T.exports=b||o?function(){function y(B){return!a(B)||o&&t(B)==="ArrayBuffer"?!1:f?f(B):!0}return y}():f},21287:function(T,r,n){"use strict";var e=n(67250);T.exports=e({}.isPrototypeOf)},53726:function(T,r,n){"use strict";var e=n(67250),a=n(45299),t=n(57591),o=n(14211).indexOf,f=n(79195),b=e([].push);T.exports=function(y,B){var k=t(y),g=0,l=[],c;for(c in k)!a(f,c)&&a(k,c)&&b(l,c);for(;B.length>g;)a(k,c=B[g++])&&(~o(l,c)||b(l,c));return l}},18450:function(T,r,n){"use strict";var e=n(53726),a=n(89453);T.exports=Object.keys||function(){function t(o){return e(o,a)}return t}()},12867:function(T,r){"use strict";var n={}.propertyIsEnumerable,e=Object.getOwnPropertyDescriptor,a=e&&!n.call({1:2},1);r.f=a?function(){function t(o){var f=e(this,o);return!!f&&f.enumerable}return t}():n},57377:function(T,r,n){"use strict";var e=n(4493),a=n(74685),t=n(40033),o=n(9342);T.exports=e||!t(function(){if(!(o&&o<535)){var f=Math.random();__defineSetter__.call(null,f,function(){}),delete a[f]}})},76649:function(T,r,n){"use strict";var e=n(38656),a=n(77568),t=n(16952),o=n(35908);T.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var f=!1,b={},y;try{y=e(Object.prototype,"__proto__","set"),y(b,[]),f=b instanceof Array}catch(B){}return function(){function B(k,g){return t(k),o(g),a(k)&&(f?y(k,g):k.__proto__=g),k}return B}()}():void 0)},70915:function(T,r,n){"use strict";var e=n(58310),a=n(40033),t=n(67250),o=n(36917),f=n(18450),b=n(57591),y=n(12867).f,B=t(y),k=t([].push),g=e&&a(function(){var c=Object.create(null);return c[2]=2,!B(c,2)}),l=function(m){return function(i){for(var u=b(i),s=f(u),d=g&&o(u)===null,v=s.length,h=0,C=[],p;v>h;)p=s[h++],(!e||(d?p in u:B(u,p)))&&k(C,m?[p,u[p]]:u[p]);return C}};T.exports={entries:l(!0),values:l(!1)}},2509:function(T,r,n){"use strict";var e=n(2650),a=n(2281);T.exports=e?{}.toString:function(){function t(){return"[object "+a(this)+"]"}return t}()},13396:function(T,r,n){"use strict";var e=n(91495),a=n(55747),t=n(77568),o=TypeError;T.exports=function(f,b){var y,B;if(b==="string"&&a(y=f.toString)&&!t(B=e(y,f))||a(y=f.valueOf)&&!t(B=e(y,f))||b!=="string"&&a(y=f.toString)&&!t(B=e(y,f)))return B;throw new o("Can't convert object to primitive value")}},97921:function(T,r,n){"use strict";var e=n(4009),a=n(67250),t=n(37310),o=n(89235),f=n(30365),b=a([].concat);T.exports=e("Reflect","ownKeys")||function(){function y(B){var k=t.f(f(B)),g=o.f;return g?b(k,g(B)):k}return y}()},61765:function(T,r,n){"use strict";var e=n(74685);T.exports=e},10729:function(T){"use strict";T.exports=function(r){try{return{error:!1,value:r()}}catch(n){return{error:!0,value:n}}}},74854:function(T,r,n){"use strict";var e=n(74685),a=n(67512),t=n(55747),o=n(41314),f=n(40492),b=n(24697),y=n(8180),B=n(73730),k=n(4493),g=n(5026),l=a&&a.prototype,c=b("species"),m=!1,i=t(e.PromiseRejectionEvent),u=o("Promise",function(){var s=f(a),d=s!==String(a);if(!d&&g===66||k&&!(l.catch&&l.finally))return!0;if(!g||g<51||!/native code/.test(s)){var v=new a(function(p){p(1)}),h=function(N){N(function(){},function(){})},C=v.constructor={};if(C[c]=h,m=v.then(function(){})instanceof h,!m)return!0}return!d&&(y||B)&&!i});T.exports={CONSTRUCTOR:u,REJECTION_EVENT:i,SUBCLASSING:m}},67512:function(T,r,n){"use strict";var e=n(74685);T.exports=e.Promise},66628:function(T,r,n){"use strict";var e=n(30365),a=n(77568),t=n(81837);T.exports=function(o,f){if(e(o),a(f)&&f.constructor===o)return f;var b=t.f(o),y=b.resolve;return y(f),b.promise}},48199:function(T,r,n){"use strict";var e=n(67512),a=n(92490),t=n(74854).CONSTRUCTOR;T.exports=t||!a(function(o){e.all(o).then(void 0,function(){})})},34550:function(T,r,n){"use strict";var e=n(74595).f;T.exports=function(a,t,o){o in a||e(a,o,{configurable:!0,get:function(){function f(){return t[o]}return f}(),set:function(){function f(b){t[o]=b}return f}()})}},9547:function(T){"use strict";var r=function(){this.head=null,this.tail=null};r.prototype={add:function(){function n(e){var a={item:e,next:null},t=this.tail;t?t.next=a:this.head=a,this.tail=a}return n}(),get:function(){function n(){var e=this.head;if(e){var a=this.head=e.next;return a===null&&(this.tail=null),e.item}}return n}()},T.exports=r},28340:function(T,r,n){"use strict";var e=n(91495),a=n(30365),t=n(55747),o=n(7462),f=n(14489),b=TypeError;T.exports=function(y,B){var k=y.exec;if(t(k)){var g=e(k,y,B);return g!==null&&a(g),g}if(o(y)==="RegExp")return e(f,y,B);throw new b("RegExp#exec called on incompatible receiver")}},14489:function(T,r,n){"use strict";var e=n(91495),a=n(67250),t=n(12605),o=n(70901),f=n(62115),b=n(16639),y=n(80674),B=n(5419).get,k=n(39173),g=n(35688),l=b("native-string-replace",String.prototype.replace),c=RegExp.prototype.exec,m=c,i=a("".charAt),u=a("".indexOf),s=a("".replace),d=a("".slice),v=function(){var N=/a/,V=/b*/g;return e(c,N,"a"),e(c,V,"a"),N.lastIndex!==0||V.lastIndex!==0}(),h=f.BROKEN_CARET,C=/()??/.exec("")[1]!==void 0,p=v||C||h||k||g;p&&(m=function(){function N(V){var S=this,I=B(S),L=t(V),w=I.raw,A,x,E,P,D,M,R;if(w)return w.lastIndex=S.lastIndex,A=e(m,w,L),S.lastIndex=w.lastIndex,A;var O=I.groups,F=h&&S.sticky,_=e(o,S),U=S.source,z=0,$=L;if(F&&(_=s(_,"y",""),u(_,"g")===-1&&(_+="g"),$=d(L,S.lastIndex),S.lastIndex>0&&(!S.multiline||S.multiline&&i(L,S.lastIndex-1)!=="\n")&&(U="(?: "+U+")",$=" "+$,z++),x=new RegExp("^(?:"+U+")",_)),C&&(x=new RegExp("^"+U+"$(?!\\s)",_)),v&&(E=S.lastIndex),P=e(c,F?x:S,$),F?P?(P.input=d(P.input,z),P[0]=d(P[0],z),P.index=S.lastIndex,S.lastIndex+=P[0].length):S.lastIndex=0:v&&P&&(S.lastIndex=S.global?P.index+P[0].length:E),C&&P&&P.length>1&&e(l,P[0],x,function(){for(D=1;Db)","g");return o.exec("b").groups.a!=="b"||"b".replace(o,"$c")!=="bc"})},16952:function(T,r,n){"use strict";var e=n(42871),a=TypeError;T.exports=function(t){if(e(t))throw new a("Can't call method on "+t);return t}},44915:function(T,r,n){"use strict";var e=n(74685),a=n(58310),t=Object.getOwnPropertyDescriptor;T.exports=function(o){if(!a)return e[o];var f=t(e,o);return f&&f.value}},5700:function(T){"use strict";T.exports=Object.is||function(){function r(n,e){return n===e?n!==0||1/n===1/e:n!==n&&e!==e}return r}()},78362:function(T,r,n){"use strict";var e=n(74685),a=n(61267),t=n(55747),o=n(49197),f=n(63318),b=n(54602),y=n(24986),B=e.Function,k=/MSIE .\./.test(f)||o&&function(){var g=e.Bun.version.split(".");return g.length<3||g[0]==="0"&&(g[1]<3||g[1]==="3"&&g[2]==="0")}();T.exports=function(g,l){var c=l?2:1;return k?function(m,i){var u=y(arguments.length,1)>c,s=t(m)?m:B(m),d=u?b(arguments,c):[],v=u?function(){a(s,this,d)}:s;return l?g(v,i):g(v)}:g}},58491:function(T,r,n){"use strict";var e=n(4009),a=n(73936),t=n(24697),o=n(58310),f=t("species");T.exports=function(b){var y=e(b);o&&y&&!y[f]&&a(y,f,{configurable:!0,get:function(){function B(){return this}return B}()})}},84925:function(T,r,n){"use strict";var e=n(74595).f,a=n(45299),t=n(24697),o=t("toStringTag");T.exports=function(f,b,y){f&&!y&&(f=f.prototype),f&&!a(f,o)&&e(f,o,{configurable:!0,value:b})}},19417:function(T,r,n){"use strict";var e=n(16639),a=n(16738),t=e("keys");T.exports=function(o){return t[o]||(t[o]=a(o))}},40095:function(T,r,n){"use strict";var e=n(4493),a=n(74685),t=n(18231),o="__core-js_shared__",f=T.exports=a[o]||t(o,{});(f.versions||(f.versions=[])).push({version:"3.37.1",mode:e?"pure":"global",copyright:"\xA9 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.37.1/LICENSE",source:"https://github.com/zloirock/core-js"})},16639:function(T,r,n){"use strict";var e=n(40095);T.exports=function(a,t){return e[a]||(e[a]=t||{})}},28987:function(T,r,n){"use strict";var e=n(30365),a=n(32606),t=n(42871),o=n(24697),f=o("species");T.exports=function(b,y){var B=e(b).constructor,k;return B===void 0||t(k=e(B)[f])?y:a(k)}},88539:function(T,r,n){"use strict";var e=n(40033);T.exports=function(a){return e(function(){var t=""[a]('"');return t!==t.toLowerCase()||t.split('"').length>3})}},50233:function(T,r,n){"use strict";var e=n(67250),a=n(61365),t=n(12605),o=n(16952),f=e("".charAt),b=e("".charCodeAt),y=e("".slice),B=function(g){return function(l,c){var m=t(o(l)),i=a(c),u=m.length,s,d;return i<0||i>=u?g?"":void 0:(s=b(m,i),s<55296||s>56319||i+1===u||(d=b(m,i+1))<56320||d>57343?g?f(m,i):s:g?y(m,i,i+2):(s-55296<<10)+(d-56320)+65536)}};T.exports={codeAt:B(!1),charAt:B(!0)}},34125:function(T,r,n){"use strict";var e=n(63318);T.exports=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(e)},24051:function(T,r,n){"use strict";var e=n(67250),a=n(10188),t=n(12605),o=n(62443),f=n(16952),b=e(o),y=e("".slice),B=Math.ceil,k=function(l){return function(c,m,i){var u=t(f(c)),s=a(m),d=u.length,v=i===void 0?" ":t(i),h,C;return s<=d||v===""?u:(h=s-d,C=b(v,B(h/v.length)),C.length>h&&(C=y(C,0,h)),l?u+C:C+u)}};T.exports={start:k(!1),end:k(!0)}},62443:function(T,r,n){"use strict";var e=n(61365),a=n(12605),t=n(16952),o=RangeError;T.exports=function(){function f(b){var y=a(t(this)),B="",k=e(b);if(k<0||k===1/0)throw new o("Wrong number of repetitions");for(;k>0;(k>>>=1)&&(y+=y))k&1&&(B+=y);return B}return f}()},43476:function(T,r,n){"use strict";var e=n(92648).end,a=n(90012);T.exports=a("trimEnd")?function(){function t(){return e(this)}return t}():"".trimEnd},90012:function(T,r,n){"use strict";var e=n(70520).PROPER,a=n(40033),t=n(4198),o="\u200B\x85\u180E";T.exports=function(f){return a(function(){return!!t[f]()||o[f]()!==o||e&&t[f].name!==f})}},43885:function(T,r,n){"use strict";var e=n(92648).start,a=n(90012);T.exports=a("trimStart")?function(){function t(){return e(this)}return t}():"".trimStart},92648:function(T,r,n){"use strict";var e=n(67250),a=n(16952),t=n(12605),o=n(4198),f=e("".replace),b=RegExp("^["+o+"]+"),y=RegExp("(^|[^"+o+"])["+o+"]+$"),B=function(g){return function(l){var c=t(a(l));return g&1&&(c=f(c,b,"")),g&2&&(c=f(c,y,"$1")),c}};T.exports={start:B(1),end:B(2),trim:B(3)}},52357:function(T,r,n){"use strict";var e=n(5026),a=n(40033),t=n(74685),o=t.String;T.exports=!!Object.getOwnPropertySymbols&&!a(function(){var f=Symbol("symbol detection");return!o(f)||!(Object(f)instanceof Symbol)||!Symbol.sham&&e&&e<41})},52360:function(T,r,n){"use strict";var e=n(91495),a=n(4009),t=n(24697),o=n(55938);T.exports=function(){var f=a("Symbol"),b=f&&f.prototype,y=b&&b.valueOf,B=t("toPrimitive");b&&!b[B]&&o(b,B,function(k){return e(y,this)},{arity:1})}},66570:function(T,r,n){"use strict";var e=n(52357);T.exports=e&&!!Symbol.for&&!!Symbol.keyFor},60375:function(T,r,n){"use strict";var e=n(74685),a=n(61267),t=n(75754),o=n(55747),f=n(45299),b=n(40033),y=n(5315),B=n(54602),k=n(12689),g=n(24986),l=n(83433),c=n(81702),m=e.setImmediate,i=e.clearImmediate,u=e.process,s=e.Dispatch,d=e.Function,v=e.MessageChannel,h=e.String,C=0,p={},N="onreadystatechange",V,S,I,L;b(function(){V=e.location});var w=function(D){if(f(p,D)){var M=p[D];delete p[D],M()}},A=function(D){return function(){w(D)}},x=function(D){w(D.data)},E=function(D){e.postMessage(h(D),V.protocol+"//"+V.host)};(!m||!i)&&(m=function(){function P(D){g(arguments.length,1);var M=o(D)?D:d(D),R=B(arguments,1);return p[++C]=function(){a(M,void 0,R)},S(C),C}return P}(),i=function(){function P(D){delete p[D]}return P}(),c?S=function(D){u.nextTick(A(D))}:s&&s.now?S=function(D){s.now(A(D))}:v&&!l?(I=new v,L=I.port2,I.port1.onmessage=x,S=t(L.postMessage,L)):e.addEventListener&&o(e.postMessage)&&!e.importScripts&&V&&V.protocol!=="file:"&&!b(E)?(S=E,e.addEventListener("message",x,!1)):N in k("script")?S=function(D){y.appendChild(k("script"))[N]=function(){y.removeChild(this),w(D)}}:S=function(D){setTimeout(A(D),0)}),T.exports={set:m,clear:i}},46438:function(T,r,n){"use strict";var e=n(67250);T.exports=e(1 .valueOf)},13912:function(T,r,n){"use strict";var e=n(61365),a=Math.max,t=Math.min;T.exports=function(o,f){var b=e(o);return b<0?a(b+f,0):t(b,f)}},61484:function(T,r,n){"use strict";var e=n(24843),a=TypeError;T.exports=function(t){var o=e(t,"number");if(typeof o=="number")throw new a("Can't convert number to bigint");return BigInt(o)}},43806:function(T,r,n){"use strict";var e=n(61365),a=n(10188),t=RangeError;T.exports=function(o){if(o===void 0)return 0;var f=e(o),b=a(f);if(f!==b)throw new t("Wrong length or index");return b}},57591:function(T,r,n){"use strict";var e=n(37457),a=n(16952);T.exports=function(t){return e(a(t))}},61365:function(T,r,n){"use strict";var e=n(21119);T.exports=function(a){var t=+a;return t!==t||t===0?0:e(t)}},10188:function(T,r,n){"use strict";var e=n(61365),a=Math.min;T.exports=function(t){var o=e(t);return o>0?a(o,9007199254740991):0}},46771:function(T,r,n){"use strict";var e=n(16952),a=Object;T.exports=function(t){return a(e(t))}},56043:function(T,r,n){"use strict";var e=n(16140),a=RangeError;T.exports=function(t,o){var f=e(t);if(f%o)throw new a("Wrong offset");return f}},16140:function(T,r,n){"use strict";var e=n(61365),a=RangeError;T.exports=function(t){var o=e(t);if(o<0)throw new a("The argument can't be less than 0");return o}},24843:function(T,r,n){"use strict";var e=n(91495),a=n(77568),t=n(71399),o=n(78060),f=n(13396),b=n(24697),y=TypeError,B=b("toPrimitive");T.exports=function(k,g){if(!a(k)||t(k))return k;var l=o(k,B),c;if(l){if(g===void 0&&(g="default"),c=e(l,k,g),!a(c)||t(c))return c;throw new y("Can't convert object to primitive value")}return g===void 0&&(g="number"),f(k,g)}},767:function(T,r,n){"use strict";var e=n(24843),a=n(71399);T.exports=function(t){var o=e(t,"string");return a(o)?o:o+""}},2650:function(T,r,n){"use strict";var e=n(24697),a=e("toStringTag"),t={};t[a]="z",T.exports=String(t)==="[object z]"},12605:function(T,r,n){"use strict";var e=n(2281),a=String;T.exports=function(t){if(e(t)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return a(t)}},15409:function(T){"use strict";var r=Math.round;T.exports=function(n){var e=r(n);return e<0?0:e>255?255:e&255}},89393:function(T){"use strict";var r=String;T.exports=function(n){try{return r(n)}catch(e){return"Object"}}},80185:function(T,r,n){"use strict";var e=n(63964),a=n(74685),t=n(91495),o=n(58310),f=n(86563),b=n(4246),y=n(37336),B=n(60077),k=n(87458),g=n(37909),l=n(5841),c=n(10188),m=n(43806),i=n(56043),u=n(15409),s=n(767),d=n(45299),v=n(2281),h=n(77568),C=n(71399),p=n(80674),N=n(21287),V=n(76649),S=n(37310).f,I=n(3805),L=n(22603).forEach,w=n(58491),A=n(73936),x=n(74595),E=n(27193),P=n(78008),D=n(5419),M=n(5781),R=D.get,O=D.set,F=D.enforce,_=x.f,U=E.f,z=a.RangeError,$=y.ArrayBuffer,G=$.prototype,X=y.DataView,J=b.NATIVE_ARRAY_BUFFER_VIEWS,se=b.TYPED_ARRAY_TAG,ie=b.TypedArray,me=b.TypedArrayPrototype,q=b.isTypedArray,re="BYTES_PER_ELEMENT",ae="Wrong length",le=function(ce,Ve){A(ce,Ve,{configurable:!0,get:function(){function Ce(){return R(this)[Ve]}return Ce}()})},Z=function(ce){var Ve;return N(G,ce)||(Ve=v(ce))==="ArrayBuffer"||Ve==="SharedArrayBuffer"},ne=function(ce,Ve){return q(ce)&&!C(Ve)&&Ve in ce&&l(+Ve)&&Ve>=0},te=function(){function pe(ce,Ve){return Ve=s(Ve),ne(ce,Ve)?k(2,ce[Ve]):U(ce,Ve)}return pe}(),fe=function(){function pe(ce,Ve,Ce){return Ve=s(Ve),ne(ce,Ve)&&h(Ce)&&d(Ce,"value")&&!d(Ce,"get")&&!d(Ce,"set")&&!Ce.configurable&&(!d(Ce,"writable")||Ce.writable)&&(!d(Ce,"enumerable")||Ce.enumerable)?(ce[Ve]=Ce.value,ce):_(ce,Ve,Ce)}return pe}();o?(J||(E.f=te,x.f=fe,le(me,"buffer"),le(me,"byteOffset"),le(me,"byteLength"),le(me,"length")),e({target:"Object",stat:!0,forced:!J},{getOwnPropertyDescriptor:te,defineProperty:fe}),T.exports=function(pe,ce,Ve){var Ce=pe.match(/\d+/)[0]/8,Ne=pe+(Ve?"Clamped":"")+"Array",Be="get"+pe,be="set"+pe,Le=a[Ne],we=Le,xe=we&&we.prototype,Re={},He=function(ve,Se){var Pe=R(ve);return Pe.view[Be](Se*Ce+Pe.byteOffset,!0)},ye=function(ve,Se,Pe){var je=R(ve);je.view[be](Se*Ce+je.byteOffset,Ve?u(Pe):Pe,!0)},de=function(ve,Se){_(ve,Se,{get:function(){function Pe(){return He(this,Se)}return Pe}(),set:function(){function Pe(je){return ye(this,Se,je)}return Pe}(),enumerable:!0})};J?f&&(we=ce(function(ke,ve,Se,Pe){return B(ke,xe),M(function(){return h(ve)?Z(ve)?Pe!==void 0?new Le(ve,i(Se,Ce),Pe):Se!==void 0?new Le(ve,i(Se,Ce)):new Le(ve):q(ve)?P(we,ve):t(I,we,ve):new Le(m(ve))}(),ke,we)}),V&&V(we,ie),L(S(Le),function(ke){ke in we||g(we,ke,Le[ke])}),we.prototype=xe):(we=ce(function(ke,ve,Se,Pe){B(ke,xe);var je=0,Fe=0,ze,We,Ue;if(!h(ve))Ue=m(ve),We=Ue*Ce,ze=new $(We);else if(Z(ve)){ze=ve,Fe=i(Se,Ce);var Xe=ve.byteLength;if(Pe===void 0){if(Xe%Ce)throw new z(ae);if(We=Xe-Fe,We<0)throw new z(ae)}else if(We=c(Pe)*Ce,We+Fe>Xe)throw new z(ae);Ue=We/Ce}else return q(ve)?P(we,ve):t(I,we,ve);for(O(ke,{buffer:ze,byteOffset:Fe,byteLength:We,length:Ue,view:new X(ze)});je1?arguments[1]:void 0,v=d!==void 0,h=y(u),C,p,N,V,S,I,L,w;if(h&&!B(h))for(L=b(u,h),w=L.next,u=[];!(I=a(w,L)).done;)u.push(I.value);for(v&&s>2&&(d=e(d,arguments[2])),p=f(u),N=new(g(i))(p),V=k(N),C=0;p>C;C++)S=v?d(u[C],C):u[C],N[C]=V?l(S):+S;return N}return c}()},31082:function(T,r,n){"use strict";var e=n(4246),a=n(28987),t=e.aTypedArrayConstructor,o=e.getTypedArrayConstructor;T.exports=function(f){return t(a(f,o(f)))}},16738:function(T,r,n){"use strict";var e=n(67250),a=0,t=Math.random(),o=e(1 .toString);T.exports=function(f){return"Symbol("+(f===void 0?"":f)+")_"+o(++a+t,36)}},1062:function(T,r,n){"use strict";var e=n(52357);T.exports=e&&!Symbol.sham&&typeof Symbol.iterator=="symbol"},80944:function(T,r,n){"use strict";var e=n(58310),a=n(40033);T.exports=e&&a(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42})},24986:function(T){"use strict";var r=TypeError;T.exports=function(n,e){if(n=51||!a(function(){var d=[];return d[m]=!1,d.concat()[0]!==d}),u=function(v){if(!o(v))return!1;var h=v[m];return h!==void 0?!!h:t(v)},s=!i||!g("concat");e({target:"Array",proto:!0,arity:1,forced:s},{concat:function(){function d(v){var h=f(this),C=k(h,0),p=0,N,V,S,I,L;for(N=-1,S=arguments.length;N1?arguments[1]:void 0)}return f}()})},68933:function(T,r,n){"use strict";var e=n(63964),a=n(88471),t=n(80575);e({target:"Array",proto:!0},{fill:a}),t("fill")},47830:function(T,r,n){"use strict";var e=n(63964),a=n(22603).filter,t=n(44091),o=t("filter");e({target:"Array",proto:!0,forced:!o},{filter:function(){function f(b){return a(this,b,arguments.length>1?arguments[1]:void 0)}return f}()})},64094:function(T,r,n){"use strict";var e=n(63964),a=n(22603).findIndex,t=n(80575),o="findIndex",f=!0;o in[]&&Array(1)[o](function(){f=!1}),e({target:"Array",proto:!0,forced:f},{findIndex:function(){function b(y){return a(this,y,arguments.length>1?arguments[1]:void 0)}return b}()}),t(o)},13455:function(T,r,n){"use strict";var e=n(63964),a=n(22603).find,t=n(80575),o="find",f=!0;o in[]&&Array(1)[o](function(){f=!1}),e({target:"Array",proto:!0,forced:f},{find:function(){function b(y){return a(this,y,arguments.length>1?arguments[1]:void 0)}return b}()}),t(o)},32384:function(T,r,n){"use strict";var e=n(63964),a=n(65561),t=n(10320),o=n(46771),f=n(24760),b=n(57823);e({target:"Array",proto:!0},{flatMap:function(){function y(B){var k=o(this),g=f(k),l;return t(B),l=b(k,0),l.length=a(l,k,k,g,0,1,B,arguments.length>1?arguments[1]:void 0),l}return y}()})},61915:function(T,r,n){"use strict";var e=n(63964),a=n(65561),t=n(46771),o=n(24760),f=n(61365),b=n(57823);e({target:"Array",proto:!0},{flat:function(){function y(){var B=arguments.length?arguments[0]:void 0,k=t(this),g=o(k),l=b(k,0);return l.length=a(l,k,k,g,0,B===void 0?1:f(B)),l}return y}()})},25579:function(T,r,n){"use strict";var e=n(63964),a=n(35601);e({target:"Array",proto:!0,forced:[].forEach!==a},{forEach:a})},63532:function(T,r,n){"use strict";var e=n(63964),a=n(73174),t=n(92490),o=!t(function(f){Array.from(f)});e({target:"Array",stat:!0,forced:o},{from:a})},33425:function(T,r,n){"use strict";var e=n(63964),a=n(14211).includes,t=n(40033),o=n(80575),f=t(function(){return!Array(1).includes()});e({target:"Array",proto:!0,forced:f},{includes:function(){function b(y){return a(this,y,arguments.length>1?arguments[1]:void 0)}return b}()}),o("includes")},43894:function(T,r,n){"use strict";var e=n(63964),a=n(71138),t=n(14211).indexOf,o=n(55528),f=a([].indexOf),b=!!f&&1/f([1],1,-0)<0,y=b||!o("indexOf");e({target:"Array",proto:!0,forced:y},{indexOf:function(){function B(k){var g=arguments.length>1?arguments[1]:void 0;return b?f(this,k,g)||0:t(this,k,g)}return B}()})},99636:function(T,r,n){"use strict";var e=n(63964),a=n(37386);e({target:"Array",stat:!0},{isArray:a})},34570:function(T,r,n){"use strict";var e=n(57591),a=n(80575),t=n(83967),o=n(5419),f=n(74595).f,b=n(65574),y=n(5959),B=n(4493),k=n(58310),g="Array Iterator",l=o.set,c=o.getterFor(g);T.exports=b(Array,"Array",function(i,u){l(this,{type:g,target:e(i),index:0,kind:u})},function(){var i=c(this),u=i.target,s=i.index++;if(!u||s>=u.length)return i.target=void 0,y(void 0,!0);switch(i.kind){case"keys":return y(s,!1);case"values":return y(u[s],!1)}return y([s,u[s]],!1)},"values");var m=t.Arguments=t.Array;if(a("keys"),a("values"),a("entries"),!B&&k&&m.name!=="values")try{f(m,"name",{value:"values"})}catch(i){}},94432:function(T,r,n){"use strict";var e=n(63964),a=n(67250),t=n(37457),o=n(57591),f=n(55528),b=a([].join),y=t!==Object,B=y||!f("join",",");e({target:"Array",proto:!0,forced:B},{join:function(){function k(g){return b(o(this),g===void 0?",":g)}return k}()})},24683:function(T,r,n){"use strict";var e=n(63964),a=n(1325);e({target:"Array",proto:!0,forced:a!==[].lastIndexOf},{lastIndexOf:a})},69984:function(T,r,n){"use strict";var e=n(63964),a=n(22603).map,t=n(44091),o=t("map");e({target:"Array",proto:!0,forced:!o},{map:function(){function f(b){return a(this,b,arguments.length>1?arguments[1]:void 0)}return f}()})},32089:function(T,r,n){"use strict";var e=n(63964),a=n(40033),t=n(1031),o=n(60102),f=Array,b=a(function(){function y(){}return!(f.of.call(y)instanceof y)});e({target:"Array",stat:!0,forced:b},{of:function(){function y(){for(var B=0,k=arguments.length,g=new(t(this)?this:f)(k);k>B;)o(g,B,arguments[B++]);return g.length=k,g}return y}()})},29645:function(T,r,n){"use strict";var e=n(63964),a=n(56844).right,t=n(55528),o=n(5026),f=n(81702),b=!f&&o>79&&o<83,y=b||!t("reduceRight");e({target:"Array",proto:!0,forced:y},{reduceRight:function(){function B(k){return a(this,k,arguments.length,arguments.length>1?arguments[1]:void 0)}return B}()})},60206:function(T,r,n){"use strict";var e=n(63964),a=n(56844).left,t=n(55528),o=n(5026),f=n(81702),b=!f&&o>79&&o<83,y=b||!t("reduce");e({target:"Array",proto:!0,forced:y},{reduce:function(){function B(k){var g=arguments.length;return a(this,k,g,g>1?arguments[1]:void 0)}return B}()})},4788:function(T,r,n){"use strict";var e=n(63964),a=n(67250),t=n(37386),o=a([].reverse),f=[1,2];e({target:"Array",proto:!0,forced:String(f)===String(f.reverse())},{reverse:function(){function b(){return t(this)&&(this.length=this.length),o(this)}return b}()})},58672:function(T,r,n){"use strict";var e=n(63964),a=n(37386),t=n(1031),o=n(77568),f=n(13912),b=n(24760),y=n(57591),B=n(60102),k=n(24697),g=n(44091),l=n(54602),c=g("slice"),m=k("species"),i=Array,u=Math.max;e({target:"Array",proto:!0,forced:!c},{slice:function(){function s(d,v){var h=y(this),C=b(h),p=f(d,C),N=f(v===void 0?C:v,C),V,S,I;if(a(h)&&(V=h.constructor,t(V)&&(V===i||a(V.prototype))?V=void 0:o(V)&&(V=V[m],V===null&&(V=void 0)),V===i||V===void 0))return l(h,p,N);for(S=new(V===void 0?i:V)(u(N-p,0)),I=0;p1?arguments[1]:void 0)}return f}()})},48968:function(T,r,n){"use strict";var e=n(63964),a=n(67250),t=n(10320),o=n(46771),f=n(24760),b=n(95108),y=n(12605),B=n(40033),k=n(90274),g=n(55528),l=n(652),c=n(19228),m=n(5026),i=n(9342),u=[],s=a(u.sort),d=a(u.push),v=B(function(){u.sort(void 0)}),h=B(function(){u.sort(null)}),C=g("sort"),p=!B(function(){if(m)return m<70;if(!(l&&l>3)){if(c)return!0;if(i)return i<603;var S="",I,L,w,A;for(I=65;I<76;I++){switch(L=String.fromCharCode(I),I){case 66:case 69:case 70:case 72:w=3;break;case 68:case 71:w=4;break;default:w=2}for(A=0;A<47;A++)u.push({k:L+A,v:w})}for(u.sort(function(x,E){return E.v-x.v}),A=0;Ay(w)?1:-1}};e({target:"Array",proto:!0,forced:N},{sort:function(){function S(I){I!==void 0&&t(I);var L=o(this);if(p)return I===void 0?s(L):s(L,I);var w=[],A=f(L),x,E;for(E=0;Eh-V+N;I--)g(v,I-1)}else if(N>V)for(I=h-V;I>C;I--)L=I+V-1,w=I+N-1,L in v?v[w]=v[L]:g(v,w);for(I=0;I9490626562425156e-8?o(g)+b:a(g-1+f(g-1)*f(g+1))}return B}()})},59660:function(T,r,n){"use strict";var e=n(63964),a=Math.asinh,t=Math.log,o=Math.sqrt;function f(y){var B=+y;return!isFinite(B)||B===0?B:B<0?-f(-B):t(B+o(B*B+1))}var b=!(a&&1/a(0)>0);e({target:"Math",stat:!0,forced:b},{asinh:f})},15383:function(T,r,n){"use strict";var e=n(63964),a=Math.atanh,t=Math.log,o=!(a&&1/a(-0)<0);e({target:"Math",stat:!0,forced:o},{atanh:function(){function f(b){var y=+b;return y===0?y:t((1+y)/(1-y))/2}return f}()})},92866:function(T,r,n){"use strict";var e=n(63964),a=n(22172),t=Math.abs,o=Math.pow;e({target:"Math",stat:!0},{cbrt:function(){function f(b){var y=+b;return a(y)*o(t(y),.3333333333333333)}return f}()})},86107:function(T,r,n){"use strict";var e=n(63964),a=Math.floor,t=Math.log,o=Math.LOG2E;e({target:"Math",stat:!0},{clz32:function(){function f(b){var y=b>>>0;return y?31-a(t(y+.5)*o):32}return f}()})},29248:function(T,r,n){"use strict";var e=n(63964),a=n(82040),t=Math.cosh,o=Math.abs,f=Math.E,b=!t||t(710)===1/0;e({target:"Math",stat:!0,forced:b},{cosh:function(){function y(B){var k=a(o(B)-1)+1;return(k+1/(k*f*f))*(f/2)}return y}()})},52540:function(T,r,n){"use strict";var e=n(63964),a=n(82040);e({target:"Math",stat:!0,forced:a!==Math.expm1},{expm1:a})},79007:function(T,r,n){"use strict";var e=n(63964),a=n(95867);e({target:"Math",stat:!0},{fround:a})},77199:function(T,r,n){"use strict";var e=n(63964),a=Math.hypot,t=Math.abs,o=Math.sqrt,f=!!a&&a(1/0,NaN)!==1/0;e({target:"Math",stat:!0,arity:2,forced:f},{hypot:function(){function b(y,B){for(var k=0,g=0,l=arguments.length,c=0,m,i;g0?(i=m/c,k+=i*i):k+=m;return c===1/0?1/0:c*o(k)}return b}()})},6522:function(T,r,n){"use strict";var e=n(63964),a=n(40033),t=Math.imul,o=a(function(){return t(4294967295,5)!==-5||t.length!==2});e({target:"Math",stat:!0,forced:o},{imul:function(){function f(b,y){var B=65535,k=+b,g=+y,l=B&k,c=B&g;return 0|l*c+((B&k>>>16)*c+l*(B&g>>>16)<<16>>>0)}return f}()})},95542:function(T,r,n){"use strict";var e=n(63964),a=n(75002);e({target:"Math",stat:!0},{log10:a})},2966:function(T,r,n){"use strict";var e=n(63964),a=n(90874);e({target:"Math",stat:!0},{log1p:a})},20997:function(T,r,n){"use strict";var e=n(63964),a=Math.log,t=Math.LN2;e({target:"Math",stat:!0},{log2:function(){function o(f){return a(f)/t}return o}()})},57400:function(T,r,n){"use strict";var e=n(63964),a=n(22172);e({target:"Math",stat:!0},{sign:a})},45571:function(T,r,n){"use strict";var e=n(63964),a=n(40033),t=n(82040),o=Math.abs,f=Math.exp,b=Math.E,y=a(function(){return Math.sinh(-2e-17)!==-2e-17});e({target:"Math",stat:!0,forced:y},{sinh:function(){function B(k){var g=+k;return o(g)<1?(t(g)-t(-g))/2:(f(g-1)-f(-g-1))*(b/2)}return B}()})},54800:function(T,r,n){"use strict";var e=n(63964),a=n(82040),t=Math.exp;e({target:"Math",stat:!0},{tanh:function(){function o(f){var b=+f,y=a(b),B=a(-b);return y===1/0?1:B===1/0?-1:(y-B)/(t(b)+t(-b))}return o}()})},15709:function(T,r,n){"use strict";var e=n(84925);e(Math,"Math",!0)},76059:function(T,r,n){"use strict";var e=n(63964),a=n(21119);e({target:"Math",stat:!0},{trunc:a})},96614:function(T,r,n){"use strict";var e=n(63964),a=n(4493),t=n(58310),o=n(74685),f=n(61765),b=n(67250),y=n(41314),B=n(45299),k=n(5781),g=n(21287),l=n(71399),c=n(24843),m=n(40033),i=n(37310).f,u=n(27193).f,s=n(74595).f,d=n(46438),v=n(92648).trim,h="Number",C=o[h],p=f[h],N=C.prototype,V=o.TypeError,S=b("".slice),I=b("".charCodeAt),L=function(M){var R=c(M,"number");return typeof R=="bigint"?R:w(R)},w=function(M){var R=c(M,"number"),O,F,_,U,z,$,G,X;if(l(R))throw new V("Cannot convert a Symbol value to a number");if(typeof R=="string"&&R.length>2){if(R=v(R),O=I(R,0),O===43||O===45){if(F=I(R,2),F===88||F===120)return NaN}else if(O===48){switch(I(R,1)){case 66:case 98:_=2,U=49;break;case 79:case 111:_=8,U=55;break;default:return+R}for(z=S(R,2),$=z.length,G=0;G<$;G++)if(X=I(z,G),X<48||X>U)return NaN;return parseInt(z,_)}}return+R},A=y(h,!C(" 0o1")||!C("0b1")||C("+0x1")),x=function(M){return g(N,M)&&m(function(){d(M)})},E=function(){function D(M){var R=arguments.length<1?0:C(L(M));return x(this)?k(Object(R),this,E):R}return D}();E.prototype=N,A&&!a&&(N.constructor=E),e({global:!0,constructor:!0,wrap:!0,forced:A},{Number:E});var P=function(M,R){for(var O=t?i(R):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),F=0,_;O.length>F;F++)B(R,_=O[F])&&!B(M,_)&&s(M,_,u(R,_))};a&&p&&P(f[h],p),(A||a)&&P(f[h],C)},324:function(T,r,n){"use strict";var e=n(63964);e({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{EPSILON:Math.pow(2,-52)})},90426:function(T,r,n){"use strict";var e=n(63964),a=n(3294);e({target:"Number",stat:!0},{isFinite:a})},95443:function(T,r,n){"use strict";var e=n(63964),a=n(5841);e({target:"Number",stat:!0},{isInteger:a})},87968:function(T,r,n){"use strict";var e=n(63964);e({target:"Number",stat:!0},{isNaN:function(){function a(t){return t!==t}return a}()})},55007:function(T,r,n){"use strict";var e=n(63964),a=n(5841),t=Math.abs;e({target:"Number",stat:!0},{isSafeInteger:function(){function o(f){return a(f)&&t(f)<=9007199254740991}return o}()})},55323:function(T,r,n){"use strict";var e=n(63964);e({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{MAX_SAFE_INTEGER:9007199254740991})},13521:function(T,r,n){"use strict";var e=n(63964);e({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{MIN_SAFE_INTEGER:-9007199254740991})},5006:function(T,r,n){"use strict";var e=n(63964),a=n(28506);e({target:"Number",stat:!0,forced:Number.parseFloat!==a},{parseFloat:a})},99009:function(T,r,n){"use strict";var e=n(63964),a=n(13693);e({target:"Number",stat:!0,forced:Number.parseInt!==a},{parseInt:a})},85770:function(T,r,n){"use strict";var e=n(63964),a=n(67250),t=n(61365),o=n(46438),f=n(62443),b=n(40033),y=RangeError,B=String,k=Math.floor,g=a(f),l=a("".slice),c=a(1 .toFixed),m=function h(C,p,N){return p===0?N:p%2===1?h(C,p-1,N*C):h(C*C,p/2,N)},i=function(C){for(var p=0,N=C;N>=4096;)p+=12,N/=4096;for(;N>=2;)p+=1,N/=2;return p},u=function(C,p,N){for(var V=-1,S=N;++V<6;)S+=p*C[V],C[V]=S%1e7,S=k(S/1e7)},s=function(C,p){for(var N=6,V=0;--N>=0;)V+=C[N],C[N]=k(V/p),V=V%p*1e7},d=function(C){for(var p=6,N="";--p>=0;)if(N!==""||p===0||C[p]!==0){var V=B(C[p]);N=N===""?V:N+g("0",7-V.length)+V}return N},v=b(function(){return c(8e-5,3)!=="0.000"||c(.9,0)!=="1"||c(1.255,2)!=="1.25"||c(0xde0b6b3a7640080,0)!=="1000000000000000128"})||!b(function(){c({})});e({target:"Number",proto:!0,forced:v},{toFixed:function(){function h(C){var p=o(this),N=t(C),V=[0,0,0,0,0,0],S="",I="0",L,w,A,x;if(N<0||N>20)throw new y("Incorrect fraction digits");if(p!==p)return"NaN";if(p<=-1e21||p>=1e21)return B(p);if(p<0&&(S="-",p=-p),p>1e-21)if(L=i(p*m(2,69,1))-69,w=L<0?p*m(2,-L,1):p/m(2,L,1),w*=4503599627370496,L=52-L,L>0){for(u(V,0,w),A=N;A>=7;)u(V,1e7,0),A-=7;for(u(V,m(10,A,1),0),A=L-1;A>=23;)s(V,8388608),A-=23;s(V,1<0?(x=I.length,I=S+(x<=N?"0."+g("0",N-x)+I:l(I,0,x-N)+"."+l(I,x-N))):I=S+I,I}return h}()})},23532:function(T,r,n){"use strict";var e=n(63964),a=n(67250),t=n(40033),o=n(46438),f=a(1 .toPrecision),b=t(function(){return f(1,void 0)!=="1"})||!t(function(){f({})});e({target:"Number",proto:!0,forced:b},{toPrecision:function(){function y(B){return B===void 0?f(o(this)):f(o(this),B)}return y}()})},87119:function(T,r,n){"use strict";var e=n(63964),a=n(41143);e({target:"Object",stat:!0,arity:2,forced:Object.assign!==a},{assign:a})},78618:function(T,r,n){"use strict";var e=n(63964),a=n(58310),t=n(80674);e({target:"Object",stat:!0,sham:!a},{create:t})},27129:function(T,r,n){"use strict";var e=n(63964),a=n(58310),t=n(57377),o=n(10320),f=n(46771),b=n(74595);a&&e({target:"Object",proto:!0,forced:t},{__defineGetter__:function(){function y(B,k){b.f(f(this),B,{get:o(k),enumerable:!0,configurable:!0})}return y}()})},31943:function(T,r,n){"use strict";var e=n(63964),a=n(58310),t=n(24239).f;e({target:"Object",stat:!0,forced:Object.defineProperties!==t,sham:!a},{defineProperties:t})},3579:function(T,r,n){"use strict";var e=n(63964),a=n(58310),t=n(74595).f;e({target:"Object",stat:!0,forced:Object.defineProperty!==t,sham:!a},{defineProperty:t})},97397:function(T,r,n){"use strict";var e=n(63964),a=n(58310),t=n(57377),o=n(10320),f=n(46771),b=n(74595);a&&e({target:"Object",proto:!0,forced:t},{__defineSetter__:function(){function y(B,k){b.f(f(this),B,{set:o(k),enumerable:!0,configurable:!0})}return y}()})},85028:function(T,r,n){"use strict";var e=n(63964),a=n(70915).entries;e({target:"Object",stat:!0},{entries:function(){function t(o){return a(o)}return t}()})},8225:function(T,r,n){"use strict";var e=n(63964),a=n(50730),t=n(40033),o=n(77568),f=n(81969).onFreeze,b=Object.freeze,y=t(function(){b(1)});e({target:"Object",stat:!0,forced:y,sham:!a},{freeze:function(){function B(k){return b&&o(k)?b(f(k)):k}return B}()})},43331:function(T,r,n){"use strict";var e=n(63964),a=n(49450),t=n(60102);e({target:"Object",stat:!0},{fromEntries:function(){function o(f){var b={};return a(f,function(y,B){t(b,y,B)},{AS_ENTRIES:!0}),b}return o}()})},62289:function(T,r,n){"use strict";var e=n(63964),a=n(40033),t=n(57591),o=n(27193).f,f=n(58310),b=!f||a(function(){o(1)});e({target:"Object",stat:!0,forced:b,sham:!f},{getOwnPropertyDescriptor:function(){function y(B,k){return o(t(B),k)}return y}()})},56196:function(T,r,n){"use strict";var e=n(63964),a=n(58310),t=n(97921),o=n(57591),f=n(27193),b=n(60102);e({target:"Object",stat:!0,sham:!a},{getOwnPropertyDescriptors:function(){function y(B){for(var k=o(B),g=f.f,l=t(k),c={},m=0,i,u;l.length>m;)u=g(k,i=l[m++]),u!==void 0&&b(c,i,u);return c}return y}()})},2950:function(T,r,n){"use strict";var e=n(63964),a=n(40033),t=n(81644).f,o=a(function(){return!Object.getOwnPropertyNames(1)});e({target:"Object",stat:!0,forced:o},{getOwnPropertyNames:t})},28603:function(T,r,n){"use strict";var e=n(63964),a=n(52357),t=n(40033),o=n(89235),f=n(46771),b=!a||t(function(){o.f(1)});e({target:"Object",stat:!0,forced:b},{getOwnPropertySymbols:function(){function y(B){var k=o.f;return k?k(f(B)):[]}return y}()})},44205:function(T,r,n){"use strict";var e=n(63964),a=n(40033),t=n(46771),o=n(36917),f=n(9225),b=a(function(){o(1)});e({target:"Object",stat:!0,forced:b,sham:!f},{getPrototypeOf:function(){function y(B){return o(t(B))}return y}()})},83186:function(T,r,n){"use strict";var e=n(63964),a=n(81834);e({target:"Object",stat:!0,forced:Object.isExtensible!==a},{isExtensible:a})},76065:function(T,r,n){"use strict";var e=n(63964),a=n(40033),t=n(77568),o=n(7462),f=n(3782),b=Object.isFrozen,y=f||a(function(){b(1)});e({target:"Object",stat:!0,forced:y},{isFrozen:function(){function B(k){return!t(k)||f&&o(k)==="ArrayBuffer"?!0:b?b(k):!1}return B}()})},13411:function(T,r,n){"use strict";var e=n(63964),a=n(40033),t=n(77568),o=n(7462),f=n(3782),b=Object.isSealed,y=f||a(function(){b(1)});e({target:"Object",stat:!0,forced:y},{isSealed:function(){function B(k){return!t(k)||f&&o(k)==="ArrayBuffer"?!0:b?b(k):!1}return B}()})},76882:function(T,r,n){"use strict";var e=n(63964),a=n(5700);e({target:"Object",stat:!0},{is:a})},26634:function(T,r,n){"use strict";var e=n(63964),a=n(46771),t=n(18450),o=n(40033),f=o(function(){t(1)});e({target:"Object",stat:!0,forced:f},{keys:function(){function b(y){return t(a(y))}return b}()})},53118:function(T,r,n){"use strict";var e=n(63964),a=n(58310),t=n(57377),o=n(46771),f=n(767),b=n(36917),y=n(27193).f;a&&e({target:"Object",proto:!0,forced:t},{__lookupGetter__:function(){function B(k){var g=o(this),l=f(k),c;do if(c=y(g,l))return c.get;while(g=b(g))}return B}()})},42514:function(T,r,n){"use strict";var e=n(63964),a=n(58310),t=n(57377),o=n(46771),f=n(767),b=n(36917),y=n(27193).f;a&&e({target:"Object",proto:!0,forced:t},{__lookupSetter__:function(){function B(k){var g=o(this),l=f(k),c;do if(c=y(g,l))return c.set;while(g=b(g))}return B}()})},84353:function(T,r,n){"use strict";var e=n(63964),a=n(77568),t=n(81969).onFreeze,o=n(50730),f=n(40033),b=Object.preventExtensions,y=f(function(){b(1)});e({target:"Object",stat:!0,forced:y,sham:!o},{preventExtensions:function(){function B(k){return b&&a(k)?b(t(k)):k}return B}()})},62987:function(T,r,n){"use strict";var e=n(63964),a=n(77568),t=n(81969).onFreeze,o=n(50730),f=n(40033),b=Object.seal,y=f(function(){b(1)});e({target:"Object",stat:!0,forced:y,sham:!o},{seal:function(){function B(k){return b&&a(k)?b(t(k)):k}return B}()})},48993:function(T,r,n){"use strict";var e=n(63964),a=n(76649);e({target:"Object",stat:!0},{setPrototypeOf:a})},52917:function(T,r,n){"use strict";var e=n(2650),a=n(55938),t=n(2509);e||a(Object.prototype,"toString",t,{unsafe:!0})},4972:function(T,r,n){"use strict";var e=n(63964),a=n(70915).values;e({target:"Object",stat:!0},{values:function(){function t(o){return a(o)}return t}()})},28913:function(T,r,n){"use strict";var e=n(63964),a=n(28506);e({global:!0,forced:parseFloat!==a},{parseFloat:a})},36382:function(T,r,n){"use strict";var e=n(63964),a=n(13693);e({global:!0,forced:parseInt!==a},{parseInt:a})},48865:function(T,r,n){"use strict";var e=n(63964),a=n(91495),t=n(10320),o=n(81837),f=n(10729),b=n(49450),y=n(48199);e({target:"Promise",stat:!0,forced:y},{all:function(){function B(k){var g=this,l=o.f(g),c=l.resolve,m=l.reject,i=f(function(){var u=t(g.resolve),s=[],d=0,v=1;b(k,function(h){var C=d++,p=!1;v++,a(u,g,h).then(function(N){p||(p=!0,s[C]=N,--v||c(s))},m)}),--v||c(s)});return i.error&&m(i.value),l.promise}return B}()})},70641:function(T,r,n){"use strict";var e=n(63964),a=n(4493),t=n(74854).CONSTRUCTOR,o=n(67512),f=n(4009),b=n(55747),y=n(55938),B=o&&o.prototype;if(e({target:"Promise",proto:!0,forced:t,real:!0},{catch:function(){function g(l){return this.then(void 0,l)}return g}()}),!a&&b(o)){var k=f("Promise").prototype.catch;B.catch!==k&&y(B,"catch",k,{unsafe:!0})}},75946:function(T,r,n){"use strict";var e=n(63964),a=n(4493),t=n(81702),o=n(74685),f=n(91495),b=n(55938),y=n(76649),B=n(84925),k=n(58491),g=n(10320),l=n(55747),c=n(77568),m=n(60077),i=n(28987),u=n(60375).set,s=n(37713),d=n(72259),v=n(10729),h=n(9547),C=n(5419),p=n(67512),N=n(74854),V=n(81837),S="Promise",I=N.CONSTRUCTOR,L=N.REJECTION_EVENT,w=N.SUBCLASSING,A=C.getterFor(S),x=C.set,E=p&&p.prototype,P=p,D=E,M=o.TypeError,R=o.document,O=o.process,F=V.f,_=F,U=!!(R&&R.createEvent&&o.dispatchEvent),z="unhandledrejection",$="rejectionhandled",G=0,X=1,J=2,se=1,ie=2,me,q,re,ae,le=function(be){var Le;return c(be)&&l(Le=be.then)?Le:!1},Z=function(be,Le){var we=Le.value,xe=Le.state===X,Re=xe?be.ok:be.fail,He=be.resolve,ye=be.reject,de=be.domain,he,ke,ve;try{Re?(xe||(Le.rejection===ie&&ce(Le),Le.rejection=se),Re===!0?he=we:(de&&de.enter(),he=Re(we),de&&(de.exit(),ve=!0)),he===be.promise?ye(new M("Promise-chain cycle")):(ke=le(he))?f(ke,he,He,ye):He(he)):ye(we)}catch(Se){de&&!ve&&de.exit(),ye(Se)}},ne=function(be,Le){be.notified||(be.notified=!0,s(function(){for(var we=be.reactions,xe;xe=we.get();)Z(xe,be);be.notified=!1,Le&&!be.rejection&&fe(be)}))},te=function(be,Le,we){var xe,Re;U?(xe=R.createEvent("Event"),xe.promise=Le,xe.reason=we,xe.initEvent(be,!1,!0),o.dispatchEvent(xe)):xe={promise:Le,reason:we},!L&&(Re=o["on"+be])?Re(xe):be===z&&d("Unhandled promise rejection",we)},fe=function(be){f(u,o,function(){var Le=be.facade,we=be.value,xe=pe(be),Re;if(xe&&(Re=v(function(){t?O.emit("unhandledRejection",we,Le):te(z,Le,we)}),be.rejection=t||pe(be)?ie:se,Re.error))throw Re.value})},pe=function(be){return be.rejection!==se&&!be.parent},ce=function(be){f(u,o,function(){var Le=be.facade;t?O.emit("rejectionHandled",Le):te($,Le,be.value)})},Ve=function(be,Le,we){return function(xe){be(Le,xe,we)}},Ce=function(be,Le,we){be.done||(be.done=!0,we&&(be=we),be.value=Le,be.state=J,ne(be,!0))},Ne=function Be(be,Le,we){if(!be.done){be.done=!0,we&&(be=we);try{if(be.facade===Le)throw new M("Promise can't be resolved itself");var xe=le(Le);xe?s(function(){var Re={done:!1};try{f(xe,Le,Ve(Be,Re,be),Ve(Ce,Re,be))}catch(He){Ce(Re,He,be)}}):(be.value=Le,be.state=X,ne(be,!1))}catch(Re){Ce({done:!1},Re,be)}}};if(I&&(P=function(){function Be(be){m(this,D),g(be),f(me,this);var Le=A(this);try{be(Ve(Ne,Le),Ve(Ce,Le))}catch(we){Ce(Le,we)}}return Be}(),D=P.prototype,me=function(){function Be(be){x(this,{type:S,done:!1,notified:!1,parent:!1,reactions:new h,rejection:!1,state:G,value:void 0})}return Be}(),me.prototype=b(D,"then",function(){function Be(be,Le){var we=A(this),xe=F(i(this,P));return we.parent=!0,xe.ok=l(be)?be:!0,xe.fail=l(Le)&&Le,xe.domain=t?O.domain:void 0,we.state===G?we.reactions.add(xe):s(function(){Z(xe,we)}),xe.promise}return Be}()),q=function(){var be=new me,Le=A(be);this.promise=be,this.resolve=Ve(Ne,Le),this.reject=Ve(Ce,Le)},V.f=F=function(be){return be===P||be===re?new q(be):_(be)},!a&&l(p)&&E!==Object.prototype)){ae=E.then,w||b(E,"then",function(){function Be(be,Le){var we=this;return new P(function(xe,Re){f(ae,we,xe,Re)}).then(be,Le)}return Be}(),{unsafe:!0});try{delete E.constructor}catch(Be){}y&&y(E,D)}e({global:!0,constructor:!0,wrap:!0,forced:I},{Promise:P}),B(P,S,!1,!0),k(S)},69861:function(T,r,n){"use strict";var e=n(63964),a=n(4493),t=n(67512),o=n(40033),f=n(4009),b=n(55747),y=n(28987),B=n(66628),k=n(55938),g=t&&t.prototype,l=!!t&&o(function(){g.finally.call({then:function(){function m(){}return m}()},function(){})});if(e({target:"Promise",proto:!0,real:!0,forced:l},{finally:function(){function m(i){var u=y(this,f("Promise")),s=b(i);return this.then(s?function(d){return B(u,i()).then(function(){return d})}:i,s?function(d){return B(u,i()).then(function(){throw d})}:i)}return m}()}),!a&&b(t)){var c=f("Promise").prototype.finally;g.finally!==c&&k(g,"finally",c,{unsafe:!0})}},53092:function(T,r,n){"use strict";n(75946),n(48865),n(70641),n(16937),n(41719),n(59321)},16937:function(T,r,n){"use strict";var e=n(63964),a=n(91495),t=n(10320),o=n(81837),f=n(10729),b=n(49450),y=n(48199);e({target:"Promise",stat:!0,forced:y},{race:function(){function B(k){var g=this,l=o.f(g),c=l.reject,m=f(function(){var i=t(g.resolve);b(k,function(u){a(i,g,u).then(l.resolve,c)})});return m.error&&c(m.value),l.promise}return B}()})},41719:function(T,r,n){"use strict";var e=n(63964),a=n(81837),t=n(74854).CONSTRUCTOR;e({target:"Promise",stat:!0,forced:t},{reject:function(){function o(f){var b=a.f(this),y=b.reject;return y(f),b.promise}return o}()})},59321:function(T,r,n){"use strict";var e=n(63964),a=n(4009),t=n(4493),o=n(67512),f=n(74854).CONSTRUCTOR,b=n(66628),y=a("Promise"),B=t&&!f;e({target:"Promise",stat:!0,forced:t||f},{resolve:function(){function k(g){return b(B&&this===y?o:this,g)}return k}()})},29674:function(T,r,n){"use strict";var e=n(63964),a=n(61267),t=n(10320),o=n(30365),f=n(40033),b=!f(function(){Reflect.apply(function(){})});e({target:"Reflect",stat:!0,forced:b},{apply:function(){function y(B,k,g){return a(t(B),k,o(g))}return y}()})},81543:function(T,r,n){"use strict";var e=n(63964),a=n(4009),t=n(61267),o=n(66284),f=n(32606),b=n(30365),y=n(77568),B=n(80674),k=n(40033),g=a("Reflect","construct"),l=Object.prototype,c=[].push,m=k(function(){function s(){}return!(g(function(){},[],s)instanceof s)}),i=!k(function(){g(function(){})}),u=m||i;e({target:"Reflect",stat:!0,forced:u,sham:u},{construct:function(){function s(d,v){f(d),b(v);var h=arguments.length<3?d:f(arguments[2]);if(i&&!m)return g(d,v,h);if(d===h){switch(v.length){case 0:return new d;case 1:return new d(v[0]);case 2:return new d(v[0],v[1]);case 3:return new d(v[0],v[1],v[2]);case 4:return new d(v[0],v[1],v[2],v[3])}var C=[null];return t(c,C,v),new(t(o,d,C))}var p=h.prototype,N=B(y(p)?p:l),V=t(d,N,v);return y(V)?V:N}return s}()})},9373:function(T,r,n){"use strict";var e=n(63964),a=n(58310),t=n(30365),o=n(767),f=n(74595),b=n(40033),y=b(function(){Reflect.defineProperty(f.f({},1,{value:1}),1,{value:2})});e({target:"Reflect",stat:!0,forced:y,sham:!a},{defineProperty:function(){function B(k,g,l){t(k);var c=o(g);t(l);try{return f.f(k,c,l),!0}catch(m){return!1}}return B}()})},45093:function(T,r,n){"use strict";var e=n(63964),a=n(30365),t=n(27193).f;e({target:"Reflect",stat:!0},{deleteProperty:function(){function o(f,b){var y=t(a(f),b);return y&&!y.configurable?!1:delete f[b]}return o}()})},5815:function(T,r,n){"use strict";var e=n(63964),a=n(58310),t=n(30365),o=n(27193);e({target:"Reflect",stat:!0,sham:!a},{getOwnPropertyDescriptor:function(){function f(b,y){return o.f(t(b),y)}return f}()})},88527:function(T,r,n){"use strict";var e=n(63964),a=n(30365),t=n(36917),o=n(9225);e({target:"Reflect",stat:!0,sham:!o},{getPrototypeOf:function(){function f(b){return t(a(b))}return f}()})},63074:function(T,r,n){"use strict";var e=n(63964),a=n(91495),t=n(77568),o=n(30365),f=n(98373),b=n(27193),y=n(36917);function B(k,g){var l=arguments.length<3?k:arguments[2],c,m;if(o(k)===l)return k[g];if(c=b.f(k,g),c)return f(c)?c.value:c.get===void 0?void 0:a(c.get,l);if(t(m=y(k)))return B(m,g,l)}e({target:"Reflect",stat:!0},{get:B})},66390:function(T,r,n){"use strict";var e=n(63964);e({target:"Reflect",stat:!0},{has:function(){function a(t,o){return o in t}return a}()})},7784:function(T,r,n){"use strict";var e=n(63964),a=n(30365),t=n(81834);e({target:"Reflect",stat:!0},{isExtensible:function(){function o(f){return a(f),t(f)}return o}()})},50551:function(T,r,n){"use strict";var e=n(63964),a=n(97921);e({target:"Reflect",stat:!0},{ownKeys:a})},76483:function(T,r,n){"use strict";var e=n(63964),a=n(4009),t=n(30365),o=n(50730);e({target:"Reflect",stat:!0,sham:!o},{preventExtensions:function(){function f(b){t(b);try{var y=a("Object","preventExtensions");return y&&y(b),!0}catch(B){return!1}}return f}()})},63915:function(T,r,n){"use strict";var e=n(63964),a=n(30365),t=n(35908),o=n(76649);o&&e({target:"Reflect",stat:!0},{setPrototypeOf:function(){function f(b,y){a(b),t(y);try{return o(b,y),!0}catch(B){return!1}}return f}()})},92046:function(T,r,n){"use strict";var e=n(63964),a=n(91495),t=n(30365),o=n(77568),f=n(98373),b=n(40033),y=n(74595),B=n(27193),k=n(36917),g=n(87458);function l(m,i,u){var s=arguments.length<4?m:arguments[3],d=B.f(t(m),i),v,h,C;if(!d){if(o(h=k(m)))return l(h,i,u,s);d=g(0)}if(f(d)){if(d.writable===!1||!o(s))return!1;if(v=B.f(s,i)){if(v.get||v.set||v.writable===!1)return!1;v.value=u,y.f(s,i,v)}else y.f(s,i,g(0,u))}else{if(C=d.set,C===void 0)return!1;a(C,s,u)}return!0}var c=b(function(){var m=function(){},i=y.f(new m,"a",{configurable:!0});return Reflect.set(m.prototype,"a",1,i)!==!1});e({target:"Reflect",stat:!0,forced:c},{set:l})},51454:function(T,r,n){"use strict";var e=n(58310),a=n(74685),t=n(67250),o=n(41314),f=n(5781),b=n(37909),y=n(80674),B=n(37310).f,k=n(21287),g=n(72586),l=n(12605),c=n(73392),m=n(62115),i=n(34550),u=n(55938),s=n(40033),d=n(45299),v=n(5419).enforce,h=n(58491),C=n(24697),p=n(39173),N=n(35688),V=C("match"),S=a.RegExp,I=S.prototype,L=a.SyntaxError,w=t(I.exec),A=t("".charAt),x=t("".replace),E=t("".indexOf),P=t("".slice),D=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,M=/a/g,R=/a/g,O=new S(M)!==M,F=m.MISSED_STICKY,_=m.UNSUPPORTED_Y,U=e&&(!O||F||p||N||s(function(){return R[V]=!1,S(M)!==M||S(R)===R||String(S(M,"i"))!=="/a/i"})),z=function(ie){for(var me=ie.length,q=0,re="",ae=!1,le;q<=me;q++){if(le=A(ie,q),le==="\\"){re+=le+A(ie,++q);continue}!ae&&le==="."?re+="[\\s\\S]":(le==="["?ae=!0:le==="]"&&(ae=!1),re+=le)}return re},$=function(ie){for(var me=ie.length,q=0,re="",ae=[],le=y(null),Z=!1,ne=!1,te=0,fe="",pe;q<=me;q++){if(pe=A(ie,q),pe==="\\")pe+=A(ie,++q);else if(pe==="]")Z=!1;else if(!Z)switch(!0){case pe==="[":Z=!0;break;case pe==="(":w(D,P(ie,q+1))&&(q+=2,ne=!0),re+=pe,te++;continue;case(pe===">"&&ne):if(fe===""||d(le,fe))throw new L("Invalid capture group name");le[fe]=!0,ae[ae.length]=[fe,te],ne=!1,fe="";continue}ne?fe+=pe:re+=pe}return[re,ae]};if(o("RegExp",U)){for(var G=function(){function se(ie,me){var q=k(I,this),re=g(ie),ae=me===void 0,le=[],Z=ie,ne,te,fe,pe,ce,Ve;if(!q&&re&&ae&&ie.constructor===G)return ie;if((re||k(I,ie))&&(ie=ie.source,ae&&(me=c(Z))),ie=ie===void 0?"":l(ie),me=me===void 0?"":l(me),Z=ie,p&&"dotAll"in M&&(te=!!me&&E(me,"s")>-1,te&&(me=x(me,/s/g,""))),ne=me,F&&"sticky"in M&&(fe=!!me&&E(me,"y")>-1,fe&&_&&(me=x(me,/y/g,""))),N&&(pe=$(ie),ie=pe[0],le=pe[1]),ce=f(S(ie,me),q?this:I,G),(te||fe||le.length)&&(Ve=v(ce),te&&(Ve.dotAll=!0,Ve.raw=G(z(ie),ne)),fe&&(Ve.sticky=!0),le.length&&(Ve.groups=le)),ie!==Z)try{b(ce,"source",Z===""?"(?:)":Z)}catch(Ce){}return ce}return se}(),X=B(S),J=0;X.length>J;)i(G,S,X[J++]);I.constructor=G,G.prototype=I,u(a,"RegExp",G,{constructor:!0})}h("RegExp")},79669:function(T,r,n){"use strict";var e=n(63964),a=n(14489);e({target:"RegExp",proto:!0,forced:/./.exec!==a},{exec:a})},23057:function(T,r,n){"use strict";var e=n(74685),a=n(58310),t=n(73936),o=n(70901),f=n(40033),b=e.RegExp,y=b.prototype,B=a&&f(function(){var k=!0;try{b(".","d")}catch(d){k=!1}var g={},l="",c=k?"dgimsy":"gimsy",m=function(v,h){Object.defineProperty(g,v,{get:function(){function C(){return l+=h,!0}return C}()})},i={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};k&&(i.hasIndices="d");for(var u in i)m(u,i[u]);var s=Object.getOwnPropertyDescriptor(y,"flags").get.call(g);return s!==c||l!==c});B&&t(y,"flags",{configurable:!0,get:o})},57983:function(T,r,n){"use strict";var e=n(70520).PROPER,a=n(55938),t=n(30365),o=n(12605),f=n(40033),b=n(73392),y="toString",B=RegExp.prototype,k=B[y],g=f(function(){return k.call({source:"a",flags:"b"})!=="/a/b"}),l=e&&k.name!==y;(g||l)&&a(B,y,function(){function c(){var m=t(this),i=o(m.source),u=o(b(m));return"/"+i+"/"+u}return c}(),{unsafe:!0})},1963:function(T,r,n){"use strict";var e=n(45150),a=n(41028);e("Set",function(t){return function(){function o(){return t(this,arguments.length?arguments[0]:void 0)}return o}()},a)},17953:function(T,r,n){"use strict";n(1963)},95309:function(T,r,n){"use strict";var e=n(63964),a=n(72506),t=n(88539);e({target:"String",proto:!0,forced:t("anchor")},{anchor:function(){function o(f){return a(this,"a","name",f)}return o}()})},82256:function(T,r,n){"use strict";var e=n(63964),a=n(72506),t=n(88539);e({target:"String",proto:!0,forced:t("big")},{big:function(){function o(){return a(this,"big","","")}return o}()})},49484:function(T,r,n){"use strict";var e=n(63964),a=n(72506),t=n(88539);e({target:"String",proto:!0,forced:t("blink")},{blink:function(){function o(){return a(this,"blink","","")}return o}()})},38931:function(T,r,n){"use strict";var e=n(63964),a=n(72506),t=n(88539);e({target:"String",proto:!0,forced:t("bold")},{bold:function(){function o(){return a(this,"b","","")}return o}()})},30442:function(T,r,n){"use strict";var e=n(63964),a=n(50233).codeAt;e({target:"String",proto:!0},{codePointAt:function(){function t(o){return a(this,o)}return t}()})},6403:function(T,r,n){"use strict";var e=n(63964),a=n(71138),t=n(27193).f,o=n(10188),f=n(12605),b=n(86213),y=n(16952),B=n(45490),k=n(4493),g=a("".slice),l=Math.min,c=B("endsWith"),m=!k&&!c&&!!function(){var i=t(String.prototype,"endsWith");return i&&!i.writable}();e({target:"String",proto:!0,forced:!m&&!c},{endsWith:function(){function i(u){var s=f(y(this));b(u);var d=arguments.length>1?arguments[1]:void 0,v=s.length,h=d===void 0?v:l(o(d),v),C=f(u);return g(s,h-C.length,h)===C}return i}()})},39308:function(T,r,n){"use strict";var e=n(63964),a=n(72506),t=n(88539);e({target:"String",proto:!0,forced:t("fixed")},{fixed:function(){function o(){return a(this,"tt","","")}return o}()})},91550:function(T,r,n){"use strict";var e=n(63964),a=n(72506),t=n(88539);e({target:"String",proto:!0,forced:t("fontcolor")},{fontcolor:function(){function o(f){return a(this,"font","color",f)}return o}()})},75008:function(T,r,n){"use strict";var e=n(63964),a=n(72506),t=n(88539);e({target:"String",proto:!0,forced:t("fontsize")},{fontsize:function(){function o(f){return a(this,"font","size",f)}return o}()})},9867:function(T,r,n){"use strict";var e=n(63964),a=n(67250),t=n(13912),o=RangeError,f=String.fromCharCode,b=String.fromCodePoint,y=a([].join),B=!!b&&b.length!==1;e({target:"String",stat:!0,arity:1,forced:B},{fromCodePoint:function(){function k(g){for(var l=[],c=arguments.length,m=0,i;c>m;){if(i=+arguments[m++],t(i,1114111)!==i)throw new o(i+" is not a valid code point");l[m]=i<65536?f(i):f(((i-=65536)>>10)+55296,i%1024+56320)}return y(l,"")}return k}()})},43673:function(T,r,n){"use strict";var e=n(63964),a=n(67250),t=n(86213),o=n(16952),f=n(12605),b=n(45490),y=a("".indexOf);e({target:"String",proto:!0,forced:!b("includes")},{includes:function(){function B(k){return!!~y(f(o(this)),f(t(k)),arguments.length>1?arguments[1]:void 0)}return B}()})},56027:function(T,r,n){"use strict";var e=n(63964),a=n(72506),t=n(88539);e({target:"String",proto:!0,forced:t("italics")},{italics:function(){function o(){return a(this,"i","","")}return o}()})},12354:function(T,r,n){"use strict";var e=n(50233).charAt,a=n(12605),t=n(5419),o=n(65574),f=n(5959),b="String Iterator",y=t.set,B=t.getterFor(b);o(String,"String",function(k){y(this,{type:b,string:a(k),index:0})},function(){function k(){var g=B(this),l=g.string,c=g.index,m;return c>=l.length?f(void 0,!0):(m=e(l,c),g.index+=m.length,f(m,!1))}return k}())},50340:function(T,r,n){"use strict";var e=n(63964),a=n(72506),t=n(88539);e({target:"String",proto:!0,forced:t("link")},{link:function(){function o(f){return a(this,"a","href",f)}return o}()})},22515:function(T,r,n){"use strict";var e=n(91495),a=n(79942),t=n(30365),o=n(42871),f=n(10188),b=n(12605),y=n(16952),B=n(78060),k=n(35483),g=n(28340);a("match",function(l,c,m){return[function(){function i(u){var s=y(this),d=o(u)?void 0:B(u,l);return d?e(d,u,s):new RegExp(u)[l](b(s))}return i}(),function(i){var u=t(this),s=b(i),d=m(c,u,s);if(d.done)return d.value;if(!u.global)return g(u,s);var v=u.unicode;u.lastIndex=0;for(var h=[],C=0,p;(p=g(u,s))!==null;){var N=b(p[0]);h[C]=N,N===""&&(u.lastIndex=k(s,f(u.lastIndex),v)),C++}return C===0?null:h}]})},5143:function(T,r,n){"use strict";var e=n(63964),a=n(24051).end,t=n(34125);e({target:"String",proto:!0,forced:t},{padEnd:function(){function o(f){return a(this,f,arguments.length>1?arguments[1]:void 0)}return o}()})},93514:function(T,r,n){"use strict";var e=n(63964),a=n(24051).start,t=n(34125);e({target:"String",proto:!0,forced:t},{padStart:function(){function o(f){return a(this,f,arguments.length>1?arguments[1]:void 0)}return o}()})},5416:function(T,r,n){"use strict";var e=n(63964),a=n(67250),t=n(57591),o=n(46771),f=n(12605),b=n(24760),y=a([].push),B=a([].join);e({target:"String",stat:!0},{raw:function(){function k(g){var l=t(o(g).raw),c=b(l);if(!c)return"";for(var m=arguments.length,i=[],u=0;;){if(y(i,f(l[u++])),u===c)return B(i,"");u")!=="7"});o("replace",function(x,E,P){var D=w?"$":"$0";return[function(){function M(R,O){var F=c(this),_=B(R)?void 0:i(R,v);return _?a(_,R,F,O):a(E,l(F),R,O)}return M}(),function(M,R){var O=b(this),F=l(M);if(typeof R=="string"&&V(R,D)===-1&&V(R,"$<")===-1){var _=P(E,O,F,R);if(_.done)return _.value}var U=y(R);U||(R=l(R));var z=O.global,$;z&&($=O.unicode,O.lastIndex=0);for(var G=[],X;X=s(O,F),!(X===null||(N(G,X),!z));){var J=l(X[0]);J===""&&(O.lastIndex=m(F,g(O.lastIndex),$))}for(var se="",ie=0,me=0;me=ie&&(se+=S(F,ie,re)+le,ie=re+q.length)}return se+S(F,ie)}]},!A||!L||w)},63272:function(T,r,n){"use strict";var e=n(91495),a=n(79942),t=n(30365),o=n(42871),f=n(16952),b=n(5700),y=n(12605),B=n(78060),k=n(28340);a("search",function(g,l,c){return[function(){function m(i){var u=f(this),s=o(i)?void 0:B(i,g);return s?e(s,i,u):new RegExp(i)[g](y(u))}return m}(),function(m){var i=t(this),u=y(m),s=c(l,i,u);if(s.done)return s.value;var d=i.lastIndex;b(d,0)||(i.lastIndex=0);var v=k(i,u);return b(i.lastIndex,d)||(i.lastIndex=d),v===null?-1:v.index}]})},34325:function(T,r,n){"use strict";var e=n(63964),a=n(72506),t=n(88539);e({target:"String",proto:!0,forced:t("small")},{small:function(){function o(){return a(this,"small","","")}return o}()})},39930:function(T,r,n){"use strict";var e=n(91495),a=n(67250),t=n(79942),o=n(30365),f=n(42871),b=n(16952),y=n(28987),B=n(35483),k=n(10188),g=n(12605),l=n(78060),c=n(28340),m=n(62115),i=n(40033),u=m.UNSUPPORTED_Y,s=4294967295,d=Math.min,v=a([].push),h=a("".slice),C=!i(function(){var N=/(?:)/,V=N.exec;N.exec=function(){return V.apply(this,arguments)};var S="ab".split(N);return S.length!==2||S[0]!=="a"||S[1]!=="b"}),p="abbc".split(/(b)*/)[1]==="c"||"test".split(/(?:)/,-1).length!==4||"ab".split(/(?:ab)*/).length!==2||".".split(/(.?)(.?)/).length!==4||".".split(/()()/).length>1||"".split(/.?/).length;t("split",function(N,V,S){var I="0".split(void 0,0).length?function(L,w){return L===void 0&&w===0?[]:e(V,this,L,w)}:V;return[function(){function L(w,A){var x=b(this),E=f(w)?void 0:l(w,N);return E?e(E,w,x,A):e(I,g(x),w,A)}return L}(),function(L,w){var A=o(this),x=g(L);if(!p){var E=S(I,A,x,w,I!==V);if(E.done)return E.value}var P=y(A,RegExp),D=A.unicode,M=(A.ignoreCase?"i":"")+(A.multiline?"m":"")+(A.unicode?"u":"")+(u?"g":"y"),R=new P(u?"^(?:"+A.source+")":A,M),O=w===void 0?s:w>>>0;if(O===0)return[];if(x.length===0)return c(R,x)===null?[x]:[];for(var F=0,_=0,U=[];_1?arguments[1]:void 0,s.length)),v=f(u);return g(s,d,d+v.length)===v}return i}()})},74498:function(T,r,n){"use strict";var e=n(63964),a=n(72506),t=n(88539);e({target:"String",proto:!0,forced:t("strike")},{strike:function(){function o(){return a(this,"strike","","")}return o}()})},15812:function(T,r,n){"use strict";var e=n(63964),a=n(72506),t=n(88539);e({target:"String",proto:!0,forced:t("sub")},{sub:function(){function o(){return a(this,"sub","","")}return o}()})},57726:function(T,r,n){"use strict";var e=n(63964),a=n(72506),t=n(88539);e({target:"String",proto:!0,forced:t("sup")},{sup:function(){function o(){return a(this,"sup","","")}return o}()})},70604:function(T,r,n){"use strict";n(99159);var e=n(63964),a=n(43476);e({target:"String",proto:!0,name:"trimEnd",forced:"".trimEnd!==a},{trimEnd:a})},85404:function(T,r,n){"use strict";var e=n(63964),a=n(43885);e({target:"String",proto:!0,name:"trimStart",forced:"".trimLeft!==a},{trimLeft:a})},99159:function(T,r,n){"use strict";var e=n(63964),a=n(43476);e({target:"String",proto:!0,name:"trimEnd",forced:"".trimRight!==a},{trimRight:a})},34965:function(T,r,n){"use strict";n(85404);var e=n(63964),a=n(43885);e({target:"String",proto:!0,name:"trimStart",forced:"".trimStart!==a},{trimStart:a})},8448:function(T,r,n){"use strict";var e=n(63964),a=n(92648).trim,t=n(90012);e({target:"String",proto:!0,forced:t("trim")},{trim:function(){function o(){return a(this)}return o}()})},79250:function(T,r,n){"use strict";var e=n(85889);e("asyncIterator")},49899:function(T,r,n){"use strict";var e=n(63964),a=n(74685),t=n(91495),o=n(67250),f=n(4493),b=n(58310),y=n(52357),B=n(40033),k=n(45299),g=n(21287),l=n(30365),c=n(57591),m=n(767),i=n(12605),u=n(87458),s=n(80674),d=n(18450),v=n(37310),h=n(81644),C=n(89235),p=n(27193),N=n(74595),V=n(24239),S=n(12867),I=n(55938),L=n(73936),w=n(16639),A=n(19417),x=n(79195),E=n(16738),P=n(24697),D=n(55557),M=n(85889),R=n(52360),O=n(84925),F=n(5419),_=n(22603).forEach,U=A("hidden"),z="Symbol",$="prototype",G=F.set,X=F.getterFor(z),J=Object[$],se=a.Symbol,ie=se&&se[$],me=a.RangeError,q=a.TypeError,re=a.QObject,ae=p.f,le=N.f,Z=h.f,ne=S.f,te=o([].push),fe=w("symbols"),pe=w("op-symbols"),ce=w("wks"),Ve=!re||!re[$]||!re[$].findChild,Ce=function(he,ke,ve){var Se=ae(J,ke);Se&&delete J[ke],le(he,ke,ve),Se&&he!==J&&le(J,ke,Se)},Ne=b&&B(function(){return s(le({},"a",{get:function(){function de(){return le(this,"a",{value:7}).a}return de}()})).a!==7})?Ce:le,Be=function(he,ke){var ve=fe[he]=s(ie);return G(ve,{type:z,tag:he,description:ke}),b||(ve.description=ke),ve},be=function(){function de(he,ke,ve){he===J&&be(pe,ke,ve),l(he);var Se=m(ke);return l(ve),k(fe,Se)?(ve.enumerable?(k(he,U)&&he[U][Se]&&(he[U][Se]=!1),ve=s(ve,{enumerable:u(0,!1)})):(k(he,U)||le(he,U,u(1,s(null))),he[U][Se]=!0),Ne(he,Se,ve)):le(he,Se,ve)}return de}(),Le=function(){function de(he,ke){l(he);var ve=c(ke),Se=d(ve).concat(ye(ve));return _(Se,function(Pe){(!b||t(xe,ve,Pe))&&be(he,Pe,ve[Pe])}),he}return de}(),we=function(){function de(he,ke){return ke===void 0?s(he):Le(s(he),ke)}return de}(),xe=function(){function de(he){var ke=m(he),ve=t(ne,this,ke);return this===J&&k(fe,ke)&&!k(pe,ke)?!1:ve||!k(this,ke)||!k(fe,ke)||k(this,U)&&this[U][ke]?ve:!0}return de}(),Re=function(){function de(he,ke){var ve=c(he),Se=m(ke);if(!(ve===J&&k(fe,Se)&&!k(pe,Se))){var Pe=ae(ve,Se);return Pe&&k(fe,Se)&&!(k(ve,U)&&ve[U][Se])&&(Pe.enumerable=!0),Pe}}return de}(),He=function(){function de(he){var ke=Z(c(he)),ve=[];return _(ke,function(Se){!k(fe,Se)&&!k(x,Se)&&te(ve,Se)}),ve}return de}(),ye=function(he){var ke=he===J,ve=Z(ke?pe:c(he)),Se=[];return _(ve,function(Pe){k(fe,Pe)&&(!ke||k(J,Pe))&&te(Se,fe[Pe])}),Se};y||(se=function(){function de(){if(g(ie,this))throw new q("Symbol is not a constructor");var he=!arguments.length||arguments[0]===void 0?void 0:i(arguments[0]),ke=E(he),ve=function(){function Se(Pe){var je=this===void 0?a:this;je===J&&t(Se,pe,Pe),k(je,U)&&k(je[U],ke)&&(je[U][ke]=!1);var Fe=u(1,Pe);try{Ne(je,ke,Fe)}catch(ze){if(!(ze instanceof me))throw ze;Ce(je,ke,Fe)}}return Se}();return b&&Ve&&Ne(J,ke,{configurable:!0,set:ve}),Be(ke,he)}return de}(),ie=se[$],I(ie,"toString",function(){function de(){return X(this).tag}return de}()),I(se,"withoutSetter",function(de){return Be(E(de),de)}),S.f=xe,N.f=be,V.f=Le,p.f=Re,v.f=h.f=He,C.f=ye,D.f=function(de){return Be(P(de),de)},b&&(L(ie,"description",{configurable:!0,get:function(){function de(){return X(this).description}return de}()}),f||I(J,"propertyIsEnumerable",xe,{unsafe:!0}))),e({global:!0,constructor:!0,wrap:!0,forced:!y,sham:!y},{Symbol:se}),_(d(ce),function(de){M(de)}),e({target:z,stat:!0,forced:!y},{useSetter:function(){function de(){Ve=!0}return de}(),useSimple:function(){function de(){Ve=!1}return de}()}),e({target:"Object",stat:!0,forced:!y,sham:!b},{create:we,defineProperty:be,defineProperties:Le,getOwnPropertyDescriptor:Re}),e({target:"Object",stat:!0,forced:!y},{getOwnPropertyNames:He}),R(),O(se,z),x[U]=!0},10933:function(T,r,n){"use strict";var e=n(63964),a=n(58310),t=n(74685),o=n(67250),f=n(45299),b=n(55747),y=n(21287),B=n(12605),k=n(73936),g=n(5774),l=t.Symbol,c=l&&l.prototype;if(a&&b(l)&&(!("description"in c)||l().description!==void 0)){var m={},i=function(){function p(){var N=arguments.length<1||arguments[0]===void 0?void 0:B(arguments[0]),V=y(c,this)?new l(N):N===void 0?l():l(N);return N===""&&(m[V]=!0),V}return p}();g(i,l),i.prototype=c,c.constructor=i;var u=String(l("description detection"))==="Symbol(description detection)",s=o(c.valueOf),d=o(c.toString),v=/^Symbol\((.*)\)[^)]+$/,h=o("".replace),C=o("".slice);k(c,"description",{configurable:!0,get:function(){function p(){var N=s(this);if(f(m,N))return"";var V=d(N),S=u?C(V,7,-1):h(V,v,"$1");return S===""?void 0:S}return p}()}),e({global:!0,constructor:!0,forced:!0},{Symbol:i})}},30828:function(T,r,n){"use strict";var e=n(63964),a=n(4009),t=n(45299),o=n(12605),f=n(16639),b=n(66570),y=f("string-to-symbol-registry"),B=f("symbol-to-string-registry");e({target:"Symbol",stat:!0,forced:!b},{for:function(){function k(g){var l=o(g);if(t(y,l))return y[l];var c=a("Symbol")(l);return y[l]=c,B[c]=l,c}return k}()})},53795:function(T,r,n){"use strict";var e=n(85889);e("hasInstance")},87806:function(T,r,n){"use strict";var e=n(85889);e("isConcatSpreadable")},64677:function(T,r,n){"use strict";var e=n(85889);e("iterator")},33313:function(T,r,n){"use strict";n(49899),n(30828),n(6862),n(53008),n(28603)},6862:function(T,r,n){"use strict";var e=n(63964),a=n(45299),t=n(71399),o=n(89393),f=n(16639),b=n(66570),y=f("symbol-to-string-registry");e({target:"Symbol",stat:!0,forced:!b},{keyFor:function(){function B(k){if(!t(k))throw new TypeError(o(k)+" is not a symbol");if(a(y,k))return y[k]}return B}()})},48058:function(T,r,n){"use strict";var e=n(85889);e("match")},51583:function(T,r,n){"use strict";var e=n(85889);e("replace")},82403:function(T,r,n){"use strict";var e=n(85889);e("search")},34265:function(T,r,n){"use strict";var e=n(85889);e("species")},3295:function(T,r,n){"use strict";var e=n(85889);e("split")},1078:function(T,r,n){"use strict";var e=n(85889),a=n(52360);e("toPrimitive"),a()},63207:function(T,r,n){"use strict";var e=n(4009),a=n(85889),t=n(84925);a("toStringTag"),t(e("Symbol"),"Symbol")},80520:function(T,r,n){"use strict";var e=n(85889);e("unscopables")},99872:function(T,r,n){"use strict";var e=n(67250),a=n(4246),t=n(71447),o=e(t),f=a.aTypedArray,b=a.exportTypedArrayMethod;b("copyWithin",function(){function y(B,k){return o(f(this),B,k,arguments.length>2?arguments[2]:void 0)}return y}())},73364:function(T,r,n){"use strict";var e=n(4246),a=n(22603).every,t=e.aTypedArray,o=e.exportTypedArrayMethod;o("every",function(){function f(b){return a(t(this),b,arguments.length>1?arguments[1]:void 0)}return f}())},58166:function(T,r,n){"use strict";var e=n(4246),a=n(88471),t=n(61484),o=n(2281),f=n(91495),b=n(67250),y=n(40033),B=e.aTypedArray,k=e.exportTypedArrayMethod,g=b("".slice),l=y(function(){var c=0;return new Int8Array(2).fill({valueOf:function(){function m(){return c++}return m}()}),c!==1});k("fill",function(){function c(m){var i=arguments.length;B(this);var u=g(o(this),0,3)==="Big"?t(m):+m;return f(a,this,u,i>1?arguments[1]:void 0,i>2?arguments[2]:void 0)}return c}(),l)},23793:function(T,r,n){"use strict";var e=n(4246),a=n(22603).filter,t=n(45399),o=e.aTypedArray,f=e.exportTypedArrayMethod;f("filter",function(){function b(y){var B=a(o(this),y,arguments.length>1?arguments[1]:void 0);return t(this,B)}return b}())},13917:function(T,r,n){"use strict";var e=n(4246),a=n(22603).findIndex,t=e.aTypedArray,o=e.exportTypedArrayMethod;o("findIndex",function(){function f(b){return a(t(this),b,arguments.length>1?arguments[1]:void 0)}return f}())},43820:function(T,r,n){"use strict";var e=n(4246),a=n(22603).find,t=e.aTypedArray,o=e.exportTypedArrayMethod;o("find",function(){function f(b){return a(t(this),b,arguments.length>1?arguments[1]:void 0)}return f}())},80756:function(T,r,n){"use strict";var e=n(80185);e("Float32",function(a){return function(){function t(o,f,b){return a(this,o,f,b)}return t}()})},70567:function(T,r,n){"use strict";var e=n(80185);e("Float64",function(a){return function(){function t(o,f,b){return a(this,o,f,b)}return t}()})},19852:function(T,r,n){"use strict";var e=n(4246),a=n(22603).forEach,t=e.aTypedArray,o=e.exportTypedArrayMethod;o("forEach",function(){function f(b){a(t(this),b,arguments.length>1?arguments[1]:void 0)}return f}())},40379:function(T,r,n){"use strict";var e=n(86563),a=n(4246).exportTypedArrayStaticMethod,t=n(3805);a("from",t,e)},92770:function(T,r,n){"use strict";var e=n(4246),a=n(14211).includes,t=e.aTypedArray,o=e.exportTypedArrayMethod;o("includes",function(){function f(b){return a(t(this),b,arguments.length>1?arguments[1]:void 0)}return f}())},81069:function(T,r,n){"use strict";var e=n(4246),a=n(14211).indexOf,t=e.aTypedArray,o=e.exportTypedArrayMethod;o("indexOf",function(){function f(b){return a(t(this),b,arguments.length>1?arguments[1]:void 0)}return f}())},60037:function(T,r,n){"use strict";var e=n(80185);e("Int16",function(a){return function(){function t(o,f,b){return a(this,o,f,b)}return t}()})},44195:function(T,r,n){"use strict";var e=n(80185);e("Int32",function(a){return function(){function t(o,f,b){return a(this,o,f,b)}return t}()})},66756:function(T,r,n){"use strict";var e=n(80185);e("Int8",function(a){return function(){function t(o,f,b){return a(this,o,f,b)}return t}()})},63689:function(T,r,n){"use strict";var e=n(74685),a=n(40033),t=n(67250),o=n(4246),f=n(34570),b=n(24697),y=b("iterator"),B=e.Uint8Array,k=t(f.values),g=t(f.keys),l=t(f.entries),c=o.aTypedArray,m=o.exportTypedArrayMethod,i=B&&B.prototype,u=!a(function(){i[y].call([1])}),s=!!i&&i.values&&i[y]===i.values&&i.values.name==="values",d=function(){function v(){return k(c(this))}return v}();m("entries",function(){function v(){return l(c(this))}return v}(),u),m("keys",function(){function v(){return g(c(this))}return v}(),u),m("values",d,u||!s,{name:"values"}),m(y,d,u||!s,{name:"values"})},5659:function(T,r,n){"use strict";var e=n(4246),a=n(67250),t=e.aTypedArray,o=e.exportTypedArrayMethod,f=a([].join);o("join",function(){function b(y){return f(t(this),y)}return b}())},25014:function(T,r,n){"use strict";var e=n(4246),a=n(61267),t=n(1325),o=e.aTypedArray,f=e.exportTypedArrayMethod;f("lastIndexOf",function(){function b(y){var B=arguments.length;return a(t,o(this),B>1?[y,arguments[1]]:[y])}return b}())},32189:function(T,r,n){"use strict";var e=n(4246),a=n(22603).map,t=n(31082),o=e.aTypedArray,f=e.exportTypedArrayMethod;f("map",function(){function b(y){return a(o(this),y,arguments.length>1?arguments[1]:void 0,function(B,k){return new(t(B))(k)})}return b}())},23030:function(T,r,n){"use strict";var e=n(4246),a=n(86563),t=e.aTypedArrayConstructor,o=e.exportTypedArrayStaticMethod;o("of",function(){function f(){for(var b=0,y=arguments.length,B=new(t(this))(y);y>b;)B[b]=arguments[b++];return B}return f}(),a)},49110:function(T,r,n){"use strict";var e=n(4246),a=n(56844).right,t=e.aTypedArray,o=e.exportTypedArrayMethod;o("reduceRight",function(){function f(b){var y=arguments.length;return a(t(this),b,y,y>1?arguments[1]:void 0)}return f}())},24309:function(T,r,n){"use strict";var e=n(4246),a=n(56844).left,t=e.aTypedArray,o=e.exportTypedArrayMethod;o("reduce",function(){function f(b){var y=arguments.length;return a(t(this),b,y,y>1?arguments[1]:void 0)}return f}())},56445:function(T,r,n){"use strict";var e=n(4246),a=e.aTypedArray,t=e.exportTypedArrayMethod,o=Math.floor;t("reverse",function(){function f(){for(var b=this,y=a(b).length,B=o(y/2),k=0,g;k1?arguments[1]:void 0,1),h=b(d);if(i)return a(l,this,h,v);var C=this.length,p=o(h),N=0;if(p+v>C)throw new B("Wrong length");for(;Nm;)u[m]=l[m++];return u}return B}(),y)},88739:function(T,r,n){"use strict";var e=n(4246),a=n(22603).some,t=e.aTypedArray,o=e.exportTypedArrayMethod;o("some",function(){function f(b){return a(t(this),b,arguments.length>1?arguments[1]:void 0)}return f}())},60415:function(T,r,n){"use strict";var e=n(74685),a=n(71138),t=n(40033),o=n(10320),f=n(90274),b=n(4246),y=n(652),B=n(19228),k=n(5026),g=n(9342),l=b.aTypedArray,c=b.exportTypedArrayMethod,m=e.Uint16Array,i=m&&a(m.prototype.sort),u=!!i&&!(t(function(){i(new m(2),null)})&&t(function(){i(new m(2),{})})),s=!!i&&!t(function(){if(k)return k<74;if(y)return y<67;if(B)return!0;if(g)return g<602;var v=new m(516),h=Array(516),C,p;for(C=0;C<516;C++)p=C%4,v[C]=515-C,h[C]=C-2*p+3;for(i(v,function(N,V){return(N/4|0)-(V/4|0)}),C=0;C<516;C++)if(v[C]!==h[C])return!0}),d=function(h){return function(C,p){return h!==void 0?+h(C,p)||0:p!==p?-1:C!==C?1:C===0&&p===0?1/C>0&&1/p<0?1:-1:C>p}};c("sort",function(){function v(h){return h!==void 0&&o(h),s?i(this,h):f(l(this),d(h))}return v}(),!s||u)},72532:function(T,r,n){"use strict";var e=n(4246),a=n(10188),t=n(13912),o=n(31082),f=e.aTypedArray,b=e.exportTypedArrayMethod;b("subarray",function(){function y(B,k){var g=f(this),l=g.length,c=t(B,l),m=o(g);return new m(g.buffer,g.byteOffset+c*g.BYTES_PER_ELEMENT,a((k===void 0?l:t(k,l))-c))}return y}())},62207:function(T,r,n){"use strict";var e=n(74685),a=n(61267),t=n(4246),o=n(40033),f=n(54602),b=e.Int8Array,y=t.aTypedArray,B=t.exportTypedArrayMethod,k=[].toLocaleString,g=!!b&&o(function(){k.call(new b(1))}),l=o(function(){return[1,2].toLocaleString()!==new b([1,2]).toLocaleString()})||!o(function(){b.prototype.toLocaleString.call([1,2])});B("toLocaleString",function(){function c(){return a(k,g?f(y(this)):y(this),f(arguments))}return c}(),l)},906:function(T,r,n){"use strict";var e=n(4246).exportTypedArrayMethod,a=n(40033),t=n(74685),o=n(67250),f=t.Uint8Array,b=f&&f.prototype||{},y=[].toString,B=o([].join);a(function(){y.call({})})&&(y=function(){function g(){return B(this)}return g}());var k=b.toString!==y;e("toString",y,k)},78824:function(T,r,n){"use strict";var e=n(80185);e("Uint16",function(a){return function(){function t(o,f,b){return a(this,o,f,b)}return t}()})},72846:function(T,r,n){"use strict";var e=n(80185);e("Uint32",function(a){return function(){function t(o,f,b){return a(this,o,f,b)}return t}()})},24575:function(T,r,n){"use strict";var e=n(80185);e("Uint8",function(a){return function(){function t(o,f,b){return a(this,o,f,b)}return t}()})},71968:function(T,r,n){"use strict";var e=n(80185);e("Uint8",function(a){return function(){function t(o,f,b){return a(this,o,f,b)}return t}()},!0)},80040:function(T,r,n){"use strict";var e=n(50730),a=n(74685),t=n(67250),o=n(30145),f=n(81969),b=n(45150),y=n(39895),B=n(77568),k=n(5419).enforce,g=n(40033),l=n(21820),c=Object,m=Array.isArray,i=c.isExtensible,u=c.isFrozen,s=c.isSealed,d=c.freeze,v=c.seal,h=!a.ActiveXObject&&"ActiveXObject"in a,C,p=function(E){return function(){function P(){return E(this,arguments.length?arguments[0]:void 0)}return P}()},N=b("WeakMap",p,y),V=N.prototype,S=t(V.set),I=function(){return e&&g(function(){var E=d([]);return S(new N,E,1),!u(E)})};if(l)if(h){C=y.getConstructor(p,"WeakMap",!0),f.enable();var L=t(V.delete),w=t(V.has),A=t(V.get);o(V,{delete:function(){function x(E){if(B(E)&&!i(E)){var P=k(this);return P.frozen||(P.frozen=new C),L(this,E)||P.frozen.delete(E)}return L(this,E)}return x}(),has:function(){function x(E){if(B(E)&&!i(E)){var P=k(this);return P.frozen||(P.frozen=new C),w(this,E)||P.frozen.has(E)}return w(this,E)}return x}(),get:function(){function x(E){if(B(E)&&!i(E)){var P=k(this);return P.frozen||(P.frozen=new C),w(this,E)?A(this,E):P.frozen.get(E)}return A(this,E)}return x}(),set:function(){function x(E,P){if(B(E)&&!i(E)){var D=k(this);D.frozen||(D.frozen=new C),w(this,E)?S(this,E,P):D.frozen.set(E,P)}else S(this,E,P);return this}return x}()})}else I()&&o(V,{set:function(){function x(E,P){var D;return m(E)&&(u(E)?D=d:s(E)&&(D=v)),S(this,E,P),D&&D(E),this}return x}()})},90846:function(T,r,n){"use strict";n(80040)},67042:function(T,r,n){"use strict";var e=n(45150),a=n(39895);e("WeakSet",function(t){return function(){function o(){return t(this,arguments.length?arguments[0]:void 0)}return o}()},a)},40348:function(T,r,n){"use strict";n(67042)},5606:function(T,r,n){"use strict";var e=n(63964),a=n(74685),t=n(60375).clear;e({global:!0,bind:!0,enumerable:!0,forced:a.clearImmediate!==t},{clearImmediate:t})},83006:function(T,r,n){"use strict";n(5606),n(27807)},25764:function(T,r,n){"use strict";var e=n(63964),a=n(74685),t=n(37713),o=n(10320),f=n(24986),b=n(40033),y=n(58310),B=b(function(){return y&&Object.getOwnPropertyDescriptor(a,"queueMicrotask").value.length!==1});e({global:!0,enumerable:!0,dontCallGetSet:!0,forced:B},{queueMicrotask:function(){function k(g){f(arguments.length,1),t(o(g))}return k}()})},27807:function(T,r,n){"use strict";var e=n(63964),a=n(74685),t=n(60375).set,o=n(78362),f=a.setImmediate?o(t,!1):t;e({global:!0,bind:!0,enumerable:!0,forced:a.setImmediate!==f},{setImmediate:f})},45569:function(T,r,n){"use strict";var e=n(63964),a=n(74685),t=n(78362),o=t(a.setInterval,!0);e({global:!0,bind:!0,forced:a.setInterval!==o},{setInterval:o})},5213:function(T,r,n){"use strict";var e=n(63964),a=n(74685),t=n(78362),o=t(a.setTimeout,!0);e({global:!0,bind:!0,forced:a.setTimeout!==o},{setTimeout:o})},69401:function(T,r,n){"use strict";n(45569),n(5213)},7435:function(T){"use strict";/** + */var t=r.BoxWithSampleText=function(){function o(f){return(0,e.normalizeProps)((0,e.createComponentVNode)(2,a.Box,Object.assign({},f,{children:[(0,e.createComponentVNode)(2,a.Box,{italic:!0,children:"Jackdaws love my big sphinx of quartz."}),(0,e.createComponentVNode)(2,a.Box,{mt:1,bold:!0,children:"The wide electrification of the southern provinces will give a powerful impetus to the growth of agriculture."})]})))}return o}()},67160:function(){},23542:function(){},30386:function(){},98996:function(){},50578:function(){},4444:function(){},77870:function(){},23632:function(){},56492:function(){},39108:function(){},11714:function(){},73492:function(){},49641:function(){},17570:function(){},61858:function(){},32882:function(){},70752:function(T,r,n){var e={"./pai_atmosphere.js":80818,"./pai_bioscan.js":23903,"./pai_directives.js":64988,"./pai_doorjack.js":13813,"./pai_main_menu.js":66025,"./pai_manifest.js":2983,"./pai_medrecords.js":40758,"./pai_messenger.js":98599,"./pai_radio.js":50775,"./pai_secrecords.js":48623,"./pai_signaler.js":47297};function a(o){var f=t(o);return n(f)}function t(o){if(!n.o(e,o)){var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}return e[o]}a.keys=function(){return Object.keys(e)},a.resolve=t,T.exports=a,a.id=70752},59395:function(T,r,n){var e={"./pda_atmos_scan.js":78532,"./pda_games.js":2395,"./pda_janitor.js":40253,"./pda_main_menu.js":58293,"./pda_manifest.js":58059,"./pda_medical.js":18147,"./pda_messenger.js":77595,"./pda_minesweeper.js":90382,"./pda_mule.js":24635,"./pda_nanobank.js":23734,"./pda_notes.js":97085,"./pda_power.js":57513,"./pda_secbot.js":99808,"./pda_security.js":77168,"./pda_signaler.js":21773,"./pda_status_display.js":81857,"./pda_supplyrecords.js":70287};function a(o){var f=t(o);return n(f)}function t(o){if(!n.o(e,o)){var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}return e[o]}a.keys=function(){return Object.keys(e)},a.resolve=t,T.exports=a,a.id=59395},32054:function(T,r,n){var e={"./AICard":1090,"./AICard.js":1090,"./AIFixer":39454,"./AIFixer.js":39454,"./APC":88422,"./APC.js":88422,"./ATM":99660,"./ATM.js":99660,"./AccountsUplinkTerminal":86423,"./AccountsUplinkTerminal.js":86423,"./AdminAntagMenu":23001,"./AdminAntagMenu.js":23001,"./AgentCard":39683,"./AgentCard.tsx":39683,"./AiAirlock":56793,"./AiAirlock.js":56793,"./AirAlarm":72475,"./AirAlarm.js":72475,"./AirlockAccessController":12333,"./AirlockAccessController.js":12333,"./AirlockElectronics":28736,"./AirlockElectronics.js":28736,"./AlertModal":47365,"./AlertModal.tsx":47365,"./AntagInfoHeretic":68371,"./AntagInfoHeretic.tsx":68371,"./AppearanceChanger":71824,"./AppearanceChanger.js":71824,"./AtmosAlertConsole":72285,"./AtmosAlertConsole.js":72285,"./AtmosControl":65805,"./AtmosControl.js":65805,"./AtmosFilter":87816,"./AtmosFilter.js":87816,"./AtmosMixer":52977,"./AtmosMixer.js":52977,"./AtmosPump":11748,"./AtmosPump.js":11748,"./AtmosTankControl":69321,"./AtmosTankControl.js":69321,"./AugmentMenu":92444,"./AugmentMenu.js":92444,"./Autolathe":59179,"./Autolathe.js":59179,"./BioChipPad":5147,"./BioChipPad.js":5147,"./Biogenerator":64273,"./Biogenerator.js":64273,"./BloomEdit":47823,"./BloomEdit.js":47823,"./BlueSpaceArtilleryControl":18621,"./BlueSpaceArtilleryControl.js":18621,"./BluespaceTap":27629,"./BluespaceTap.js":27629,"./BodyScanner":33758,"./BodyScanner.js":33758,"./BookBinder":67963,"./BookBinder.js":67963,"./BotCall":61925,"./BotCall.js":61925,"./BotClean":20464,"./BotClean.js":20464,"./BotFloor":69479,"./BotFloor.js":69479,"./BotHonk":59887,"./BotHonk.js":59887,"./BotMed":80063,"./BotMed.js":80063,"./BotSecurity":74439,"./BotSecurity.js":74439,"./BrigCells":10833,"./BrigCells.js":10833,"./BrigTimer":45761,"./BrigTimer.js":45761,"./CameraConsole":26300,"./CameraConsole.js":26300,"./Canister":52927,"./Canister.js":52927,"./CardComputer":51793,"./CardComputer.js":51793,"./CargoConsole":64083,"./CargoConsole.js":64083,"./Chameleon":36232,"./Chameleon.tsx":36232,"./ChangelogView":87331,"./ChangelogView.js":87331,"./CheckboxListInputModal":91360,"./CheckboxListInputModal.tsx":91360,"./ChemDispenser":36108,"./ChemDispenser.js":36108,"./ChemHeater":13146,"./ChemHeater.js":13146,"./ChemMaster":56541,"./ChemMaster.tsx":56541,"./CloningConsole":37173,"./CloningConsole.js":37173,"./CloningPod":98723,"./CloningPod.js":98723,"./CoinMint":18259,"./CoinMint.tsx":18259,"./ColorPickerModal":93858,"./ColorPickerModal.tsx":93858,"./ColourMatrixTester":8444,"./ColourMatrixTester.js":8444,"./CommunicationsComputer":63818,"./CommunicationsComputer.js":63818,"./CompostBin":20562,"./CompostBin.js":20562,"./Contractor":21813,"./Contractor.js":21813,"./ConveyorSwitch":54151,"./ConveyorSwitch.js":54151,"./CrewMonitor":73169,"./CrewMonitor.js":73169,"./Cryo":63987,"./Cryo.js":63987,"./CryopodConsole":86099,"./CryopodConsole.js":86099,"./DNAModifier":12692,"./DNAModifier.js":12692,"./DecalPainter":76430,"./DecalPainter.js":76430,"./DestinationTagger":41074,"./DestinationTagger.js":41074,"./DisposalBin":46500,"./DisposalBin.js":46500,"./DnaVault":33233,"./DnaVault.js":33233,"./DroneConsole":33681,"./DroneConsole.js":33681,"./EFTPOS":17263,"./EFTPOS.js":17263,"./ERTManager":76382,"./ERTManager.js":76382,"./EconomyManager":90217,"./EconomyManager.js":90217,"./Electropack":82565,"./Electropack.js":82565,"./Emojipedia":11243,"./Emojipedia.tsx":11243,"./EvolutionMenu":36730,"./EvolutionMenu.js":36730,"./ExosuitFabricator":17370,"./ExosuitFabricator.js":17370,"./ExperimentConsole":59128,"./ExperimentConsole.js":59128,"./ExternalAirlockController":97086,"./ExternalAirlockController.js":97086,"./FaxMachine":96142,"./FaxMachine.js":96142,"./FilingCabinet":74123,"./FilingCabinet.js":74123,"./FloorPainter":83767,"./FloorPainter.js":83767,"./GPS":53424,"./GPS.js":53424,"./GeneModder":89124,"./GeneModder.js":89124,"./GenericCrewManifest":73053,"./GenericCrewManifest.js":73053,"./GhostHudPanel":42914,"./GhostHudPanel.js":42914,"./GlandDispenser":25825,"./GlandDispenser.js":25825,"./GravityGen":10270,"./GravityGen.js":10270,"./GuestPass":48657,"./GuestPass.js":48657,"./HandheldChemDispenser":67834,"./HandheldChemDispenser.js":67834,"./HealthSensor":46098,"./HealthSensor.js":46098,"./Holodeck":36771,"./Holodeck.js":36771,"./Instrument":25471,"./Instrument.js":25471,"./KeyComboModal":13618,"./KeyComboModal.tsx":13618,"./KeycardAuth":35655,"./KeycardAuth.js":35655,"./KitchenMachine":62955,"./KitchenMachine.js":62955,"./LawManager":9525,"./LawManager.js":9525,"./LibraryComputer":85066,"./LibraryComputer.js":85066,"./LibraryManager":9516,"./LibraryManager.js":9516,"./ListInputModal":90447,"./ListInputModal.tsx":90447,"./Loadout":26826,"./Loadout.tsx":26826,"./MODsuit":77613,"./MODsuit.js":77613,"./MagnetController":78624,"./MagnetController.js":78624,"./MechBayConsole":72106,"./MechBayConsole.js":72106,"./MechaControlConsole":7466,"./MechaControlConsole.js":7466,"./MedicalRecords":79625,"./MedicalRecords.js":79625,"./MerchVendor":54989,"./MerchVendor.js":54989,"./MiningVendor":87684,"./MiningVendor.js":87684,"./NTRecruiter":59783,"./NTRecruiter.js":59783,"./Newscaster":64713,"./Newscaster.js":64713,"./Noticeboard":48286,"./Noticeboard.tsx":48286,"./NuclearBomb":41166,"./NuclearBomb.js":41166,"./NumberInputModal":52416,"./NumberInputModal.tsx":52416,"./OperatingComputer":1218,"./OperatingComputer.js":1218,"./Orbit":46892,"./Orbit.js":46892,"./OreRedemption":15421,"./OreRedemption.js":15421,"./PAI":52754,"./PAI.js":52754,"./PDA":85175,"./PDA.js":85175,"./Pacman":68654,"./Pacman.js":68654,"./PanDEMIC":1701,"./PanDEMIC.tsx":1701,"./ParticleAccelerator":67921,"./ParticleAccelerator.js":67921,"./PdaPainter":71432,"./PdaPainter.js":71432,"./PersonalCrafting":33388,"./PersonalCrafting.js":33388,"./Photocopier":56150,"./Photocopier.js":56150,"./PoolController":84676,"./PoolController.js":84676,"./PortablePump":57003,"./PortablePump.js":57003,"./PortableScrubber":70069,"./PortableScrubber.js":70069,"./PortableTurret":59955,"./PortableTurret.js":59955,"./PowerMonitor":61631,"./PowerMonitor.js":61631,"./PrisonerImplantManager":50992,"./PrisonerImplantManager.js":50992,"./PrisonerShuttleConsole":53952,"./PrisonerShuttleConsole.js":53952,"./PrizeCounter":97852,"./PrizeCounter.tsx":97852,"./RCD":94813,"./RCD.js":94813,"./RPD":18738,"./RPD.js":18738,"./Radio":80299,"./Radio.js":80299,"./RankedListInputModal":14846,"./RankedListInputModal.tsx":14846,"./ReagentGrinder":48125,"./ReagentGrinder.js":48125,"./ReagentsEditor":58262,"./ReagentsEditor.tsx":58262,"./RemoteSignaler":30207,"./RemoteSignaler.js":30207,"./RequestConsole":25472,"./RequestConsole.js":25472,"./RndBackupConsole":9861,"./RndBackupConsole.js":9861,"./RndConsole":12644,"./RndConsole/":12644,"./RndConsole/AnalyzerMenu":68303,"./RndConsole/AnalyzerMenu.js":68303,"./RndConsole/DataDiskMenu":37556,"./RndConsole/DataDiskMenu.js":37556,"./RndConsole/LatheCategory":16830,"./RndConsole/LatheCategory.js":16830,"./RndConsole/LatheChemicalStorage":70497,"./RndConsole/LatheChemicalStorage.js":70497,"./RndConsole/LatheMainMenu":70864,"./RndConsole/LatheMainMenu.js":70864,"./RndConsole/LatheMaterialStorage":42878,"./RndConsole/LatheMaterialStorage.js":42878,"./RndConsole/LatheMaterials":52662,"./RndConsole/LatheMaterials.js":52662,"./RndConsole/LatheMenu":9681,"./RndConsole/LatheMenu.js":9681,"./RndConsole/LatheSearch":68198,"./RndConsole/LatheSearch.js":68198,"./RndConsole/LinkMenu":81421,"./RndConsole/LinkMenu.js":81421,"./RndConsole/SettingsMenu":6256,"./RndConsole/SettingsMenu.js":6256,"./RndConsole/index":12644,"./RndConsole/index.js":12644,"./RndNetController":29205,"./RndNetController.js":29205,"./RndServer":63315,"./RndServer.js":63315,"./RobotSelfDiagnosis":26109,"./RobotSelfDiagnosis.js":26109,"./RoboticsControlConsole":97997,"./RoboticsControlConsole.js":97997,"./Safe":54431,"./Safe.js":54431,"./SatelliteControl":29740,"./SatelliteControl.js":29740,"./SecureStorage":44162,"./SecureStorage.js":44162,"./SecurityRecords":6272,"./SecurityRecords.js":6272,"./SeedExtractor":5099,"./SeedExtractor.js":5099,"./ShuttleConsole":2916,"./ShuttleConsole.js":2916,"./ShuttleManipulator":39401,"./ShuttleManipulator.js":39401,"./SingularityMonitor":86013,"./SingularityMonitor.js":86013,"./Sleeper":88284,"./Sleeper.js":88284,"./SlotMachine":21597,"./SlotMachine.js":21597,"./Smartfridge":46348,"./Smartfridge.js":46348,"./Smes":86162,"./Smes.js":86162,"./SolarControl":63584,"./SolarControl.js":63584,"./SpawnersMenu":38096,"./SpawnersMenu.js":38096,"./SpecMenu":30586,"./SpecMenu.js":30586,"./StackCraft":95152,"./StackCraft.js":95152,"./StationAlertConsole":38307,"./StationAlertConsole.js":38307,"./StationTraitsPanel":96091,"./StationTraitsPanel.tsx":96091,"./StripMenu":39409,"./StripMenu.tsx":39409,"./SuitStorage":69514,"./SuitStorage.js":69514,"./SupermatterMonitor":15022,"./SupermatterMonitor.js":15022,"./SyndicateComputerSimple":46029,"./SyndicateComputerSimple.js":46029,"./TEG":36372,"./TEG.js":36372,"./TachyonArray":56441,"./TachyonArray.js":56441,"./Tank":1754,"./Tank.js":1754,"./TankDispenser":7579,"./TankDispenser.js":7579,"./TcommsCore":16136,"./TcommsCore.js":16136,"./TcommsRelay":88046,"./TcommsRelay.js":88046,"./Teleporter":20802,"./Teleporter.js":20802,"./TelescienceConsole":48517,"./TelescienceConsole.js":48517,"./TempGun":21800,"./TempGun.js":21800,"./TextInputModal":24410,"./TextInputModal.tsx":24410,"./ThermoMachine":25036,"./ThermoMachine.js":25036,"./TransferValve":20035,"./TransferValve.js":20035,"./TurbineComputer":78166,"./TurbineComputer.js":78166,"./Uplink":52847,"./Uplink.js":52847,"./Vending":12261,"./Vending.js":12261,"./VolumeMixer":68971,"./VolumeMixer.js":68971,"./VotePanel":2510,"./VotePanel.js":2510,"./Wires":30138,"./Wires.js":30138,"./WizardApprenticeContract":21400,"./WizardApprenticeContract.js":21400,"./common/AccessList":49148,"./common/AccessList.js":49148,"./common/AtmosScan":26991,"./common/AtmosScan.js":26991,"./common/BeakerContents":85870,"./common/BeakerContents.js":85870,"./common/BotStatus":92963,"./common/BotStatus.js":92963,"./common/ComplexModal":3939,"./common/ComplexModal.js":3939,"./common/CrewManifest":41874,"./common/CrewManifest.js":41874,"./common/InputButtons":19203,"./common/InputButtons.tsx":19203,"./common/InterfaceLockNoticeBox":195,"./common/InterfaceLockNoticeBox.js":195,"./common/Loader":51057,"./common/Loader.tsx":51057,"./common/LoginInfo":321,"./common/LoginInfo.js":321,"./common/LoginScreen":5485,"./common/LoginScreen.js":5485,"./common/Operating":62411,"./common/Operating.js":62411,"./common/Signaler":13545,"./common/Signaler.js":13545,"./common/SimpleRecords":41984,"./common/SimpleRecords.js":41984,"./common/TemporaryNotice":22091,"./common/TemporaryNotice.js":22091,"./goonstation_PTL":95213,"./goonstation_PTL/":95213,"./goonstation_PTL/index":95213,"./goonstation_PTL/index.js":95213,"./pai/pai_atmosphere":80818,"./pai/pai_atmosphere.js":80818,"./pai/pai_bioscan":23903,"./pai/pai_bioscan.js":23903,"./pai/pai_directives":64988,"./pai/pai_directives.js":64988,"./pai/pai_doorjack":13813,"./pai/pai_doorjack.js":13813,"./pai/pai_main_menu":66025,"./pai/pai_main_menu.js":66025,"./pai/pai_manifest":2983,"./pai/pai_manifest.js":2983,"./pai/pai_medrecords":40758,"./pai/pai_medrecords.js":40758,"./pai/pai_messenger":98599,"./pai/pai_messenger.js":98599,"./pai/pai_radio":50775,"./pai/pai_radio.js":50775,"./pai/pai_secrecords":48623,"./pai/pai_secrecords.js":48623,"./pai/pai_signaler":47297,"./pai/pai_signaler.js":47297,"./pda/pda_atmos_scan":78532,"./pda/pda_atmos_scan.js":78532,"./pda/pda_games":2395,"./pda/pda_games.js":2395,"./pda/pda_janitor":40253,"./pda/pda_janitor.js":40253,"./pda/pda_main_menu":58293,"./pda/pda_main_menu.js":58293,"./pda/pda_manifest":58059,"./pda/pda_manifest.js":58059,"./pda/pda_medical":18147,"./pda/pda_medical.js":18147,"./pda/pda_messenger":77595,"./pda/pda_messenger.js":77595,"./pda/pda_minesweeper":90382,"./pda/pda_minesweeper.js":90382,"./pda/pda_mule":24635,"./pda/pda_mule.js":24635,"./pda/pda_nanobank":23734,"./pda/pda_nanobank.js":23734,"./pda/pda_notes":97085,"./pda/pda_notes.js":97085,"./pda/pda_power":57513,"./pda/pda_power.js":57513,"./pda/pda_secbot":99808,"./pda/pda_secbot.js":99808,"./pda/pda_security":77168,"./pda/pda_security.js":77168,"./pda/pda_signaler":21773,"./pda/pda_signaler.js":21773,"./pda/pda_status_display":81857,"./pda/pda_status_display.js":81857,"./pda/pda_supplyrecords":70287,"./pda/pda_supplyrecords.js":70287};function a(o){var f=t(o);return n(f)}function t(o){if(!n.o(e,o)){var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}return e[o]}a.keys=function(){return Object.keys(e)},a.resolve=t,T.exports=a,a.id=32054},4085:function(T,r,n){var e={"./Blink.stories.js":51364,"./BlockQuote.stories.js":32453,"./Box.stories.js":83531,"./Button.stories.js":74198,"./ByondUi.stories.js":51956,"./Collapsible.stories.js":17466,"./Flex.stories.js":89241,"./ImageButton.stories.js":48779,"./Input.stories.js":21394,"./Popper.stories.js":43932,"./ProgressBar.stories.js":33270,"./Stack.stories.js":77766,"./Storage.stories.js":30187,"./Tabs.stories.js":46554,"./Themes.stories.js":53276,"./Tooltip.stories.js":28717};function a(o){var f=t(o);return n(f)}function t(o){if(!n.o(e,o)){var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}return e[o]}a.keys=function(){return Object.keys(e)},a.resolve=t,T.exports=a,a.id=4085},10320:function(T,r,n){"use strict";var e=n(55747),a=n(89393),t=TypeError;T.exports=function(o){if(e(o))return o;throw new t(a(o)+" is not a function")}},32606:function(T,r,n){"use strict";var e=n(1031),a=n(89393),t=TypeError;T.exports=function(o){if(e(o))return o;throw new t(a(o)+" is not a constructor")}},35908:function(T,r,n){"use strict";var e=n(45015),a=String,t=TypeError;T.exports=function(o){if(e(o))return o;throw new t("Can't set "+a(o)+" as a prototype")}},80575:function(T,r,n){"use strict";var e=n(24697),a=n(80674),t=n(74595).f,o=e("unscopables"),f=Array.prototype;f[o]===void 0&&t(f,o,{configurable:!0,value:a(null)}),T.exports=function(b){f[o][b]=!0}},35483:function(T,r,n){"use strict";var e=n(50233).charAt;T.exports=function(a,t,o){return t+(o?e(a,t).length:1)}},60077:function(T,r,n){"use strict";var e=n(21287),a=TypeError;T.exports=function(t,o){if(e(o,t))return t;throw new a("Incorrect invocation")}},30365:function(T,r,n){"use strict";var e=n(77568),a=String,t=TypeError;T.exports=function(o){if(e(o))return o;throw new t(a(o)+" is not an object")}},70377:function(T){"use strict";T.exports=typeof ArrayBuffer!="undefined"&&typeof DataView!="undefined"},3782:function(T,r,n){"use strict";var e=n(40033);T.exports=e(function(){if(typeof ArrayBuffer=="function"){var a=new ArrayBuffer(8);Object.isExtensible(a)&&Object.defineProperty(a,"a",{value:8})}})},4246:function(T,r,n){"use strict";var e=n(70377),a=n(58310),t=n(74685),o=n(55747),f=n(77568),b=n(45299),S=n(2281),B=n(89393),k=n(37909),g=n(55938),l=n(73936),c=n(21287),m=n(36917),i=n(76649),u=n(24697),s=n(16738),d=n(5419),v=d.enforce,C=d.get,h=t.Int8Array,p=h&&h.prototype,N=t.Uint8ClampedArray,V=N&&N.prototype,y=h&&m(h),I=p&&m(p),L=Object.prototype,w=t.TypeError,A=u("toStringTag"),x=s("TYPED_ARRAY_TAG"),E="TypedArrayConstructor",P=e&&!!i&&S(t.opera)!=="Opera",D=!1,M,R,O,F={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},_={BigInt64Array:8,BigUint64Array:8},U=function(){function ie(me){if(!f(me))return!1;var q=S(me);return q==="DataView"||b(F,q)||b(_,q)}return ie}(),z=function ie(me){var q=m(me);if(f(q)){var re=C(q);return re&&b(re,E)?re[E]:ie(q)}},$=function(me){if(!f(me))return!1;var q=S(me);return b(F,q)||b(_,q)},G=function(me){if($(me))return me;throw new w("Target is not a typed array")},X=function(me){if(o(me)&&(!i||c(y,me)))return me;throw new w(B(me)+" is not a typed array constructor")},J=function(me,q,re,ae){if(a){if(re)for(var le in F){var Z=t[le];if(Z&&b(Z.prototype,me))try{delete Z.prototype[me]}catch(ne){try{Z.prototype[me]=q}catch(te){}}}(!I[me]||re)&&g(I,me,re?q:P&&p[me]||q,ae)}},se=function(me,q,re){var ae,le;if(a){if(i){if(re){for(ae in F)if(le=t[ae],le&&b(le,me))try{delete le[me]}catch(Z){}}if(!y[me]||re)try{return g(y,me,re?q:P&&y[me]||q)}catch(Z){}else return}for(ae in F)le=t[ae],le&&(!le[me]||re)&&g(le,me,q)}};for(M in F)R=t[M],O=R&&R.prototype,O?v(O)[E]=R:P=!1;for(M in _)R=t[M],O=R&&R.prototype,O&&(v(O)[E]=R);if((!P||!o(y)||y===Function.prototype)&&(y=function(){function ie(){throw new w("Incorrect invocation")}return ie}(),P))for(M in F)t[M]&&i(t[M],y);if((!P||!I||I===L)&&(I=y.prototype,P))for(M in F)t[M]&&i(t[M].prototype,I);if(P&&m(V)!==I&&i(V,I),a&&!b(I,A)){D=!0,l(I,A,{configurable:!0,get:function(){function ie(){return f(this)?this[x]:void 0}return ie}()});for(M in F)t[M]&&k(t[M],x,M)}T.exports={NATIVE_ARRAY_BUFFER_VIEWS:P,TYPED_ARRAY_TAG:D&&x,aTypedArray:G,aTypedArrayConstructor:X,exportTypedArrayMethod:J,exportTypedArrayStaticMethod:se,getTypedArrayConstructor:z,isView:U,isTypedArray:$,TypedArray:y,TypedArrayPrototype:I}},37336:function(T,r,n){"use strict";var e=n(74685),a=n(67250),t=n(58310),o=n(70377),f=n(70520),b=n(37909),S=n(73936),B=n(30145),k=n(40033),g=n(60077),l=n(61365),c=n(10188),m=n(43806),i=n(95867),u=n(91784),s=n(36917),d=n(76649),v=n(88471),C=n(54602),h=n(5781),p=n(5774),N=n(84925),V=n(5419),y=f.PROPER,I=f.CONFIGURABLE,L="ArrayBuffer",w="DataView",A="prototype",x="Wrong length",E="Wrong index",P=V.getterFor(L),D=V.getterFor(w),M=V.set,R=e[L],O=R,F=O&&O[A],_=e[w],U=_&&_[A],z=Object.prototype,$=e.Array,G=e.RangeError,X=a(v),J=a([].reverse),se=u.pack,ie=u.unpack,me=function(Ne){return[Ne&255]},q=function(Ne){return[Ne&255,Ne>>8&255]},re=function(Ne){return[Ne&255,Ne>>8&255,Ne>>16&255,Ne>>24&255]},ae=function(Ne){return Ne[3]<<24|Ne[2]<<16|Ne[1]<<8|Ne[0]},le=function(Ne){return se(i(Ne),23,4)},Z=function(Ne){return se(Ne,52,8)},ne=function(Ne,Be,be){S(Ne[A],Be,{configurable:!0,get:function(){function Le(){return be(this)[Be]}return Le}()})},te=function(Ne,Be,be,Le){var we=D(Ne),xe=m(be),Re=!!Le;if(xe+Be>we.byteLength)throw new G(E);var He=we.bytes,ye=xe+we.byteOffset,de=C(He,ye,ye+Be);return Re?de:J(de)},fe=function(Ne,Be,be,Le,we,xe){var Re=D(Ne),He=m(be),ye=Le(+we),de=!!xe;if(He+Be>Re.byteLength)throw new G(E);for(var he=Re.bytes,ke=He+Re.byteOffset,ve=0;vewe)throw new G("Wrong offset");if(be=be===void 0?we-xe:c(be),xe+be>we)throw new G(x);M(this,{type:w,buffer:Ne,byteLength:be,byteOffset:xe,bytes:Le.bytes}),t||(this.buffer=Ne,this.byteLength=be,this.byteOffset=xe)}return Ce}(),U=_[A],t&&(ne(O,"byteLength",P),ne(_,"buffer",D),ne(_,"byteLength",D),ne(_,"byteOffset",D)),B(U,{getInt8:function(){function Ce(Ne){return te(this,1,Ne)[0]<<24>>24}return Ce}(),getUint8:function(){function Ce(Ne){return te(this,1,Ne)[0]}return Ce}(),getInt16:function(){function Ce(Ne){var Be=te(this,2,Ne,arguments.length>1?arguments[1]:!1);return(Be[1]<<8|Be[0])<<16>>16}return Ce}(),getUint16:function(){function Ce(Ne){var Be=te(this,2,Ne,arguments.length>1?arguments[1]:!1);return Be[1]<<8|Be[0]}return Ce}(),getInt32:function(){function Ce(Ne){return ae(te(this,4,Ne,arguments.length>1?arguments[1]:!1))}return Ce}(),getUint32:function(){function Ce(Ne){return ae(te(this,4,Ne,arguments.length>1?arguments[1]:!1))>>>0}return Ce}(),getFloat32:function(){function Ce(Ne){return ie(te(this,4,Ne,arguments.length>1?arguments[1]:!1),23)}return Ce}(),getFloat64:function(){function Ce(Ne){return ie(te(this,8,Ne,arguments.length>1?arguments[1]:!1),52)}return Ce}(),setInt8:function(){function Ce(Ne,Be){fe(this,1,Ne,me,Be)}return Ce}(),setUint8:function(){function Ce(Ne,Be){fe(this,1,Ne,me,Be)}return Ce}(),setInt16:function(){function Ce(Ne,Be){fe(this,2,Ne,q,Be,arguments.length>2?arguments[2]:!1)}return Ce}(),setUint16:function(){function Ce(Ne,Be){fe(this,2,Ne,q,Be,arguments.length>2?arguments[2]:!1)}return Ce}(),setInt32:function(){function Ce(Ne,Be){fe(this,4,Ne,re,Be,arguments.length>2?arguments[2]:!1)}return Ce}(),setUint32:function(){function Ce(Ne,Be){fe(this,4,Ne,re,Be,arguments.length>2?arguments[2]:!1)}return Ce}(),setFloat32:function(){function Ce(Ne,Be){fe(this,4,Ne,le,Be,arguments.length>2?arguments[2]:!1)}return Ce}(),setFloat64:function(){function Ce(Ne,Be){fe(this,8,Ne,Z,Be,arguments.length>2?arguments[2]:!1)}return Ce}()});else{var pe=y&&R.name!==L;!k(function(){R(1)})||!k(function(){new R(-1)})||k(function(){return new R,new R(1.5),new R(NaN),R.length!==1||pe&&!I})?(O=function(){function Ce(Ne){return g(this,F),h(new R(m(Ne)),this,O)}return Ce}(),O[A]=F,F.constructor=O,p(O,R)):pe&&I&&b(R,"name",L),d&&s(U)!==z&&d(U,z);var ce=new _(new O(2)),Ve=a(U.setInt8);ce.setInt8(0,2147483648),ce.setInt8(1,2147483649),(ce.getInt8(0)||!ce.getInt8(1))&&B(U,{setInt8:function(){function Ce(Ne,Be){Ve(this,Ne,Be<<24>>24)}return Ce}(),setUint8:function(){function Ce(Ne,Be){Ve(this,Ne,Be<<24>>24)}return Ce}()},{unsafe:!0})}N(O,L),N(_,w),T.exports={ArrayBuffer:O,DataView:_}},71447:function(T,r,n){"use strict";var e=n(46771),a=n(13912),t=n(24760),o=n(95108),f=Math.min;T.exports=[].copyWithin||function(){function b(S,B){var k=e(this),g=t(k),l=a(S,g),c=a(B,g),m=arguments.length>2?arguments[2]:void 0,i=f((m===void 0?g:a(m,g))-c,g-l),u=1;for(c0;)c in k?k[l]=k[c]:o(k,l),l+=u,c+=u;return k}return b}()},88471:function(T,r,n){"use strict";var e=n(46771),a=n(13912),t=n(24760);T.exports=function(){function o(f){for(var b=e(this),S=t(b),B=arguments.length,k=a(B>1?arguments[1]:void 0,S),g=B>2?arguments[2]:void 0,l=g===void 0?S:a(g,S);l>k;)b[k++]=f;return b}return o}()},35601:function(T,r,n){"use strict";var e=n(22603).forEach,a=n(55528),t=a("forEach");T.exports=t?[].forEach:function(){function o(f){return e(this,f,arguments.length>1?arguments[1]:void 0)}return o}()},78008:function(T,r,n){"use strict";var e=n(24760);T.exports=function(a,t,o){for(var f=0,b=arguments.length>2?o:e(t),S=new a(b);b>f;)S[f]=t[f++];return S}},73174:function(T,r,n){"use strict";var e=n(75754),a=n(91495),t=n(46771),o=n(40125),f=n(76571),b=n(1031),S=n(24760),B=n(60102),k=n(77455),g=n(59201),l=Array;T.exports=function(){function c(m){var i=t(m),u=b(this),s=arguments.length,d=s>1?arguments[1]:void 0,v=d!==void 0;v&&(d=e(d,s>2?arguments[2]:void 0));var C=g(i),h=0,p,N,V,y,I,L;if(C&&!(this===l&&f(C)))for(N=u?new this:[],y=k(i,C),I=y.next;!(V=a(I,y)).done;h++)L=v?o(y,d,[V.value,h],!0):V.value,B(N,h,L);else for(p=S(i),N=u?new this(p):l(p);p>h;h++)L=v?d(i[h],h):i[h],B(N,h,L);return N.length=h,N}return c}()},14211:function(T,r,n){"use strict";var e=n(57591),a=n(13912),t=n(24760),o=function(b){return function(S,B,k){var g=e(S),l=t(g);if(l===0)return!b&&-1;var c=a(k,l),m;if(b&&B!==B){for(;l>c;)if(m=g[c++],m!==m)return!0}else for(;l>c;c++)if((b||c in g)&&g[c]===B)return b||c||0;return!b&&-1}};T.exports={includes:o(!0),indexOf:o(!1)}},22603:function(T,r,n){"use strict";var e=n(75754),a=n(67250),t=n(37457),o=n(46771),f=n(24760),b=n(57823),S=a([].push),B=function(g){var l=g===1,c=g===2,m=g===3,i=g===4,u=g===6,s=g===7,d=g===5||u;return function(v,C,h,p){for(var N=o(v),V=t(N),y=f(V),I=e(C,h),L=0,w=p||b,A=l?w(v,y):c||s?w(v,0):void 0,x,E;y>L;L++)if((d||L in V)&&(x=V[L],E=I(x,L,N),g))if(l)A[L]=E;else if(E)switch(g){case 3:return!0;case 5:return x;case 6:return L;case 2:S(A,x)}else switch(g){case 4:return!1;case 7:S(A,x)}return u?-1:m||i?i:A}};T.exports={forEach:B(0),map:B(1),filter:B(2),some:B(3),every:B(4),find:B(5),findIndex:B(6),filterReject:B(7)}},1325:function(T,r,n){"use strict";var e=n(61267),a=n(57591),t=n(61365),o=n(24760),f=n(55528),b=Math.min,S=[].lastIndexOf,B=!!S&&1/[1].lastIndexOf(1,-0)<0,k=f("lastIndexOf"),g=B||!k;T.exports=g?function(){function l(c){if(B)return e(S,this,arguments)||0;var m=a(this),i=o(m);if(i===0)return-1;var u=i-1;for(arguments.length>1&&(u=b(u,t(arguments[1]))),u<0&&(u=i+u);u>=0;u--)if(u in m&&m[u]===c)return u||0;return-1}return l}():S},44091:function(T,r,n){"use strict";var e=n(40033),a=n(24697),t=n(5026),o=a("species");T.exports=function(f){return t>=51||!e(function(){var b=[],S=b.constructor={};return S[o]=function(){return{foo:1}},b[f](Boolean).foo!==1})}},55528:function(T,r,n){"use strict";var e=n(40033);T.exports=function(a,t){var o=[][a];return!!o&&e(function(){o.call(null,t||function(){return 1},1)})}},56844:function(T,r,n){"use strict";var e=n(10320),a=n(46771),t=n(37457),o=n(24760),f=TypeError,b="Reduce of empty array with no initial value",S=function(k){return function(g,l,c,m){var i=a(g),u=t(i),s=o(i);if(e(l),s===0&&c<2)throw new f(b);var d=k?s-1:0,v=k?-1:1;if(c<2)for(;;){if(d in u){m=u[d],d+=v;break}if(d+=v,k?d<0:s<=d)throw new f(b)}for(;k?d>=0:s>d;d+=v)d in u&&(m=l(m,u[d],d,i));return m}};T.exports={left:S(!1),right:S(!0)}},13345:function(T,r,n){"use strict";var e=n(58310),a=n(37386),t=TypeError,o=Object.getOwnPropertyDescriptor,f=e&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(b){return b instanceof TypeError}}();T.exports=f?function(b,S){if(a(b)&&!o(b,"length").writable)throw new t("Cannot set read only .length");return b.length=S}:function(b,S){return b.length=S}},54602:function(T,r,n){"use strict";var e=n(67250);T.exports=e([].slice)},90274:function(T,r,n){"use strict";var e=n(54602),a=Math.floor,t=function o(f,b){var S=f.length;if(S<8)for(var B=1,k,g;B0;)f[g]=f[--g];g!==B++&&(f[g]=k)}else for(var l=a(S/2),c=o(e(f,0,l),b),m=o(e(f,l),b),i=c.length,u=m.length,s=0,d=0;s1?arguments[1]:void 0),E;E=E?E.next:A.first;)for(x(E.value,E.key,this);E&&E.removed;)E=E.previous}return L}(),has:function(){function L(w){return!!I(this,w)}return L}()}),t(N,C?{get:function(){function L(w){var A=I(this,w);return A&&A.value}return L}(),set:function(){function L(w,A){return y(this,w===0?0:w,A)}return L}()}:{add:function(){function L(w){return y(this,w=w===0?0:w,w)}return L}()}),l&&a(N,"size",{configurable:!0,get:function(){function L(){return V(this).size}return L}()}),p}return s}(),setStrong:function(){function s(d,v,C){var h=v+" Iterator",p=u(v),N=u(h);B(d,v,function(V,y){i(this,{type:h,target:V,state:p(V),kind:y,last:void 0})},function(){for(var V=N(this),y=V.kind,I=V.last;I&&I.removed;)I=I.previous;return!V.target||!(V.last=I=I?I.next:V.state.first)?(V.target=void 0,k(void 0,!0)):k(y==="keys"?I.key:y==="values"?I.value:[I.key,I.value],!1)},C?"entries":"values",!C,!0),g(v)}return s}()}},39895:function(T,r,n){"use strict";var e=n(67250),a=n(30145),t=n(81969).getWeakData,o=n(60077),f=n(30365),b=n(42871),S=n(77568),B=n(49450),k=n(22603),g=n(45299),l=n(5419),c=l.set,m=l.getterFor,i=k.find,u=k.findIndex,s=e([].splice),d=0,v=function(N){return N.frozen||(N.frozen=new C)},C=function(){this.entries=[]},h=function(N,V){return i(N.entries,function(y){return y[0]===V})};C.prototype={get:function(){function p(N){var V=h(this,N);if(V)return V[1]}return p}(),has:function(){function p(N){return!!h(this,N)}return p}(),set:function(){function p(N,V){var y=h(this,N);y?y[1]=V:this.entries.push([N,V])}return p}(),delete:function(){function p(N){var V=u(this.entries,function(y){return y[0]===N});return~V&&s(this.entries,V,1),!!~V}return p}()},T.exports={getConstructor:function(){function p(N,V,y,I){var L=N(function(E,P){o(E,w),c(E,{type:V,id:d++,frozen:void 0}),b(P)||B(P,E[I],{that:E,AS_ENTRIES:y})}),w=L.prototype,A=m(V),x=function(){function E(P,D,M){var R=A(P),O=t(f(D),!0);return O===!0?v(R).set(D,M):O[R.id]=M,P}return E}();return a(w,{delete:function(){function E(P){var D=A(this);if(!S(P))return!1;var M=t(P);return M===!0?v(D).delete(P):M&&g(M,D.id)&&delete M[D.id]}return E}(),has:function(){function E(P){var D=A(this);if(!S(P))return!1;var M=t(P);return M===!0?v(D).has(P):M&&g(M,D.id)}return E}()}),a(w,y?{get:function(){function E(P){var D=A(this);if(S(P)){var M=t(P);return M===!0?v(D).get(P):M?M[D.id]:void 0}}return E}(),set:function(){function E(P,D){return x(this,P,D)}return E}()}:{add:function(){function E(P){return x(this,P,!0)}return E}()}),L}return p}()}},45150:function(T,r,n){"use strict";var e=n(63964),a=n(74685),t=n(67250),o=n(41314),f=n(55938),b=n(81969),S=n(49450),B=n(60077),k=n(55747),g=n(42871),l=n(77568),c=n(40033),m=n(92490),i=n(84925),u=n(5781);T.exports=function(s,d,v){var C=s.indexOf("Map")!==-1,h=s.indexOf("Weak")!==-1,p=C?"set":"add",N=a[s],V=N&&N.prototype,y=N,I={},L=function(R){var O=t(V[R]);f(V,R,R==="add"?function(){function F(_){return O(this,_===0?0:_),this}return F}():R==="delete"?function(F){return h&&!l(F)?!1:O(this,F===0?0:F)}:R==="get"?function(){function F(_){return h&&!l(_)?void 0:O(this,_===0?0:_)}return F}():R==="has"?function(){function F(_){return h&&!l(_)?!1:O(this,_===0?0:_)}return F}():function(){function F(_,U){return O(this,_===0?0:_,U),this}return F}())},w=o(s,!k(N)||!(h||V.forEach&&!c(function(){new N().entries().next()})));if(w)y=v.getConstructor(d,s,C,p),b.enable();else if(o(s,!0)){var A=new y,x=A[p](h?{}:-0,1)!==A,E=c(function(){A.has(1)}),P=m(function(M){new N(M)}),D=!h&&c(function(){for(var M=new N,R=5;R--;)M[p](R,R);return!M.has(-0)});P||(y=d(function(M,R){B(M,V);var O=u(new N,M,y);return g(R)||S(R,O[p],{that:O,AS_ENTRIES:C}),O}),y.prototype=V,V.constructor=y),(E||D)&&(L("delete"),L("has"),C&&L("get")),(D||x)&&L(p),h&&V.clear&&delete V.clear}return I[s]=y,e({global:!0,constructor:!0,forced:y!==N},I),i(y,s),h||v.setStrong(y,s,C),y}},5774:function(T,r,n){"use strict";var e=n(45299),a=n(97921),t=n(27193),o=n(74595);T.exports=function(f,b,S){for(var B=a(b),k=o.f,g=t.f,l=0;l"+g+""}},5959:function(T){"use strict";T.exports=function(r,n){return{value:r,done:n}}},37909:function(T,r,n){"use strict";var e=n(58310),a=n(74595),t=n(87458);T.exports=e?function(o,f,b){return a.f(o,f,t(1,b))}:function(o,f,b){return o[f]=b,o}},87458:function(T){"use strict";T.exports=function(r,n){return{enumerable:!(r&1),configurable:!(r&2),writable:!(r&4),value:n}}},60102:function(T,r,n){"use strict";var e=n(58310),a=n(74595),t=n(87458);T.exports=function(o,f,b){e?a.f(o,f,t(0,b)):o[f]=b}},67206:function(T,r,n){"use strict";var e=n(67250),a=n(40033),t=n(24051).start,o=RangeError,f=isFinite,b=Math.abs,S=Date.prototype,B=S.toISOString,k=e(S.getTime),g=e(S.getUTCDate),l=e(S.getUTCFullYear),c=e(S.getUTCHours),m=e(S.getUTCMilliseconds),i=e(S.getUTCMinutes),u=e(S.getUTCMonth),s=e(S.getUTCSeconds);T.exports=a(function(){return B.call(new Date(-50000000000001))!=="0385-07-25T07:06:39.999Z"})||!a(function(){B.call(new Date(NaN))})?function(){function d(){if(!f(k(this)))throw new o("Invalid time value");var v=this,C=l(v),h=m(v),p=C<0?"-":C>9999?"+":"";return p+t(b(C),p?6:4,0)+"-"+t(u(v)+1,2,0)+"-"+t(g(v),2,0)+"T"+t(c(v),2,0)+":"+t(i(v),2,0)+":"+t(s(v),2,0)+"."+t(h,3,0)+"Z"}return d}():B},10886:function(T,r,n){"use strict";var e=n(30365),a=n(13396),t=TypeError;T.exports=function(o){if(e(this),o==="string"||o==="default")o="string";else if(o!=="number")throw new t("Incorrect hint");return a(this,o)}},73936:function(T,r,n){"use strict";var e=n(20001),a=n(74595);T.exports=function(t,o,f){return f.get&&e(f.get,o,{getter:!0}),f.set&&e(f.set,o,{setter:!0}),a.f(t,o,f)}},55938:function(T,r,n){"use strict";var e=n(55747),a=n(74595),t=n(20001),o=n(18231);T.exports=function(f,b,S,B){B||(B={});var k=B.enumerable,g=B.name!==void 0?B.name:b;if(e(S)&&t(S,g,B),B.global)k?f[b]=S:o(b,S);else{try{B.unsafe?f[b]&&(k=!0):delete f[b]}catch(l){}k?f[b]=S:a.f(f,b,{value:S,enumerable:!1,configurable:!B.nonConfigurable,writable:!B.nonWritable})}return f}},30145:function(T,r,n){"use strict";var e=n(55938);T.exports=function(a,t,o){for(var f in t)e(a,f,t[f],o);return a}},18231:function(T,r,n){"use strict";var e=n(74685),a=Object.defineProperty;T.exports=function(t,o){try{a(e,t,{value:o,configurable:!0,writable:!0})}catch(f){e[t]=o}return o}},95108:function(T,r,n){"use strict";var e=n(89393),a=TypeError;T.exports=function(t,o){if(!delete t[o])throw new a("Cannot delete property "+e(o)+" of "+e(t))}},58310:function(T,r,n){"use strict";var e=n(40033);T.exports=!e(function(){return Object.defineProperty({},1,{get:function(){function a(){return 7}return a}()})[1]!==7})},12689:function(T,r,n){"use strict";var e=n(74685),a=n(77568),t=e.document,o=a(t)&&a(t.createElement);T.exports=function(f){return o?t.createElement(f):{}}},21291:function(T){"use strict";var r=TypeError,n=9007199254740991;T.exports=function(e){if(e>n)throw r("Maximum allowed index exceeded");return e}},652:function(T,r,n){"use strict";var e=n(63318),a=e.match(/firefox\/(\d+)/i);T.exports=!!a&&+a[1]},8180:function(T,r,n){"use strict";var e=n(73730),a=n(81702);T.exports=!e&&!a&&typeof window=="object"&&typeof document=="object"},49197:function(T){"use strict";T.exports=typeof Bun=="function"&&Bun&&typeof Bun.version=="string"},73730:function(T){"use strict";T.exports=typeof Deno=="object"&&Deno&&typeof Deno.version=="object"},19228:function(T,r,n){"use strict";var e=n(63318);T.exports=/MSIE|Trident/.test(e)},51802:function(T,r,n){"use strict";var e=n(63318);T.exports=/ipad|iphone|ipod/i.test(e)&&typeof Pebble!="undefined"},83433:function(T,r,n){"use strict";var e=n(63318);T.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(e)},81702:function(T,r,n){"use strict";var e=n(74685),a=n(7462);T.exports=a(e.process)==="process"},63383:function(T,r,n){"use strict";var e=n(63318);T.exports=/web0s(?!.*chrome)/i.test(e)},63318:function(T){"use strict";T.exports=typeof navigator!="undefined"&&String(navigator.userAgent)||""},5026:function(T,r,n){"use strict";var e=n(74685),a=n(63318),t=e.process,o=e.Deno,f=t&&t.versions||o&&o.version,b=f&&f.v8,S,B;b&&(S=b.split("."),B=S[0]>0&&S[0]<4?1:+(S[0]+S[1])),!B&&a&&(S=a.match(/Edge\/(\d+)/),(!S||S[1]>=74)&&(S=a.match(/Chrome\/(\d+)/),S&&(B=+S[1]))),T.exports=B},9342:function(T,r,n){"use strict";var e=n(63318),a=e.match(/AppleWebKit\/(\d+)\./);T.exports=!!a&&+a[1]},89453:function(T){"use strict";T.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},63964:function(T,r,n){"use strict";var e=n(74685),a=n(27193).f,t=n(37909),o=n(55938),f=n(18231),b=n(5774),S=n(41314);T.exports=function(B,k){var g=B.target,l=B.global,c=B.stat,m,i,u,s,d,v;if(l?i=e:c?i=e[g]||f(g,{}):i=e[g]&&e[g].prototype,i)for(u in k){if(d=k[u],B.dontCallGetSet?(v=a(i,u),s=v&&v.value):s=i[u],m=S(l?u:g+(c?".":"#")+u,B.forced),!m&&s!==void 0){if(typeof d==typeof s)continue;b(d,s)}(B.sham||s&&s.sham)&&t(d,"sham",!0),o(i,u,d,B)}}},40033:function(T){"use strict";T.exports=function(r){try{return!!r()}catch(n){return!0}}},79942:function(T,r,n){"use strict";n(79669);var e=n(91495),a=n(55938),t=n(14489),o=n(40033),f=n(24697),b=n(37909),S=f("species"),B=RegExp.prototype;T.exports=function(k,g,l,c){var m=f(k),i=!o(function(){var v={};return v[m]=function(){return 7},""[k](v)!==7}),u=i&&!o(function(){var v=!1,C=/a/;return k==="split"&&(C={},C.constructor={},C.constructor[S]=function(){return C},C.flags="",C[m]=/./[m]),C.exec=function(){return v=!0,null},C[m](""),!v});if(!i||!u||l){var s=/./[m],d=g(m,""[k],function(v,C,h,p,N){var V=C.exec;return V===t||V===B.exec?i&&!N?{done:!0,value:e(s,C,h,p)}:{done:!0,value:e(v,h,C,p)}:{done:!1}});a(String.prototype,k,d[0]),a(B,m,d[1])}c&&b(B[m],"sham",!0)}},65561:function(T,r,n){"use strict";var e=n(37386),a=n(24760),t=n(21291),o=n(75754),f=function b(S,B,k,g,l,c,m,i){for(var u=l,s=0,d=m?o(m,i):!1,v,C;s0&&e(v)?(C=a(v),u=b(S,B,v,C,u,c-1)-1):(t(u+1),S[u]=v),u++),s++;return u};T.exports=f},50730:function(T,r,n){"use strict";var e=n(40033);T.exports=!e(function(){return Object.isExtensible(Object.preventExtensions({}))})},61267:function(T,r,n){"use strict";var e=n(55050),a=Function.prototype,t=a.apply,o=a.call;T.exports=typeof Reflect=="object"&&Reflect.apply||(e?o.bind(t):function(){return o.apply(t,arguments)})},75754:function(T,r,n){"use strict";var e=n(71138),a=n(10320),t=n(55050),o=e(e.bind);T.exports=function(f,b){return a(f),b===void 0?f:t?o(f,b):function(){return f.apply(b,arguments)}}},55050:function(T,r,n){"use strict";var e=n(40033);T.exports=!e(function(){var a=function(){}.bind();return typeof a!="function"||a.hasOwnProperty("prototype")})},66284:function(T,r,n){"use strict";var e=n(67250),a=n(10320),t=n(77568),o=n(45299),f=n(54602),b=n(55050),S=Function,B=e([].concat),k=e([].join),g={},l=function(m,i,u){if(!o(g,i)){for(var s=[],d=0;d]*>)/g,B=/\$([$&'`]|\d{1,2})/g;T.exports=function(k,g,l,c,m,i){var u=l+k.length,s=c.length,d=B;return m!==void 0&&(m=a(m),d=S),f(i,d,function(v,C){var h;switch(o(C,0)){case"$":return"$";case"&":return k;case"`":return b(g,0,l);case"'":return b(g,u);case"<":h=m[b(C,1,-1)];break;default:var p=+C;if(p===0)return v;if(p>s){var N=t(p/10);return N===0?v:N<=s?c[N-1]===void 0?o(C,1):c[N-1]+o(C,1):v}h=c[p-1]}return h===void 0?"":h})}},74685:function(T,r,n){"use strict";var e=function(t){return t&&t.Math===Math&&t};T.exports=e(typeof globalThis=="object"&&globalThis)||e(typeof window=="object"&&window)||e(typeof self=="object"&&self)||e(typeof n.g=="object"&&n.g)||e(!1)||function(){return this}()||Function("return this")()},45299:function(T,r,n){"use strict";var e=n(67250),a=n(46771),t=e({}.hasOwnProperty);T.exports=Object.hasOwn||function(){function o(f,b){return t(a(f),b)}return o}()},79195:function(T){"use strict";T.exports={}},72259:function(T){"use strict";T.exports=function(r,n){try{arguments.length}catch(e){}}},5315:function(T,r,n){"use strict";var e=n(4009);T.exports=e("document","documentElement")},36223:function(T,r,n){"use strict";var e=n(58310),a=n(40033),t=n(12689);T.exports=!e&&!a(function(){return Object.defineProperty(t("div"),"a",{get:function(){function o(){return 7}return o}()}).a!==7})},91784:function(T){"use strict";var r=Array,n=Math.abs,e=Math.pow,a=Math.floor,t=Math.log,o=Math.LN2,f=function(B,k,g){var l=r(g),c=g*8-k-1,m=(1<>1,u=k===23?e(2,-24)-e(2,-77):0,s=B<0||B===0&&1/B<0?1:0,d=0,v,C,h;for(B=n(B),B!==B||B===1/0?(C=B!==B?1:0,v=m):(v=a(t(B)/o),h=e(2,-v),B*h<1&&(v--,h*=2),v+i>=1?B+=u/h:B+=u*e(2,1-i),B*h>=2&&(v++,h/=2),v+i>=m?(C=0,v=m):v+i>=1?(C=(B*h-1)*e(2,k),v+=i):(C=B*e(2,i-1)*e(2,k),v=0));k>=8;)l[d++]=C&255,C/=256,k-=8;for(v=v<0;)l[d++]=v&255,v/=256,c-=8;return l[--d]|=s*128,l},b=function(B,k){var g=B.length,l=g*8-k-1,c=(1<>1,i=l-7,u=g-1,s=B[u--],d=s&127,v;for(s>>=7;i>0;)d=d*256+B[u--],i-=8;for(v=d&(1<<-i)-1,d>>=-i,i+=k;i>0;)v=v*256+B[u--],i-=8;if(d===0)d=1-m;else{if(d===c)return v?NaN:s?-1/0:1/0;v+=e(2,k),d-=m}return(s?-1:1)*v*e(2,d-k)};T.exports={pack:f,unpack:b}},37457:function(T,r,n){"use strict";var e=n(67250),a=n(40033),t=n(7462),o=Object,f=e("".split);T.exports=a(function(){return!o("z").propertyIsEnumerable(0)})?function(b){return t(b)==="String"?f(b,""):o(b)}:o},5781:function(T,r,n){"use strict";var e=n(55747),a=n(77568),t=n(76649);T.exports=function(o,f,b){var S,B;return t&&e(S=f.constructor)&&S!==b&&a(B=S.prototype)&&B!==b.prototype&&t(o,B),o}},40492:function(T,r,n){"use strict";var e=n(67250),a=n(55747),t=n(40095),o=e(Function.toString);a(t.inspectSource)||(t.inspectSource=function(f){return o(f)}),T.exports=t.inspectSource},81969:function(T,r,n){"use strict";var e=n(63964),a=n(67250),t=n(79195),o=n(77568),f=n(45299),b=n(74595).f,S=n(37310),B=n(81644),k=n(81834),g=n(16738),l=n(50730),c=!1,m=g("meta"),i=0,u=function(N){b(N,m,{value:{objectID:"O"+i++,weakData:{}}})},s=function(N,V){if(!o(N))return typeof N=="symbol"?N:(typeof N=="string"?"S":"P")+N;if(!f(N,m)){if(!k(N))return"F";if(!V)return"E";u(N)}return N[m].objectID},d=function(N,V){if(!f(N,m)){if(!k(N))return!0;if(!V)return!1;u(N)}return N[m].weakData},v=function(N){return l&&c&&k(N)&&!f(N,m)&&u(N),N},C=function(){h.enable=function(){},c=!0;var N=S.f,V=a([].splice),y={};y[m]=1,N(y).length&&(S.f=function(I){for(var L=N(I),w=0,A=L.length;wI;I++)if(w=P(i[I]),w&&S(m,w))return w;return new c(!1)}V=B(i,y)}for(A=C?i.next:V.next;!(x=a(A,V)).done;){try{w=P(x.value)}catch(D){g(V,"throw",D)}if(typeof w=="object"&&w&&S(m,w))return w}return new c(!1)}},28649:function(T,r,n){"use strict";var e=n(91495),a=n(30365),t=n(78060);T.exports=function(o,f,b){var S,B;a(o);try{if(S=t(o,"return"),!S){if(f==="throw")throw b;return b}S=e(S,o)}catch(k){B=!0,S=k}if(f==="throw")throw b;if(B)throw S;return a(S),b}},5656:function(T,r,n){"use strict";var e=n(67635).IteratorPrototype,a=n(80674),t=n(87458),o=n(84925),f=n(83967),b=function(){return this};T.exports=function(S,B,k,g){var l=B+" Iterator";return S.prototype=a(e,{next:t(+!g,k)}),o(S,l,!1,!0),f[l]=b,S}},65574:function(T,r,n){"use strict";var e=n(63964),a=n(91495),t=n(4493),o=n(70520),f=n(55747),b=n(5656),S=n(36917),B=n(76649),k=n(84925),g=n(37909),l=n(55938),c=n(24697),m=n(83967),i=n(67635),u=o.PROPER,s=o.CONFIGURABLE,d=i.IteratorPrototype,v=i.BUGGY_SAFARI_ITERATORS,C=c("iterator"),h="keys",p="values",N="entries",V=function(){return this};T.exports=function(y,I,L,w,A,x,E){b(L,I,w);var P=function(X){if(X===A&&F)return F;if(!v&&X&&X in R)return R[X];switch(X){case h:return function(){function J(){return new L(this,X)}return J}();case p:return function(){function J(){return new L(this,X)}return J}();case N:return function(){function J(){return new L(this,X)}return J}()}return function(){return new L(this)}},D=I+" Iterator",M=!1,R=y.prototype,O=R[C]||R["@@iterator"]||A&&R[A],F=!v&&O||P(A),_=I==="Array"&&R.entries||O,U,z,$;if(_&&(U=S(_.call(new y)),U!==Object.prototype&&U.next&&(!t&&S(U)!==d&&(B?B(U,d):f(U[C])||l(U,C,V)),k(U,D,!0,!0),t&&(m[D]=V))),u&&A===p&&O&&O.name!==p&&(!t&&s?g(R,"name",p):(M=!0,F=function(){function G(){return a(O,this)}return G}())),A)if(z={values:P(p),keys:x?F:P(h),entries:P(N)},E)for($ in z)(v||M||!($ in R))&&l(R,$,z[$]);else e({target:I,proto:!0,forced:v||M},z);return(!t||E)&&R[C]!==F&&l(R,C,F,{name:A}),m[I]=F,z}},67635:function(T,r,n){"use strict";var e=n(40033),a=n(55747),t=n(77568),o=n(80674),f=n(36917),b=n(55938),S=n(24697),B=n(4493),k=S("iterator"),g=!1,l,c,m;[].keys&&(m=[].keys(),"next"in m?(c=f(f(m)),c!==Object.prototype&&(l=c)):g=!0);var i=!t(l)||e(function(){var u={};return l[k].call(u)!==u});i?l={}:B&&(l=o(l)),a(l[k])||b(l,k,function(){return this}),T.exports={IteratorPrototype:l,BUGGY_SAFARI_ITERATORS:g}},83967:function(T){"use strict";T.exports={}},24760:function(T,r,n){"use strict";var e=n(10188);T.exports=function(a){return e(a.length)}},20001:function(T,r,n){"use strict";var e=n(67250),a=n(40033),t=n(55747),o=n(45299),f=n(58310),b=n(70520).CONFIGURABLE,S=n(40492),B=n(5419),k=B.enforce,g=B.get,l=String,c=Object.defineProperty,m=e("".slice),i=e("".replace),u=e([].join),s=f&&!a(function(){return c(function(){},"length",{value:8}).length!==8}),d=String(String).split("String"),v=T.exports=function(C,h,p){m(l(h),0,7)==="Symbol("&&(h="["+i(l(h),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),p&&p.getter&&(h="get "+h),p&&p.setter&&(h="set "+h),(!o(C,"name")||b&&C.name!==h)&&(f?c(C,"name",{value:h,configurable:!0}):C.name=h),s&&p&&o(p,"arity")&&C.length!==p.arity&&c(C,"length",{value:p.arity});try{p&&o(p,"constructor")&&p.constructor?f&&c(C,"prototype",{writable:!1}):C.prototype&&(C.prototype=void 0)}catch(V){}var N=k(C);return o(N,"source")||(N.source=u(d,typeof h=="string"?h:"")),C};Function.prototype.toString=v(function(){function C(){return t(this)&&g(this).source||S(this)}return C}(),"toString")},82040:function(T){"use strict";var r=Math.expm1,n=Math.exp;T.exports=!r||r(10)>22025.465794806718||r(10)<22025.465794806718||r(-2e-17)!==-2e-17?function(){function e(a){var t=+a;return t===0?t:t>-1e-6&&t<1e-6?t+t*t/2:n(t)-1}return e}():r},14950:function(T,r,n){"use strict";var e=n(22172),a=Math.abs,t=2220446049250313e-31,o=1/t,f=function(S){return S+o-o};T.exports=function(b,S,B,k){var g=+b,l=a(g),c=e(g);if(lB||i!==i?c*(1/0):c*i}},95867:function(T,r,n){"use strict";var e=n(14950),a=11920928955078125e-23,t=34028234663852886e22,o=11754943508222875e-54;T.exports=Math.fround||function(){function f(b){return e(b,a,t,o)}return f}()},75002:function(T){"use strict";var r=Math.log,n=Math.LOG10E;T.exports=Math.log10||function(){function e(a){return r(a)*n}return e}()},90874:function(T){"use strict";var r=Math.log;T.exports=Math.log1p||function(){function n(e){var a=+e;return a>-1e-8&&a<1e-8?a-a*a/2:r(1+a)}return n}()},22172:function(T){"use strict";T.exports=Math.sign||function(){function r(n){var e=+n;return e===0||e!==e?e:e<0?-1:1}return r}()},21119:function(T){"use strict";var r=Math.ceil,n=Math.floor;T.exports=Math.trunc||function(){function e(a){var t=+a;return(t>0?n:r)(t)}return e}()},37713:function(T,r,n){"use strict";var e=n(74685),a=n(44915),t=n(75754),o=n(60375).set,f=n(9547),b=n(83433),S=n(51802),B=n(63383),k=n(81702),g=e.MutationObserver||e.WebKitMutationObserver,l=e.document,c=e.process,m=e.Promise,i=a("queueMicrotask"),u,s,d,v,C;if(!i){var h=new f,p=function(){var V,y;for(k&&(V=c.domain)&&V.exit();y=h.get();)try{y()}catch(I){throw h.head&&u(),I}V&&V.enter()};!b&&!k&&!B&&g&&l?(s=!0,d=l.createTextNode(""),new g(p).observe(d,{characterData:!0}),u=function(){d.data=s=!s}):!S&&m&&m.resolve?(v=m.resolve(void 0),v.constructor=m,C=t(v.then,v),u=function(){C(p)}):k?u=function(){c.nextTick(p)}:(o=t(o,e),u=function(){o(p)}),i=function(V){h.head||u(),h.add(V)}}T.exports=i},81837:function(T,r,n){"use strict";var e=n(10320),a=TypeError,t=function(f){var b,S;this.promise=new f(function(B,k){if(b!==void 0||S!==void 0)throw new a("Bad Promise constructor");b=B,S=k}),this.resolve=e(b),this.reject=e(S)};T.exports.f=function(o){return new t(o)}},86213:function(T,r,n){"use strict";var e=n(72586),a=TypeError;T.exports=function(t){if(e(t))throw new a("The method doesn't accept regular expressions");return t}},3294:function(T,r,n){"use strict";var e=n(74685),a=e.isFinite;T.exports=Number.isFinite||function(){function t(o){return typeof o=="number"&&a(o)}return t}()},28506:function(T,r,n){"use strict";var e=n(74685),a=n(40033),t=n(67250),o=n(12605),f=n(92648).trim,b=n(4198),S=t("".charAt),B=e.parseFloat,k=e.Symbol,g=k&&k.iterator,l=1/B(b+"-0")!==-1/0||g&&!a(function(){B(Object(g))});T.exports=l?function(){function c(m){var i=f(o(m)),u=B(i);return u===0&&S(i,0)==="-"?-0:u}return c}():B},13693:function(T,r,n){"use strict";var e=n(74685),a=n(40033),t=n(67250),o=n(12605),f=n(92648).trim,b=n(4198),S=e.parseInt,B=e.Symbol,k=B&&B.iterator,g=/^[+-]?0x/i,l=t(g.exec),c=S(b+"08")!==8||S(b+"0x16")!==22||k&&!a(function(){S(Object(k))});T.exports=c?function(){function m(i,u){var s=f(o(i));return S(s,u>>>0||(l(g,s)?16:10))}return m}():S},41143:function(T,r,n){"use strict";var e=n(58310),a=n(67250),t=n(91495),o=n(40033),f=n(18450),b=n(89235),S=n(12867),B=n(46771),k=n(37457),g=Object.assign,l=Object.defineProperty,c=a([].concat);T.exports=!g||o(function(){if(e&&g({b:1},g(l({},"a",{enumerable:!0,get:function(){function d(){l(this,"b",{value:3,enumerable:!1})}return d}()}),{b:2})).b!==1)return!0;var m={},i={},u=Symbol("assign detection"),s="abcdefghijklmnopqrst";return m[u]=7,s.split("").forEach(function(d){i[d]=d}),g({},m)[u]!==7||f(g({},i)).join("")!==s})?function(){function m(i,u){for(var s=B(i),d=arguments.length,v=1,C=b.f,h=S.f;d>v;)for(var p=k(arguments[v++]),N=C?c(f(p),C(p)):f(p),V=N.length,y=0,I;V>y;)I=N[y++],(!e||t(h,p,I))&&(s[I]=p[I]);return s}return m}():g},80674:function(T,r,n){"use strict";var e=n(30365),a=n(24239),t=n(89453),o=n(79195),f=n(5315),b=n(12689),S=n(19417),B=">",k="<",g="prototype",l="script",c=S("IE_PROTO"),m=function(){},i=function(h){return k+l+B+h+k+"/"+l+B},u=function(h){h.write(i("")),h.close();var p=h.parentWindow.Object;return h=null,p},s=function(){var h=b("iframe"),p="java"+l+":",N;return h.style.display="none",f.appendChild(h),h.src=String(p),N=h.contentWindow.document,N.open(),N.write(i("document.F=Object")),N.close(),N.F},d,v=function(){try{d=new ActiveXObject("htmlfile")}catch(p){}v=typeof document!="undefined"?document.domain&&d?u(d):s():u(d);for(var h=t.length;h--;)delete v[g][t[h]];return v()};o[c]=!0,T.exports=Object.create||function(){function C(h,p){var N;return h!==null?(m[g]=e(h),N=new m,m[g]=null,N[c]=h):N=v(),p===void 0?N:a.f(N,p)}return C}()},24239:function(T,r,n){"use strict";var e=n(58310),a=n(80944),t=n(74595),o=n(30365),f=n(57591),b=n(18450);r.f=e&&!a?Object.defineProperties:function(){function S(B,k){o(B);for(var g=f(k),l=b(k),c=l.length,m=0,i;c>m;)t.f(B,i=l[m++],g[i]);return B}return S}()},74595:function(T,r,n){"use strict";var e=n(58310),a=n(36223),t=n(80944),o=n(30365),f=n(767),b=TypeError,S=Object.defineProperty,B=Object.getOwnPropertyDescriptor,k="enumerable",g="configurable",l="writable";r.f=e?t?function(){function c(m,i,u){if(o(m),i=f(i),o(u),typeof m=="function"&&i==="prototype"&&"value"in u&&l in u&&!u[l]){var s=B(m,i);s&&s[l]&&(m[i]=u.value,u={configurable:g in u?u[g]:s[g],enumerable:k in u?u[k]:s[k],writable:!1})}return S(m,i,u)}return c}():S:function(){function c(m,i,u){if(o(m),i=f(i),o(u),a)try{return S(m,i,u)}catch(s){}if("get"in u||"set"in u)throw new b("Accessors not supported");return"value"in u&&(m[i]=u.value),m}return c}()},27193:function(T,r,n){"use strict";var e=n(58310),a=n(91495),t=n(12867),o=n(87458),f=n(57591),b=n(767),S=n(45299),B=n(36223),k=Object.getOwnPropertyDescriptor;r.f=e?k:function(){function g(l,c){if(l=f(l),c=b(c),B)try{return k(l,c)}catch(m){}if(S(l,c))return o(!a(t.f,l,c),l[c])}return g}()},81644:function(T,r,n){"use strict";var e=n(7462),a=n(57591),t=n(37310).f,o=n(54602),f=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],b=function(B){try{return t(B)}catch(k){return o(f)}};T.exports.f=function(){function S(B){return f&&e(B)==="Window"?b(B):t(a(B))}return S}()},37310:function(T,r,n){"use strict";var e=n(53726),a=n(89453),t=a.concat("length","prototype");r.f=Object.getOwnPropertyNames||function(){function o(f){return e(f,t)}return o}()},89235:function(T,r){"use strict";r.f=Object.getOwnPropertySymbols},36917:function(T,r,n){"use strict";var e=n(45299),a=n(55747),t=n(46771),o=n(19417),f=n(9225),b=o("IE_PROTO"),S=Object,B=S.prototype;T.exports=f?S.getPrototypeOf:function(k){var g=t(k);if(e(g,b))return g[b];var l=g.constructor;return a(l)&&g instanceof l?l.prototype:g instanceof S?B:null}},81834:function(T,r,n){"use strict";var e=n(40033),a=n(77568),t=n(7462),o=n(3782),f=Object.isExtensible,b=e(function(){f(1)});T.exports=b||o?function(){function S(B){return!a(B)||o&&t(B)==="ArrayBuffer"?!1:f?f(B):!0}return S}():f},21287:function(T,r,n){"use strict";var e=n(67250);T.exports=e({}.isPrototypeOf)},53726:function(T,r,n){"use strict";var e=n(67250),a=n(45299),t=n(57591),o=n(14211).indexOf,f=n(79195),b=e([].push);T.exports=function(S,B){var k=t(S),g=0,l=[],c;for(c in k)!a(f,c)&&a(k,c)&&b(l,c);for(;B.length>g;)a(k,c=B[g++])&&(~o(l,c)||b(l,c));return l}},18450:function(T,r,n){"use strict";var e=n(53726),a=n(89453);T.exports=Object.keys||function(){function t(o){return e(o,a)}return t}()},12867:function(T,r){"use strict";var n={}.propertyIsEnumerable,e=Object.getOwnPropertyDescriptor,a=e&&!n.call({1:2},1);r.f=a?function(){function t(o){var f=e(this,o);return!!f&&f.enumerable}return t}():n},57377:function(T,r,n){"use strict";var e=n(4493),a=n(74685),t=n(40033),o=n(9342);T.exports=e||!t(function(){if(!(o&&o<535)){var f=Math.random();__defineSetter__.call(null,f,function(){}),delete a[f]}})},76649:function(T,r,n){"use strict";var e=n(38656),a=n(77568),t=n(16952),o=n(35908);T.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var f=!1,b={},S;try{S=e(Object.prototype,"__proto__","set"),S(b,[]),f=b instanceof Array}catch(B){}return function(){function B(k,g){return t(k),o(g),a(k)&&(f?S(k,g):k.__proto__=g),k}return B}()}():void 0)},70915:function(T,r,n){"use strict";var e=n(58310),a=n(40033),t=n(67250),o=n(36917),f=n(18450),b=n(57591),S=n(12867).f,B=t(S),k=t([].push),g=e&&a(function(){var c=Object.create(null);return c[2]=2,!B(c,2)}),l=function(m){return function(i){for(var u=b(i),s=f(u),d=g&&o(u)===null,v=s.length,C=0,h=[],p;v>C;)p=s[C++],(!e||(d?p in u:B(u,p)))&&k(h,m?[p,u[p]]:u[p]);return h}};T.exports={entries:l(!0),values:l(!1)}},2509:function(T,r,n){"use strict";var e=n(2650),a=n(2281);T.exports=e?{}.toString:function(){function t(){return"[object "+a(this)+"]"}return t}()},13396:function(T,r,n){"use strict";var e=n(91495),a=n(55747),t=n(77568),o=TypeError;T.exports=function(f,b){var S,B;if(b==="string"&&a(S=f.toString)&&!t(B=e(S,f))||a(S=f.valueOf)&&!t(B=e(S,f))||b!=="string"&&a(S=f.toString)&&!t(B=e(S,f)))return B;throw new o("Can't convert object to primitive value")}},97921:function(T,r,n){"use strict";var e=n(4009),a=n(67250),t=n(37310),o=n(89235),f=n(30365),b=a([].concat);T.exports=e("Reflect","ownKeys")||function(){function S(B){var k=t.f(f(B)),g=o.f;return g?b(k,g(B)):k}return S}()},61765:function(T,r,n){"use strict";var e=n(74685);T.exports=e},10729:function(T){"use strict";T.exports=function(r){try{return{error:!1,value:r()}}catch(n){return{error:!0,value:n}}}},74854:function(T,r,n){"use strict";var e=n(74685),a=n(67512),t=n(55747),o=n(41314),f=n(40492),b=n(24697),S=n(8180),B=n(73730),k=n(4493),g=n(5026),l=a&&a.prototype,c=b("species"),m=!1,i=t(e.PromiseRejectionEvent),u=o("Promise",function(){var s=f(a),d=s!==String(a);if(!d&&g===66||k&&!(l.catch&&l.finally))return!0;if(!g||g<51||!/native code/.test(s)){var v=new a(function(p){p(1)}),C=function(N){N(function(){},function(){})},h=v.constructor={};if(h[c]=C,m=v.then(function(){})instanceof C,!m)return!0}return!d&&(S||B)&&!i});T.exports={CONSTRUCTOR:u,REJECTION_EVENT:i,SUBCLASSING:m}},67512:function(T,r,n){"use strict";var e=n(74685);T.exports=e.Promise},66628:function(T,r,n){"use strict";var e=n(30365),a=n(77568),t=n(81837);T.exports=function(o,f){if(e(o),a(f)&&f.constructor===o)return f;var b=t.f(o),S=b.resolve;return S(f),b.promise}},48199:function(T,r,n){"use strict";var e=n(67512),a=n(92490),t=n(74854).CONSTRUCTOR;T.exports=t||!a(function(o){e.all(o).then(void 0,function(){})})},34550:function(T,r,n){"use strict";var e=n(74595).f;T.exports=function(a,t,o){o in a||e(a,o,{configurable:!0,get:function(){function f(){return t[o]}return f}(),set:function(){function f(b){t[o]=b}return f}()})}},9547:function(T){"use strict";var r=function(){this.head=null,this.tail=null};r.prototype={add:function(){function n(e){var a={item:e,next:null},t=this.tail;t?t.next=a:this.head=a,this.tail=a}return n}(),get:function(){function n(){var e=this.head;if(e){var a=this.head=e.next;return a===null&&(this.tail=null),e.item}}return n}()},T.exports=r},28340:function(T,r,n){"use strict";var e=n(91495),a=n(30365),t=n(55747),o=n(7462),f=n(14489),b=TypeError;T.exports=function(S,B){var k=S.exec;if(t(k)){var g=e(k,S,B);return g!==null&&a(g),g}if(o(S)==="RegExp")return e(f,S,B);throw new b("RegExp#exec called on incompatible receiver")}},14489:function(T,r,n){"use strict";var e=n(91495),a=n(67250),t=n(12605),o=n(70901),f=n(62115),b=n(16639),S=n(80674),B=n(5419).get,k=n(39173),g=n(35688),l=b("native-string-replace",String.prototype.replace),c=RegExp.prototype.exec,m=c,i=a("".charAt),u=a("".indexOf),s=a("".replace),d=a("".slice),v=function(){var N=/a/,V=/b*/g;return e(c,N,"a"),e(c,V,"a"),N.lastIndex!==0||V.lastIndex!==0}(),C=f.BROKEN_CARET,h=/()??/.exec("")[1]!==void 0,p=v||h||C||k||g;p&&(m=function(){function N(V){var y=this,I=B(y),L=t(V),w=I.raw,A,x,E,P,D,M,R;if(w)return w.lastIndex=y.lastIndex,A=e(m,w,L),y.lastIndex=w.lastIndex,A;var O=I.groups,F=C&&y.sticky,_=e(o,y),U=y.source,z=0,$=L;if(F&&(_=s(_,"y",""),u(_,"g")===-1&&(_+="g"),$=d(L,y.lastIndex),y.lastIndex>0&&(!y.multiline||y.multiline&&i(L,y.lastIndex-1)!=="\n")&&(U="(?: "+U+")",$=" "+$,z++),x=new RegExp("^(?:"+U+")",_)),h&&(x=new RegExp("^"+U+"$(?!\\s)",_)),v&&(E=y.lastIndex),P=e(c,F?x:y,$),F?P?(P.input=d(P.input,z),P[0]=d(P[0],z),P.index=y.lastIndex,y.lastIndex+=P[0].length):y.lastIndex=0:v&&P&&(y.lastIndex=y.global?P.index+P[0].length:E),h&&P&&P.length>1&&e(l,P[0],x,function(){for(D=1;Db)","g");return o.exec("b").groups.a!=="b"||"b".replace(o,"$c")!=="bc"})},16952:function(T,r,n){"use strict";var e=n(42871),a=TypeError;T.exports=function(t){if(e(t))throw new a("Can't call method on "+t);return t}},44915:function(T,r,n){"use strict";var e=n(74685),a=n(58310),t=Object.getOwnPropertyDescriptor;T.exports=function(o){if(!a)return e[o];var f=t(e,o);return f&&f.value}},5700:function(T){"use strict";T.exports=Object.is||function(){function r(n,e){return n===e?n!==0||1/n===1/e:n!==n&&e!==e}return r}()},78362:function(T,r,n){"use strict";var e=n(74685),a=n(61267),t=n(55747),o=n(49197),f=n(63318),b=n(54602),S=n(24986),B=e.Function,k=/MSIE .\./.test(f)||o&&function(){var g=e.Bun.version.split(".");return g.length<3||g[0]==="0"&&(g[1]<3||g[1]==="3"&&g[2]==="0")}();T.exports=function(g,l){var c=l?2:1;return k?function(m,i){var u=S(arguments.length,1)>c,s=t(m)?m:B(m),d=u?b(arguments,c):[],v=u?function(){a(s,this,d)}:s;return l?g(v,i):g(v)}:g}},58491:function(T,r,n){"use strict";var e=n(4009),a=n(73936),t=n(24697),o=n(58310),f=t("species");T.exports=function(b){var S=e(b);o&&S&&!S[f]&&a(S,f,{configurable:!0,get:function(){function B(){return this}return B}()})}},84925:function(T,r,n){"use strict";var e=n(74595).f,a=n(45299),t=n(24697),o=t("toStringTag");T.exports=function(f,b,S){f&&!S&&(f=f.prototype),f&&!a(f,o)&&e(f,o,{configurable:!0,value:b})}},19417:function(T,r,n){"use strict";var e=n(16639),a=n(16738),t=e("keys");T.exports=function(o){return t[o]||(t[o]=a(o))}},40095:function(T,r,n){"use strict";var e=n(4493),a=n(74685),t=n(18231),o="__core-js_shared__",f=T.exports=a[o]||t(o,{});(f.versions||(f.versions=[])).push({version:"3.37.1",mode:e?"pure":"global",copyright:"\xA9 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.37.1/LICENSE",source:"https://github.com/zloirock/core-js"})},16639:function(T,r,n){"use strict";var e=n(40095);T.exports=function(a,t){return e[a]||(e[a]=t||{})}},28987:function(T,r,n){"use strict";var e=n(30365),a=n(32606),t=n(42871),o=n(24697),f=o("species");T.exports=function(b,S){var B=e(b).constructor,k;return B===void 0||t(k=e(B)[f])?S:a(k)}},88539:function(T,r,n){"use strict";var e=n(40033);T.exports=function(a){return e(function(){var t=""[a]('"');return t!==t.toLowerCase()||t.split('"').length>3})}},50233:function(T,r,n){"use strict";var e=n(67250),a=n(61365),t=n(12605),o=n(16952),f=e("".charAt),b=e("".charCodeAt),S=e("".slice),B=function(g){return function(l,c){var m=t(o(l)),i=a(c),u=m.length,s,d;return i<0||i>=u?g?"":void 0:(s=b(m,i),s<55296||s>56319||i+1===u||(d=b(m,i+1))<56320||d>57343?g?f(m,i):s:g?S(m,i,i+2):(s-55296<<10)+(d-56320)+65536)}};T.exports={codeAt:B(!1),charAt:B(!0)}},34125:function(T,r,n){"use strict";var e=n(63318);T.exports=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(e)},24051:function(T,r,n){"use strict";var e=n(67250),a=n(10188),t=n(12605),o=n(62443),f=n(16952),b=e(o),S=e("".slice),B=Math.ceil,k=function(l){return function(c,m,i){var u=t(f(c)),s=a(m),d=u.length,v=i===void 0?" ":t(i),C,h;return s<=d||v===""?u:(C=s-d,h=b(v,B(C/v.length)),h.length>C&&(h=S(h,0,C)),l?u+h:h+u)}};T.exports={start:k(!1),end:k(!0)}},62443:function(T,r,n){"use strict";var e=n(61365),a=n(12605),t=n(16952),o=RangeError;T.exports=function(){function f(b){var S=a(t(this)),B="",k=e(b);if(k<0||k===1/0)throw new o("Wrong number of repetitions");for(;k>0;(k>>>=1)&&(S+=S))k&1&&(B+=S);return B}return f}()},43476:function(T,r,n){"use strict";var e=n(92648).end,a=n(90012);T.exports=a("trimEnd")?function(){function t(){return e(this)}return t}():"".trimEnd},90012:function(T,r,n){"use strict";var e=n(70520).PROPER,a=n(40033),t=n(4198),o="\u200B\x85\u180E";T.exports=function(f){return a(function(){return!!t[f]()||o[f]()!==o||e&&t[f].name!==f})}},43885:function(T,r,n){"use strict";var e=n(92648).start,a=n(90012);T.exports=a("trimStart")?function(){function t(){return e(this)}return t}():"".trimStart},92648:function(T,r,n){"use strict";var e=n(67250),a=n(16952),t=n(12605),o=n(4198),f=e("".replace),b=RegExp("^["+o+"]+"),S=RegExp("(^|[^"+o+"])["+o+"]+$"),B=function(g){return function(l){var c=t(a(l));return g&1&&(c=f(c,b,"")),g&2&&(c=f(c,S,"$1")),c}};T.exports={start:B(1),end:B(2),trim:B(3)}},52357:function(T,r,n){"use strict";var e=n(5026),a=n(40033),t=n(74685),o=t.String;T.exports=!!Object.getOwnPropertySymbols&&!a(function(){var f=Symbol("symbol detection");return!o(f)||!(Object(f)instanceof Symbol)||!Symbol.sham&&e&&e<41})},52360:function(T,r,n){"use strict";var e=n(91495),a=n(4009),t=n(24697),o=n(55938);T.exports=function(){var f=a("Symbol"),b=f&&f.prototype,S=b&&b.valueOf,B=t("toPrimitive");b&&!b[B]&&o(b,B,function(k){return e(S,this)},{arity:1})}},66570:function(T,r,n){"use strict";var e=n(52357);T.exports=e&&!!Symbol.for&&!!Symbol.keyFor},60375:function(T,r,n){"use strict";var e=n(74685),a=n(61267),t=n(75754),o=n(55747),f=n(45299),b=n(40033),S=n(5315),B=n(54602),k=n(12689),g=n(24986),l=n(83433),c=n(81702),m=e.setImmediate,i=e.clearImmediate,u=e.process,s=e.Dispatch,d=e.Function,v=e.MessageChannel,C=e.String,h=0,p={},N="onreadystatechange",V,y,I,L;b(function(){V=e.location});var w=function(D){if(f(p,D)){var M=p[D];delete p[D],M()}},A=function(D){return function(){w(D)}},x=function(D){w(D.data)},E=function(D){e.postMessage(C(D),V.protocol+"//"+V.host)};(!m||!i)&&(m=function(){function P(D){g(arguments.length,1);var M=o(D)?D:d(D),R=B(arguments,1);return p[++h]=function(){a(M,void 0,R)},y(h),h}return P}(),i=function(){function P(D){delete p[D]}return P}(),c?y=function(D){u.nextTick(A(D))}:s&&s.now?y=function(D){s.now(A(D))}:v&&!l?(I=new v,L=I.port2,I.port1.onmessage=x,y=t(L.postMessage,L)):e.addEventListener&&o(e.postMessage)&&!e.importScripts&&V&&V.protocol!=="file:"&&!b(E)?(y=E,e.addEventListener("message",x,!1)):N in k("script")?y=function(D){S.appendChild(k("script"))[N]=function(){S.removeChild(this),w(D)}}:y=function(D){setTimeout(A(D),0)}),T.exports={set:m,clear:i}},46438:function(T,r,n){"use strict";var e=n(67250);T.exports=e(1 .valueOf)},13912:function(T,r,n){"use strict";var e=n(61365),a=Math.max,t=Math.min;T.exports=function(o,f){var b=e(o);return b<0?a(b+f,0):t(b,f)}},61484:function(T,r,n){"use strict";var e=n(24843),a=TypeError;T.exports=function(t){var o=e(t,"number");if(typeof o=="number")throw new a("Can't convert number to bigint");return BigInt(o)}},43806:function(T,r,n){"use strict";var e=n(61365),a=n(10188),t=RangeError;T.exports=function(o){if(o===void 0)return 0;var f=e(o),b=a(f);if(f!==b)throw new t("Wrong length or index");return b}},57591:function(T,r,n){"use strict";var e=n(37457),a=n(16952);T.exports=function(t){return e(a(t))}},61365:function(T,r,n){"use strict";var e=n(21119);T.exports=function(a){var t=+a;return t!==t||t===0?0:e(t)}},10188:function(T,r,n){"use strict";var e=n(61365),a=Math.min;T.exports=function(t){var o=e(t);return o>0?a(o,9007199254740991):0}},46771:function(T,r,n){"use strict";var e=n(16952),a=Object;T.exports=function(t){return a(e(t))}},56043:function(T,r,n){"use strict";var e=n(16140),a=RangeError;T.exports=function(t,o){var f=e(t);if(f%o)throw new a("Wrong offset");return f}},16140:function(T,r,n){"use strict";var e=n(61365),a=RangeError;T.exports=function(t){var o=e(t);if(o<0)throw new a("The argument can't be less than 0");return o}},24843:function(T,r,n){"use strict";var e=n(91495),a=n(77568),t=n(71399),o=n(78060),f=n(13396),b=n(24697),S=TypeError,B=b("toPrimitive");T.exports=function(k,g){if(!a(k)||t(k))return k;var l=o(k,B),c;if(l){if(g===void 0&&(g="default"),c=e(l,k,g),!a(c)||t(c))return c;throw new S("Can't convert object to primitive value")}return g===void 0&&(g="number"),f(k,g)}},767:function(T,r,n){"use strict";var e=n(24843),a=n(71399);T.exports=function(t){var o=e(t,"string");return a(o)?o:o+""}},2650:function(T,r,n){"use strict";var e=n(24697),a=e("toStringTag"),t={};t[a]="z",T.exports=String(t)==="[object z]"},12605:function(T,r,n){"use strict";var e=n(2281),a=String;T.exports=function(t){if(e(t)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return a(t)}},15409:function(T){"use strict";var r=Math.round;T.exports=function(n){var e=r(n);return e<0?0:e>255?255:e&255}},89393:function(T){"use strict";var r=String;T.exports=function(n){try{return r(n)}catch(e){return"Object"}}},80185:function(T,r,n){"use strict";var e=n(63964),a=n(74685),t=n(91495),o=n(58310),f=n(86563),b=n(4246),S=n(37336),B=n(60077),k=n(87458),g=n(37909),l=n(5841),c=n(10188),m=n(43806),i=n(56043),u=n(15409),s=n(767),d=n(45299),v=n(2281),C=n(77568),h=n(71399),p=n(80674),N=n(21287),V=n(76649),y=n(37310).f,I=n(3805),L=n(22603).forEach,w=n(58491),A=n(73936),x=n(74595),E=n(27193),P=n(78008),D=n(5419),M=n(5781),R=D.get,O=D.set,F=D.enforce,_=x.f,U=E.f,z=a.RangeError,$=S.ArrayBuffer,G=$.prototype,X=S.DataView,J=b.NATIVE_ARRAY_BUFFER_VIEWS,se=b.TYPED_ARRAY_TAG,ie=b.TypedArray,me=b.TypedArrayPrototype,q=b.isTypedArray,re="BYTES_PER_ELEMENT",ae="Wrong length",le=function(ce,Ve){A(ce,Ve,{configurable:!0,get:function(){function Ce(){return R(this)[Ve]}return Ce}()})},Z=function(ce){var Ve;return N(G,ce)||(Ve=v(ce))==="ArrayBuffer"||Ve==="SharedArrayBuffer"},ne=function(ce,Ve){return q(ce)&&!h(Ve)&&Ve in ce&&l(+Ve)&&Ve>=0},te=function(){function pe(ce,Ve){return Ve=s(Ve),ne(ce,Ve)?k(2,ce[Ve]):U(ce,Ve)}return pe}(),fe=function(){function pe(ce,Ve,Ce){return Ve=s(Ve),ne(ce,Ve)&&C(Ce)&&d(Ce,"value")&&!d(Ce,"get")&&!d(Ce,"set")&&!Ce.configurable&&(!d(Ce,"writable")||Ce.writable)&&(!d(Ce,"enumerable")||Ce.enumerable)?(ce[Ve]=Ce.value,ce):_(ce,Ve,Ce)}return pe}();o?(J||(E.f=te,x.f=fe,le(me,"buffer"),le(me,"byteOffset"),le(me,"byteLength"),le(me,"length")),e({target:"Object",stat:!0,forced:!J},{getOwnPropertyDescriptor:te,defineProperty:fe}),T.exports=function(pe,ce,Ve){var Ce=pe.match(/\d+/)[0]/8,Ne=pe+(Ve?"Clamped":"")+"Array",Be="get"+pe,be="set"+pe,Le=a[Ne],we=Le,xe=we&&we.prototype,Re={},He=function(ve,Se){var Pe=R(ve);return Pe.view[Be](Se*Ce+Pe.byteOffset,!0)},ye=function(ve,Se,Pe){var je=R(ve);je.view[be](Se*Ce+je.byteOffset,Ve?u(Pe):Pe,!0)},de=function(ve,Se){_(ve,Se,{get:function(){function Pe(){return He(this,Se)}return Pe}(),set:function(){function Pe(je){return ye(this,Se,je)}return Pe}(),enumerable:!0})};J?f&&(we=ce(function(ke,ve,Se,Pe){return B(ke,xe),M(function(){return C(ve)?Z(ve)?Pe!==void 0?new Le(ve,i(Se,Ce),Pe):Se!==void 0?new Le(ve,i(Se,Ce)):new Le(ve):q(ve)?P(we,ve):t(I,we,ve):new Le(m(ve))}(),ke,we)}),V&&V(we,ie),L(y(Le),function(ke){ke in we||g(we,ke,Le[ke])}),we.prototype=xe):(we=ce(function(ke,ve,Se,Pe){B(ke,xe);var je=0,Fe=0,ze,We,Ue;if(!C(ve))Ue=m(ve),We=Ue*Ce,ze=new $(We);else if(Z(ve)){ze=ve,Fe=i(Se,Ce);var Xe=ve.byteLength;if(Pe===void 0){if(Xe%Ce)throw new z(ae);if(We=Xe-Fe,We<0)throw new z(ae)}else if(We=c(Pe)*Ce,We+Fe>Xe)throw new z(ae);Ue=We/Ce}else return q(ve)?P(we,ve):t(I,we,ve);for(O(ke,{buffer:ze,byteOffset:Fe,byteLength:We,length:Ue,view:new X(ze)});je1?arguments[1]:void 0,v=d!==void 0,C=S(u),h,p,N,V,y,I,L,w;if(C&&!B(C))for(L=b(u,C),w=L.next,u=[];!(I=a(w,L)).done;)u.push(I.value);for(v&&s>2&&(d=e(d,arguments[2])),p=f(u),N=new(g(i))(p),V=k(N),h=0;p>h;h++)y=v?d(u[h],h):u[h],N[h]=V?l(y):+y;return N}return c}()},31082:function(T,r,n){"use strict";var e=n(4246),a=n(28987),t=e.aTypedArrayConstructor,o=e.getTypedArrayConstructor;T.exports=function(f){return t(a(f,o(f)))}},16738:function(T,r,n){"use strict";var e=n(67250),a=0,t=Math.random(),o=e(1 .toString);T.exports=function(f){return"Symbol("+(f===void 0?"":f)+")_"+o(++a+t,36)}},1062:function(T,r,n){"use strict";var e=n(52357);T.exports=e&&!Symbol.sham&&typeof Symbol.iterator=="symbol"},80944:function(T,r,n){"use strict";var e=n(58310),a=n(40033);T.exports=e&&a(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42})},24986:function(T){"use strict";var r=TypeError;T.exports=function(n,e){if(n=51||!a(function(){var d=[];return d[m]=!1,d.concat()[0]!==d}),u=function(v){if(!o(v))return!1;var C=v[m];return C!==void 0?!!C:t(v)},s=!i||!g("concat");e({target:"Array",proto:!0,arity:1,forced:s},{concat:function(){function d(v){var C=f(this),h=k(C,0),p=0,N,V,y,I,L;for(N=-1,y=arguments.length;N1?arguments[1]:void 0)}return f}()})},68933:function(T,r,n){"use strict";var e=n(63964),a=n(88471),t=n(80575);e({target:"Array",proto:!0},{fill:a}),t("fill")},47830:function(T,r,n){"use strict";var e=n(63964),a=n(22603).filter,t=n(44091),o=t("filter");e({target:"Array",proto:!0,forced:!o},{filter:function(){function f(b){return a(this,b,arguments.length>1?arguments[1]:void 0)}return f}()})},64094:function(T,r,n){"use strict";var e=n(63964),a=n(22603).findIndex,t=n(80575),o="findIndex",f=!0;o in[]&&Array(1)[o](function(){f=!1}),e({target:"Array",proto:!0,forced:f},{findIndex:function(){function b(S){return a(this,S,arguments.length>1?arguments[1]:void 0)}return b}()}),t(o)},13455:function(T,r,n){"use strict";var e=n(63964),a=n(22603).find,t=n(80575),o="find",f=!0;o in[]&&Array(1)[o](function(){f=!1}),e({target:"Array",proto:!0,forced:f},{find:function(){function b(S){return a(this,S,arguments.length>1?arguments[1]:void 0)}return b}()}),t(o)},32384:function(T,r,n){"use strict";var e=n(63964),a=n(65561),t=n(10320),o=n(46771),f=n(24760),b=n(57823);e({target:"Array",proto:!0},{flatMap:function(){function S(B){var k=o(this),g=f(k),l;return t(B),l=b(k,0),l.length=a(l,k,k,g,0,1,B,arguments.length>1?arguments[1]:void 0),l}return S}()})},61915:function(T,r,n){"use strict";var e=n(63964),a=n(65561),t=n(46771),o=n(24760),f=n(61365),b=n(57823);e({target:"Array",proto:!0},{flat:function(){function S(){var B=arguments.length?arguments[0]:void 0,k=t(this),g=o(k),l=b(k,0);return l.length=a(l,k,k,g,0,B===void 0?1:f(B)),l}return S}()})},25579:function(T,r,n){"use strict";var e=n(63964),a=n(35601);e({target:"Array",proto:!0,forced:[].forEach!==a},{forEach:a})},63532:function(T,r,n){"use strict";var e=n(63964),a=n(73174),t=n(92490),o=!t(function(f){Array.from(f)});e({target:"Array",stat:!0,forced:o},{from:a})},33425:function(T,r,n){"use strict";var e=n(63964),a=n(14211).includes,t=n(40033),o=n(80575),f=t(function(){return!Array(1).includes()});e({target:"Array",proto:!0,forced:f},{includes:function(){function b(S){return a(this,S,arguments.length>1?arguments[1]:void 0)}return b}()}),o("includes")},43894:function(T,r,n){"use strict";var e=n(63964),a=n(71138),t=n(14211).indexOf,o=n(55528),f=a([].indexOf),b=!!f&&1/f([1],1,-0)<0,S=b||!o("indexOf");e({target:"Array",proto:!0,forced:S},{indexOf:function(){function B(k){var g=arguments.length>1?arguments[1]:void 0;return b?f(this,k,g)||0:t(this,k,g)}return B}()})},99636:function(T,r,n){"use strict";var e=n(63964),a=n(37386);e({target:"Array",stat:!0},{isArray:a})},34570:function(T,r,n){"use strict";var e=n(57591),a=n(80575),t=n(83967),o=n(5419),f=n(74595).f,b=n(65574),S=n(5959),B=n(4493),k=n(58310),g="Array Iterator",l=o.set,c=o.getterFor(g);T.exports=b(Array,"Array",function(i,u){l(this,{type:g,target:e(i),index:0,kind:u})},function(){var i=c(this),u=i.target,s=i.index++;if(!u||s>=u.length)return i.target=void 0,S(void 0,!0);switch(i.kind){case"keys":return S(s,!1);case"values":return S(u[s],!1)}return S([s,u[s]],!1)},"values");var m=t.Arguments=t.Array;if(a("keys"),a("values"),a("entries"),!B&&k&&m.name!=="values")try{f(m,"name",{value:"values"})}catch(i){}},94432:function(T,r,n){"use strict";var e=n(63964),a=n(67250),t=n(37457),o=n(57591),f=n(55528),b=a([].join),S=t!==Object,B=S||!f("join",",");e({target:"Array",proto:!0,forced:B},{join:function(){function k(g){return b(o(this),g===void 0?",":g)}return k}()})},24683:function(T,r,n){"use strict";var e=n(63964),a=n(1325);e({target:"Array",proto:!0,forced:a!==[].lastIndexOf},{lastIndexOf:a})},69984:function(T,r,n){"use strict";var e=n(63964),a=n(22603).map,t=n(44091),o=t("map");e({target:"Array",proto:!0,forced:!o},{map:function(){function f(b){return a(this,b,arguments.length>1?arguments[1]:void 0)}return f}()})},32089:function(T,r,n){"use strict";var e=n(63964),a=n(40033),t=n(1031),o=n(60102),f=Array,b=a(function(){function S(){}return!(f.of.call(S)instanceof S)});e({target:"Array",stat:!0,forced:b},{of:function(){function S(){for(var B=0,k=arguments.length,g=new(t(this)?this:f)(k);k>B;)o(g,B,arguments[B++]);return g.length=k,g}return S}()})},29645:function(T,r,n){"use strict";var e=n(63964),a=n(56844).right,t=n(55528),o=n(5026),f=n(81702),b=!f&&o>79&&o<83,S=b||!t("reduceRight");e({target:"Array",proto:!0,forced:S},{reduceRight:function(){function B(k){return a(this,k,arguments.length,arguments.length>1?arguments[1]:void 0)}return B}()})},60206:function(T,r,n){"use strict";var e=n(63964),a=n(56844).left,t=n(55528),o=n(5026),f=n(81702),b=!f&&o>79&&o<83,S=b||!t("reduce");e({target:"Array",proto:!0,forced:S},{reduce:function(){function B(k){var g=arguments.length;return a(this,k,g,g>1?arguments[1]:void 0)}return B}()})},4788:function(T,r,n){"use strict";var e=n(63964),a=n(67250),t=n(37386),o=a([].reverse),f=[1,2];e({target:"Array",proto:!0,forced:String(f)===String(f.reverse())},{reverse:function(){function b(){return t(this)&&(this.length=this.length),o(this)}return b}()})},58672:function(T,r,n){"use strict";var e=n(63964),a=n(37386),t=n(1031),o=n(77568),f=n(13912),b=n(24760),S=n(57591),B=n(60102),k=n(24697),g=n(44091),l=n(54602),c=g("slice"),m=k("species"),i=Array,u=Math.max;e({target:"Array",proto:!0,forced:!c},{slice:function(){function s(d,v){var C=S(this),h=b(C),p=f(d,h),N=f(v===void 0?h:v,h),V,y,I;if(a(C)&&(V=C.constructor,t(V)&&(V===i||a(V.prototype))?V=void 0:o(V)&&(V=V[m],V===null&&(V=void 0)),V===i||V===void 0))return l(C,p,N);for(y=new(V===void 0?i:V)(u(N-p,0)),I=0;p1?arguments[1]:void 0)}return f}()})},48968:function(T,r,n){"use strict";var e=n(63964),a=n(67250),t=n(10320),o=n(46771),f=n(24760),b=n(95108),S=n(12605),B=n(40033),k=n(90274),g=n(55528),l=n(652),c=n(19228),m=n(5026),i=n(9342),u=[],s=a(u.sort),d=a(u.push),v=B(function(){u.sort(void 0)}),C=B(function(){u.sort(null)}),h=g("sort"),p=!B(function(){if(m)return m<70;if(!(l&&l>3)){if(c)return!0;if(i)return i<603;var y="",I,L,w,A;for(I=65;I<76;I++){switch(L=String.fromCharCode(I),I){case 66:case 69:case 70:case 72:w=3;break;case 68:case 71:w=4;break;default:w=2}for(A=0;A<47;A++)u.push({k:L+A,v:w})}for(u.sort(function(x,E){return E.v-x.v}),A=0;AS(w)?1:-1}};e({target:"Array",proto:!0,forced:N},{sort:function(){function y(I){I!==void 0&&t(I);var L=o(this);if(p)return I===void 0?s(L):s(L,I);var w=[],A=f(L),x,E;for(E=0;EC-V+N;I--)g(v,I-1)}else if(N>V)for(I=C-V;I>h;I--)L=I+V-1,w=I+N-1,L in v?v[w]=v[L]:g(v,w);for(I=0;I9490626562425156e-8?o(g)+b:a(g-1+f(g-1)*f(g+1))}return B}()})},59660:function(T,r,n){"use strict";var e=n(63964),a=Math.asinh,t=Math.log,o=Math.sqrt;function f(S){var B=+S;return!isFinite(B)||B===0?B:B<0?-f(-B):t(B+o(B*B+1))}var b=!(a&&1/a(0)>0);e({target:"Math",stat:!0,forced:b},{asinh:f})},15383:function(T,r,n){"use strict";var e=n(63964),a=Math.atanh,t=Math.log,o=!(a&&1/a(-0)<0);e({target:"Math",stat:!0,forced:o},{atanh:function(){function f(b){var S=+b;return S===0?S:t((1+S)/(1-S))/2}return f}()})},92866:function(T,r,n){"use strict";var e=n(63964),a=n(22172),t=Math.abs,o=Math.pow;e({target:"Math",stat:!0},{cbrt:function(){function f(b){var S=+b;return a(S)*o(t(S),.3333333333333333)}return f}()})},86107:function(T,r,n){"use strict";var e=n(63964),a=Math.floor,t=Math.log,o=Math.LOG2E;e({target:"Math",stat:!0},{clz32:function(){function f(b){var S=b>>>0;return S?31-a(t(S+.5)*o):32}return f}()})},29248:function(T,r,n){"use strict";var e=n(63964),a=n(82040),t=Math.cosh,o=Math.abs,f=Math.E,b=!t||t(710)===1/0;e({target:"Math",stat:!0,forced:b},{cosh:function(){function S(B){var k=a(o(B)-1)+1;return(k+1/(k*f*f))*(f/2)}return S}()})},52540:function(T,r,n){"use strict";var e=n(63964),a=n(82040);e({target:"Math",stat:!0,forced:a!==Math.expm1},{expm1:a})},79007:function(T,r,n){"use strict";var e=n(63964),a=n(95867);e({target:"Math",stat:!0},{fround:a})},77199:function(T,r,n){"use strict";var e=n(63964),a=Math.hypot,t=Math.abs,o=Math.sqrt,f=!!a&&a(1/0,NaN)!==1/0;e({target:"Math",stat:!0,arity:2,forced:f},{hypot:function(){function b(S,B){for(var k=0,g=0,l=arguments.length,c=0,m,i;g0?(i=m/c,k+=i*i):k+=m;return c===1/0?1/0:c*o(k)}return b}()})},6522:function(T,r,n){"use strict";var e=n(63964),a=n(40033),t=Math.imul,o=a(function(){return t(4294967295,5)!==-5||t.length!==2});e({target:"Math",stat:!0,forced:o},{imul:function(){function f(b,S){var B=65535,k=+b,g=+S,l=B&k,c=B&g;return 0|l*c+((B&k>>>16)*c+l*(B&g>>>16)<<16>>>0)}return f}()})},95542:function(T,r,n){"use strict";var e=n(63964),a=n(75002);e({target:"Math",stat:!0},{log10:a})},2966:function(T,r,n){"use strict";var e=n(63964),a=n(90874);e({target:"Math",stat:!0},{log1p:a})},20997:function(T,r,n){"use strict";var e=n(63964),a=Math.log,t=Math.LN2;e({target:"Math",stat:!0},{log2:function(){function o(f){return a(f)/t}return o}()})},57400:function(T,r,n){"use strict";var e=n(63964),a=n(22172);e({target:"Math",stat:!0},{sign:a})},45571:function(T,r,n){"use strict";var e=n(63964),a=n(40033),t=n(82040),o=Math.abs,f=Math.exp,b=Math.E,S=a(function(){return Math.sinh(-2e-17)!==-2e-17});e({target:"Math",stat:!0,forced:S},{sinh:function(){function B(k){var g=+k;return o(g)<1?(t(g)-t(-g))/2:(f(g-1)-f(-g-1))*(b/2)}return B}()})},54800:function(T,r,n){"use strict";var e=n(63964),a=n(82040),t=Math.exp;e({target:"Math",stat:!0},{tanh:function(){function o(f){var b=+f,S=a(b),B=a(-b);return S===1/0?1:B===1/0?-1:(S-B)/(t(b)+t(-b))}return o}()})},15709:function(T,r,n){"use strict";var e=n(84925);e(Math,"Math",!0)},76059:function(T,r,n){"use strict";var e=n(63964),a=n(21119);e({target:"Math",stat:!0},{trunc:a})},96614:function(T,r,n){"use strict";var e=n(63964),a=n(4493),t=n(58310),o=n(74685),f=n(61765),b=n(67250),S=n(41314),B=n(45299),k=n(5781),g=n(21287),l=n(71399),c=n(24843),m=n(40033),i=n(37310).f,u=n(27193).f,s=n(74595).f,d=n(46438),v=n(92648).trim,C="Number",h=o[C],p=f[C],N=h.prototype,V=o.TypeError,y=b("".slice),I=b("".charCodeAt),L=function(M){var R=c(M,"number");return typeof R=="bigint"?R:w(R)},w=function(M){var R=c(M,"number"),O,F,_,U,z,$,G,X;if(l(R))throw new V("Cannot convert a Symbol value to a number");if(typeof R=="string"&&R.length>2){if(R=v(R),O=I(R,0),O===43||O===45){if(F=I(R,2),F===88||F===120)return NaN}else if(O===48){switch(I(R,1)){case 66:case 98:_=2,U=49;break;case 79:case 111:_=8,U=55;break;default:return+R}for(z=y(R,2),$=z.length,G=0;G<$;G++)if(X=I(z,G),X<48||X>U)return NaN;return parseInt(z,_)}}return+R},A=S(C,!h(" 0o1")||!h("0b1")||h("+0x1")),x=function(M){return g(N,M)&&m(function(){d(M)})},E=function(){function D(M){var R=arguments.length<1?0:h(L(M));return x(this)?k(Object(R),this,E):R}return D}();E.prototype=N,A&&!a&&(N.constructor=E),e({global:!0,constructor:!0,wrap:!0,forced:A},{Number:E});var P=function(M,R){for(var O=t?i(R):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),F=0,_;O.length>F;F++)B(R,_=O[F])&&!B(M,_)&&s(M,_,u(R,_))};a&&p&&P(f[C],p),(A||a)&&P(f[C],h)},324:function(T,r,n){"use strict";var e=n(63964);e({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{EPSILON:Math.pow(2,-52)})},90426:function(T,r,n){"use strict";var e=n(63964),a=n(3294);e({target:"Number",stat:!0},{isFinite:a})},95443:function(T,r,n){"use strict";var e=n(63964),a=n(5841);e({target:"Number",stat:!0},{isInteger:a})},87968:function(T,r,n){"use strict";var e=n(63964);e({target:"Number",stat:!0},{isNaN:function(){function a(t){return t!==t}return a}()})},55007:function(T,r,n){"use strict";var e=n(63964),a=n(5841),t=Math.abs;e({target:"Number",stat:!0},{isSafeInteger:function(){function o(f){return a(f)&&t(f)<=9007199254740991}return o}()})},55323:function(T,r,n){"use strict";var e=n(63964);e({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{MAX_SAFE_INTEGER:9007199254740991})},13521:function(T,r,n){"use strict";var e=n(63964);e({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{MIN_SAFE_INTEGER:-9007199254740991})},5006:function(T,r,n){"use strict";var e=n(63964),a=n(28506);e({target:"Number",stat:!0,forced:Number.parseFloat!==a},{parseFloat:a})},99009:function(T,r,n){"use strict";var e=n(63964),a=n(13693);e({target:"Number",stat:!0,forced:Number.parseInt!==a},{parseInt:a})},85770:function(T,r,n){"use strict";var e=n(63964),a=n(67250),t=n(61365),o=n(46438),f=n(62443),b=n(40033),S=RangeError,B=String,k=Math.floor,g=a(f),l=a("".slice),c=a(1 .toFixed),m=function C(h,p,N){return p===0?N:p%2===1?C(h,p-1,N*h):C(h*h,p/2,N)},i=function(h){for(var p=0,N=h;N>=4096;)p+=12,N/=4096;for(;N>=2;)p+=1,N/=2;return p},u=function(h,p,N){for(var V=-1,y=N;++V<6;)y+=p*h[V],h[V]=y%1e7,y=k(y/1e7)},s=function(h,p){for(var N=6,V=0;--N>=0;)V+=h[N],h[N]=k(V/p),V=V%p*1e7},d=function(h){for(var p=6,N="";--p>=0;)if(N!==""||p===0||h[p]!==0){var V=B(h[p]);N=N===""?V:N+g("0",7-V.length)+V}return N},v=b(function(){return c(8e-5,3)!=="0.000"||c(.9,0)!=="1"||c(1.255,2)!=="1.25"||c(0xde0b6b3a7640080,0)!=="1000000000000000128"})||!b(function(){c({})});e({target:"Number",proto:!0,forced:v},{toFixed:function(){function C(h){var p=o(this),N=t(h),V=[0,0,0,0,0,0],y="",I="0",L,w,A,x;if(N<0||N>20)throw new S("Incorrect fraction digits");if(p!==p)return"NaN";if(p<=-1e21||p>=1e21)return B(p);if(p<0&&(y="-",p=-p),p>1e-21)if(L=i(p*m(2,69,1))-69,w=L<0?p*m(2,-L,1):p/m(2,L,1),w*=4503599627370496,L=52-L,L>0){for(u(V,0,w),A=N;A>=7;)u(V,1e7,0),A-=7;for(u(V,m(10,A,1),0),A=L-1;A>=23;)s(V,8388608),A-=23;s(V,1<0?(x=I.length,I=y+(x<=N?"0."+g("0",N-x)+I:l(I,0,x-N)+"."+l(I,x-N))):I=y+I,I}return C}()})},23532:function(T,r,n){"use strict";var e=n(63964),a=n(67250),t=n(40033),o=n(46438),f=a(1 .toPrecision),b=t(function(){return f(1,void 0)!=="1"})||!t(function(){f({})});e({target:"Number",proto:!0,forced:b},{toPrecision:function(){function S(B){return B===void 0?f(o(this)):f(o(this),B)}return S}()})},87119:function(T,r,n){"use strict";var e=n(63964),a=n(41143);e({target:"Object",stat:!0,arity:2,forced:Object.assign!==a},{assign:a})},78618:function(T,r,n){"use strict";var e=n(63964),a=n(58310),t=n(80674);e({target:"Object",stat:!0,sham:!a},{create:t})},27129:function(T,r,n){"use strict";var e=n(63964),a=n(58310),t=n(57377),o=n(10320),f=n(46771),b=n(74595);a&&e({target:"Object",proto:!0,forced:t},{__defineGetter__:function(){function S(B,k){b.f(f(this),B,{get:o(k),enumerable:!0,configurable:!0})}return S}()})},31943:function(T,r,n){"use strict";var e=n(63964),a=n(58310),t=n(24239).f;e({target:"Object",stat:!0,forced:Object.defineProperties!==t,sham:!a},{defineProperties:t})},3579:function(T,r,n){"use strict";var e=n(63964),a=n(58310),t=n(74595).f;e({target:"Object",stat:!0,forced:Object.defineProperty!==t,sham:!a},{defineProperty:t})},97397:function(T,r,n){"use strict";var e=n(63964),a=n(58310),t=n(57377),o=n(10320),f=n(46771),b=n(74595);a&&e({target:"Object",proto:!0,forced:t},{__defineSetter__:function(){function S(B,k){b.f(f(this),B,{set:o(k),enumerable:!0,configurable:!0})}return S}()})},85028:function(T,r,n){"use strict";var e=n(63964),a=n(70915).entries;e({target:"Object",stat:!0},{entries:function(){function t(o){return a(o)}return t}()})},8225:function(T,r,n){"use strict";var e=n(63964),a=n(50730),t=n(40033),o=n(77568),f=n(81969).onFreeze,b=Object.freeze,S=t(function(){b(1)});e({target:"Object",stat:!0,forced:S,sham:!a},{freeze:function(){function B(k){return b&&o(k)?b(f(k)):k}return B}()})},43331:function(T,r,n){"use strict";var e=n(63964),a=n(49450),t=n(60102);e({target:"Object",stat:!0},{fromEntries:function(){function o(f){var b={};return a(f,function(S,B){t(b,S,B)},{AS_ENTRIES:!0}),b}return o}()})},62289:function(T,r,n){"use strict";var e=n(63964),a=n(40033),t=n(57591),o=n(27193).f,f=n(58310),b=!f||a(function(){o(1)});e({target:"Object",stat:!0,forced:b,sham:!f},{getOwnPropertyDescriptor:function(){function S(B,k){return o(t(B),k)}return S}()})},56196:function(T,r,n){"use strict";var e=n(63964),a=n(58310),t=n(97921),o=n(57591),f=n(27193),b=n(60102);e({target:"Object",stat:!0,sham:!a},{getOwnPropertyDescriptors:function(){function S(B){for(var k=o(B),g=f.f,l=t(k),c={},m=0,i,u;l.length>m;)u=g(k,i=l[m++]),u!==void 0&&b(c,i,u);return c}return S}()})},2950:function(T,r,n){"use strict";var e=n(63964),a=n(40033),t=n(81644).f,o=a(function(){return!Object.getOwnPropertyNames(1)});e({target:"Object",stat:!0,forced:o},{getOwnPropertyNames:t})},28603:function(T,r,n){"use strict";var e=n(63964),a=n(52357),t=n(40033),o=n(89235),f=n(46771),b=!a||t(function(){o.f(1)});e({target:"Object",stat:!0,forced:b},{getOwnPropertySymbols:function(){function S(B){var k=o.f;return k?k(f(B)):[]}return S}()})},44205:function(T,r,n){"use strict";var e=n(63964),a=n(40033),t=n(46771),o=n(36917),f=n(9225),b=a(function(){o(1)});e({target:"Object",stat:!0,forced:b,sham:!f},{getPrototypeOf:function(){function S(B){return o(t(B))}return S}()})},83186:function(T,r,n){"use strict";var e=n(63964),a=n(81834);e({target:"Object",stat:!0,forced:Object.isExtensible!==a},{isExtensible:a})},76065:function(T,r,n){"use strict";var e=n(63964),a=n(40033),t=n(77568),o=n(7462),f=n(3782),b=Object.isFrozen,S=f||a(function(){b(1)});e({target:"Object",stat:!0,forced:S},{isFrozen:function(){function B(k){return!t(k)||f&&o(k)==="ArrayBuffer"?!0:b?b(k):!1}return B}()})},13411:function(T,r,n){"use strict";var e=n(63964),a=n(40033),t=n(77568),o=n(7462),f=n(3782),b=Object.isSealed,S=f||a(function(){b(1)});e({target:"Object",stat:!0,forced:S},{isSealed:function(){function B(k){return!t(k)||f&&o(k)==="ArrayBuffer"?!0:b?b(k):!1}return B}()})},76882:function(T,r,n){"use strict";var e=n(63964),a=n(5700);e({target:"Object",stat:!0},{is:a})},26634:function(T,r,n){"use strict";var e=n(63964),a=n(46771),t=n(18450),o=n(40033),f=o(function(){t(1)});e({target:"Object",stat:!0,forced:f},{keys:function(){function b(S){return t(a(S))}return b}()})},53118:function(T,r,n){"use strict";var e=n(63964),a=n(58310),t=n(57377),o=n(46771),f=n(767),b=n(36917),S=n(27193).f;a&&e({target:"Object",proto:!0,forced:t},{__lookupGetter__:function(){function B(k){var g=o(this),l=f(k),c;do if(c=S(g,l))return c.get;while(g=b(g))}return B}()})},42514:function(T,r,n){"use strict";var e=n(63964),a=n(58310),t=n(57377),o=n(46771),f=n(767),b=n(36917),S=n(27193).f;a&&e({target:"Object",proto:!0,forced:t},{__lookupSetter__:function(){function B(k){var g=o(this),l=f(k),c;do if(c=S(g,l))return c.set;while(g=b(g))}return B}()})},84353:function(T,r,n){"use strict";var e=n(63964),a=n(77568),t=n(81969).onFreeze,o=n(50730),f=n(40033),b=Object.preventExtensions,S=f(function(){b(1)});e({target:"Object",stat:!0,forced:S,sham:!o},{preventExtensions:function(){function B(k){return b&&a(k)?b(t(k)):k}return B}()})},62987:function(T,r,n){"use strict";var e=n(63964),a=n(77568),t=n(81969).onFreeze,o=n(50730),f=n(40033),b=Object.seal,S=f(function(){b(1)});e({target:"Object",stat:!0,forced:S,sham:!o},{seal:function(){function B(k){return b&&a(k)?b(t(k)):k}return B}()})},48993:function(T,r,n){"use strict";var e=n(63964),a=n(76649);e({target:"Object",stat:!0},{setPrototypeOf:a})},52917:function(T,r,n){"use strict";var e=n(2650),a=n(55938),t=n(2509);e||a(Object.prototype,"toString",t,{unsafe:!0})},4972:function(T,r,n){"use strict";var e=n(63964),a=n(70915).values;e({target:"Object",stat:!0},{values:function(){function t(o){return a(o)}return t}()})},28913:function(T,r,n){"use strict";var e=n(63964),a=n(28506);e({global:!0,forced:parseFloat!==a},{parseFloat:a})},36382:function(T,r,n){"use strict";var e=n(63964),a=n(13693);e({global:!0,forced:parseInt!==a},{parseInt:a})},48865:function(T,r,n){"use strict";var e=n(63964),a=n(91495),t=n(10320),o=n(81837),f=n(10729),b=n(49450),S=n(48199);e({target:"Promise",stat:!0,forced:S},{all:function(){function B(k){var g=this,l=o.f(g),c=l.resolve,m=l.reject,i=f(function(){var u=t(g.resolve),s=[],d=0,v=1;b(k,function(C){var h=d++,p=!1;v++,a(u,g,C).then(function(N){p||(p=!0,s[h]=N,--v||c(s))},m)}),--v||c(s)});return i.error&&m(i.value),l.promise}return B}()})},70641:function(T,r,n){"use strict";var e=n(63964),a=n(4493),t=n(74854).CONSTRUCTOR,o=n(67512),f=n(4009),b=n(55747),S=n(55938),B=o&&o.prototype;if(e({target:"Promise",proto:!0,forced:t,real:!0},{catch:function(){function g(l){return this.then(void 0,l)}return g}()}),!a&&b(o)){var k=f("Promise").prototype.catch;B.catch!==k&&S(B,"catch",k,{unsafe:!0})}},75946:function(T,r,n){"use strict";var e=n(63964),a=n(4493),t=n(81702),o=n(74685),f=n(91495),b=n(55938),S=n(76649),B=n(84925),k=n(58491),g=n(10320),l=n(55747),c=n(77568),m=n(60077),i=n(28987),u=n(60375).set,s=n(37713),d=n(72259),v=n(10729),C=n(9547),h=n(5419),p=n(67512),N=n(74854),V=n(81837),y="Promise",I=N.CONSTRUCTOR,L=N.REJECTION_EVENT,w=N.SUBCLASSING,A=h.getterFor(y),x=h.set,E=p&&p.prototype,P=p,D=E,M=o.TypeError,R=o.document,O=o.process,F=V.f,_=F,U=!!(R&&R.createEvent&&o.dispatchEvent),z="unhandledrejection",$="rejectionhandled",G=0,X=1,J=2,se=1,ie=2,me,q,re,ae,le=function(be){var Le;return c(be)&&l(Le=be.then)?Le:!1},Z=function(be,Le){var we=Le.value,xe=Le.state===X,Re=xe?be.ok:be.fail,He=be.resolve,ye=be.reject,de=be.domain,he,ke,ve;try{Re?(xe||(Le.rejection===ie&&ce(Le),Le.rejection=se),Re===!0?he=we:(de&&de.enter(),he=Re(we),de&&(de.exit(),ve=!0)),he===be.promise?ye(new M("Promise-chain cycle")):(ke=le(he))?f(ke,he,He,ye):He(he)):ye(we)}catch(Se){de&&!ve&&de.exit(),ye(Se)}},ne=function(be,Le){be.notified||(be.notified=!0,s(function(){for(var we=be.reactions,xe;xe=we.get();)Z(xe,be);be.notified=!1,Le&&!be.rejection&&fe(be)}))},te=function(be,Le,we){var xe,Re;U?(xe=R.createEvent("Event"),xe.promise=Le,xe.reason=we,xe.initEvent(be,!1,!0),o.dispatchEvent(xe)):xe={promise:Le,reason:we},!L&&(Re=o["on"+be])?Re(xe):be===z&&d("Unhandled promise rejection",we)},fe=function(be){f(u,o,function(){var Le=be.facade,we=be.value,xe=pe(be),Re;if(xe&&(Re=v(function(){t?O.emit("unhandledRejection",we,Le):te(z,Le,we)}),be.rejection=t||pe(be)?ie:se,Re.error))throw Re.value})},pe=function(be){return be.rejection!==se&&!be.parent},ce=function(be){f(u,o,function(){var Le=be.facade;t?O.emit("rejectionHandled",Le):te($,Le,be.value)})},Ve=function(be,Le,we){return function(xe){be(Le,xe,we)}},Ce=function(be,Le,we){be.done||(be.done=!0,we&&(be=we),be.value=Le,be.state=J,ne(be,!0))},Ne=function Be(be,Le,we){if(!be.done){be.done=!0,we&&(be=we);try{if(be.facade===Le)throw new M("Promise can't be resolved itself");var xe=le(Le);xe?s(function(){var Re={done:!1};try{f(xe,Le,Ve(Be,Re,be),Ve(Ce,Re,be))}catch(He){Ce(Re,He,be)}}):(be.value=Le,be.state=X,ne(be,!1))}catch(Re){Ce({done:!1},Re,be)}}};if(I&&(P=function(){function Be(be){m(this,D),g(be),f(me,this);var Le=A(this);try{be(Ve(Ne,Le),Ve(Ce,Le))}catch(we){Ce(Le,we)}}return Be}(),D=P.prototype,me=function(){function Be(be){x(this,{type:y,done:!1,notified:!1,parent:!1,reactions:new C,rejection:!1,state:G,value:void 0})}return Be}(),me.prototype=b(D,"then",function(){function Be(be,Le){var we=A(this),xe=F(i(this,P));return we.parent=!0,xe.ok=l(be)?be:!0,xe.fail=l(Le)&&Le,xe.domain=t?O.domain:void 0,we.state===G?we.reactions.add(xe):s(function(){Z(xe,we)}),xe.promise}return Be}()),q=function(){var be=new me,Le=A(be);this.promise=be,this.resolve=Ve(Ne,Le),this.reject=Ve(Ce,Le)},V.f=F=function(be){return be===P||be===re?new q(be):_(be)},!a&&l(p)&&E!==Object.prototype)){ae=E.then,w||b(E,"then",function(){function Be(be,Le){var we=this;return new P(function(xe,Re){f(ae,we,xe,Re)}).then(be,Le)}return Be}(),{unsafe:!0});try{delete E.constructor}catch(Be){}S&&S(E,D)}e({global:!0,constructor:!0,wrap:!0,forced:I},{Promise:P}),B(P,y,!1,!0),k(y)},69861:function(T,r,n){"use strict";var e=n(63964),a=n(4493),t=n(67512),o=n(40033),f=n(4009),b=n(55747),S=n(28987),B=n(66628),k=n(55938),g=t&&t.prototype,l=!!t&&o(function(){g.finally.call({then:function(){function m(){}return m}()},function(){})});if(e({target:"Promise",proto:!0,real:!0,forced:l},{finally:function(){function m(i){var u=S(this,f("Promise")),s=b(i);return this.then(s?function(d){return B(u,i()).then(function(){return d})}:i,s?function(d){return B(u,i()).then(function(){throw d})}:i)}return m}()}),!a&&b(t)){var c=f("Promise").prototype.finally;g.finally!==c&&k(g,"finally",c,{unsafe:!0})}},53092:function(T,r,n){"use strict";n(75946),n(48865),n(70641),n(16937),n(41719),n(59321)},16937:function(T,r,n){"use strict";var e=n(63964),a=n(91495),t=n(10320),o=n(81837),f=n(10729),b=n(49450),S=n(48199);e({target:"Promise",stat:!0,forced:S},{race:function(){function B(k){var g=this,l=o.f(g),c=l.reject,m=f(function(){var i=t(g.resolve);b(k,function(u){a(i,g,u).then(l.resolve,c)})});return m.error&&c(m.value),l.promise}return B}()})},41719:function(T,r,n){"use strict";var e=n(63964),a=n(81837),t=n(74854).CONSTRUCTOR;e({target:"Promise",stat:!0,forced:t},{reject:function(){function o(f){var b=a.f(this),S=b.reject;return S(f),b.promise}return o}()})},59321:function(T,r,n){"use strict";var e=n(63964),a=n(4009),t=n(4493),o=n(67512),f=n(74854).CONSTRUCTOR,b=n(66628),S=a("Promise"),B=t&&!f;e({target:"Promise",stat:!0,forced:t||f},{resolve:function(){function k(g){return b(B&&this===S?o:this,g)}return k}()})},29674:function(T,r,n){"use strict";var e=n(63964),a=n(61267),t=n(10320),o=n(30365),f=n(40033),b=!f(function(){Reflect.apply(function(){})});e({target:"Reflect",stat:!0,forced:b},{apply:function(){function S(B,k,g){return a(t(B),k,o(g))}return S}()})},81543:function(T,r,n){"use strict";var e=n(63964),a=n(4009),t=n(61267),o=n(66284),f=n(32606),b=n(30365),S=n(77568),B=n(80674),k=n(40033),g=a("Reflect","construct"),l=Object.prototype,c=[].push,m=k(function(){function s(){}return!(g(function(){},[],s)instanceof s)}),i=!k(function(){g(function(){})}),u=m||i;e({target:"Reflect",stat:!0,forced:u,sham:u},{construct:function(){function s(d,v){f(d),b(v);var C=arguments.length<3?d:f(arguments[2]);if(i&&!m)return g(d,v,C);if(d===C){switch(v.length){case 0:return new d;case 1:return new d(v[0]);case 2:return new d(v[0],v[1]);case 3:return new d(v[0],v[1],v[2]);case 4:return new d(v[0],v[1],v[2],v[3])}var h=[null];return t(c,h,v),new(t(o,d,h))}var p=C.prototype,N=B(S(p)?p:l),V=t(d,N,v);return S(V)?V:N}return s}()})},9373:function(T,r,n){"use strict";var e=n(63964),a=n(58310),t=n(30365),o=n(767),f=n(74595),b=n(40033),S=b(function(){Reflect.defineProperty(f.f({},1,{value:1}),1,{value:2})});e({target:"Reflect",stat:!0,forced:S,sham:!a},{defineProperty:function(){function B(k,g,l){t(k);var c=o(g);t(l);try{return f.f(k,c,l),!0}catch(m){return!1}}return B}()})},45093:function(T,r,n){"use strict";var e=n(63964),a=n(30365),t=n(27193).f;e({target:"Reflect",stat:!0},{deleteProperty:function(){function o(f,b){var S=t(a(f),b);return S&&!S.configurable?!1:delete f[b]}return o}()})},5815:function(T,r,n){"use strict";var e=n(63964),a=n(58310),t=n(30365),o=n(27193);e({target:"Reflect",stat:!0,sham:!a},{getOwnPropertyDescriptor:function(){function f(b,S){return o.f(t(b),S)}return f}()})},88527:function(T,r,n){"use strict";var e=n(63964),a=n(30365),t=n(36917),o=n(9225);e({target:"Reflect",stat:!0,sham:!o},{getPrototypeOf:function(){function f(b){return t(a(b))}return f}()})},63074:function(T,r,n){"use strict";var e=n(63964),a=n(91495),t=n(77568),o=n(30365),f=n(98373),b=n(27193),S=n(36917);function B(k,g){var l=arguments.length<3?k:arguments[2],c,m;if(o(k)===l)return k[g];if(c=b.f(k,g),c)return f(c)?c.value:c.get===void 0?void 0:a(c.get,l);if(t(m=S(k)))return B(m,g,l)}e({target:"Reflect",stat:!0},{get:B})},66390:function(T,r,n){"use strict";var e=n(63964);e({target:"Reflect",stat:!0},{has:function(){function a(t,o){return o in t}return a}()})},7784:function(T,r,n){"use strict";var e=n(63964),a=n(30365),t=n(81834);e({target:"Reflect",stat:!0},{isExtensible:function(){function o(f){return a(f),t(f)}return o}()})},50551:function(T,r,n){"use strict";var e=n(63964),a=n(97921);e({target:"Reflect",stat:!0},{ownKeys:a})},76483:function(T,r,n){"use strict";var e=n(63964),a=n(4009),t=n(30365),o=n(50730);e({target:"Reflect",stat:!0,sham:!o},{preventExtensions:function(){function f(b){t(b);try{var S=a("Object","preventExtensions");return S&&S(b),!0}catch(B){return!1}}return f}()})},63915:function(T,r,n){"use strict";var e=n(63964),a=n(30365),t=n(35908),o=n(76649);o&&e({target:"Reflect",stat:!0},{setPrototypeOf:function(){function f(b,S){a(b),t(S);try{return o(b,S),!0}catch(B){return!1}}return f}()})},92046:function(T,r,n){"use strict";var e=n(63964),a=n(91495),t=n(30365),o=n(77568),f=n(98373),b=n(40033),S=n(74595),B=n(27193),k=n(36917),g=n(87458);function l(m,i,u){var s=arguments.length<4?m:arguments[3],d=B.f(t(m),i),v,C,h;if(!d){if(o(C=k(m)))return l(C,i,u,s);d=g(0)}if(f(d)){if(d.writable===!1||!o(s))return!1;if(v=B.f(s,i)){if(v.get||v.set||v.writable===!1)return!1;v.value=u,S.f(s,i,v)}else S.f(s,i,g(0,u))}else{if(h=d.set,h===void 0)return!1;a(h,s,u)}return!0}var c=b(function(){var m=function(){},i=S.f(new m,"a",{configurable:!0});return Reflect.set(m.prototype,"a",1,i)!==!1});e({target:"Reflect",stat:!0,forced:c},{set:l})},51454:function(T,r,n){"use strict";var e=n(58310),a=n(74685),t=n(67250),o=n(41314),f=n(5781),b=n(37909),S=n(80674),B=n(37310).f,k=n(21287),g=n(72586),l=n(12605),c=n(73392),m=n(62115),i=n(34550),u=n(55938),s=n(40033),d=n(45299),v=n(5419).enforce,C=n(58491),h=n(24697),p=n(39173),N=n(35688),V=h("match"),y=a.RegExp,I=y.prototype,L=a.SyntaxError,w=t(I.exec),A=t("".charAt),x=t("".replace),E=t("".indexOf),P=t("".slice),D=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,M=/a/g,R=/a/g,O=new y(M)!==M,F=m.MISSED_STICKY,_=m.UNSUPPORTED_Y,U=e&&(!O||F||p||N||s(function(){return R[V]=!1,y(M)!==M||y(R)===R||String(y(M,"i"))!=="/a/i"})),z=function(ie){for(var me=ie.length,q=0,re="",ae=!1,le;q<=me;q++){if(le=A(ie,q),le==="\\"){re+=le+A(ie,++q);continue}!ae&&le==="."?re+="[\\s\\S]":(le==="["?ae=!0:le==="]"&&(ae=!1),re+=le)}return re},$=function(ie){for(var me=ie.length,q=0,re="",ae=[],le=S(null),Z=!1,ne=!1,te=0,fe="",pe;q<=me;q++){if(pe=A(ie,q),pe==="\\")pe+=A(ie,++q);else if(pe==="]")Z=!1;else if(!Z)switch(!0){case pe==="[":Z=!0;break;case pe==="(":w(D,P(ie,q+1))&&(q+=2,ne=!0),re+=pe,te++;continue;case(pe===">"&&ne):if(fe===""||d(le,fe))throw new L("Invalid capture group name");le[fe]=!0,ae[ae.length]=[fe,te],ne=!1,fe="";continue}ne?fe+=pe:re+=pe}return[re,ae]};if(o("RegExp",U)){for(var G=function(){function se(ie,me){var q=k(I,this),re=g(ie),ae=me===void 0,le=[],Z=ie,ne,te,fe,pe,ce,Ve;if(!q&&re&&ae&&ie.constructor===G)return ie;if((re||k(I,ie))&&(ie=ie.source,ae&&(me=c(Z))),ie=ie===void 0?"":l(ie),me=me===void 0?"":l(me),Z=ie,p&&"dotAll"in M&&(te=!!me&&E(me,"s")>-1,te&&(me=x(me,/s/g,""))),ne=me,F&&"sticky"in M&&(fe=!!me&&E(me,"y")>-1,fe&&_&&(me=x(me,/y/g,""))),N&&(pe=$(ie),ie=pe[0],le=pe[1]),ce=f(y(ie,me),q?this:I,G),(te||fe||le.length)&&(Ve=v(ce),te&&(Ve.dotAll=!0,Ve.raw=G(z(ie),ne)),fe&&(Ve.sticky=!0),le.length&&(Ve.groups=le)),ie!==Z)try{b(ce,"source",Z===""?"(?:)":Z)}catch(Ce){}return ce}return se}(),X=B(y),J=0;X.length>J;)i(G,y,X[J++]);I.constructor=G,G.prototype=I,u(a,"RegExp",G,{constructor:!0})}C("RegExp")},79669:function(T,r,n){"use strict";var e=n(63964),a=n(14489);e({target:"RegExp",proto:!0,forced:/./.exec!==a},{exec:a})},23057:function(T,r,n){"use strict";var e=n(74685),a=n(58310),t=n(73936),o=n(70901),f=n(40033),b=e.RegExp,S=b.prototype,B=a&&f(function(){var k=!0;try{b(".","d")}catch(d){k=!1}var g={},l="",c=k?"dgimsy":"gimsy",m=function(v,C){Object.defineProperty(g,v,{get:function(){function h(){return l+=C,!0}return h}()})},i={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};k&&(i.hasIndices="d");for(var u in i)m(u,i[u]);var s=Object.getOwnPropertyDescriptor(S,"flags").get.call(g);return s!==c||l!==c});B&&t(S,"flags",{configurable:!0,get:o})},57983:function(T,r,n){"use strict";var e=n(70520).PROPER,a=n(55938),t=n(30365),o=n(12605),f=n(40033),b=n(73392),S="toString",B=RegExp.prototype,k=B[S],g=f(function(){return k.call({source:"a",flags:"b"})!=="/a/b"}),l=e&&k.name!==S;(g||l)&&a(B,S,function(){function c(){var m=t(this),i=o(m.source),u=o(b(m));return"/"+i+"/"+u}return c}(),{unsafe:!0})},1963:function(T,r,n){"use strict";var e=n(45150),a=n(41028);e("Set",function(t){return function(){function o(){return t(this,arguments.length?arguments[0]:void 0)}return o}()},a)},17953:function(T,r,n){"use strict";n(1963)},95309:function(T,r,n){"use strict";var e=n(63964),a=n(72506),t=n(88539);e({target:"String",proto:!0,forced:t("anchor")},{anchor:function(){function o(f){return a(this,"a","name",f)}return o}()})},82256:function(T,r,n){"use strict";var e=n(63964),a=n(72506),t=n(88539);e({target:"String",proto:!0,forced:t("big")},{big:function(){function o(){return a(this,"big","","")}return o}()})},49484:function(T,r,n){"use strict";var e=n(63964),a=n(72506),t=n(88539);e({target:"String",proto:!0,forced:t("blink")},{blink:function(){function o(){return a(this,"blink","","")}return o}()})},38931:function(T,r,n){"use strict";var e=n(63964),a=n(72506),t=n(88539);e({target:"String",proto:!0,forced:t("bold")},{bold:function(){function o(){return a(this,"b","","")}return o}()})},30442:function(T,r,n){"use strict";var e=n(63964),a=n(50233).codeAt;e({target:"String",proto:!0},{codePointAt:function(){function t(o){return a(this,o)}return t}()})},6403:function(T,r,n){"use strict";var e=n(63964),a=n(71138),t=n(27193).f,o=n(10188),f=n(12605),b=n(86213),S=n(16952),B=n(45490),k=n(4493),g=a("".slice),l=Math.min,c=B("endsWith"),m=!k&&!c&&!!function(){var i=t(String.prototype,"endsWith");return i&&!i.writable}();e({target:"String",proto:!0,forced:!m&&!c},{endsWith:function(){function i(u){var s=f(S(this));b(u);var d=arguments.length>1?arguments[1]:void 0,v=s.length,C=d===void 0?v:l(o(d),v),h=f(u);return g(s,C-h.length,C)===h}return i}()})},39308:function(T,r,n){"use strict";var e=n(63964),a=n(72506),t=n(88539);e({target:"String",proto:!0,forced:t("fixed")},{fixed:function(){function o(){return a(this,"tt","","")}return o}()})},91550:function(T,r,n){"use strict";var e=n(63964),a=n(72506),t=n(88539);e({target:"String",proto:!0,forced:t("fontcolor")},{fontcolor:function(){function o(f){return a(this,"font","color",f)}return o}()})},75008:function(T,r,n){"use strict";var e=n(63964),a=n(72506),t=n(88539);e({target:"String",proto:!0,forced:t("fontsize")},{fontsize:function(){function o(f){return a(this,"font","size",f)}return o}()})},9867:function(T,r,n){"use strict";var e=n(63964),a=n(67250),t=n(13912),o=RangeError,f=String.fromCharCode,b=String.fromCodePoint,S=a([].join),B=!!b&&b.length!==1;e({target:"String",stat:!0,arity:1,forced:B},{fromCodePoint:function(){function k(g){for(var l=[],c=arguments.length,m=0,i;c>m;){if(i=+arguments[m++],t(i,1114111)!==i)throw new o(i+" is not a valid code point");l[m]=i<65536?f(i):f(((i-=65536)>>10)+55296,i%1024+56320)}return S(l,"")}return k}()})},43673:function(T,r,n){"use strict";var e=n(63964),a=n(67250),t=n(86213),o=n(16952),f=n(12605),b=n(45490),S=a("".indexOf);e({target:"String",proto:!0,forced:!b("includes")},{includes:function(){function B(k){return!!~S(f(o(this)),f(t(k)),arguments.length>1?arguments[1]:void 0)}return B}()})},56027:function(T,r,n){"use strict";var e=n(63964),a=n(72506),t=n(88539);e({target:"String",proto:!0,forced:t("italics")},{italics:function(){function o(){return a(this,"i","","")}return o}()})},12354:function(T,r,n){"use strict";var e=n(50233).charAt,a=n(12605),t=n(5419),o=n(65574),f=n(5959),b="String Iterator",S=t.set,B=t.getterFor(b);o(String,"String",function(k){S(this,{type:b,string:a(k),index:0})},function(){function k(){var g=B(this),l=g.string,c=g.index,m;return c>=l.length?f(void 0,!0):(m=e(l,c),g.index+=m.length,f(m,!1))}return k}())},50340:function(T,r,n){"use strict";var e=n(63964),a=n(72506),t=n(88539);e({target:"String",proto:!0,forced:t("link")},{link:function(){function o(f){return a(this,"a","href",f)}return o}()})},22515:function(T,r,n){"use strict";var e=n(91495),a=n(79942),t=n(30365),o=n(42871),f=n(10188),b=n(12605),S=n(16952),B=n(78060),k=n(35483),g=n(28340);a("match",function(l,c,m){return[function(){function i(u){var s=S(this),d=o(u)?void 0:B(u,l);return d?e(d,u,s):new RegExp(u)[l](b(s))}return i}(),function(i){var u=t(this),s=b(i),d=m(c,u,s);if(d.done)return d.value;if(!u.global)return g(u,s);var v=u.unicode;u.lastIndex=0;for(var C=[],h=0,p;(p=g(u,s))!==null;){var N=b(p[0]);C[h]=N,N===""&&(u.lastIndex=k(s,f(u.lastIndex),v)),h++}return h===0?null:C}]})},5143:function(T,r,n){"use strict";var e=n(63964),a=n(24051).end,t=n(34125);e({target:"String",proto:!0,forced:t},{padEnd:function(){function o(f){return a(this,f,arguments.length>1?arguments[1]:void 0)}return o}()})},93514:function(T,r,n){"use strict";var e=n(63964),a=n(24051).start,t=n(34125);e({target:"String",proto:!0,forced:t},{padStart:function(){function o(f){return a(this,f,arguments.length>1?arguments[1]:void 0)}return o}()})},5416:function(T,r,n){"use strict";var e=n(63964),a=n(67250),t=n(57591),o=n(46771),f=n(12605),b=n(24760),S=a([].push),B=a([].join);e({target:"String",stat:!0},{raw:function(){function k(g){var l=t(o(g).raw),c=b(l);if(!c)return"";for(var m=arguments.length,i=[],u=0;;){if(S(i,f(l[u++])),u===c)return B(i,"");u")!=="7"});o("replace",function(x,E,P){var D=w?"$":"$0";return[function(){function M(R,O){var F=c(this),_=B(R)?void 0:i(R,v);return _?a(_,R,F,O):a(E,l(F),R,O)}return M}(),function(M,R){var O=b(this),F=l(M);if(typeof R=="string"&&V(R,D)===-1&&V(R,"$<")===-1){var _=P(E,O,F,R);if(_.done)return _.value}var U=S(R);U||(R=l(R));var z=O.global,$;z&&($=O.unicode,O.lastIndex=0);for(var G=[],X;X=s(O,F),!(X===null||(N(G,X),!z));){var J=l(X[0]);J===""&&(O.lastIndex=m(F,g(O.lastIndex),$))}for(var se="",ie=0,me=0;me=ie&&(se+=y(F,ie,re)+le,ie=re+q.length)}return se+y(F,ie)}]},!A||!L||w)},63272:function(T,r,n){"use strict";var e=n(91495),a=n(79942),t=n(30365),o=n(42871),f=n(16952),b=n(5700),S=n(12605),B=n(78060),k=n(28340);a("search",function(g,l,c){return[function(){function m(i){var u=f(this),s=o(i)?void 0:B(i,g);return s?e(s,i,u):new RegExp(i)[g](S(u))}return m}(),function(m){var i=t(this),u=S(m),s=c(l,i,u);if(s.done)return s.value;var d=i.lastIndex;b(d,0)||(i.lastIndex=0);var v=k(i,u);return b(i.lastIndex,d)||(i.lastIndex=d),v===null?-1:v.index}]})},34325:function(T,r,n){"use strict";var e=n(63964),a=n(72506),t=n(88539);e({target:"String",proto:!0,forced:t("small")},{small:function(){function o(){return a(this,"small","","")}return o}()})},39930:function(T,r,n){"use strict";var e=n(91495),a=n(67250),t=n(79942),o=n(30365),f=n(42871),b=n(16952),S=n(28987),B=n(35483),k=n(10188),g=n(12605),l=n(78060),c=n(28340),m=n(62115),i=n(40033),u=m.UNSUPPORTED_Y,s=4294967295,d=Math.min,v=a([].push),C=a("".slice),h=!i(function(){var N=/(?:)/,V=N.exec;N.exec=function(){return V.apply(this,arguments)};var y="ab".split(N);return y.length!==2||y[0]!=="a"||y[1]!=="b"}),p="abbc".split(/(b)*/)[1]==="c"||"test".split(/(?:)/,-1).length!==4||"ab".split(/(?:ab)*/).length!==2||".".split(/(.?)(.?)/).length!==4||".".split(/()()/).length>1||"".split(/.?/).length;t("split",function(N,V,y){var I="0".split(void 0,0).length?function(L,w){return L===void 0&&w===0?[]:e(V,this,L,w)}:V;return[function(){function L(w,A){var x=b(this),E=f(w)?void 0:l(w,N);return E?e(E,w,x,A):e(I,g(x),w,A)}return L}(),function(L,w){var A=o(this),x=g(L);if(!p){var E=y(I,A,x,w,I!==V);if(E.done)return E.value}var P=S(A,RegExp),D=A.unicode,M=(A.ignoreCase?"i":"")+(A.multiline?"m":"")+(A.unicode?"u":"")+(u?"g":"y"),R=new P(u?"^(?:"+A.source+")":A,M),O=w===void 0?s:w>>>0;if(O===0)return[];if(x.length===0)return c(R,x)===null?[x]:[];for(var F=0,_=0,U=[];_1?arguments[1]:void 0,s.length)),v=f(u);return g(s,d,d+v.length)===v}return i}()})},74498:function(T,r,n){"use strict";var e=n(63964),a=n(72506),t=n(88539);e({target:"String",proto:!0,forced:t("strike")},{strike:function(){function o(){return a(this,"strike","","")}return o}()})},15812:function(T,r,n){"use strict";var e=n(63964),a=n(72506),t=n(88539);e({target:"String",proto:!0,forced:t("sub")},{sub:function(){function o(){return a(this,"sub","","")}return o}()})},57726:function(T,r,n){"use strict";var e=n(63964),a=n(72506),t=n(88539);e({target:"String",proto:!0,forced:t("sup")},{sup:function(){function o(){return a(this,"sup","","")}return o}()})},70604:function(T,r,n){"use strict";n(99159);var e=n(63964),a=n(43476);e({target:"String",proto:!0,name:"trimEnd",forced:"".trimEnd!==a},{trimEnd:a})},85404:function(T,r,n){"use strict";var e=n(63964),a=n(43885);e({target:"String",proto:!0,name:"trimStart",forced:"".trimLeft!==a},{trimLeft:a})},99159:function(T,r,n){"use strict";var e=n(63964),a=n(43476);e({target:"String",proto:!0,name:"trimEnd",forced:"".trimRight!==a},{trimRight:a})},34965:function(T,r,n){"use strict";n(85404);var e=n(63964),a=n(43885);e({target:"String",proto:!0,name:"trimStart",forced:"".trimStart!==a},{trimStart:a})},8448:function(T,r,n){"use strict";var e=n(63964),a=n(92648).trim,t=n(90012);e({target:"String",proto:!0,forced:t("trim")},{trim:function(){function o(){return a(this)}return o}()})},79250:function(T,r,n){"use strict";var e=n(85889);e("asyncIterator")},49899:function(T,r,n){"use strict";var e=n(63964),a=n(74685),t=n(91495),o=n(67250),f=n(4493),b=n(58310),S=n(52357),B=n(40033),k=n(45299),g=n(21287),l=n(30365),c=n(57591),m=n(767),i=n(12605),u=n(87458),s=n(80674),d=n(18450),v=n(37310),C=n(81644),h=n(89235),p=n(27193),N=n(74595),V=n(24239),y=n(12867),I=n(55938),L=n(73936),w=n(16639),A=n(19417),x=n(79195),E=n(16738),P=n(24697),D=n(55557),M=n(85889),R=n(52360),O=n(84925),F=n(5419),_=n(22603).forEach,U=A("hidden"),z="Symbol",$="prototype",G=F.set,X=F.getterFor(z),J=Object[$],se=a.Symbol,ie=se&&se[$],me=a.RangeError,q=a.TypeError,re=a.QObject,ae=p.f,le=N.f,Z=C.f,ne=y.f,te=o([].push),fe=w("symbols"),pe=w("op-symbols"),ce=w("wks"),Ve=!re||!re[$]||!re[$].findChild,Ce=function(he,ke,ve){var Se=ae(J,ke);Se&&delete J[ke],le(he,ke,ve),Se&&he!==J&&le(J,ke,Se)},Ne=b&&B(function(){return s(le({},"a",{get:function(){function de(){return le(this,"a",{value:7}).a}return de}()})).a!==7})?Ce:le,Be=function(he,ke){var ve=fe[he]=s(ie);return G(ve,{type:z,tag:he,description:ke}),b||(ve.description=ke),ve},be=function(){function de(he,ke,ve){he===J&&be(pe,ke,ve),l(he);var Se=m(ke);return l(ve),k(fe,Se)?(ve.enumerable?(k(he,U)&&he[U][Se]&&(he[U][Se]=!1),ve=s(ve,{enumerable:u(0,!1)})):(k(he,U)||le(he,U,u(1,s(null))),he[U][Se]=!0),Ne(he,Se,ve)):le(he,Se,ve)}return de}(),Le=function(){function de(he,ke){l(he);var ve=c(ke),Se=d(ve).concat(ye(ve));return _(Se,function(Pe){(!b||t(xe,ve,Pe))&&be(he,Pe,ve[Pe])}),he}return de}(),we=function(){function de(he,ke){return ke===void 0?s(he):Le(s(he),ke)}return de}(),xe=function(){function de(he){var ke=m(he),ve=t(ne,this,ke);return this===J&&k(fe,ke)&&!k(pe,ke)?!1:ve||!k(this,ke)||!k(fe,ke)||k(this,U)&&this[U][ke]?ve:!0}return de}(),Re=function(){function de(he,ke){var ve=c(he),Se=m(ke);if(!(ve===J&&k(fe,Se)&&!k(pe,Se))){var Pe=ae(ve,Se);return Pe&&k(fe,Se)&&!(k(ve,U)&&ve[U][Se])&&(Pe.enumerable=!0),Pe}}return de}(),He=function(){function de(he){var ke=Z(c(he)),ve=[];return _(ke,function(Se){!k(fe,Se)&&!k(x,Se)&&te(ve,Se)}),ve}return de}(),ye=function(he){var ke=he===J,ve=Z(ke?pe:c(he)),Se=[];return _(ve,function(Pe){k(fe,Pe)&&(!ke||k(J,Pe))&&te(Se,fe[Pe])}),Se};S||(se=function(){function de(){if(g(ie,this))throw new q("Symbol is not a constructor");var he=!arguments.length||arguments[0]===void 0?void 0:i(arguments[0]),ke=E(he),ve=function(){function Se(Pe){var je=this===void 0?a:this;je===J&&t(Se,pe,Pe),k(je,U)&&k(je[U],ke)&&(je[U][ke]=!1);var Fe=u(1,Pe);try{Ne(je,ke,Fe)}catch(ze){if(!(ze instanceof me))throw ze;Ce(je,ke,Fe)}}return Se}();return b&&Ve&&Ne(J,ke,{configurable:!0,set:ve}),Be(ke,he)}return de}(),ie=se[$],I(ie,"toString",function(){function de(){return X(this).tag}return de}()),I(se,"withoutSetter",function(de){return Be(E(de),de)}),y.f=xe,N.f=be,V.f=Le,p.f=Re,v.f=C.f=He,h.f=ye,D.f=function(de){return Be(P(de),de)},b&&(L(ie,"description",{configurable:!0,get:function(){function de(){return X(this).description}return de}()}),f||I(J,"propertyIsEnumerable",xe,{unsafe:!0}))),e({global:!0,constructor:!0,wrap:!0,forced:!S,sham:!S},{Symbol:se}),_(d(ce),function(de){M(de)}),e({target:z,stat:!0,forced:!S},{useSetter:function(){function de(){Ve=!0}return de}(),useSimple:function(){function de(){Ve=!1}return de}()}),e({target:"Object",stat:!0,forced:!S,sham:!b},{create:we,defineProperty:be,defineProperties:Le,getOwnPropertyDescriptor:Re}),e({target:"Object",stat:!0,forced:!S},{getOwnPropertyNames:He}),R(),O(se,z),x[U]=!0},10933:function(T,r,n){"use strict";var e=n(63964),a=n(58310),t=n(74685),o=n(67250),f=n(45299),b=n(55747),S=n(21287),B=n(12605),k=n(73936),g=n(5774),l=t.Symbol,c=l&&l.prototype;if(a&&b(l)&&(!("description"in c)||l().description!==void 0)){var m={},i=function(){function p(){var N=arguments.length<1||arguments[0]===void 0?void 0:B(arguments[0]),V=S(c,this)?new l(N):N===void 0?l():l(N);return N===""&&(m[V]=!0),V}return p}();g(i,l),i.prototype=c,c.constructor=i;var u=String(l("description detection"))==="Symbol(description detection)",s=o(c.valueOf),d=o(c.toString),v=/^Symbol\((.*)\)[^)]+$/,C=o("".replace),h=o("".slice);k(c,"description",{configurable:!0,get:function(){function p(){var N=s(this);if(f(m,N))return"";var V=d(N),y=u?h(V,7,-1):C(V,v,"$1");return y===""?void 0:y}return p}()}),e({global:!0,constructor:!0,forced:!0},{Symbol:i})}},30828:function(T,r,n){"use strict";var e=n(63964),a=n(4009),t=n(45299),o=n(12605),f=n(16639),b=n(66570),S=f("string-to-symbol-registry"),B=f("symbol-to-string-registry");e({target:"Symbol",stat:!0,forced:!b},{for:function(){function k(g){var l=o(g);if(t(S,l))return S[l];var c=a("Symbol")(l);return S[l]=c,B[c]=l,c}return k}()})},53795:function(T,r,n){"use strict";var e=n(85889);e("hasInstance")},87806:function(T,r,n){"use strict";var e=n(85889);e("isConcatSpreadable")},64677:function(T,r,n){"use strict";var e=n(85889);e("iterator")},33313:function(T,r,n){"use strict";n(49899),n(30828),n(6862),n(53008),n(28603)},6862:function(T,r,n){"use strict";var e=n(63964),a=n(45299),t=n(71399),o=n(89393),f=n(16639),b=n(66570),S=f("symbol-to-string-registry");e({target:"Symbol",stat:!0,forced:!b},{keyFor:function(){function B(k){if(!t(k))throw new TypeError(o(k)+" is not a symbol");if(a(S,k))return S[k]}return B}()})},48058:function(T,r,n){"use strict";var e=n(85889);e("match")},51583:function(T,r,n){"use strict";var e=n(85889);e("replace")},82403:function(T,r,n){"use strict";var e=n(85889);e("search")},34265:function(T,r,n){"use strict";var e=n(85889);e("species")},3295:function(T,r,n){"use strict";var e=n(85889);e("split")},1078:function(T,r,n){"use strict";var e=n(85889),a=n(52360);e("toPrimitive"),a()},63207:function(T,r,n){"use strict";var e=n(4009),a=n(85889),t=n(84925);a("toStringTag"),t(e("Symbol"),"Symbol")},80520:function(T,r,n){"use strict";var e=n(85889);e("unscopables")},99872:function(T,r,n){"use strict";var e=n(67250),a=n(4246),t=n(71447),o=e(t),f=a.aTypedArray,b=a.exportTypedArrayMethod;b("copyWithin",function(){function S(B,k){return o(f(this),B,k,arguments.length>2?arguments[2]:void 0)}return S}())},73364:function(T,r,n){"use strict";var e=n(4246),a=n(22603).every,t=e.aTypedArray,o=e.exportTypedArrayMethod;o("every",function(){function f(b){return a(t(this),b,arguments.length>1?arguments[1]:void 0)}return f}())},58166:function(T,r,n){"use strict";var e=n(4246),a=n(88471),t=n(61484),o=n(2281),f=n(91495),b=n(67250),S=n(40033),B=e.aTypedArray,k=e.exportTypedArrayMethod,g=b("".slice),l=S(function(){var c=0;return new Int8Array(2).fill({valueOf:function(){function m(){return c++}return m}()}),c!==1});k("fill",function(){function c(m){var i=arguments.length;B(this);var u=g(o(this),0,3)==="Big"?t(m):+m;return f(a,this,u,i>1?arguments[1]:void 0,i>2?arguments[2]:void 0)}return c}(),l)},23793:function(T,r,n){"use strict";var e=n(4246),a=n(22603).filter,t=n(45399),o=e.aTypedArray,f=e.exportTypedArrayMethod;f("filter",function(){function b(S){var B=a(o(this),S,arguments.length>1?arguments[1]:void 0);return t(this,B)}return b}())},13917:function(T,r,n){"use strict";var e=n(4246),a=n(22603).findIndex,t=e.aTypedArray,o=e.exportTypedArrayMethod;o("findIndex",function(){function f(b){return a(t(this),b,arguments.length>1?arguments[1]:void 0)}return f}())},43820:function(T,r,n){"use strict";var e=n(4246),a=n(22603).find,t=e.aTypedArray,o=e.exportTypedArrayMethod;o("find",function(){function f(b){return a(t(this),b,arguments.length>1?arguments[1]:void 0)}return f}())},80756:function(T,r,n){"use strict";var e=n(80185);e("Float32",function(a){return function(){function t(o,f,b){return a(this,o,f,b)}return t}()})},70567:function(T,r,n){"use strict";var e=n(80185);e("Float64",function(a){return function(){function t(o,f,b){return a(this,o,f,b)}return t}()})},19852:function(T,r,n){"use strict";var e=n(4246),a=n(22603).forEach,t=e.aTypedArray,o=e.exportTypedArrayMethod;o("forEach",function(){function f(b){a(t(this),b,arguments.length>1?arguments[1]:void 0)}return f}())},40379:function(T,r,n){"use strict";var e=n(86563),a=n(4246).exportTypedArrayStaticMethod,t=n(3805);a("from",t,e)},92770:function(T,r,n){"use strict";var e=n(4246),a=n(14211).includes,t=e.aTypedArray,o=e.exportTypedArrayMethod;o("includes",function(){function f(b){return a(t(this),b,arguments.length>1?arguments[1]:void 0)}return f}())},81069:function(T,r,n){"use strict";var e=n(4246),a=n(14211).indexOf,t=e.aTypedArray,o=e.exportTypedArrayMethod;o("indexOf",function(){function f(b){return a(t(this),b,arguments.length>1?arguments[1]:void 0)}return f}())},60037:function(T,r,n){"use strict";var e=n(80185);e("Int16",function(a){return function(){function t(o,f,b){return a(this,o,f,b)}return t}()})},44195:function(T,r,n){"use strict";var e=n(80185);e("Int32",function(a){return function(){function t(o,f,b){return a(this,o,f,b)}return t}()})},66756:function(T,r,n){"use strict";var e=n(80185);e("Int8",function(a){return function(){function t(o,f,b){return a(this,o,f,b)}return t}()})},63689:function(T,r,n){"use strict";var e=n(74685),a=n(40033),t=n(67250),o=n(4246),f=n(34570),b=n(24697),S=b("iterator"),B=e.Uint8Array,k=t(f.values),g=t(f.keys),l=t(f.entries),c=o.aTypedArray,m=o.exportTypedArrayMethod,i=B&&B.prototype,u=!a(function(){i[S].call([1])}),s=!!i&&i.values&&i[S]===i.values&&i.values.name==="values",d=function(){function v(){return k(c(this))}return v}();m("entries",function(){function v(){return l(c(this))}return v}(),u),m("keys",function(){function v(){return g(c(this))}return v}(),u),m("values",d,u||!s,{name:"values"}),m(S,d,u||!s,{name:"values"})},5659:function(T,r,n){"use strict";var e=n(4246),a=n(67250),t=e.aTypedArray,o=e.exportTypedArrayMethod,f=a([].join);o("join",function(){function b(S){return f(t(this),S)}return b}())},25014:function(T,r,n){"use strict";var e=n(4246),a=n(61267),t=n(1325),o=e.aTypedArray,f=e.exportTypedArrayMethod;f("lastIndexOf",function(){function b(S){var B=arguments.length;return a(t,o(this),B>1?[S,arguments[1]]:[S])}return b}())},32189:function(T,r,n){"use strict";var e=n(4246),a=n(22603).map,t=n(31082),o=e.aTypedArray,f=e.exportTypedArrayMethod;f("map",function(){function b(S){return a(o(this),S,arguments.length>1?arguments[1]:void 0,function(B,k){return new(t(B))(k)})}return b}())},23030:function(T,r,n){"use strict";var e=n(4246),a=n(86563),t=e.aTypedArrayConstructor,o=e.exportTypedArrayStaticMethod;o("of",function(){function f(){for(var b=0,S=arguments.length,B=new(t(this))(S);S>b;)B[b]=arguments[b++];return B}return f}(),a)},49110:function(T,r,n){"use strict";var e=n(4246),a=n(56844).right,t=e.aTypedArray,o=e.exportTypedArrayMethod;o("reduceRight",function(){function f(b){var S=arguments.length;return a(t(this),b,S,S>1?arguments[1]:void 0)}return f}())},24309:function(T,r,n){"use strict";var e=n(4246),a=n(56844).left,t=e.aTypedArray,o=e.exportTypedArrayMethod;o("reduce",function(){function f(b){var S=arguments.length;return a(t(this),b,S,S>1?arguments[1]:void 0)}return f}())},56445:function(T,r,n){"use strict";var e=n(4246),a=e.aTypedArray,t=e.exportTypedArrayMethod,o=Math.floor;t("reverse",function(){function f(){for(var b=this,S=a(b).length,B=o(S/2),k=0,g;k1?arguments[1]:void 0,1),C=b(d);if(i)return a(l,this,C,v);var h=this.length,p=o(C),N=0;if(p+v>h)throw new B("Wrong length");for(;Nm;)u[m]=l[m++];return u}return B}(),S)},88739:function(T,r,n){"use strict";var e=n(4246),a=n(22603).some,t=e.aTypedArray,o=e.exportTypedArrayMethod;o("some",function(){function f(b){return a(t(this),b,arguments.length>1?arguments[1]:void 0)}return f}())},60415:function(T,r,n){"use strict";var e=n(74685),a=n(71138),t=n(40033),o=n(10320),f=n(90274),b=n(4246),S=n(652),B=n(19228),k=n(5026),g=n(9342),l=b.aTypedArray,c=b.exportTypedArrayMethod,m=e.Uint16Array,i=m&&a(m.prototype.sort),u=!!i&&!(t(function(){i(new m(2),null)})&&t(function(){i(new m(2),{})})),s=!!i&&!t(function(){if(k)return k<74;if(S)return S<67;if(B)return!0;if(g)return g<602;var v=new m(516),C=Array(516),h,p;for(h=0;h<516;h++)p=h%4,v[h]=515-h,C[h]=h-2*p+3;for(i(v,function(N,V){return(N/4|0)-(V/4|0)}),h=0;h<516;h++)if(v[h]!==C[h])return!0}),d=function(C){return function(h,p){return C!==void 0?+C(h,p)||0:p!==p?-1:h!==h?1:h===0&&p===0?1/h>0&&1/p<0?1:-1:h>p}};c("sort",function(){function v(C){return C!==void 0&&o(C),s?i(this,C):f(l(this),d(C))}return v}(),!s||u)},72532:function(T,r,n){"use strict";var e=n(4246),a=n(10188),t=n(13912),o=n(31082),f=e.aTypedArray,b=e.exportTypedArrayMethod;b("subarray",function(){function S(B,k){var g=f(this),l=g.length,c=t(B,l),m=o(g);return new m(g.buffer,g.byteOffset+c*g.BYTES_PER_ELEMENT,a((k===void 0?l:t(k,l))-c))}return S}())},62207:function(T,r,n){"use strict";var e=n(74685),a=n(61267),t=n(4246),o=n(40033),f=n(54602),b=e.Int8Array,S=t.aTypedArray,B=t.exportTypedArrayMethod,k=[].toLocaleString,g=!!b&&o(function(){k.call(new b(1))}),l=o(function(){return[1,2].toLocaleString()!==new b([1,2]).toLocaleString()})||!o(function(){b.prototype.toLocaleString.call([1,2])});B("toLocaleString",function(){function c(){return a(k,g?f(S(this)):S(this),f(arguments))}return c}(),l)},906:function(T,r,n){"use strict";var e=n(4246).exportTypedArrayMethod,a=n(40033),t=n(74685),o=n(67250),f=t.Uint8Array,b=f&&f.prototype||{},S=[].toString,B=o([].join);a(function(){S.call({})})&&(S=function(){function g(){return B(this)}return g}());var k=b.toString!==S;e("toString",S,k)},78824:function(T,r,n){"use strict";var e=n(80185);e("Uint16",function(a){return function(){function t(o,f,b){return a(this,o,f,b)}return t}()})},72846:function(T,r,n){"use strict";var e=n(80185);e("Uint32",function(a){return function(){function t(o,f,b){return a(this,o,f,b)}return t}()})},24575:function(T,r,n){"use strict";var e=n(80185);e("Uint8",function(a){return function(){function t(o,f,b){return a(this,o,f,b)}return t}()})},71968:function(T,r,n){"use strict";var e=n(80185);e("Uint8",function(a){return function(){function t(o,f,b){return a(this,o,f,b)}return t}()},!0)},80040:function(T,r,n){"use strict";var e=n(50730),a=n(74685),t=n(67250),o=n(30145),f=n(81969),b=n(45150),S=n(39895),B=n(77568),k=n(5419).enforce,g=n(40033),l=n(21820),c=Object,m=Array.isArray,i=c.isExtensible,u=c.isFrozen,s=c.isSealed,d=c.freeze,v=c.seal,C=!a.ActiveXObject&&"ActiveXObject"in a,h,p=function(E){return function(){function P(){return E(this,arguments.length?arguments[0]:void 0)}return P}()},N=b("WeakMap",p,S),V=N.prototype,y=t(V.set),I=function(){return e&&g(function(){var E=d([]);return y(new N,E,1),!u(E)})};if(l)if(C){h=S.getConstructor(p,"WeakMap",!0),f.enable();var L=t(V.delete),w=t(V.has),A=t(V.get);o(V,{delete:function(){function x(E){if(B(E)&&!i(E)){var P=k(this);return P.frozen||(P.frozen=new h),L(this,E)||P.frozen.delete(E)}return L(this,E)}return x}(),has:function(){function x(E){if(B(E)&&!i(E)){var P=k(this);return P.frozen||(P.frozen=new h),w(this,E)||P.frozen.has(E)}return w(this,E)}return x}(),get:function(){function x(E){if(B(E)&&!i(E)){var P=k(this);return P.frozen||(P.frozen=new h),w(this,E)?A(this,E):P.frozen.get(E)}return A(this,E)}return x}(),set:function(){function x(E,P){if(B(E)&&!i(E)){var D=k(this);D.frozen||(D.frozen=new h),w(this,E)?y(this,E,P):D.frozen.set(E,P)}else y(this,E,P);return this}return x}()})}else I()&&o(V,{set:function(){function x(E,P){var D;return m(E)&&(u(E)?D=d:s(E)&&(D=v)),y(this,E,P),D&&D(E),this}return x}()})},90846:function(T,r,n){"use strict";n(80040)},67042:function(T,r,n){"use strict";var e=n(45150),a=n(39895);e("WeakSet",function(t){return function(){function o(){return t(this,arguments.length?arguments[0]:void 0)}return o}()},a)},40348:function(T,r,n){"use strict";n(67042)},5606:function(T,r,n){"use strict";var e=n(63964),a=n(74685),t=n(60375).clear;e({global:!0,bind:!0,enumerable:!0,forced:a.clearImmediate!==t},{clearImmediate:t})},83006:function(T,r,n){"use strict";n(5606),n(27807)},25764:function(T,r,n){"use strict";var e=n(63964),a=n(74685),t=n(37713),o=n(10320),f=n(24986),b=n(40033),S=n(58310),B=b(function(){return S&&Object.getOwnPropertyDescriptor(a,"queueMicrotask").value.length!==1});e({global:!0,enumerable:!0,dontCallGetSet:!0,forced:B},{queueMicrotask:function(){function k(g){f(arguments.length,1),t(o(g))}return k}()})},27807:function(T,r,n){"use strict";var e=n(63964),a=n(74685),t=n(60375).set,o=n(78362),f=a.setImmediate?o(t,!1):t;e({global:!0,bind:!0,enumerable:!0,forced:a.setImmediate!==f},{setImmediate:f})},45569:function(T,r,n){"use strict";var e=n(63964),a=n(74685),t=n(78362),o=t(a.setInterval,!0);e({global:!0,bind:!0,forced:a.setInterval!==o},{setInterval:o})},5213:function(T,r,n){"use strict";var e=n(63964),a=n(74685),t=n(78362),o=t(a.setTimeout,!0);e({global:!0,bind:!0,forced:a.setTimeout!==o},{setTimeout:o})},69401:function(T,r,n){"use strict";n(45569),n(5213)},7435:function(T){"use strict";/** * @file * @copyright 2020 Aleksej Komarov * @license MIT - */var r,n=[],e=[],a=function(){if(0)var k;window.onunload=function(){return r&&r.close()}},t=function(k){return e.push(k)},o=function(k){var g=[],l=function(u){return typeof u=="number"&&!Number.isFinite(u)?{__number__:String(u)}:typeof u=="undefined"?{__undefined__:!0}:u},c=function(u,s){if(typeof s=="object"){if(s===null)return s;if(g.includes(s))return"[circular ref]";g.push(s);var d=s instanceof Error||s.code&&s.message&&s.message.includes("Error");return d?{__error__:!0,string:String(s),stack:s.stack}:Array.isArray(s)?s.map(l):s}return l(s)},m=JSON.stringify(k,c);return g=null,m},f=function(k){if(0)var g,l,c},b=function(k,g){if(0)var l,c,m},y=function(){};T.exports={subscribe:t,sendMessage:f,sendLogEntry:b,setupHotReloading:y}}},kt={};function Y(T){var r=kt[T];if(r!==void 0)return r.exports;var n=kt[T]={exports:{}};return Jt[T](n,n.exports,Y),n.exports}(function(){Y.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch(T){if(typeof window=="object")return window}}()})(),function(){Y.o=function(T,r){return Object.prototype.hasOwnProperty.call(T,r)}}();var Rn={};(function(){"use strict";Y(33313),Y(10933),Y(79250),Y(53795),Y(87806),Y(64677),Y(48058),Y(51583),Y(82403),Y(34265),Y(3295),Y(1078),Y(63207),Y(80520),Y(39600),Y(93237),Y(32057),Y(68933),Y(47830),Y(13455),Y(64094),Y(61915),Y(32384),Y(25579),Y(63532),Y(33425),Y(43894),Y(99636),Y(34570),Y(94432),Y(24683),Y(69984),Y(32089),Y(60206),Y(29645),Y(4788),Y(58672),Y(19356),Y(48968),Y(49852),Y(2712),Y(864),Y(54243),Y(75621),Y(26267),Y(50095),Y(33451),Y(74587),Y(25082),Y(47421),Y(32122),Y(6306),Y(90216),Y(84663),Y(92332),Y(98329),Y(9631),Y(47091),Y(59660),Y(15383),Y(92866),Y(86107),Y(29248),Y(52540),Y(79007),Y(77199),Y(6522),Y(95542),Y(2966),Y(20997),Y(57400),Y(45571),Y(54800),Y(15709),Y(76059),Y(96614),Y(324),Y(90426),Y(95443),Y(87968),Y(55007),Y(55323),Y(13521),Y(5006),Y(99009),Y(85770),Y(23532),Y(87119),Y(78618),Y(27129),Y(31943),Y(3579),Y(97397),Y(85028),Y(8225),Y(43331),Y(62289),Y(56196),Y(2950),Y(44205),Y(76882),Y(83186),Y(76065),Y(13411),Y(26634),Y(53118),Y(42514),Y(84353),Y(62987),Y(48993),Y(52917),Y(4972),Y(28913),Y(36382),Y(53092),Y(69861),Y(29674),Y(81543),Y(9373),Y(45093),Y(63074),Y(5815),Y(88527),Y(66390),Y(7784),Y(50551),Y(76483),Y(92046),Y(63915),Y(51454),Y(79669),Y(23057),Y(57983),Y(17953),Y(30442),Y(6403),Y(9867),Y(43673),Y(12354),Y(22515),Y(5143),Y(93514),Y(5416),Y(11619),Y(44590),Y(63272),Y(39930),Y(4038),Y(8448),Y(70604),Y(34965),Y(95309),Y(82256),Y(49484),Y(38931),Y(39308),Y(91550),Y(75008),Y(56027),Y(50340),Y(34325),Y(74498),Y(15812),Y(57726),Y(80756),Y(70567),Y(66756),Y(60037),Y(44195),Y(24575),Y(71968),Y(78824),Y(72846),Y(99872),Y(73364),Y(58166),Y(23793),Y(43820),Y(13917),Y(19852),Y(40379),Y(92770),Y(81069),Y(63689),Y(5659),Y(25014),Y(32189),Y(23030),Y(24309),Y(49110),Y(56445),Y(30939),Y(48321),Y(88739),Y(60415),Y(72532),Y(62207),Y(906),Y(90846),Y(40348),Y(83006),Y(25764),Y(69401),Y(95012),Y(30236)})(),function(){"use strict";var T=Y(89005);Y(67160),Y(23542),Y(30386),Y(98996),Y(50578),Y(4444),Y(77870),Y(39108),Y(11714),Y(73492),Y(49641),Y(17570),Y(61858),Y(32882),Y(23632),Y(56492);var r=Y(85822),n=Y(7435),e=Y(56518),a=Y(26427),t=Y(18498),o=Y(49060),f=Y(72178),b=Y(24826),y;/** + */var r,n=[],e=[],a=function(){if(0)var k;window.onunload=function(){return r&&r.close()}},t=function(k){return e.push(k)},o=function(k){var g=[],l=function(u){return typeof u=="number"&&!Number.isFinite(u)?{__number__:String(u)}:typeof u=="undefined"?{__undefined__:!0}:u},c=function(u,s){if(typeof s=="object"){if(s===null)return s;if(g.includes(s))return"[circular ref]";g.push(s);var d=s instanceof Error||s.code&&s.message&&s.message.includes("Error");return d?{__error__:!0,string:String(s),stack:s.stack}:Array.isArray(s)?s.map(l):s}return l(s)},m=JSON.stringify(k,c);return g=null,m},f=function(k){if(0)var g,l,c},b=function(k,g){if(0)var l,c,m},S=function(){};T.exports={subscribe:t,sendMessage:f,sendLogEntry:b,setupHotReloading:S}}},kt={};function Y(T){var r=kt[T];if(r!==void 0)return r.exports;var n=kt[T]={exports:{}};return Jt[T](n,n.exports,Y),n.exports}(function(){Y.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch(T){if(typeof window=="object")return window}}()})(),function(){Y.o=function(T,r){return Object.prototype.hasOwnProperty.call(T,r)}}();var Rn={};(function(){"use strict";Y(33313),Y(10933),Y(79250),Y(53795),Y(87806),Y(64677),Y(48058),Y(51583),Y(82403),Y(34265),Y(3295),Y(1078),Y(63207),Y(80520),Y(39600),Y(93237),Y(32057),Y(68933),Y(47830),Y(13455),Y(64094),Y(61915),Y(32384),Y(25579),Y(63532),Y(33425),Y(43894),Y(99636),Y(34570),Y(94432),Y(24683),Y(69984),Y(32089),Y(60206),Y(29645),Y(4788),Y(58672),Y(19356),Y(48968),Y(49852),Y(2712),Y(864),Y(54243),Y(75621),Y(26267),Y(50095),Y(33451),Y(74587),Y(25082),Y(47421),Y(32122),Y(6306),Y(90216),Y(84663),Y(92332),Y(98329),Y(9631),Y(47091),Y(59660),Y(15383),Y(92866),Y(86107),Y(29248),Y(52540),Y(79007),Y(77199),Y(6522),Y(95542),Y(2966),Y(20997),Y(57400),Y(45571),Y(54800),Y(15709),Y(76059),Y(96614),Y(324),Y(90426),Y(95443),Y(87968),Y(55007),Y(55323),Y(13521),Y(5006),Y(99009),Y(85770),Y(23532),Y(87119),Y(78618),Y(27129),Y(31943),Y(3579),Y(97397),Y(85028),Y(8225),Y(43331),Y(62289),Y(56196),Y(2950),Y(44205),Y(76882),Y(83186),Y(76065),Y(13411),Y(26634),Y(53118),Y(42514),Y(84353),Y(62987),Y(48993),Y(52917),Y(4972),Y(28913),Y(36382),Y(53092),Y(69861),Y(29674),Y(81543),Y(9373),Y(45093),Y(63074),Y(5815),Y(88527),Y(66390),Y(7784),Y(50551),Y(76483),Y(92046),Y(63915),Y(51454),Y(79669),Y(23057),Y(57983),Y(17953),Y(30442),Y(6403),Y(9867),Y(43673),Y(12354),Y(22515),Y(5143),Y(93514),Y(5416),Y(11619),Y(44590),Y(63272),Y(39930),Y(4038),Y(8448),Y(70604),Y(34965),Y(95309),Y(82256),Y(49484),Y(38931),Y(39308),Y(91550),Y(75008),Y(56027),Y(50340),Y(34325),Y(74498),Y(15812),Y(57726),Y(80756),Y(70567),Y(66756),Y(60037),Y(44195),Y(24575),Y(71968),Y(78824),Y(72846),Y(99872),Y(73364),Y(58166),Y(23793),Y(43820),Y(13917),Y(19852),Y(40379),Y(92770),Y(81069),Y(63689),Y(5659),Y(25014),Y(32189),Y(23030),Y(24309),Y(49110),Y(56445),Y(30939),Y(48321),Y(88739),Y(60415),Y(72532),Y(62207),Y(906),Y(90846),Y(40348),Y(83006),Y(25764),Y(69401),Y(95012),Y(30236)})(),function(){"use strict";var T=Y(89005);Y(67160),Y(23542),Y(30386),Y(98996),Y(50578),Y(4444),Y(77870),Y(39108),Y(11714),Y(73492),Y(49641),Y(17570),Y(61858),Y(32882),Y(23632),Y(56492);var r=Y(85822),n=Y(7435),e=Y(56518),a=Y(26427),t=Y(18498),o=Y(49060),f=Y(72178),b=Y(24826),S;/** * @file * @copyright 2020 Aleksej Komarov * @license MIT - */r.perf.mark("inception",(y=window.performance)==null||(y=y.timing)==null?void 0:y.navigationStart),r.perf.mark("init");var B=(0,f.configureStore)(),k=(0,o.createRenderer)(function(){(0,a.loadIconRefMap)();var l=Y(71253),c=l.getRoutedComponent,m=c(B);return(0,T.createComponentVNode)(2,f.StoreProvider,{store:B,children:(0,T.createComponentVNode)(2,m)})}),g=function l(){if(document.readyState==="loading"){document.addEventListener("DOMContentLoaded",l);return}(0,b.setupGlobalEvents)(),(0,e.setupHotKeys)(),(0,t.captureExternalLinks)(),B.subscribe(k),Byond.subscribe(function(c,m){return B.dispatch({type:c,payload:m})})};g()}()})();})(); + */r.perf.mark("inception",(S=window.performance)==null||(S=S.timing)==null?void 0:S.navigationStart),r.perf.mark("init");var B=(0,f.configureStore)(),k=(0,o.createRenderer)(function(){(0,a.loadIconRefMap)();var l=Y(71253),c=l.getRoutedComponent,m=c(B);return(0,T.createComponentVNode)(2,f.StoreProvider,{store:B,children:(0,T.createComponentVNode)(2,m)})}),g=function l(){if(document.readyState==="loading"){document.addEventListener("DOMContentLoaded",l);return}(0,b.setupGlobalEvents)(),(0,e.setupHotKeys)(),(0,t.captureExternalLinks)(),B.subscribe(k),Byond.subscribe(function(c,m){return B.dispatch({type:c,payload:m})})};g()}()})();})();