diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index e969d1aa7447..ed94643dbe36 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -31,6 +31,7 @@ # Zonespace /code/datums/tutorial/ @Zonespace27 +/code/modules/admin/verbs/SDQL2/ @Zonespace27 /maps/tutorial/ @Zonespace27 # MULTIPLE OWNERS diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index cdf7ce11784e..fb924fe250a0 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -1,7 +1,7 @@ name: Labeling and Verification on: pull_request_target: - types: [opened, edited] + types: [opened, reopened, synchronize, edited] jobs: label: runs-on: ubuntu-latest diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 000000000000..2b7500b2316b --- /dev/null +++ b/.prettierignore @@ -0,0 +1,5 @@ +# We don't want prettier to run on anything outside of the TGUI folder, so we have to do this. +/* + +# We want it to run into the TGUI folder, however. +!/tgui diff --git a/.vscode/settings.json b/.vscode/settings.json index c7b218b77591..d29a55ea060c 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,7 +1,7 @@ { "eslint.nodePath": "./tgui/.yarn/sdks", "eslint.workingDirectories": ["./tgui"], - "prettier.prettierPath": "./tgui/.yarn/sdks/prettier/index.js", + "prettier.prettierPath": "./tgui/.yarn/sdks/prettier/index.cjs", "typescript.tsdk": "./tgui/.yarn/sdks/typescript/lib", "typescript.enablePromptUseWorkspaceTsdk": true, "search.exclude": { @@ -14,6 +14,7 @@ "files.eol": "\n", "files.insertFinalNewline": true, "gitlens.advanced.blame.customArguments": ["-w"], + "tgstationTestExplorer.project.resultsType": "json", "[javascript]": { "editor.rulers": [80], "editor.defaultFormatter": "esbenp.prettier-vscode", diff --git a/code/__DEFINES/_math.dm b/code/__DEFINES/_math.dm index d7c068237987..0f471ec70bad 100644 --- a/code/__DEFINES/_math.dm +++ b/code/__DEFINES/_math.dm @@ -12,15 +12,10 @@ #define LEFT 1 #define RIGHT 2 -#define CEILING(x, y) ( -round(-(x) / (y)) * (y) ) - -#define ROUND_UP(x) ( -round(-(x))) +#define CEILING(x, y) ( ceil((x) / (y)) * (y) ) // round() acts like floor(x, 1) by default but can't handle other values -#define FLOOR(x, y) ( round((x) / (y)) * (y) ) - -// Real modulus that handles decimals -#define MODULUS(x, y) ( (x) - (y) * round((x) / (y)) ) +#define FLOOR(x, y) ( floor((x) / (y)) * (y) ) // Returns true if val is from min to max, inclusive. #define ISINRANGE(val, min, max) ((min) <= (val) && (val) <= (max)) @@ -28,10 +23,6 @@ // Same as above, exclusive. #define ISINRANGE_EX(val, min, max) ((min) < (val) && (val) < (max)) -// Will filter out extra rotations and negative rotations -// E.g: 540 becomes 180. -180 becomes 180. -#define SIMPLIFY_DEGREES(degrees) (MODULUS((degrees), 360)) - /// Gets the sign of x, returns -1 if negative, 0 if 0, 1 if positive #define SIGN(x) ( ((x) > 0) - ((x) < 0) ) diff --git a/code/__DEFINES/admin.dm b/code/__DEFINES/admin.dm index 31103fee93ee..3137088d1c90 100644 --- a/code/__DEFINES/admin.dm +++ b/code/__DEFINES/admin.dm @@ -17,12 +17,10 @@ #define NOTE_ADMIN 1 ///This note is used by staff for positive record keeping. #define NOTE_MERIT 2 -///These notes are used by respective whitelist councils for record keeping. -#define NOTE_COMMANDER 3 -#define NOTE_SYNTHETIC 4 -#define NOTE_YAUTJA 5 +///These notes are automatically applied by the Whitelist Panel. +#define NOTE_WHITELIST 3 ///Note categories in text form, in order of their numerical #defines. -GLOBAL_LIST_INIT(note_categories, list("Admin", "Merit", "Commanding Officer", "Synthetic", "Yautja")) +GLOBAL_LIST_INIT(note_categories, list("Admin", "Merit", "Whitelist")) #define ADMIN_FLW(user) "(FLW)" #define ADMIN_PP(user) "(PP)" diff --git a/code/__DEFINES/autofire.dm b/code/__DEFINES/autofire.dm index 934cdcd7dc79..f276f487b666 100644 --- a/code/__DEFINES/autofire.dm +++ b/code/__DEFINES/autofire.dm @@ -1,4 +1,4 @@ // Controls how many buckets should be kept, each representing a tick. Max is ten seconds, to have better perf. #define AUTOFIRE_BUCKET_LEN (world.fps * 10) /// Helper for getting the correct bucket -#define AUTOFIRE_BUCKET_POS(next_fire) (((round((next_fire - SSautomatedfire.head_offset) / world.tick_lag) + 1) % AUTOFIRE_BUCKET_LEN) || AUTOFIRE_BUCKET_LEN) +#define AUTOFIRE_BUCKET_POS(next_fire) (((floor((next_fire - SSautomatedfire.head_offset) / world.tick_lag) + 1) % AUTOFIRE_BUCKET_LEN) || AUTOFIRE_BUCKET_LEN) diff --git a/code/__DEFINES/client_prefs.dm b/code/__DEFINES/client_prefs.dm index 5337f64d9e46..56775bea8888 100644 --- a/code/__DEFINES/client_prefs.dm +++ b/code/__DEFINES/client_prefs.dm @@ -24,6 +24,7 @@ #define TOGGLE_START_JOIN_CURRENT_SLOT (1<<16) // Whether joining at roundstart ignores assigned character slot for the job and uses currently selected slot. #define TOGGLE_LATE_JOIN_CURRENT_SLOT (1<<17) //Whether joining during the round ignores assigned character slot for the job and uses currently selected slot. #define TOGGLE_ABILITY_DEACTIVATION_OFF (1<<18) // This toggles whether selecting the same ability again can toggle it off +#define TOGGLE_AMMO_DISPLAY_TYPE (1<<19)/// limit how often the ammo is displayed when using semi-automatic fire #define JOB_SLOT_RANDOMISED_SLOT -1 #define JOB_SLOT_CURRENT_SLOT 0 diff --git a/code/__DEFINES/dcs/signals/atom/signals_obj.dm b/code/__DEFINES/dcs/signals/atom/signals_obj.dm index ed27c26b2115..c850b2a52e03 100644 --- a/code/__DEFINES/dcs/signals/atom/signals_obj.dm +++ b/code/__DEFINES/dcs/signals/atom/signals_obj.dm @@ -30,8 +30,16 @@ #define COMSIG_TENT_COLLAPSING "tent_collapsing" /// from /obj/proc/afterbuckle() -#define COSMIG_OBJ_AFTER_BUCKLE "signal_obj_after_buckle" +#define COMSIG_OBJ_AFTER_BUCKLE "signal_obj_after_buckle" +/// from /datum/cm_objective/retrieve_data/disk/process() +#define COMSIG_INTEL_DISK_LOST_POWER "intel_disk_lost_power" + +/// from /datum/cm_objective/retrieve_data/disk/complete() +#define COMSIG_INTEL_DISK_COMPLETED "intel_disk_completed" + +/// from /obj/vehicle/multitile/arc/toggle_antenna() +#define COMSIG_ARC_ANTENNA_TOGGLED "arc_antenna_toggled" /// from /obj/structure/machinery/cryopod/go_out() #define COMSIG_CRYOPOD_GO_OUT "cryopod_go_out" diff --git a/code/__DEFINES/equipment.dm b/code/__DEFINES/equipment.dm index b37ae0d59d64..a420ae5fd365 100644 --- a/code/__DEFINES/equipment.dm +++ b/code/__DEFINES/equipment.dm @@ -46,6 +46,8 @@ #define HTML_USE_INITAL_ICON (1<<18) // Whether or not the object sees emotes #define USES_SEEING (1<<19) +// Can be quick drawn +#define QUICK_DRAWABLE (1<<20) //========================================================================================== @@ -86,6 +88,8 @@ #define IGNITING_ITEM (1<<13) /// Overrides NODROP in some cases (stripping) #define FORCEDROP_CONDITIONAL (1<<14) +/// Overrides smartgunner not being able to wear backpacks +#define SMARTGUNNER_BACKPACK_OVERRIDE (1<<15) //========================================================================================== diff --git a/code/__DEFINES/job.dm b/code/__DEFINES/job.dm index 5ab7dcdb25ec..29845db09c84 100644 --- a/code/__DEFINES/job.dm +++ b/code/__DEFINES/job.dm @@ -207,6 +207,7 @@ GLOBAL_LIST_INIT(job_command_roles, JOB_COMMAND_ROLES_LIST) //-------- WY Goons --------// #define JOB_WY_GOON "WY Corporate Security" +#define JOB_WY_GOON_TECH "WY Corporate Security Technician" #define JOB_WY_GOON_LEAD "WY Corporate Security Lead" #define JOB_WY_GOON_RESEARCHER "WY Research Consultant" diff --git a/code/__DEFINES/mode.dm b/code/__DEFINES/mode.dm index b676a6a11d66..12ed70c8831d 100644 --- a/code/__DEFINES/mode.dm +++ b/code/__DEFINES/mode.dm @@ -77,6 +77,7 @@ #define ROUNDSTATUS_FOG_DOWN 1 #define ROUNDSTATUS_PODDOORS_OPEN 2 +#define LATEJOIN_MARINES_PER_LATEJOIN_LARVA_EARLY 4 #define LATEJOIN_MARINES_PER_LATEJOIN_LARVA 2.5 //================================================= diff --git a/code/__DEFINES/traits.dm b/code/__DEFINES/traits.dm index 881c41182ab4..988f82f3b73e 100644 --- a/code/__DEFINES/traits.dm +++ b/code/__DEFINES/traits.dm @@ -267,7 +267,7 @@ #define TRAIT_GUN_BIPODDED "t_gun_bipodded" -#define TRAIT_GUN_LIGHT_DEACTIVATED "t_gun_light_deactivated" +#define TRAIT_GUN_LIGHT_FORCE_DEACTIVATED "t_gun_light_deactivated" /// If this ID belongs to an ERT member #define TRAIT_ERT_ID "ert_id" @@ -354,6 +354,7 @@ GLOBAL_LIST_INIT(traits_by_type, list( /mob/living/carbon/xenomorph = list( "TRAIT_ABILITY_NO_PLASMA_TRANSFER" = TRAIT_ABILITY_NO_PLASMA_TRANSFER, "TRAIT_ABILITY_OVIPOSITOR" = TRAIT_ABILITY_OVIPOSITOR, + "TRAIT_OPPOSABLE_THUMBS" = TRAIT_OPPOSABLE_THUMBS, ), /datum/hive_status = list( "TRAIT_XENONID" = TRAIT_XENONID, diff --git a/code/__DEFINES/turfs.dm b/code/__DEFINES/turfs.dm index b9a80d4ab257..158c66754e18 100644 --- a/code/__DEFINES/turfs.dm +++ b/code/__DEFINES/turfs.dm @@ -1,23 +1,27 @@ #define RANGE_TURFS(RADIUS, CENTER) \ -block( \ - locate(max(CENTER.x-(RADIUS),1), max(CENTER.y-(RADIUS),1), CENTER.z), \ - locate(min(CENTER.x+(RADIUS),world.maxx), min(CENTER.y+(RADIUS),world.maxy), CENTER.z) \ -) + block( \ + (CENTER).x-(RADIUS), (CENTER).y-(RADIUS), (CENTER).z, \ + (CENTER).x+(RADIUS), (CENTER).y+(RADIUS), (CENTER).z \ + ) #define RECT_TURFS(H_RADIUS, V_RADIUS, CENTER) \ block( \ - locate(max((CENTER).x-(H_RADIUS),1), max((CENTER).y-(V_RADIUS),1), (CENTER).z), \ - locate(min((CENTER).x+(H_RADIUS),world.maxx), min((CENTER).y+(V_RADIUS),world.maxy), (CENTER).z) \ + (CENTER).x-(H_RADIUS), (CENTER).y-(V_RADIUS), (CENTER).z, \ + (CENTER).x+(H_RADIUS), (CENTER).y+(V_RADIUS), (CENTER).z \ ) ///Returns all turfs in a zlevel -#define Z_TURFS(ZLEVEL) block(locate(1,1,ZLEVEL), locate(world.maxx, world.maxy, ZLEVEL)) +#define Z_TURFS(ZLEVEL) block(1, 1, (ZLEVEL), world.maxx, world.maxy, (ZLEVEL)) -/// Returns a list of turfs in the rectangle specified by BOTTOM LEFT corner and height/width, checks for being outside the world border for you +/// Returns a list of turfs in the rectangle specified by BOTTOM LEFT corner and height/width #define CORNER_BLOCK(corner, width, height) CORNER_BLOCK_OFFSET(corner, width, height, 0, 0) /// Returns a list of turfs similar to CORNER_BLOCK but with offsets -#define CORNER_BLOCK_OFFSET(corner, width, height, offset_x, offset_y) ((block(locate(corner.x + offset_x, corner.y + offset_y, corner.z), locate(min(corner.x + (width - 1) + offset_x, world.maxx), min(corner.y + (height - 1) + offset_y, world.maxy), corner.z)))) +#define CORNER_BLOCK_OFFSET(corner, width, height, offset_x, offset_y) \ + block( \ + (corner).x + (offset_x), (corner).y + (offset_y), (corner).z, \ + (corner).x + ((width) - 1) + (offset_x), (corner).y + ((height) - 1) + (offset_y), (corner).z \ + ) /// Returns an outline (neighboring turfs) of the given block #define CORNER_OUTLINE(corner, width, height) ( \ diff --git a/code/__DEFINES/vehicle.dm b/code/__DEFINES/vehicle.dm index 8a1617229926..5eb6a824d8ac 100644 --- a/code/__DEFINES/vehicle.dm +++ b/code/__DEFINES/vehicle.dm @@ -7,7 +7,7 @@ #define HDPT_TURRET "turret" #define HDPT_SPECIAL "special" //special pre-installed hardpoints with unique behaviour -#define HDPT_LAYER_WHEELS 1 +#define HDPT_LAYER_WHEELS 0.01 // so it appears below xenomorphs and other mobs #define HDPT_LAYER_SUPPORT 2 #define HDPT_LAYER_ARMOR 3 #define HDPT_LAYER_TURRET 4 diff --git a/code/__HELPERS/#maths.dm b/code/__HELPERS/#maths.dm index f8a9292d3806..076d96e0126d 100644 --- a/code/__HELPERS/#maths.dm +++ b/code/__HELPERS/#maths.dm @@ -8,7 +8,6 @@ GLOBAL_LIST_INIT(sqrtTable, list(1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, // MATH DEFINES -#define Ceiling(x) (-round(-(x))) #define CLAMP01(x) (clamp((x), 0, 1)) // cotangent @@ -18,7 +17,6 @@ GLOBAL_LIST_INIT(sqrtTable, list(1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, #define Csc(x) (1 / sin(x)) #define Default(a, b) ((a) ? (a) : (b)) -#define Floor(x) (round(x)) // Greatest Common Divisor - Euclid's algorithm #define Gcd(a, b) ((b) ? Gcd((b), (a) % (b)) : (a)) @@ -26,7 +24,7 @@ GLOBAL_LIST_INIT(sqrtTable, list(1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, #define Inverse(x) (1 / (x)) #define IsEven(x) ((x) % 2 == 0) -#define IsInteger(x) (Floor(x) == (x)) +#define IsInteger(x) (floor(x) == (x)) #define IsOdd(x) (!IsEven(x)) #define IsMultiple(x, y) ((x) % (y) == 0) @@ -46,7 +44,7 @@ GLOBAL_LIST_INIT(sqrtTable, list(1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, #define ToRadians(degrees) ((degrees) * 0.0174532925) // min is inclusive, max is exclusive -#define WRAP(val, min, max) clamp(( (min) == (max) ? (min) : (val) - (round(((val) - (min))/((max) - (min))) * ((max) - (min))) ),(min),(max)) +#define WRAP(val, min, max) clamp(( (min) == (max) ? (min) : (val) - (floor(((val) - (min))/((max) - (min))) * ((max) - (min))) ),(min),(max)) // MATH PROCS @@ -99,7 +97,7 @@ GLOBAL_LIST_INIT(sqrtTable, list(1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, var/static/list/units_prefix = list("", "un", "duo", "tre", "quattuor", "quin", "sex", "septen", "octo", "novem") var/static/list/tens_prefix = list("", "decem", "vigin", "trigin", "quadragin", "quinquagin", "sexagin", "septuagin", "octogin", "nongen") var/static/list/one_to_nine = list("monuple", "double", "triple", "quadruple", "quintuple", "sextuple", "septuple", "octuple", "nonuple") - number = round(number) + number = floor(number) switch(number) if(0) return "empty tuple" @@ -108,7 +106,7 @@ GLOBAL_LIST_INIT(sqrtTable, list(1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, if(10 to 19) return "[units_prefix[(number%10)+1]]decuple" if(20 to 99) - return "[units_prefix[(number%10)+1]][tens_prefix[round((number % 100)/10)+1]]tuple" + return "[units_prefix[(number%10)+1]][tens_prefix[floor((number % 100)/10)+1]]tuple" if(100) return "centuple" else //It gets too tedious to use latin prefixes from here. diff --git a/code/__HELPERS/_time.dm b/code/__HELPERS/_time.dm index 733ca659501b..5ed4fbcb7d84 100644 --- a/code/__HELPERS/_time.dm +++ b/code/__HELPERS/_time.dm @@ -48,7 +48,7 @@ GLOBAL_VAR_INIT(rollovercheck_last_timeofday, 0) return gameTimestamp("mm:ss", time) /proc/time_left_until(target_time, current_time, time_unit) - return Ceiling(target_time - current_time) / time_unit + return ceil(target_time - current_time) / time_unit /proc/text2duration(text = "00:00") // Attempts to convert time text back to time value var/split_text = splittext(text, ":") @@ -91,22 +91,22 @@ GLOBAL_VAR_INIT(rollovercheck_last_timeofday, 0) return "right now" if(second < 60) return "[second] second[(second != 1)? "s":""]" - var/minute = Floor(second / 60) - second = FLOOR(MODULUS(second, 60), round_seconds_to) + var/minute = floor(second / 60) + second = FLOOR(second %% 60, round_seconds_to) var/secondT if(second) secondT = " and [second] second[(second != 1)? "s":""]" if(minute < 60) return "[minute] minute[(minute != 1)? "s":""][secondT]" - var/hour = Floor(minute / 60) - minute = MODULUS(minute, 60) + var/hour = floor(minute / 60) + minute %%= 60 var/minuteT if(minute) minuteT = " and [minute] minute[(minute != 1)? "s":""]" if(hour < 24) return "[hour] hour[(hour != 1)? "s":""][minuteT][secondT]" - var/day = Floor(hour / 24) - hour = MODULUS(hour, 24) + var/day = floor(hour / 24) + hour %%= 24 var/hourT if(hour) hourT = " and [hour] hour[(hour != 1)? "s":""]" diff --git a/code/__HELPERS/files.dm b/code/__HELPERS/files.dm index 54bb438cd167..c974980bbe84 100644 --- a/code/__HELPERS/files.dm +++ b/code/__HELPERS/files.dm @@ -48,7 +48,7 @@ /client/proc/file_spam_check() var/time_to_wait = GLOB.fileaccess_timer - world.time if(time_to_wait > 0) - to_chat(src, "Error: file_spam_check(): Spam. Please wait [round(time_to_wait/10)] seconds.") + to_chat(src, "Error: file_spam_check(): Spam. Please wait [floor(time_to_wait/10)] seconds.") return 1 GLOB.fileaccess_timer = world.time + FTPDELAY return 0 diff --git a/code/__HELPERS/game.dm b/code/__HELPERS/game.dm index 64f4515396f6..721c179b9cef 100644 --- a/code/__HELPERS/game.dm +++ b/code/__HELPERS/game.dm @@ -190,7 +190,7 @@ if(X1 1 || swapped) swapped = 0 if(gap > 1) - gap = round(gap / 1.3) // 1.3 is the emperic comb sort coefficient + gap = floor(gap / 1.3) // 1.3 is the emperic comb sort coefficient if(gap < 1) gap = 1 for(var/i = 1; gap + i <= result.len; i++) diff --git a/code/__HELPERS/lists.dm b/code/__HELPERS/lists.dm index 9a8528aabcc3..a1b38b48f754 100644 --- a/code/__HELPERS/lists.dm +++ b/code/__HELPERS/lists.dm @@ -597,7 +597,7 @@ if(L.len <= 1) return L - var/middle = Floor(L.len / 2) + var/middle = floor(L.len / 2) var/list/left = custom_mergesort(L.Copy(1, middle + 1)) var/list/right = custom_mergesort(L.Copy(middle + 1)) var/list/result = list() diff --git a/code/__HELPERS/sanitize_values.dm b/code/__HELPERS/sanitize_values.dm index 85e102a3c1ac..35df8644ad61 100644 --- a/code/__HELPERS/sanitize_values.dm +++ b/code/__HELPERS/sanitize_values.dm @@ -1,7 +1,7 @@ //general stuff /proc/sanitize_integer(number, min=0, max=1, default=0) if(isnum(number)) - number = round(number) + number = floor(number) if(min <= number && number <= max) return number return default diff --git a/code/__HELPERS/sorts/_Main.dm b/code/__HELPERS/sorts/_Main.dm index 55af258b81d2..7fe3adf02870 100644 --- a/code/__HELPERS/sorts/_Main.dm +++ b/code/__HELPERS/sorts/_Main.dm @@ -113,7 +113,7 @@ GLOBAL_DATUM_INIT(sortInstance, /datum/sortInstance, new()) //[lo, left) elements <= pivot < [right, start) elements //in other words, find where the pivot element should go using bisection search while(left < right) - var/mid = (left + right) >> 1 //round((left+right)/2) + var/mid = (left + right) >> 1 //floor((left+right)/2) if(call(cmp)(fetchElement(L,mid), pivot) > 0) right = mid else diff --git a/code/__HELPERS/type2type.dm b/code/__HELPERS/type2type.dm index 5d0d113b0c55..e1d53e0a81d0 100644 --- a/code/__HELPERS/type2type.dm +++ b/code/__HELPERS/type2type.dm @@ -60,7 +60,7 @@ var/power = null power = i - 1 while(power >= 0) - var/val = round(num / 16 ** power) + var/val = floor(num / 16 ** power) num -= val * 16 ** power switch(val) if(9.0, 8.0, 7.0, 6.0, 5.0, 4.0, 3.0, 2.0, 1.0, 0.0) diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm index aa23131847d7..88bc3e8af9f5 100644 --- a/code/__HELPERS/unsorted.dm +++ b/code/__HELPERS/unsorted.dm @@ -40,15 +40,15 @@ #define skillcheckexplicit(user, skill, req_level) ((!user.skills || user.skills.is_skilled((skill), (req_level), TRUE))) // Ensure the frequency is within bounds of what it should be sending/receiving at -// Sets f within bounds via `clamp(round(f), 1441, 1489)` +// Sets f within bounds via `clamp(floor(f), 1441, 1489)` // If f is even, adds 1 to its value to make it odd -#define sanitize_frequency(f) ((clamp(round(f), 1441, 1489) % 2) == 0 ? \ - clamp(round(f), 1441, 1489) + 1 : \ - clamp(round(f), 1441, 1489) \ +#define sanitize_frequency(f) ((clamp(floor(f), 1441, 1489) % 2) == 0 ? \ + clamp(floor(f), 1441, 1489) + 1 : \ + clamp(floor(f), 1441, 1489) \ ) //Turns 1479 into 147.9 -#define format_frequency(f) "[round((f) / 10)].[(f) % 10]" +#define format_frequency(f) "[floor((f) / 10)].[(f) % 10]" #define reverse_direction(direction) ( \ ( dir & (NORTH|SOUTH) ? ~dir & (NORTH|SOUTH) : 0 ) | \ @@ -729,8 +729,7 @@ if(orange) turfs -= get_turf(center) . = list() - for(var/V in turfs) - var/turf/T = V + for(var/turf/T as anything in turfs) . += T . += T.contents if(areas) @@ -1060,7 +1059,7 @@ GLOBAL_DATUM(action_purple_power_up, /image) var/cur_user_zone_sel = busy_user.zone_selected var/cur_target_zone_sel - var/delayfraction = Ceiling(delay/numticks) + var/delayfraction = ceil(delay/numticks) var/user_orig_loc = busy_user.loc var/user_orig_turf = get_turf(busy_user) var/target_orig_loc @@ -1562,7 +1561,7 @@ GLOBAL_LIST_INIT(WALLITEMS, list( . = 0 var/i = DS2TICKS(initial_delay) do - . += Ceiling(i*DELTA_CALC) + . += ceil(i*DELTA_CALC) sleep(i*world.tick_lag*DELTA_CALC) i *= 2 while (TICK_USAGE > min(TICK_LIMIT_TO_RUN, Master.current_ticklimit)) @@ -1665,7 +1664,7 @@ GLOBAL_LIST_INIT(WALLITEMS, list( // Redistribute the net displacement evenly on the side of the center line that needs it // Only half the points are gonna be affected. - var/to_redistribute = abs(Ceiling(net_displacement / (variances.len/2))) + var/to_redistribute = abs(ceil(net_displacement / (variances.len/2))) for(var/i in 1 to variances.len) if(!net_displacement) break @@ -1767,8 +1766,8 @@ GLOBAL_DATUM_INIT(dview_mob, /mob/dview, new) pixel_y_offset += ((AMiconheight/world.icon_size)-1)*(world.icon_size*0.5) //DY and DX - var/rough_x = round(round(pixel_x_offset,world.icon_size)/world.icon_size) - var/rough_y = round(round(pixel_y_offset,world.icon_size)/world.icon_size) + var/rough_x = floor(round(pixel_x_offset,world.icon_size)/world.icon_size) + var/rough_y = floor(round(pixel_y_offset,world.icon_size)/world.icon_size) //Find coordinates var/turf/T = get_turf(AM) //use AM's turfs, as it's coords are the same as AM's AND AM's coords are lost if it is inside another atom diff --git a/code/_globalvars/bitfields.dm b/code/_globalvars/bitfields.dm index 616c88c47a9d..facc2b951ad3 100644 --- a/code/_globalvars/bitfields.dm +++ b/code/_globalvars/bitfields.dm @@ -152,6 +152,7 @@ DEFINE_BITFIELD(flags_atom, list( "ATOM_DECORATED" = ATOM_DECORATED, "USES_HEARING" = USES_HEARING, "HTML_USE_INITAL_ICON" = HTML_USE_INITAL_ICON, + "QUICK_DRAWABLE" = QUICK_DRAWABLE, )) DEFINE_BITFIELD(turf_flags, list( diff --git a/code/_globalvars/global_lists.dm b/code/_globalvars/global_lists.dm index c23f1fc7931f..c0fd361c6203 100644 --- a/code/_globalvars/global_lists.dm +++ b/code/_globalvars/global_lists.dm @@ -375,7 +375,7 @@ GLOBAL_LIST_INIT(hj_emotes, setup_hazard_joe_emotes()) while(gap > 1 || swapped) swapped = 0 if(gap > 1) - gap = round(gap / 1.247330950103979) + gap = floor(gap / 1.247330950103979) if(gap < 1) gap = 1 for(var/i = 1; gap + i <= length(surgeries); i++) diff --git a/code/_onclick/click.dm b/code/_onclick/click.dm index 72e298d32729..57c529c7a156 100644 --- a/code/_onclick/click.dm +++ b/code/_onclick/click.dm @@ -376,8 +376,8 @@ var/shiftX = C.pixel_x / world.icon_size var/shiftY = C.pixel_y / world.icon_size var/list/actual_view = getviewsize(C ? C.view : GLOB.world_view_size) - tX = clamp(origin.x + text2num(tX) + shiftX - round(actual_view[1] / 2) - 1, 1, world.maxx) - tY = clamp(origin.y + text2num(tY) + shiftY - round(actual_view[2] / 2) - 1, 1, world.maxy) + tX = clamp(origin.x + text2num(tX) + shiftX - floor(actual_view[1] / 2) - 1, 1, world.maxx) + tY = clamp(origin.y + text2num(tY) + shiftY - floor(actual_view[2] / 2) - 1, 1, world.maxy) return locate(tX, tY, tZ) diff --git a/code/_onclick/hud/radial.dm b/code/_onclick/hud/radial.dm index 4a23ebd882d3..2886b2edb0ee 100644 --- a/code/_onclick/hud/radial.dm +++ b/code/_onclick/hud/radial.dm @@ -142,7 +142,7 @@ GLOBAL_LIST_EMPTY(radial_menus) else zone = 360 - starting_angle + ending_angle - max_elements = round(zone / min_angle) + max_elements = floor(zone / min_angle) var/paged = max_elements < choices.len if(elements.len < max_elements) var/elements_to_add = max_elements - elements.len @@ -177,7 +177,7 @@ GLOBAL_LIST_EMPTY(radial_menus) /datum/radial_menu/proc/update_screen_objects(anim = FALSE) var/list/page_choices = page_data[current_page] - var/angle_per_element = round(zone / length(page_choices)) + var/angle_per_element = floor(zone / length(page_choices)) for(var/i in 1 to length(elements)) var/atom/movable/screen/radial/E = elements[i] var/angle = WRAP(starting_angle + (i - 1) * angle_per_element,0,360) @@ -197,8 +197,8 @@ GLOBAL_LIST_EMPTY(radial_menus) /datum/radial_menu/proc/SetElement(atom/movable/screen/radial/slice/E,choice_id,angle,anim,anim_order) //Position - var/py = round(cos(angle) * radius) + py_shift - var/px = round(sin(angle) * radius) + var/py = floor(cos(angle) * radius) + py_shift + var/px = floor(sin(angle) * radius) if(anim) var/timing = anim_order * 0.5 var/matrix/starting = matrix() @@ -271,8 +271,8 @@ GLOBAL_LIST_EMPTY(radial_menus) if(use_labels) MA.maptext_width = 64 MA.maptext_height = 64 - MA.maptext_x = -round(MA.maptext_width / 2) + 16 - MA.maptext_y = -round(MA.maptext_height / 2) + 16 + MA.maptext_x = -floor(MA.maptext_width / 2) + 16 + MA.maptext_y = -floor(MA.maptext_height / 2) + 16 MA.maptext = SMALL_FONTS_CENTRED(7, label) return MA diff --git a/code/_onclick/hud/rendering/plane_master_controller.dm b/code/_onclick/hud/rendering/plane_master_controller.dm index 3548f22497d0..6b2f276ce744 100644 --- a/code/_onclick/hud/rendering/plane_master_controller.dm +++ b/code/_onclick/hud/rendering/plane_master_controller.dm @@ -51,11 +51,11 @@ INITIALIZE_IMMEDIATE(/atom/movable/plane_master_controller) . += pm_iterator.get_filter(name) ///Transitions all filters owned by this plane master controller -/atom/movable/plane_master_controller/transition_filter(name, time, list/new_params, easing, loop) +/atom/movable/plane_master_controller/transition_filter(name, list/new_params, time, easing, loop) . = ..() for(var/i in controlled_planes) var/atom/movable/screen/plane_master/pm_iterator = controlled_planes[i] - pm_iterator.transition_filter(name, time, new_params, easing, loop) + pm_iterator.transition_filter(name, new_params, time, easing, loop) /atom/movable/plane_master_controller/game diff --git a/code/_onclick/hud/screen_objects.dm b/code/_onclick/hud/screen_objects.dm index 17f06987cd3b..8508352bb338 100644 --- a/code/_onclick/hud/screen_objects.dm +++ b/code/_onclick/hud/screen_objects.dm @@ -75,7 +75,7 @@ return ..() /atom/movable/screen/action_button/proc/get_button_screen_loc(button_number) - var/row = round((button_number-1)/13) //13 is max amount of buttons per row + var/row = floor((button_number-1)/13) //13 is max amount of buttons per row var/col = ((button_number - 1)%(13)) + 1 var/coord_col = "+[col-1]" var/coord_col_offset = 4+2*col @@ -129,9 +129,9 @@ //Calculate fullness for etiher max storage, or for storage slots if the container has them var/fullness = 0 if (master_storage.storage_slots == null) - fullness = round(10*total_w/master_storage.max_storage_space) + fullness = floor(10*total_w/master_storage.max_storage_space) else - fullness = round(10*master_storage.contents.len/master_storage.storage_slots) + fullness = floor(10*master_storage.contents.len/master_storage.storage_slots) switch(fullness) if(10) color = "#ff0000" diff --git a/code/_onclick/item_attack.dm b/code/_onclick/item_attack.dm index 8d77920a59cc..ffcab30234ae 100644 --- a/code/_onclick/item_attack.dm +++ b/code/_onclick/item_attack.dm @@ -16,7 +16,8 @@ return FALSE /atom/movable/attackby(obj/item/W, mob/living/user) - if(W) + . = ..() + if(W && !.) if(!(W.flags_item & NOBLUDGEON)) visible_message(SPAN_DANGER("[src] has been hit by [user] with [W]."), null, null, 5, CHAT_TYPE_MELEE_HIT) user.animation_attack_on(src) @@ -86,7 +87,7 @@ var/power = force if(user.skills) - power = round(power * (1 + 0.25 * user.skills.get_skill_level(SKILL_MELEE_WEAPONS))) //25% bonus per melee level + power = floor(power * (1 + 0.25 * user.skills.get_skill_level(SKILL_MELEE_WEAPONS))) //25% bonus per melee level if(!ishuman(M)) var/used_verb = "attacked" if(attack_verb && attack_verb.len) diff --git a/code/controllers/configuration/config_entry.dm b/code/controllers/configuration/config_entry.dm index d71bf1d747c9..657e7470fc54 100644 --- a/code/controllers/configuration/config_entry.dm +++ b/code/controllers/configuration/config_entry.dm @@ -80,7 +80,7 @@ return FALSE var/temp = text2num(trim(str_val)) if(!isnull(temp)) - config_entry_value = clamp(integer ? round(temp) : temp, min_val, max_val) + config_entry_value = clamp(integer ? floor(temp) : temp, min_val, max_val) if(config_entry_value != temp && !(datum_flags & DF_VAR_EDITED)) log_config("Changing [name] from [temp] to [config_entry_value]!") return TRUE diff --git a/code/controllers/mc/master.dm b/code/controllers/mc/master.dm index 530078e4c432..edfda35a1e75 100644 --- a/code/controllers/mc/master.dm +++ b/code/controllers/mc/master.dm @@ -232,7 +232,7 @@ GLOBAL_REAL(Master, /datum/controller/master) = new for (var/datum/controller/subsystem/subsystem as anything in subsystems) var/subsystem_init_stage = subsystem.init_stage - if (!isnum(subsystem_init_stage) || subsystem_init_stage < 1 || subsystem_init_stage > INITSTAGE_MAX || round(subsystem_init_stage) != subsystem_init_stage) + if (!isnum(subsystem_init_stage) || subsystem_init_stage < 1 || subsystem_init_stage > INITSTAGE_MAX || floor(subsystem_init_stage) != subsystem_init_stage) stack_trace("ERROR: MC: subsystem `[subsystem.type]` has invalid init_stage: `[subsystem_init_stage]`. Setting to `[INITSTAGE_MAX]`") subsystem_init_stage = subsystem.init_stage = INITSTAGE_MAX stage_sorted_subsystems[subsystem_init_stage] += subsystem @@ -668,7 +668,7 @@ GLOBAL_REAL(Master, /datum/controller/master) = new tick_precentage = max(tick_precentage*0.5, tick_precentage-queue_node.tick_overrun) - current_ticklimit = round(TICK_USAGE + tick_precentage) + current_ticklimit = floor(TICK_USAGE + tick_precentage) ran = TRUE diff --git a/code/controllers/subsystem/interior.dm b/code/controllers/subsystem/interior.dm index e2b845f833d7..b0bacc7d2b72 100644 --- a/code/controllers/subsystem/interior.dm +++ b/code/controllers/subsystem/interior.dm @@ -21,8 +21,7 @@ SUBSYSTEM_DEF(interior) var/list/bounds = template.load(locate(bottom_left.x + (INTERIOR_BORDER_SIZE / 2), bottom_left.y + (INTERIOR_BORDER_SIZE / 2), bottom_left.z), centered = FALSE) - var/list/turfs = block( locate(bounds[MAP_MINX], bounds[MAP_MINY], bounds[MAP_MINZ]), - locate(bounds[MAP_MAXX], bounds[MAP_MAXY], bounds[MAP_MAXZ])) + var/list/turfs = block(bounds[MAP_MINX], bounds[MAP_MINY], bounds[MAP_MINZ], bounds[MAP_MAXX], bounds[MAP_MAXY], bounds[MAP_MAXZ]) var/list/areas = list() for(var/turf/current_turf as anything in turfs) diff --git a/code/controllers/subsystem/mapping.dm b/code/controllers/subsystem/mapping.dm index 1d137aa7d8ae..f6c45453950d 100644 --- a/code/controllers/subsystem/mapping.dm +++ b/code/controllers/subsystem/mapping.dm @@ -187,9 +187,9 @@ SUBSYSTEM_DEF(mapping) var/x_offset = 1 var/y_offset = 1 if(bounds && world.maxx > bounds[MAP_MAXX]) - x_offset = round(world.maxx / 2 - bounds[MAP_MAXX] / 2) + 1 + x_offset = floor(world.maxx / 2 - bounds[MAP_MAXX] / 2) + 1 if(bounds && world.maxy > bounds[MAP_MAXY]) - y_offset = round(world.maxy / 2 - bounds[MAP_MAXY] / 2) + 1 + y_offset = floor(world.maxy / 2 - bounds[MAP_MAXY] / 2) + 1 if (!pm.load(x_offset, y_offset, start_z + parsed_maps[pm], no_changeturf = TRUE, new_z = TRUE)) errorList |= pm.original_path // CM Snowflake for Mass Screenshot dimensions auto detection @@ -363,9 +363,7 @@ SUBSYSTEM_DEF(mapping) if(!level_trait(z,ZTRAIT_RESERVED)) clearing_reserved_turfs = FALSE CRASH("Invalid z level prepared for reservations.") - var/turf/A = get_turf(locate(SHUTTLE_TRANSIT_BORDER,SHUTTLE_TRANSIT_BORDER,z)) - var/turf/B = get_turf(locate(world.maxx - SHUTTLE_TRANSIT_BORDER,world.maxy - SHUTTLE_TRANSIT_BORDER,z)) - var/block = block(A, B) + var/block = block(SHUTTLE_TRANSIT_BORDER, SHUTTLE_TRANSIT_BORDER, z, world.maxx - SHUTTLE_TRANSIT_BORDER, world.maxy - SHUTTLE_TRANSIT_BORDER, z) for(var/turf/T as anything in block) // No need to empty() these, because they just got created and are already /turf/open/space/basic. T.turf_flags = UNUSED_RESERVATION_TURF diff --git a/code/controllers/subsystem/minimap.dm b/code/controllers/subsystem/minimap.dm index ff250625043f..8c2cbc7c5ee7 100644 --- a/code/controllers/subsystem/minimap.dm +++ b/code/controllers/subsystem/minimap.dm @@ -88,8 +88,8 @@ SUBSYSTEM_DEF(minimaps) else if(yval < smallest_y) smallest_y = yval - minimaps_by_z["[level]"].x_offset = Floor((SCREEN_PIXEL_SIZE-largest_x-smallest_x) / MINIMAP_SCALE) - minimaps_by_z["[level]"].y_offset = Floor((SCREEN_PIXEL_SIZE-largest_y-smallest_y) / MINIMAP_SCALE) + minimaps_by_z["[level]"].x_offset = floor((SCREEN_PIXEL_SIZE-largest_x-smallest_x) / MINIMAP_SCALE) + minimaps_by_z["[level]"].y_offset = floor((SCREEN_PIXEL_SIZE-largest_y-smallest_y) / MINIMAP_SCALE) icon_gen.Shift(EAST, minimaps_by_z["[level]"].x_offset) icon_gen.Shift(NORTH, minimaps_by_z["[level]"].y_offset) diff --git a/code/controllers/subsystem/shuttles.dm b/code/controllers/subsystem/shuttles.dm index 439f83ceb8c0..0348eddd9900 100644 --- a/code/controllers/subsystem/shuttles.dm +++ b/code/controllers/subsystem/shuttles.dm @@ -1,41 +1,60 @@ #define MAX_TRANSIT_REQUEST_RETRIES 10 -#define SHUTTLE_SPAWN_BUFFER SSshuttle.wait * 10 /// Give a shuttle 10 "fires" (~10 seconds) to spawn before it can be cleaned up. +/// How many turfs to allow before we stop blocking transit requests +#define MAX_TRANSIT_TILE_COUNT (150 ** 2) +/// How many turfs to allow before we start freeing up existing "soft reserved" transit docks +/// If we're under load we want to allow for cycling, but if not we want to preserve already generated docks for use +#define SOFT_TRANSIT_RESERVATION_THRESHOLD (100 ** 2) +/// Give a shuttle 10 "fires" (~10 seconds) to spawn before it can be cleaned up. +#define SHUTTLE_SPAWN_BUFFER SSshuttle.wait * 10 SUBSYSTEM_DEF(shuttle) name = "Shuttle" - wait = 10 + wait = 1 SECONDS init_order = SS_INIT_SHUTTLE flags = SS_KEEP_TIMING + /// A list of all the mobile docking ports. var/list/mobile = list() + /// A list of all the stationary docking ports. var/list/stationary = list() + /// A list of all the transit docking ports. var/list/transit = list() - /// For ID generation + /// Now it's only for ID generation in /obj/docking_port/mobile/register() var/list/assoc_mobile = list() - /// For ID generation + /// Now it's only for ID generation in /obj/docking_port/stationary/register() var/list/assoc_stationary = list() + /// A list of all the mobile docking ports currently requesting a spot in hyperspace. var/list/transit_requesters = list() + /// An associative list of the mobile docking ports that have failed a transit request, with the amount of times they've actually failed that transit request, up to MAX_TRANSIT_REQUEST_RETRIES var/list/transit_request_failures = list() + /// How many turfs our shuttles are currently utilizing in reservation space + var/transit_utilized = 0 var/obj/docking_port/mobile/vehicle_elevator/vehicle_elevator var/list/hidden_shuttle_turfs = list() //all turfs hidden from navigation computers associated with a list containing the image hiding them and the type of the turf they are pretending to be var/list/hidden_shuttle_turf_images = list() //only the images from the above list - var/lockdown = FALSE //disallow transit after nuke goes off + /// Disallow transit after nuke goes off + var/lockdown = FALSE + /// The currently selected shuttle map_template in the shuttle manipulator's template viewer. var/datum/map_template/shuttle/selected + /// The existing shuttle associated with the selected shuttle map_template. var/obj/docking_port/mobile/existing_shuttle - var/obj/docking_port/mobile/preview_shuttle + /// The shuttle map_template of the shuttle we want to preview. var/datum/map_template/shuttle/preview_template + /// The docking port associated to the preview_template that's currently being previewed. + var/obj/docking_port/mobile/preview_shuttle + /// The turf reservation for the current previewed shuttle. var/datum/turf_reservation/preview_reservation - /// safety to stop shuttles loading over each other + /// Are we currently in the process of loading a shuttle? Useful to ensure we don't load more than one at once, to avoid weird inconsistencies and possible runtimes. var/loading_shuttle = FALSE /datum/controller/subsystem/shuttle/Initialize(timeofday) @@ -43,9 +62,8 @@ SUBSYSTEM_DEF(shuttle) return SS_INIT_SUCCESS /datum/controller/subsystem/shuttle/proc/initial_load() - for(var/s in stationary) - var/obj/docking_port/stationary/S = s - S.load_roundstart() + for(var/obj/docking_port/stationary/port as anything in stationary) + port.load_roundstart() CHECK_TICK /datum/controller/subsystem/shuttle/fire(resumed = FALSE) @@ -53,8 +71,8 @@ SUBSYSTEM_DEF(shuttle) if(!thing) mobile.Remove(thing) continue - var/obj/docking_port/mobile/P = thing - P.check() + var/obj/docking_port/mobile/port = thing + port.check() for(var/thing in transit) var/obj/docking_port/stationary/transit/T = thing if(!T.owner) @@ -62,6 +80,11 @@ SUBSYSTEM_DEF(shuttle) // This next one removes transit docks/zones that aren't // immediately being used. This will mean that the zone creation // code will be running a lot. + + // If we're below the soft reservation threshold, don't clear the old space + // We're better off holding onto it for now + if(transit_utilized < SOFT_TRANSIT_RESERVATION_THRESHOLD) + continue var/obj/docking_port/mobile/owner = T.owner if(owner && (world.time > T.spawn_time + SHUTTLE_SPAWN_BUFFER)) var/idle = owner.mode == SHUTTLE_IDLE @@ -73,7 +96,10 @@ SUBSYSTEM_DEF(shuttle) if(!SSmapping.clearing_reserved_turfs) while(transit_requesters.len) var/requester = popleft(transit_requesters) - var/success = generate_transit_dock(requester) + var/success = null + // Do not try and generate any transit if we're using more then our max already + if(transit_utilized < MAX_TRANSIT_TILE_COUNT) + success = generate_transit_dock(requester) if(!success) // BACK OF THE QUEUE transit_request_failures[requester]++ if(transit_request_failures[requester] < MAX_TRANSIT_REQUEST_RETRIES) @@ -85,69 +111,74 @@ SUBSYSTEM_DEF(shuttle) if(MC_TICK_CHECK) break -/datum/controller/subsystem/shuttle/proc/hasShuttle(id) - for(var/obj/docking_port/mobile/M in mobile) - if(M.id == id) - return TRUE - return FALSE - -/datum/controller/subsystem/shuttle/proc/getShuttle(id) - for(var/obj/docking_port/mobile/M in mobile) - if(M.id == id) - return M +/datum/controller/subsystem/shuttle/proc/getShuttle(id, warn = TRUE) + for(var/obj/docking_port/mobile/shuttle in mobile) + if(shuttle.id == id) + return shuttle + if(!warn) + return null WARNING("couldn't find shuttle with id: [id]") +/// Tries to get a shuttle based on its original template id (rather than one that may have an additional identifier) +/datum/controller/subsystem/shuttle/proc/get_template_shuttle(id, warn = TRUE) + for(var/obj/docking_port/mobile/shuttle in mobile) + if(shuttle.template_id == id) + return shuttle + if(!warn) + return null + WARNING("couldn't find template shuttle with id: [id]") + /datum/controller/subsystem/shuttle/proc/getDock(id) for(var/obj/docking_port/stationary/S in stationary) if(S.id == id) return S WARNING("couldn't find dock with id: [id]") -//try to move/request to dockHome if possible, otherwise dockAway. Mainly used for admin buttons -/datum/controller/subsystem/shuttle/proc/toggleShuttle(shuttleId, dockHome, dockAway, timed) - var/obj/docking_port/mobile/M = getShuttle(shuttleId) - if(!M) +//try to move/request to dock_home if possible, otherwise dock_away. Mainly used for admin buttons +/datum/controller/subsystem/shuttle/proc/toggleShuttle(id, dock_home, dock_away, timed) + var/obj/docking_port/mobile/shuttle_port = getShuttle(id) + if(!shuttle_port) return DOCKING_BLOCKED - var/obj/docking_port/stationary/dockedAt = M.get_docked() - var/destination = dockHome - if(dockedAt && dockedAt.id == dockHome) - destination = dockAway + var/obj/docking_port/stationary/docked_at = shuttle_port.get_docked() + var/destination = dock_home + if(docked_at && docked_at.id == dock_home) + destination = dock_away if(timed) - if(M.request(getDock(destination))) + if(shuttle_port.request(getDock(destination))) return DOCKING_IMMOBILIZED else - if(M.initiate_docking(getDock(destination)) != DOCKING_SUCCESS) + if(shuttle_port.initiate_docking(getDock(destination)) != DOCKING_SUCCESS) return DOCKING_IMMOBILIZED - return DOCKING_SUCCESS //dock successful + return DOCKING_SUCCESS //dock successful /** * Moves a shuttle to a new location * * Arguments: - * * shuttle_id - The ID of the shuttle (mobile docking port) to move + * * id - The ID of the shuttle (mobile docking port) to move * * dock_id - The ID of the destination (stationary docking port) to move to * * timed - If true, have the shuttle follow normal spool-up, jump, dock process. If false, immediately move to the new location. */ -/datum/controller/subsystem/shuttle/proc/moveShuttle(shuttleId, dockId, timed) - var/obj/docking_port/stationary/D = getDock(dockId) - var/obj/docking_port/mobile/M = getShuttle(shuttleId) +/datum/controller/subsystem/shuttle/proc/moveShuttle(id, dock_id, timed) + var/obj/docking_port/mobile/shuttle_port = getShuttle(id) + var/obj/docking_port/stationary/docking_target = getDock(dock_id) - return moveShuttleToDock(M, D, timed) + return moveShuttleToDock(shuttle_port, docking_target, timed) -/datum/controller/subsystem/shuttle/proc/moveShuttleToDock(obj/docking_port/mobile/M, obj/docking_port/stationary/D, timed) - if(!M) +/datum/controller/subsystem/shuttle/proc/moveShuttleToDock(obj/docking_port/mobile/shuttle_port, obj/docking_port/stationary/docking_target, timed) + if(!shuttle_port) return DOCKING_NULL_SOURCE if(timed) - if(M.request(D)) + if(shuttle_port.request(docking_target)) return DOCKING_IMMOBILIZED else - if(M.initiate_docking(D) != DOCKING_SUCCESS) + if(shuttle_port.initiate_docking(docking_target) != DOCKING_SUCCESS) return DOCKING_IMMOBILIZED - return DOCKING_SUCCESS //dock successful + return DOCKING_SUCCESS //dock successful /datum/controller/subsystem/shuttle/proc/request_transit_dock(obj/docking_port/mobile/M) if(!istype(M)) - throw EXCEPTION("[M] is not a mobile docking port") + CRASH("[M] is not a mobile docking port") if(M.assigned_transit) return @@ -159,6 +190,9 @@ SUBSYSTEM_DEF(shuttle) // First, determine the size of the needed zone // Because of shuttle rotation, the "width" of the shuttle is not // always x. + //var/travel_dir = M.preferred_direction + // Remember, the direction is the direction we appear to be + // coming from var/dock_angle = dir2angle(M.preferred_direction) + dir2angle(M.port_direction) + 180 var/dock_dir = angle2dir(dock_angle) @@ -177,7 +211,7 @@ SUBSYSTEM_DEF(shuttle) /* to_chat(world, "The attempted transit dock will be [transit_width] width, and \) - [transit_height] in height. The travel dir is [M.preferred_direction]." + [transit_height] in height. The travel dir is [travel_dir]." */ var/transit_path = M.get_transit_path_type() @@ -185,7 +219,7 @@ SUBSYSTEM_DEF(shuttle) var/datum/turf_reservation/proposal = SSmapping.request_turf_block_reservation( transit_width, transit_height, - 1, + z_size = 1, //if this is changed the turf uncontain code below has to be updated to support multiple zs reservation_type = /datum/turf_reservation/transit, turf_type_override = transit_path, ) @@ -197,11 +231,11 @@ SUBSYSTEM_DEF(shuttle) var/turf/bottomleft = proposal.bottom_left_turfs[1] // Then create a transit docking port in the middle var/coords = M.return_coords(0, 0, dock_dir) - /* 0------2 - | | - | | - | x | - 3------1 + /* 0------2 + * | | + * | | + * | x | + * 3------1 */ var/x0 = coords[1] @@ -218,23 +252,32 @@ SUBSYSTEM_DEF(shuttle) var/turf/midpoint = locate(transit_x, transit_y, bottomleft.z) if(!midpoint) - log_debug("generate_transit_dock() failed to get a midpoint") + log_mapping("generate_transit_dock() failed to get a midpoint") return FALSE - var/area/shuttle/transit/A = new() - //A.parallax_movedir = travel_dir - A.contents = proposal.reserved_turfs + var/area/shuttle/transit/new_area = new() + //new_area.parallax_movedir = travel_dir + new_area.contents = proposal.reserved_turfs var/obj/docking_port/stationary/transit/new_transit_dock = new(midpoint) new_transit_dock.reserved_area = proposal new_transit_dock.name = "Transit for [M.id]/[M.name]" new_transit_dock.owner = M - new_transit_dock.assigned_area = A + new_transit_dock.assigned_area = new_area // Add 180, because ports point inwards, rather than outwards new_transit_dock.setDir(angle2dir(dock_angle)) + // Proposals use 2 extra hidden tiles of space, from the cordons that surround them + transit_utilized += (proposal.width + 2) * (proposal.height + 2) M.assigned_transit = new_transit_dock + RegisterSignal(proposal, COMSIG_PARENT_QDELETING, PROC_REF(transit_space_clearing)) + return new_transit_dock +/// Gotta manage our space brother +/datum/controller/subsystem/shuttle/proc/transit_space_clearing(datum/turf_reservation/source) + SIGNAL_HANDLER + transit_utilized -= (source.width + 2) * (source.height + 2) + /datum/controller/subsystem/shuttle/Recover() if (istype(SSshuttle.mobile)) mobile = SSshuttle.mobile @@ -258,7 +301,6 @@ SUBSYSTEM_DEF(shuttle) preview_reservation = SSshuttle.preview_reservation - /datum/controller/subsystem/shuttle/proc/is_in_shuttle_bounds(atom/A) var/area/current = get_area(A) if(istype(current, /area/shuttle) && !istype(current, /area/shuttle/transit)) @@ -363,7 +405,15 @@ SUBSYSTEM_DEF(shuttle) return shuttle -/datum/controller/subsystem/shuttle/proc/action_load(datum/map_template/shuttle/loading_template, obj/docking_port/stationary/destination_port, replace = FALSE) +/** + * Loads a shuttle template and sends it to a given destination port, optionally replacing the existing shuttle + * + * Arguments: + * * loading_template - The shuttle template to load + * * destination_port - The station docking port to send the shuttle to once loaded + * * to_replace - A shuttle to replace, otherwise we create a new one +*/ +/datum/controller/subsystem/shuttle/proc/action_load(datum/map_template/shuttle/loading_template, obj/docking_port/stationary/destination_port, obj/docking_port/mobile/to_replace) // Check for an existing preview if(preview_shuttle && (loading_template != preview_template)) preview_shuttle.jumpToNullSpace() @@ -378,48 +428,47 @@ SUBSYSTEM_DEF(shuttle) // get the existing shuttle information, if any var/timer = 0 var/mode = SHUTTLE_IDLE - var/obj/docking_port/stationary/D + var/obj/docking_port/stationary/dest_dock if(istype(destination_port)) - D = destination_port - else if(existing_shuttle) - timer = existing_shuttle.timer - mode = existing_shuttle.mode - D = existing_shuttle.get_docked() + dest_dock = destination_port + else if(to_replace) + timer = to_replace.timer + mode = to_replace.mode + dest_dock = to_replace.get_docked() - if(!D) - D = generate_transit_dock(preview_shuttle) + if(!dest_dock) + dest_dock = generate_transit_dock(preview_shuttle) - if(!D) - preview_shuttle.jumpToNullSpace() + if(!dest_dock) CRASH("No dock found for preview shuttle ([preview_template.name]), aborting.") - var/result = preview_shuttle.canDock(D) + var/result = preview_shuttle.canDock(dest_dock) // truthy value means that it cannot dock for some reason // but we can ignore the someone else docked error because we'll // be moving into their place shortly if((result != SHUTTLE_CAN_DOCK) && (result != SHUTTLE_SOMEONE_ELSE_DOCKED)) - WARNING("Template shuttle [preview_shuttle] cannot dock at [D] ([result]).") + WARNING("Template shuttle [preview_shuttle] cannot dock at [dest_dock] ([result]).") return - if(existing_shuttle) - existing_shuttle.jumpToNullSpace() + if(to_replace) + to_replace.jumpToNullSpace() - for(var/area/A as anything in preview_shuttle.shuttle_areas) - for(var/turf/T as anything in A) + for(var/area/cur_area as anything in preview_shuttle.shuttle_areas) + for(var/turf/cur_turf as anything in cur_area) // update underlays - if(istype(T, /turf/closed/shuttle)) - var/dx = T.x - preview_shuttle.x - var/dy = T.y - preview_shuttle.y - var/turf/target_lz = locate(D.x + dx, D.y + dy, D.z) - T.underlays.Cut() - T.underlays += mutable_appearance(target_lz.icon, target_lz.icon_state, TURF_LAYER, FLOOR_PLANE) - - preview_shuttle.register(replace) + if(istype(cur_turf, /turf/closed/shuttle)) + var/dx = cur_turf.x - preview_shuttle.x + var/dy = cur_turf.y - preview_shuttle.y + var/turf/target_lz = locate(dest_dock.x + dx, dest_dock.y + dy, dest_dock.z) + cur_turf.underlays.Cut() + cur_turf.underlays += mutable_appearance(target_lz.icon, target_lz.icon_state, TURF_LAYER, FLOOR_PLANE) + + preview_shuttle.register(to_replace != null) var/list/force_memory = preview_shuttle.movement_force preview_shuttle.movement_force = list("KNOCKDOWN" = 0, "THROW" = 0) - - preview_shuttle.initiate_docking(D) + preview_shuttle.mode = SHUTTLE_PREARRIVAL//No idle shuttle moving. Transit dock get removed if shuttle moves too long. + preview_shuttle.initiate_docking(dest_dock) preview_shuttle.movement_force = force_memory . = preview_shuttle @@ -429,7 +478,7 @@ SUBSYSTEM_DEF(shuttle) preview_shuttle.timer = timer preview_shuttle.mode = mode - preview_shuttle.postregister(replace) + preview_shuttle.postregister(to_replace != null) // TODO indicate to the user that success happened, rather than just // blanking the modification tab @@ -439,6 +488,13 @@ SUBSYSTEM_DEF(shuttle) selected = null QDEL_NULL(preview_reservation) +/** + * Loads a shuttle template into the transit Z level, usually referred to elsewhere in the code as a shuttle preview. + * Does not register the shuttle so it can't be used yet, that's handled in action_load() + * + * Arguments: + * * loading_template - The shuttle template to load + */ /datum/controller/subsystem/shuttle/proc/load_template(datum/map_template/shuttle/loading_template) . = FALSE // Load shuttle template to a fresh block reservation. @@ -461,21 +517,21 @@ SUBSYSTEM_DEF(shuttle) // the shuttle. // - We need to check that no additional ports have slipped in from the // template, because that causes unintended behaviour. - for(var/T in affected) - for(var/obj/docking_port/P in T) - if(istype(P, /obj/docking_port/mobile)) + for(var/affected_turfs in affected) + for(var/obj/docking_port/port in affected_turfs) + if(istype(port, /obj/docking_port/mobile)) found++ if(found > 1) - qdel(P, force=TRUE) - log_world("Map warning: Shuttle Template [loading_template.mappath] has multiple mobile docking ports.") + qdel(port, force=TRUE) + log_mapping("Shuttle Template [loading_template.mappath] has multiple mobile docking ports.") else - preview_shuttle = P - if(istype(P, /obj/docking_port/stationary)) - log_world("Map warning: Shuttle Template [loading_template.mappath] has a stationary docking port.") + preview_shuttle = port + if(istype(port, /obj/docking_port/stationary)) + log_mapping("Shuttle Template [loading_template.mappath] has a stationary docking port.") if(!found) var/msg = "load_template(): Shuttle Template [loading_template.mappath] has no mobile docking port. Aborting import." - for(var/T in affected) - var/turf/T0 = T + for(var/affected_turfs in affected) + var/turf/T0 = affected_turfs T0.empty() message_admins(msg) @@ -485,41 +541,62 @@ SUBSYSTEM_DEF(shuttle) loading_template.post_load(preview_shuttle) return TRUE +/** + * Removes the preview_shuttle from the transit Z-level + */ /datum/controller/subsystem/shuttle/proc/unload_preview() if(preview_shuttle) preview_shuttle.jumpToNullSpace() preview_shuttle = null + if(preview_reservation) + QDEL_NULL(preview_reservation) /datum/controller/subsystem/shuttle/ui_status(mob/user, datum/ui_state/state) return UI_INTERACTIVE +/datum/controller/subsystem/shuttle/ui_state(mob/user) + return GLOB.admin_state + /datum/controller/subsystem/shuttle/tgui_interact(mob/user, datum/tgui/ui) ui = SStgui.try_update_ui(user, src, ui) if(!ui) - ui = new(user, src, "ShuttleManipulator", name, 850, 600) + ui = new(user, src, "ShuttleManipulator", name, 900, 600) ui.open() - /datum/controller/subsystem/shuttle/ui_data(mob/user) var/list/data = list() // Templates panel - data["selected"] = list() + data["templates"] = list() + var/list/templates = data["templates"] + //data["templates_tabs"] = list() + data["selected"] = null + + for(var/id in SSmapping.shuttle_templates) + var/datum/map_template/shuttle/S = SSmapping.shuttle_templates[id] - data["template_data"] = list() - for(var/shuttle_id in SSmapping.shuttle_templates) - var/datum/map_template/shuttle/S = SSmapping.shuttle_templates[shuttle_id] - var/list/template_data = list() - template_data["name"] = S.name - template_data["shuttle_id"] = S.shuttle_id - template_data["description"] = S.description - template_data["admin_notes"] = S.admin_notes + if(!templates[S.port_id]) + //data["templates_tabs"] += S.port_id + templates[S.port_id] = list( + "port_id" = S.port_id, + "templates" = list()) + + var/list/L = list() + L["name"] = S.name + L["id"] = S.shuttle_id + L["port_id"] = S.port_id + L["description"] = S.description + L["admin_notes"] = S.admin_notes if(selected == S) - data["selected"] = template_data - data["template_data"] += list(template_data) + data["selected"] = L + + templates[S.port_id]["templates"] += list(L) + + //data["templates_tabs"] = sort_list(data["templates_tabs"]) data["existing_shuttle"] = null + // Status panel data["shuttles"] = list() for(var/i in mobile) @@ -548,92 +625,118 @@ SUBSYSTEM_DEF(shuttle) L["status"] = M.getDbgStatusText() if(M == existing_shuttle) data["existing_shuttle"] = L - L["hijack"] = "N/A" data["shuttles"] += list(L) return data -/datum/controller/subsystem/shuttle/ui_act(action, params) - if(..()) +/datum/controller/subsystem/shuttle/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state) + . = ..() + if(.) return - var/mob/user = usr + var/mob/user = ui.user // Preload some common parameters - var/shuttle_id = params["shuttle_id"] - var/datum/map_template/shuttle/S = SSmapping.shuttle_templates[shuttle_id] + var/id = params["id"] + var/datum/map_template/shuttle/template = SSmapping.shuttle_templates[id] + var/obj/docking_port/mobile/shuttle = getShuttle(id, warn = FALSE) switch(action) if("select_template") - if(S) - if(hasShuttle(S.shuttle_id)) - existing_shuttle = getShuttle(S.shuttle_id) - else - existing_shuttle = null - selected = S + if(template) + existing_shuttle = shuttle + selected = template + if(!existing_shuttle) + existing_shuttle = get_template_shuttle(template.shuttle_id) . = TRUE + if("jump_to") - if(params["type"] == "mobile") - for(var/i in mobile) - var/obj/docking_port/mobile/M = i - if(M.id == params["id"]) - user.forceMove(get_turf(M)) - . = TRUE - break + if(shuttle) + user.client?.jump_to_object(shuttle) + . = TRUE + if("lock") - for(var/i in mobile) - var/obj/docking_port/mobile/M = i - if(M.id == params["id"]) - . = TRUE - var/obj/structure/machinery/computer/shuttle/console = M.getControlConsole() - console.disable() - message_admins("[key_name_admin(user)] set [M.id]'s disabled to TRUE.") - break + if(shuttle) + . = TRUE + var/obj/structure/machinery/computer/shuttle/console = shuttle.getControlConsole() + console.disable() + message_admins("[key_name_admin(user)] set [id]'s disabled to TRUE.") + if("unlock") - for(var/i in mobile) - var/obj/docking_port/mobile/M = i - if(M.id == params["id"]) - . = TRUE - var/obj/structure/machinery/computer/shuttle/console = M.getControlConsole() - console.enable() - message_admins("[key_name_admin(user)] set [M.id]'s disabled to FALSE.") - break + if(shuttle) + . = TRUE + var/obj/structure/machinery/computer/shuttle/console = shuttle.getControlConsole() + console.enable() + message_admins("[key_name_admin(user)] set [id]'s disabled to FALSE.") + if("fly") - for(var/i in mobile) - var/obj/docking_port/mobile/M = i - if(M.id == params["id"]) - . = TRUE - M.admin_fly_shuttle(user) - break + if(shuttle) + . = TRUE + shuttle.admin_fly_shuttle(user) if("fast_travel") - for(var/i in mobile) - var/obj/docking_port/mobile/M = i - if(M.id == params["id"] && M.timer && M.timeLeft(1) >= 50) - M.setTimer(50) - . = TRUE - message_admins("[key_name_admin(usr)] fast travelled [M]") - log_admin("[key_name(usr)] fast travelled [M]") - break + if(shuttle && shuttle.timer && shuttle.timeLeft(1) >= 50) + shuttle.setTimer(5 SECONDS) + . = TRUE + message_admins("[key_name_admin(user)] fast travelled [shuttle]") + + if("load") + if(template) + if(loading_shuttle) + to_chat(user, SPAN_WARNING("Busy! Please wait...")) + return + . = TRUE + loading_shuttle = TRUE + // If successful, returns the mobile docking port + var/obj/docking_port/mobile/mdp = action_load(template) + if(mdp) + user.client?.jump_to_object(mdp) + message_admins("[key_name_admin(user)] loaded [mdp] with the shuttle manipulator.") + else + to_chat(user, SPAN_WARNING("Something went wrong. Check logs/STUI for more details.")) + loading_shuttle = FALSE if("preview") - if(S) + if(template) + if(loading_shuttle) + to_chat(user, SPAN_WARNING("Busy! Please wait...")) + return . = TRUE + loading_shuttle = TRUE unload_preview() - load_template(S) + load_template(template) if(preview_shuttle) - preview_template = S - user.forceMove(get_turf(preview_shuttle)) - if("load") - if(S) + preview_template = template + user.client?.jump_to_object(preview_shuttle) + loading_shuttle = FALSE + + if("replace") + if(template) + if(loading_shuttle) + to_chat(user, SPAN_WARNING("Busy! Please wait...")) + return . = TRUE + loading_shuttle = TRUE + var/to_replace = existing_shuttle + if(!existing_shuttle || tgui_alert(user, "Replace existing shuttle '[existing_shuttle.name]'?", "Replace shuttle?", list("Yes", "No")) != "Yes") + var/list/options = list() + for(var/obj/docking_port/mobile/option in mobile) + options["[option.name] ([option.id])"] = option + var/selection = tgui_input_list(user, "Replace some other shuttle instead?", "Replace shuttle?", options) + if(!selection) + loading_shuttle = FALSE + return + to_replace = options[selection] // If successful, returns the mobile docking port - var/obj/docking_port/mobile/mdp = action_load(S) + var/obj/docking_port/mobile/mdp = action_load(template, to_replace = to_replace) if(mdp) - user.forceMove(get_turf(mdp)) - message_admins("[key_name_admin(usr)] loaded [mdp] with the shuttle manipulator.") - log_admin("[key_name(usr)] loaded [mdp] with the shuttle manipulator.") - + user.client?.jump_to_object(mdp) + message_admins("[key_name_admin(user)] replaced [to_replace] with [mdp] with the shuttle manipulator.") + else + to_chat(user, SPAN_WARNING("Something went wrong. Check logs/STUI for more details.")) + loading_shuttle = FALSE -#undef SHUTTLE_SPAWN_BUFFER +#undef MAX_TRANSIT_REQUEST_RETRIES +#undef MAX_TRANSIT_TILE_COUNT +#undef SOFT_TRANSIT_RESERVATION_THRESHOLD diff --git a/code/controllers/subsystem/statpanel.dm b/code/controllers/subsystem/statpanel.dm index b65ca1e758a2..030043d12d3a 100644 --- a/code/controllers/subsystem/statpanel.dm +++ b/code/controllers/subsystem/statpanel.dm @@ -108,7 +108,7 @@ SUBSYSTEM_DEF(statpanels) target.stat_panel.send_message("update_stat", list( "global_data" = global_data, - //"ping_str" = "Ping: [round(target.lastping, 1)]ms (Average: [round(target.avgping, 1)]ms)", + //"ping_str" = "Ping: [floor(target.lastping, 1)]ms (Average: [floor(target.avgping, 1)]ms)", "other_str" = target.mob?.get_status_tab_items(), )) @@ -212,17 +212,23 @@ SUBSYSTEM_DEF(statpanels) /// Sets the current tab to the SDQL tab /datum/controller/subsystem/statpanels/proc/set_SDQL2_tab(client/target) + if(!target) + return + var/list/sdql2_initial = list() - //sdql2_initial[length(sdql2_initial)++] = list("", "Access Global SDQL2 List", REF(GLOB.sdql2_vv_statobj)) + sdql2_initial[++sdql2_initial.len] = list("", "Access Global SDQL2 List", REF(GLOB.sdql2_vv_statobj)) var/list/sdql2_querydata = list() - //for(var/datum/sdql2_query/query as anything in GLOB.sdql2_queries) - //sdql2_querydata = query.generate_stat() + for(var/datum/sdql2_query/query as anything in GLOB.sdql2_queries) + sdql2_querydata += query.generate_stat() sdql2_initial += sdql2_querydata target.stat_panel.send_message("update_sdql2", sdql2_initial) ///immediately update the active statpanel tab of the target client /datum/controller/subsystem/statpanels/proc/immediate_send_stat_data(client/target) + if(!target) + return FALSE + if(!target.stat_panel.is_ready()) return FALSE diff --git a/code/controllers/subsystem/ticker.dm b/code/controllers/subsystem/ticker.dm index f265315460e3..1a6f98ee4cca 100644 --- a/code/controllers/subsystem/ticker.dm +++ b/code/controllers/subsystem/ticker.dm @@ -50,7 +50,7 @@ SUBSYSTEM_DEF(ticker) var/totalPlayers = 0 //used for pregame stats on statpanel var/totalPlayersReady = 0 //used for pregame stats on statpanel - var/tutorial_disabled = FALSE //zonenote + var/tutorial_disabled = FALSE /datum/controller/subsystem/ticker/Initialize(timeofday) load_mode() @@ -69,7 +69,7 @@ SUBSYSTEM_DEF(ticker) if(isnull(start_at)) start_at = time_left || world.time + (CONFIG_GET(number/lobby_countdown) * 10) to_chat_spaced(world, type = MESSAGE_TYPE_SYSTEM, margin_top = 2, margin_bottom = 0, html = SPAN_ROUNDHEADER("Welcome to the pre-game lobby of [CONFIG_GET(string/servername)]!")) - to_chat_spaced(world, type = MESSAGE_TYPE_SYSTEM, margin_top = 0, html = SPAN_ROUNDBODY("Please, setup your character and select ready. Game will start in [round(time_left / 10) || CONFIG_GET(number/lobby_countdown)] seconds.")) + to_chat_spaced(world, type = MESSAGE_TYPE_SYSTEM, margin_top = 0, html = SPAN_ROUNDBODY("Please, setup your character and select ready. Game will start in [floor(time_left / 10) || CONFIG_GET(number/lobby_countdown)] seconds.")) SEND_GLOBAL_SIGNAL(COMSIG_GLOB_MODE_PREGAME_LOBBY) current_state = GAME_STATE_PREGAME fire() @@ -346,8 +346,8 @@ SUBSYSTEM_DEF(ticker) /datum/controller/subsystem/ticker/proc/GetTimeLeft() if(isnull(SSticker.time_left)) - return round(max(0, start_at - world.time) / 10) - return round(time_left / 10) + return floor(max(0, start_at - world.time) / 10) + return floor(time_left / 10) /datum/controller/subsystem/ticker/proc/SetTimeLeft(newtime) diff --git a/code/controllers/subsystem/timer.dm b/code/controllers/subsystem/timer.dm index 47403f3379fb..8d819fa3282e 100644 --- a/code/controllers/subsystem/timer.dm +++ b/code/controllers/subsystem/timer.dm @@ -1,7 +1,7 @@ /// Controls how many buckets should be kept, each representing a tick. (1 minutes worth) #define BUCKET_LEN (world.fps*1*60) /// Helper for getting the correct bucket for a given timer -#define BUCKET_POS(timer) (((round((timer.timeToRun - timer.timer_subsystem.head_offset) / world.tick_lag)+1) % BUCKET_LEN)||BUCKET_LEN) +#define BUCKET_POS(timer) (((floor((timer.timeToRun - timer.timer_subsystem.head_offset) / world.tick_lag)+1) % BUCKET_LEN)||BUCKET_LEN) /// Gets the maximum time at which timers will be invoked from buckets, used for deferring to secondary queue #define TIMER_MAX(timer_ss) (timer_ss.head_offset + TICKS2DS(BUCKET_LEN + timer_ss.practical_offset - 1)) /// Max float with integer precision @@ -411,7 +411,7 @@ SUBSYSTEM_DEF(timer) if (flags & TIMER_STOPPABLE) id = num2text(nextid, 100) if (nextid >= SHORT_REAL_LIMIT) - nextid += min(1, 2 ** round(nextid / SHORT_REAL_LIMIT)) + nextid += min(1, 2 ** floor(nextid / SHORT_REAL_LIMIT)) else nextid++ timer_subsystem.timer_id_dict[id] = src @@ -583,7 +583,7 @@ SUBSYSTEM_DEF(timer) be supported and may refuse to run or run with a 0 wait") if (flags & TIMER_CLIENT_TIME) // REALTIMEOFDAY has a resolution of 1 decisecond - wait = max(Ceiling(wait), 1) // so if we use tick_lag timers may be inserted in the "past" + wait = max(ceil(wait), 1) // so if we use tick_lag timers may be inserted in the "past" else wait = max(CEILING(wait, world.tick_lag), world.tick_lag) diff --git a/code/controllers/subsystem/vote.dm b/code/controllers/subsystem/vote.dm index 2438577a1771..85e2a57cc6d6 100644 --- a/code/controllers/subsystem/vote.dm +++ b/code/controllers/subsystem/vote.dm @@ -36,7 +36,7 @@ SUBSYSTEM_DEF(vote) /datum/controller/subsystem/vote/fire() if(mode) - time_remaining = round((started_time + CONFIG_GET(number/vote_period) - world.time)/10) + time_remaining = floor((started_time + CONFIG_GET(number/vote_period) - world.time)/10) if(time_remaining < 0) result() @@ -363,7 +363,7 @@ SUBSYSTEM_DEF(vote) var/vp = CONFIG_GET(number/vote_period) SEND_SOUND(world, sound(vote_sound, channel = SOUND_CHANNEL_VOX, volume = vote_sound_vol)) to_chat(world, SPAN_CENTERBOLD("

[text]
Type vote or click here to place your votes.
You have [DisplayTimeText(vp)] to vote.


")) - time_remaining = round(vp/10) + time_remaining = floor(vp/10) for(var/c in GLOB.clients) var/client/C = c var/datum/action/innate/vote/V = give_action(C.mob, /datum/action/innate/vote) @@ -380,7 +380,7 @@ SUBSYSTEM_DEF(vote) /datum/controller/subsystem/vote/proc/map_vote_adjustment(current_votes, carry_over, total_votes) // Get 10% of the total map votes and remove them from the pool - var/total_vote_adjustment = round(total_votes * CONFIG_GET(number/vote_adjustment_callback)) + var/total_vote_adjustment = floor(total_votes * CONFIG_GET(number/vote_adjustment_callback)) // Do not remove more votes than were made for the map return -(min(current_votes, total_vote_adjustment)) diff --git a/code/datums/ammo/ammo.dm b/code/datums/ammo/ammo.dm index eba72f2594e2..a59290ab5f51 100644 --- a/code/datums/ammo/ammo.dm +++ b/code/datums/ammo/ammo.dm @@ -228,7 +228,7 @@ var/obj/projectile/P = new /obj/projectile(curloc, original_P.weapon_cause_data) P.generate_bullet(GLOB.ammo_list[bonus_projectiles_type]) //No bonus damage or anything. - P.accuracy = round(P.accuracy * original_P.accuracy/initial(original_P.accuracy)) //if the gun changes the accuracy of the main projectile, it also affects the bonus ones. + P.accuracy = floor(P.accuracy * original_P.accuracy/initial(original_P.accuracy)) //if the gun changes the accuracy of the main projectile, it also affects the bonus ones. original_P.give_bullet_traits(P) P.bonus_projectile_check = 2 //It's a bonus projectile! diff --git a/code/datums/ammo/bullet/arc.dm b/code/datums/ammo/bullet/arc.dm new file mode 100644 index 000000000000..5e74508e04b2 --- /dev/null +++ b/code/datums/ammo/bullet/arc.dm @@ -0,0 +1,14 @@ +/datum/ammo/bullet/re700 + name = "rotary cannon bullet" + icon_state = "autocannon" + damage_falloff = 0 + flags_ammo_behavior = AMMO_BALLISTIC + + accuracy = HIT_ACCURACY_TIER_7 + scatter = 0 + damage = 30 + damage_var_high = PROJECTILE_VARIANCE_TIER_8 + penetration = ARMOR_PENETRATION_TIER_2 + accurate_range = 10 + max_range = 12 + shell_speed = AMMO_SPEED_TIER_6 diff --git a/code/datums/ammo/bullet/pistol.dm b/code/datums/ammo/bullet/pistol.dm index 937c40d16cff..1c014e00601f 100644 --- a/code/datums/ammo/bullet/pistol.dm +++ b/code/datums/ammo/bullet/pistol.dm @@ -180,6 +180,7 @@ headshot_state = HEADSHOT_OVERLAY_MEDIUM debilitate = list(0,0,0,0,0,0,0,2) + effective_range_max = 3 accuracy = HIT_ACCURACY_TIER_4 damage = 45 penetration= ARMOR_PENETRATION_TIER_6 diff --git a/code/datums/beam.dm b/code/datums/beam.dm index 08b5ea9f9a64..4b024df585f9 100644 --- a/code/datums/beam.dm +++ b/code/datums/beam.dm @@ -82,7 +82,7 @@ /datum/beam/proc/Draw() if(always_turn) origin.setDir(get_dir(origin, target)) //Causes the source of the beam to rotate to continuosly face the BeamTarget. - var/Angle = round(Get_Angle(origin,target)) + var/Angle = floor(Get_Angle(origin,target)) var/matrix/rot_matrix = matrix() var/turf/origin_turf = get_turf(origin) rot_matrix.Turn(Angle) @@ -91,7 +91,7 @@ var/DX = get_pixel_position_x(target) - get_pixel_position_x(origin) var/DY = get_pixel_position_y(target) - get_pixel_position_y(origin) var/N = 0 - var/length = round(sqrt((DX)**2+(DY)**2)) //hypotenuse of the triangle formed by target and origin's displacement + var/length = floor(sqrt((DX)**2+(DY)**2)) //hypotenuse of the triangle formed by target and origin's displacement for(N in 0 to length-1 step world.icon_size)//-1 as we want < not <=, but we want the speed of X in Y to Z and step X if(QDELETED(src)) @@ -116,20 +116,20 @@ if(DX == 0) Pixel_x = 0 else - Pixel_x = round(sin(Angle) + world.icon_size*sin(Angle)*(N+world.icon_size/2) / world.icon_size) + Pixel_x = floor(sin(Angle) + world.icon_size*sin(Angle)*(N+world.icon_size/2) / world.icon_size) if(DY == 0) Pixel_y = 0 else - Pixel_y = round(cos(Angle) + world.icon_size*cos(Angle)*(N+world.icon_size/2) / world.icon_size) + Pixel_y = floor(cos(Angle) + world.icon_size*cos(Angle)*(N+world.icon_size/2) / world.icon_size) //Position the effect so the beam is one continous line var/a if(abs(Pixel_x)>world.icon_size) - a = Pixel_x > 0 ? round(Pixel_x/32) : Ceiling(Pixel_x/world.icon_size) + a = Pixel_x > 0 ? floor(Pixel_x/32) : ceil(Pixel_x/world.icon_size) X.x += a Pixel_x %= world.icon_size if(abs(Pixel_y)>world.icon_size) - a = Pixel_y > 0 ? round(Pixel_y/32) : Ceiling(Pixel_y/world.icon_size) + a = Pixel_y > 0 ? floor(Pixel_y/32) : ceil(Pixel_y/world.icon_size) X.y += a Pixel_y %= world.icon_size diff --git a/code/datums/components/cell.dm b/code/datums/components/cell.dm index 81ef3733e2e2..cf40caa41c73 100644 --- a/code/datums/components/cell.dm +++ b/code/datums/components/cell.dm @@ -71,7 +71,7 @@ /datum/component/cell/proc/on_emp(datum/source, severity) SIGNAL_HANDLER - use_charge(null, round(max_charge / severity)) + use_charge(null, floor(max_charge / severity)) /datum/component/cell/proc/start_drain(datum/source) SIGNAL_HANDLER @@ -92,7 +92,7 @@ if((charge_examine_range != UNLIMITED_DISTANCE) && get_dist(examiner, parent) > charge_examine_range) return - examine_text += "A small gauge in the corner reads \"Power: [round(100 * charge / max_charge)]%\"." + examine_text += "A small gauge in the corner reads \"Power: [floor(100 * charge / max_charge)]%\"." /datum/component/cell/proc/on_object_hit(datum/source, obj/item/cell/attack_obj, mob/living/attacker, params) SIGNAL_HANDLER @@ -154,7 +154,7 @@ var/to_transfer = min(max_recharge_tick, power_cell.charge, (max_charge - charge)) if(power_cell.use(to_transfer)) add_charge(null, to_transfer) - to_chat(user, "You transfer some power between [power_cell] and [parent]. The gauge now reads: [round(100 * charge / max_charge)]%.") + to_chat(user, "You transfer some power between [power_cell] and [parent]. The gauge now reads: [floor(100 * charge / max_charge)]%.") /datum/component/cell/proc/add_charge(datum/source, charge_add = 0) SIGNAL_HANDLER diff --git a/code/datums/components/disk_reader.dm b/code/datums/components/disk_reader.dm new file mode 100644 index 000000000000..6292519893e9 --- /dev/null +++ b/code/datums/components/disk_reader.dm @@ -0,0 +1,87 @@ +/datum/component/disk_reader + dupe_mode = COMPONENT_DUPE_UNIQUE + /// Ref to the inserted disk + var/obj/item/disk/objective/disk + +/datum/component/disk_reader/Initialize() + . = ..() + if(!istype(parent, /obj/structure/machinery)) + return COMPONENT_INCOMPATIBLE + +/datum/component/disk_reader/Destroy(force, silent) + handle_qdel() + return ..() + +/datum/component/disk_reader/RegisterWithParent() + ..() + RegisterSignal(parent, COMSIG_PARENT_ATTACKBY, PROC_REF(on_disk_insert)) + RegisterSignal(parent, COMSIG_PARENT_QDELETING, PROC_REF(handle_qdel)) + RegisterSignal(parent, COMSIG_INTEL_DISK_COMPLETED, PROC_REF(on_disk_complete)) + RegisterSignal(parent, COMSIG_INTEL_DISK_LOST_POWER, PROC_REF(on_power_lost)) + +/datum/component/disk_reader/UnregisterFromParent() + ..() + handle_qdel() + +/datum/component/disk_reader/proc/handle_qdel() + SIGNAL_HANDLER + QDEL_NULL(disk) + +/datum/component/disk_reader/proc/on_disk_insert(datum/source, obj/item/disk/objective/potential_disk, mob/living/inserter, params) + SIGNAL_HANDLER + + if(!istype(potential_disk) || !potential_disk.objective) + return + + if(disk) + to_chat(inserter, SPAN_WARNING("There's already a disk inside [parent], wait for it to finish first!")) + return COMPONENT_NO_AFTERATTACK + + if(potential_disk.objective.state == OBJECTIVE_COMPLETE) + to_chat(inserter, SPAN_WARNING("The reader displays a message stating this disk has already been read and refuses to accept it.")) + return COMPONENT_NO_AFTERATTACK + + INVOKE_ASYNC(src, PROC_REF(handle_disk_insert), potential_disk, inserter) + return COMPONENT_NO_AFTERATTACK + +/datum/component/disk_reader/proc/handle_disk_insert(obj/item/disk/objective/potential_disk, mob/living/inserter) + if(tgui_input_text(inserter, "Enter the encryption key", "Decrypting [potential_disk]", "") != potential_disk.objective.decryption_password) + to_chat(inserter, SPAN_WARNING("The reader buzzes, ejecting the disk.")) + return + + if(disk) + to_chat(inserter, SPAN_WARNING("There's already a disk inside [parent], wait for it to finish first!")) + return + + if(!(potential_disk in inserter.contents)) + return + + potential_disk.objective.activate() + + inserter.drop_inv_item_to_loc(potential_disk, parent) + disk = potential_disk + to_chat(inserter, SPAN_NOTICE("You insert [potential_disk] and enter the decryption key.")) + inserter.count_niche_stat(STATISTICS_NICHE_DISK) + +/datum/component/disk_reader/proc/on_disk_complete(datum/source) + SIGNAL_HANDLER + var/atom/atom_parent = parent + + atom_parent.visible_message("[atom_parent] pings softly as the upload finishes and ejects [disk].") + playsound(atom_parent, 'sound/machines/screen_output1.ogg', 25, 1) + disk.forceMove(get_turf(atom_parent)) + disk.name = "[disk.name] (complete)" + disk.objective.award_points() + disk.retrieve_objective.state = OBJECTIVE_ACTIVE + disk.retrieve_objective.activate() + disk = null + +/datum/component/disk_reader/proc/on_power_lost(datum/source) + SIGNAL_HANDLER + var/atom/atom_parent = parent + + atom_parent.visible_message(SPAN_WARNING("[atom_parent] powers down mid-operation as the area loses power.")) + playsound(atom_parent, 'sound/machines/terminal_shutdown.ogg', 25, 1) + SSobjectives.stop_processing_objective(src) + disk.forceMove(get_turf(atom_parent)) + disk = null diff --git a/code/datums/components/overlay_lighting.dm b/code/datums/components/overlay_lighting.dm index 8288453f7b24..e7e8c2e9b984 100644 --- a/code/datums/components/overlay_lighting.dm +++ b/code/datums/components/overlay_lighting.dm @@ -175,7 +175,7 @@ LAZYINITLIST(affected_turfs) if(range <= 2) //Range here is 1 because actual range of lighting mask is 1 tile even if it says that range is 2 - for(var/turf/lit_turf in RANGE_TURFS(1, current_holder.loc)) + for(var/turf/lit_turf as anything in RANGE_TURFS(1, current_holder.loc)) lit_turf.dynamic_lumcount += lum_power affected_turfs += lit_turf else @@ -340,7 +340,7 @@ turn_off() range = clamp(CEILING(new_range, 0.5), 1, 7) var/pixel_bounds = ((range - 1) * 64) + 32 - lumcount_range = Ceiling(range) + lumcount_range = ceil(range) if(current_holder && overlay_lighting_flags & LIGHTING_ON) current_holder.underlays -= visible_mask visible_mask.icon = light_overlays["[pixel_bounds]"] @@ -356,7 +356,7 @@ if(current_holder && overlay_lighting_flags & LIGHTING_ON) current_holder.underlays += visible_mask if(directional) - cast_range = clamp(round(new_range * 0.5), 1, 3) + cast_range = clamp(floor(new_range * 0.5), 1, 3) if(overlay_lighting_flags & LIGHTING_ON) make_luminosity_update() diff --git a/code/datums/components/weed_food.dm b/code/datums/components/weed_food.dm index 8737fba08db9..ce6fe35e4a28 100644 --- a/code/datums/components/weed_food.dm +++ b/code/datums/components/weed_food.dm @@ -87,7 +87,7 @@ parent_buckle = null /datum/component/weed_food/RegisterWithParent() - RegisterSignal(parent_mob, COMSIG_MOVABLE_MOVED, PROC_REF(on_move)) + RegisterSignal(parent_mob, COMSIG_MOVABLE_TURF_ENTERED, PROC_REF(on_move)) RegisterSignal(parent_mob, list(COMSIG_LIVING_REJUVENATED, COMSIG_HUMAN_REVIVED), PROC_REF(on_rejuv)) RegisterSignal(parent_mob, COMSIG_HUMAN_SET_UNDEFIBBABLE, PROC_REF(on_update)) RegisterSignal(parent_mob, COMSIG_LIVING_PREIGNITION, PROC_REF(on_preignition)) @@ -98,7 +98,7 @@ /datum/component/weed_food/UnregisterFromParent() if(parent_mob) UnregisterSignal(parent_mob, list( - COMSIG_MOVABLE_MOVED, + COMSIG_MOVABLE_TURF_ENTERED, COMSIG_LIVING_REJUVENATED, COMSIG_HUMAN_REVIVED, COMSIG_HUMAN_SET_UNDEFIBBABLE, @@ -109,12 +109,12 @@ if(parent_turf) UnregisterSignal(parent_turf, COMSIG_WEEDNODE_GROWTH) if(parent_buckle) - UnregisterSignal(parent_buckle, COSMIG_OBJ_AFTER_BUCKLE) + UnregisterSignal(parent_buckle, COMSIG_OBJ_AFTER_BUCKLE) if(parent_nest) UnregisterSignal(parent_nest, COMSIG_PARENT_QDELETING) UnregisterSignal(SSdcs, COMSIG_GLOB_GROUNDSIDE_FORSAKEN_HANDLING) -/// SIGNAL_HANDLER for COMSIG_MOVABLE_MOVED +/// SIGNAL_HANDLER for COMSIG_MOVABLE_TURF_ENTERED /datum/component/weed_food/proc/on_move() SIGNAL_HANDLER @@ -148,7 +148,7 @@ qdel(src) -/// SIGNAL_HANDLER for COSMIG_OBJ_AFTER_BUCKLE +/// SIGNAL_HANDLER for COMSIG_OBJ_AFTER_BUCKLE /datum/component/weed_food/proc/on_after_buckle(obj/source, mob/buckled) SIGNAL_HANDLER @@ -220,12 +220,12 @@ return FALSE // Still buckled to the same thing if(!istype(parent_mob.buckled, /obj/structure/bed/nest)) if(parent_buckle) // Still have a lingering reference somehow? - UnregisterSignal(parent_buckle, COSMIG_OBJ_AFTER_BUCKLE) + UnregisterSignal(parent_buckle, COMSIG_OBJ_AFTER_BUCKLE) parent_buckle = parent_mob.buckled - RegisterSignal(parent_mob.buckled, COSMIG_OBJ_AFTER_BUCKLE, PROC_REF(on_after_buckle)) + RegisterSignal(parent_mob.buckled, COMSIG_OBJ_AFTER_BUCKLE, PROC_REF(on_after_buckle)) return FALSE if(parent_buckle) - UnregisterSignal(parent_buckle, COSMIG_OBJ_AFTER_BUCKLE) + UnregisterSignal(parent_buckle, COMSIG_OBJ_AFTER_BUCKLE) parent_buckle = null if(parent_mob.is_xeno_grabbable()) @@ -282,16 +282,16 @@ return FALSE // Still buckled to the same thing somehow? if(!istype(parent_mob.buckled, /obj/structure/bed/nest)) if(parent_buckle) // Still have a lingering reference somehow? - UnregisterSignal(parent_buckle, COSMIG_OBJ_AFTER_BUCKLE) + UnregisterSignal(parent_buckle, COMSIG_OBJ_AFTER_BUCKLE) parent_buckle = parent_mob.buckled - RegisterSignal(parent_mob.buckled, COSMIG_OBJ_AFTER_BUCKLE, PROC_REF(on_after_buckle)) + RegisterSignal(parent_mob.buckled, COMSIG_OBJ_AFTER_BUCKLE, PROC_REF(on_after_buckle)) return FALSE else parent_nest = parent_mob.buckled RegisterSignal(parent_nest, COMSIG_PARENT_QDELETING, PROC_REF(on_nest_deletion)) if(parent_buckle) - UnregisterSignal(parent_buckle, COSMIG_OBJ_AFTER_BUCKLE) + UnregisterSignal(parent_buckle, COMSIG_OBJ_AFTER_BUCKLE) parent_buckle = null if(SEND_SIGNAL(parent_mob, COMSIG_ATTEMPT_MOB_PULL) & COMPONENT_CANCEL_MOB_PULL) diff --git a/code/datums/custom_hud.dm b/code/datums/custom_hud.dm index 62ae36aa7b89..c9894398477a 100644 --- a/code/datums/custom_hud.dm +++ b/code/datums/custom_hud.dm @@ -71,7 +71,7 @@ var/coord_col = "-[col-1]" var/coord_col_offset = "-[4+2*col]" - var/row = round((placement-1)/13) + var/row = floor((placement-1)/13) var/coord_row = "[-1 - row]" var/coord_row_offset = 26 return "EAST[coord_col]:[coord_col_offset],NORTH[coord_row]:[coord_row_offset]" @@ -126,7 +126,7 @@ var/coord_col = "-0" var/coord_col_offset = "-[24 * col + 2]" - var/row = round((placement-1)/6) + var/row = floor((placement-1)/6) var/coord_row = "[-1 - row]" var/coord_row_offset = -8 return "EAST[coord_col]:[coord_col_offset],NORTH[coord_row]:[coord_row_offset]" diff --git a/code/datums/diseases/advance/advance.dm b/code/datums/diseases/advance/advance.dm index 8b84513169e6..6ccbaa66e7de 100644 --- a/code/datums/diseases/advance/advance.dm +++ b/code/datums/diseases/advance/advance.dm @@ -205,7 +205,7 @@ GLOBAL_LIST_INIT(advance_cures, list( hidden = list( (properties["stealth"] > 2), (properties["stealth"] > 3) ) // The more symptoms we have, the less transmittable it is but some symptoms can make up for it. SetSpread(clamp(properties["transmittable"] - symptoms.len, BLOOD, AIRBORNE)) - permeability_mod = max(Ceiling(0.4 * properties["transmittable"]), 1) + permeability_mod = max(ceil(0.4 * properties["transmittable"]), 1) cure_chance = 15 - clamp(properties["resistance"], -5, 5) // can be between 10 and 20 stage_prob = max(properties["stage_rate"], 2) SetSeverity(properties["severity"]) diff --git a/code/datums/effects/neurotoxin.dm b/code/datums/effects/neurotoxin.dm index 490ed213292b..b1edca7d5806 100644 --- a/code/datums/effects/neurotoxin.dm +++ b/code/datums/effects/neurotoxin.dm @@ -37,6 +37,10 @@ return FALSE if(affected_mob.stat == DEAD) return + + if(issynth(affected_atom)) + return + // General effects affected_mob.last_damage_data = cause_data affected_mob.apply_stamina_damage(stam_dam) @@ -83,12 +87,12 @@ addtimer(VARSET_CALLBACK(src,hallucinate,TRUE),rand(4 SECONDS,10 SECONDS)) if(duration > 19) // 4 ticks in smoke, neuro is affecting cereberal activity - affected_mob.eye_blind = max(affected_mob.eye_blind, round(strength/4)) + affected_mob.eye_blind = max(affected_mob.eye_blind, floor(strength/4)) if(duration >= 27) // 5+ ticks in smoke, you are ODing now affected_mob.apply_effect(1, DAZE) // Unable to talk and weldervision affected_mob.apply_damage(2,TOX) - affected_mob.SetEarDeafness(max(affected_mob.ear_deaf, round(strength*1.5))) //Paralysis of hearing system, aka deafness + affected_mob.SetEarDeafness(max(affected_mob.ear_deaf, floor(strength*1.5))) //Paralysis of hearing system, aka deafness if(duration >= 50) // 10+ ticks, apply some semi-perm damage and end their suffering if they are somehow still alive by now affected_mob.apply_internal_damage(10,"liver") diff --git a/code/datums/elements/bullet_trait/damage_boost.dm b/code/datums/elements/bullet_trait/damage_boost.dm index 43d9d1b23377..20175d11256a 100644 --- a/code/datums/elements/bullet_trait/damage_boost.dm +++ b/code/datums/elements/bullet_trait/damage_boost.dm @@ -87,7 +87,7 @@ GLOBAL_LIST_INIT(damage_boost_vehicles, typecacheof(/obj/vehicle/multitile)) boosted_projectile.damage_boosted-- //Mark that damage has been returned to normal. if(damage_boosted_atoms[hit_atom.type]) //If hitting a valid atom for damage boost - boosted_projectile.damage = round(boosted_projectile.damage * active_damage_mult) //Modify Damage by multiplier + boosted_projectile.damage = floor(boosted_projectile.damage * active_damage_mult) //Modify Damage by multiplier if (active_damage_mult) boosted_projectile.last_damage_mult = active_damage_mult //Save multiplier for next check diff --git a/code/datums/elements/bullet_trait/iff.dm b/code/datums/elements/bullet_trait/iff.dm index ab48b29f4812..cee36acbed80 100644 --- a/code/datums/elements/bullet_trait/iff.dm +++ b/code/datums/elements/bullet_trait/iff.dm @@ -46,7 +46,7 @@ // The cache is reset when the user drops their ID /datum/element/bullet_trait_iff/proc/get_user_iff_group(mob/living/carbon/human/user) if(!ishuman(user)) - return user.faction_group + return user?.faction_group var/iff_group = LAZYACCESS(iff_group_cache, user) if(isnull(iff_group)) diff --git a/code/datums/elements/bullet_trait/incendiary.dm b/code/datums/elements/bullet_trait/incendiary.dm index 861e67651a53..74a7e32cc324 100644 --- a/code/datums/elements/bullet_trait/incendiary.dm +++ b/code/datums/elements/bullet_trait/incendiary.dm @@ -52,7 +52,7 @@ if(projectile_target.stat) to_chat(projectile_target, SPAN_AVOIDHARM("You shrug off some persistent flames.")) return - projectile_target.adjust_fire_stacks(burn_stacks/2 + round(damage_actual / 4), burn_reagent) + projectile_target.adjust_fire_stacks(burn_stacks/2 + floor(damage_actual / 4), burn_reagent) projectile_target.IgniteMob() projectile_target.visible_message( SPAN_DANGER("[projectile_target] bursts into flames!"), \ diff --git a/code/datums/entities/player.dm b/code/datums/entities/player.dm index aefa81672b54..a62e663ba21c 100644 --- a/code/datums/entities/player.dm +++ b/code/datums/entities/player.dm @@ -90,11 +90,12 @@ BSQL_PROTECT_DATUM(/datum/entity/player) /datum/entity/player/proc/add_note(note_text, is_confidential, note_category = NOTE_ADMIN, is_ban = FALSE, duration = null) var/client/admin = usr.client // do all checks here, especially for sensitive stuff like this - if(!admin || !admin.player_data) - return FALSE - if(note_category == NOTE_ADMIN || is_confidential) - if (!AHOLD_IS_MOD(admin.admin_holder)) + if(!(note_category == NOTE_WHITELIST)) + if(!admin || !admin.player_data) return FALSE + if(note_category == NOTE_ADMIN || is_confidential) + if (!AHOLD_IS_MOD(admin.admin_holder)) + return FALSE // this is here for a short transition period when we still are testing DB notes and constantly deleting the file if(CONFIG_GET(flag/duplicate_notes_to_file)) @@ -119,7 +120,7 @@ BSQL_PROTECT_DATUM(/datum/entity/player) note.note_category = note_category note.is_ban = is_ban note.ban_time = duration - note.admin_rank = admin.admin_holder.rank + note.admin_rank = admin.admin_holder ? admin.admin_holder.rank : "Non-Staff" // since admin is in game, their player_data has to be populated. This is also checked above note.admin_id = admin.player_data.id note.admin = admin.player_data @@ -134,13 +135,17 @@ BSQL_PROTECT_DATUM(/datum/entity/player) notes.Add(note) return TRUE -/datum/entity/player/proc/remove_note(note_id) +/datum/entity/player/proc/remove_note(note_id, whitelist = FALSE) + if(IsAdminAdvancedProcCall()) + return PROC_BLOCKED var/client/admin = usr.client // do all checks here, especially for sensitive stuff like this if(!admin || !admin.player_data) return FALSE - if (!AHOLD_IS_MOD(admin.admin_holder)) + if((!AHOLD_IS_MOD(admin.admin_holder)) && !whitelist) + return FALSE + if(whitelist && !(isSenator(admin) || CLIENT_HAS_RIGHTS(admin, R_PERMISSIONS))) return FALSE // this is here for a short transition period when we still are testing DB notes and constantly deleting the file diff --git a/code/datums/entities/player_times.dm b/code/datums/entities/player_times.dm index 2bbd4a3bc39e..4fc28ba2fa5e 100644 --- a/code/datums/entities/player_times.dm +++ b/code/datums/entities/player_times.dm @@ -61,7 +61,7 @@ BSQL_PROTECT_DATUM(/datum/entity/player_time) return list( "job" = role_id, "playtime" = round(total_minutes MINUTES_TO_HOURS, 0.1), - "bgcolor" = "rgb(0, [Floor(128 * playtime_percentage)], [Floor(255 * playtime_percentage)])", + "bgcolor" = "rgb(0, [floor(128 * playtime_percentage)], [floor(255 * playtime_percentage)])", "textcolor" = "#FFFFFF", "icondisplay" = icon_display ) diff --git a/code/datums/keybinding/communication.dm b/code/datums/keybinding/communication.dm index e1ba0ab5a31e..d77aa9a8096b 100644 --- a/code/datums/keybinding/communication.dm +++ b/code/datums/keybinding/communication.dm @@ -8,6 +8,15 @@ full_name = "IC Say" keybind_signal = COMSIG_KB_CLIENT_SAY_DOWN +/datum/keybinding/client/communication/say/down(client/user) + . = ..() + if(.) + return + if(!user.prefs.tgui_say) + return + winset(user, null, "command=[user.tgui_say_create_open_command(SAY_CHANNEL)]") + return TRUE + /datum/keybinding/client/communication/ooc hotkey_keys = list("O") classic_keys = list("F2") @@ -15,6 +24,15 @@ full_name = "Out Of Character Say (OOC)" keybind_signal = COMSIG_KB_CLIENT_OOC_DOWN +/datum/keybinding/client/communication/ooc/down(client/user) + . = ..() + if(.) + return + if(!user.prefs.tgui_say) + return + winset(user, null, "command=[user.tgui_say_create_open_command(OOC_CHANNEL)]") + return TRUE + /datum/keybinding/client/communication/looc hotkey_keys = list("L") classic_keys = list("Unbound") @@ -22,6 +40,15 @@ full_name = "Local Out Of Character Say (OOC)" keybind_signal = COMSIG_KB_CLIENT_LOOC_DOWN +/datum/keybinding/client/communication/looc/down(client/user) + . = ..() + if(.) + return + if(!user.prefs.tgui_say) + return + winset(user, null, "command=[user.tgui_say_create_open_command(LOOC_CHANNEL)]") + return TRUE + /datum/keybinding/client/communication/me hotkey_keys = list("M") classic_keys = list("F4") @@ -29,6 +56,15 @@ full_name = "Custom Emote (/Me)" keybind_signal = COMSIG_KB_CLIENT_ME_DOWN +/datum/keybinding/client/communication/me/down(client/user) + . = ..() + if(.) + return + if(!user.prefs.tgui_say) + return + winset(user, null, "command=[user.tgui_say_create_open_command(ME_CHANNEL)]") + return TRUE + /datum/keybinding/client/communication/whisper hotkey_keys = list("Unbound") classic_keys = list("Unbound") @@ -42,6 +78,15 @@ full_name = "IC Comms (;)" keybind_signal = COMSIG_KG_CLIENT_RADIO_DOWN +/datum/keybinding/client/communication/radiochannels/down(client/user) + . = ..() + if(.) + return + if(!user.prefs.tgui_say) + return + winset(user, null, "command=[user.tgui_say_create_open_command(COMMS_CHANNEL)]") + return TRUE + /datum/keybinding/client/communication/asay hotkey_keys = list("F3") classic_keys = list("F5") @@ -50,6 +95,17 @@ description = "Talk with other admins." keybind_signal = COMSIG_KB_ADMIN_ASAY_DOWN +/datum/keybinding/client/communication/asay/down(client/user) + . = ..() + if(.) + return + if(!user.prefs.tgui_say) + return + if(!user.admin_holder?.check_for_rights(R_MOD)) + return + winset(user, null, "command=[user.tgui_say_create_open_command(ADMIN_CHANNEL)]") + return TRUE + /datum/keybinding/client/communication/mentor_say hotkey_keys = list("Unbound") classic_keys = list("Unbound") @@ -57,3 +113,14 @@ full_name = "Mentor Say" description = "Talk with other mentors." keybind_signal = COMSIG_KB_ADMIN_MENTORSAY_DOWN + +/datum/keybinding/client/communication/mentor_say/down(client/user) + . = ..() + if(.) + return + if(!user.prefs.tgui_say) + return + if(!user.admin_holder?.check_for_rights(R_MENTOR)) + return + winset(user, null, "command=[user.tgui_say_create_open_command(MENTOR_CHANNEL)]") + return TRUE diff --git a/code/datums/mob_hud.dm b/code/datums/mob_hud.dm index 88785474bc23..975bd5d15cb9 100644 --- a/code/datums/mob_hud.dm +++ b/code/datums/mob_hud.dm @@ -370,6 +370,9 @@ GLOBAL_LIST_INIT_TYPED(huds, /datum/mob_hud, list( holder3.color = null holder4.color = null + holder2.alpha = alpha + holder3.alpha = alpha + holder4.icon_state = "hudblank" if(species && species.flags & IS_SYNTHETIC) @@ -422,6 +425,10 @@ GLOBAL_LIST_INIT_TYPED(huds, /datum/mob_hud, list( if(hive && hive.color) holder3.color = hive.color + if(stat == DEAD || status_flags & FAKEDEATH) + holder2.alpha = 100 + holder3.alpha = 100 + if(status_flags & CORRUPTED_ALLY) holder4.color = "#80ff80" holder4.icon_state = "hudalien_ally" diff --git a/code/datums/pain/_pain.dm b/code/datums/pain/_pain.dm index b99927ac596e..fd4dfbf0bbb3 100644 --- a/code/datums/pain/_pain.dm +++ b/code/datums/pain/_pain.dm @@ -82,7 +82,7 @@ if(current_pain - new_pain_reduction > max_pain) return 100 - var/percentage = round(((current_pain - new_pain_reduction) / max_pain) * 100) + var/percentage = floor(((current_pain - new_pain_reduction) / max_pain) * 100) if(percentage < 0) return 0 else diff --git a/code/datums/shuttles.dm b/code/datums/shuttles.dm index 0eba86add45d..dc3c5c4d8a5b 100644 --- a/code/datums/shuttles.dm +++ b/code/datums/shuttles.dm @@ -58,11 +58,7 @@ . = ..() if(!.) return - var/list/turfs = block( locate(.[MAP_MINX], .[MAP_MINY], .[MAP_MINZ]), - locate(.[MAP_MAXX], .[MAP_MAXY], .[MAP_MAXZ])) - for(var/i in 1 to turfs.len) - var/turf/place = turfs[i] - + for(var/turf/place as anything in block(.[MAP_MINX], .[MAP_MINY], .[MAP_MINZ], .[MAP_MAXX], .[MAP_MAXY], .[MAP_MAXZ])) // ================== CM Change ================== // We perform atom initialization of the docking_ports BEFORE skipping space, // because our lifeboats have their corners as object props and still @@ -85,8 +81,7 @@ /datum/map_template/shuttle/post_load(obj/docking_port/mobile/M) if(movement_force) M.movement_force = movement_force.Copy() - M.linkup() - + M.linkup(src) /datum/map_template/shuttle/vehicle shuttle_id = MOBILE_SHUTTLE_VEHICLE_ELEVATOR diff --git a/code/datums/skills/uscm.dm b/code/datums/skills/uscm.dm index 1e0dedf5dd05..9c56e7f62a88 100644 --- a/code/datums/skills/uscm.dm +++ b/code/datums/skills/uscm.dm @@ -239,7 +239,8 @@ COMMAND STAFF SKILL_JTAC = SKILL_JTAC_MASTER, SKILL_SPEC_WEAPONS = SKILL_SPEC_ALL, SKILL_EXECUTION = SKILL_EXECUTION_TRAINED, //can BE people - SKILL_INTEL = SKILL_INTEL_EXPERT + SKILL_INTEL = SKILL_INTEL_EXPERT, + SKILL_VEHICLE = SKILL_VEHICLE_LARGE, ) /datum/skills/commander @@ -261,7 +262,8 @@ COMMAND STAFF SKILL_JTAC = SKILL_JTAC_MASTER, SKILL_EXECUTION = SKILL_EXECUTION_TRAINED, //can BE people SKILL_INTEL = SKILL_INTEL_EXPERT, - SKILL_NAVIGATIONS = SKILL_NAVIGATIONS_TRAINED //can change ship alt + SKILL_NAVIGATIONS = SKILL_NAVIGATIONS_TRAINED, //can change ship alt + SKILL_VEHICLE = SKILL_VEHICLE_LARGE, ) /datum/skills/XO @@ -282,6 +284,7 @@ COMMAND STAFF SKILL_JTAC = SKILL_JTAC_MASTER, SKILL_INTEL = SKILL_INTEL_EXPERT, SKILL_NAVIGATIONS = SKILL_NAVIGATIONS_TRAINED, + SKILL_VEHICLE = SKILL_VEHICLE_LARGE, ) /datum/skills/SO @@ -299,6 +302,7 @@ COMMAND STAFF SKILL_POWERLOADER = SKILL_POWERLOADER_TRAINED, SKILL_JTAC = SKILL_JTAC_EXPERT, SKILL_INTEL = SKILL_INTEL_TRAINED, + SKILL_VEHICLE = SKILL_VEHICLE_LARGE, ) /datum/skills/SEA diff --git a/code/datums/skills/wygoons.dm b/code/datums/skills/wygoons.dm new file mode 100644 index 000000000000..2d2c247bd1ea --- /dev/null +++ b/code/datums/skills/wygoons.dm @@ -0,0 +1,36 @@ +/datum/skills/wy_goon + name = "Corporate Security" + skills = list( + SKILL_CQC = SKILL_CQC_SKILLED, + SKILL_POLICE = SKILL_POLICE_SKILLED, + SKILL_FIREMAN = SKILL_FIREMAN_SKILLED, + SKILL_ENDURANCE = SKILL_ENDURANCE_TRAINED, + SKILL_MELEE_WEAPONS = SKILL_MELEE_TRAINED, + ) + +/datum/skills/wy_goon_tech + name = "Corporate Security Support Technician" + skills = list( + SKILL_CQC = SKILL_CQC_SKILLED, + SKILL_POLICE = SKILL_POLICE_SKILLED, + SKILL_FIREMAN = SKILL_FIREMAN_TRAINED, + SKILL_ENDURANCE = SKILL_ENDURANCE_TRAINED, + SKILL_MELEE_WEAPONS = SKILL_MELEE_TRAINED, + SKILL_MEDICAL = SKILL_MEDICAL_TRAINED, + SKILL_CONSTRUCTION = SKILL_CONSTRUCTION_ENGI, + SKILL_ENGINEER = SKILL_ENGINEER_ENGI, + ) + +/datum/skills/wy_goon_lead + name = "Corporate Security Leader" + skills = list( + SKILL_CQC = SKILL_CQC_SKILLED, + SKILL_POLICE = SKILL_POLICE_SKILLED, + SKILL_FIREMAN = SKILL_FIREMAN_SKILLED, + SKILL_ENDURANCE = SKILL_ENDURANCE_TRAINED, + SKILL_MELEE_WEAPONS = SKILL_MELEE_TRAINED, + SKILL_MEDICAL = SKILL_MEDICAL_TRAINED, + SKILL_CONSTRUCTION = SKILL_CONSTRUCTION_ENGI, + SKILL_ENGINEER = SKILL_ENGINEER_ENGI, + SKILL_LEADERSHIP = SKILL_LEAD_TRAINED, + ) diff --git a/code/datums/statistics/entities/death_stats.dm b/code/datums/statistics/entities/death_stats.dm index 76e3605c157f..18751ba604a1 100644 --- a/code/datums/statistics/entities/death_stats.dm +++ b/code/datums/statistics/entities/death_stats.dm @@ -113,13 +113,13 @@ cause_mob.life_kills_total += life_value if(getBruteLoss()) - new_death.total_brute = round(getBruteLoss()) + new_death.total_brute = floor(getBruteLoss()) if(getFireLoss()) - new_death.total_burn = round(getFireLoss()) + new_death.total_burn = floor(getFireLoss()) if(getOxyLoss()) - new_death.total_oxy = round(getOxyLoss()) + new_death.total_oxy = floor(getOxyLoss()) if(getToxLoss()) - new_death.total_tox = round(getToxLoss()) + new_death.total_tox = floor(getToxLoss()) new_death.time_of_death = world.time diff --git a/code/datums/supply_packs/gear.dm b/code/datums/supply_packs/gear.dm index 54a2ae221c9d..5343b93dabbd 100644 --- a/code/datums/supply_packs/gear.dm +++ b/code/datums/supply_packs/gear.dm @@ -63,3 +63,32 @@ containertype = /obj/structure/closet/crate/ammo containername = "fulton recovery device crate" group = "Gear" + +/datum/supply_packs/parachute + name = "parachute crate (x20)" + contains = list( + /obj/item/parachute, + /obj/item/parachute, + /obj/item/parachute, + /obj/item/parachute, + /obj/item/parachute, + /obj/item/parachute, + /obj/item/parachute, + /obj/item/parachute, + /obj/item/parachute, + /obj/item/parachute, + /obj/item/parachute, + /obj/item/parachute, + /obj/item/parachute, + /obj/item/parachute, + /obj/item/parachute, + /obj/item/parachute, + /obj/item/parachute, + /obj/item/parachute, + /obj/item/parachute, + /obj/item/parachute, + ) + cost = 40 + containertype = /obj/structure/closet/crate/supply + containername = "parachute crate" + group = "Gear" diff --git a/code/datums/supply_packs/medical.dm b/code/datums/supply_packs/medical.dm index 097642eb163f..acfb9fe1793d 100644 --- a/code/datums/supply_packs/medical.dm +++ b/code/datums/supply_packs/medical.dm @@ -17,11 +17,31 @@ /obj/item/storage/pill_bottle/peridaxon, /obj/item/storage/box/pillbottles, ) - cost = 20 + cost = 15 containertype = /obj/structure/closet/crate/medical containername = "medical crate" group = "Medical" +/datum/supply_packs/medical_restock_cart + name = "medical restock cart" + contains = list( + /obj/structure/restock_cart/medical, + ) + cost = 20 + containertype = null + containername = "medical restock cart" + group = "Medical" + +/datum/supply_packs/medical_reagent_cart + name = "medical reagent restock cart" + contains = list( + /obj/structure/restock_cart/medical/reagent, + ) + cost = 20 + containertype = null + containername = "medical reagent restock cart" + group = "Medical" + /datum/supply_packs/pillbottle name = "pill bottle crate (x2 each)" contains = list( @@ -42,7 +62,7 @@ /obj/item/storage/box/pillbottles, /obj/item/storage/box/pillbottles, ) - cost = 20 + cost = 15 containertype = /obj/structure/closet/crate/medical containername = "medical crate" group = "Medical" @@ -61,7 +81,7 @@ /obj/item/storage/firstaid/adv, /obj/item/storage/firstaid/adv, ) - cost = 16 + cost = 11 containertype = /obj/structure/closet/crate/medical containername = "medical crate" group = "Medical" @@ -74,7 +94,7 @@ /obj/item/storage/box/bodybags, /obj/item/storage/box/bodybags, ) - cost = 12 + cost = 7 containertype = /obj/structure/closet/crate/medical containername = "body bag crate" group = "Medical" @@ -86,7 +106,7 @@ /obj/item/bodybag/cryobag, /obj/item/bodybag/cryobag, ) - cost = 20 + cost = 15 containertype = /obj/structure/closet/crate/medical containername = "stasis bag crate" group = "Medical" @@ -101,7 +121,7 @@ /obj/item/storage/box/masks, /obj/item/storage/box/gloves, ) - cost = 30 + cost = 25 containertype = /obj/structure/closet/crate/secure/surgery containername = "surgery crate" access = ACCESS_MARINE_MEDBAY diff --git a/code/datums/supply_packs/vehicle_ammo.dm b/code/datums/supply_packs/vehicle_ammo.dm index 5dad91d27ed4..43ce36ec2b64 100644 --- a/code/datums/supply_packs/vehicle_ammo.dm +++ b/code/datums/supply_packs/vehicle_ammo.dm @@ -148,3 +148,15 @@ containertype = /obj/structure/closet/crate/ammo containername = "M-87F Flare Launcher ammo crate" group = "Vehicle Ammo" + +/datum/supply_packs/ammo_arcsentry + name = "RE700 Rotary Cannon magazines (x3)" + contains = list( + /obj/item/ammo_magazine/hardpoint/arc_sentry, + /obj/item/ammo_magazine/hardpoint/arc_sentry, + /obj/item/ammo_magazine/hardpoint/arc_sentry, + ) + cost = 20 + containertype = /obj/structure/closet/crate/ammo + containername = "RE700 Rotary Cannon ammo crate" + group = "Vehicle Ammo" diff --git a/code/datums/supply_packs/vehicle_equipment.dm b/code/datums/supply_packs/vehicle_equipment.dm new file mode 100644 index 000000000000..df106761d467 --- /dev/null +++ b/code/datums/supply_packs/vehicle_equipment.dm @@ -0,0 +1,9 @@ +/datum/supply_packs/arcsentry_replacement + name = "Replacement RE700 Rotary Cannon (x1)" + contains = list( + /obj/item/hardpoint/primary/arc_sentry, + ) + cost = 25 + containertype = /obj/structure/closet/crate/weapon + containername = "RE700 Rotary Cannon crate" + group = "Vehicle Equipment" diff --git a/code/datums/tutorial/_tutorial.dm b/code/datums/tutorial/_tutorial.dm index f228c051a77d..ddeddddd0407 100644 --- a/code/datums/tutorial/_tutorial.dm +++ b/code/datums/tutorial/_tutorial.dm @@ -101,13 +101,7 @@ GLOBAL_LIST_EMPTY_TYPED(ongoing_tutorials, /datum/tutorial) /datum/tutorial/proc/verify_template_loaded() // We subtract 1 from x and y because the bottom left corner doesn't start at the walls. var/turf/true_bottom_left_corner = reservation.bottom_left_turfs[1] - // We subtract 1 from x and y here because the bottom left corner counts as the first tile - var/turf/top_right_corner = locate( - true_bottom_left_corner.x + initial(tutorial_template.width) - 1, - true_bottom_left_corner.y + initial(tutorial_template.height) - 1, - true_bottom_left_corner.z - ) - for(var/turf/tile as anything in block(true_bottom_left_corner, top_right_corner)) + for(var/turf/tile as anything in CORNER_BLOCK(true_bottom_left_corner, initial(tutorial_template.width), initial(tutorial_template.height))) // For some reason I'm unsure of, the template will not always fully load, leaving some tiles to be space tiles. So, we check all tiles in the (small) tutorial area // and tell start_tutorial to abort if there's any space tiles. if(istype(tile, /turf/open/space)) diff --git a/code/datums/vehicles.dm b/code/datums/vehicles.dm index 36ac96938c6b..67070dd04c0b 100644 --- a/code/datums/vehicles.dm +++ b/code/datums/vehicles.dm @@ -37,3 +37,7 @@ /datum/map_template/interior/van name = "Van" interior_id = "van" + +/datum/map_template/interior/arc + name = "ARC" + interior_id = "arc" diff --git a/code/game/atoms.dm b/code/game/atoms.dm index f2ae11425f42..a14f1018e49a 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -534,7 +534,17 @@ Parameters are passed from New. filters += filter(arglist(arguments)) UNSETEMPTY(filter_data) -/atom/proc/transition_filter(name, time, list/new_params, easing, loop) +/** Update a filter's parameter and animate this change. If the filter doesnt exist we won't do anything. + * Basically a [datum/proc/modify_filter] call but with animations. Unmodified filter parameters are kept. + * + * Arguments: + * * name - Filter name + * * new_params - New parameters of the filter + * * time - time arg of the BYOND animate() proc. + * * easing - easing arg of the BYOND animate() proc. + * * loop - loop arg of the BYOND animate() proc. + */ +/atom/proc/transition_filter(name, list/new_params, time, easing, loop) var/filter = get_filter(name) if(!filter) return diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm index 21f7b6b0a9be..52a35b715b1a 100644 --- a/code/game/atoms_movable.dm +++ b/code/game/atoms_movable.dm @@ -45,7 +45,10 @@ if(orbiting) orbiting.end_orbit(src) orbiting = null - vis_contents.Cut() + + vis_locs = null //clears this atom out of all viscontents + if(length(vis_contents)) + vis_contents.Cut() . = ..() moveToNullspace() //so we move into null space. Must be after ..() b/c atom's Dispose handles deleting our lighting stuff diff --git a/code/game/gamemodes/cm_initialize.dm b/code/game/gamemodes/cm_initialize.dm index 400acdcb122a..96e2db4f3b38 100644 --- a/code/game/gamemodes/cm_initialize.dm +++ b/code/game/gamemodes/cm_initialize.dm @@ -74,6 +74,7 @@ Additional game mode variables. var/monkey_amount = 0 //How many monkeys do we spawn on this map ? var/list/monkey_types = list() //What type of monkeys do we spawn var/latejoin_tally = 0 //How many people latejoined Marines + var/latejoin_larva_drop_early = LATEJOIN_MARINES_PER_LATEJOIN_LARVA_EARLY var/latejoin_larva_drop = LATEJOIN_MARINES_PER_LATEJOIN_LARVA //A larva will spawn in once the tally reaches this level. If set to 0, no latejoin larva drop /// Amount of latejoin_tally already awarded as larvas var/latejoin_larva_used = 0 @@ -175,7 +176,7 @@ Additional game mode variables. if(pred_candidate) pred_candidate.moveToNullspace() //Nullspace it for garbage collection later. -#define calculate_pred_max (Floor(length(GLOB.player_list) / pred_per_players) + pred_additional_max + pred_start_count) +#define calculate_pred_max (floor(length(GLOB.player_list) / pred_per_players) + pred_additional_max + pred_start_count) /datum/game_mode/proc/check_predator_late_join(mob/pred_candidate, show_warning = 1) @@ -309,14 +310,14 @@ Additional game mode variables. xenomorphs[hive] += new_xeno else //Out of candidates, fill the xeno hive with burrowed larva - remaining_slots = round((xeno_starting_num - i)) + remaining_slots = floor((xeno_starting_num - i)) break current_index++ if(remaining_slots) - var/larva_per_hive = round(remaining_slots / LAZYLEN(hives)) + var/larva_per_hive = floor(remaining_slots / LAZYLEN(hives)) for(var/hivenumb in hives) var/datum/hive_status/hive = GLOB.hive_datum[hivenumb] hive.stored_larva = larva_per_hive @@ -944,7 +945,7 @@ Additional game mode variables. CVS.populate_product_list_and_boxes(gear_scale) //Scale the amount of cargo points through a direct multiplier - GLOB.supply_controller.points += round(GLOB.supply_controller.points_scale * gear_scale) + GLOB.supply_controller.points += floor(GLOB.supply_controller.points_scale * gear_scale) ///Returns a multiplier to the amount of gear that is to be distributed roundstart, stored in [/datum/game_mode/var/gear_scale] /datum/game_mode/proc/init_gear_scale() @@ -972,7 +973,7 @@ Additional game mode variables. gear_scale_max = gear_scale for(var/obj/structure/machinery/cm_vending/sorted/vendor as anything in GLOB.cm_vending_vendors) vendor.update_dynamic_stock(gear_scale_max) - GLOB.supply_controller.points += round(gear_delta * GLOB.supply_controller.points_scale) + GLOB.supply_controller.points += floor(gear_delta * GLOB.supply_controller.points_scale) /// Updates [var/latejoin_tally] and [var/gear_scale] based on role weights of latejoiners/cryoers. Delta is the amount of role positions added/removed /datum/game_mode/proc/latejoin_update(role, delta = 1) diff --git a/code/game/gamemodes/colonialmarines/colonialmarines.dm b/code/game/gamemodes/colonialmarines/colonialmarines.dm index a66403fc00f5..ddb6e10ba319 100644 --- a/code/game/gamemodes/colonialmarines/colonialmarines.dm +++ b/code/game/gamemodes/colonialmarines/colonialmarines.dm @@ -134,7 +134,7 @@ if(!length(monkey_types)) return - var/amount_to_spawn = round(GLOB.players_preassigned * MONKEYS_TO_TOTAL_RATIO) + var/amount_to_spawn = floor(GLOB.players_preassigned * MONKEYS_TO_TOTAL_RATIO) for(var/i in 0 to min(amount_to_spawn, length(GLOB.monkey_spawns))) var/turf/T = get_turf(pick_n_take(GLOB.monkey_spawns)) diff --git a/code/game/gamemodes/colonialmarines/xenovsxeno.dm b/code/game/gamemodes/colonialmarines/xenovsxeno.dm index d287709d5516..40e67df4d458 100644 --- a/code/game/gamemodes/colonialmarines/xenovsxeno.dm +++ b/code/game/gamemodes/colonialmarines/xenovsxeno.dm @@ -45,7 +45,7 @@ monkey_types = SSmapping.configs[GROUND_MAP].monkey_types if(monkey_amount) if(monkey_types.len) - for(var/i = min(round(monkey_amount*GLOB.clients.len), GLOB.monkey_spawns.len), i > 0, i--) + for(var/i = min(floor(monkey_amount*GLOB.clients.len), GLOB.monkey_spawns.len), i > 0, i--) var/turf/T = get_turf(pick_n_take(GLOB.monkey_spawns)) var/monkey_to_spawn = pick(monkey_types) diff --git a/code/game/jobs/job/antag/other/pred.dm b/code/game/jobs/job/antag/other/pred.dm index 3808c5637da9..967ef73a7d1f 100644 --- a/code/game/jobs/job/antag/other/pred.dm +++ b/code/game/jobs/job/antag/other/pred.dm @@ -22,7 +22,7 @@ ) /datum/job/antag/predator/set_spawn_positions(count) - spawn_positions = max((round(count * PREDATOR_TO_TOTAL_SPAWN_RATIO)), 4) + spawn_positions = max((floor(count * PREDATOR_TO_TOTAL_SPAWN_RATIO)), 4) total_positions = spawn_positions /datum/job/antag/predator/spawn_and_equip(mob/new_player/player) diff --git a/code/game/jobs/job/antag/xeno/xenomorph.dm b/code/game/jobs/job/antag/xeno/xenomorph.dm index 78b6ab7e3ab2..eeca16bc7f90 100644 --- a/code/game/jobs/job/antag/xeno/xenomorph.dm +++ b/code/game/jobs/job/antag/xeno/xenomorph.dm @@ -13,10 +13,10 @@ total_positions = -1 /datum/job/antag/xenos/proc/calculate_extra_spawn_positions(count) - return max((round(count * XENO_TO_TOTAL_SPAWN_RATIO)), 0) + return max((floor(count * XENO_TO_TOTAL_SPAWN_RATIO)), 0) /datum/job/antag/xenos/set_spawn_positions(count) - spawn_positions = max((round(count * XENO_TO_TOTAL_SPAWN_RATIO)), 1) + spawn_positions = max((floor(count * XENO_TO_TOTAL_SPAWN_RATIO)), 1) total_positions = spawn_positions /datum/job/antag/xenos/spawn_in_player(mob/new_player/NP) diff --git a/code/game/jobs/job/civilians/other/survivors.dm b/code/game/jobs/job/civilians/other/survivors.dm index 71dd5f1b96e8..4fc344713d61 100644 --- a/code/game/jobs/job/civilians/other/survivors.dm +++ b/code/game/jobs/job/civilians/other/survivors.dm @@ -14,7 +14,7 @@ var/hostile = FALSE /datum/job/civilian/survivor/set_spawn_positions(count) - spawn_positions = clamp((round(count * SURVIVOR_TO_TOTAL_SPAWN_RATIO)), 2, 8) + spawn_positions = clamp((floor(count * SURVIVOR_TO_TOTAL_SPAWN_RATIO)), 2, 8) total_positions = spawn_positions /datum/job/civilian/survivor/equip_job(mob/living/survivor) diff --git a/code/game/jobs/job/marine/squad/standard.dm b/code/game/jobs/job/marine/squad/standard.dm index 2fcd8a3cdd28..a926c3370a4b 100644 --- a/code/game/jobs/job/marine/squad/standard.dm +++ b/code/game/jobs/job/marine/squad/standard.dm @@ -12,7 +12,7 @@ return ..() /datum/job/marine/standard/set_spawn_positions(count) - spawn_positions = max((round(count * STANDARD_MARINE_TO_TOTAL_SPAWN_RATIO)), 8) + spawn_positions = max((floor(count * STANDARD_MARINE_TO_TOTAL_SPAWN_RATIO)), 8) /datum/job/marine/standard/whiskey title = JOB_WO_SQUAD_MARINE diff --git a/code/game/jobs/slot_scaling.dm b/code/game/jobs/slot_scaling.dm index 8bd4af908c07..8c8568130763 100644 --- a/code/game/jobs/slot_scaling.dm +++ b/code/game/jobs/slot_scaling.dm @@ -10,7 +10,7 @@ /proc/job_slot_formula(marine_count, factor, c, min, max) if(marine_count <= factor) return min - return round(clamp((marine_count/factor)+c, min, max)) + return floor(clamp((marine_count/factor)+c, min, max)) /proc/medic_slot_formula(playercount) return job_slot_formula(playercount,40,1,3,5) diff --git a/code/game/jobs/whitelist.dm b/code/game/jobs/whitelist.dm index 09db84fec2c2..8cd91a494c83 100644 --- a/code/game/jobs/whitelist.dm +++ b/code/game/jobs/whitelist.dm @@ -24,6 +24,8 @@ if(isSenator(src)) add_verb(src, /client/proc/whitelist_panel) + if(isCouncil(src)) + add_verb(src, /client/proc/other_records) /client var/datum/whitelist_panel/wl_panel @@ -144,8 +146,10 @@ GLOBAL_LIST_INIT(misc_flags, list( /datum/whitelist_panel/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state) . = ..() if(.) - return + return FALSE var/mob/user = ui.user + if(!isSenator(user.client) && !CLIENT_HAS_RIGHTS(user.client, R_PERMISSIONS)) + return FALSE switch(action) if("go_back") go_back() @@ -165,6 +169,7 @@ GLOBAL_LIST_INIT(misc_flags, list( return var/datum/entity/player/player = get_player_from_key(player_key) player.set_whitelist_status(new_rights) + player.add_note("Whitelists updated by [user.key]. Reason: '[reason]'.", FALSE, NOTE_WHITELIST) to_chat(user, SPAN_HELPFUL("Whitelists for [player_key] updated.")) message_admins("Whitelists for [player_key] updated by [key_name(user)]. Reason: '[reason]'.") log_admin("WHITELISTS: Flags for [player_key] changed from [target_rights] to [new_rights]. Reason: '[reason]'.") diff --git a/code/game/machinery/OpTable.dm b/code/game/machinery/OpTable.dm index 03c013703b07..1b27ddc9bd6b 100644 --- a/code/game/machinery/OpTable.dm +++ b/code/game/machinery/OpTable.dm @@ -196,7 +196,7 @@ // Check for blood if(H.blood_volume < BLOOD_VOLUME_SAFE) if(!(patient_exam & PATIENT_LOW_BLOOD)) - visible_message("[icon2html(src, viewers(src))] The [src] beeps, Warning: Patient has a dangerously low blood level: [round(H.blood_volume / BLOOD_VOLUME_NORMAL * 100)]%. Type: [H.blood_type].") + visible_message("[icon2html(src, viewers(src))] The [src] beeps, Warning: Patient has a dangerously low blood level: [floor(H.blood_volume / BLOOD_VOLUME_NORMAL * 100)]%. Type: [H.blood_type].") patient_exam |= PATIENT_LOW_BLOOD else patient_exam &= ~PATIENT_LOW_BLOOD @@ -204,7 +204,7 @@ // Check for nutrition if(H.nutrition < NUTRITION_LOW) if(!(patient_exam & PATIENT_LOW_NUTRITION)) - visible_message("[icon2html(src, viewers(src))] The [src] beeps, Warning: Patient has a dangerously low nutrition level: [round(H.nutrition / NUTRITION_MAX * 100)]%.") + visible_message("[icon2html(src, viewers(src))] The [src] beeps, Warning: Patient has a dangerously low nutrition level: [floor(H.nutrition / NUTRITION_MAX * 100)]%.") patient_exam |= PATIENT_LOW_NUTRITION else patient_exam &= ~PATIENT_LOW_NUTRITION diff --git a/code/game/machinery/atmoalter/canister.dm b/code/game/machinery/atmoalter/canister.dm index d62d688fcfc5..1cdc2e0a49fb 100644 --- a/code/game/machinery/atmoalter/canister.dm +++ b/code/game/machinery/atmoalter/canister.dm @@ -92,7 +92,7 @@ update_flag /obj/structure/machinery/portable_atmospherics/canister/bullet_act(obj/projectile/Proj) if(Proj.ammo.damage) - update_health(round(Proj.ammo.damage / 2)) + update_health(floor(Proj.ammo.damage / 2)) ..() return 1 diff --git a/code/game/machinery/autolathe.dm b/code/game/machinery/autolathe.dm index 97a25bf7d20a..fed690f6707b 100644 --- a/code/game/machinery/autolathe.dm +++ b/code/game/machinery/autolathe.dm @@ -78,7 +78,7 @@ if(istype(I,/obj/item/stack/sheet)) recipe.resources[material] = I.matter[material] //Doesn't take more if it's just a sheet or something. Get what you put in. else - recipe.resources[material] = round(I.matter[material]*1.25) // More expensive to produce than they are to recycle. + recipe.resources[material] = floor(I.matter[material]*1.25) // More expensive to produce than they are to recycle. QDEL_NULL(I) //Create parts for lathe. @@ -339,7 +339,7 @@ if(istype(eating,/obj/item/stack)) var/obj/item/stack/stack = eating - stack.use(max(1,round(total_used/mass_per_sheet))) // Always use at least 1 to prevent infinite materials. + stack.use(max(1,floor(total_used/mass_per_sheet))) // Always use at least 1 to prevent infinite materials. else if(user.temp_drop_inv_item(O)) qdel(O) @@ -535,7 +535,7 @@ print_data["can_make"] = FALSE max_print_amt = 0 else - print_amt = round(projected_stored_material[material]/R.resources[material]) + print_amt = floor(projected_stored_material[material]/R.resources[material]) if(print_data["can_make"] && max_print_amt < 0 || max_print_amt > print_amt) max_print_amt = print_amt diff --git a/code/game/machinery/autolathe_datums.dm b/code/game/machinery/autolathe_datums.dm index 01a40b3638f6..78a8e46b64aa 100644 --- a/code/game/machinery/autolathe_datums.dm +++ b/code/game/machinery/autolathe_datums.dm @@ -269,7 +269,7 @@ /datum/autolathe/recipe/handcuffs name = "handcuffs" - path = /obj/item/handcuffs + path = /obj/item/restraint/handcuffs hidden = TRUE category = AUTOLATHE_CATEGORY_GENERAL @@ -331,6 +331,11 @@ path = /obj/item/ammo_magazine/flamer_tank/custom/large category = AUTOLATHE_CATEGORY_EXPLOSIVES +/datum/autolathe/recipe/armylathe/smoke_tank + name = "Custom M240A1 Smoke Tank" + path = /obj/item/ammo_magazine/flamer_tank/smoke + category = AUTOLATHE_CATEGORY_EXPLOSIVES + //Medilathe recipes /datum/autolathe/recipe/medilathe category = AUTOLATHE_CATEGORY_MEDICAL diff --git a/code/game/machinery/cell_charger.dm b/code/game/machinery/cell_charger.dm index eb7a501fa078..528d90f4b4b9 100644 --- a/code/game/machinery/cell_charger.dm +++ b/code/game/machinery/cell_charger.dm @@ -16,7 +16,7 @@ if(charging && !(inoperable()) ) - var/newlevel = round(charging.percent() * 4 / 99) + var/newlevel = floor(charging.percent() * 4 / 99) if(chargelevel != newlevel) diff --git a/code/game/machinery/cloning.dm b/code/game/machinery/cloning.dm index 4973eda8c71a..de2522d921bf 100644 --- a/code/game/machinery/cloning.dm +++ b/code/game/machinery/cloning.dm @@ -35,7 +35,7 @@ else if(isliving(src.implanted)) var/mob/living/L = src.implanted - src.healthstring = "[round(L.getOxyLoss())] - [round(L.getFireLoss())] - [round(L.getToxLoss())] - [round(L.getBruteLoss())]" + src.healthstring = "[floor(L.getOxyLoss())] - [floor(L.getFireLoss())] - [floor(L.getToxLoss())] - [floor(L.getBruteLoss())]" if (!src.healthstring) src.healthstring = "ERROR" return src.healthstring diff --git a/code/game/machinery/computer/computer.dm b/code/game/machinery/computer/computer.dm index c33517796271..bfa64ab174ed 100644 --- a/code/game/machinery/computer/computer.dm +++ b/code/game/machinery/computer/computer.dm @@ -60,7 +60,7 @@ visible_message("[Proj] ricochets off [src]!") return 0 else - if(prob(round(Proj.ammo.damage /2))) + if(prob(floor(Proj.ammo.damage /2))) set_broken() ..() return 1 @@ -126,7 +126,7 @@ src.attack_alien(user) return src.attack_hand(user) - return + return ..() /obj/structure/machinery/computer/attack_hand() . = ..() diff --git a/code/game/machinery/computer/dropship_weapons.dm b/code/game/machinery/computer/dropship_weapons.dm index 017a5f0736ca..5d61ed536618 100644 --- a/code/game/machinery/computer/dropship_weapons.dm +++ b/code/game/machinery/computer/dropship_weapons.dm @@ -453,6 +453,61 @@ initiate_firemission(user, fm_tag, direction, text2num(offset_x_value), text2num(offset_y_value)) return TRUE + if("paradrop-lock") + var/obj/docking_port/mobile/marine_dropship/linked_shuttle = SSshuttle.getShuttle(shuttle_tag) + if(!linked_shuttle) + return FALSE + if(linked_shuttle.mode != SHUTTLE_CALL) + return FALSE + if(linked_shuttle.paradrop_signal) + clear_locked_turf_and_lock_aft() + return TRUE + var/datum/cas_signal/sig = get_cas_signal(camera_target_id) + if(!sig) + to_chat(user, SPAN_WARNING("No signal chosen.")) + return FALSE + var/turf/location = get_turf(sig.signal_loc) + var/area/location_area = get_area(location) + if(CEILING_IS_PROTECTED(location_area.ceiling, CEILING_PROTECTION_TIER_1)) + to_chat(user, SPAN_WARNING("Target is obscured.")) + return FALSE + var/equipment_tag = params["equipment_id"] + for(var/obj/structure/dropship_equipment/equipment as anything in shuttle.equipments) + var/mount_point = equipment.ship_base.attach_id + if(mount_point != equipment_tag) + continue + if(istype(equipment, /obj/structure/dropship_equipment/paradrop_system)) + var/obj/structure/dropship_equipment/paradrop_system/paradrop_system = equipment + if(paradrop_system.system_cooldown > world.time) + to_chat(user, SPAN_WARNING("You toggled the system too recently.")) + return + paradrop_system.system_cooldown = world.time + 5 SECONDS + paradrop_system.visible_message(SPAN_NOTICE("[equipment] hums as it locks to a signal.")) + break + linked_shuttle.paradrop_signal = sig + addtimer(CALLBACK(src, PROC_REF(open_aft_for_paradrop)), 2 SECONDS) + RegisterSignal(linked_shuttle.paradrop_signal, COMSIG_PARENT_QDELETING, PROC_REF(clear_locked_turf_and_lock_aft)) + RegisterSignal(linked_shuttle, COMSIG_SHUTTLE_SETMODE, PROC_REF(clear_locked_turf_and_lock_aft)) + return TRUE + +/obj/structure/machinery/computer/dropship_weapons/proc/open_aft_for_paradrop() + var/obj/docking_port/mobile/marine_dropship/shuttle = SSshuttle.getShuttle(shuttle_tag) + if(!shuttle || !shuttle.paradrop_signal || shuttle.mode != SHUTTLE_CALL) + return + shuttle.door_control.control_doors("force-unlock", "aft", TRUE) + +/obj/structure/machinery/computer/dropship_weapons/proc/clear_locked_turf_and_lock_aft() + SIGNAL_HANDLER + var/obj/docking_port/mobile/marine_dropship/shuttle = SSshuttle.getShuttle(shuttle_tag) + if(!shuttle) + return + shuttle.door_control.control_doors("force-lock", "aft", TRUE) + visible_message(SPAN_WARNING("[src] displays an alert as it loses the paradrop target.")) + for(var/obj/structure/dropship_equipment/paradrop_system/parad in shuttle.equipments) + parad.visible_message(SPAN_WARNING("[parad] displays an alert as it loses the paradrop target.")) + UnregisterSignal(shuttle.paradrop_signal, COMSIG_PARENT_QDELETING) + UnregisterSignal(shuttle, COMSIG_SHUTTLE_SETMODE) + shuttle.paradrop_signal = null /obj/structure/machinery/computer/dropship_weapons/proc/get_weapon(eqp_tag) var/obj/docking_port/mobile/marine_dropship/dropship = SSshuttle.getShuttle(shuttle_tag) diff --git a/code/game/machinery/computer/research.dm b/code/game/machinery/computer/research.dm index d5158cb76451..3a8292ec7d07 100644 --- a/code/game/machinery/computer/research.dm +++ b/code/game/machinery/computer/research.dm @@ -179,7 +179,7 @@ if("purchase_document") if(!photocopier) return - var/purchase_tier = Floor(text2num(params["purchase_document"])) + var/purchase_tier = floor(text2num(params["purchase_document"])) if(purchase_tier <= 0 || purchase_tier > 5) return if(purchase_tier > GLOB.chemical_data.clearance_level) diff --git a/code/game/machinery/cryo.dm b/code/game/machinery/cryo.dm index 5a328386c95d..c2aac2cf9e75 100644 --- a/code/game/machinery/cryo.dm +++ b/code/game/machinery/cryo.dm @@ -110,7 +110,7 @@ else data["occupant"]["temperaturestatus"] = "bad" - data["cellTemperature"] = round(temperature) + data["cellTemperature"] = floor(temperature) data["isBeakerLoaded"] = beaker ? TRUE : FALSE var/beakerContents = list() diff --git a/code/game/machinery/doors/multi_tile.dm b/code/game/machinery/doors/multi_tile.dm index 1e7fcbf40155..f95ef09e812f 100644 --- a/code/game/machinery/doors/multi_tile.dm +++ b/code/game/machinery/doors/multi_tile.dm @@ -279,8 +279,8 @@ return ..() -/obj/structure/machinery/door/airlock/multi_tile/almayer/dropshiprear/unlock() - if(is_reserved_level(z)) +/obj/structure/machinery/door/airlock/multi_tile/almayer/dropshiprear/unlock(forced=FALSE) + if(is_reserved_level(z) && !forced) return // in orbit ..() @@ -294,6 +294,9 @@ if(xeno.action_busy) return + if(is_reserved_level(z)) //no prying in space even though it's funny + return + var/direction switch(id) if("starboard_door") diff --git a/code/game/machinery/doors/windowdoor.dm b/code/game/machinery/doors/windowdoor.dm index 76a370061a2f..a7af3ba4bdcb 100644 --- a/code/game/machinery/doors/windowdoor.dm +++ b/code/game/machinery/doors/windowdoor.dm @@ -125,7 +125,7 @@ /obj/structure/machinery/door/window/bullet_act(obj/projectile/Proj) bullet_ping(Proj) if(Proj.ammo.damage) - take_damage(round(Proj.ammo.damage / 2)) + take_damage(floor(Proj.ammo.damage / 2)) if(Proj.ammo.damage_type == BRUTE) playsound(src.loc, 'sound/effects/Glasshit.ogg', 25, 1) return 1 diff --git a/code/game/machinery/fuelcell_recycler.dm b/code/game/machinery/fuelcell_recycler.dm index 52c01beaf6fe..89024adb41fb 100644 --- a/code/game/machinery/fuelcell_recycler.dm +++ b/code/game/machinery/fuelcell_recycler.dm @@ -206,7 +206,7 @@ ///Percentage of fuel left in the cell /obj/item/fuel_cell/proc/get_fuel_percent() - return round(100 * fuel_amount/max_fuel_amount) + return floor(100 * fuel_amount/max_fuel_amount) ///Whether the fuel cell is full /obj/item/fuel_cell/proc/is_regenerated() diff --git a/code/game/machinery/iv_drip.dm b/code/game/machinery/iv_drip.dm index e16d2cacf63b..4e4e38d953d1 100644 --- a/code/game/machinery/iv_drip.dm +++ b/code/game/machinery/iv_drip.dm @@ -27,7 +27,7 @@ if(reagents.total_volume) var/image/filling = image('icons/obj/structures/machinery/iv_drip.dmi', src, "reagent") - var/percent = round((reagents.total_volume / beaker.volume) * 100) + var/percent = floor((reagents.total_volume / beaker.volume) * 100) switch(percent) if(0 to 9) filling.icon_state = "reagent0" if(10 to 24) filling.icon_state = "reagent10" diff --git a/code/game/machinery/kitchen/juicer.dm b/code/game/machinery/kitchen/juicer.dm index 0a15c1bcf5ec..e538ad1185db 100644 --- a/code/game/machinery/kitchen/juicer.dm +++ b/code/game/machinery/kitchen/juicer.dm @@ -141,7 +141,7 @@ else if (O.potency == -1) return 5 else - return round(5*sqrt(O.potency)) + return floor(5*sqrt(O.potency)) /obj/structure/machinery/juicer/proc/juice() power_change() //it is a portable machine diff --git a/code/game/machinery/kitchen/microwave.dm b/code/game/machinery/kitchen/microwave.dm index 220772e98b17..78e64ab49f89 100644 --- a/code/game/machinery/kitchen/microwave.dm +++ b/code/game/machinery/kitchen/microwave.dm @@ -229,8 +229,9 @@ //************************************/ /obj/structure/machinery/microwave/proc/cook(time_multiplier = 1) - if(inoperable()) + if(inoperable() || operating) return + start() if (reagents.total_volume==0 && !(locate(/obj) in contents)) //dry run if (!wzhzhzh(10 * time_multiplier)) @@ -270,7 +271,7 @@ cooked.forceMove(src.loc) return else - var/halftime = round(recipe.time/10/2) + var/halftime = floor(recipe.time/10/2) if (!wzhzhzh(halftime * time_multiplier)) abort() return diff --git a/code/game/machinery/medical_pod/bodyscanner.dm b/code/game/machinery/medical_pod/bodyscanner.dm index 732ff1ba97b9..73e5a87b2304 100644 --- a/code/game/machinery/medical_pod/bodyscanner.dm +++ b/code/game/machinery/medical_pod/bodyscanner.dm @@ -263,7 +263,7 @@ s_class = occ["brainloss"] < 1 ? INTERFACE_GOOD : INTERFACE_BAD dat += "[SET_CLASS("  Approx. Brain Damage:", INTERFACE_PINK)] [SET_CLASS("[occ["brainloss"]]%", s_class)]

" - dat += "[SET_CLASS("Knocked Out Summary:", "#40628a")] [occ["knocked_out"]]% (approximately [round(occ["knocked_out"] * GLOBAL_STATUS_MULTIPLIER / (1 SECONDS))] seconds left!)
" + dat += "[SET_CLASS("Knocked Out Summary:", "#40628a")] [occ["knocked_out"]]% (approximately [floor(occ["knocked_out"] * GLOBAL_STATUS_MULTIPLIER / (1 SECONDS))] seconds left!)
" dat += "[SET_CLASS("Body Temperature:", "#40628a")] [occ["bodytemp"]-T0C]°C ([occ["bodytemp"]*1.8-459.67]°F)

" s_class = occ["blood_amount"] > 448 ? INTERFACE_OKAY : INTERFACE_BAD diff --git a/code/game/machinery/medical_pod/sleeper.dm b/code/game/machinery/medical_pod/sleeper.dm index 5868df901c6a..dbc6d8133de3 100644 --- a/code/game/machinery/medical_pod/sleeper.dm +++ b/code/game/machinery/medical_pod/sleeper.dm @@ -152,7 +152,7 @@ if(!(NO_BLOOD in human_occupant.species.flags)) occupantData["pulse"] = human_occupant.get_pulse(GETPULSE_TOOL) occupantData["hasBlood"] = 1 - occupantData["bloodLevel"] = round(occupant.blood_volume) + occupantData["bloodLevel"] = floor(occupant.blood_volume) occupantData["bloodMax"] = occupant.max_blood occupantData["bloodPercent"] = round(100*(occupant.blood_volume/occupant.max_blood), 0.01) diff --git a/code/game/machinery/nuclearbomb.dm b/code/game/machinery/nuclearbomb.dm index 2194fe2e7e7c..bb83261ae948 100644 --- a/code/game/machinery/nuclearbomb.dm +++ b/code/game/machinery/nuclearbomb.dm @@ -329,10 +329,10 @@ GLOBAL_VAR_INIT(bomb_set, FALSE) humans_other -= current_mob if(timer_warning) //we check for timer warnings first - announcement_helper("WARNING.\n\nDETONATION IN [round(timeleft/10)] SECONDS.", "[MAIN_AI_SYSTEM] Nuclear Tracker", humans_uscm, 'sound/misc/notice1.ogg') - announcement_helper("WARNING.\n\nDETONATION IN [round(timeleft/10)] SECONDS.", "HQ Intel Division", humans_other, 'sound/misc/notice1.ogg') + announcement_helper("WARNING.\n\nDETONATION IN [floor(timeleft/10)] SECONDS.", "[MAIN_AI_SYSTEM] Nuclear Tracker", humans_uscm, 'sound/misc/notice1.ogg') + announcement_helper("WARNING.\n\nDETONATION IN [floor(timeleft/10)] SECONDS.", "HQ Intel Division", humans_other, 'sound/misc/notice1.ogg') //preds part - var/t_left = duration2text_sec(round(rand(timeleft - timeleft / 10, timeleft + timeleft / 10))) + var/t_left = duration2text_sec(floor(rand(timeleft - timeleft / 10, timeleft + timeleft / 10))) yautja_announcement(SPAN_YAUTJABOLDBIG("WARNING!\n\nYou have approximately [t_left] seconds to abandon the hunting grounds before activation of the human purification device.")) //xenos part var/warning @@ -352,9 +352,9 @@ GLOBAL_VAR_INIT(bomb_set, FALSE) var/datum/hive_status/hive if(timing) - announcement_helper("ALERT.\n\nNUCLEAR EXPLOSIVE ORDNANCE ACTIVATED.\n\nDETONATION IN [round(timeleft/10)] SECONDS.", "[MAIN_AI_SYSTEM] Nuclear Tracker", humans_uscm, 'sound/misc/notice1.ogg') - announcement_helper("ALERT.\n\nNUCLEAR EXPLOSIVE ORDNANCE ACTIVATED.\n\nDETONATION IN [round(timeleft/10)] SECONDS.", "HQ Nuclear Tracker", humans_other, 'sound/misc/notice1.ogg') - var/t_left = duration2text_sec(round(rand(timeleft - timeleft / 10, timeleft + timeleft / 10))) + announcement_helper("ALERT.\n\nNUCLEAR EXPLOSIVE ORDNANCE ACTIVATED.\n\nDETONATION IN [floor(timeleft/10)] SECONDS.", "[MAIN_AI_SYSTEM] Nuclear Tracker", humans_uscm, 'sound/misc/notice1.ogg') + announcement_helper("ALERT.\n\nNUCLEAR EXPLOSIVE ORDNANCE ACTIVATED.\n\nDETONATION IN [floor(timeleft/10)] SECONDS.", "HQ Nuclear Tracker", humans_other, 'sound/misc/notice1.ogg') + var/t_left = duration2text_sec(floor(rand(timeleft - timeleft / 10, timeleft + timeleft / 10))) yautja_announcement(SPAN_YAUTJABOLDBIG("WARNING!
A human purification device has been detected. You have approximately [t_left] to abandon the hunting grounds before it activates.")) for(var/hivenumber in GLOB.hive_datum) hive = GLOB.hive_datum[hivenumber] @@ -579,11 +579,11 @@ GLOBAL_VAR_INIT(bomb_set, FALSE) xeno_announcement(SPAN_XENOANNOUNCE("We get a sense of impending doom... the hive killer is ready to be activated."), hive.hivenumber, XENO_GENERAL_ANNOUNCE) return - announcement_helper("DECRYPTION IN [round(decryption_time/10)] SECONDS.", "[MAIN_AI_SYSTEM] Nuclear Tracker", humans_uscm, 'sound/misc/notice1.ogg') - announcement_helper("DECRYPTION IN [round(decryption_time/10)] SECONDS.", "HQ Intel Division", humans_other, 'sound/misc/notice1.ogg') + announcement_helper("DECRYPTION IN [floor(decryption_time/10)] SECONDS.", "[MAIN_AI_SYSTEM] Nuclear Tracker", humans_uscm, 'sound/misc/notice1.ogg') + announcement_helper("DECRYPTION IN [floor(decryption_time/10)] SECONDS.", "HQ Intel Division", humans_other, 'sound/misc/notice1.ogg') //preds part - var/time_left = duration2text_sec(round(rand(decryption_time - decryption_time / 10, decryption_time + decryption_time / 10))) + var/time_left = duration2text_sec(floor(rand(decryption_time - decryption_time / 10, decryption_time + decryption_time / 10))) yautja_announcement(SPAN_YAUTJABOLDBIG("WARNING!\n\nYou have approximately [time_left] seconds to abandon the hunting grounds before the human purification device is able to be activated.")) //xenos part @@ -601,9 +601,9 @@ GLOBAL_VAR_INIT(bomb_set, FALSE) var/datum/hive_status/hive if(decrypting) - announcement_helper("ALERT.\n\nNUCLEAR EXPLOSIVE ORDNANCE DECRYPTION STARTED.\n\nDECRYPTION IN [round(decryption_time/10)] SECONDS.", "[MAIN_AI_SYSTEM] Nuclear Tracker", humans_uscm, 'sound/misc/notice1.ogg') - announcement_helper("ALERT.\n\nNUCLEAR EXPLOSIVE ORDNANCE DECRYPTION STARTED.\n\nDECRYPTION IN [round(decryption_time/10)] SECONDS.", "HQ Nuclear Tracker", humans_other, 'sound/misc/notice1.ogg') - var/time_left = duration2text_sec(round(rand(decryption_time - decryption_time / 10, decryption_time + decryption_time / 10))) + announcement_helper("ALERT.\n\nNUCLEAR EXPLOSIVE ORDNANCE DECRYPTION STARTED.\n\nDECRYPTION IN [floor(decryption_time/10)] SECONDS.", "[MAIN_AI_SYSTEM] Nuclear Tracker", humans_uscm, 'sound/misc/notice1.ogg') + announcement_helper("ALERT.\n\nNUCLEAR EXPLOSIVE ORDNANCE DECRYPTION STARTED.\n\nDECRYPTION IN [floor(decryption_time/10)] SECONDS.", "HQ Nuclear Tracker", humans_other, 'sound/misc/notice1.ogg') + var/time_left = duration2text_sec(floor(rand(decryption_time - decryption_time / 10, decryption_time + decryption_time / 10))) yautja_announcement(SPAN_YAUTJABOLDBIG("WARNING!
A human purification device has been detected. You have approximately [time_left] before it finishes its initial phase.")) for(var/hivenumber in GLOB.hive_datum) hive = GLOB.hive_datum[hivenumber] diff --git a/code/game/machinery/rechargestation.dm b/code/game/machinery/rechargestation.dm index d86a5c0e30d0..4b5e02dc8b8b 100644 --- a/code/game/machinery/rechargestation.dm +++ b/code/game/machinery/rechargestation.dm @@ -106,7 +106,7 @@ /obj/structure/machinery/recharge_station/get_examine_text(mob/user) . = ..() - . += "The charge meter reads: [round(chargepercentage())]%" + . += "The charge meter reads: [floor(chargepercentage())]%" /obj/structure/machinery/recharge_station/proc/chargepercentage() return ((current_internal_charge / max_internal_charge) * 100) @@ -135,7 +135,7 @@ else icon_state = "borgcharger0" overlays.Cut() - switch(round(chargepercentage())) + switch(floor(chargepercentage())) if(1 to 20) overlays += image('icons/obj/objects.dmi', "statn_c0") if(21 to 40) diff --git a/code/game/machinery/scoreboard.dm b/code/game/machinery/scoreboard.dm index 8740bed6dcfb..8fd5dd984e6f 100644 --- a/code/game/machinery/scoreboard.dm +++ b/code/game/machinery/scoreboard.dm @@ -19,11 +19,11 @@ if(overlays.len) overlays.Cut() - var/score_state = "s[( round(scoreleft/10) > scoreleft/10 ? round(scoreleft/10)-1 : round(scoreleft/10) )]a" + var/score_state = "s[( floor(scoreleft/10) > scoreleft/10 ? floor(scoreleft/10)-1 : floor(scoreleft/10) )]a" overlays += image('icons/obj/structures/machinery/scoreboard.dmi', icon_state=score_state) score_state = "s[scoreleft%10]b" overlays += image('icons/obj/structures/machinery/scoreboard.dmi', icon_state=score_state) - score_state = "s[( round(scoreright/10) > scoreright/10 ? round(scoreright/10)-1 : round(scoreright/10) )]c" + score_state = "s[( floor(scoreright/10) > scoreright/10 ? floor(scoreright/10)-1 : floor(scoreright/10) )]c" overlays += image('icons/obj/structures/machinery/scoreboard.dmi', icon_state=score_state) score_state = "s[scoreright%10]d" overlays += image('icons/obj/structures/machinery/scoreboard.dmi', icon_state=score_state) diff --git a/code/game/machinery/spaceheater.dm b/code/game/machinery/spaceheater.dm index 69b21964a4f4..b4d5b7dece20 100644 --- a/code/game/machinery/spaceheater.dm +++ b/code/game/machinery/spaceheater.dm @@ -162,7 +162,7 @@ if(isturf(loc) && cell && cell.charge) for(var/mob/living/carbon/human/H in range(2, src)) if(H.bodytemperature < T20C) - H.bodytemperature += min(round(T20C - H.bodytemperature)*0.7, 25) + H.bodytemperature += min(floor(T20C - H.bodytemperature)*0.7, 25) H.recalculate_move_delay = TRUE diff --git a/code/game/machinery/telecomms/presets.dm b/code/game/machinery/telecomms/presets.dm index 459eddc4a544..3997484f39e7 100644 --- a/code/game/machinery/telecomms/presets.dm +++ b/code/game/machinery/telecomms/presets.dm @@ -81,7 +81,7 @@ else if(P.ammo.flags_ammo_behavior & AMMO_ANTISTRUCT) update_health(P.damage*ANTISTRUCT_DMG_MULT_BARRICADES) - update_health(round(P.damage/2)) + update_health(floor(P.damage/2)) return TRUE /obj/structure/machinery/telecomms/relay/preset/tower/update_health(damage = 0) @@ -306,6 +306,11 @@ GLOBAL_LIST_EMPTY(all_static_telecomms_towers) else update_icon() +/obj/structure/machinery/telecomms/relay/preset/tower/mapcomms/update_state() + ..() + if(inoperable()) + handle_xeno_acquisition(get_turf(src)) + /// Handles xenos corrupting the tower when weeds touch the turf it is located on /obj/structure/machinery/telecomms/relay/preset/tower/mapcomms/proc/handle_xeno_acquisition(turf/weeded_turf) SIGNAL_HANDLER @@ -328,12 +333,15 @@ GLOBAL_LIST_EMPTY(all_static_telecomms_towers) if(SSticker.mode.is_in_endgame) return + if(operable()) + return + if(ROUND_TIME < XENO_COMM_ACQUISITION_TIME) - addtimer(CALLBACK(src, PROC_REF(handle_xeno_acquisition), weeded_turf), (XENO_COMM_ACQUISITION_TIME - ROUND_TIME)) + addtimer(CALLBACK(src, PROC_REF(handle_xeno_acquisition), weeded_turf), (XENO_COMM_ACQUISITION_TIME - ROUND_TIME), TIMER_UNIQUE|TIMER_OVERRIDE|TIMER_NO_HASH_WAIT) return if(!COOLDOWN_FINISHED(src, corruption_delay)) - addtimer(CALLBACK(src, PROC_REF(handle_xeno_acquisition), weeded_turf), (COOLDOWN_TIMELEFT(src, corruption_delay))) + addtimer(CALLBACK(src, PROC_REF(handle_xeno_acquisition), weeded_turf), (COOLDOWN_TIMELEFT(src, corruption_delay)), TIMER_UNIQUE|TIMER_OVERRIDE|TIMER_NO_HASH_WAIT) return var/obj/effect/alien/weeds/node/pylon/cluster/parent_node = weeded_turf.weeds.parent diff --git a/code/game/machinery/vending/cm_vending.dm b/code/game/machinery/vending/cm_vending.dm index c7443130b247..6c55ce8c7946 100644 --- a/code/game/machinery/vending/cm_vending.dm +++ b/code/game/machinery/vending/cm_vending.dm @@ -46,7 +46,11 @@ /// Direction to adjacent user from which we're allowed to do offset vending var/list/vend_dir_whitelist + /// The actual inventory for this vendor as a list of lists + /// 1: name 2: amount 3: type 4: flag var/list/listed_products = list() + /// Partial stacks to hold on to as an associated list of type : amount + var/list/partial_product_stacks = list() // Are points associated with this vendor tied to its instance? var/instanced_vendor_points = FALSE @@ -195,7 +199,7 @@ GLOBAL_LIST_EMPTY(vending_products) for(var/list/product in topic_listed_products) if(product[3] == item_box_pairing.box) //We recalculate the amount of boxes we ought to have based on how many magazines we have - product[2] = round(base_ammo_item[2] / item_box_pairing.items_in_box) + product[2] = floor(base_ammo_item[2] / item_box_pairing.items_in_box) break /obj/structure/machinery/cm_vending/proc/update_derived_from_boxes(obj/item/box_being_added_or_removed, add_box = FALSE) @@ -900,9 +904,17 @@ GLOBAL_LIST_EMPTY(vending_products) ///this here is made to provide ability to restock vendors with different subtypes of same object, like handmade and manually filled ammo boxes. var/list/corresponding_types_list - ///If using [VEND_STOCK_DYNAMIC], assoc list of product entry to list of (product multiplier, awarded objects) - as seen in [/obj/structure/machinery/cm_vending/sorted/proc/populate_product_list] - ///This allows us to backtrack and refill the stocks when new players latejoin + /** + * If using [VEND_STOCK_DYNAMIC], assoc list of product entry to list of (1.0 scale product multiplier, awarded objects) - as seen in [/obj/structure/machinery/cm_vending/sorted/proc/populate_product_list] + * This allows us to backtrack and refill the stocks when new players latejoin. + * + * If NOT using [VEND_STOCK_DYNAMIC], assoc list of product entry to list of (estimated 1.0 scale product multiplier, scaled product multiplier) - as seen in [/obj/structure/machinery/cm_vending/sorted/proc/populate_product_list] + * This allows us to know the original amounts to know if the vendor is full of an item. + * The 1.0 scale is estimated because it is a divided by the scale rather than repopulating the list at 1.0 scale - anything that is a fixed amount won't necessarily be correct. + */ var/list/list/dynamic_stock_multipliers + ///indicates someone is performing a restock that isn't instant + var/being_restocked = FALSE /obj/structure/machinery/cm_vending/sorted/Initialize() . = ..() @@ -917,22 +929,33 @@ GLOBAL_LIST_EMPTY(vending_products) ///this proc, well, populates product list based on roundstart amount of players /obj/structure/machinery/cm_vending/sorted/proc/populate_product_list_and_boxes(scale) + dynamic_stock_multipliers = list() if(vend_flags & VEND_STOCK_DYNAMIC) populate_product_list(1.0) - dynamic_stock_multipliers = list() for(var/list/vendspec in listed_products) var/multiplier = vendspec[2] if(multiplier > 0) - var/awarded = round(vendspec[2] * scale, 1) // Starting amount + var/awarded = round(multiplier * scale, 1) // Starting amount //Record the multiplier and how many have actually been given out - dynamic_stock_multipliers[vendspec] = list(vendspec[2], awarded) + dynamic_stock_multipliers[vendspec] = list(multiplier, awarded) vendspec[2] = awarded // Override starting amount else populate_product_list(scale) + for(var/list/vendspec in listed_products) + var/amount = vendspec[2] + if(amount > -1) + var/multiplier = ceil(amount / scale) + //Record the multiplier and how many have actually been given out + dynamic_stock_multipliers[vendspec] = list(multiplier, amount) if(vend_flags & VEND_LOAD_AMMO_BOXES) populate_ammo_boxes() - return + + partial_product_stacks = list() + for(var/list/vendspec in listed_products) + var/current_type = vendspec[3] + if(ispath(current_type, /obj/item/stack)) + partial_product_stacks[current_type] = 0 ///Updates the vendor stock when the [/datum/game_mode/var/marine_tally] has changed and we're using [VEND_STOCK_DYNAMIC] ///Assumes the scale can only increase!!! Don't take their items away! @@ -965,7 +988,7 @@ GLOBAL_LIST_EMPTY(vending_products) if(!IMBP) continue for(var/datum/item_box_pairing/IBP as anything in IMBP.item_box_pairings) - tmp_list += list(list(initial(IBP.box.name), round(L[2] / IBP.items_in_box), IBP.box, VENDOR_ITEM_REGULAR)) + tmp_list += list(list(initial(IBP.box.name), floor(L[2] / IBP.items_in_box), IBP.box, VENDOR_ITEM_REGULAR)) //Putting Ammo and other boxes on the bottom of the list as per player preferences if(tmp_list.len > 0) @@ -979,42 +1002,78 @@ GLOBAL_LIST_EMPTY(vending_products) .["displayed_categories"] = vendor_user_inventory_list(user, null, 4) /obj/structure/machinery/cm_vending/sorted/MouseDrop_T(atom/movable/A, mob/user) - if(inoperable()) return - if(user.stat || user.is_mob_restrained()) return - if(get_dist(user, src) > 1 || get_dist(src, A) > 1) return + if(!ishuman(user)) + return + + // Try to bulk restock using a container + if(istype(A, /obj/item/storage)) + var/obj/item/storage/container = A + if(!length(container.contents)) + return + if(being_restocked) + to_chat(user, SPAN_WARNING("[src] is already being restocked, you will get in the way!")) + return + + user.visible_message(SPAN_NOTICE("[user] starts stocking a bunch of supplies into [src]."), \ + SPAN_NOTICE("You start stocking a bunch of supplies into [src].")) + being_restocked = TRUE + + for(var/obj/item/item in container.contents) + if(!do_after(user, 1 SECONDS, INTERRUPT_ALL, BUSY_ICON_GENERIC, src)) + being_restocked = FALSE + user.visible_message(SPAN_NOTICE("[user] stopped stocking [src] with supplies."), \ + SPAN_NOTICE("You stop stocking [src] with supplies.")) + return + if(QDELETED(item) || item.loc != container) + being_restocked = FALSE + user.visible_message(SPAN_NOTICE("[user] stopped stocking [src] with supplies."), \ + SPAN_NOTICE("You stop stocking [src] with supplies.")) + return + stock(item, user) + + being_restocked = FALSE + user.visible_message(SPAN_NOTICE("[user] finishes stocking [src] with supplies."), \ + SPAN_NOTICE("You finish stocking [src] with supplies.")) + return if(istype(A, /obj/item)) - var/obj/item/I = A - stock(I, user) + stock(A, user) /obj/structure/machinery/cm_vending/sorted/proc/stock(obj/item/item_to_stock, mob/user) - var/list/R + if(istype(item_to_stock, /obj/item/storage)) + return FALSE + var/list/stock_listed_products = get_listed_products(user) - for(R in (stock_listed_products)) - if(item_to_stock.type == R[3] && !istype(item_to_stock,/obj/item/storage)) + for(var/list/vendspec as anything in stock_listed_products) + if(item_to_stock.type == vendspec[3]) + var/partial_stacks = 0 if(istype(item_to_stock, /obj/item/device/defibrillator)) - var/obj/item/device/defibrillator/D = item_to_stock - if(!D.dcell) - to_chat(user, SPAN_WARNING("\The [item_to_stock] needs a cell in it to be restocked!")) - return - if(D.dcell.charge < D.dcell.maxcharge) - to_chat(user, SPAN_WARNING("\The [item_to_stock] needs to be fully charged to restock it!")) - return + var/obj/item/device/defibrillator/defib = item_to_stock + if(!defib.dcell) + to_chat(user, SPAN_WARNING("[item_to_stock] needs a cell in it to be restocked!")) + return FALSE + if(defib.dcell.charge < defib.dcell.maxcharge) + to_chat(user, SPAN_WARNING("[item_to_stock] needs to be fully charged to restock it!")) + return FALSE else if(istype(item_to_stock, /obj/item/cell)) - var/obj/item/cell/C = item_to_stock - if(C.charge < C.maxcharge) - to_chat(user, SPAN_WARNING("\The [item_to_stock] needs to be fully charged to restock it!")) - return + var/obj/item/cell/cell = item_to_stock + if(cell.charge < cell.maxcharge) + to_chat(user, SPAN_WARNING("[item_to_stock] needs to be fully charged to restock it!")) + return FALSE - else if(!additional_restock_checks(item_to_stock, user)) + else if(istype(item_to_stock, /obj/item/stack)) + var/obj/item/stack/item_stack = item_to_stock + partial_stacks = item_stack.amount % item_stack.max_amount + + if(!additional_restock_checks(item_to_stock, user, vendspec)) // the error message needs to go in the proc return FALSE @@ -1024,19 +1083,44 @@ GLOBAL_LIST_EMPTY(vending_products) user.temp_drop_inv_item(item_to_stock) if(isstorage(item_to_stock.loc)) //inside a storage item - var/obj/item/storage/S = item_to_stock.loc - S.remove_from_storage(item_to_stock, user.loc) + var/obj/item/storage/container = item_to_stock.loc + container.remove_from_storage(item_to_stock, user.loc) qdel(item_to_stock) - user.visible_message(SPAN_NOTICE("[user] stocks [src] with \a [R[1]]."), - SPAN_NOTICE("You stock [src] with \a [R[1]].")) - R[2]++ - update_derived_ammo_and_boxes_on_add(R) + user.visible_message(SPAN_NOTICE("[user] stocks [src] with \a [vendspec[1]]."), \ + SPAN_NOTICE("You stock [src] with \a [vendspec[1]].")) + if(partial_stacks) + var/obj/item/stack/item_stack = item_to_stock + var/existing_stacks = partial_product_stacks[item_to_stock.type] + var/combined_stacks = existing_stacks + partial_stacks + if(existing_stacks == 0 || combined_stacks > item_stack.max_amount) + vendspec[2]++ + partial_product_stacks[item_to_stock.type] = combined_stacks % item_stack.max_amount + else + vendspec[2]++ + update_derived_ammo_and_boxes_on_add(vendspec) updateUsrDialog() - return //We found our item, no reason to go on. + return TRUE //We found our item, no reason to go on. + + return FALSE /// additional restocking checks for individual vendor subtypes. Parse in item, do checks, return FALSE to fail. Include error message. -/obj/structure/machinery/cm_vending/sorted/proc/additional_restock_checks(obj/item/item_to_stock, mob/user) +/obj/structure/machinery/cm_vending/sorted/proc/additional_restock_checks(obj/item/item_to_stock, mob/user, list/vendspec) + var/dynamic_metadata = dynamic_stock_multipliers[vendspec] + if(dynamic_metadata) + if(vendspec[2] >= dynamic_metadata[2]) + if(!istype(item_to_stock, /obj/item/stack)) + to_chat(user, SPAN_WARNING("[src] is already full of [vendspec[1]]!")) + return FALSE + var/obj/item/stack/item_stack = item_to_stock + if(partial_product_stacks[item_to_stock.type] == 0) + to_chat(user, SPAN_WARNING("[src] is already full of [vendspec[1]]!")) + return FALSE // No partial stack to fill + if((partial_product_stacks[item_to_stock.type] + item_stack.amount) > item_stack.max_amount) + to_chat(user, SPAN_WARNING("[src] is already full of [vendspec[1]]!")) + return FALSE // Exceeds partial stack to fill + else + stack_trace("[src] could not find dynamic_stock_multipliers for [vendspec[1]]!") return TRUE //sending an /empty ammo box type path here will return corresponding regular (full) type of this box @@ -1243,14 +1327,20 @@ GLOBAL_LIST_INIT(cm_vending_gear_corresponding_types_list, list( /obj/structure/machinery/cm_vending/proc/vendor_inventory_ui_data(mob/user) . = list() - var/list/ui_listed_products = get_listed_products(user) - var/list/ui_categories = list() - - for (var/i in 1 to length(ui_listed_products)) - var/list/myprod = ui_listed_products[i] //we take one list from listed_products - var/p_amount = myprod[2] //amount left - ui_categories += list(p_amount) - .["stock_listing"] = ui_categories + var/list/products = get_listed_products(user) + var/list/product_amounts = list() + var/list/product_partials = list() + + for(var/i in 1 to length(products)) + var/list/cur_prod = products[i] //we take one list from listed_products + product_amounts += list(cur_prod[2]) //amount left + var/cur_type = cur_prod[3] + var/cur_amount_partial = 0 + if(cur_type in partial_product_stacks) + cur_amount_partial = partial_product_stacks[cur_type] + product_partials += list(cur_amount_partial) + .["stock_listing"] = product_amounts + .["stock_listing_partials"] = product_partials /obj/structure/machinery/cm_vending/proc/vendor_successful_vend(list/itemspec, mob/living/carbon/human/user) if(stat & IN_USE) @@ -1267,19 +1357,23 @@ GLOBAL_LIST_INIT(cm_vending_gear_corresponding_types_list, list( sleep(vend_delay) var/prod_type = itemspec[3] + var/stack_amount = 0 + if(vend_flags & VEND_LIMITED_INVENTORY) + itemspec[2]-- + if(itemspec[2] == 0) + stack_amount = partial_product_stacks[prod_type] + partial_product_stacks[prod_type] = 0 + if(vend_flags & VEND_LOAD_AMMO_BOXES) + update_derived_ammo_and_boxes(itemspec) + if(islist(prod_type)) for(var/each_type in prod_type) - vendor_successful_vend_one(each_type, user, target_turf, itemspec[4] == MARINE_CAN_BUY_UNIFORM) + vendor_successful_vend_one(each_type, user, target_turf, itemspec[4] == MARINE_CAN_BUY_UNIFORM, stack_amount) SEND_SIGNAL(src, COMSIG_VENDOR_SUCCESSFUL_VEND, src, itemspec, user) else - vendor_successful_vend_one(prod_type, user, target_turf, itemspec[4] == MARINE_CAN_BUY_UNIFORM) + vendor_successful_vend_one(prod_type, user, target_turf, itemspec[4] == MARINE_CAN_BUY_UNIFORM, stack_amount) SEND_SIGNAL(src, COMSIG_VENDOR_SUCCESSFUL_VEND, src, itemspec, user) - if(vend_flags & VEND_LIMITED_INVENTORY) - itemspec[2]-- - if(vend_flags & VEND_LOAD_AMMO_BOXES) - update_derived_ammo_and_boxes(itemspec) - else to_chat(user, SPAN_WARNING("ERROR: itemspec is missing. Please report this to admins.")) sleep(15) @@ -1288,7 +1382,7 @@ GLOBAL_LIST_INIT(cm_vending_gear_corresponding_types_list, list( icon_state = initial(icon_state) update_icon() -/obj/structure/machinery/cm_vending/proc/vendor_successful_vend_one(prod_type, mob/living/carbon/human/user, turf/target_turf, insignas_override) +/obj/structure/machinery/cm_vending/proc/vendor_successful_vend_one(prod_type, mob/living/carbon/human/user, turf/target_turf, insignas_override, stack_amount) var/obj/item/new_item if(ispath(prod_type, /obj/item)) if(ispath(prod_type, /obj/item/weapon/gun)) @@ -1298,7 +1392,11 @@ GLOBAL_LIST_INIT(cm_vending_gear_corresponding_types_list, list( prod_type = headset_type else if(prod_type == /obj/item/clothing/gloves/marine) prod_type = gloves_type - new_item = new prod_type(target_turf) + if(stack_amount > 0 && ispath(prod_type, /obj/item/stack)) + new_item = new prod_type(target_turf, stack_amount) + else + new_item = new prod_type(target_turf) + new_item.add_fingerprint(user) else new_item = new prod_type(target_turf) @@ -1354,17 +1452,22 @@ GLOBAL_LIST_INIT(cm_vending_gear_corresponding_types_list, list( while(i <= length(products)) sleep(0.5) var/list/itemspec = products[i] + var/itemspec_item = itemspec[3] if(!itemspec[2] || itemspec[2] <= 0) i++ continue - itemspec[2] -= 1 + itemspec[2]-- var/list/spawned = list() - if(islist(itemspec[3])) - for(var/path in itemspec[3]) + if(islist(itemspec_item)) + for(var/path in itemspec_item) spawned += new path(loc) - else if(itemspec[3]) - var/path = itemspec[3] - spawned += new path(loc) + else if(itemspec_item) + if(itemspec[2] == 0 && partial_product_stacks[itemspec_item] > 0 && ispath(itemspec_item, /obj/item/stack)) + var/stack_amount = partial_product_stacks[itemspec_item] + partial_product_stacks[itemspec_item] = 0 + spawned += new itemspec_item(loc, stack_amount) + else + spawned += new itemspec_item(loc) if(throw_objects) for(var/atom/movable/spawned_atom in spawned) INVOKE_ASYNC(spawned_atom, TYPE_PROC_REF(/atom/movable, throw_atom), pick(orange(src, 4)), 4, SPEED_FAST) diff --git a/code/game/machinery/vending/vending_types.dm b/code/game/machinery/vending/vending_types.dm index 92ba81af4d94..b69773dbf8bf 100644 --- a/code/game/machinery/vending/vending_types.dm +++ b/code/game/machinery/vending/vending_types.dm @@ -234,8 +234,9 @@ icon_deny = "sec-deny" req_access = list(ACCESS_MARINE_BRIG) products = list( - /obj/item/handcuffs = 8, - /obj/item/handcuffs/zip = 10, + /obj/item/restraint/handcuffs = 8, + /obj/item/restraint/handcuffs/zip = 10, + /obj/item/restraint/legcuffs = 3, /obj/item/explosive/grenade/flashbang = 4, /obj/item/weapon/gun/energy/taser = 4, /obj/item/reagent_container/spray/pepper = 4, @@ -263,7 +264,7 @@ hacking_safety = TRUE wrenchable = FALSE products = list( - /obj/item/handcuffs/zip = 40, + /obj/item/restraint/handcuffs/zip = 40, /obj/item/explosive/grenade/flashbang = 20, /obj/item/explosive/grenade/custom/teargas = 40, /obj/item/ammo_magazine/smg/m39/rubber = 40, diff --git a/code/game/machinery/vending/vendor_types/crew/sea.dm b/code/game/machinery/vending/vendor_types/crew/sea.dm index 44f530271037..37cacfd14a6f 100644 --- a/code/game/machinery/vending/vendor_types/crew/sea.dm +++ b/code/game/machinery/vending/vendor_types/crew/sea.dm @@ -29,17 +29,20 @@ GLOBAL_LIST_INIT(cm_vending_gear_sea, list( GLOBAL_LIST_INIT(cm_vending_clothing_sea, list( list("STANDARD EQUIPMENT (TAKE ALL)", 0, null, null, null), list("Officer Uniform", 0, /obj/item/clothing/under/marine/dress, MARINE_CAN_BUY_UNIFORM, VENDOR_ITEM_MANDATORY), - list("Marine Combat Gloves", 0, /obj/item/clothing/gloves/marine, MARINE_CAN_BUY_GLOVES, VENDOR_ITEM_MANDATORY), list("Headset", 0, /obj/item/device/radio/headset/almayer/mcom/cdrcom, MARINE_CAN_BUY_EAR, VENDOR_ITEM_MANDATORY), list("Satchel", 0, /obj/item/storage/backpack/satchel/lockable, MARINE_CAN_BUY_BACKPACK, VENDOR_ITEM_MANDATORY), list("MRE", 0, /obj/item/storage/box/MRE, MARINE_CAN_BUY_MRE, VENDOR_ITEM_MANDATORY), list("Marine Combat Boots", 0, /obj/item/clothing/shoes/marine/knife, MARINE_CAN_BUY_SHOES, VENDOR_ITEM_MANDATORY), + list("GLOVES (CHOOSE 1)", 0, null, null, null), + list("Insulated Gloves", 0, /obj/item/clothing/gloves/yellow, MARINE_CAN_BUY_GLOVES, VENDOR_ITEM_REGULAR), + list("Marine Combat Gloves", 0, /obj/item/clothing/gloves/marine, MARINE_CAN_BUY_GLOVES, VENDOR_ITEM_REGULAR), + list("BELT (CHOOSE 1)", 0, null, null, null), list("G8-A General Utility Pouch", 0, /obj/item/storage/backpack/general_belt, MARINE_CAN_BUY_BELT, VENDOR_ITEM_REGULAR), list("M276 Lifesaver Bag (Full)", 0, /obj/item/storage/belt/medical/lifesaver/full, MARINE_CAN_BUY_BELT, VENDOR_ITEM_RECOMMENDED), list("M276 Toolbelt Rig (Full)", 0, /obj/item/storage/belt/utility/full, MARINE_CAN_BUY_BELT, VENDOR_ITEM_REGULAR), - list("M276 Combat Toolbelt Rig (Full)", 0, /obj/item/storage/belt/gun/utility, MARINE_CAN_BUY_BELT, VENDOR_ITEM_REGULAR), + list("M276 Combat Toolbelt Rig (Full)", 0, /obj/item/storage/belt/gun/utility/full, MARINE_CAN_BUY_BELT, VENDOR_ITEM_REGULAR), list("POUCHES (CHOOSE 2)", 0, null, null, null), list("Autoinjector Pouch", 0, /obj/item/storage/pouch/autoinjector/full, MARINE_CAN_BUY_POUCH, VENDOR_ITEM_REGULAR), @@ -58,6 +61,12 @@ GLOBAL_LIST_INIT(cm_vending_clothing_sea, list( list("Bulletproof Vest", 0, /obj/item/clothing/suit/armor/bulletproof, MARINE_CAN_BUY_ARMOR, VENDOR_ITEM_REGULAR), list("USCM Service Jacket", 0, /obj/item/clothing/suit/storage/jacket/marine/service, MARINE_CAN_BUY_ARMOR, VENDOR_ITEM_REGULAR), + list("EYEWEAR (CHOOSE 1)", 0, null, null, null), + list("Welding Goggles", 0, /obj/item/clothing/glasses/welding, MARINE_CAN_BUY_GLASSES, VENDOR_ITEM_REGULAR), + list("Medical HUD Glasses", 0, /obj/item/clothing/glasses/hud/health, MARINE_CAN_BUY_GLASSES, VENDOR_ITEM_REGULAR), + list("Prescription Medical HUD Glasses", 0, /obj/item/clothing/glasses/hud/health/prescription, MARINE_CAN_BUY_GLASSES, VENDOR_ITEM_REGULAR), + list("Sunglasses", 0, /obj/item/clothing/glasses/sunglasses, MARINE_CAN_BUY_GLASSES, VENDOR_ITEM_REGULAR), + list("ACCESSORIES (CHOOSE 1)", 0, null, null, null), list("Brown Webbing Vest", 0, /obj/item/clothing/accessory/storage/black_vest/brown_vest, MARINE_CAN_BUY_ACCESSORY, VENDOR_ITEM_REGULAR), list("Black Webbing Vest", 0, /obj/item/clothing/accessory/storage/black_vest, MARINE_CAN_BUY_ACCESSORY, VENDOR_ITEM_REGULAR), @@ -68,9 +77,6 @@ GLOBAL_LIST_INIT(cm_vending_clothing_sea, list( list("HEADWEAR (CHOOSE 1)", 0, null, null, null), list("Drill Hat", 0, /obj/item/clothing/head/drillhat, MARINE_CAN_BUY_MASK, VENDOR_ITEM_RECOMMENDED), list("M10 Helmet", 0, /obj/item/clothing/head/helmet/marine, MARINE_CAN_BUY_HELMET, VENDOR_ITEM_REGULAR), - - list("TOOLS OF THE TRADE", 0, null, null, null), - list("CPR Dummy", 5, /obj/item/cpr_dummy, null, VENDOR_ITEM_REGULAR) )) /obj/structure/machinery/cm_vending/clothing/sea diff --git a/code/game/machinery/vending/vendor_types/crew/synthetic.dm b/code/game/machinery/vending/vendor_types/crew/synthetic.dm index a55285369e14..899bb2a8266e 100644 --- a/code/game/machinery/vending/vendor_types/crew/synthetic.dm +++ b/code/game/machinery/vending/vendor_types/crew/synthetic.dm @@ -215,6 +215,9 @@ GLOBAL_LIST_INIT(cm_vending_clothing_synth_snowflake, list( list("White Service Uniform", 12, /obj/item/clothing/under/colonist/white_service, null, VENDOR_ITEM_REGULAR), list("Steward Clothes", 12, /obj/item/clothing/under/colonist/wy_joliet_shopsteward, null, VENDOR_ITEM_REGULAR), list("Red Dress Skirt", 12, /obj/item/clothing/under/blackskirt, null, VENDOR_ITEM_REGULAR), + list("Blue Suit Pants", 12, /obj/item/clothing/under/liaison_suit/blue, null, VENDOR_ITEM_REGULAR), + list("Brown Suit Pants", 12, /obj/item/clothing/under/liaison_suit/brown, null, VENDOR_ITEM_REGULAR), + list("White Suit Pants", 12, /obj/item/clothing/under/liaison_suit/corporate_formal, null, VENDOR_ITEM_REGULAR), list("Working Joe Uniform", 36, /obj/item/clothing/under/rank/synthetic/joe, null, VENDOR_ITEM_REGULAR), list("GLASSES", 0, null, null, null), @@ -258,6 +261,7 @@ GLOBAL_LIST_INIT(cm_vending_clothing_synth_snowflake, list( list("Req Cap", 12, /obj/item/clothing/head/cmcap/req, null, VENDOR_ITEM_REGULAR), list("Officer Cap", 12, /obj/item/clothing/head/cmcap/bridge, null, VENDOR_ITEM_REGULAR), list("Bio Hood", 12, /obj/item/clothing/head/bio_hood/synth, null, VENDOR_ITEM_REGULAR), + list("Fedora", 12, /obj/item/clothing/head/fedora, null, VENDOR_ITEM_REGULAR), list("HELMET", 0, null, null, null), list("Marine Helmet (Mission-Specific Camo)", 12, /obj/item/clothing/head/helmet/marine, null, VENDOR_ITEM_REGULAR), @@ -290,6 +294,12 @@ GLOBAL_LIST_INIT(cm_vending_clothing_synth_snowflake, list( list("Labcoat, Researcher", 12, /obj/item/clothing/suit/storage/labcoat/researcher, null, VENDOR_ITEM_REGULAR), list("Quartermaster Jacket", 12, /obj/item/clothing/suit/storage/RO, null, VENDOR_ITEM_REGULAR), list("Bio Suit", 12, /obj/item/clothing/suit/storage/synthbio, null, VENDOR_ITEM_REGULAR), + list("Black Suit Jacket", 12, /obj/item/clothing/suit/storage/jacket/marine/corporate/black, null, VENDOR_ITEM_REGULAR), + list("Brown Suit Jacket", 12, /obj/item/clothing/suit/storage/jacket/marine/corporate/brown, null, VENDOR_ITEM_REGULAR), + list("Blue Suit Jacket", 12, /obj/item/clothing/suit/storage/jacket/marine/corporate/blue, null, VENDOR_ITEM_REGULAR), + list("Brown Vest", 12, /obj/item/clothing/suit/storage/jacket/marine/vest, null, VENDOR_ITEM_REGULAR), + list("Tan Vest", 12, /obj/item/clothing/suit/storage/jacket/marine/vest/tan, null, VENDOR_ITEM_REGULAR), + list("Grey Vest", 12, /obj/item/clothing/suit/storage/jacket/marine/vest/grey, null, VENDOR_ITEM_REGULAR), list("USCM Poncho (Mission-Specific Camo)", 12, /obj/item/clothing/accessory/poncho, null, VENDOR_ITEM_REGULAR), list("USCM Poncho (Green)", 12, /obj/item/clothing/accessory/poncho/green, null, VENDOR_ITEM_REGULAR), list("USCM Poncho (Brown)", 12, /obj/item/clothing/accessory/poncho/brown, null, VENDOR_ITEM_REGULAR), @@ -315,6 +325,7 @@ GLOBAL_LIST_INIT(cm_vending_clothing_synth_snowflake, list( list("Purple Armband", 6, /obj/item/clothing/accessory/armband/science, null, VENDOR_ITEM_REGULAR), list("Yellow Armband", 6, /obj/item/clothing/accessory/armband/engine, null, VENDOR_ITEM_REGULAR), list("Green Armband", 6, /obj/item/clothing/accessory/armband/medgreen, null, VENDOR_ITEM_REGULAR), + list("Dress Gloves", 6, /obj/item/clothing/gloves/marine/dress, null, VENDOR_ITEM_REGULAR), )) diff --git a/code/game/machinery/vending/vendor_types/crew/vehicle_crew.dm b/code/game/machinery/vending/vendor_types/crew/vehicle_crew.dm index 6877c2b4b5b3..0586f4b72fa5 100644 --- a/code/game/machinery/vending/vendor_types/crew/vehicle_crew.dm +++ b/code/game/machinery/vending/vendor_types/crew/vehicle_crew.dm @@ -76,6 +76,9 @@ else display_list = GLOB.cm_vending_vehicle_crew_tank_spare + else if(selected_vehicle == "ARC") + display_list = GLOB.cm_vending_vehicle_crew_arc + else if(selected_vehicle == "APC") if(available_categories) display_list = GLOB.cm_vending_vehicle_crew_apc @@ -245,6 +248,11 @@ GLOBAL_LIST_INIT(cm_vending_vehicle_crew_apc_spare, list( list("WHEELS", 0, null, null, null), list("APC Wheels", 200, /obj/item/hardpoint/locomotion/apc_wheels, null, VENDOR_ITEM_REGULAR))) +GLOBAL_LIST_INIT(cm_vending_vehicle_crew_arc, list( + list("STARTING KIT SELECTION:", 0, null, null, null), + + list("WHEELS", 0, null, null, null), + list("Replacement ARC Wheels", 0, /obj/item/hardpoint/locomotion/arc_wheels, VEHICLE_TREADS_AVAILABLE, VENDOR_ITEM_MANDATORY))) //------------WEAPONS RACK--------------- diff --git a/code/game/machinery/vending/vendor_types/engineering.dm b/code/game/machinery/vending/vendor_types/engineering.dm index 826f4431235b..6da719e883ba 100644 --- a/code/game/machinery/vending/vendor_types/engineering.dm +++ b/code/game/machinery/vending/vendor_types/engineering.dm @@ -19,28 +19,28 @@ /obj/structure/machinery/cm_vending/sorted/tech/tool_storage/populate_product_list(scale) listed_products = list( list("EQUIPMENT", -1, null, null), - list("Combat Flashlight", round(scale * 2), /obj/item/device/flashlight/combat, VENDOR_ITEM_REGULAR), - list("Hardhat", round(scale * 2), /obj/item/clothing/head/hardhat, VENDOR_ITEM_REGULAR), - list("Insulated Gloves", round(scale * 2), /obj/item/clothing/gloves/yellow, VENDOR_ITEM_REGULAR), - list("Utility Tool Belt", round(scale * 2), /obj/item/storage/belt/utility, VENDOR_ITEM_REGULAR), - list("Welding Goggles", round(scale * 2), /obj/item/clothing/glasses/welding, VENDOR_ITEM_REGULAR), - list("Welding Helmet", round(scale * 2), /obj/item/clothing/head/welding, VENDOR_ITEM_REGULAR), - list("Engineer Kit", round(scale * 2), /obj/item/storage/toolkit/empty, VENDOR_ITEM_REGULAR), + list("Combat Flashlight", floor(scale * 2), /obj/item/device/flashlight/combat, VENDOR_ITEM_REGULAR), + list("Hardhat", floor(scale * 2), /obj/item/clothing/head/hardhat, VENDOR_ITEM_REGULAR), + list("Insulated Gloves", floor(scale * 2), /obj/item/clothing/gloves/yellow, VENDOR_ITEM_REGULAR), + list("Utility Tool Belt", floor(scale * 2), /obj/item/storage/belt/utility, VENDOR_ITEM_REGULAR), + list("Welding Goggles", floor(scale * 2), /obj/item/clothing/glasses/welding, VENDOR_ITEM_REGULAR), + list("Welding Helmet", floor(scale * 2), /obj/item/clothing/head/welding, VENDOR_ITEM_REGULAR), + list("Engineer Kit", floor(scale * 2), /obj/item/storage/toolkit/empty, VENDOR_ITEM_REGULAR), list("SCANNERS", -1, null, null), - list("Atmos Scanner", round(scale * 2), /obj/item/device/analyzer, VENDOR_ITEM_REGULAR), - list("Demolitions Scanner", round(scale * 1), /obj/item/device/demo_scanner, VENDOR_ITEM_REGULAR), - list("Meson Scanner", round(scale * 2), /obj/item/clothing/glasses/meson, VENDOR_ITEM_REGULAR), - list("Reagent Scanner", round(scale * 2), /obj/item/device/reagent_scanner, VENDOR_ITEM_REGULAR), - list("T-Ray Scanner", round(scale * 2), /obj/item/device/t_scanner, VENDOR_ITEM_REGULAR), + list("Atmos Scanner", floor(scale * 2), /obj/item/device/analyzer, VENDOR_ITEM_REGULAR), + list("Demolitions Scanner", floor(scale * 1), /obj/item/device/demo_scanner, VENDOR_ITEM_REGULAR), + list("Meson Scanner", floor(scale * 2), /obj/item/clothing/glasses/meson, VENDOR_ITEM_REGULAR), + list("Reagent Scanner", floor(scale * 2), /obj/item/device/reagent_scanner, VENDOR_ITEM_REGULAR), + list("T-Ray Scanner", floor(scale * 2), /obj/item/device/t_scanner, VENDOR_ITEM_REGULAR), list("TOOLS", -1, null, null), - list("Blowtorch", round(scale * 4), /obj/item/tool/weldingtool, VENDOR_ITEM_REGULAR), - list("Crowbar", round(scale * 4), /obj/item/tool/crowbar, VENDOR_ITEM_REGULAR), - list("ME3 Hand Welder", round(scale * 2), /obj/item/tool/weldingtool/simple, VENDOR_ITEM_REGULAR), - list("Screwdriver", round(scale * 4), /obj/item/tool/screwdriver, VENDOR_ITEM_REGULAR), - list("Wirecutters", round(scale * 4), /obj/item/tool/wirecutters, VENDOR_ITEM_REGULAR), - list("Wrench", round(scale * 4), /obj/item/tool/wrench, VENDOR_ITEM_REGULAR) + list("Blowtorch", floor(scale * 4), /obj/item/tool/weldingtool, VENDOR_ITEM_REGULAR), + list("Crowbar", floor(scale * 4), /obj/item/tool/crowbar, VENDOR_ITEM_REGULAR), + list("ME3 Hand Welder", floor(scale * 2), /obj/item/tool/weldingtool/simple, VENDOR_ITEM_REGULAR), + list("Screwdriver", floor(scale * 4), /obj/item/tool/screwdriver, VENDOR_ITEM_REGULAR), + list("Wirecutters", floor(scale * 4), /obj/item/tool/wirecutters, VENDOR_ITEM_REGULAR), + list("Wrench", floor(scale * 4), /obj/item/tool/wrench, VENDOR_ITEM_REGULAR) ) /obj/structure/machinery/cm_vending/sorted/tech/comtech_tools @@ -52,19 +52,19 @@ /obj/structure/machinery/cm_vending/sorted/tech/comtech_tools/populate_product_list(scale) listed_products = list( list("EQUIPMENT", -1, null, null), - list("Utility Tool Belt", round(scale * 4), /obj/item/storage/belt/utility, VENDOR_ITEM_REGULAR), - list("Cable Coil", round(scale * 4), /obj/item/stack/cable_coil/random, VENDOR_ITEM_REGULAR), - list("Welding Goggles", round(scale * 2), /obj/item/clothing/glasses/welding, VENDOR_ITEM_REGULAR), - list("Engineer Kit", round(scale * 2), /obj/item/storage/toolkit/empty, VENDOR_ITEM_REGULAR), + list("Utility Tool Belt", floor(scale * 4), /obj/item/storage/belt/utility, VENDOR_ITEM_REGULAR), + list("Cable Coil", floor(scale * 4), /obj/item/stack/cable_coil/random, VENDOR_ITEM_REGULAR), + list("Welding Goggles", floor(scale * 2), /obj/item/clothing/glasses/welding, VENDOR_ITEM_REGULAR), + list("Engineer Kit", floor(scale * 2), /obj/item/storage/toolkit/empty, VENDOR_ITEM_REGULAR), list("TOOLS", -1, null, null), - list("Blowtorch", round(scale * 4), /obj/item/tool/weldingtool, VENDOR_ITEM_REGULAR), - list("Crowbar", round(scale * 4), /obj/item/tool/crowbar, VENDOR_ITEM_REGULAR), - list("Screwdriver", round(scale * 4), /obj/item/tool/screwdriver, VENDOR_ITEM_REGULAR), - list("Wirecutters", round(scale * 4), /obj/item/tool/wirecutters, VENDOR_ITEM_REGULAR), - list("Wrench", round(scale * 4), /obj/item/tool/wrench, VENDOR_ITEM_REGULAR), - list("Multitool", round(scale * 4), /obj/item/device/multitool, VENDOR_ITEM_REGULAR), - list("ME3 Hand Welder", round(scale * 2), /obj/item/tool/weldingtool/simple, VENDOR_ITEM_REGULAR), + list("Blowtorch", floor(scale * 4), /obj/item/tool/weldingtool, VENDOR_ITEM_REGULAR), + list("Crowbar", floor(scale * 4), /obj/item/tool/crowbar, VENDOR_ITEM_REGULAR), + list("Screwdriver", floor(scale * 4), /obj/item/tool/screwdriver, VENDOR_ITEM_REGULAR), + list("Wirecutters", floor(scale * 4), /obj/item/tool/wirecutters, VENDOR_ITEM_REGULAR), + list("Wrench", floor(scale * 4), /obj/item/tool/wrench, VENDOR_ITEM_REGULAR), + list("Multitool", floor(scale * 4), /obj/item/device/multitool, VENDOR_ITEM_REGULAR), + list("ME3 Hand Welder", floor(scale * 2), /obj/item/tool/weldingtool/simple, VENDOR_ITEM_REGULAR), list("UTILITY", -1, null, null), list("Sentry Gun Network Laptop", 4, /obj/item/device/sentry_computer, VENDOR_ITEM_REGULAR), @@ -110,16 +110,16 @@ /obj/structure/machinery/cm_vending/sorted/tech/electronics_storage/populate_product_list(scale) listed_products = list( list("TOOLS", -1, null, null), - list("Cable Coil", round(scale * 3), /obj/item/stack/cable_coil/random, VENDOR_ITEM_REGULAR), - list("Multitool", round(scale * 2), /obj/item/device/multitool, VENDOR_ITEM_REGULAR), + list("Cable Coil", floor(scale * 3), /obj/item/stack/cable_coil/random, VENDOR_ITEM_REGULAR), + list("Multitool", floor(scale * 2), /obj/item/device/multitool, VENDOR_ITEM_REGULAR), list("CIRCUITBOARDS", -1, null, null), - list("Airlock Circuit Board", round(scale * 4), /obj/item/circuitboard/airlock, VENDOR_ITEM_REGULAR), - list("APC Circuit Board", round(scale * 4), /obj/item/circuitboard/apc, VENDOR_ITEM_REGULAR), + list("Airlock Circuit Board", floor(scale * 4), /obj/item/circuitboard/airlock, VENDOR_ITEM_REGULAR), + list("APC Circuit Board", floor(scale * 4), /obj/item/circuitboard/apc, VENDOR_ITEM_REGULAR), list("BATTERIES", -1, null, null), - list("High-Capacity Power Cell", round(scale * 3), /obj/item/cell/high, VENDOR_ITEM_REGULAR), - list("Low-Capacity Power Cell", round(scale * 7), /obj/item/cell, VENDOR_ITEM_REGULAR), + list("High-Capacity Power Cell", floor(scale * 3), /obj/item/cell/high, VENDOR_ITEM_REGULAR), + list("Low-Capacity Power Cell", floor(scale * 7), /obj/item/cell, VENDOR_ITEM_REGULAR), ) /obj/structure/machinery/cm_vending/sorted/tech/electronics_storage/antag @@ -134,22 +134,22 @@ /obj/structure/machinery/cm_vending/sorted/tech/comp_storage/populate_product_list(scale) listed_products = list( list("ASSEMBLY COMPONENTS", -1, null, null), - list("Igniter", round(scale * 8), /obj/item/device/assembly/igniter, VENDOR_ITEM_REGULAR), - list("Timer", round(scale * 4), /obj/item/device/assembly/timer, VENDOR_ITEM_REGULAR), - list("Proximity Sensor", round(scale * 4), /obj/item/device/assembly/prox_sensor, VENDOR_ITEM_REGULAR), - list("Signaller", round(scale * 4), /obj/item/device/assembly/signaller, VENDOR_ITEM_REGULAR), + list("Igniter", floor(scale * 8), /obj/item/device/assembly/igniter, VENDOR_ITEM_REGULAR), + list("Timer", floor(scale * 4), /obj/item/device/assembly/timer, VENDOR_ITEM_REGULAR), + list("Proximity Sensor", floor(scale * 4), /obj/item/device/assembly/prox_sensor, VENDOR_ITEM_REGULAR), + list("Signaller", floor(scale * 4), /obj/item/device/assembly/signaller, VENDOR_ITEM_REGULAR), list("CONTAINERS", -1, null, null), - list("Bucket", round(scale * 6), /obj/item/reagent_container/glass/bucket, VENDOR_ITEM_REGULAR), - list("Mop Bucket", round(scale * 2), /obj/item/reagent_container/glass/bucket/mopbucket, VENDOR_ITEM_REGULAR), + list("Bucket", floor(scale * 6), /obj/item/reagent_container/glass/bucket, VENDOR_ITEM_REGULAR), + list("Mop Bucket", floor(scale * 2), /obj/item/reagent_container/glass/bucket/mopbucket, VENDOR_ITEM_REGULAR), list("STOCK PARTS", -1, null, null), - list("Console Screen", round(scale * 4), /obj/item/stock_parts/console_screen, VENDOR_ITEM_REGULAR), - list("Matter Bin", round(scale * 4), /obj/item/stock_parts/matter_bin, VENDOR_ITEM_REGULAR), - list("Micro Laser", round(scale * 4), /obj/item/stock_parts/micro_laser , VENDOR_ITEM_REGULAR), - list("Micro Manipulator", round(scale * 4), /obj/item/stock_parts/manipulator, VENDOR_ITEM_REGULAR), - list("Scanning Module", round(scale * 4), /obj/item/stock_parts/scanning_module, VENDOR_ITEM_REGULAR), - list("Capacitor", round(scale * 3), /obj/item/stock_parts/capacitor, VENDOR_ITEM_REGULAR) + list("Console Screen", floor(scale * 4), /obj/item/stock_parts/console_screen, VENDOR_ITEM_REGULAR), + list("Matter Bin", floor(scale * 4), /obj/item/stock_parts/matter_bin, VENDOR_ITEM_REGULAR), + list("Micro Laser", floor(scale * 4), /obj/item/stock_parts/micro_laser , VENDOR_ITEM_REGULAR), + list("Micro Manipulator", floor(scale * 4), /obj/item/stock_parts/manipulator, VENDOR_ITEM_REGULAR), + list("Scanning Module", floor(scale * 4), /obj/item/stock_parts/scanning_module, VENDOR_ITEM_REGULAR), + list("Capacitor", floor(scale * 3), /obj/item/stock_parts/capacitor, VENDOR_ITEM_REGULAR) ) /obj/structure/machinery/cm_vending/sorted/tech/comp_storage/antag @@ -172,11 +172,11 @@ list("Scientist's Jumpsuit", 2, /obj/item/clothing/under/rank/scientist, VENDOR_ITEM_REGULAR), list("ASSEMBLY COMPONENTS", -1, null, null), - list("Igniter", round(scale * 8), /obj/item/device/assembly/igniter, VENDOR_ITEM_REGULAR), - list("Proximity Sensor", round(scale * 4), /obj/item/device/assembly/prox_sensor, VENDOR_ITEM_REGULAR), - list("Signaller", round(scale * 4), /obj/item/device/assembly/signaller, VENDOR_ITEM_REGULAR), - list("Tank Transfer Valve", round(scale * 4), /obj/item/device/transfer_valve, VENDOR_ITEM_REGULAR), - list("Timer", round(scale * 4), /obj/item/device/assembly/timer, VENDOR_ITEM_REGULAR), + list("Igniter", floor(scale * 8), /obj/item/device/assembly/igniter, VENDOR_ITEM_REGULAR), + list("Proximity Sensor", floor(scale * 4), /obj/item/device/assembly/prox_sensor, VENDOR_ITEM_REGULAR), + list("Signaller", floor(scale * 4), /obj/item/device/assembly/signaller, VENDOR_ITEM_REGULAR), + list("Tank Transfer Valve", floor(scale * 4), /obj/item/device/transfer_valve, VENDOR_ITEM_REGULAR), + list("Timer", floor(scale * 4), /obj/item/device/assembly/timer, VENDOR_ITEM_REGULAR), ) /obj/structure/machinery/cm_vending/sorted/tech/robotics diff --git a/code/game/machinery/vending/vendor_types/medical.dm b/code/game/machinery/vending/vendor_types/medical.dm index a867c9b61f29..ab1df0b2abb7 100644 --- a/code/game/machinery/vending/vendor_types/medical.dm +++ b/code/game/machinery/vending/vendor_types/medical.dm @@ -1,4 +1,4 @@ -//------------SUPPLY LINK FOR MEDICAL VENDORS--------------- +//------------SUPPLY LINK FOR MEDICAL VENDORS------------ /obj/structure/medical_supply_link name = "medilink supply port" @@ -6,12 +6,13 @@ icon = 'icons/effects/warning_stripes.dmi' icon_state = "medlink_unclamped" var/base_state = "medlink" + plane = FLOOR_PLANE + layer = ABOVE_TURF_LAYER //It's the floor, man + anchored = TRUE density = FALSE unslashable = TRUE unacidable = TRUE - plane = FLOOR_PLANE - layer = ABOVE_TURF_LAYER //It's the floor, man /obj/structure/medical_supply_link/ex_act(severity, direction) return FALSE @@ -43,16 +44,178 @@ else icon_state = "[base_state]_unclamped" -// --- Green /obj/structure/medical_supply_link/green icon_state = "medlink_green_unclamped" base_state = "medlink_green" -//------------SORTED MEDICAL VENDORS--------------- + +//------------RESTOCK CARTS FOR MEDICAL VENDORS------------ + +/obj/structure/restock_cart + name = "restock cart" + desc = "A rather heavy cart filled with various supplies to restock a vendor with." + icon = 'icons/obj/objects.dmi' + icon_state = "tank_normal" // Temporary + var/overlay_color = rgb(252, 186, 3) // Temporary + + density = TRUE + anchored = FALSE + drag_delay = 2 + health = 100 // Can be destroyed in 2-4 slashes. + unslashable = FALSE + + ///The quantity of things this can restock + var/supplies_remaining = 20 + ///The max quantity of things this can restock + var/supplies_max = 20 + ///The descriptor for the kind of things being restocked + var/supply_descriptor = "supplies" + ///The sound to play when attacked + var/attacked_sound = 'sound/effects/metalhit.ogg' + ///The sound to play when destroyed + var/destroyed_sound = 'sound/effects/metalhit.ogg' + ///Random loot to spawn if destroyed as assoc list of type_path = max_quantity + var/list/destroyed_loot = list( + /obj/item/stack/sheet/metal = 2 + ) + +/obj/structure/restock_cart/medical + name = "\improper Wey-Yu restock cart" + desc = "A rather heavy cart filled with various supplies to restock a vendor with. Provided by Wey-Yu Pharmaceuticals Division(TM)." + icon = 'icons/obj/objects.dmi' + icon_state = "tank_normal" // Temporary + + supplies_remaining = 20 + supplies_max = 20 + supply_descriptor = "sets of medical supplies" + destroyed_loot = list( + /obj/item/stack/medical/advanced/ointment = 3, + /obj/item/stack/medical/advanced/bruise_pack = 2, + /obj/item/stack/medical/ointment = 3, + /obj/item/stack/medical/bruise_pack = 2, + /obj/item/stack/medical/splint = 2, + /obj/item/device/healthanalyzer = 1, + ) + +/obj/structure/restock_cart/medical/reagent + name = "\improper Wey-Yu reagent restock cart" + desc = "A rather heavy cart filled with various reagents to restock a vendor with. Provided by Wey-Yu Pharmaceuticals Division(TM)." + icon_state = "tank_normal" // Temporary + overlay_color = rgb(252, 115, 3) // Temporary + + supplies_remaining = 1200 + supplies_max = 1200 + supply_descriptor = "units of medical reagents" + destroyed_sound = 'sound/effects/slosh.ogg' + destroyed_loot = list() + +/obj/structure/restock_cart/Initialize(mapload, ...) + . = ..() + supplies_remaining = min(supplies_remaining, supplies_max) + update_icon() + +/obj/structure/restock_cart/update_icon() + . = ..() + var/image/overlay_image = image(icon, icon_state = "tn_color") // Temporary + overlay_image.color = overlay_color + overlays += overlay_image + +/obj/structure/restock_cart/get_examine_text(mob/user) + . = ..() + if(get_dist(user, src) > 2 && user != loc) + return + . += SPAN_NOTICE("It contains:") + if(supplies_remaining) + . += SPAN_NOTICE(" [supplies_remaining] [supply_descriptor].") + else + . += SPAN_NOTICE(" Nothing.") + +/obj/structure/restock_cart/deconstruct(disassembled) + if(!disassembled) + playsound(loc, destroyed_sound, 35, 1) + visible_message(SPAN_NOTICE("[src] falls apart as its contents spill everywhere!")) + + // Assumption: supplies_max is > 0 + if(supplies_remaining > 0 && length(destroyed_loot)) + var/spawned_any = FALSE + var/probability = (supplies_remaining / supplies_max) * 100 + for(var/type_path in destroyed_loot) + if(prob(probability)) + for(var/amount in 1 to rand(1, destroyed_loot[type_path])) + new type_path(loc) + spawned_any = TRUE + if(!spawned_any) // It wasn't empty so atleast drop something + var/type_path = pick(destroyed_loot) + for(var/amount in 1 to rand(1, destroyed_loot[type_path])) + new type_path(loc) + + return ..() + +/obj/structure/restock_cart/attackby(obj/item/W, mob/user) + if(HAS_TRAIT(W, TRAIT_TOOL_WRENCH)) + if(user.action_busy) + return + playsound(src, 'sound/items/Ratchet.ogg', 25, 1) + user.visible_message(SPAN_NOTICE("[user] starts to deconstruct [src]."), \ + SPAN_NOTICE("You start deconstructing [src].")) + if(!do_after(user, 5 SECONDS, INTERRUPT_ALL|BEHAVIOR_IMMOBILE, BUSY_ICON_BUILD, src)) + return + user.visible_message(SPAN_NOTICE("[user] deconstructs [src]."), \ + SPAN_NOTICE("You deconstruct [src].")) + playsound(src, 'sound/items/Crowbar.ogg', 25, 1) + new /obj/item/stack/sheet/metal(loc) + if(supplies_remaining) + msg_admin_niche("[key_name(user)] deconstructed [src] with [supplies_remaining] [supply_descriptor] remaining in [get_area(src)] [ADMIN_JMP(loc)]", loc.x, loc.y, loc.z) + deconstruct(TRUE) + return + + return ..() + +/obj/structure/restock_cart/proc/healthcheck(mob/user) + if(health <= 0) + if(supplies_remaining && ishuman(user)) + msg_admin_niche("[key_name(user)] destroyed [src] with [supplies_remaining] [supply_descriptor] remaining in [get_area(src)] [ADMIN_JMP(loc)]", loc.x, loc.y, loc.z) + deconstruct(FALSE) + +/obj/structure/restock_cart/bullet_act(obj/projectile/Proj) + health -= Proj.damage + playsound(src, attacked_sound, 25, 1) + healthcheck(Proj.firer) + return TRUE + +/obj/structure/restock_cart/attack_alien(mob/living/carbon/xenomorph/user) + if(unslashable) + return XENO_NO_DELAY_ACTION + user.animation_attack_on(src) + health -= (rand(user.melee_damage_lower, user.melee_damage_upper)) + playsound(src, attacked_sound, 25, 1) + user.visible_message(SPAN_DANGER("[user] slashes [src]!"), \ + SPAN_DANGER("You slash [src]!"), null, 5, CHAT_TYPE_XENO_COMBAT) + healthcheck(user) + return XENO_ATTACK_ACTION + +/obj/structure/restock_cart/ex_act(severity) + if(indestructible) + return + + switch(severity) + if(0 to EXPLOSION_THRESHOLD_LOW) + if(prob(5)) + deconstruct(FALSE) + return + if(EXPLOSION_THRESHOLD_LOW to EXPLOSION_THRESHOLD_MEDIUM) + if(prob(50)) + deconstruct(FALSE) + return + if(EXPLOSION_THRESHOLD_MEDIUM to INFINITY) + deconstruct(FALSE) + return + +//------------SORTED MEDICAL VENDORS------------ /obj/structure/machinery/cm_vending/sorted/medical name = "\improper Wey-Med Plus" - desc = "Medical Pharmaceutical dispenser. Provided by Wey-Yu Pharmaceuticals Division(TM)." + desc = "Medical pharmaceutical dispenser. Provided by Wey-Yu Pharmaceuticals Division(TM)." icon_state = "med" req_access = list(ACCESS_MARINE_MEDBAY) @@ -64,12 +227,18 @@ vendor_theme = VENDOR_THEME_COMPANY vend_delay = 0.5 SECONDS - /// sets vendor to require a medlink to be able to resupply - var/requires_supply_link_port = TRUE + /// Whether the vendor can use a medlink to be able to resupply automatically + var/allow_supply_link_restock = TRUE + /// Whether this vendor supports health scanning the user via mouse drop + var/healthscan = TRUE var/datum/health_scan/last_health_display - var/healthscan = TRUE + /// The starting volume of the chem refill tank + var/chem_refill_volume = 600 + /// The maximum volume of the chem refill tank + var/chem_refill_volume_max = 600 + /// A list of item types that allow reagent refilling var/list/chem_refill = list( /obj/item/reagent_container/hypospray/autoinjector/bicaridine, /obj/item/reagent_container/hypospray/autoinjector/dexalinp, @@ -79,6 +248,7 @@ /obj/item/reagent_container/hypospray/autoinjector/oxycodone, /obj/item/reagent_container/hypospray/autoinjector/tramadol, /obj/item/reagent_container/hypospray/autoinjector/tricord, + /obj/item/reagent_container/hypospray/autoinjector/skillless, /obj/item/reagent_container/hypospray/autoinjector/skillless/tramadol, @@ -95,14 +265,7 @@ /obj/item/reagent_container/glass/bottle/oxycodone, /obj/item/reagent_container/glass/bottle/peridaxon, /obj/item/reagent_container/glass/bottle/tramadol, - ) - var/list/stack_refill = list( - /obj/item/stack/medical/advanced/ointment, - /obj/item/stack/medical/advanced/bruise_pack, - /obj/item/stack/medical/ointment, - /obj/item/stack/medical/bruise_pack, - /obj/item/stack/medical/splint - ) + ) /obj/structure/machinery/cm_vending/sorted/medical/Destroy() QDEL_NULL(last_health_display) @@ -111,7 +274,13 @@ /obj/structure/machinery/cm_vending/sorted/medical/get_examine_text(mob/living/carbon/human/user) . = ..() if(healthscan) - . += SPAN_NOTICE("The [src.name] offers assisted medical scan, for ease of usage with minimal training. Present the target in front of the scanner to scan.") + . += SPAN_NOTICE("[src] offers assisted medical scans, for ease of use with minimal training. Present the target in front of the scanner to scan.") + +/obj/structure/machinery/cm_vending/sorted/medical/ui_data(mob/user) + . = ..() + if(LAZYLEN(chem_refill)) + .["reagents"] = chem_refill_volume + .["reagents_max"] = chem_refill_volume_max /// checks if there is a supply link in our location and we are anchored to it /obj/structure/machinery/cm_vending/sorted/medical/proc/get_supply_link() @@ -122,29 +291,105 @@ return FALSE return TRUE -/obj/structure/machinery/cm_vending/sorted/medical/additional_restock_checks(obj/item/item_to_stock, mob/user) - if(istype(item_to_stock, /obj/item/reagent_container/hypospray/autoinjector) || istype(item_to_stock, /obj/item/reagent_container/glass/bottle)) - if(requires_supply_link_port && !get_supply_link()) - var/obj/item/reagent_container/container = item_to_stock - if(container.reagents.total_volume < container.reagents.maximum_volume) - if(user) - to_chat(user, SPAN_WARNING("[src] makes a buzzing noise as it rejects [container.name]. Looks like this vendor cannot refill these without a connected supply link.")) - playsound(src, 'sound/machines/buzz-sigh.ogg', 15, TRUE) +/obj/structure/machinery/cm_vending/sorted/medical/additional_restock_checks(obj/item/item_to_stock, mob/user, list/vendspec) + var/dynamic_metadata = dynamic_stock_multipliers[vendspec] + if(dynamic_metadata) + if(vendspec[2] >= dynamic_metadata[2] && (!allow_supply_link_restock || !get_supply_link())) + if(!istype(item_to_stock, /obj/item/stack)) + to_chat(user, SPAN_WARNING("[src] is already full of [vendspec[1]]!")) return FALSE + var/obj/item/stack/item_stack = item_to_stock + if(partial_product_stacks[item_to_stock.type] == 0) + to_chat(user, SPAN_WARNING("[src] is already full of [vendspec[1]]!")) + return FALSE // No partial stack to fill + if((partial_product_stacks[item_to_stock.type] + item_stack.amount) > item_stack.max_amount) + to_chat(user, SPAN_WARNING("[src] is already full of [vendspec[1]]!")) + return FALSE // Exceeds partial stack to fill + else + stack_trace("[src] could not find dynamic_stock_multipliers for [vendspec[1]]!") - //stacked items handling if the vendor cannot restock partial stacks - else if(istype(item_to_stock, /obj/item/stack)) - if(requires_supply_link_port && !get_supply_link()) - var/obj/item/stack/restock_stack = item_to_stock - if(restock_stack.amount < restock_stack.max_amount) // if the stack is not full - if(user) - to_chat(user, SPAN_WARNING("[src] makes a buzzing noise as it rejects [restock_stack]. Looks like this vendor cannot restock these without a connected supply link.")) - playsound(src, 'sound/machines/buzz-sigh.ogg', 15, TRUE) + if(istype(item_to_stock, /obj/item/reagent_container)) + if(istype(item_to_stock, /obj/item/reagent_container/syringe) || istype(item_to_stock, /obj/item/reagent_container/dropper)) + var/obj/item/reagent_container/container = item_to_stock + if(container.reagents.total_volume != 0) + to_chat(user, SPAN_WARNING("[item_to_stock] needs to be empty to restock it!")) return FALSE + else + return try_deduct_chem(item_to_stock, user) + return TRUE +/// Attempts to consume our reagents needed for the container (doesn't actually change the container) +/// Will return TRUE if reagents were deducated or no reagents were needed +/obj/structure/machinery/cm_vending/sorted/medical/proc/try_deduct_chem(obj/item/reagent_container/container, mob/user) + var/missing_reagents = container.reagents.maximum_volume - container.reagents.total_volume + if(missing_reagents <= 0) + return TRUE + if(!LAZYLEN(chem_refill) || !(container.type in chem_refill)) + if(container.reagents.total_volume == initial(container.reagents.total_volume)) + return TRUE + to_chat(user, SPAN_WARNING("[src] cannot refill [container].")) + return FALSE + if(chem_refill_volume < missing_reagents) + var/auto_refill = allow_supply_link_restock && get_supply_link() + to_chat(user, SPAN_WARNING("[src] blinks red and makes a buzzing noise as it rejects [container]. Looks like it doesn't have enough reagents [auto_refill ? "yet" : "left"].")) + playsound(src, 'sound/machines/buzz-sigh.ogg', 15, TRUE) + return FALSE + + chem_refill_volume -= missing_reagents + to_chat(user, SPAN_NOTICE("[src] makes a whirring noise as it refills your [container.name].")) + playsound(src, 'sound/effects/refill.ogg', 10, 1, 3) + return TRUE + +/// Performs automatic restocking via medical cart - will set being_restocked true during the action +/obj/structure/machinery/cm_vending/sorted/medical/proc/cart_restock(obj/structure/restock_cart/medical/cart, mob/user) + if(cart.supplies_remaining <= 0) + to_chat(user, SPAN_WARNING("[cart] is empty!")) + return + if(being_restocked) + to_chat(user, SPAN_WARNING("[src] is already being restocked, you will get in the way!")) + return + + var/restocking_reagents = istype(cart, /obj/structure/restock_cart/medical/reagent) + if(restocking_reagents && !LAZYLEN(chem_refill)) + to_chat(user, SPAN_WARNING("[src] doesn't use [cart.supply_descriptor]!")) + return + + user.visible_message(SPAN_NOTICE("[user] starts stocking [cart.supply_descriptor] supplies into [src]."), \ + SPAN_NOTICE("You start stocking [cart.supply_descriptor] into [src].")) + being_restocked = TRUE + + while(cart.supplies_remaining > 0) + if(!do_after(user, 1 SECONDS, INTERRUPT_ALL, BUSY_ICON_GENERIC, src)) + being_restocked = FALSE + user.visible_message(SPAN_NOTICE("[user] stopped stocking [src] with [cart.supply_descriptor]."), \ + SPAN_NOTICE("You stop stocking [src] with [cart.supply_descriptor].")) + return + if(QDELETED(cart) || get_dist(user, cart) > 1) + being_restocked = FALSE + user.visible_message(SPAN_NOTICE("[user] stopped stocking [src] with [cart.supply_descriptor]."), \ + SPAN_NOTICE("You stop stocking [src] with [cart.supply_descriptor].")) + return + + if(restocking_reagents) + var/reagent_added = restock_reagents(min(cart.supplies_remaining, 100)) + if(reagent_added <= 0 || chem_refill_volume == chem_refill_volume_max) + break // All done + cart.supplies_remaining -= reagent_added + else + if(!restock_supplies(prob_to_skip = 0, can_remove = FALSE)) + break // All done + cart.supplies_remaining-- + + being_restocked = FALSE + user.visible_message(SPAN_NOTICE("[user] finishes stocking [src] with [cart.supply_descriptor]."), \ + SPAN_NOTICE("You finish stocking [src] with [cart.supply_descriptor].")) + /obj/structure/machinery/cm_vending/sorted/medical/attackby(obj/item/I, mob/user) - if(stat == WORKING && LAZYLEN(chem_refill) && (istype(I, /obj/item/reagent_container/hypospray/autoinjector) || istype(I, /obj/item/reagent_container/glass/bottle))) // only if we are completely fine and working + if(stat != WORKING) + return ..() + + if(istype(I, /obj/item/reagent_container)) if(!hacked) if(!allowed(user)) to_chat(user, SPAN_WARNING("Access denied.")) @@ -154,54 +399,37 @@ to_chat(user, SPAN_WARNING("This machine isn't for you.")) return - var/obj/item/reagent_container/C = I - if(!(C.type in chem_refill)) - to_chat(user, SPAN_WARNING("[src] cannot refill the [C.name].")) + var/obj/item/reagent_container/container = I + if(istype(I, /obj/item/reagent_container/syringe) || istype(I, /obj/item/reagent_container/dropper)) + if(!stock(container, user)) + return ..() return - if(C.reagents.total_volume == C.reagents.maximum_volume) - to_chat(user, SPAN_WARNING("[src] makes a warning noise. The [C.name] is currently full.")) + if(container.reagents.total_volume == container.reagents.maximum_volume) + if(!stock(container, user)) + return ..() return - if(requires_supply_link_port && !get_supply_link()) - to_chat(user, SPAN_WARNING("[src] makes a buzzing noise as it rejects [C.name]. Looks like this vendor cannot refill these without a connected supply link.")) - playsound(src, 'sound/machines/buzz-sigh.ogg', 15, TRUE) - return + if(!try_deduct_chem(container, user)) + return ..() - to_chat(user, SPAN_NOTICE("[src] makes a whirring noise as it refills your [C.name].")) // Since the reagent is deleted on use it's easier to make a new one instead of snowflake checking - var/obj/item/reagent_container/new_container = new C.type(src) - qdel(C) + var/obj/item/reagent_container/new_container = new container.type(src) + qdel(container) user.put_in_hands(new_container) - else if(stat == WORKING && LAZYLEN(stack_refill) && (istype(I, /obj/item/stack))) - if(!hacked) - if(!allowed(user)) - to_chat(user, SPAN_WARNING("Access denied.")) - return - - if(LAZYLEN(vendor_role) && !vendor_role.Find(user.job)) - to_chat(user, SPAN_WARNING("This machine isn't for you.")) - return - - var/obj/item/stack/S = I - if(!(S.type in stack_refill)) - to_chat(user, SPAN_WARNING("[src] cannot restock the [S.name].")) - return + return - if(S.amount == S.max_amount) - to_chat(user, SPAN_WARNING("[src] makes a warning noise. The [S.name] is currently fully stacked.")) + if(ishuman(user) && istype(I, /obj/item/grab)) + var/obj/item/grab/grabbed = I + if(istype(grabbed.grabbed_thing, /obj/structure/restock_cart/medical)) + cart_restock(grabbed.grabbed_thing, user) return - if(requires_supply_link_port && !get_supply_link()) - to_chat(user, SPAN_WARNING("[src] makes a buzzing noise as it rejects [S.name]. Looks like this vendor cannot restock these without a connected supply link.")) - playsound(src, 'sound/machines/buzz-sigh.ogg', 15, TRUE) + if(hacked || (allowed(user) && (!LAZYLEN(vendor_role) || vendor_role.Find(user.job)))) + if(stock(I, user)) return - to_chat(user, SPAN_NOTICE("[src] makes a whirring noise as it restocks your [S.name].")) - S.amount = S.max_amount - S.update_icon() - else - . = ..() + return ..() /obj/structure/machinery/cm_vending/sorted/medical/MouseDrop(obj/over_object as obj) if(stat == WORKING && over_object == usr && CAN_PICKUP(usr, src)) @@ -211,7 +439,7 @@ return if(!healthscan) - to_chat(user, SPAN_WARNING("\The [src] does not have health scanning function.")) + to_chat(user, SPAN_WARNING("[src] does not have health scanning function.")) return if (!last_health_display) @@ -222,63 +450,182 @@ last_health_display.look_at(user, DETAIL_LEVEL_HEALTHANALYSER, bypass_checks = TRUE) return +/obj/structure/machinery/cm_vending/sorted/medical/MouseDrop_T(atom/movable/A, mob/user) + if(inoperable()) + return + if(user.stat || user.is_mob_restrained()) + return + if(get_dist(user, src) > 1 || get_dist(user, A) > 1) // More lenient + return + if(!ishuman(user)) + return + + if(istype(A, /obj/structure/restock_cart/medical)) + cart_restock(A, user) + return + + return ..() + /obj/structure/machinery/cm_vending/sorted/medical/populate_product_list(scale) listed_products = list( list("FIELD SUPPLIES", -1, null, null), - list("Burn Kit", round(scale * 6), /obj/item/stack/medical/advanced/ointment, VENDOR_ITEM_REGULAR), - list("Trauma Kit", round(scale * 6), /obj/item/stack/medical/advanced/bruise_pack, VENDOR_ITEM_REGULAR), - list("Ointment", round(scale * 6), /obj/item/stack/medical/ointment, VENDOR_ITEM_REGULAR), - list("Roll of Gauze", round(scale * 6), /obj/item/stack/medical/bruise_pack, VENDOR_ITEM_REGULAR), - list("Splints", round(scale * 6), /obj/item/stack/medical/splint, VENDOR_ITEM_REGULAR), + list("Burn Kit", floor(scale * 10), /obj/item/stack/medical/advanced/ointment, VENDOR_ITEM_REGULAR), + list("Trauma Kit", floor(scale * 10), /obj/item/stack/medical/advanced/bruise_pack, VENDOR_ITEM_REGULAR), + list("Ointment", floor(scale * 10), /obj/item/stack/medical/ointment, VENDOR_ITEM_REGULAR), + list("Roll of Gauze", floor(scale * 10), /obj/item/stack/medical/bruise_pack, VENDOR_ITEM_REGULAR), + list("Splints", floor(scale * 10), /obj/item/stack/medical/splint, VENDOR_ITEM_REGULAR), list("AUTOINJECTORS", -1, null, null), - list("Autoinjector (Bicaridine)", round(scale * 3), /obj/item/reagent_container/hypospray/autoinjector/bicaridine, VENDOR_ITEM_REGULAR), - list("Autoinjector (Dexalin+)", round(scale * 3), /obj/item/reagent_container/hypospray/autoinjector/dexalinp, VENDOR_ITEM_REGULAR), - list("Autoinjector (Epinephrine)", round(scale * 3), /obj/item/reagent_container/hypospray/autoinjector/adrenaline, VENDOR_ITEM_REGULAR), - list("Autoinjector (Inaprovaline)", round(scale * 3), /obj/item/reagent_container/hypospray/autoinjector/inaprovaline, VENDOR_ITEM_REGULAR), - list("Autoinjector (Kelotane)", round(scale * 3), /obj/item/reagent_container/hypospray/autoinjector/kelotane, VENDOR_ITEM_REGULAR), - list("Autoinjector (Oxycodone)", round(scale * 3), /obj/item/reagent_container/hypospray/autoinjector/oxycodone, VENDOR_ITEM_REGULAR), - list("Autoinjector (Tramadol)", round(scale * 3), /obj/item/reagent_container/hypospray/autoinjector/tramadol, VENDOR_ITEM_REGULAR), - list("Autoinjector (Tricord)", round(scale * 3), /obj/item/reagent_container/hypospray/autoinjector/tricord, VENDOR_ITEM_REGULAR), + list("Autoinjector (Bicaridine)", floor(scale * 5), /obj/item/reagent_container/hypospray/autoinjector/bicaridine, VENDOR_ITEM_REGULAR), + list("Autoinjector (Dexalin+)", floor(scale * 5), /obj/item/reagent_container/hypospray/autoinjector/dexalinp, VENDOR_ITEM_REGULAR), + list("Autoinjector (Epinephrine)", floor(scale * 5), /obj/item/reagent_container/hypospray/autoinjector/adrenaline, VENDOR_ITEM_REGULAR), + list("Autoinjector (Inaprovaline)", floor(scale * 5), /obj/item/reagent_container/hypospray/autoinjector/inaprovaline, VENDOR_ITEM_REGULAR), + list("Autoinjector (Kelotane)", floor(scale * 5), /obj/item/reagent_container/hypospray/autoinjector/kelotane, VENDOR_ITEM_REGULAR), + list("Autoinjector (Oxycodone)", floor(scale * 5), /obj/item/reagent_container/hypospray/autoinjector/oxycodone, VENDOR_ITEM_REGULAR), + list("Autoinjector (Tramadol)", floor(scale * 5), /obj/item/reagent_container/hypospray/autoinjector/tramadol, VENDOR_ITEM_REGULAR), + list("Autoinjector (Tricord)", floor(scale * 5), /obj/item/reagent_container/hypospray/autoinjector/tricord, VENDOR_ITEM_REGULAR), list("LIQUID BOTTLES", -1, null, null), - list("Bottle (Bicaridine)", round(scale * 4), /obj/item/reagent_container/glass/bottle/bicaridine, VENDOR_ITEM_REGULAR), - list("Bottle (Dylovene)", round(scale * 4), /obj/item/reagent_container/glass/bottle/antitoxin, VENDOR_ITEM_REGULAR), - list("Bottle (Dexalin)", round(scale * 4), /obj/item/reagent_container/glass/bottle/dexalin, VENDOR_ITEM_REGULAR), - list("Bottle (Inaprovaline)", round(scale * 4), /obj/item/reagent_container/glass/bottle/inaprovaline, VENDOR_ITEM_REGULAR), - list("Bottle (Kelotane)", round(scale * 4), /obj/item/reagent_container/glass/bottle/kelotane, VENDOR_ITEM_REGULAR), - list("Bottle (Oxycodone)", round(scale * 4), /obj/item/reagent_container/glass/bottle/oxycodone, VENDOR_ITEM_REGULAR), - list("Bottle (Peridaxon)", round(scale * 4), /obj/item/reagent_container/glass/bottle/peridaxon, VENDOR_ITEM_REGULAR), - list("Bottle (Tramadol)", round(scale * 4), /obj/item/reagent_container/glass/bottle/tramadol, VENDOR_ITEM_REGULAR), + list("Bottle (Bicaridine)", floor(scale * 3), /obj/item/reagent_container/glass/bottle/bicaridine, VENDOR_ITEM_REGULAR), + list("Bottle (Dylovene)", floor(scale * 3), /obj/item/reagent_container/glass/bottle/antitoxin, VENDOR_ITEM_REGULAR), + list("Bottle (Dexalin)", floor(scale * 3), /obj/item/reagent_container/glass/bottle/dexalin, VENDOR_ITEM_REGULAR), + list("Bottle (Inaprovaline)", floor(scale * 3), /obj/item/reagent_container/glass/bottle/inaprovaline, VENDOR_ITEM_REGULAR), + list("Bottle (Kelotane)", floor(scale * 3), /obj/item/reagent_container/glass/bottle/kelotane, VENDOR_ITEM_REGULAR), + list("Bottle (Oxycodone)", floor(scale * 3), /obj/item/reagent_container/glass/bottle/oxycodone, VENDOR_ITEM_REGULAR), + list("Bottle (Peridaxon)", floor(scale * 3), /obj/item/reagent_container/glass/bottle/peridaxon, VENDOR_ITEM_REGULAR), + list("Bottle (Tramadol)", floor(scale * 3), /obj/item/reagent_container/glass/bottle/tramadol, VENDOR_ITEM_REGULAR), list("PILL BOTTLES", -1, null, null), - list("Pill Bottle (Bicaridine)", round(scale * 2), /obj/item/storage/pill_bottle/bicaridine, VENDOR_ITEM_REGULAR), - list("Pill Bottle (Dexalin)", round(scale * 2), /obj/item/storage/pill_bottle/dexalin, VENDOR_ITEM_REGULAR), - list("Pill Bottle (Dylovene)", round(scale * 2), /obj/item/storage/pill_bottle/antitox, VENDOR_ITEM_REGULAR), - list("Pill Bottle (Inaprovaline)", round(scale * 2), /obj/item/storage/pill_bottle/inaprovaline, VENDOR_ITEM_REGULAR), - list("Pill Bottle (Kelotane)", round(scale * 2), /obj/item/storage/pill_bottle/kelotane, VENDOR_ITEM_REGULAR), - list("Pill Bottle (Peridaxon)", round(scale * 1), /obj/item/storage/pill_bottle/peridaxon, VENDOR_ITEM_REGULAR), - list("Pill Bottle (Tramadol)", round(scale * 2), /obj/item/storage/pill_bottle/tramadol, VENDOR_ITEM_REGULAR), + list("Pill Bottle (Bicaridine)", floor(scale * 4), /obj/item/storage/pill_bottle/bicaridine, VENDOR_ITEM_REGULAR), + list("Pill Bottle (Dexalin)", floor(scale * 4), /obj/item/storage/pill_bottle/dexalin, VENDOR_ITEM_REGULAR), + list("Pill Bottle (Dylovene)", floor(scale * 4), /obj/item/storage/pill_bottle/antitox, VENDOR_ITEM_REGULAR), + list("Pill Bottle (Inaprovaline)", floor(scale * 4), /obj/item/storage/pill_bottle/inaprovaline, VENDOR_ITEM_REGULAR), + list("Pill Bottle (Kelotane)", floor(scale * 4), /obj/item/storage/pill_bottle/kelotane, VENDOR_ITEM_REGULAR), + list("Pill Bottle (Peridaxon)", floor(scale * 3), /obj/item/storage/pill_bottle/peridaxon, VENDOR_ITEM_REGULAR), + list("Pill Bottle (Tramadol)", floor(scale * 4), /obj/item/storage/pill_bottle/tramadol, VENDOR_ITEM_REGULAR), list("MEDICAL UTILITIES", -1, null, null), - list("Emergency Defibrillator", round(scale * 3), /obj/item/device/defibrillator, VENDOR_ITEM_REGULAR), - list("Surgical Line", round(scale * 2), /obj/item/tool/surgery/surgical_line, VENDOR_ITEM_REGULAR), - list("Synth-Graft", round(scale * 2), /obj/item/tool/surgery/synthgraft, VENDOR_ITEM_REGULAR), - list("Hypospray", round(scale * 2), /obj/item/reagent_container/hypospray/tricordrazine, VENDOR_ITEM_REGULAR), - list("Health Analyzer", round(scale * 5), /obj/item/device/healthanalyzer, VENDOR_ITEM_REGULAR), - list("M276 Pattern Medical Storage Rig", round(scale * 2), /obj/item/storage/belt/medical, VENDOR_ITEM_REGULAR), - list("Medical HUD Glasses", round(scale * 3), /obj/item/clothing/glasses/hud/health, VENDOR_ITEM_REGULAR), - list("Stasis Bag", round(scale * 2), /obj/item/bodybag/cryobag, VENDOR_ITEM_REGULAR), - list("Syringe", round(scale * 7), /obj/item/reagent_container/syringe, VENDOR_ITEM_REGULAR) + list("Emergency Defibrillator", floor(scale * 3), /obj/item/device/defibrillator, VENDOR_ITEM_REGULAR), + list("Surgical Line", floor(scale * 2), /obj/item/tool/surgery/surgical_line, VENDOR_ITEM_REGULAR), + list("Synth-Graft", floor(scale * 2), /obj/item/tool/surgery/synthgraft, VENDOR_ITEM_REGULAR), + list("Hypospray", floor(scale * 3), /obj/item/reagent_container/hypospray/tricordrazine, VENDOR_ITEM_REGULAR), + list("Health Analyzer", floor(scale * 5), /obj/item/device/healthanalyzer, VENDOR_ITEM_REGULAR), + list("M276 Pattern Medical Storage Rig", floor(scale * 2), /obj/item/storage/belt/medical, VENDOR_ITEM_REGULAR), + list("Medical HUD Glasses", floor(scale * 3), /obj/item/clothing/glasses/hud/health, VENDOR_ITEM_REGULAR), + list("Stasis Bag", floor(scale * 3), /obj/item/bodybag/cryobag, VENDOR_ITEM_REGULAR), + list("Syringe", floor(scale * 7), /obj/item/reagent_container/syringe, VENDOR_ITEM_REGULAR) ) +/obj/structure/machinery/cm_vending/sorted/medical/populate_product_list_and_boxes(scale) + . = ..() + + // If this is groundside and isn't dynamically changing we will spawn with stock randomly removed from it + if(vend_flags & VEND_STOCK_DYNAMIC) + return + if(Check_WO()) + return + var/turf/location = get_turf(src) + if(location && is_ground_level(location.z)) + random_unstock() + +/obj/structure/machinery/cm_vending/sorted/medical/Initialize() + . = ..() + + // If this is a medlinked vendor (that needs a link) and isn't dynamically changing it will periodically restock itself + if(vend_flags & VEND_STOCK_DYNAMIC) + return + if(!allow_supply_link_restock) + return + if(!get_supply_link()) + return + START_PROCESSING(SSslowobj, src) + +/obj/structure/machinery/cm_vending/sorted/medical/toggle_anchored(obj/item/W, mob/user) + . = ..() + + // If the anchor state changed, this is a vendor that needs a link, and isn't dynamically changing, update whether we automatically restock + if(. && !(vend_flags & VEND_STOCK_DYNAMIC) && allow_supply_link_restock) + if(get_supply_link()) + START_PROCESSING(SSslowobj, src) + else + STOP_PROCESSING(SSslowobj, src) + +/obj/structure/machinery/cm_vending/sorted/medical/process() + if(!get_supply_link()) + STOP_PROCESSING(SSslowobj, src) + return // Somehow we lost our link + if(inoperable()) + return + if(world.time - SSticker.mode.round_time_lobby > 20 MINUTES) + restock_supplies() + restock_reagents() + +/// Randomly (based on prob_to_skip) adjusts all amounts of listed_products towards their desired values by 1 +/// Returns the quantity of items added +/obj/structure/machinery/cm_vending/sorted/medical/proc/restock_supplies(prob_to_skip = 80, can_remove = TRUE) + . = 0 + for(var/list/vendspec as anything in listed_products) + if(vendspec[2] < 0) + continue // It's a section title, not an actual entry + var/dynamic_metadata = dynamic_stock_multipliers[vendspec] + if(!dynamic_metadata) + stack_trace("[src] could not find dynamic_stock_multipliers for [vendspec[1]]!") + continue + var/cur_type = vendspec[3] + if(vendspec[2] == dynamic_metadata[2]) + if((cur_type in partial_product_stacks) && partial_product_stacks[cur_type] > 0) + partial_product_stacks[cur_type] = 0 + .++ + continue // Already at desired value + if(vendspec[2] > dynamic_metadata[2]) + if(can_remove) + vendspec[2]-- + if(cur_type in partial_product_stacks) + partial_product_stacks[cur_type] = 0 + if(vend_flags & VEND_LOAD_AMMO_BOXES) + update_derived_ammo_and_boxes(vendspec) + continue // Returned some items to the void + if(prob(prob_to_skip)) + continue // 20% chance to restock per entry by default + vendspec[2]++ + if(vend_flags & VEND_LOAD_AMMO_BOXES) + update_derived_ammo_and_boxes_on_add(vendspec) + .++ + +/// Refills reagents towards chem_refill_volume_max +/// Returns the quantity of reagents added +/obj/structure/machinery/cm_vending/sorted/medical/proc/restock_reagents(additional_volume = 125) + var/old_value = chem_refill_volume + chem_refill_volume = min(chem_refill_volume + additional_volume, chem_refill_volume_max) + return chem_refill_volume - old_value + +/// Randomly removes amounts of listed_products and reagents +/obj/structure/machinery/cm_vending/sorted/medical/proc/random_unstock() + // Random interval of 25 for reagents + chem_refill_volume = rand(0, chem_refill_volume_max * 0.04) * 25 + + for(var/list/vendspec as anything in listed_products) + var/amount = vendspec[2] + if(amount <= 0) + continue + + // Chance to just be empty + if(prob(25)) + vendspec[2] = 0 + continue + + // Otherwise its some amount between 1 and the original amount + vendspec[2] = rand(1, amount) + /obj/structure/machinery/cm_vending/sorted/medical/chemistry name = "\improper Wey-Chem Plus" desc = "Medical chemistry dispenser. Provided by Wey-Yu Pharmaceuticals Division(TM)." icon_state = "chem" req_access = list(ACCESS_MARINE_CHEMISTRY) - healthscan = FALSE + + chem_refill_volume = 1200 + chem_refill_volume_max = 1200 chem_refill = list( /obj/item/reagent_container/glass/bottle/bicaridine, /obj/item/reagent_container/glass/bottle/antitoxin, @@ -289,26 +636,25 @@ /obj/item/reagent_container/glass/bottle/peridaxon, /obj/item/reagent_container/glass/bottle/tramadol, ) - stack_refill = null /obj/structure/machinery/cm_vending/sorted/medical/chemistry/populate_product_list(scale) listed_products = list( list("LIQUID BOTTLES", -1, null, null), - list("Bicaridine Bottle", round(scale * 5), /obj/item/reagent_container/glass/bottle/bicaridine, VENDOR_ITEM_REGULAR), - list("Dylovene Bottle", round(scale * 5), /obj/item/reagent_container/glass/bottle/antitoxin, VENDOR_ITEM_REGULAR), - list("Dexalin Bottle", round(scale * 5), /obj/item/reagent_container/glass/bottle/dexalin, VENDOR_ITEM_REGULAR), - list("Inaprovaline Bottle", round(scale * 5), /obj/item/reagent_container/glass/bottle/inaprovaline, VENDOR_ITEM_REGULAR), - list("Kelotane Bottle", round(scale * 5), /obj/item/reagent_container/glass/bottle/kelotane, VENDOR_ITEM_REGULAR), - list("Oxycodone Bottle", round(scale * 5), /obj/item/reagent_container/glass/bottle/oxycodone, VENDOR_ITEM_REGULAR), - list("Peridaxon Bottle", round(scale * 5), /obj/item/reagent_container/glass/bottle/peridaxon, VENDOR_ITEM_REGULAR), - list("Tramadol Bottle", round(scale * 5), /obj/item/reagent_container/glass/bottle/tramadol, VENDOR_ITEM_REGULAR), + list("Bicaridine Bottle", floor(scale * 6), /obj/item/reagent_container/glass/bottle/bicaridine, VENDOR_ITEM_REGULAR), + list("Dylovene Bottle", floor(scale * 6), /obj/item/reagent_container/glass/bottle/antitoxin, VENDOR_ITEM_REGULAR), + list("Dexalin Bottle", floor(scale * 6), /obj/item/reagent_container/glass/bottle/dexalin, VENDOR_ITEM_REGULAR), + list("Inaprovaline Bottle", floor(scale * 6), /obj/item/reagent_container/glass/bottle/inaprovaline, VENDOR_ITEM_REGULAR), + list("Kelotane Bottle", floor(scale * 6), /obj/item/reagent_container/glass/bottle/kelotane, VENDOR_ITEM_REGULAR), + list("Oxycodone Bottle", floor(scale * 6), /obj/item/reagent_container/glass/bottle/oxycodone, VENDOR_ITEM_REGULAR), + list("Peridaxon Bottle", floor(scale * 6), /obj/item/reagent_container/glass/bottle/peridaxon, VENDOR_ITEM_REGULAR), + list("Tramadol Bottle", floor(scale * 6), /obj/item/reagent_container/glass/bottle/tramadol, VENDOR_ITEM_REGULAR), list("MISCELLANEOUS", -1, null, null), - list("Beaker (60 Units)", round(scale * 3), /obj/item/reagent_container/glass/beaker, VENDOR_ITEM_REGULAR), - list("Beaker, Large (120 Units)", round(scale * 3), /obj/item/reagent_container/glass/beaker/large, VENDOR_ITEM_REGULAR), - list("Box of Pill Bottles", round(scale * 2), /obj/item/storage/box/pillbottles, VENDOR_ITEM_REGULAR), - list("Dropper", round(scale * 3), /obj/item/reagent_container/dropper, VENDOR_ITEM_REGULAR), - list("Syringe", round(scale * 7), /obj/item/reagent_container/syringe, VENDOR_ITEM_REGULAR) + list("Beaker (60 Units)", floor(scale * 3), /obj/item/reagent_container/glass/beaker, VENDOR_ITEM_REGULAR), + list("Beaker, Large (120 Units)", floor(scale * 3), /obj/item/reagent_container/glass/beaker/large, VENDOR_ITEM_REGULAR), + list("Box of Pill Bottles", floor(scale * 2), /obj/item/storage/box/pillbottles, VENDOR_ITEM_REGULAR), + list("Dropper", floor(scale * 3), /obj/item/reagent_container/dropper, VENDOR_ITEM_REGULAR), + list("Syringe", floor(scale * 7), /obj/item/reagent_container/syringe, VENDOR_ITEM_REGULAR) ) /obj/structure/machinery/cm_vending/sorted/medical/no_access @@ -324,13 +670,13 @@ name = "\improper Medical Equipment Vendor" desc = "A vending machine dispensing various pieces of medical equipment." req_one_access = list(ACCESS_ILLEGAL_PIRATE, ACCESS_UPP_GENERAL, ACCESS_CLF_GENERAL) - requires_supply_link_port = FALSE req_access = null vendor_theme = VENDOR_THEME_CLF + allow_supply_link_restock = FALSE /obj/structure/machinery/cm_vending/sorted/medical/marinemed name = "\improper ColMarTech MarineMed" - desc = "Medical Pharmaceutical dispenser with basic medical supplies for marines." + desc = "Medical pharmaceutical dispenser with basic medical supplies for marines." icon_state = "marinemed" req_access = list() req_one_access = list() @@ -340,97 +686,92 @@ /obj/item/reagent_container/hypospray/autoinjector/skillless, /obj/item/reagent_container/hypospray/autoinjector/skillless/tramadol, ) - stack_refill = list( - /obj/item/stack/medical/ointment, - /obj/item/stack/medical/bruise_pack, - /obj/item/stack/medical/splint, - ) /obj/structure/machinery/cm_vending/sorted/medical/marinemed/populate_product_list(scale) listed_products = list( list("AUTOINJECTORS", -1, null, null), - list("First-Aid Autoinjector", round(scale * 5), /obj/item/reagent_container/hypospray/autoinjector/skillless, VENDOR_ITEM_REGULAR), - list("Pain-Stop Autoinjector", round(scale * 5), /obj/item/reagent_container/hypospray/autoinjector/skillless/tramadol, VENDOR_ITEM_REGULAR), + list("First-Aid Autoinjector", floor(scale * 5), /obj/item/reagent_container/hypospray/autoinjector/skillless, VENDOR_ITEM_REGULAR), + list("Pain-Stop Autoinjector", floor(scale * 5), /obj/item/reagent_container/hypospray/autoinjector/skillless/tramadol, VENDOR_ITEM_REGULAR), list("DEVICES", -1, null, null), - list("Health Analyzer", round(scale * 3), /obj/item/device/healthanalyzer, VENDOR_ITEM_REGULAR), + list("Health Analyzer", floor(scale * 3), /obj/item/device/healthanalyzer, VENDOR_ITEM_REGULAR), list("FIELD SUPPLIES", -1, null, null), list("Fire Extinguisher (portable)", 5, /obj/item/tool/extinguisher/mini, VENDOR_ITEM_REGULAR), - list("Ointment", round(scale * 7), /obj/item/stack/medical/ointment, VENDOR_ITEM_REGULAR), - list("Roll of Gauze", round(scale * 7), /obj/item/stack/medical/bruise_pack, VENDOR_ITEM_REGULAR), - list("Splints", round(scale * 7), /obj/item/stack/medical/splint, VENDOR_ITEM_REGULAR) + list("Ointment", floor(scale * 8), /obj/item/stack/medical/ointment, VENDOR_ITEM_REGULAR), + list("Roll of Gauze", floor(scale * 8), /obj/item/stack/medical/bruise_pack, VENDOR_ITEM_REGULAR), + list("Splints", floor(scale * 8), /obj/item/stack/medical/splint, VENDOR_ITEM_REGULAR) ) /obj/structure/machinery/cm_vending/sorted/medical/marinemed/antag name = "\improper Basic Medical Supplies Vendor" desc = "A vending machine dispensing basic medical supplies." req_one_access = list(ACCESS_ILLEGAL_PIRATE, ACCESS_UPP_GENERAL, ACCESS_CLF_GENERAL) - requires_supply_link_port = FALSE req_access = null vendor_theme = VENDOR_THEME_CLF + allow_supply_link_restock = FALSE /obj/structure/machinery/cm_vending/sorted/medical/blood name = "\improper MM Blood Dispenser" - desc = "The Marine Med Brand Blood Pack Dispensary is the premier, top-of-the-line blood dispenser of 2105! Get yours today!" //Don't update this year, the joke is it's old. + desc = "The MarineMed brand blood dispensary is the premier, top-of-the-line blood dispenser of 2105! Get yours today!" //Don't update this year, the joke is it's old. icon_state = "blood" wrenchable = TRUE hackable = TRUE - - listed_products = list( - list("BLOOD PACKS", -1, null, null), - list("A+ Blood Pack", 5, /obj/item/reagent_container/blood/APlus, VENDOR_ITEM_REGULAR), - list("A- Blood Pack", 5, /obj/item/reagent_container/blood/AMinus, VENDOR_ITEM_REGULAR), - list("B+ Blood Pack", 5, /obj/item/reagent_container/blood/BPlus, VENDOR_ITEM_REGULAR), - list("B- Blood Pack", 5, /obj/item/reagent_container/blood/BMinus, VENDOR_ITEM_REGULAR), - list("O+ Blood Pack", 5, /obj/item/reagent_container/blood/OPlus, VENDOR_ITEM_REGULAR), - list("O- Blood Pack", 5, /obj/item/reagent_container/blood/OMinus, VENDOR_ITEM_REGULAR), - - list("MISCELLANEOUS", -1, null, null), - list("Empty Blood Pack", 5, /obj/item/reagent_container/blood, VENDOR_ITEM_REGULAR) - ) - healthscan = FALSE + allow_supply_link_restock = FALSE chem_refill = null - stack_refill = null /obj/structure/machinery/cm_vending/sorted/medical/blood/bolted wrenchable = FALSE /obj/structure/machinery/cm_vending/sorted/medical/blood/populate_product_list(scale) - return + listed_products = list( + list("BLOOD PACKS", -1, null, null), + list("A+ Blood Pack", floor(scale * 5), /obj/item/reagent_container/blood/APlus, VENDOR_ITEM_REGULAR), + list("A- Blood Pack", floor(scale * 5), /obj/item/reagent_container/blood/AMinus, VENDOR_ITEM_REGULAR), + list("B+ Blood Pack", floor(scale * 5), /obj/item/reagent_container/blood/BPlus, VENDOR_ITEM_REGULAR), + list("B- Blood Pack", floor(scale * 5), /obj/item/reagent_container/blood/BMinus, VENDOR_ITEM_REGULAR), + list("O+ Blood Pack", floor(scale * 5), /obj/item/reagent_container/blood/OPlus, VENDOR_ITEM_REGULAR), + list("O- Blood Pack", floor(scale * 5), /obj/item/reagent_container/blood/OMinus, VENDOR_ITEM_REGULAR), + + list("MISCELLANEOUS", -1, null, null), + list("Empty Blood Pack", floor(scale * 5), /obj/item/reagent_container/blood, VENDOR_ITEM_REGULAR) + ) /obj/structure/machinery/cm_vending/sorted/medical/blood/antag req_one_access = list(ACCESS_ILLEGAL_PIRATE, ACCESS_UPP_GENERAL, ACCESS_CLF_GENERAL) - requires_supply_link_port = FALSE req_access = null vendor_theme = VENDOR_THEME_CLF + allow_supply_link_restock = FALSE + + +//------------WALL MED VENDORS------------ /obj/structure/machinery/cm_vending/sorted/medical/wall_med name = "\improper NanoMed" - desc = "Wall-mounted Medical Equipment Dispenser." + desc = "A wall-mounted medical equipment dispenser." icon_state = "wallmed" - vend_delay = 0.7 SECONDS - requires_supply_link_port = FALSE - + appearance_flags = TILE_BOUND req_access = list() - density = FALSE wrenchable = FALSE + vend_delay = 0.7 SECONDS + allow_supply_link_restock = FALSE + listed_products = list( list("SUPPLIES", -1, null, null), - list("First-Aid Autoinjector", 1, /obj/item/reagent_container/hypospray/autoinjector/skillless, VENDOR_ITEM_REGULAR), - list("Pain-Stop Autoinjector", 1, /obj/item/reagent_container/hypospray/autoinjector/skillless/tramadol, VENDOR_ITEM_REGULAR), - list("Roll Of Gauze", 2, /obj/item/stack/medical/bruise_pack, VENDOR_ITEM_REGULAR), - list("Ointment", 2, /obj/item/stack/medical/ointment, VENDOR_ITEM_REGULAR), - list("Medical Splints", 1, /obj/item/stack/medical/splint, VENDOR_ITEM_REGULAR), + list("First-Aid Autoinjector", 2, /obj/item/reagent_container/hypospray/autoinjector/skillless, VENDOR_ITEM_REGULAR), + list("Pain-Stop Autoinjector", 2, /obj/item/reagent_container/hypospray/autoinjector/skillless/tramadol, VENDOR_ITEM_REGULAR), + list("Roll Of Gauze", 4, /obj/item/stack/medical/bruise_pack, VENDOR_ITEM_REGULAR), + list("Ointment", 4, /obj/item/stack/medical/ointment, VENDOR_ITEM_REGULAR), + list("Medical Splints", 4, /obj/item/stack/medical/splint, VENDOR_ITEM_REGULAR), list("UTILITY", -1, null, null), - list("HF2 Health Analyzer", 1, /obj/item/device/healthanalyzer, VENDOR_ITEM_REGULAR) + list("HF2 Health Analyzer", 2, /obj/item/device/healthanalyzer, VENDOR_ITEM_REGULAR) ) - appearance_flags = TILE_BOUND - + chem_refill_volume = 250 + chem_refill_volume_max = 250 chem_refill = list( /obj/item/reagent_container/hypospray/autoinjector/skillless, /obj/item/reagent_container/hypospray/autoinjector/skillless/tramadol, @@ -439,29 +780,27 @@ /obj/item/reagent_container/hypospray/autoinjector/kelotane/skillless, /obj/item/reagent_container/hypospray/autoinjector/tramadol/skillless, ) - stack_refill = list( - /obj/item/stack/medical/bruise_pack, - /obj/item/stack/medical/splint, - /obj/item/stack/medical/ointment, - ) /obj/structure/machinery/cm_vending/sorted/medical/wall_med/limited - desc = "Wall-mounted Medical Equipment Dispenser. This version is more limited than standard USCM NanoMeds." + desc = "A wall-mounted medical equipment dispenser. This version is more limited than standard USCM NanoMeds." + chem_refill_volume = 150 + chem_refill_volume_max = 150 chem_refill = list( /obj/item/reagent_container/hypospray/autoinjector/skillless, /obj/item/reagent_container/hypospray/autoinjector/skillless/tramadol, ) - stack_refill = list( - /obj/item/stack/medical/bruise_pack, - /obj/item/stack/medical/ointment, - ) /obj/structure/machinery/cm_vending/sorted/medical/wall_med/lifeboat name = "Lifeboat Medical Cabinet" icon = 'icons/obj/structures/machinery/lifeboat.dmi' icon_state = "medcab" desc = "A wall-mounted cabinet containing medical supplies vital to survival. While better equipped, it can only refill basic supplies." + unacidable = TRUE + unslashable = TRUE + wrenchable = FALSE + hackable = FALSE + listed_products = list( list("AUTOINJECTORS", -1, null, null), list("First-Aid Autoinjector", 8, /obj/item/reagent_container/hypospray/autoinjector/skillless, VENDOR_ITEM_REGULAR), @@ -477,16 +816,9 @@ list("Roll of Gauze", 8, /obj/item/stack/medical/bruise_pack, VENDOR_ITEM_REGULAR), list("Splints", 8, /obj/item/stack/medical/splint, VENDOR_ITEM_REGULAR) ) - stack_refill = list( - /obj/item/stack/medical/ointment, - /obj/item/stack/medical/bruise_pack, - /obj/item/stack/medical/splint, - ) - unacidable = TRUE - unslashable = TRUE - wrenchable = FALSE - hackable = FALSE + chem_refill_volume = 500 + chem_refill_volume_max = 500 /obj/structure/machinery/cm_vending/sorted/medical/wall_med/populate_product_list(scale) return @@ -494,18 +826,19 @@ /obj/structure/machinery/cm_vending/sorted/medical/wall_med/souto name = "\improper SoutoMed" desc = "In Soutoland (Trademark pending), one is never more than 6ft away from canned Havana goodness. Drink a Souto today! For a full selection of Souto products please visit a licensed retailer or vending machine. Also doubles as basic first aid station." - icon_state = "soutomed" icon = 'icons/obj/structures/souto_land.dmi' + icon_state = "soutomed" + listed_products = list( list("FIRST AID SUPPLIES", -1, null, null), - list("First-Aid Autoinjector", 1, /obj/item/reagent_container/hypospray/autoinjector/skillless, VENDOR_ITEM_REGULAR), - list("Pain-Stop Autoinjector", 1, /obj/item/reagent_container/hypospray/autoinjector/skillless/tramadol, VENDOR_ITEM_REGULAR), - list("Roll Of Gauze", 2, /obj/item/stack/medical/bruise_pack, VENDOR_ITEM_REGULAR), - list("Ointment", 2, /obj/item/stack/medical/ointment, VENDOR_ITEM_REGULAR), - list("Medical Splints", 1, /obj/item/stack/medical/splint, VENDOR_ITEM_REGULAR), + list("First-Aid Autoinjector", 2, /obj/item/reagent_container/hypospray/autoinjector/skillless, VENDOR_ITEM_REGULAR), + list("Pain-Stop Autoinjector", 2, /obj/item/reagent_container/hypospray/autoinjector/skillless/tramadol, VENDOR_ITEM_REGULAR), + list("Roll Of Gauze", 4, /obj/item/stack/medical/bruise_pack, VENDOR_ITEM_REGULAR), + list("Ointment", 4, /obj/item/stack/medical/ointment, VENDOR_ITEM_REGULAR), + list("Medical Splints", 4, /obj/item/stack/medical/splint, VENDOR_ITEM_REGULAR), list("UTILITY", -1, null, null), - list("HF2 Health Analyzer", 1, /obj/item/device/healthanalyzer, VENDOR_ITEM_REGULAR), + list("HF2 Health Analyzer", 2, /obj/item/device/healthanalyzer, VENDOR_ITEM_REGULAR), list("SOUTO", -1, null, null), list("Souto Classic", 1, /obj/item/reagent_container/food/drinks/cans/souto/classic, VENDOR_ITEM_REGULAR), diff --git a/code/game/machinery/vending/vendor_types/requisitions.dm b/code/game/machinery/vending/vendor_types/requisitions.dm index 6eb5a333ec81..f76b86228c61 100644 --- a/code/game/machinery/vending/vendor_types/requisitions.dm +++ b/code/game/machinery/vending/vendor_types/requisitions.dm @@ -19,126 +19,126 @@ /obj/structure/machinery/cm_vending/sorted/cargo_guns/populate_product_list(scale) listed_products = list( list("PRIMARY FIREARMS", -1, null, null), - list("M37A2 Pump Shotgun", round(scale * 30), /obj/item/weapon/gun/shotgun/pump, VENDOR_ITEM_REGULAR), - list("M39 Submachinegun", round(scale * 60), /obj/item/weapon/gun/smg/m39, VENDOR_ITEM_REGULAR), - list("M41A Pulse Rifle MK2", round(scale * 60), /obj/item/weapon/gun/rifle/m41a, VENDOR_ITEM_REGULAR), - list("M4RA Battle Rifle", round(scale * 20), /obj/item/weapon/gun/rifle/m4ra, VENDOR_ITEM_REGULAR), + list("M37A2 Pump Shotgun", floor(scale * 30), /obj/item/weapon/gun/shotgun/pump, VENDOR_ITEM_REGULAR), + list("M39 Submachinegun", floor(scale * 60), /obj/item/weapon/gun/smg/m39, VENDOR_ITEM_REGULAR), + list("M41A Pulse Rifle MK2", floor(scale * 60), /obj/item/weapon/gun/rifle/m41a, VENDOR_ITEM_REGULAR), + list("M4RA Battle Rifle", floor(scale * 20), /obj/item/weapon/gun/rifle/m4ra, VENDOR_ITEM_REGULAR), list("SIDEARMS", -1, null, null), - list("88 Mod 4 Combat Pistol", round(scale * 50), /obj/item/weapon/gun/pistol/mod88, VENDOR_ITEM_REGULAR), - list("M44 Combat Revolver", round(scale * 50), /obj/item/weapon/gun/revolver/m44, VENDOR_ITEM_REGULAR), - list("M4A3 Service Pistol", round(scale * 50), /obj/item/weapon/gun/pistol/m4a3, VENDOR_ITEM_REGULAR), - list("M82F Flare Gun", round(scale * 20), /obj/item/weapon/gun/flare, VENDOR_ITEM_REGULAR), + list("88 Mod 4 Combat Pistol", floor(scale * 50), /obj/item/weapon/gun/pistol/mod88, VENDOR_ITEM_REGULAR), + list("M44 Combat Revolver", floor(scale * 50), /obj/item/weapon/gun/revolver/m44, VENDOR_ITEM_REGULAR), + list("M4A3 Service Pistol", floor(scale * 50), /obj/item/weapon/gun/pistol/m4a3, VENDOR_ITEM_REGULAR), + list("M82F Flare Gun", floor(scale * 20), /obj/item/weapon/gun/flare, VENDOR_ITEM_REGULAR), list("RESTRICTED FIREARMS", -1, null, null), - list("VP78 Pistol", round(scale * 4), /obj/item/storage/box/guncase/vp78, VENDOR_ITEM_REGULAR), - list("SU-6 Smart Pistol", round(scale * 3), /obj/item/storage/box/guncase/smartpistol, VENDOR_ITEM_REGULAR), - list("MOU-53 Shotgun", round(scale * 2), /obj/item/storage/box/guncase/mou53, VENDOR_ITEM_REGULAR), - list("XM88 Heavy Rifle", round(scale * 3), /obj/item/storage/box/guncase/xm88, VENDOR_ITEM_REGULAR), + list("VP78 Pistol", floor(scale * 4), /obj/item/storage/box/guncase/vp78, VENDOR_ITEM_REGULAR), + list("SU-6 Smart Pistol", floor(scale * 3), /obj/item/storage/box/guncase/smartpistol, VENDOR_ITEM_REGULAR), + list("MOU-53 Shotgun", floor(scale * 2), /obj/item/storage/box/guncase/mou53, VENDOR_ITEM_REGULAR), + list("XM88 Heavy Rifle", floor(scale * 3), /obj/item/storage/box/guncase/xm88, VENDOR_ITEM_REGULAR), list("M41AE2 Heavy Pulse Rifle", 2.5, /obj/item/storage/box/guncase/lmg, VENDOR_ITEM_REGULAR), - list("M41A Pulse Rifle MK1", round(scale * 3), /obj/item/storage/box/guncase/m41aMK1, VENDOR_ITEM_REGULAR), - list("M56D Heavy Machine Gun", round(scale * 2), /obj/item/storage/box/guncase/m56d, VENDOR_ITEM_REGULAR), - list("M2C Heavy Machine Gun", round(scale * 2), /obj/item/storage/box/guncase/m2c, VENDOR_ITEM_REGULAR), - list("M240 Incinerator Unit", round(scale * 2), /obj/item/storage/box/guncase/flamer, VENDOR_ITEM_REGULAR), - list("M79 Grenade Launcher", round(scale * 3), /obj/item/storage/box/guncase/m79, VENDOR_ITEM_REGULAR), - list("XM51 Breaching Scattergun", round(scale * 3), /obj/item/storage/box/guncase/xm51, VENDOR_ITEM_REGULAR), + list("M41A Pulse Rifle MK1", floor(scale * 3), /obj/item/storage/box/guncase/m41aMK1, VENDOR_ITEM_REGULAR), + list("M56D Heavy Machine Gun", floor(scale * 2), /obj/item/storage/box/guncase/m56d, VENDOR_ITEM_REGULAR), + list("M2C Heavy Machine Gun", floor(scale * 2), /obj/item/storage/box/guncase/m2c, VENDOR_ITEM_REGULAR), + list("M240 Incinerator Unit", floor(scale * 2), /obj/item/storage/box/guncase/flamer, VENDOR_ITEM_REGULAR), + list("M79 Grenade Launcher", floor(scale * 3), /obj/item/storage/box/guncase/m79, VENDOR_ITEM_REGULAR), + list("XM51 Breaching Scattergun", floor(scale * 3), /obj/item/storage/box/guncase/xm51, VENDOR_ITEM_REGULAR), list("EXPLOSIVES", -1, null, null), - list("M15 Fragmentation Grenade", round(scale * 2), /obj/item/explosive/grenade/high_explosive/m15, VENDOR_ITEM_REGULAR), - list("M20 Claymore Anti-Personnel Mine", round(scale * 4), /obj/item/explosive/mine, VENDOR_ITEM_REGULAR), - list("M40 HEDP Grenade", round(scale * 25), /obj/item/explosive/grenade/high_explosive, VENDOR_ITEM_REGULAR), - list("M40 HIDP Incendiary Grenade", round(scale * 4), /obj/item/explosive/grenade/incendiary, VENDOR_ITEM_REGULAR), - list("M40 HPDP White Phosphorus Smoke Grenade", round(scale * 4), /obj/item/explosive/grenade/phosphorus, VENDOR_ITEM_REGULAR), - list("M40 HSDP Smoke Grenade", round(scale * 5), /obj/item/explosive/grenade/smokebomb, VENDOR_ITEM_REGULAR), - list("M74 AGM-Frag Airburst Grenade", round(scale * 4), /obj/item/explosive/grenade/high_explosive/airburst, VENDOR_ITEM_REGULAR), - list("M74 AGM-Incendiary Airburst Grenade", round(scale * 4), /obj/item/explosive/grenade/incendiary/airburst, VENDOR_ITEM_REGULAR), - list("M74 AGM-Smoke Airburst Grenade", round(scale * 4), /obj/item/explosive/grenade/smokebomb/airburst, VENDOR_ITEM_REGULAR), - list("M74 AGM-Star Shell", round(scale * 2), /obj/item/explosive/grenade/high_explosive/airburst/starshell, VENDOR_ITEM_REGULAR), - list("M74 AGM-Hornet Shell", round(scale * 4), /obj/item/explosive/grenade/high_explosive/airburst/hornet_shell, VENDOR_ITEM_REGULAR), - list("M40 HIRR Baton Slug", round(scale * 8), /obj/item/explosive/grenade/slug/baton, VENDOR_ITEM_REGULAR), - list("M40 MFHS Metal Foam Grenade", round(scale * 6), /obj/item/explosive/grenade/metal_foam, VENDOR_ITEM_REGULAR), - list("Plastic Explosives", round(scale * 3), /obj/item/explosive/plastic, VENDOR_ITEM_REGULAR), - list("Breaching Charge", round(scale * 2), /obj/item/explosive/plastic/breaching_charge, VENDOR_ITEM_REGULAR), + list("M15 Fragmentation Grenade", floor(scale * 2), /obj/item/explosive/grenade/high_explosive/m15, VENDOR_ITEM_REGULAR), + list("M20 Claymore Anti-Personnel Mine", floor(scale * 4), /obj/item/explosive/mine, VENDOR_ITEM_REGULAR), + list("M40 HEDP Grenade", floor(scale * 25), /obj/item/explosive/grenade/high_explosive, VENDOR_ITEM_REGULAR), + list("M40 HIDP Incendiary Grenade", floor(scale * 4), /obj/item/explosive/grenade/incendiary, VENDOR_ITEM_REGULAR), + list("M40 HPDP White Phosphorus Smoke Grenade", floor(scale * 4), /obj/item/explosive/grenade/phosphorus, VENDOR_ITEM_REGULAR), + list("M40 HSDP Smoke Grenade", floor(scale * 5), /obj/item/explosive/grenade/smokebomb, VENDOR_ITEM_REGULAR), + list("M74 AGM-Frag Airburst Grenade", floor(scale * 4), /obj/item/explosive/grenade/high_explosive/airburst, VENDOR_ITEM_REGULAR), + list("M74 AGM-Incendiary Airburst Grenade", floor(scale * 4), /obj/item/explosive/grenade/incendiary/airburst, VENDOR_ITEM_REGULAR), + list("M74 AGM-Smoke Airburst Grenade", floor(scale * 4), /obj/item/explosive/grenade/smokebomb/airburst, VENDOR_ITEM_REGULAR), + list("M74 AGM-Star Shell", floor(scale * 2), /obj/item/explosive/grenade/high_explosive/airburst/starshell, VENDOR_ITEM_REGULAR), + list("M74 AGM-Hornet Shell", floor(scale * 4), /obj/item/explosive/grenade/high_explosive/airburst/hornet_shell, VENDOR_ITEM_REGULAR), + list("M40 HIRR Baton Slug", floor(scale * 8), /obj/item/explosive/grenade/slug/baton, VENDOR_ITEM_REGULAR), + list("M40 MFHS Metal Foam Grenade", floor(scale * 6), /obj/item/explosive/grenade/metal_foam, VENDOR_ITEM_REGULAR), + list("Plastic Explosives", floor(scale * 3), /obj/item/explosive/plastic, VENDOR_ITEM_REGULAR), + list("Breaching Charge", floor(scale * 2), /obj/item/explosive/plastic/breaching_charge, VENDOR_ITEM_REGULAR), list("WEBBINGS", -1, null, null), - list("Black Webbing Vest", round(scale * 2), /obj/item/clothing/accessory/storage/black_vest, VENDOR_ITEM_REGULAR), - list("Brown Webbing Vest", round(scale * 2), /obj/item/clothing/accessory/storage/black_vest/brown_vest, VENDOR_ITEM_REGULAR), - list("Shoulder Holster", round(scale * 1.5), /obj/item/clothing/accessory/storage/holster, VENDOR_ITEM_REGULAR), - list("Webbing", round(scale * 5), /obj/item/clothing/accessory/storage/webbing, VENDOR_ITEM_REGULAR), - list("Knife Webbing", round(scale * 1), /obj/item/clothing/accessory/storage/knifeharness, VENDOR_ITEM_REGULAR), - list("Drop Pouch", round(scale * 2), /obj/item/clothing/accessory/storage/droppouch, VENDOR_ITEM_REGULAR), + list("Black Webbing Vest", floor(scale * 2), /obj/item/clothing/accessory/storage/black_vest, VENDOR_ITEM_REGULAR), + list("Brown Webbing Vest", floor(scale * 2), /obj/item/clothing/accessory/storage/black_vest/brown_vest, VENDOR_ITEM_REGULAR), + list("Shoulder Holster", floor(scale * 1.5), /obj/item/clothing/accessory/storage/holster, VENDOR_ITEM_REGULAR), + list("Webbing", floor(scale * 5), /obj/item/clothing/accessory/storage/webbing, VENDOR_ITEM_REGULAR), + list("Knife Webbing", floor(scale * 1), /obj/item/clothing/accessory/storage/knifeharness, VENDOR_ITEM_REGULAR), + list("Drop Pouch", floor(scale * 2), /obj/item/clothing/accessory/storage/droppouch, VENDOR_ITEM_REGULAR), list("BACKPACKS", -1, null, null), - list("Lightweight IMP Backpack", round(scale * 15), /obj/item/storage/backpack/marine, VENDOR_ITEM_REGULAR), - list("Shotgun Scabbard", round(scale * 10), /obj/item/storage/large_holster/m37, VENDOR_ITEM_REGULAR), - list("Pyrotechnician G4-1 Fueltank", round(scale * 2), /obj/item/storage/backpack/marine/engineerpack/flamethrower/kit, VENDOR_ITEM_REGULAR), - list("Technician Welderpack", round(scale * 2), /obj/item/storage/backpack/marine/engineerpack, VENDOR_ITEM_REGULAR), - list("Mortar Shell Backpack", round(scale * 1), /obj/item/storage/backpack/marine/mortarpack, VENDOR_ITEM_REGULAR), - list("Technician Welder-Satchel", round(scale * 5), /obj/item/storage/backpack/marine/engineerpack/satchel, VENDOR_ITEM_REGULAR), - list("IMP Ammo Rack", round(scale * 2), /obj/item/storage/backpack/marine/ammo_rack, VENDOR_ITEM_REGULAR), - list("Radio Telephone Pack", round(scale * 2), /obj/item/storage/backpack/marine/satchel/rto, VENDOR_ITEM_REGULAR), + list("Lightweight IMP Backpack", floor(scale * 15), /obj/item/storage/backpack/marine, VENDOR_ITEM_REGULAR), + list("Shotgun Scabbard", floor(scale * 10), /obj/item/storage/large_holster/m37, VENDOR_ITEM_REGULAR), + list("Pyrotechnician G4-1 Fueltank", floor(scale * 2), /obj/item/storage/backpack/marine/engineerpack/flamethrower/kit, VENDOR_ITEM_REGULAR), + list("Technician Welderpack", floor(scale * 2), /obj/item/storage/backpack/marine/engineerpack, VENDOR_ITEM_REGULAR), + list("Mortar Shell Backpack", floor(scale * 1), /obj/item/storage/backpack/marine/mortarpack, VENDOR_ITEM_REGULAR), + list("Technician Welder-Satchel", floor(scale * 5), /obj/item/storage/backpack/marine/engineerpack/satchel, VENDOR_ITEM_REGULAR), + list("IMP Ammo Rack", floor(scale * 2), /obj/item/storage/backpack/marine/ammo_rack, VENDOR_ITEM_REGULAR), + list("Radio Telephone Pack", floor(scale * 2), /obj/item/storage/backpack/marine/satchel/rto, VENDOR_ITEM_REGULAR), + list("Parachute", floor(scale * 20), /obj/item/parachute, VENDOR_ITEM_REGULAR), list("BELTS", -1, null, null), - list("G8-A General Utility Pouch", round(scale * 2), /obj/item/storage/backpack/general_belt, VENDOR_ITEM_REGULAR), - list("M276 Ammo Load Rig", round(scale * 15), /obj/item/storage/belt/marine, VENDOR_ITEM_REGULAR), - list("M276 General Pistol Holster Rig", round(scale * 10), /obj/item/storage/belt/gun/m4a3, VENDOR_ITEM_REGULAR), - list("M276 Knife Rig", round(scale * 5), /obj/item/storage/belt/knifepouch, VENDOR_ITEM_REGULAR), - list("M276 M39 Holster Rig", round(scale * 5), /obj/item/storage/belt/gun/m39, VENDOR_ITEM_REGULAR), - list("M276 M40 Grenade Rig", round(scale * 2), /obj/item/storage/belt/grenade, VENDOR_ITEM_REGULAR), - list("M276 M44 Holster Rig", round(scale * 5), /obj/item/storage/belt/gun/m44, VENDOR_ITEM_REGULAR), - list("M276 M82F Holster Rig", round(scale * 2), /obj/item/storage/belt/gun/flaregun, VENDOR_ITEM_REGULAR), - list("M276 Shotgun Shell Loading Rig", round(scale * 10), /obj/item/storage/belt/shotgun, VENDOR_ITEM_REGULAR), - list("M276 Mortar Operator Belt", round(scale * 2), /obj/item/storage/belt/gun/mortarbelt, VENDOR_ITEM_REGULAR), - list("Rappel Harness", round(scale * 20), /obj/item/rappel_harness, VENDOR_ITEM_REGULAR), + list("G8-A General Utility Pouch", floor(scale * 2), /obj/item/storage/backpack/general_belt, VENDOR_ITEM_REGULAR), + list("M276 Ammo Load Rig", floor(scale * 15), /obj/item/storage/belt/marine, VENDOR_ITEM_REGULAR), + list("M276 General Pistol Holster Rig", floor(scale * 10), /obj/item/storage/belt/gun/m4a3, VENDOR_ITEM_REGULAR), + list("M276 Knife Rig", floor(scale * 5), /obj/item/storage/belt/knifepouch, VENDOR_ITEM_REGULAR), + list("M276 M39 Holster Rig", floor(scale * 5), /obj/item/storage/belt/gun/m39, VENDOR_ITEM_REGULAR), + list("M276 M40 Grenade Rig", floor(scale * 2), /obj/item/storage/belt/grenade, VENDOR_ITEM_REGULAR), + list("M276 M44 Holster Rig", floor(scale * 5), /obj/item/storage/belt/gun/m44, VENDOR_ITEM_REGULAR), + list("M276 M82F Holster Rig", floor(scale * 2), /obj/item/storage/belt/gun/flaregun, VENDOR_ITEM_REGULAR), + list("M276 Shotgun Shell Loading Rig", floor(scale * 10), /obj/item/storage/belt/shotgun, VENDOR_ITEM_REGULAR), + list("M276 Mortar Operator Belt", floor(scale * 2), /obj/item/storage/belt/gun/mortarbelt, VENDOR_ITEM_REGULAR), list("POUCHES", -1, null, null), - list("Autoinjector Pouch", round(scale * 1), /obj/item/storage/pouch/autoinjector, VENDOR_ITEM_REGULAR), - list("Medical Kit Pouch", round(scale * 2), /obj/item/storage/pouch/medkit, VENDOR_ITEM_REGULAR), - list("First-Aid Pouch (Full)", round(scale * 5), /obj/item/storage/pouch/firstaid/full, VENDOR_ITEM_REGULAR), - list("First Responder Pouch", round(scale * 2), /obj/item/storage/pouch/first_responder, VENDOR_ITEM_REGULAR), - list("Syringe Pouch", round(scale * 2), /obj/item/storage/pouch/syringe, VENDOR_ITEM_REGULAR), - list("Tools Pouch (Full)", round(scale * 2), /obj/item/storage/pouch/tools/full, VENDOR_ITEM_REGULAR), - list("Construction Pouch", round(scale * 2), /obj/item/storage/pouch/construction, VENDOR_ITEM_REGULAR), - list("Electronics Pouch", round(scale * 2), /obj/item/storage/pouch/electronics, VENDOR_ITEM_REGULAR), - list("Explosive Pouch", round(scale * 2), /obj/item/storage/pouch/explosive, VENDOR_ITEM_REGULAR), - list("Flare Pouch (Full)", round(scale * 5), /obj/item/storage/pouch/flare/full, VENDOR_ITEM_REGULAR), - list("Document Pouch", round(scale * 2), /obj/item/storage/pouch/document/small, VENDOR_ITEM_REGULAR), - list("Sling Pouch", round(scale * 2), /obj/item/storage/pouch/sling, VENDOR_ITEM_REGULAR), + list("Autoinjector Pouch", floor(scale * 1), /obj/item/storage/pouch/autoinjector, VENDOR_ITEM_REGULAR), + list("Medical Kit Pouch", floor(scale * 2), /obj/item/storage/pouch/medkit, VENDOR_ITEM_REGULAR), + list("First-Aid Pouch (Full)", floor(scale * 5), /obj/item/storage/pouch/firstaid/full, VENDOR_ITEM_REGULAR), + list("First Responder Pouch", floor(scale * 2), /obj/item/storage/pouch/first_responder, VENDOR_ITEM_REGULAR), + list("Syringe Pouch", floor(scale * 2), /obj/item/storage/pouch/syringe, VENDOR_ITEM_REGULAR), + list("Tools Pouch (Full)", floor(scale * 2), /obj/item/storage/pouch/tools/full, VENDOR_ITEM_REGULAR), + list("Construction Pouch", floor(scale * 2), /obj/item/storage/pouch/construction, VENDOR_ITEM_REGULAR), + list("Electronics Pouch", floor(scale * 2), /obj/item/storage/pouch/electronics, VENDOR_ITEM_REGULAR), + list("Explosive Pouch", floor(scale * 2), /obj/item/storage/pouch/explosive, VENDOR_ITEM_REGULAR), + list("Flare Pouch (Full)", floor(scale * 5), /obj/item/storage/pouch/flare/full, VENDOR_ITEM_REGULAR), + list("Document Pouch", floor(scale * 2), /obj/item/storage/pouch/document/small, VENDOR_ITEM_REGULAR), + list("Sling Pouch", floor(scale * 2), /obj/item/storage/pouch/sling, VENDOR_ITEM_REGULAR), list("Machete Pouch (Full)", 1, /obj/item/storage/pouch/machete/full, VENDOR_ITEM_REGULAR), - list("Bayonet Pouch", round(scale * 2), /obj/item/storage/pouch/bayonet, VENDOR_ITEM_REGULAR), - list("Medium General Pouch", round(scale * 2), /obj/item/storage/pouch/general/medium, VENDOR_ITEM_REGULAR), - list("Magazine Pouch", round(scale * 5), /obj/item/storage/pouch/magazine, VENDOR_ITEM_REGULAR), - list("Shotgun Shell Pouch", round(scale * 5), /obj/item/storage/pouch/shotgun, VENDOR_ITEM_REGULAR), - list("Sidearm Pouch", round(scale * 5), /obj/item/storage/pouch/pistol, VENDOR_ITEM_REGULAR), - list("Large Pistol Magazine Pouch", round(scale * 5), /obj/item/storage/pouch/magazine/pistol/large, VENDOR_ITEM_REGULAR), - list("Fuel Tank Strap Pouch", round(scale * 4), /obj/item/storage/pouch/flamertank, VENDOR_ITEM_REGULAR), - list("Large General Pouch", round(scale * 1), /obj/item/storage/pouch/general/large, VENDOR_ITEM_REGULAR), - list("Large Magazine Pouch", round(scale * 1), /obj/item/storage/pouch/magazine/large, VENDOR_ITEM_REGULAR), - list("Large Shotgun Shell Pouch", round(scale * 1), /obj/item/storage/pouch/shotgun/large, VENDOR_ITEM_REGULAR), + list("Bayonet Pouch", floor(scale * 2), /obj/item/storage/pouch/bayonet, VENDOR_ITEM_REGULAR), + list("Medium General Pouch", floor(scale * 2), /obj/item/storage/pouch/general/medium, VENDOR_ITEM_REGULAR), + list("Magazine Pouch", floor(scale * 5), /obj/item/storage/pouch/magazine, VENDOR_ITEM_REGULAR), + list("Shotgun Shell Pouch", floor(scale * 5), /obj/item/storage/pouch/shotgun, VENDOR_ITEM_REGULAR), + list("Sidearm Pouch", floor(scale * 5), /obj/item/storage/pouch/pistol, VENDOR_ITEM_REGULAR), + list("Large Pistol Magazine Pouch", floor(scale * 5), /obj/item/storage/pouch/magazine/pistol/large, VENDOR_ITEM_REGULAR), + list("Fuel Tank Strap Pouch", floor(scale * 4), /obj/item/storage/pouch/flamertank, VENDOR_ITEM_REGULAR), + list("Large General Pouch", floor(scale * 1), /obj/item/storage/pouch/general/large, VENDOR_ITEM_REGULAR), + list("Large Magazine Pouch", floor(scale * 1), /obj/item/storage/pouch/magazine/large, VENDOR_ITEM_REGULAR), + list("Large Shotgun Shell Pouch", floor(scale * 1), /obj/item/storage/pouch/shotgun/large, VENDOR_ITEM_REGULAR), list("MISCELLANEOUS", -1, null, null), - list("Combat Flashlight", round(scale * 5), /obj/item/device/flashlight/combat, VENDOR_ITEM_REGULAR), - list("Entrenching Tool", round(scale * 4), /obj/item/tool/shovel/etool/folded, VENDOR_ITEM_REGULAR), - list("Gas Mask", round(scale * 10), /obj/item/clothing/mask/gas, VENDOR_ITEM_REGULAR), - list("M89-S Signal Flare Pack", round(scale * 2), /obj/item/storage/box/m94/signal, VENDOR_ITEM_REGULAR), - list("M94 Marking Flare Pack", round(scale * 10), /obj/item/storage/box/m94, VENDOR_ITEM_REGULAR), - list("Machete Scabbard (Full)", round(scale * 6), /obj/item/storage/large_holster/machete/full, VENDOR_ITEM_REGULAR), - list("MB-6 Folding Barricades (x3)", round(scale * 3), /obj/item/stack/folding_barricade/three, VENDOR_ITEM_REGULAR), - list("Motion Detector", round(scale * 4), /obj/item/device/motiondetector, VENDOR_ITEM_REGULAR), - list("Data Detector", round(scale * 4), /obj/item/device/motiondetector/intel, VENDOR_ITEM_REGULAR), - list("Binoculars", round(scale * 2), /obj/item/device/binoculars, VENDOR_ITEM_REGULAR), - list("Rangefinder", round(scale * 1), /obj/item/device/binoculars/range, VENDOR_ITEM_REGULAR), - list("Laser Designator", round(scale * 1), /obj/item/device/binoculars/range/designator, VENDOR_ITEM_REGULAR), - list("Welding Goggles", round(scale * 3), /obj/item/clothing/glasses/welding, VENDOR_ITEM_REGULAR), - list("Fire Extinguisher (Portable)", round(scale * 3), /obj/item/tool/extinguisher/mini, VENDOR_ITEM_REGULAR), - list("High-Capacity Power Cell", round(scale * 1), /obj/item/cell/high, VENDOR_ITEM_REGULAR), - list("Fulton Device Stack", round(scale * 1), /obj/item/stack/fulton, VENDOR_ITEM_REGULAR), + list("Combat Flashlight", floor(scale * 5), /obj/item/device/flashlight/combat, VENDOR_ITEM_REGULAR), + list("Entrenching Tool", floor(scale * 4), /obj/item/tool/shovel/etool/folded, VENDOR_ITEM_REGULAR), + list("Gas Mask", floor(scale * 10), /obj/item/clothing/mask/gas, VENDOR_ITEM_REGULAR), + list("M89-S Signal Flare Pack", floor(scale * 2), /obj/item/storage/box/m94/signal, VENDOR_ITEM_REGULAR), + list("M94 Marking Flare Pack", floor(scale * 10), /obj/item/storage/box/m94, VENDOR_ITEM_REGULAR), + list("Machete Scabbard (Full)", floor(scale * 6), /obj/item/storage/large_holster/machete/full, VENDOR_ITEM_REGULAR), + list("MB-6 Folding Barricades (x3)", floor(scale * 3), /obj/item/stack/folding_barricade/three, VENDOR_ITEM_REGULAR), + list("Motion Detector", floor(scale * 4), /obj/item/device/motiondetector, VENDOR_ITEM_REGULAR), + list("Data Detector", floor(scale * 4), /obj/item/device/motiondetector/intel, VENDOR_ITEM_REGULAR), + list("Binoculars", floor(scale * 2), /obj/item/device/binoculars, VENDOR_ITEM_REGULAR), + list("Rangefinder", floor(scale * 1), /obj/item/device/binoculars/range, VENDOR_ITEM_REGULAR), + list("Laser Designator", floor(scale * 1), /obj/item/device/binoculars/range/designator, VENDOR_ITEM_REGULAR), + list("Welding Goggles", floor(scale * 3), /obj/item/clothing/glasses/welding, VENDOR_ITEM_REGULAR), + list("Fire Extinguisher (Portable)", floor(scale * 3), /obj/item/tool/extinguisher/mini, VENDOR_ITEM_REGULAR), + list("High-Capacity Power Cell", floor(scale * 1), /obj/item/cell/high, VENDOR_ITEM_REGULAR), + list("Fulton Device Stack", floor(scale * 1), /obj/item/stack/fulton, VENDOR_ITEM_REGULAR), list("Sentry Gun Network Laptop", 4, /obj/item/device/sentry_computer, VENDOR_ITEM_REGULAR), - list("JTAC Pamphlet", round(scale * 1), /obj/item/pamphlet/skill/jtac, VENDOR_ITEM_REGULAR), - list("Engineering Pamphlet", round(scale * 1), /obj/item/pamphlet/skill/engineer, VENDOR_ITEM_REGULAR), + list("JTAC Pamphlet", floor(scale * 1), /obj/item/pamphlet/skill/jtac, VENDOR_ITEM_REGULAR), + list("Engineering Pamphlet", floor(scale * 1), /obj/item/pamphlet/skill/engineer, VENDOR_ITEM_REGULAR), list("Powerloader Certification", 0.75, /obj/item/pamphlet/skill/powerloader, VENDOR_ITEM_REGULAR), - list("Spare PDT/L Battle Buddy Kit", round(scale * 4), /obj/item/storage/box/pdt_kit, VENDOR_ITEM_REGULAR), - list("W-Y brand rechargeable mini-battery", round(scale * 3), /obj/item/cell/crap, VENDOR_ITEM_REGULAR) + list("Spare PDT/L Battle Buddy Kit", floor(scale * 4), /obj/item/storage/box/pdt_kit, VENDOR_ITEM_REGULAR), + list("W-Y brand rechargeable mini-battery", floor(scale * 3), /obj/item/cell/crap, VENDOR_ITEM_REGULAR) ) /obj/structure/machinery/cm_vending/sorted/cargo_guns/stock(obj/item/item_to_stock, mob/user) @@ -208,49 +208,49 @@ /obj/structure/machinery/cm_vending/sorted/cargo_ammo/populate_product_list(scale) listed_products = list( list("REGULAR AMMUNITION", -1, null, null), - list("Box Of Buckshot Shells", round(scale * 40), /obj/item/ammo_magazine/shotgun/buckshot, VENDOR_ITEM_REGULAR), - list("Box Of Flechette Shells", round(scale * 40), /obj/item/ammo_magazine/shotgun/flechette, VENDOR_ITEM_REGULAR), - list("Box Of Shotgun Slugs", round(scale * 40), /obj/item/ammo_magazine/shotgun/slugs, VENDOR_ITEM_REGULAR), - list("M4RA Magazine (10x24mm)", round(scale * 60), /obj/item/ammo_magazine/rifle/m4ra, VENDOR_ITEM_REGULAR), - list("M41A MK2 Magazine (10x24mm)", round(scale * 100), /obj/item/ammo_magazine/rifle, VENDOR_ITEM_REGULAR), - list("M39 HV Magazine (10x20mm)", round(scale * 100), /obj/item/ammo_magazine/smg/m39, VENDOR_ITEM_REGULAR), - list("M44 Speed Loader (.44)", round(scale * 80), /obj/item/ammo_magazine/revolver, VENDOR_ITEM_REGULAR), - list("M4A3 Magazine (9mm)", round(scale * 100), /obj/item/ammo_magazine/pistol, VENDOR_ITEM_REGULAR), + list("Box Of Buckshot Shells", floor(scale * 40), /obj/item/ammo_magazine/shotgun/buckshot, VENDOR_ITEM_REGULAR), + list("Box Of Flechette Shells", floor(scale * 40), /obj/item/ammo_magazine/shotgun/flechette, VENDOR_ITEM_REGULAR), + list("Box Of Shotgun Slugs", floor(scale * 40), /obj/item/ammo_magazine/shotgun/slugs, VENDOR_ITEM_REGULAR), + list("M4RA Magazine (10x24mm)", floor(scale * 60), /obj/item/ammo_magazine/rifle/m4ra, VENDOR_ITEM_REGULAR), + list("M41A MK2 Magazine (10x24mm)", floor(scale * 100), /obj/item/ammo_magazine/rifle, VENDOR_ITEM_REGULAR), + list("M39 HV Magazine (10x20mm)", floor(scale * 100), /obj/item/ammo_magazine/smg/m39, VENDOR_ITEM_REGULAR), + list("M44 Speed Loader (.44)", floor(scale * 80), /obj/item/ammo_magazine/revolver, VENDOR_ITEM_REGULAR), + list("M4A3 Magazine (9mm)", floor(scale * 100), /obj/item/ammo_magazine/pistol, VENDOR_ITEM_REGULAR), list("ARMOR-PIERCING AMMUNITION", -1, null, null), - list("88 Mod 4 AP Magazine (9mm)", round(scale * 50), /obj/item/ammo_magazine/pistol/mod88, VENDOR_ITEM_REGULAR), - list("M4RA AP Magazine (10x24mm)", round(scale * 16), /obj/item/ammo_magazine/rifle/m4ra/ap, VENDOR_ITEM_REGULAR), - list("M39 AP Magazine (10x20mm)", round(scale * 12), /obj/item/ammo_magazine/smg/m39/ap, VENDOR_ITEM_REGULAR), - list("M41A MK2 AP Magazine (10x24mm)", round(scale * 10), /obj/item/ammo_magazine/rifle/ap, VENDOR_ITEM_REGULAR), - list("M4A3 AP Magazine (9mm)", round(scale * 2), /obj/item/ammo_magazine/pistol/ap, VENDOR_ITEM_REGULAR), + list("88 Mod 4 AP Magazine (9mm)", floor(scale * 50), /obj/item/ammo_magazine/pistol/mod88, VENDOR_ITEM_REGULAR), + list("M4RA AP Magazine (10x24mm)", floor(scale * 16), /obj/item/ammo_magazine/rifle/m4ra/ap, VENDOR_ITEM_REGULAR), + list("M39 AP Magazine (10x20mm)", floor(scale * 12), /obj/item/ammo_magazine/smg/m39/ap, VENDOR_ITEM_REGULAR), + list("M41A MK2 AP Magazine (10x24mm)", floor(scale * 10), /obj/item/ammo_magazine/rifle/ap, VENDOR_ITEM_REGULAR), + list("M4A3 AP Magazine (9mm)", floor(scale * 2), /obj/item/ammo_magazine/pistol/ap, VENDOR_ITEM_REGULAR), list("EXTENDED AMMUNITION", -1, null, null), - list("M39 Extended Magazine (10x20mm)", round(scale * 10), /obj/item/ammo_magazine/smg/m39/extended, VENDOR_ITEM_REGULAR), - list("M41A MK2 Extended Magazine (10x24mm)", round(scale * 8), /obj/item/ammo_magazine/rifle/extended, VENDOR_ITEM_REGULAR), + list("M39 Extended Magazine (10x20mm)", floor(scale * 10), /obj/item/ammo_magazine/smg/m39/extended, VENDOR_ITEM_REGULAR), + list("M41A MK2 Extended Magazine (10x24mm)", floor(scale * 8), /obj/item/ammo_magazine/rifle/extended, VENDOR_ITEM_REGULAR), list("SPECIAL AMMUNITION", -1, null, null), list("M56 DV9 Battery", 4, /obj/item/smartgun_battery, VENDOR_ITEM_REGULAR), list("M56 Smartgun Drum", 4, /obj/item/ammo_magazine/smartgun, VENDOR_ITEM_REGULAR), list("M44 Heavy Speed Loader (.44)", 10, /obj/item/ammo_magazine/revolver/heavy, VENDOR_ITEM_REGULAR), list("M44 Marksman Speed Loader (.44)", 6, /obj/item/ammo_magazine/revolver/marksman, VENDOR_ITEM_REGULAR), - list("M4A3 HP Magazine (9mm)", round(scale * 2), /obj/item/ammo_magazine/pistol/hp, VENDOR_ITEM_REGULAR), - list("M41AE2 Holo Target Rounds (10x24mm)", round(scale * 2), /obj/item/ammo_magazine/rifle/lmg/holo_target, VENDOR_ITEM_REGULAR), + list("M4A3 HP Magazine (9mm)", floor(scale * 2), /obj/item/ammo_magazine/pistol/hp, VENDOR_ITEM_REGULAR), + list("M41AE2 Holo Target Rounds (10x24mm)", floor(scale * 2), /obj/item/ammo_magazine/rifle/lmg/holo_target, VENDOR_ITEM_REGULAR), list("RESTRICTED FIREARM AMMUNITION", -1, null, null), list("VP78 Magazine", 11, /obj/item/ammo_magazine/pistol/vp78, VENDOR_ITEM_REGULAR), list("SU-6 Smartpistol Magazine (.45)", 13, /obj/item/ammo_magazine/pistol/smart, VENDOR_ITEM_REGULAR), - list("M240 Incinerator Tank", round(scale * 3), /obj/item/ammo_magazine/flamer_tank, VENDOR_ITEM_REGULAR), - list("M41AE2 Box Magazine (10x24mm)", round(scale * 3), /obj/item/ammo_magazine/rifle/lmg, VENDOR_ITEM_REGULAR), + list("M240 Incinerator Tank", floor(scale * 3), /obj/item/ammo_magazine/flamer_tank, VENDOR_ITEM_REGULAR), + list("M41AE2 Box Magazine (10x24mm)", floor(scale * 3), /obj/item/ammo_magazine/rifle/lmg, VENDOR_ITEM_REGULAR), list("M41A MK1 Magazine (10x24mm)", 4.5, /obj/item/ammo_magazine/rifle/m41aMK1, VENDOR_ITEM_REGULAR), - list("M41A MK1 AP Magazine (10x24mm)", round(scale * 2), /obj/item/ammo_magazine/rifle/m41aMK1/ap, VENDOR_ITEM_REGULAR), - list("M56D Drum Magazine", round(scale * 2), /obj/item/ammo_magazine/m56d, VENDOR_ITEM_REGULAR), - list("M2C Box Magazine", round(scale * 2), /obj/item/ammo_magazine/m2c, VENDOR_ITEM_REGULAR), - list("XM51 Magazine (16g)", round(scale * 3), /obj/item/ammo_magazine/rifle/xm51, VENDOR_ITEM_REGULAR), + list("M41A MK1 AP Magazine (10x24mm)", floor(scale * 2), /obj/item/ammo_magazine/rifle/m41aMK1/ap, VENDOR_ITEM_REGULAR), + list("M56D Drum Magazine", floor(scale * 2), /obj/item/ammo_magazine/m56d, VENDOR_ITEM_REGULAR), + list("M2C Box Magazine", floor(scale * 2), /obj/item/ammo_magazine/m2c, VENDOR_ITEM_REGULAR), + list("XM51 Magazine (16g)", floor(scale * 3), /obj/item/ammo_magazine/rifle/xm51, VENDOR_ITEM_REGULAR), list("SHOTGUN SHELL BOXES", -1, null, null), - list("Shotgun Shell Box (Buckshot x 100)", round(scale * 4), /obj/item/ammo_box/magazine/shotgun/buckshot, VENDOR_ITEM_REGULAR), - list("Shotgun Shell Box (Flechette x 100)", round(scale * 4), /obj/item/ammo_box/magazine/shotgun/flechette, VENDOR_ITEM_REGULAR), - list("Shotgun Shell Box (Slugs x 100)", round(scale * 4), /obj/item/ammo_box/magazine/shotgun, VENDOR_ITEM_REGULAR), + list("Shotgun Shell Box (Buckshot x 100)", floor(scale * 4), /obj/item/ammo_box/magazine/shotgun/buckshot, VENDOR_ITEM_REGULAR), + list("Shotgun Shell Box (Flechette x 100)", floor(scale * 4), /obj/item/ammo_box/magazine/shotgun/flechette, VENDOR_ITEM_REGULAR), + list("Shotgun Shell Box (Slugs x 100)", floor(scale * 4), /obj/item/ammo_box/magazine/shotgun, VENDOR_ITEM_REGULAR), list("Shotgun Shell Box (16g) (Breaching x 120)", 1, /obj/item/ammo_box/magazine/shotgun/light/breaching, VENDOR_ITEM_REGULAR), ) @@ -475,33 +475,33 @@ /obj/structure/machinery/cm_vending/sorted/cargo_guns/squad_prep/training/populate_product_list(scale) listed_products = list( list("PRIMARY FIREARMS", -1, null, null), - list("M4RA Battle Rifle", round(scale * 10), /obj/item/weapon/gun/rifle/m4ra, VENDOR_ITEM_REGULAR), - list("M37A2 Pump Shotgun", round(scale * 15), /obj/item/weapon/gun/shotgun/pump, VENDOR_ITEM_REGULAR), - list("M39 Submachine Gun", round(scale * 30), /obj/item/weapon/gun/smg/m39, VENDOR_ITEM_REGULAR), - list("M41A Pulse Rifle MK2", round(scale * 30), /obj/item/weapon/gun/rifle/m41a, VENDOR_ITEM_RECOMMENDED), + list("M4RA Battle Rifle", floor(scale * 10), /obj/item/weapon/gun/rifle/m4ra, VENDOR_ITEM_REGULAR), + list("M37A2 Pump Shotgun", floor(scale * 15), /obj/item/weapon/gun/shotgun/pump, VENDOR_ITEM_REGULAR), + list("M39 Submachine Gun", floor(scale * 30), /obj/item/weapon/gun/smg/m39, VENDOR_ITEM_REGULAR), + list("M41A Pulse Rifle MK2", floor(scale * 30), /obj/item/weapon/gun/rifle/m41a, VENDOR_ITEM_RECOMMENDED), list("PRIMARY NONLETHAL AMMUNITION", -1, null, null), - list("Box of Beanbag Shells (12g)", round(scale * 15), /obj/item/ammo_magazine/shotgun/beanbag, VENDOR_ITEM_REGULAR), - list("M4RA Rubber Magazine (10x24mm)", round(scale * 15), /obj/item/ammo_magazine/rifle/m4ra/rubber, VENDOR_ITEM_REGULAR), - list("M39 Rubber Magazine (10x20mm)", round(scale * 25), /obj/item/ammo_magazine/smg/m39/rubber, VENDOR_ITEM_REGULAR), - list("M41A Rubber Magazine (10x24mm)", round(scale * 25), /obj/item/ammo_magazine/rifle/rubber, VENDOR_ITEM_REGULAR), + list("Box of Beanbag Shells (12g)", floor(scale * 15), /obj/item/ammo_magazine/shotgun/beanbag, VENDOR_ITEM_REGULAR), + list("M4RA Rubber Magazine (10x24mm)", floor(scale * 15), /obj/item/ammo_magazine/rifle/m4ra/rubber, VENDOR_ITEM_REGULAR), + list("M39 Rubber Magazine (10x20mm)", floor(scale * 25), /obj/item/ammo_magazine/smg/m39/rubber, VENDOR_ITEM_REGULAR), + list("M41A Rubber Magazine (10x24mm)", floor(scale * 25), /obj/item/ammo_magazine/rifle/rubber, VENDOR_ITEM_REGULAR), list("SIDEARMS", -1, null, null), - list("88 Mod 4 Combat Pistol", round(scale * 25), /obj/item/weapon/gun/pistol/mod88, VENDOR_ITEM_REGULAR), - list("M4A3 Service Pistol", round(scale * 25), /obj/item/weapon/gun/pistol/m4a3, VENDOR_ITEM_REGULAR), + list("88 Mod 4 Combat Pistol", floor(scale * 25), /obj/item/weapon/gun/pistol/mod88, VENDOR_ITEM_REGULAR), + list("M4A3 Service Pistol", floor(scale * 25), /obj/item/weapon/gun/pistol/m4a3, VENDOR_ITEM_REGULAR), list("SIDEARM NONLETHAL AMMUNITION", -1, null, null), - list("88M4 Rubber Magazine (9mm)", round(scale * 25), /obj/item/ammo_magazine/pistol/mod88/rubber, VENDOR_ITEM_REGULAR), - list("M4A3 Rubber Magazine (9mm)", round(scale * 25), /obj/item/ammo_magazine/pistol/rubber, VENDOR_ITEM_REGULAR), + list("88M4 Rubber Magazine (9mm)", floor(scale * 25), /obj/item/ammo_magazine/pistol/mod88/rubber, VENDOR_ITEM_REGULAR), + list("M4A3 Rubber Magazine (9mm)", floor(scale * 25), /obj/item/ammo_magazine/pistol/rubber, VENDOR_ITEM_REGULAR), list("ATTACHMENTS", -1, null, null), - list("Rail Flashlight", round(scale * 25), /obj/item/attachable/flashlight, VENDOR_ITEM_RECOMMENDED), - list("Underbarrel Flashlight Grip", round(scale * 10), /obj/item/attachable/flashlight/grip, VENDOR_ITEM_RECOMMENDED), - list("Underslung Grenade Launcher", round(scale * 25), /obj/item/attachable/attached_gun/grenade, VENDOR_ITEM_REGULAR), //They already get these as on-spawns, might as well formalize some spares. + list("Rail Flashlight", floor(scale * 25), /obj/item/attachable/flashlight, VENDOR_ITEM_RECOMMENDED), + list("Underbarrel Flashlight Grip", floor(scale * 10), /obj/item/attachable/flashlight/grip, VENDOR_ITEM_RECOMMENDED), + list("Underslung Grenade Launcher", floor(scale * 25), /obj/item/attachable/attached_gun/grenade, VENDOR_ITEM_REGULAR), //They already get these as on-spawns, might as well formalize some spares. list("UTILITIES", -1, null, null), - list("M07 Training Grenade", round(scale * 15), /obj/item/explosive/grenade/high_explosive/training, VENDOR_ITEM_REGULAR), - list("M15 Rubber Pellet Grenade", round(scale * 10), /obj/item/explosive/grenade/high_explosive/m15/rubber, VENDOR_ITEM_REGULAR), - list("M5 Bayonet", round(scale * 25), /obj/item/attachable/bayonet, VENDOR_ITEM_REGULAR), - list("M94 Marking Flare Pack", round(scale * 10), /obj/item/storage/box/m94, VENDOR_ITEM_RECOMMENDED) + list("M07 Training Grenade", floor(scale * 15), /obj/item/explosive/grenade/high_explosive/training, VENDOR_ITEM_REGULAR), + list("M15 Rubber Pellet Grenade", floor(scale * 10), /obj/item/explosive/grenade/high_explosive/m15/rubber, VENDOR_ITEM_REGULAR), + list("M5 Bayonet", floor(scale * 25), /obj/item/attachable/bayonet, VENDOR_ITEM_REGULAR), + list("M94 Marking Flare Pack", floor(scale * 10), /obj/item/storage/box/m94, VENDOR_ITEM_RECOMMENDED) ) diff --git a/code/game/machinery/vending/vendor_types/squad_prep/squad_prep.dm b/code/game/machinery/vending/vendor_types/squad_prep/squad_prep.dm index d3662c785890..276f0b760842 100644 --- a/code/game/machinery/vending/vendor_types/squad_prep/squad_prep.dm +++ b/code/game/machinery/vending/vendor_types/squad_prep/squad_prep.dm @@ -17,40 +17,40 @@ /obj/structure/machinery/cm_vending/sorted/cargo_guns/squad_prep/populate_product_list(scale) listed_products = list( list("PRIMARY FIREARMS", -1, null, null), - list("M4RA Battle Rifle", round(scale * 10), /obj/item/weapon/gun/rifle/m4ra, VENDOR_ITEM_REGULAR), - list("M37A2 Pump Shotgun", round(scale * 15), /obj/item/weapon/gun/shotgun/pump, VENDOR_ITEM_REGULAR), - list("M39 Submachine Gun", round(scale * 30), /obj/item/weapon/gun/smg/m39, VENDOR_ITEM_REGULAR), - list("M41A Pulse Rifle MK2", round(scale * 30), /obj/item/weapon/gun/rifle/m41a, VENDOR_ITEM_RECOMMENDED), + list("M4RA Battle Rifle", floor(scale * 10), /obj/item/weapon/gun/rifle/m4ra, VENDOR_ITEM_REGULAR), + list("M37A2 Pump Shotgun", floor(scale * 15), /obj/item/weapon/gun/shotgun/pump, VENDOR_ITEM_REGULAR), + list("M39 Submachine Gun", floor(scale * 30), /obj/item/weapon/gun/smg/m39, VENDOR_ITEM_REGULAR), + list("M41A Pulse Rifle MK2", floor(scale * 30), /obj/item/weapon/gun/rifle/m41a, VENDOR_ITEM_RECOMMENDED), list("PRIMARY AMMUNITION", -1, null, null), - list("Box of Flechette Shells (12g)", round(scale * 4), /obj/item/ammo_magazine/shotgun/flechette, VENDOR_ITEM_REGULAR), - list("Box of Buckshot Shells (12g)", round(scale * 10), /obj/item/ammo_magazine/shotgun/buckshot, VENDOR_ITEM_REGULAR), - list("Box of Shotgun Slugs (12g)", round(scale * 10), /obj/item/ammo_magazine/shotgun/slugs, VENDOR_ITEM_REGULAR), - list("M4RA Magazine (10x24mm)", round(scale * 15), /obj/item/ammo_magazine/rifle/m4ra, VENDOR_ITEM_REGULAR), - list("M39 HV Magazine (10x20mm)", round(scale * 25), /obj/item/ammo_magazine/smg/m39, VENDOR_ITEM_REGULAR), - list("M41A Magazine (10x24mm)", round(scale * 25), /obj/item/ammo_magazine/rifle, VENDOR_ITEM_REGULAR), + list("Box of Flechette Shells (12g)", floor(scale * 4), /obj/item/ammo_magazine/shotgun/flechette, VENDOR_ITEM_REGULAR), + list("Box of Buckshot Shells (12g)", floor(scale * 10), /obj/item/ammo_magazine/shotgun/buckshot, VENDOR_ITEM_REGULAR), + list("Box of Shotgun Slugs (12g)", floor(scale * 10), /obj/item/ammo_magazine/shotgun/slugs, VENDOR_ITEM_REGULAR), + list("M4RA Magazine (10x24mm)", floor(scale * 15), /obj/item/ammo_magazine/rifle/m4ra, VENDOR_ITEM_REGULAR), + list("M39 HV Magazine (10x20mm)", floor(scale * 25), /obj/item/ammo_magazine/smg/m39, VENDOR_ITEM_REGULAR), + list("M41A Magazine (10x24mm)", floor(scale * 25), /obj/item/ammo_magazine/rifle, VENDOR_ITEM_REGULAR), list("SIDEARMS", -1, null, null), - list("88 Mod 4 Combat Pistol", round(scale * 25), /obj/item/weapon/gun/pistol/mod88, VENDOR_ITEM_REGULAR), - list("M44 Combat Revolver", round(scale * 25), /obj/item/weapon/gun/revolver/m44, VENDOR_ITEM_REGULAR), - list("M4A3 Service Pistol", round(scale * 25), /obj/item/weapon/gun/pistol/m4a3, VENDOR_ITEM_REGULAR), - list("M82F Flare Gun", round(scale * 10), /obj/item/weapon/gun/flare, VENDOR_ITEM_REGULAR), + list("88 Mod 4 Combat Pistol", floor(scale * 25), /obj/item/weapon/gun/pistol/mod88, VENDOR_ITEM_REGULAR), + list("M44 Combat Revolver", floor(scale * 25), /obj/item/weapon/gun/revolver/m44, VENDOR_ITEM_REGULAR), + list("M4A3 Service Pistol", floor(scale * 25), /obj/item/weapon/gun/pistol/m4a3, VENDOR_ITEM_REGULAR), + list("M82F Flare Gun", floor(scale * 10), /obj/item/weapon/gun/flare, VENDOR_ITEM_REGULAR), list("SIDEARM AMMUNITION", -1, null, null), - list("88M4 AP Magazine (9mm)", round(scale * 25), /obj/item/ammo_magazine/pistol/mod88, VENDOR_ITEM_REGULAR), - list("M44 Speedloader (.44)", round(scale * 20), /obj/item/ammo_magazine/revolver, VENDOR_ITEM_REGULAR), - list("M4A3 Magazine (9mm)", round(scale * 25), /obj/item/ammo_magazine/pistol, VENDOR_ITEM_REGULAR), + list("88M4 AP Magazine (9mm)", floor(scale * 25), /obj/item/ammo_magazine/pistol/mod88, VENDOR_ITEM_REGULAR), + list("M44 Speedloader (.44)", floor(scale * 20), /obj/item/ammo_magazine/revolver, VENDOR_ITEM_REGULAR), + list("M4A3 Magazine (9mm)", floor(scale * 25), /obj/item/ammo_magazine/pistol, VENDOR_ITEM_REGULAR), list("ATTACHMENTS", -1, null, null), - list("M39 Folding Stock", round(scale * 10), /obj/item/attachable/stock/smg/collapsible, VENDOR_ITEM_REGULAR), - list("M41A Folding Stock", round(scale * 10), /obj/item/attachable/stock/rifle/collapsible, VENDOR_ITEM_REGULAR), - list("Rail Flashlight", round(scale * 25), /obj/item/attachable/flashlight, VENDOR_ITEM_RECOMMENDED), - list("Underbarrel Flashlight Grip", round(scale * 10), /obj/item/attachable/flashlight/grip, VENDOR_ITEM_RECOMMENDED), - list("Underslung Grenade Launcher", round(scale * 25), /obj/item/attachable/attached_gun/grenade, VENDOR_ITEM_REGULAR), //They already get these as on-spawns, might as well formalize some spares. + list("M39 Folding Stock", floor(scale * 10), /obj/item/attachable/stock/smg/collapsible, VENDOR_ITEM_REGULAR), + list("M41A Folding Stock", floor(scale * 10), /obj/item/attachable/stock/rifle/collapsible, VENDOR_ITEM_REGULAR), + list("Rail Flashlight", floor(scale * 25), /obj/item/attachable/flashlight, VENDOR_ITEM_RECOMMENDED), + list("Underbarrel Flashlight Grip", floor(scale * 10), /obj/item/attachable/flashlight/grip, VENDOR_ITEM_RECOMMENDED), + list("Underslung Grenade Launcher", floor(scale * 25), /obj/item/attachable/attached_gun/grenade, VENDOR_ITEM_REGULAR), //They already get these as on-spawns, might as well formalize some spares. list("UTILITIES", -1, null, null), - list("M5 Bayonet", round(scale * 25), /obj/item/attachable/bayonet, VENDOR_ITEM_REGULAR), - list("M94 Marking Flare Pack", round(scale * 10), /obj/item/storage/box/m94, VENDOR_ITEM_RECOMMENDED) + list("M5 Bayonet", floor(scale * 25), /obj/item/attachable/bayonet, VENDOR_ITEM_REGULAR), + list("M94 Marking Flare Pack", floor(scale * 10), /obj/item/storage/box/m94, VENDOR_ITEM_RECOMMENDED) ) /obj/structure/machinery/cm_vending/sorted/cargo_guns/squad_prep/tutorial @@ -99,102 +99,102 @@ /obj/structure/machinery/cm_vending/sorted/uniform_supply/squad_prep/populate_product_list(scale) listed_products = list( list("STANDARD EQUIPMENT", -1, null, null, null), - list("Marine Combat Boots", round(scale * 15), /obj/item/clothing/shoes/marine, VENDOR_ITEM_REGULAR), - list("Marine Brown Combat Boots", round(scale * 15), /obj/item/clothing/shoes/marine/brown, VENDOR_ITEM_REGULAR), - list("USCM Uniform", round(scale * 15), /obj/item/clothing/under/marine, VENDOR_ITEM_REGULAR), - list("Marine Combat Gloves", round(scale * 15), /obj/item/clothing/gloves/marine, VENDOR_ITEM_REGULAR), - list("Marine Brown Combat Gloves", round(scale * 15), /obj/item/clothing/gloves/marine/brown, VENDOR_ITEM_REGULAR), - list("Marine Black Combat Gloves", round(scale * 15), /obj/item/clothing/gloves/marine/black, VENDOR_ITEM_REGULAR), - list("Marine Radio Headset", round(scale * 15), /obj/item/device/radio/headset/almayer, VENDOR_ITEM_REGULAR), - list("M10 Pattern Marine Helmet", round(scale * 15), /obj/item/clothing/head/helmet/marine, VENDOR_ITEM_REGULAR), + list("Marine Combat Boots", floor(scale * 15), /obj/item/clothing/shoes/marine, VENDOR_ITEM_REGULAR), + list("Marine Brown Combat Boots", floor(scale * 15), /obj/item/clothing/shoes/marine/brown, VENDOR_ITEM_REGULAR), + list("USCM Uniform", floor(scale * 15), /obj/item/clothing/under/marine, VENDOR_ITEM_REGULAR), + list("Marine Combat Gloves", floor(scale * 15), /obj/item/clothing/gloves/marine, VENDOR_ITEM_REGULAR), + list("Marine Brown Combat Gloves", floor(scale * 15), /obj/item/clothing/gloves/marine/brown, VENDOR_ITEM_REGULAR), + list("Marine Black Combat Gloves", floor(scale * 15), /obj/item/clothing/gloves/marine/black, VENDOR_ITEM_REGULAR), + list("Marine Radio Headset", floor(scale * 15), /obj/item/device/radio/headset/almayer, VENDOR_ITEM_REGULAR), + list("M10 Pattern Marine Helmet", floor(scale * 15), /obj/item/clothing/head/helmet/marine, VENDOR_ITEM_REGULAR), list("WEBBINGS", -1, null, null), list("Brown Webbing Vest", 1, /obj/item/clothing/accessory/storage/black_vest/brown_vest, VENDOR_ITEM_REGULAR), list("Black Webbing Vest", 1, /obj/item/clothing/accessory/storage/black_vest, VENDOR_ITEM_REGULAR), - list("Webbing", round(scale * 2), /obj/item/clothing/accessory/storage/webbing, VENDOR_ITEM_REGULAR), + list("Webbing", floor(scale * 2), /obj/item/clothing/accessory/storage/webbing, VENDOR_ITEM_REGULAR), list("Drop Pouch", 0.75, /obj/item/clothing/accessory/storage/droppouch, VENDOR_ITEM_REGULAR), list("Shoulder Holster", 0.75, /obj/item/clothing/accessory/storage/holster, VENDOR_ITEM_REGULAR), list("ARMOR", -1, null, null), - list("M3 Pattern Carrier Marine Armor", round(scale * 15), /obj/item/clothing/suit/storage/marine/medium/carrier, VENDOR_ITEM_REGULAR), - list("M3 Pattern Padded Marine Armor", round(scale * 15), /obj/item/clothing/suit/storage/marine/medium/padded, VENDOR_ITEM_REGULAR), - list("M3 Pattern Padless Marine Armor", round(scale * 15), /obj/item/clothing/suit/storage/marine/medium/padless, VENDOR_ITEM_REGULAR), - list("M3 Pattern Ridged Marine Armor", round(scale * 15), /obj/item/clothing/suit/storage/marine/medium/padless_lines, VENDOR_ITEM_REGULAR), - list("M3 Pattern Skull Marine Armor", round(scale * 15), /obj/item/clothing/suit/storage/marine/medium/skull, VENDOR_ITEM_REGULAR), - list("M3 Pattern Smooth Marine Armor", round(scale * 15), /obj/item/clothing/suit/storage/marine/medium/smooth, VENDOR_ITEM_REGULAR), - list("M3-EOD Pattern Heavy Armor", round(scale * 10), /obj/item/clothing/suit/storage/marine/heavy, VENDOR_ITEM_REGULAR), - list("M3-L Pattern Light Armor", round(scale * 10), /obj/item/clothing/suit/storage/marine/light, VENDOR_ITEM_REGULAR), + list("M3 Pattern Carrier Marine Armor", floor(scale * 15), /obj/item/clothing/suit/storage/marine/medium/carrier, VENDOR_ITEM_REGULAR), + list("M3 Pattern Padded Marine Armor", floor(scale * 15), /obj/item/clothing/suit/storage/marine/medium/padded, VENDOR_ITEM_REGULAR), + list("M3 Pattern Padless Marine Armor", floor(scale * 15), /obj/item/clothing/suit/storage/marine/medium/padless, VENDOR_ITEM_REGULAR), + list("M3 Pattern Ridged Marine Armor", floor(scale * 15), /obj/item/clothing/suit/storage/marine/medium/padless_lines, VENDOR_ITEM_REGULAR), + list("M3 Pattern Skull Marine Armor", floor(scale * 15), /obj/item/clothing/suit/storage/marine/medium/skull, VENDOR_ITEM_REGULAR), + list("M3 Pattern Smooth Marine Armor", floor(scale * 15), /obj/item/clothing/suit/storage/marine/medium/smooth, VENDOR_ITEM_REGULAR), + list("M3-EOD Pattern Heavy Armor", floor(scale * 10), /obj/item/clothing/suit/storage/marine/heavy, VENDOR_ITEM_REGULAR), + list("M3-L Pattern Light Armor", floor(scale * 10), /obj/item/clothing/suit/storage/marine/light, VENDOR_ITEM_REGULAR), list("BACKPACK", -1, null, null, null), - list("Lightweight IMP Backpack", round(scale * 15), /obj/item/storage/backpack/marine, VENDOR_ITEM_REGULAR), - list("Technician Backpack", round(scale * 15), /obj/item/storage/backpack/marine/tech, VENDOR_ITEM_REGULAR), - list("Medical Backpack", round(scale * 15), /obj/item/storage/backpack/marine/medic, VENDOR_ITEM_REGULAR), - list("USCM Satchel", round(scale * 15), /obj/item/storage/backpack/marine/satchel, VENDOR_ITEM_REGULAR), - list("USCM Chestrig", round(scale * 15), /obj/item/storage/backpack/marine/satchel/chestrig, VENDOR_ITEM_REGULAR), - list("USCM Technical Satchel", round(scale * 15), /obj/item/storage/backpack/marine/satchel/tech, VENDOR_ITEM_REGULAR), - list("USCM Technical Chestrig", round(scale * 15), /obj/item/storage/backpack/marine/engineerpack/welder_chestrig, VENDOR_ITEM_REGULAR), - list("Medical Satchel", round(scale * 15), /obj/item/storage/backpack/marine/satchel/medic, VENDOR_ITEM_REGULAR), - list("Shotgun Scabbard", round(scale * 5), /obj/item/storage/large_holster/m37, VENDOR_ITEM_REGULAR), + list("Lightweight IMP Backpack", floor(scale * 15), /obj/item/storage/backpack/marine, VENDOR_ITEM_REGULAR), + list("Technician Backpack", floor(scale * 15), /obj/item/storage/backpack/marine/tech, VENDOR_ITEM_REGULAR), + list("Medical Backpack", floor(scale * 15), /obj/item/storage/backpack/marine/medic, VENDOR_ITEM_REGULAR), + list("USCM Satchel", floor(scale * 15), /obj/item/storage/backpack/marine/satchel, VENDOR_ITEM_REGULAR), + list("USCM Chestrig", floor(scale * 15), /obj/item/storage/backpack/marine/satchel/chestrig, VENDOR_ITEM_REGULAR), + list("USCM Technical Satchel", floor(scale * 15), /obj/item/storage/backpack/marine/satchel/tech, VENDOR_ITEM_REGULAR), + list("USCM Technical Chestrig", floor(scale * 15), /obj/item/storage/backpack/marine/engineerpack/welder_chestrig, VENDOR_ITEM_REGULAR), + list("Medical Satchel", floor(scale * 15), /obj/item/storage/backpack/marine/satchel/medic, VENDOR_ITEM_REGULAR), + list("Shotgun Scabbard", floor(scale * 5), /obj/item/storage/large_holster/m37, VENDOR_ITEM_REGULAR), list("RESTRICTED BACKPACKS", -1, null, null), list("USCM Technician Welderpack", 1.25, /obj/item/storage/backpack/marine/engineerpack, VENDOR_ITEM_REGULAR), - list("Technician Welder-Satchel", round(scale * 2), /obj/item/storage/backpack/marine/engineerpack/satchel, VENDOR_ITEM_REGULAR), + list("Technician Welder-Satchel", floor(scale * 2), /obj/item/storage/backpack/marine/engineerpack/satchel, VENDOR_ITEM_REGULAR), list("Radio Telephone Backpack", 0.75, /obj/item/storage/backpack/marine/satchel/rto, VENDOR_ITEM_REGULAR), list("BELTS", -1, null, null), - list("M276 Pattern Ammo Load Rig", round(scale * 15), /obj/item/storage/belt/marine, VENDOR_ITEM_REGULAR), - list("M276 Pattern M40 Grenade Rig", round(scale * 10), /obj/item/storage/belt/grenade, VENDOR_ITEM_REGULAR), - list("M276 Pattern Shotgun Shell Loading Rig", round(scale * 15), /obj/item/storage/belt/shotgun, VENDOR_ITEM_REGULAR), - list("M276 Pattern General Pistol Holster Rig", round(scale * 15), /obj/item/storage/belt/gun/m4a3, VENDOR_ITEM_REGULAR), - list("M276 Pattern M39 Holster Rig", round(scale * 15), /obj/item/storage/large_holster/m39, VENDOR_ITEM_REGULAR), - list("M276 Pattern M39 Holster Rig And Pouch", round(scale * 10), /obj/item/storage/belt/gun/m39, VENDOR_ITEM_REGULAR), - list("M276 Pattern M44 Holster Rig", round(scale * 15), /obj/item/storage/belt/gun/m44, VENDOR_ITEM_REGULAR), - list("M276 Pattern M82F Holster Rig", round(scale * 5), /obj/item/storage/belt/gun/flaregun, VENDOR_ITEM_REGULAR), - list("M276 Knife Rig (Full)", round(scale * 15), /obj/item/storage/belt/knifepouch, VENDOR_ITEM_REGULAR), - list("M276 G8-A General Utility Pouch", round(scale * 15), /obj/item/storage/backpack/general_belt, VENDOR_ITEM_REGULAR), + list("M276 Pattern Ammo Load Rig", floor(scale * 15), /obj/item/storage/belt/marine, VENDOR_ITEM_REGULAR), + list("M276 Pattern M40 Grenade Rig", floor(scale * 10), /obj/item/storage/belt/grenade, VENDOR_ITEM_REGULAR), + list("M276 Pattern Shotgun Shell Loading Rig", floor(scale * 15), /obj/item/storage/belt/shotgun, VENDOR_ITEM_REGULAR), + list("M276 Pattern General Pistol Holster Rig", floor(scale * 15), /obj/item/storage/belt/gun/m4a3, VENDOR_ITEM_REGULAR), + list("M276 Pattern M39 Holster Rig", floor(scale * 15), /obj/item/storage/large_holster/m39, VENDOR_ITEM_REGULAR), + list("M276 Pattern M39 Holster Rig And Pouch", floor(scale * 10), /obj/item/storage/belt/gun/m39, VENDOR_ITEM_REGULAR), + list("M276 Pattern M44 Holster Rig", floor(scale * 15), /obj/item/storage/belt/gun/m44, VENDOR_ITEM_REGULAR), + list("M276 Pattern M82F Holster Rig", floor(scale * 5), /obj/item/storage/belt/gun/flaregun, VENDOR_ITEM_REGULAR), + list("M276 Knife Rig (Full)", floor(scale * 15), /obj/item/storage/belt/knifepouch, VENDOR_ITEM_REGULAR), + list("M276 G8-A General Utility Pouch", floor(scale * 15), /obj/item/storage/backpack/general_belt, VENDOR_ITEM_REGULAR), list("POUCHES", -1, null, null, null), - list("Bayonet Sheath (Full)",round(scale * 15), /obj/item/storage/pouch/bayonet, VENDOR_ITEM_REGULAR), - list("First-Aid Pouch (Splints, Gauze, Ointment)", round(scale * 15), /obj/item/storage/pouch/firstaid/full/alternate, VENDOR_ITEM_REGULAR), - list("First-Aid Pouch (Pill Packets)", round(scale * 15), /obj/item/storage/pouch/firstaid/full/pills, VENDOR_ITEM_REGULAR), - list("Flare Pouch (Full)", round(scale * 15), /obj/item/storage/pouch/flare/full, VENDOR_ITEM_REGULAR), - list("Small Document Pouch", round(scale * 15), /obj/item/storage/pouch/document/small, VENDOR_ITEM_REGULAR), - list("Magazine Pouch", round(scale * 15), /obj/item/storage/pouch/magazine, VENDOR_ITEM_REGULAR), - list("Shotgun Shell Pouch", round(scale * 15), /obj/item/storage/pouch/shotgun, VENDOR_ITEM_REGULAR), - list("Medium General Pouch", round(scale * 15), /obj/item/storage/pouch/general/medium, VENDOR_ITEM_REGULAR), - list("Pistol Magazine Pouch", round(scale * 15), /obj/item/storage/pouch/magazine/pistol, VENDOR_ITEM_REGULAR), - list("Pistol Pouch", round(scale * 15), /obj/item/storage/pouch/pistol, VENDOR_ITEM_REGULAR), + list("Bayonet Sheath (Full)",floor(scale * 15), /obj/item/storage/pouch/bayonet, VENDOR_ITEM_REGULAR), + list("First-Aid Pouch (Splints, Gauze, Ointment)", floor(scale * 15), /obj/item/storage/pouch/firstaid/full/alternate, VENDOR_ITEM_REGULAR), + list("First-Aid Pouch (Pill Packets)", floor(scale * 15), /obj/item/storage/pouch/firstaid/full/pills, VENDOR_ITEM_REGULAR), + list("Flare Pouch (Full)", floor(scale * 15), /obj/item/storage/pouch/flare/full, VENDOR_ITEM_REGULAR), + list("Small Document Pouch", floor(scale * 15), /obj/item/storage/pouch/document/small, VENDOR_ITEM_REGULAR), + list("Magazine Pouch", floor(scale * 15), /obj/item/storage/pouch/magazine, VENDOR_ITEM_REGULAR), + list("Shotgun Shell Pouch", floor(scale * 15), /obj/item/storage/pouch/shotgun, VENDOR_ITEM_REGULAR), + list("Medium General Pouch", floor(scale * 15), /obj/item/storage/pouch/general/medium, VENDOR_ITEM_REGULAR), + list("Pistol Magazine Pouch", floor(scale * 15), /obj/item/storage/pouch/magazine/pistol, VENDOR_ITEM_REGULAR), + list("Pistol Pouch", floor(scale * 15), /obj/item/storage/pouch/pistol, VENDOR_ITEM_REGULAR), list("RESTRICTED POUCHES", -1, null, null, null), list("Construction Pouch", 1.25, /obj/item/storage/pouch/construction, VENDOR_ITEM_REGULAR), list("Explosive Pouch", 1.25, /obj/item/storage/pouch/explosive, VENDOR_ITEM_REGULAR), list("First Responder Pouch (Empty)", 2.5, /obj/item/storage/pouch/first_responder, VENDOR_ITEM_REGULAR), - list("Large Pistol Magazine Pouch", round(scale * 2), /obj/item/storage/pouch/magazine/pistol/large, VENDOR_ITEM_REGULAR), + list("Large Pistol Magazine Pouch", floor(scale * 2), /obj/item/storage/pouch/magazine/pistol/large, VENDOR_ITEM_REGULAR), list("Tools Pouch", 1.25, /obj/item/storage/pouch/tools, VENDOR_ITEM_REGULAR), list("Sling Pouch", 1.25, /obj/item/storage/pouch/sling, VENDOR_ITEM_REGULAR), list("MASK", -1, null, null, null), - list("Gas Mask", round(scale * 15), /obj/item/clothing/mask/gas, VENDOR_ITEM_REGULAR), - list("Heat Absorbent Coif", round(scale * 10), /obj/item/clothing/mask/rebreather/scarf, VENDOR_ITEM_REGULAR), - list("Rebreather", round(scale * 10), /obj/item/clothing/mask/rebreather, MARINE_CAN_BUY_MASK, VENDOR_ITEM_REGULAR), + list("Gas Mask", floor(scale * 15), /obj/item/clothing/mask/gas, VENDOR_ITEM_REGULAR), + list("Heat Absorbent Coif", floor(scale * 10), /obj/item/clothing/mask/rebreather/scarf, VENDOR_ITEM_REGULAR), + list("Rebreather", floor(scale * 10), /obj/item/clothing/mask/rebreather, MARINE_CAN_BUY_MASK, VENDOR_ITEM_REGULAR), list("MISCELLANEOUS", -1, null, null, null), - list("Ballistic goggles", round(scale * 10), /obj/item/clothing/glasses/mgoggles, VENDOR_ITEM_REGULAR), - list("M1A1 Ballistic goggles", round(scale * 10), /obj/item/clothing/glasses/mgoggles/v2, VENDOR_ITEM_REGULAR), - list("Prescription ballistic goggles", round(scale * 10), /obj/item/clothing/glasses/mgoggles/prescription, VENDOR_ITEM_REGULAR), - list("Marine RPG glasses", round(scale * 10), /obj/item/clothing/glasses/regular, VENDOR_ITEM_REGULAR), - list("M5 Integrated Gas Mask", round(scale * 10), /obj/item/prop/helmetgarb/helmet_gasmask, VENDOR_ITEM_REGULAR), - list("M10 Helmet Netting", round(scale * 10), /obj/item/prop/helmetgarb/netting, VENDOR_ITEM_REGULAR), - list("M10 Helmet Rain Cover", round(scale * 10), /obj/item/prop/helmetgarb/raincover, VENDOR_ITEM_REGULAR), - list("Firearm Lubricant", round(scale * 15), /obj/item/prop/helmetgarb/gunoil, VENDOR_ITEM_REGULAR), - list("USCM Flair", round(scale * 15), /obj/item/prop/helmetgarb/flair_uscm, VENDOR_ITEM_REGULAR), - list("Falling Falcons Shoulder Patch", round(scale * 15), /obj/item/clothing/accessory/patch/falcon, VENDOR_ITEM_REGULAR), - list("USCM Shoulder Patch", round(scale * 15), /obj/item/clothing/accessory/patch, VENDOR_ITEM_REGULAR), - list("Bedroll", round(scale * 20), /obj/item/roller/bedroll, VENDOR_ITEM_REGULAR), + list("Ballistic goggles", floor(scale * 10), /obj/item/clothing/glasses/mgoggles, VENDOR_ITEM_REGULAR), + list("M1A1 Ballistic goggles", floor(scale * 10), /obj/item/clothing/glasses/mgoggles/v2, VENDOR_ITEM_REGULAR), + list("Prescription ballistic goggles", floor(scale * 10), /obj/item/clothing/glasses/mgoggles/prescription, VENDOR_ITEM_REGULAR), + list("Marine RPG glasses", floor(scale * 10), /obj/item/clothing/glasses/regular, VENDOR_ITEM_REGULAR), + list("M5 Integrated Gas Mask", floor(scale * 10), /obj/item/prop/helmetgarb/helmet_gasmask, VENDOR_ITEM_REGULAR), + list("M10 Helmet Netting", floor(scale * 10), /obj/item/prop/helmetgarb/netting, VENDOR_ITEM_REGULAR), + list("M10 Helmet Rain Cover", floor(scale * 10), /obj/item/prop/helmetgarb/raincover, VENDOR_ITEM_REGULAR), + list("Firearm Lubricant", floor(scale * 15), /obj/item/prop/helmetgarb/gunoil, VENDOR_ITEM_REGULAR), + list("USCM Flair", floor(scale * 15), /obj/item/prop/helmetgarb/flair_uscm, VENDOR_ITEM_REGULAR), + list("Falling Falcons Shoulder Patch", floor(scale * 15), /obj/item/clothing/accessory/patch/falcon, VENDOR_ITEM_REGULAR), + list("USCM Shoulder Patch", floor(scale * 15), /obj/item/clothing/accessory/patch, VENDOR_ITEM_REGULAR), + list("Bedroll", floor(scale * 20), /obj/item/roller/bedroll, VENDOR_ITEM_REGULAR), list("OPTICS", -1, null, null, null), - list("Advanced Medical Optic (CORPSMAN ONLY)", round(scale * 4), /obj/item/device/helmet_visor/medical/advanced, VENDOR_ITEM_REGULAR), - list("Squad Optic", round(scale * 15), /obj/item/device/helmet_visor, VENDOR_ITEM_REGULAR), + list("Advanced Medical Optic (CORPSMAN ONLY)", floor(scale * 4), /obj/item/device/helmet_visor/medical/advanced, VENDOR_ITEM_REGULAR), + list("Squad Optic", floor(scale * 15), /obj/item/device/helmet_visor, VENDOR_ITEM_REGULAR), ) @@ -207,6 +207,7 @@ req_one_access = list(ACCESS_MARINE_ALPHA, ACCESS_MARINE_DATABASE, ACCESS_MARINE_CARGO) /obj/structure/machinery/cm_vending/sorted/uniform_supply/squad_prep/alpha/populate_product_list(scale) + ..() listed_products += list( list("HEADSET", -1, null, null), list("Marine Alpha Radio Headset", 10, /obj/item/device/radio/headset/almayer/marine/alpha, VENDOR_ITEM_REGULAR), @@ -217,6 +218,7 @@ req_one_access = list(ACCESS_MARINE_BRAVO, ACCESS_MARINE_DATABASE, ACCESS_MARINE_CARGO) /obj/structure/machinery/cm_vending/sorted/uniform_supply/squad_prep/bravo/populate_product_list(scale) + ..() listed_products += list( list("HEADSET", -1, null, null), list("Marine Bravo Radio Headset", 10, /obj/item/device/radio/headset/almayer/marine/bravo, VENDOR_ITEM_REGULAR), @@ -227,6 +229,7 @@ req_one_access = list(ACCESS_MARINE_CHARLIE, ACCESS_MARINE_DATABASE, ACCESS_MARINE_CARGO) /obj/structure/machinery/cm_vending/sorted/uniform_supply/squad_prep/charlie/populate_product_list(scale) + ..() listed_products += list( list("HEADSET", -1, null, null), list("Marine Charlie Radio Headset", 10, /obj/item/device/radio/headset/almayer/marine/charlie, VENDOR_ITEM_REGULAR), @@ -237,6 +240,7 @@ req_one_access = list(ACCESS_MARINE_DELTA, ACCESS_MARINE_DATABASE, ACCESS_MARINE_CARGO) /obj/structure/machinery/cm_vending/sorted/uniform_supply/squad_prep/delta/populate_product_list(scale) + ..() listed_products += list( list("HEADSET", -1, null, null), list("Marine Delta Radio Headset", 10, /obj/item/device/radio/headset/almayer/marine/delta, VENDOR_ITEM_REGULAR), @@ -262,8 +266,8 @@ listed_products = list( list("ARMOR-PIERCING AMMUNITION", -1, null, null), list("M4RA AP Magazine (10x24mm)", 3.5, /obj/item/ammo_magazine/rifle/m4ra/ap, VENDOR_ITEM_REGULAR), - list("M39 AP Magazine (10x20mm)", round(scale * 3), /obj/item/ammo_magazine/smg/m39/ap, VENDOR_ITEM_REGULAR), - list("M41A AP Magazine (10x24mm)", round(scale * 3), /obj/item/ammo_magazine/rifle/ap, VENDOR_ITEM_REGULAR), + list("M39 AP Magazine (10x20mm)", floor(scale * 3), /obj/item/ammo_magazine/smg/m39/ap, VENDOR_ITEM_REGULAR), + list("M41A AP Magazine (10x24mm)", floor(scale * 3), /obj/item/ammo_magazine/rifle/ap, VENDOR_ITEM_REGULAR), list("EXTENDED AMMUNITION", -1, null, null), list("M39 Extended Magazine (10x20mm)", 1.8, /obj/item/ammo_magazine/smg/m39/extended, VENDOR_ITEM_REGULAR), @@ -271,19 +275,19 @@ list("SPECIAL AMMUNITION", -1, null, null), list("M56 Smartgun Drum", 1, /obj/item/ammo_magazine/smartgun, VENDOR_ITEM_REGULAR), - list("M44 Heavy Speed Loader (.44)", round(scale * 2), /obj/item/ammo_magazine/revolver/heavy, VENDOR_ITEM_REGULAR), - list("M44 Marksman Speed Loader (.44)", round(scale * 2), /obj/item/ammo_magazine/revolver/marksman, VENDOR_ITEM_REGULAR), + list("M44 Heavy Speed Loader (.44)", floor(scale * 2), /obj/item/ammo_magazine/revolver/heavy, VENDOR_ITEM_REGULAR), + list("M44 Marksman Speed Loader (.44)", floor(scale * 2), /obj/item/ammo_magazine/revolver/marksman, VENDOR_ITEM_REGULAR), list("RESTRICTED FIREARM AMMUNITION", -1, null, null), - list("VP78 Magazine", round(scale * 5), /obj/item/ammo_magazine/pistol/vp78, VENDOR_ITEM_REGULAR), - list("SU-6 Smartpistol Magazine (.45)", round(scale * 5), /obj/item/ammo_magazine/pistol/smart, VENDOR_ITEM_REGULAR), - list("M240 Incinerator Tank", round(scale * 3), /obj/item/ammo_magazine/flamer_tank, VENDOR_ITEM_REGULAR), - list("M56D Drum Magazine", round(scale * 2), /obj/item/ammo_magazine/m56d, VENDOR_ITEM_REGULAR), - list("M2C Box Magazine", round(scale * 2), /obj/item/ammo_magazine/m2c, VENDOR_ITEM_REGULAR), - list("Box of Breaching Shells (16g)", round(scale * 2), /obj/item/ammo_magazine/shotgun/light/breaching, VENDOR_ITEM_REGULAR), - list("HIRR Baton Slugs", round(scale * 6), /obj/item/explosive/grenade/slug/baton, VENDOR_ITEM_REGULAR), - list("M74 AGM-S Star Shell", round(scale * 4), /obj/item/explosive/grenade/high_explosive/airburst/starshell, VENDOR_ITEM_REGULAR), - list("M74 AGM-S Hornet Shell", round(scale * 4), /obj/item/explosive/grenade/high_explosive/airburst/hornet_shell, VENDOR_ITEM_REGULAR), + list("VP78 Magazine", floor(scale * 5), /obj/item/ammo_magazine/pistol/vp78, VENDOR_ITEM_REGULAR), + list("SU-6 Smartpistol Magazine (.45)", floor(scale * 5), /obj/item/ammo_magazine/pistol/smart, VENDOR_ITEM_REGULAR), + list("M240 Incinerator Tank", floor(scale * 3), /obj/item/ammo_magazine/flamer_tank, VENDOR_ITEM_REGULAR), + list("M56D Drum Magazine", floor(scale * 2), /obj/item/ammo_magazine/m56d, VENDOR_ITEM_REGULAR), + list("M2C Box Magazine", floor(scale * 2), /obj/item/ammo_magazine/m2c, VENDOR_ITEM_REGULAR), + list("Box of Breaching Shells (16g)", floor(scale * 2), /obj/item/ammo_magazine/shotgun/light/breaching, VENDOR_ITEM_REGULAR), + list("HIRR Baton Slugs", floor(scale * 6), /obj/item/explosive/grenade/slug/baton, VENDOR_ITEM_REGULAR), + list("M74 AGM-S Star Shell", floor(scale * 4), /obj/item/explosive/grenade/high_explosive/airburst/starshell, VENDOR_ITEM_REGULAR), + list("M74 AGM-S Hornet Shell", floor(scale * 4), /obj/item/explosive/grenade/high_explosive/airburst/hornet_shell, VENDOR_ITEM_REGULAR), ) //--------------SQUAD ARMAMENTS VENDOR-------------- @@ -305,36 +309,36 @@ /obj/structure/machinery/cm_vending/sorted/cargo_guns/squad/populate_product_list(scale) listed_products = list( list("FOOD", -1, null, null), - list("MRE", round(scale * 5), /obj/item/storage/box/MRE, VENDOR_ITEM_REGULAR), - list("MRE Box", round(scale * 1), /obj/item/ammo_box/magazine/misc/mre, VENDOR_ITEM_REGULAR), + list("MRE", floor(scale * 5), /obj/item/storage/box/MRE, VENDOR_ITEM_REGULAR), + list("MRE Box", floor(scale * 1), /obj/item/ammo_box/magazine/misc/mre, VENDOR_ITEM_REGULAR), list("TOOLS", -1, null, null), - list("Entrenching Tool (ET)", round(scale * 2), /obj/item/tool/shovel/etool/folded, VENDOR_ITEM_REGULAR), - list("Screwdriver", round(scale * 5), /obj/item/tool/screwdriver, VENDOR_ITEM_REGULAR), - list("Wirecutters", round(scale * 5), /obj/item/tool/wirecutters, VENDOR_ITEM_REGULAR), - list("Crowbar", round(scale * 5), /obj/item/tool/crowbar, VENDOR_ITEM_REGULAR), - list("Wrench", round(scale * 5), /obj/item/tool/wrench, VENDOR_ITEM_REGULAR), - list("Multitool", round(scale * 1), /obj/item/device/multitool, VENDOR_ITEM_REGULAR), - list("ME3 hand welder", round(scale * 1), /obj/item/tool/weldingtool/simple, VENDOR_ITEM_REGULAR), + list("Entrenching Tool (ET)", floor(scale * 2), /obj/item/tool/shovel/etool/folded, VENDOR_ITEM_REGULAR), + list("Screwdriver", floor(scale * 5), /obj/item/tool/screwdriver, VENDOR_ITEM_REGULAR), + list("Wirecutters", floor(scale * 5), /obj/item/tool/wirecutters, VENDOR_ITEM_REGULAR), + list("Crowbar", floor(scale * 5), /obj/item/tool/crowbar, VENDOR_ITEM_REGULAR), + list("Wrench", floor(scale * 5), /obj/item/tool/wrench, VENDOR_ITEM_REGULAR), + list("Multitool", floor(scale * 1), /obj/item/device/multitool, VENDOR_ITEM_REGULAR), + list("ME3 hand welder", floor(scale * 1), /obj/item/tool/weldingtool/simple, VENDOR_ITEM_REGULAR), list("FLARE AND LIGHT", -1, null, null), - list("Combat Flashlight", round(scale * 5), /obj/item/device/flashlight/combat, VENDOR_ITEM_REGULAR), - list("Box of Flashlight", round(scale * 1), /obj/item/ammo_box/magazine/misc/flashlight, VENDOR_ITEM_REGULAR), - list("Box of Flares", round(scale * 1), /obj/item/ammo_box/magazine/misc/flares, VENDOR_ITEM_REGULAR), - list("M94 Marking Flare Pack", round(scale * 10), /obj/item/storage/box/m94, VENDOR_ITEM_REGULAR), - list("M89-S Signal Flare Pack", round(scale * 1), /obj/item/storage/box/m94/signal, VENDOR_ITEM_REGULAR), + list("Combat Flashlight", floor(scale * 5), /obj/item/device/flashlight/combat, VENDOR_ITEM_REGULAR), + list("Box of Flashlight", floor(scale * 1), /obj/item/ammo_box/magazine/misc/flashlight, VENDOR_ITEM_REGULAR), + list("Box of Flares", floor(scale * 1), /obj/item/ammo_box/magazine/misc/flares, VENDOR_ITEM_REGULAR), + list("M94 Marking Flare Pack", floor(scale * 10), /obj/item/storage/box/m94, VENDOR_ITEM_REGULAR), + list("M89-S Signal Flare Pack", floor(scale * 1), /obj/item/storage/box/m94/signal, VENDOR_ITEM_REGULAR), list("MISCELLANEOUS", -1, null, null), - list("Engineer Kit", round(scale * 1), /obj/item/storage/toolkit/empty, VENDOR_ITEM_REGULAR), - list("Map", round(scale * 5), /obj/item/map/current_map, VENDOR_ITEM_REGULAR), - list("Extinguisher", round(scale * 5), /obj/item/tool/extinguisher, VENDOR_ITEM_REGULAR), - list("Fire Extinguisher (Portable)", round(scale * 1), /obj/item/tool/extinguisher/mini, VENDOR_ITEM_REGULAR), - list("Roller Bed", round(scale * 1), /obj/item/roller, VENDOR_ITEM_REGULAR), - list("Machete Scabbard (Full)", round(scale * 5), /obj/item/storage/large_holster/machete/full, VENDOR_ITEM_REGULAR), - list("Binoculars", round(scale * 1), /obj/item/device/binoculars, VENDOR_ITEM_REGULAR), - list("MB-6 Folding Barricades (x3)", round(scale * 2), /obj/item/stack/folding_barricade/three, VENDOR_ITEM_REGULAR), - list("Spare PDT/L Battle Buddy Kit", round(scale * 3), /obj/item/storage/box/pdt_kit, VENDOR_ITEM_REGULAR), - list("W-Y brand rechargeable mini-battery", round(scale * 2.5), /obj/item/cell/crap, VENDOR_ITEM_REGULAR) + list("Engineer Kit", floor(scale * 1), /obj/item/storage/toolkit/empty, VENDOR_ITEM_REGULAR), + list("Map", floor(scale * 5), /obj/item/map/current_map, VENDOR_ITEM_REGULAR), + list("Extinguisher", floor(scale * 5), /obj/item/tool/extinguisher, VENDOR_ITEM_REGULAR), + list("Fire Extinguisher (Portable)", floor(scale * 1), /obj/item/tool/extinguisher/mini, VENDOR_ITEM_REGULAR), + list("Roller Bed", floor(scale * 1), /obj/item/roller, VENDOR_ITEM_REGULAR), + list("Machete Scabbard (Full)", floor(scale * 5), /obj/item/storage/large_holster/machete/full, VENDOR_ITEM_REGULAR), + list("Binoculars", floor(scale * 1), /obj/item/device/binoculars, VENDOR_ITEM_REGULAR), + list("MB-6 Folding Barricades (x3)", floor(scale * 2), /obj/item/stack/folding_barricade/three, VENDOR_ITEM_REGULAR), + list("Spare PDT/L Battle Buddy Kit", floor(scale * 3), /obj/item/storage/box/pdt_kit, VENDOR_ITEM_REGULAR), + list("W-Y brand rechargeable mini-battery", floor(scale * 2.5), /obj/item/cell/crap, VENDOR_ITEM_REGULAR) ) //--------------SQUAD ATTACHMENTS VENDOR-------------- diff --git a/code/game/machinery/vending/vendor_types/wo_vendors.dm b/code/game/machinery/vending/vendor_types/wo_vendors.dm index 160e808a4a50..4cb6c689ef35 100644 --- a/code/game/machinery/vending/vendor_types/wo_vendors.dm +++ b/code/game/machinery/vending/vendor_types/wo_vendors.dm @@ -22,19 +22,19 @@ list("Technician Welder-Satchel", 10, /obj/item/storage/backpack/marine/engineerpack/satchel, VENDOR_ITEM_REGULAR), list("POUCHES", -1, null, null), - list("Construction Pouch", round(scale * 2), /obj/item/storage/pouch/construction, VENDOR_ITEM_REGULAR), - list("Explosive Pouch", round(scale * 2), /obj/item/storage/pouch/explosive, VENDOR_ITEM_REGULAR), - list("First-Aid Pouch (Full)", round(scale * 5), /obj/item/storage/pouch/firstaid/full, VENDOR_ITEM_REGULAR), - list("First Responder Pouch", round(scale * 2), /obj/item/storage/pouch/first_responder, VENDOR_ITEM_REGULAR), - list("Flare Pouch", round(scale * 5), /obj/item/storage/pouch/flare/full, VENDOR_ITEM_REGULAR), - list("Large Pistol Magazine Pouch", round(scale * 3), /obj/item/storage/pouch/magazine/pistol/large, VENDOR_ITEM_REGULAR), - list("Magazine Pouch", round(scale * 5), /obj/item/storage/pouch/magazine, VENDOR_ITEM_REGULAR), - list("Medical Pouch", round(scale * 2), /obj/item/storage/pouch/medical, VENDOR_ITEM_REGULAR), - list("Medium General Pouch", round(scale * 2), /obj/item/storage/pouch/general/medium, VENDOR_ITEM_REGULAR), - list("Medkit Pouch", round(scale * 2), /obj/item/storage/pouch/medkit, VENDOR_ITEM_REGULAR), - list("Sidearm Pouch", round(scale * 15), /obj/item/storage/pouch/pistol, VENDOR_ITEM_REGULAR), - list("Syringe Pouch", round(scale * 2), /obj/item/storage/pouch/syringe, VENDOR_ITEM_REGULAR), - list("Tools Pouch", round(scale * 2), /obj/item/storage/pouch/tools, VENDOR_ITEM_REGULAR), + list("Construction Pouch", floor(scale * 2), /obj/item/storage/pouch/construction, VENDOR_ITEM_REGULAR), + list("Explosive Pouch", floor(scale * 2), /obj/item/storage/pouch/explosive, VENDOR_ITEM_REGULAR), + list("First-Aid Pouch (Full)", floor(scale * 5), /obj/item/storage/pouch/firstaid/full, VENDOR_ITEM_REGULAR), + list("First Responder Pouch", floor(scale * 2), /obj/item/storage/pouch/first_responder, VENDOR_ITEM_REGULAR), + list("Flare Pouch", floor(scale * 5), /obj/item/storage/pouch/flare/full, VENDOR_ITEM_REGULAR), + list("Large Pistol Magazine Pouch", floor(scale * 3), /obj/item/storage/pouch/magazine/pistol/large, VENDOR_ITEM_REGULAR), + list("Magazine Pouch", floor(scale * 5), /obj/item/storage/pouch/magazine, VENDOR_ITEM_REGULAR), + list("Medical Pouch", floor(scale * 2), /obj/item/storage/pouch/medical, VENDOR_ITEM_REGULAR), + list("Medium General Pouch", floor(scale * 2), /obj/item/storage/pouch/general/medium, VENDOR_ITEM_REGULAR), + list("Medkit Pouch", floor(scale * 2), /obj/item/storage/pouch/medkit, VENDOR_ITEM_REGULAR), + list("Sidearm Pouch", floor(scale * 15), /obj/item/storage/pouch/pistol, VENDOR_ITEM_REGULAR), + list("Syringe Pouch", floor(scale * 2), /obj/item/storage/pouch/syringe, VENDOR_ITEM_REGULAR), + list("Tools Pouch", floor(scale * 2), /obj/item/storage/pouch/tools, VENDOR_ITEM_REGULAR), list("RADIO HEADSETS", -1, null, null), list("Marine Alpha Radio Headset", 10, /obj/item/device/radio/headset/almayer/marine/alpha, VENDOR_ITEM_REGULAR), @@ -71,42 +71,42 @@ /obj/structure/machinery/cm_vending/sorted/cargo_guns/squad_prep/wo/populate_product_list(scale) listed_products = list( list("PRIMARY FIREARMS", -1, null, null), - list("M4RA Battle Rifle", round(scale * 10), /obj/item/weapon/gun/rifle/m4ra, VENDOR_ITEM_REGULAR), - list("M37A2 Pump Shotgun", round(scale * 15), /obj/item/weapon/gun/shotgun/pump, VENDOR_ITEM_REGULAR), - list("M39 Submachine Gun", round(scale * 30), /obj/item/weapon/gun/smg/m39, VENDOR_ITEM_REGULAR), - list("M41A Pulse Rifle MK1", round(scale * 30), /obj/item/weapon/gun/rifle/m41aMK1, VENDOR_ITEM_REGULAR), - list("M41A Pulse Rifle MK2", round(scale * 30), /obj/item/weapon/gun/rifle/m41a, VENDOR_ITEM_REGULAR), + list("M4RA Battle Rifle", floor(scale * 10), /obj/item/weapon/gun/rifle/m4ra, VENDOR_ITEM_REGULAR), + list("M37A2 Pump Shotgun", floor(scale * 15), /obj/item/weapon/gun/shotgun/pump, VENDOR_ITEM_REGULAR), + list("M39 Submachine Gun", floor(scale * 30), /obj/item/weapon/gun/smg/m39, VENDOR_ITEM_REGULAR), + list("M41A Pulse Rifle MK1", floor(scale * 30), /obj/item/weapon/gun/rifle/m41aMK1, VENDOR_ITEM_REGULAR), + list("M41A Pulse Rifle MK2", floor(scale * 30), /obj/item/weapon/gun/rifle/m41a, VENDOR_ITEM_REGULAR), list("PRIMARY AMMUNITION", -1, null, null), - list("Box of Buckshot Shells (12g)", round(scale * 10), /obj/item/ammo_magazine/shotgun/buckshot, VENDOR_ITEM_REGULAR), - list("Box of Flechette Shells (12g)", round(scale * 4), /obj/item/ammo_magazine/shotgun/flechette, VENDOR_ITEM_REGULAR), - list("Box of Shotgun Slugs (12g)", round(scale * 10), /obj/item/ammo_magazine/shotgun/slugs, VENDOR_ITEM_REGULAR), - list("M4RA Magazine (10x24mm)", round(scale * 15), /obj/item/ammo_magazine/rifle/m4ra, VENDOR_ITEM_REGULAR), - list("M39 HV Magazine (10x20mm)", round(scale * 25), /obj/item/ammo_magazine/smg/m39, VENDOR_ITEM_REGULAR), - list("M41A MK1 Magazine (10x24mm)", round(scale * 25), /obj/item/ammo_magazine/rifle/m41aMK1, VENDOR_ITEM_REGULAR), - list("M41A MK2 Magazine (10x24mm)", round(scale * 25), /obj/item/ammo_magazine/rifle, VENDOR_ITEM_REGULAR), + list("Box of Buckshot Shells (12g)", floor(scale * 10), /obj/item/ammo_magazine/shotgun/buckshot, VENDOR_ITEM_REGULAR), + list("Box of Flechette Shells (12g)", floor(scale * 4), /obj/item/ammo_magazine/shotgun/flechette, VENDOR_ITEM_REGULAR), + list("Box of Shotgun Slugs (12g)", floor(scale * 10), /obj/item/ammo_magazine/shotgun/slugs, VENDOR_ITEM_REGULAR), + list("M4RA Magazine (10x24mm)", floor(scale * 15), /obj/item/ammo_magazine/rifle/m4ra, VENDOR_ITEM_REGULAR), + list("M39 HV Magazine (10x20mm)", floor(scale * 25), /obj/item/ammo_magazine/smg/m39, VENDOR_ITEM_REGULAR), + list("M41A MK1 Magazine (10x24mm)", floor(scale * 25), /obj/item/ammo_magazine/rifle/m41aMK1, VENDOR_ITEM_REGULAR), + list("M41A MK2 Magazine (10x24mm)", floor(scale * 25), /obj/item/ammo_magazine/rifle, VENDOR_ITEM_REGULAR), list("SIDEARMS", -1, null, null), - list("88 Mod 4 Combat Pistol", round(scale * 25), /obj/item/weapon/gun/pistol/mod88, VENDOR_ITEM_REGULAR), - list("M44 Combat Revolver", round(scale * 25), /obj/item/weapon/gun/revolver/m44, VENDOR_ITEM_REGULAR), - list("M4A3 Service Pistol", round(scale * 25), /obj/item/weapon/gun/pistol/m4a3, VENDOR_ITEM_REGULAR), - list("M82F Flare Gun", round(scale * 5), /obj/item/weapon/gun/flare, VENDOR_ITEM_REGULAR), + list("88 Mod 4 Combat Pistol", floor(scale * 25), /obj/item/weapon/gun/pistol/mod88, VENDOR_ITEM_REGULAR), + list("M44 Combat Revolver", floor(scale * 25), /obj/item/weapon/gun/revolver/m44, VENDOR_ITEM_REGULAR), + list("M4A3 Service Pistol", floor(scale * 25), /obj/item/weapon/gun/pistol/m4a3, VENDOR_ITEM_REGULAR), + list("M82F Flare Gun", floor(scale * 5), /obj/item/weapon/gun/flare, VENDOR_ITEM_REGULAR), list("SIDEARM AMMUNITION", -1, null, null), - list("88M4 AP Magazine (9mm)", round(scale * 25), /obj/item/ammo_magazine/pistol/mod88, VENDOR_ITEM_REGULAR), - list("M44 Speedloader (.44)", round(scale * 20), /obj/item/ammo_magazine/revolver, VENDOR_ITEM_REGULAR), - list("M4A3 Magazine (9mm)", round(scale * 25), /obj/item/ammo_magazine/pistol, VENDOR_ITEM_REGULAR), + list("88M4 AP Magazine (9mm)", floor(scale * 25), /obj/item/ammo_magazine/pistol/mod88, VENDOR_ITEM_REGULAR), + list("M44 Speedloader (.44)", floor(scale * 20), /obj/item/ammo_magazine/revolver, VENDOR_ITEM_REGULAR), + list("M4A3 Magazine (9mm)", floor(scale * 25), /obj/item/ammo_magazine/pistol, VENDOR_ITEM_REGULAR), list("ATTACHMENTS", -1, null, null), - list("M39 Folding Stock", round(scale * 10), /obj/item/attachable/stock/smg/collapsible, VENDOR_ITEM_REGULAR), - list("Rail Flashlight", round(scale * 25), /obj/item/attachable/flashlight, VENDOR_ITEM_REGULAR), - list("Underbarrel Flashlight Grip", round(scale * 10), /obj/item/attachable/flashlight/grip, VENDOR_ITEM_REGULAR), - list("Underslung Grenade Launcher", round(scale * 25), /obj/item/attachable/attached_gun/grenade, VENDOR_ITEM_REGULAR), //They already get these as on-spawns, might as well formalize some spares. + list("M39 Folding Stock", floor(scale * 10), /obj/item/attachable/stock/smg/collapsible, VENDOR_ITEM_REGULAR), + list("Rail Flashlight", floor(scale * 25), /obj/item/attachable/flashlight, VENDOR_ITEM_REGULAR), + list("Underbarrel Flashlight Grip", floor(scale * 10), /obj/item/attachable/flashlight/grip, VENDOR_ITEM_REGULAR), + list("Underslung Grenade Launcher", floor(scale * 25), /obj/item/attachable/attached_gun/grenade, VENDOR_ITEM_REGULAR), //They already get these as on-spawns, might as well formalize some spares. list("UTILITIES", -1, null, null), - list("M5 Bayonet", round(scale * 25), /obj/item/attachable/bayonet, VENDOR_ITEM_REGULAR), - list("M11 Throwing Knife", round(scale * 10), /obj/item/weapon/throwing_knife, VENDOR_ITEM_REGULAR), - list("M94 Marking Flare Pack", round(scale * 10), /obj/item/storage/box/m94, VENDOR_ITEM_REGULAR) + list("M5 Bayonet", floor(scale * 25), /obj/item/attachable/bayonet, VENDOR_ITEM_REGULAR), + list("M11 Throwing Knife", floor(scale * 10), /obj/item/weapon/throwing_knife, VENDOR_ITEM_REGULAR), + list("M94 Marking Flare Pack", floor(scale * 10), /obj/item/storage/box/m94, VENDOR_ITEM_REGULAR) ) //------------REQ AMMUNITION VENDOR--------------- @@ -118,30 +118,30 @@ ..() listed_products += list( list("EXTRA SCOUT AMMUNITION", -1, null, null, null), - list("A19 High Velocity Impact Magazine (10x24mm)", round(scale * 1), /obj/item/ammo_magazine/rifle/m4ra/custom/impact, VENDOR_ITEM_REGULAR), - list("A19 High Velocity Incendiary Magazine (10x24mm)", round(scale * 1), /obj/item/ammo_magazine/rifle/m4ra/custom/incendiary, VENDOR_ITEM_REGULAR), - list("A19 High Velocity Magazine (10x24mm)", round(scale * 1.5), /obj/item/ammo_magazine/rifle/m4ra/custom, VENDOR_ITEM_REGULAR), + list("A19 High Velocity Impact Magazine (10x24mm)", floor(scale * 1), /obj/item/ammo_magazine/rifle/m4ra/custom/impact, VENDOR_ITEM_REGULAR), + list("A19 High Velocity Incendiary Magazine (10x24mm)", floor(scale * 1), /obj/item/ammo_magazine/rifle/m4ra/custom/incendiary, VENDOR_ITEM_REGULAR), + list("A19 High Velocity Magazine (10x24mm)", floor(scale * 1.5), /obj/item/ammo_magazine/rifle/m4ra/custom, VENDOR_ITEM_REGULAR), list("EXTRA SNIPER AMMUNITION", -1, null, null, null), - list("M42A Flak Magazine (10x28mm)", round(scale * 1), /obj/item/ammo_magazine/sniper/flak, VENDOR_ITEM_REGULAR), - list("M42A Incendiary Magazine (10x28mm)", round(scale * 1), /obj/item/ammo_magazine/sniper/incendiary, VENDOR_ITEM_REGULAR), - list("M42A Marksman Magazine (10x28mm Caseless)", round(scale * 1.5), /obj/item/ammo_magazine/sniper, VENDOR_ITEM_REGULAR), + list("M42A Flak Magazine (10x28mm)", floor(scale * 1), /obj/item/ammo_magazine/sniper/flak, VENDOR_ITEM_REGULAR), + list("M42A Incendiary Magazine (10x28mm)", floor(scale * 1), /obj/item/ammo_magazine/sniper/incendiary, VENDOR_ITEM_REGULAR), + list("M42A Marksman Magazine (10x28mm Caseless)", floor(scale * 1.5), /obj/item/ammo_magazine/sniper, VENDOR_ITEM_REGULAR), list("EXTRA DEMOLITIONIST AMMUNITION", -1, null, null, null), - list("84mm Anti-Armor Rocket", round(scale * 1), /obj/item/ammo_magazine/rocket/ap, VENDOR_ITEM_REGULAR), - list("84mm High-Explosive Rocket", round(scale * 1), /obj/item/ammo_magazine/rocket, VENDOR_ITEM_REGULAR), - list("84mm White-Phosphorus Rocket", round(scale * 1), /obj/item/ammo_magazine/rocket/wp, VENDOR_ITEM_REGULAR), + list("84mm Anti-Armor Rocket", floor(scale * 1), /obj/item/ammo_magazine/rocket/ap, VENDOR_ITEM_REGULAR), + list("84mm High-Explosive Rocket", floor(scale * 1), /obj/item/ammo_magazine/rocket, VENDOR_ITEM_REGULAR), + list("84mm White-Phosphorus Rocket", floor(scale * 1), /obj/item/ammo_magazine/rocket/wp, VENDOR_ITEM_REGULAR), list("EXTRA GRENADES", -1, null, null, null), - list("M40 HEDP Grenade Pack (x6)", round(scale * 1.5), /obj/effect/essentials_set/hedp_6_pack, VENDOR_ITEM_REGULAR), - list("M40 HIDP Grenade Pack (x6)", round(scale * 1.5), /obj/effect/essentials_set/hidp_6_pack, VENDOR_ITEM_REGULAR), - list("M74 AGM-F Grenade Pack (x6)", round(scale * 1.5), /obj/effect/essentials_set/agmf_6_pack, VENDOR_ITEM_REGULAR), - list("M74 AGM-I Grenade Pack (x6)", round(scale * 1.5), /obj/effect/essentials_set/agmi_6_pack, VENDOR_ITEM_REGULAR), + list("M40 HEDP Grenade Pack (x6)", floor(scale * 1.5), /obj/effect/essentials_set/hedp_6_pack, VENDOR_ITEM_REGULAR), + list("M40 HIDP Grenade Pack (x6)", floor(scale * 1.5), /obj/effect/essentials_set/hidp_6_pack, VENDOR_ITEM_REGULAR), + list("M74 AGM-F Grenade Pack (x6)", floor(scale * 1.5), /obj/effect/essentials_set/agmf_6_pack, VENDOR_ITEM_REGULAR), + list("M74 AGM-I Grenade Pack (x6)", floor(scale * 1.5), /obj/effect/essentials_set/agmi_6_pack, VENDOR_ITEM_REGULAR), list("EXTRA FLAMETHROWER TANKS", -1, null, null, null), - list("Large Incinerator Tank", round(scale * 1), /obj/item/ammo_magazine/flamer_tank/large, VENDOR_ITEM_REGULAR), - list("Large Incinerator Tank (B) (Green Flame)", round(scale * 1), /obj/item/ammo_magazine/flamer_tank/large/B, VENDOR_ITEM_REGULAR), - list("Large Incinerator Tank (X) (Blue Flame)", round(scale * 1), /obj/item/ammo_magazine/flamer_tank/large/X, VENDOR_ITEM_REGULAR), + list("Large Incinerator Tank", floor(scale * 1), /obj/item/ammo_magazine/flamer_tank/large, VENDOR_ITEM_REGULAR), + list("Large Incinerator Tank (B) (Green Flame)", floor(scale * 1), /obj/item/ammo_magazine/flamer_tank/large/B, VENDOR_ITEM_REGULAR), + list("Large Incinerator Tank (X) (Blue Flame)", floor(scale * 1), /obj/item/ammo_magazine/flamer_tank/large/X, VENDOR_ITEM_REGULAR), ) //------------ARMAMENTS VENDOR--------------- diff --git a/code/game/objects/effects/decals/cleanable/misc.dm b/code/game/objects/effects/decals/cleanable/misc.dm index a88b4ea5c5ea..5969914eb743 100644 --- a/code/game/objects/effects/decals/cleanable/misc.dm +++ b/code/game/objects/effects/decals/cleanable/misc.dm @@ -99,7 +99,7 @@ appearance_flags = RESET_ALPHA | TILE_BOUND | PIXEL_SCALE garbage = FALSE /obj/effect/decal/cleanable/cobweb2/dynamic/Initialize(mapload, targetdir, webscale = 1.0) - alpha += round(webscale * 120) + alpha += floor(webscale * 120) var/angle = dir2angle(targetdir) var/matrix/TM = new TM *= webscale diff --git a/code/game/objects/effects/effect.dm b/code/game/objects/effects/effect.dm index 96de3cd9316a..a1f07214844b 100644 --- a/code/game/objects/effects/effect.dm +++ b/code/game/objects/effects/effect.dm @@ -1,5 +1,6 @@ /obj/effect icon = 'icons/effects/effects.dmi' + blocks_emissive = EMISSIVE_BLOCK_GENERIC /obj/effect/get_applying_acid_time() return -1 diff --git a/code/game/objects/effects/effect_system/chemsmoke.dm b/code/game/objects/effects/effect_system/chemsmoke.dm index 55c38215415c..ad86e66d5f0f 100644 --- a/code/game/objects/effects/effect_system/chemsmoke.dm +++ b/code/game/objects/effects/effect_system/chemsmoke.dm @@ -166,7 +166,7 @@ continue var/offset = 0 - var/points = round((radius * 2 * PI) / arcLength) + var/points = floor((radius * 2 * PI) / arcLength) var/angle = round(ToDegrees(arcLength / radius), 1) if(!IsInteger(radius)) diff --git a/code/game/objects/effects/effect_system/explosions.dm b/code/game/objects/effects/effect_system/explosions.dm index 1164b8341750..709331e1c76a 100644 --- a/code/game/objects/effects/effect_system/explosions.dm +++ b/code/game/objects/effects/effect_system/explosions.dm @@ -50,11 +50,11 @@ if(holder) var/dmglevel = 4 - if (round(amount/8) > 0) + if (floor(amount/8) > 0) dmglevel = 1 - else if (round(amount/4) > 0) + else if (floor(amount/4) > 0) dmglevel = 2 - else if (round(amount/2) > 0) + else if (floor(amount/2) > 0) dmglevel = 3 if(dmglevel<4) holder.ex_act(dmglevel) diff --git a/code/game/objects/effects/effect_system/foam.dm b/code/game/objects/effects/effect_system/foam.dm index 7a06fa50619c..e7b8ba310bdd 100644 --- a/code/game/objects/effects/effect_system/foam.dm +++ b/code/game/objects/effects/effect_system/foam.dm @@ -212,7 +212,7 @@ return FALSE /obj/structure/foamed_metal/attack_alien(mob/living/carbon/xenomorph/X, dam_bonus) - var/damage = ((round((X.melee_damage_lower+X.melee_damage_upper)/2)) + dam_bonus) + var/damage = ((floor((X.melee_damage_lower+X.melee_damage_upper)/2)) + dam_bonus) //Frenzy bonus if(X.frenzy_aura > 0) diff --git a/code/game/objects/effects/effect_system/smoke.dm b/code/game/objects/effects/effect_system/smoke.dm index 6e3869f563a4..ac0d36ead1e3 100644 --- a/code/game/objects/effects/effect_system/smoke.dm +++ b/code/game/objects/effects/effect_system/smoke.dm @@ -292,7 +292,7 @@ if(human_creature && (human_creature.head && (human_creature.head.flags_inventory & BLOCKGASEFFECT))) return FALSE - var/effect_amt = round(6 + amount*6) + var/effect_amt = floor(6 + amount*6) if(xeno_creature) if(xeno_creature.interference < 4) @@ -301,10 +301,10 @@ xeno_creature.blinded = TRUE else creature.apply_damage(12, OXY) - creature.SetEarDeafness(max(creature.ear_deaf, round(effect_amt*1.5))) //Paralysis of hearing system, aka deafness + creature.SetEarDeafness(max(creature.ear_deaf, floor(effect_amt*1.5))) //Paralysis of hearing system, aka deafness if(!xeno_creature && !creature.eye_blind) //Eye exposure damage to_chat(creature, SPAN_DANGER("Your eyes sting. You can't see!")) - creature.SetEyeBlind(round(effect_amt/3)) + creature.SetEyeBlind(floor(effect_amt/3)) if(!xeno_creature && creature.coughedtime != 1 && !creature.stat) //Coughing/gasping creature.coughedtime = 1 if(prob(50)) @@ -323,7 +323,7 @@ to_chat(xeno_creature, SPAN_XENODANGER("You are struggling to move, it's as if you're paralyzed!")) else to_chat(creature, SPAN_DANGER("Your body is going numb, almost as if paralyzed!")) - if(prob(60 + round(amount*15))) //Highly likely to drop items due to arms/hands seizing up + if(prob(60 + floor(amount*15))) //Highly likely to drop items due to arms/hands seizing up creature.drop_held_item() if(human_creature) human_creature.temporary_slowdown = max(human_creature.temporary_slowdown, 4) //One tick every two second @@ -465,7 +465,7 @@ var/mob/living/carbon/human/H = moob if(H.chem_effect_flags & CHEM_EFFECT_RESIST_NEURO) return - var/effect_amt = round(6 + amount*6) + var/effect_amt = floor(6 + amount*6) moob.eye_blurry = max(moob.eye_blurry, effect_amt) moob.apply_effect(max(moob.eye_blurry, effect_amt), EYE_BLUR) moob.apply_damage(5, OXY) // Base "I can't breath oxyloss" Slightly more longer lasting then stamina damage @@ -516,13 +516,13 @@ if(HAS_TRAIT(moob, TRAIT_NESTED) && moob.status_flags & XENO_HOST) return - var/effect_amt = round(6 + amount*6) + var/effect_amt = floor(6 + amount*6) moob.apply_damage(9, OXY) // MUCH harsher - moob.SetEarDeafness(max(moob.ear_deaf, round(effect_amt*1.5))) //Paralysis of hearing system, aka deafness + moob.SetEarDeafness(max(moob.ear_deaf, floor(effect_amt*1.5))) //Paralysis of hearing system, aka deafness if(!moob.eye_blind) //Eye exposure damage to_chat(moob, SPAN_DANGER("Your eyes sting. You can't see!")) - moob.SetEyeBlind(round(effect_amt/3)) + moob.SetEyeBlind(floor(effect_amt/3)) if(moob.coughedtime != 1 && !moob.stat) //Coughing/gasping moob.coughedtime = 1 if(prob(50)) @@ -535,7 +535,7 @@ //Topical damage (neurotoxin on exposed skin) to_chat(moob, SPAN_DANGER("Your body is going numb, almost as if paralyzed!")) - if(prob(40 + round(amount*15))) //Highly likely to drop items due to arms/hands seizing up + if(prob(40 + floor(amount*15))) //Highly likely to drop items due to arms/hands seizing up moob.drop_held_item() if(ishuman(moob)) var/mob/living/carbon/human/Human = moob diff --git a/code/game/objects/effects/glowshroom.dm b/code/game/objects/effects/glowshroom.dm index aa5e2ec400e2..58e3b868f7e0 100644 --- a/code/game/objects/effects/glowshroom.dm +++ b/code/game/objects/effects/glowshroom.dm @@ -39,7 +39,7 @@ else //if on the floor, glowshroom on-floor sprite icon_state = "glowshroomf" - set_light(round(potency/15)) + set_light(floor(potency/15)) lastTick = world.timeofday /obj/effect/glowshroom/proc/CalcDir(turf/location = loc) diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index fb0103876301..1a632569eccb 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -668,13 +668,13 @@ cases. Override_icon_state should be a list.*/ if(WEAR_HANDCUFFS) if(human.handcuffed) return FALSE - if(!istype(src, /obj/item/handcuffs)) + if(!istype(src, /obj/item/restraint)) return FALSE return TRUE if(WEAR_LEGCUFFS) if(human.legcuffed) return FALSE - if(!istype(src, /obj/item/legcuffs)) + if(!istype(src, /obj/item/restraint)) return FALSE return TRUE if(WEAR_IN_ACCESSORY) diff --git a/code/game/objects/items/backpack_sprayers.dm b/code/game/objects/items/backpack_sprayers.dm index 427a1dd597c7..c6e747ea9759 100644 --- a/code/game/objects/items/backpack_sprayers.dm +++ b/code/game/objects/items/backpack_sprayers.dm @@ -333,7 +333,7 @@ return //actually firing the launcher if(tank.launcher_cooldown > world.time) - to_chat(user, SPAN_WARNING("\The [tank] cannot fire another foam ball just yet. Wait [round(tank.launcher_cooldown/10)] seconds.")) + to_chat(user, SPAN_WARNING("\The [tank] cannot fire another foam ball just yet. Wait [floor(tank.launcher_cooldown/10)] seconds.")) return if(tank.reagents.has_reagent("water", launcher_cost)) tank.reagents.remove_reagent("water", launcher_cost) diff --git a/code/game/objects/items/devices/binoculars.dm b/code/game/objects/items/devices/binoculars.dm index b39526e231b5..5da4704e0e78 100644 --- a/code/game/objects/items/devices/binoculars.dm +++ b/code/game/objects/items/devices/binoculars.dm @@ -448,7 +448,7 @@ human.face_atom(target) ///Add a decisecond to the default 1.5 seconds for each two tiles to hit. - var/distance = round(get_dist(target, human) * 0.5) + var/distance = floor(get_dist(target, human) * 0.5) var/f_spotting_time = designator.spotting_time + distance designator.is_spotting = TRUE diff --git a/code/game/objects/items/devices/data_detector.dm b/code/game/objects/items/devices/data_detector.dm index 6a358ec09bd8..fe4b9cde0ab5 100644 --- a/code/game/objects/items/devices/data_detector.dm +++ b/code/game/objects/items/devices/data_detector.dm @@ -17,7 +17,6 @@ /obj/structure/machinery/computer/objective, /obj/item/limb/head/synth, ) - var/detect_empty_vial_boxes = FALSE /obj/item/device/motiondetector/intel/get_help_text() . = "Green indicators on your HUD will show the location of intelligence objects detected by the scanner. Has two modes: slow long-range [SPAN_HELPFUL("(14 tiles)")] and fast short-range [SPAN_HELPFUL("(7 tiles)")]." @@ -43,22 +42,21 @@ var/detected for(var/DT in objects_to_detect) if(istype(I, DT)) - if(!detect_empty_vial_boxes && istype(I, /obj/item/storage/fancy/vials/random)) - if(!I.contents) - continue + if(istype(I, /obj/item/storage/fancy/vials/random) && !length(I.contents)) + break //We don't need to ping already looted containers + if(istype(I, /obj/item/reagent_container/glass/beaker/vial/random) && !I.reagents?.total_volume) + break //We don't need to ping already looted containers detected = TRUE if(I.contents) for(var/obj/item/CI in I.contents) if(istype(CI, DT)) - if(!detect_empty_vial_boxes && istype(I, /obj/item/storage/fancy/vials/random)) - if(!I.contents) - continue + if(istype(CI, /obj/item/storage/fancy/vials/random) && !length(CI.contents)) + break + if(istype(CI, /obj/item/reagent_container/glass/beaker/vial/random) && !CI.reagents?.total_volume) + break detected = TRUE - break if(human_user && detected) show_blip(human_user, I) - if(detected) - break if(detected) detected_sound = TRUE @@ -76,13 +74,11 @@ for(var/obj/I in M.contents_twice()) for(var/DT in objects_to_detect) if(istype(I, DT)) - if(!detect_empty_vial_boxes && istype(I, /obj/item/storage/fancy/vials/random)) - if(!I.contents) - continue + if(istype(I, /obj/item/storage/fancy/vials/random) && !length(I.contents)) + break + if(istype(I, /obj/item/reagent_container/glass/beaker/vial/random) && !I.reagents?.total_volume) + break detected = TRUE - break - if(detected) - break if(human_user && detected) show_blip(human_user, M) diff --git a/code/game/objects/items/devices/defibrillator.dm b/code/game/objects/items/devices/defibrillator.dm index bbeb2046aff0..4a5ad7cc13ed 100644 --- a/code/game/objects/items/devices/defibrillator.dm +++ b/code/game/objects/items/devices/defibrillator.dm @@ -50,7 +50,7 @@ icon_state += "_out" if(dcell && dcell.charge) - switch(round(dcell.charge * 100 / dcell.maxcharge)) + switch(floor(dcell.charge * 100 / dcell.maxcharge)) if(67 to INFINITY) overlays += "+full" if(34 to 66) @@ -66,8 +66,8 @@ . = ..() var/maxuses = 0 var/currentuses = 0 - maxuses = round(dcell.maxcharge / charge_cost) - currentuses = round(dcell.charge / charge_cost) + maxuses = floor(dcell.maxcharge / charge_cost) + currentuses = floor(dcell.charge / charge_cost) . += SPAN_INFO("It has [currentuses] out of [maxuses] uses left in its internal battery.") if(MODE_HAS_TOGGLEABLE_FLAG(MODE_STRONG_DEFIBS) || !blocked_by_suit) . += SPAN_NOTICE("This defibrillator will ignore worn armor.") diff --git a/code/game/objects/items/devices/flash.dm b/code/game/objects/items/devices/flash.dm index 56d363774a62..0845b670c6fd 100644 --- a/code/game/objects/items/devices/flash.dm +++ b/code/game/objects/items/devices/flash.dm @@ -35,7 +35,7 @@ flashes_stored++ if(flashes_stored <= max_flashes_stored) visible_message(SPAN_NOTICE("[icon2html(src, viewers(src))] \The [src] pings as it recharges!"), SPAN_NOTICE("You hear a ping"), 3) - flashes_stored = min(max_flashes_stored, round(flashes_stored)) //sanity + flashes_stored = min(max_flashes_stored, floor(flashes_stored)) //sanity /obj/item/device/flash/proc/check_if_can_use_flash(mob/user) //checks for using the flash if(!ishuman(user)) diff --git a/code/game/objects/items/devices/flashlight.dm b/code/game/objects/items/devices/flashlight.dm index 2af343c8de26..8d5e3cc752ff 100644 --- a/code/game/objects/items/devices/flashlight.dm +++ b/code/game/objects/items/devices/flashlight.dm @@ -421,7 +421,7 @@ /obj/item/device/flashlight/flare/on/illumination/chemical/Initialize(mapload, amount) . = ..() - light_range = round(amount * 0.04) + light_range = floor(amount * 0.04) if(!light_range) return INITIALIZE_HINT_QDEL set_light(light_range) diff --git a/code/game/objects/items/devices/helmet_visors.dm b/code/game/objects/items/devices/helmet_visors.dm index 7b61df3291ef..8f921a62f3f5 100644 --- a/code/game/objects/items/devices/helmet_visors.dm +++ b/code/game/objects/items/devices/helmet_visors.dm @@ -82,7 +82,7 @@ /obj/item/device/helmet_visor/medical/advanced name = "advanced medical optic" - helmet_overlay = "med_sight_left" + helmet_overlay = "med_sight_right" /obj/item/device/helmet_visor/medical/advanced/activate_visor(obj/item/clothing/head/helmet/marine/attached_helmet, mob/living/carbon/human/user) . = ..() @@ -225,7 +225,7 @@ /obj/item/device/helmet_visor/night_vision/get_examine_text(mob/user) . = ..() - . += SPAN_NOTICE("It is currently at [round((power_cell.charge / power_cell.maxcharge) * 100)]% charge.") + . += SPAN_NOTICE("It is currently at [floor((power_cell.charge / power_cell.maxcharge) * 100)]% charge.") /obj/item/device/helmet_visor/night_vision/activate_visor(obj/item/clothing/head/helmet/marine/attached_helmet, mob/living/carbon/human/user) RegisterSignal(user, COMSIG_HUMAN_POST_UPDATE_SIGHT, PROC_REF(on_update_sight)) @@ -286,7 +286,7 @@ /obj/item/device/helmet_visor/night_vision/get_helmet_examine_text() . = ..() - . += SPAN_NOTICE(" It is currently at [round((power_cell.charge / power_cell.maxcharge) * 100)]% charge.") + . += SPAN_NOTICE(" It is currently at [floor((power_cell.charge / power_cell.maxcharge) * 100)]% charge.") /obj/item/device/helmet_visor/night_vision/proc/on_update_sight(mob/user) SIGNAL_HANDLER diff --git a/code/game/objects/items/devices/motion_detector.dm b/code/game/objects/items/devices/motion_detector.dm index 7db2825deedf..3551e3a02bef 100644 --- a/code/game/objects/items/devices/motion_detector.dm +++ b/code/game/objects/items/devices/motion_detector.dm @@ -269,10 +269,10 @@ var/view_x_offset = 0 var/view_y_offset = 0 if(c_view > 7) - if(user.client.pixel_x >= 0) view_x_offset = round(user.client.pixel_x/32) - else view_x_offset = Ceiling(user.client.pixel_x/32) - if(user.client.pixel_y >= 0) view_y_offset = round(user.client.pixel_y/32) - else view_y_offset = Ceiling(user.client.pixel_y/32) + if(user.client.pixel_x >= 0) view_x_offset = floor(user.client.pixel_x/32) + else view_x_offset = ceil(user.client.pixel_x/32) + if(user.client.pixel_y >= 0) view_y_offset = floor(user.client.pixel_y/32) + else view_y_offset = ceil(user.client.pixel_y/32) var/diff_dir_x = 0 var/diff_dir_y = 0 diff --git a/code/game/objects/items/devices/portable_vendor.dm b/code/game/objects/items/devices/portable_vendor.dm index 8e7c8df1d9a7..f45eeadee5b7 100644 --- a/code/game/objects/items/devices/portable_vendor.dm +++ b/code/game/objects/items/devices/portable_vendor.dm @@ -117,7 +117,7 @@ .["vendor_name"] = name .["show_points"] = use_points - .["current_points"] = round(points) + .["current_points"] = floor(points) .["max_points"] = max_points .["displayed_records"] = available_items @@ -178,7 +178,7 @@ if(special_prod_time_lock && (product[3] in special_prods)) if(ROUND_TIME < special_prod_time_lock) - to_chat(usr, SPAN_WARNING("[src] is still fabricating [product[1]]. Please wait another [round((SSticker.mode.round_time_lobby + special_prod_time_lock-world.time)/600)] minutes before trying again.")) + to_chat(usr, SPAN_WARNING("[src] is still fabricating [product[1]]. Please wait another [floor((SSticker.mode.round_time_lobby + special_prod_time_lock-world.time)/600)] minutes before trying again.")) return if(use_points) diff --git a/code/game/objects/items/devices/radio/electropack.dm b/code/game/objects/items/devices/radio/electropack.dm index a9edd5d71795..871b266cfd49 100644 --- a/code/game/objects/items/devices/radio/electropack.dm +++ b/code/game/objects/items/devices/radio/electropack.dm @@ -35,7 +35,7 @@ else if(href_list["code"]) code += text2num(href_list["code"]) - code = round(code) + code = floor(code) code = min(100, code) code = max(1, code) else diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm index 512ca8baad9b..778082fc46a4 100644 --- a/code/game/objects/items/devices/scanners.dm +++ b/code/game/objects/items/devices/scanners.dm @@ -191,7 +191,7 @@ FORENSIC SCANNER user.show_message(SPAN_DANGER("Pressure: [round(env_pressure,0.1)] kPa"), 1) if(env_pressure > 0) user.show_message(SPAN_NOTICE("Gas Type: [env_gas]"), 1) - user.show_message(SPAN_NOTICE("Temperature: [round(env_temp-T0C)]°C"), 1) + user.show_message(SPAN_NOTICE("Temperature: [floor(env_temp-T0C)]°C"), 1) src.add_fingerprint(user) return diff --git a/code/game/objects/items/devices/suit_cooling.dm b/code/game/objects/items/devices/suit_cooling.dm index e0f65a4b31ec..564b3e41f591 100644 --- a/code/game/objects/items/devices/suit_cooling.dm +++ b/code/game/objects/items/devices/suit_cooling.dm @@ -174,6 +174,6 @@ . += "The panel is open." if (cell) - . += "The charge meter reads [round(cell.percent())]%." + . += "The charge meter reads [floor(cell.percent())]%." else . += "It doesn't have a power cell installed." diff --git a/code/game/objects/items/devices/taperecorder.dm b/code/game/objects/items/devices/taperecorder.dm index 9a5e1e1b0ef5..8410c72ee831 100644 --- a/code/game/objects/items/devices/taperecorder.dm +++ b/code/game/objects/items/devices/taperecorder.dm @@ -49,7 +49,7 @@ return SPAN_NOTICE("PLAYING") else var/time = mytape.used_capacity / 10 //deciseconds / 10 = seconds - var/mins = round(time / 60) + var/mins = floor(time / 60) var/secs = time - mins * 60 return SPAN_NOTICE("[mins]m [secs]s") return SPAN_NOTICE("NO TAPE INSERTED") @@ -382,7 +382,7 @@ if(unspooled) . += SPAN_WARNING("It's had all its magnetic tape pulled out! Maybe you can wind it back in with a screwdriver.") else - var/used_tape_percent = round((used_capacity / max_capacity)*100) + var/used_tape_percent = floor((used_capacity / max_capacity)*100) switch(used_tape_percent) if(0 to 5) . += SPAN_NOTICE("It's unused.") diff --git a/code/game/objects/items/frames/table_rack.dm b/code/game/objects/items/frames/table_rack.dm index c7aa53a2c4c1..eda9b9c5749b 100644 --- a/code/game/objects/items/frames/table_rack.dm +++ b/code/game/objects/items/frames/table_rack.dm @@ -100,6 +100,7 @@ desc = "A kit for a table, including a large, flat wooden surface and four legs. Some assembly required." icon_state = "wood_tableparts" flags_atom = FPRINT + matter = null table_type = /obj/structure/surface/table/woodentable /obj/item/frame/table/wood/attackby(obj/item/W, mob/user) @@ -140,6 +141,7 @@ desc = "A kit for a table, including a large, flat wooden and carpet surface and four legs. Some assembly required." icon_state = "gamble_tableparts" flags_atom = null + matter = null table_type = /obj/structure/surface/table/gamblingtable /obj/item/frame/table/gambling/attackby(obj/item/W as obj, mob/user as mob) diff --git a/code/game/objects/items/fulton.dm b/code/game/objects/items/fulton.dm index 664c7871ba7f..9cdc2b78b609 100644 --- a/code/game/objects/items/fulton.dm +++ b/code/game/objects/items/fulton.dm @@ -143,8 +143,8 @@ GLOBAL_LIST_EMPTY(deployed_fultons) reservation = SSmapping.request_turf_block_reservation(3, 3, 1, turf_type_override = /turf/open/space) var/turf/bottom_left_turf = reservation.bottom_left_turfs[1] var/turf/top_right_turf = reservation.top_right_turfs[1] - var/middle_x = bottom_left_turf.x + Floor((top_right_turf.x - bottom_left_turf.x) / 2) - var/middle_y = bottom_left_turf.y + Floor((top_right_turf.y - bottom_left_turf.y) / 2) + var/middle_x = bottom_left_turf.x + floor((top_right_turf.x - bottom_left_turf.x) / 2) + var/middle_y = bottom_left_turf.y + floor((top_right_turf.y - bottom_left_turf.y) / 2) var/turf/space_tile = locate(middle_x, middle_y, bottom_left_turf.z) if(!space_tile) visible_message(SPAN_WARNING("[src] begins beeping like crazy. Something is wrong!")) diff --git a/code/game/objects/items/handcuffs.dm b/code/game/objects/items/handcuffs.dm index 2137b41d86bf..af71b806ed42 100644 --- a/code/game/objects/items/handcuffs.dm +++ b/code/game/objects/items/handcuffs.dm @@ -1,124 +1,162 @@ -/obj/item/handcuffs - name = "handcuffs" - desc = "Use this to keep prisoners in line." - gender = PLURAL - icon = 'icons/obj/items/items.dmi' - icon_state = "handcuff" - flags_atom = FPRINT|CONDUCT - flags_equip_slot = SLOT_WAIST - throwforce = 5 - w_class = SIZE_SMALL - throw_speed = SPEED_SLOW - throw_range = 5 - matter = list("metal" = 500) - - var/dispenser = 0 +/obj/item/restraint + /// SLOT_HANDS or SLOT_LEGS, for handcuffs or legcuffs + var/target_zone = SLOT_HANDS + /// How long to break out var/breakouttime = 1 MINUTES /// determines if handcuffs will be deleted on removal var/single_use = 0 var/cuff_sound = 'sound/weapons/handcuffs.ogg' /// how many deciseconds it takes to cuff someone var/cuff_delay = 4 SECONDS + /// If can be applied to people manually + var/manual = TRUE -/obj/item/handcuffs/attack(mob/living/carbon/C, mob/user) - if(!istype(C)) +/obj/item/restraint/attack(mob/living/carbon/attacked_carbon, mob/user) + if(!istype(attacked_carbon) || !manual) return ..() - if (!istype(user, /mob/living/carbon/human)) + if (!ishuman(user)) to_chat(user, SPAN_DANGER("You don't have the dexterity to do this!")) return - if(!C.handcuffed) - place_handcuffs(C, user) - -/obj/item/handcuffs/get_mob_overlay(mob/user_mob, slot) - var/image/ret = ..() - - var/image/handcuffs = overlay_image('icons/mob/mob.dmi', "handcuff1", color, RESET_COLOR) - ret.overlays += handcuffs - - return ret - -/obj/item/handcuffs/proc/place_handcuffs(mob/living/carbon/target, mob/user) + switch(target_zone) + if(SLOT_HANDS) + if(!attacked_carbon.handcuffed) + place_handcuffs(attacked_carbon, user) + if(SLOT_LEGS) + if(!attacked_carbon.legcuffed) + apply_legcuffs(attacked_carbon, user) + +/obj/item/restraint/proc/place_handcuffs(mob/living/carbon/target, mob/user) playsound(src.loc, cuff_sound, 25, 1, 4) if(user.action_busy) return - if (ishuman(target)) - var/mob/living/carbon/human/H = target + if(ishuman(target)) + var/mob/living/carbon/human/human_mob = target - if (!H.has_limb_for_slot(WEAR_HANDCUFFS)) - to_chat(user, SPAN_DANGER("\The [H] needs at least two wrists before you can cuff them together!")) + if(!human_mob.has_limb_for_slot(WEAR_HANDCUFFS)) + to_chat(user, SPAN_DANGER("\The [human_mob] needs at least two wrists before you can cuff them together!")) return - H.attack_log += text("\[[time_stamp()]\] Has been handcuffed (attempt) by [key_name(user)]") - user.attack_log += text("\[[time_stamp()]\] Attempted to handcuff [key_name(H)]") - msg_admin_attack("[key_name(user)] attempted to handcuff [key_name(H)] in [get_area(src)] ([src.loc.x],[src.loc.y],[src.loc.z]).", src.loc.x, src.loc.y, src.loc.z) + human_mob.attack_log += text("\[[time_stamp()]\] Has been handcuffed (attempt) by [key_name(user)]") + user.attack_log += text("\[[time_stamp()]\] Attempted to handcuff [key_name(human_mob)]") + msg_admin_attack("[key_name(user)] attempted to handcuff [key_name(human_mob)] in [get_area(src)] ([loc.x],[loc.y],[loc.z]).", loc.x, loc.y, loc.z) - user.visible_message(SPAN_NOTICE("[user] tries to put [src] on [H].")) - if(do_after(user, cuff_delay, INTERRUPT_MOVED, BUSY_ICON_HOSTILE, H, INTERRUPT_MOVED, BUSY_ICON_GENERIC)) - if(src == user.get_active_hand() && !H.handcuffed && Adjacent(user)) - if(iscarbon(H)) - if(istype(H.buckled, /obj/structure/bed/roller)) + user.visible_message(SPAN_NOTICE("[user] tries to put [src] on [human_mob].")) + if(do_after(user, cuff_delay, INTERRUPT_MOVED, BUSY_ICON_HOSTILE, human_mob, INTERRUPT_MOVED, BUSY_ICON_GENERIC)) + if(src == user.get_active_hand() && !human_mob.handcuffed && Adjacent(user)) + if(iscarbon(human_mob)) + if(istype(human_mob.buckled, /obj/structure/bed/roller)) to_chat(user, SPAN_DANGER("You cannot handcuff someone who is buckled onto a roller bed.")) return - if(H.has_limb_for_slot(WEAR_HANDCUFFS)) + if(human_mob.has_limb_for_slot(WEAR_HANDCUFFS)) user.drop_inv_item_on_ground(src) - H.equip_to_slot_if_possible(src, WEAR_HANDCUFFS, 1, 0, 1, 1) + human_mob.equip_to_slot_if_possible(src, WEAR_HANDCUFFS, 1, 0, 1, 1) user.count_niche_stat(STATISTICS_NICHE_HANDCUFF) - else if (ismonkey(target)) + else if(ismonkey(target)) user.visible_message(SPAN_NOTICE("[user] tries to put [src] on [target].")) if(do_after(user, 30, INTERRUPT_MOVED, BUSY_ICON_HOSTILE, target, INTERRUPT_MOVED, BUSY_ICON_GENERIC)) if(src == user.get_active_hand() && !target.handcuffed && Adjacent(user)) user.drop_inv_item_on_ground(src) target.equip_to_slot_if_possible(src, WEAR_HANDCUFFS, 1, 0, 1, 1) +/obj/item/restraint/handcuffs + name = "handcuffs" + desc = "Use this to keep prisoners in line." + gender = PLURAL + icon = 'icons/obj/items/items.dmi' + icon_state = "handcuff" + flags_atom = FPRINT|CONDUCT + flags_equip_slot = SLOT_WAIST + throwforce = 5 + w_class = SIZE_SMALL + throw_speed = SPEED_SLOW + throw_range = 5 + matter = list("metal" = 500) + +/obj/item/restraint/handcuffs/get_mob_overlay(mob/user_mob, slot) + var/image/ret = ..() + + var/image/handcuffs = overlay_image('icons/mob/mob.dmi', "handcuff1", color, RESET_COLOR) + ret.overlays += handcuffs + + return ret -/obj/item/handcuffs/zip +/obj/item/restraint/handcuffs/zip name = "zip cuffs" desc = "Single-use plastic zip tie handcuffs." w_class = SIZE_TINY icon_state = "cuff_zip" - breakouttime = 600 //Deciseconds = 60s + breakouttime = 60 SECONDS cuff_sound = 'sound/weapons/cablecuff.ogg' cuff_delay = 20 -/obj/item/handcuffs/zip/place_handcuffs(mob/living/carbon/target, mob/user) +/obj/item/restraint/handcuffs/zip/place_handcuffs(mob/living/carbon/target, mob/user) ..() flags_item |= DELONDROP -/obj/item/handcuffs/cable +/obj/item/restraint/adjustable/verb/adjust_restraints() + set category = "Object" + set name = "Adjust Restraints" + set desc = "Adjust the restraint size for wrists or ankles." + set src = usr.contents + + if(!ishuman(usr)) + return FALSE + + if(usr.is_mob_incapacitated()) + to_chat(usr, "Not right now.") + return FALSE + + switch(target_zone) + if(SLOT_HANDS) + target_zone = SLOT_LEGS + to_chat(usr, SPAN_NOTICE("[src] has been adjusted to tie around a subject's ankles.")) + if(SLOT_LEGS) + target_zone = SLOT_HANDS + to_chat(usr, SPAN_NOTICE("[src] has been adjusted to tie around a subject's wrists.")) + +/obj/item/restraint/adjustable/get_examine_text(mob/user) + . = ..() + switch(target_zone) + if(SLOT_HANDS) + . += SPAN_RED("Sized for human hands.") + if(SLOT_LEGS) + . += SPAN_RED("Sized for human ankles.") + +/obj/item/restraint/adjustable/cable name = "cable restraints" desc = "Looks like some cables tied together. Could be used to tie something up." icon_state = "cuff_white" - breakouttime = 300 //Deciseconds = 30s + breakouttime = 30 SECONDS cuff_sound = 'sound/weapons/cablecuff.ogg' -/obj/item/handcuffs/cable/red +/obj/item/restraint/adjustable/cable/red color = "#DD0000" -/obj/item/handcuffs/cable/yellow +/obj/item/restraint/adjustable/cable/yellow color = "#DDDD00" -/obj/item/handcuffs/cable/blue +/obj/item/restraint/adjustable/cable/blue color = "#0000DD" -/obj/item/handcuffs/cable/green +/obj/item/restraint/adjustable/cable/green color = "#00DD00" -/obj/item/handcuffs/cable/pink +/obj/item/restraint/adjustable/cable/pink color = "#DD00DD" -/obj/item/handcuffs/cable/orange +/obj/item/restraint/adjustable/cable/orange color = "#DD8800" -/obj/item/handcuffs/cable/cyan +/obj/item/restraint/adjustable/cable/cyan color = "#00DDDD" -/obj/item/handcuffs/cable/white +/obj/item/restraint/adjustable/cable/white color = "#FFFFFF" -/obj/item/handcuffs/cable/attackby(obj/item/I, mob/user as mob) +/obj/item/restraint/adjustable/cable/attackby(obj/item/I, mob/user as mob) ..() if(istype(I, /obj/item/stack/rods)) var/obj/item/stack/rods/R = I @@ -130,34 +168,30 @@ qdel(src) update_icon(user) - -/obj/item/handcuffs/cyborg - dispenser = 1 - -/obj/item/handcuffs/cyborg/attack(mob/living/carbon/C as mob, mob/user as mob) - if(!C.handcuffed) +/obj/item/restraint/handcuffs/cyborg/attack(mob/living/carbon/carbon_mob as mob, mob/user as mob) + if(!carbon_mob.handcuffed) var/turf/p_loc = user.loc - var/turf/p_loc_m = C.loc - playsound(src.loc, cuff_sound, 25, 1, 4) - user.visible_message(SPAN_DANGER("[user] is trying to put handcuffs on [C]!")) - - if (ishuman(C)) - var/mob/living/carbon/human/H = C - if (!H.has_limb_for_slot(WEAR_HANDCUFFS)) - to_chat(user, SPAN_DANGER("\The [H] needs at least two wrists before you can cuff them together!")) + var/turf/p_loc_m = carbon_mob.loc + playsound(loc, cuff_sound, 25, 1, 4) + user.visible_message(SPAN_DANGER("[user] is trying to put handcuffs on [carbon_mob]!")) + + if(ishuman(carbon_mob)) + var/mob/living/carbon/human/human_mob = carbon_mob + if (!human_mob.has_limb_for_slot(WEAR_HANDCUFFS)) + to_chat(user, SPAN_DANGER("\The [human_mob] needs at least two wrists before you can cuff them together!")) return spawn(30) - if(!C) return - if(p_loc == user.loc && p_loc_m == C.loc) - C.handcuffed = new /obj/item/handcuffs(C) - C.handcuff_update() + if(!carbon_mob) return + if(p_loc == user.loc && p_loc_m == carbon_mob.loc) + carbon_mob.handcuffed = new /obj/item/restraint/handcuffs(carbon_mob) + carbon_mob.handcuff_update() -/obj/item/restraints +/obj/item/xeno_restraints name = "xeno restraints" desc = "Use this to hold xenomorphic creatures safely." gender = PLURAL @@ -171,10 +205,9 @@ throw_range = 5 matter = list("metal" = 500) - var/dispenser = 0 var/breakouttime = 2 MINUTES -/obj/item/restraints/attack(mob/living/carbon/C as mob, mob/user as mob) +/obj/item/xeno_restraints/attack(mob/living/carbon/C as mob, mob/user as mob) if(!istype(C, /mob/living/carbon/xenomorph)) to_chat(user, SPAN_DANGER("The cuffs do not fit!")) return @@ -187,7 +220,7 @@ spawn(30) if(!C) return if(p_loc == user.loc && p_loc_m == C.loc) - C.handcuffed = new /obj/item/restraints(C) + C.handcuffed = new /obj/item/xeno_restraints(C) C.handcuff_update() C.visible_message(SPAN_DANGER("[C] has been successfully restrained by [user]!")) qdel(src) diff --git a/code/game/objects/items/handheld_distress_beacon.dm b/code/game/objects/items/handheld_distress_beacon.dm index 5764604c9a2f..73c9415dbfad 100644 --- a/code/game/objects/items/handheld_distress_beacon.dm +++ b/code/game/objects/items/handheld_distress_beacon.dm @@ -37,7 +37,11 @@ if(active) to_chat(user, "[src] is already active!") - return + return FALSE + var/reason = tgui_input_text(user, "What is the reason for activating this beacon?", "Distress Reason") + if(!reason) + return FALSE + active = TRUE update_icon() @@ -52,7 +56,7 @@ for(var/client/admin_client in GLOB.admins) if((R_ADMIN|R_MOD) & admin_client.admin_holder.rights) playsound_client(admin_client,'sound/effects/sos-morse-code.ogg',10) - message_admins("[key_name(user)] has used a [beacon_type]! [CC_MARK(user)] [beacon_call_buttons](DENY) [ADMIN_JMP_USER(user)] [CC_REPLY(user)]") + message_admins("[key_name(user)] has used a [beacon_type] for the reason '[SPAN_ORANGE(reason)]'! [CC_MARK(user)] [beacon_call_buttons](DENY) [ADMIN_JMP_USER(user)] [CC_REPLY(user)]") to_chat(user, SPAN_NOTICE("A distress beacon request has been sent to [recipient].")) /// CMB distress beacon held by CMB Marshal for signalling distress to Anchorpoint Station diff --git a/code/game/objects/items/legcuffs.dm b/code/game/objects/items/legcuffs.dm index c0dfe44728f0..1d216e6556e2 100644 --- a/code/game/objects/items/legcuffs.dm +++ b/code/game/objects/items/legcuffs.dm @@ -1,4 +1,4 @@ -/obj/item/legcuffs +/obj/item/restraint/legcuffs name = "legcuffs" desc = "Use this to keep prisoners in line." gender = PLURAL @@ -8,24 +8,66 @@ throwforce = 0 w_class = SIZE_MEDIUM - var/breakouttime = 15 SECONDS + target_zone = SLOT_LEGS -/obj/item/legcuffs/beartrap +/obj/item/restraint/proc/apply_legcuffs(mob/living/carbon/target, mob/user) + playsound(loc, 'sound/weapons/handcuffs.ogg', 25, 1, 4) + + if(user.action_busy) + return FALSE + + if (ishuman(target)) + var/mob/living/carbon/human/human_target = target + + if (!human_target.has_limb_for_slot(WEAR_LEGCUFFS)) + to_chat(user, SPAN_DANGER("\The [human_target] needs two ankles before you can cuff them together!")) + return FALSE + + human_target.attack_log += text("\[[time_stamp()]\] Has been legcuffed (attempt) by [key_name(user)]") + user.attack_log += text("\[[time_stamp()]\] Attempted to legcuff [key_name(human_target)]") + msg_admin_attack("[key_name(user)] attempted to legcuff [key_name(human_target)] in [get_area(src)] ([loc.x],[loc.y],[loc.z]).", loc.x, loc.y, loc.z) + + user.visible_message(SPAN_NOTICE("[user] tries to put [src] on [human_target].")) + if(do_after(user, cuff_delay, INTERRUPT_MOVED, BUSY_ICON_HOSTILE, human_target, INTERRUPT_MOVED, BUSY_ICON_GENERIC)) + if(src == user.get_active_hand() && !human_target.legcuffed && Adjacent(user)) + if(iscarbon(human_target)) + if(istype(human_target.buckled, /obj/structure/bed/roller)) + to_chat(user, SPAN_DANGER("You cannot legcuff someone who is buckled onto a roller bed.")) + return FALSE + if(human_target.has_limb_for_slot(WEAR_LEGCUFFS)) + user.drop_inv_item_on_ground(src) + human_target.equip_to_slot_if_possible(src, WEAR_LEGCUFFS, 1, 0, 1, 1) + user.count_niche_stat(STATISTICS_NICHE_HANDCUFF) + + else if (ismonkey(target)) + user.visible_message(SPAN_NOTICE("[user] tries to put [src] on [target].")) + if(do_after(user, 30, INTERRUPT_MOVED, BUSY_ICON_HOSTILE, target, INTERRUPT_MOVED, BUSY_ICON_GENERIC)) + if(src == user.get_active_hand() && !target.legcuffed && Adjacent(user)) + user.drop_inv_item_on_ground(src) + target.equip_to_slot_if_possible(src, WEAR_LEGCUFFS, 1, 0, 1, 1) + return TRUE + +/obj/item/restraint/legcuffs/beartrap name = "bear trap" throw_speed = SPEED_FAST throw_range = 1 icon_state = "beartrap0" desc = "A trap used to catch bears and other legged creatures." + breakouttime = 20 SECONDS var/armed = FALSE + manual = FALSE + +/obj/item/restraint/legcuffs/beartrap/apply_legcuffs(mob/living/carbon/target, mob/user) + return FALSE -/obj/item/legcuffs/beartrap/attack_self(mob/user as mob) +/obj/item/restraint/legcuffs/beartrap/attack_self(mob/user as mob) ..() if(ishuman(user) && !user.stat && !user.is_mob_restrained()) armed = !armed icon_state = "beartrap[armed]" to_chat(user, SPAN_NOTICE("[src] is now [armed ? "armed" : "disarmed"]")) -/obj/item/legcuffs/beartrap/Crossed(atom/movable/AM) +/obj/item/restraint/legcuffs/beartrap/Crossed(atom/movable/AM) if(armed) if(ismob(AM)) var/mob/M = AM diff --git a/code/game/objects/items/misc.dm b/code/game/objects/items/misc.dm index a7df88374b29..8c0f88ddb7ca 100644 --- a/code/game/objects/items/misc.dm +++ b/code/game/objects/items/misc.dm @@ -292,11 +292,12 @@ new /obj/item/evidencebag(src) new /obj/item/evidencebag(src) -/obj/item/rappel_harness - name = "rappel harness" - desc = "A simple, uncomfortable rappel harness with just enough safety straps to make RnD pass health and safety. It comes with an in-built descender, but has no pouches for ammunition." - icon = 'icons/obj/items/clothing/belts.dmi' - icon_state = "rappel_harness" - item_state = "rappel_harness" +/obj/item/parachute + name = "parachute" + desc = "A surprisingly small yet bulky pack with just enough safety straps to make RnD pass health and safety. The label says the pack comes with two parachutes - main and reserve, but you doubt the pack can fit even one." + icon = 'icons/obj/items/clothing/backpacks.dmi' + icon_state = "parachute_pack" + item_state = "parachute_pack" w_class = SIZE_MASSIVE - flags_equip_slot = SLOT_WAIST + flags_equip_slot = SLOT_BACK + flags_item = SMARTGUNNER_BACKPACK_OVERRIDE diff --git a/code/game/objects/items/reagent_containers/autoinjectors.dm b/code/game/objects/items/reagent_containers/autoinjectors.dm index 04a3a15585ab..ff830318fda0 100644 --- a/code/game/objects/items/reagent_containers/autoinjectors.dm +++ b/code/game/objects/items/reagent_containers/autoinjectors.dm @@ -33,7 +33,7 @@ /obj/item/reagent_container/hypospray/autoinjector/proc/update_uses_left() var/UL = reagents.total_volume / amount_per_transfer_from_this - UL = round(UL) == UL ? UL : round(UL) + 1 + UL = floor(UL) == UL ? UL : floor(UL) + 1 uses_left = UL /obj/item/reagent_container/hypospray/autoinjector/attack(mob/M, mob/user) diff --git a/code/game/objects/items/reagent_containers/blood_pack.dm b/code/game/objects/items/reagent_containers/blood_pack.dm index 92c68e81c9d2..5dafafe6a47f 100644 --- a/code/game/objects/items/reagent_containers/blood_pack.dm +++ b/code/game/objects/items/reagent_containers/blood_pack.dm @@ -28,7 +28,7 @@ update_icon() /obj/item/reagent_container/blood/update_icon() - var/percent = round((reagents.total_volume / volume) * 100) + var/percent = floor((reagents.total_volume / volume) * 100) overlays = null underlays = null diff --git a/code/game/objects/items/reagent_containers/food/drinks.dm b/code/game/objects/items/reagent_containers/food/drinks.dm index 0ec02b240e29..0a350aa851e2 100644 --- a/code/game/objects/items/reagent_containers/food/drinks.dm +++ b/code/game/objects/items/reagent_containers/food/drinks.dm @@ -13,7 +13,7 @@ /obj/item/reagent_container/food/drinks/on_reagent_change() if (gulp_size < 5) gulp_size = 5 - else gulp_size = max(round(reagents.total_volume / 5), 5) + else gulp_size = max(floor(reagents.total_volume / 5), 5) /obj/item/reagent_container/food/drinks/attack(mob/M, mob/user) var/datum/reagents/R = src.reagents diff --git a/code/game/objects/items/reagent_containers/food/sandwich.dm b/code/game/objects/items/reagent_containers/food/sandwich.dm index b3f68bd299a9..9370b643fc98 100644 --- a/code/game/objects/items/reagent_containers/food/sandwich.dm +++ b/code/game/objects/items/reagent_containers/food/sandwich.dm @@ -74,7 +74,7 @@ name = lowertext("[fullname] sandwich") if(length(name) > 80) name = "[pick(list("absurd","colossal","enormous","ridiculous"))] sandwich" - w_class = Ceiling(clamp((ingredients.len/2),1,3)) + w_class = ceil(clamp((ingredients.len/2),1,3)) /obj/item/reagent_container/food/snacks/csandwich/Destroy() QDEL_NULL_LIST(ingredients) diff --git a/code/game/objects/items/reagent_containers/food/snacks.dm b/code/game/objects/items/reagent_containers/food/snacks.dm index 293a71ca7c5d..09b4379e7bb7 100644 --- a/code/game/objects/items/reagent_containers/food/snacks.dm +++ b/code/game/objects/items/reagent_containers/food/snacks.dm @@ -212,7 +212,7 @@ SPAN_NOTICE("[user] crudely slices \the [src] with [W]!"), \ SPAN_NOTICE("You crudely slice \the [src] with your [W]!") \ ) - slices_lost = rand(1,max(1,round(slices_num/2))) + slices_lost = rand(1,max(1,floor(slices_num/2))) var/reagents_per_slice = reagents.total_volume/slices_num for(var/i=1 to (slices_num-slices_lost)) var/obj/slice = new slice_path (src.loc) diff --git a/code/game/objects/items/reagent_containers/food/snacks/grown.dm b/code/game/objects/items/reagent_containers/food/snacks/grown.dm index 4c988f18ac7c..68b617d6a476 100644 --- a/code/game/objects/items/reagent_containers/food/snacks/grown.dm +++ b/code/game/objects/items/reagent_containers/food/snacks/grown.dm @@ -42,7 +42,7 @@ var/list/reagent_data = S.chems[rid] var/rtotal = reagent_data[1] if(length(reagent_data) > 1 && potency > 0) - rtotal += round(potency/reagent_data[2]) + rtotal += floor(potency/reagent_data[2]) if(reagents) reagents.add_reagent(rid, max(1, rtotal)) diff --git a/code/game/objects/items/reagent_containers/glass.dm b/code/game/objects/items/reagent_containers/glass.dm index e0f432bd5b09..a8b0ac1d6202 100644 --- a/code/game/objects/items/reagent_containers/glass.dm +++ b/code/game/objects/items/reagent_containers/glass.dm @@ -219,7 +219,7 @@ if(reagents && reagents.total_volume) var/image/filling = image('icons/obj/items/reagentfillings.dmi', src, "[icon_state]-20") - var/percent = round((reagents.total_volume / volume) * 100) + var/percent = floor((reagents.total_volume / volume) * 100) switch(percent) if(0) filling.icon_state = null if(1 to 20) filling.icon_state = "[icon_state]-20" @@ -307,7 +307,7 @@ overlays.Cut() if(reagents && reagents.total_volume) var/image/filling = image('icons/obj/items/reagentfillings.dmi', src, "[icon_state]10") - var/percent = round((reagents.total_volume / volume) * 100) + var/percent = floor((reagents.total_volume / volume) * 100) var/round_percent = 0 if(percent > 24) round_percent = round(percent, 25) else round_percent = 10 @@ -619,7 +619,7 @@ if(reagents && reagents.total_volume) var/image/filling = image('icons/obj/items/reagentfillings.dmi', src, "[icon_state]-00-65") - var/percent = round((reagents.total_volume / volume) * 100) + var/percent = floor((reagents.total_volume / volume) * 100) switch(percent) if(0 to 33) filling.icon_state = "[icon_state]-00-33" if(34 to 65) filling.icon_state = "[icon_state]-34-65" diff --git a/code/game/objects/items/reagent_containers/glass/bottle.dm b/code/game/objects/items/reagent_containers/glass/bottle.dm index 61cdee01c8f8..f1eab588fd20 100644 --- a/code/game/objects/items/reagent_containers/glass/bottle.dm +++ b/code/game/objects/items/reagent_containers/glass/bottle.dm @@ -39,7 +39,7 @@ if(reagents.total_volume) var/image/filling = image('icons/obj/items/reagentfillings.dmi', src, "[icon_state]10") - var/percent = round((reagents.total_volume / volume) * 100) + var/percent = floor((reagents.total_volume / volume) * 100) switch(percent) if(0) filling.icon_state = null if(1 to 20) filling.icon_state = "[icon_state]-20" diff --git a/code/game/objects/items/reagent_containers/spray.dm b/code/game/objects/items/reagent_containers/spray.dm index aff905039d0e..d3dc7ea5880a 100644 --- a/code/game/objects/items/reagent_containers/spray.dm +++ b/code/game/objects/items/reagent_containers/spray.dm @@ -87,7 +87,7 @@ /obj/item/reagent_container/spray/get_examine_text(mob/user) . = ..() - . += "[round(reagents.total_volume)] units left." + . += "[floor(reagents.total_volume)] units left." /obj/item/reagent_container/spray/verb/empty() diff --git a/code/game/objects/items/stacks/cable_coil.dm b/code/game/objects/items/stacks/cable_coil.dm index 077cb801c90d..1dd95464ddd5 100644 --- a/code/game/objects/items/stacks/cable_coil.dm +++ b/code/game/objects/items/stacks/cable_coil.dm @@ -70,7 +70,7 @@ if(src.amount <= 14) to_chat(usr, SPAN_WARNING("You need at least 15 lengths to make restraints!")) return - var/obj/item/handcuffs/cable/B = new /obj/item/handcuffs/cable(usr.loc) + var/obj/item/restraint/adjustable/cable/B = new /obj/item/restraint/adjustable/cable(usr.loc) B.color = color to_chat(usr, SPAN_NOTICE("You wind some cable together to make some restraints.")) src.use(15) diff --git a/code/game/objects/items/stacks/stack.dm b/code/game/objects/items/stacks/stack.dm index f8a6af3cf24f..5d38f238023f 100644 --- a/code/game/objects/items/stacks/stack.dm +++ b/code/game/objects/items/stacks/stack.dm @@ -15,10 +15,14 @@ var/list/datum/stack_recipe/recipes var/singular_name var/amount = 1 - var/max_amount //also see stack recipes initialisation, param "max_res_amount" must be equal to this max_amount - var/stack_id //used to determine if two stacks are of the same kind. - var/amount_sprites = FALSE //does it have sprites for extra amount, like metal, plasteel, or wood - var/display_maptext = TRUE //does it show amount on top of the icon + ///also see stack recipes initialisation, param "max_res_amount" must be equal to this max_amount + var/max_amount + ///used to determine if two stacks are of the same kind. + var/stack_id + ///does it have sprites for extra amount, like metal, plasteel, or wood + var/amount_sprites = FALSE + ///does it show amount on top of the icon + var/display_maptext = TRUE //Coords for contents display, to make it play nice with inventory borders. maptext_x = 4 maptext_y = 3 @@ -107,7 +111,7 @@ Also change the icon to reflect the amount of sheets, if possible.*/ if(istype(E, /datum/stack_recipe)) var/datum/stack_recipe/R = E - var/max_multiplier = round(src.amount / R.req_amount) + var/max_multiplier = floor(src.amount / R.req_amount) var/title var/can_build = 1 can_build = can_build && (max_multiplier > 0) @@ -122,7 +126,7 @@ Also change the icon to reflect the amount of sheets, if possible.*/ t1 += text("[]", title) continue if(R.max_res_amount>1 && max_multiplier > 1) - max_multiplier = min(max_multiplier, round(R.max_res_amount/R.res_amount)) + max_multiplier = min(max_multiplier, floor(R.max_res_amount/R.res_amount)) t1 += " |" var/list/multipliers = list(5, 10, 25) for (var/n in multipliers) @@ -160,7 +164,7 @@ Also change the icon to reflect the amount of sheets, if possible.*/ if(!isnum(multiplier)) // this used to block nan... message_admins("[key_name_admin(usr)] has attempted to multiply [src] with !isnum") return - multiplier = round(multiplier) + multiplier = floor(multiplier) if(multiplier < 1) return //href exploit protection if(R.skill_lvl) @@ -330,48 +334,48 @@ Also change the icon to reflect the amount of sheets, if possible.*/ return if(!use(desired)) return - var/obj/item/stack/newstack = new src.type(user, desired) + var/obj/item/stack/newstack = new type(user, desired) transfer_fingerprints_to(newstack) user.put_in_hands(newstack) - src.add_fingerprint(user) + add_fingerprint(user) newstack.add_fingerprint(user) - if(src && usr.interactee==src) - INVOKE_ASYNC(src, TYPE_PROC_REF(/obj/item/stack, interact), usr) + if(!QDELETED(src) && user.interactee == src) + INVOKE_ASYNC(src, TYPE_PROC_REF(/obj/item/stack, interact), user) return TRUE - else - return ..() + + return ..() /obj/item/stack/attack_hand(mob/user as mob) - if (user.get_inactive_hand() == src) - var/obj/item/stack/F = new src.type(user, 1) - transfer_fingerprints_to(F) - user.put_in_hands(F) - src.add_fingerprint(user) - F.add_fingerprint(user) + if(user.get_inactive_hand() == src) + var/obj/item/stack/new_stack = new type(user, 1) + transfer_fingerprints_to(new_stack) + user.put_in_hands(new_stack) + add_fingerprint(user) + new_stack.add_fingerprint(user) use(1) - if (src && usr.interactee==src) - INVOKE_ASYNC(src, TYPE_PROC_REF(/obj/item/stack, interact), usr) - else - ..() - return + if(!QDELETED(src) && user.interactee == src) + INVOKE_ASYNC(src, TYPE_PROC_REF(/obj/item/stack, interact), user) + return + + return ..() /obj/item/stack/attackby(obj/item/W as obj, mob/user as mob) if(istype(W, /obj/item/stack)) - var/obj/item/stack/S = W - if(S.stack_id == stack_id) //same stack type - if(S.amount >= max_amount) + var/obj/item/stack/other_stack = W + if(other_stack.stack_id == stack_id) //same stack type + if(other_stack.amount >= max_amount) to_chat(user, SPAN_WARNING("The stack is full!")) return TRUE - var/to_transfer = min(src.amount, S.max_amount-S.amount) + var/to_transfer = min(amount, other_stack.max_amount - other_stack.amount) if(to_transfer <= 0) return to_chat(user, SPAN_INFO("You transfer [to_transfer] between the stacks.")) - S.add(to_transfer) - if (S && usr.interactee==S) - INVOKE_ASYNC(S, TYPE_PROC_REF(/obj/item/stack, interact), usr) - src.use(to_transfer) - if (src && usr.interactee==src) - INVOKE_ASYNC(src, TYPE_PROC_REF(/obj/item/stack, interact), usr) + other_stack.add(to_transfer) + if(other_stack && user.interactee == other_stack) + INVOKE_ASYNC(other_stack, TYPE_PROC_REF(/obj/item/stack, interact), user) + use(to_transfer) + if(!QDELETED(src) && user.interactee == src) + INVOKE_ASYNC(src, TYPE_PROC_REF(/obj/item/stack, interact), user) user.next_move = world.time + 0.3 SECONDS return TRUE diff --git a/code/game/objects/items/storage/bags.dm b/code/game/objects/items/storage/bags.dm index 542b947134e8..19e012ff1c14 100644 --- a/code/game/objects/items/storage/bags.dm +++ b/code/game/objects/items/storage/bags.dm @@ -46,9 +46,9 @@ if(!sum_storage_cost) icon_state = "trashbag0" - else if(sum_storage_cost < round(max_storage_space * 0.35)) + else if(sum_storage_cost < floor(max_storage_space * 0.35)) icon_state = "trashbag1" - else if(sum_storage_cost < round(max_storage_space * 0.7)) + else if(sum_storage_cost < floor(max_storage_space * 0.7)) icon_state = "trashbag2" else icon_state = "trashbag3" @@ -203,7 +203,7 @@ var/row_num = 0 var/col_count = min(7,storage_slots) -1 if (adjusted_contents > 7) - row_num = round((adjusted_contents-1) / 7) // 7 is the maximum allowed width. + row_num = floor((adjusted_contents-1) / 7) // 7 is the maximum allowed width. slot_orient_objs(row_num, col_count, numbered_contents) return diff --git a/code/game/objects/items/storage/belt.dm b/code/game/objects/items/storage/belt.dm index 1daffa2908f0..385c22d3a713 100644 --- a/code/game/objects/items/storage/belt.dm +++ b/code/game/objects/items/storage/belt.dm @@ -357,7 +357,7 @@ /obj/item/explosive/grenade/flashbang, /obj/item/explosive/grenade/custom/teargas, /obj/item/reagent_container/spray/pepper, - /obj/item/handcuffs, + /obj/item/restraint/handcuffs, /obj/item/device/flash, /obj/item/clothing/glasses, /obj/item/ammo_magazine/pistol, @@ -402,7 +402,7 @@ new /obj/item/weapon/gun/energy/taser(src) new /obj/item/device/flash(src) new /obj/item/weapon/baton(src) - new /obj/item/handcuffs(src) + new /obj/item/restraint/handcuffs(src) new /obj/item/reagent_container/spray/pepper(src) new /obj/item/device/clue_scanner(src) @@ -412,7 +412,7 @@ new /obj/item/weapon/baton(src) new /obj/item/reagent_container/spray/pepper(src) new /obj/item/device/clue_scanner(src) - new /obj/item/handcuffs(src) + new /obj/item/restraint/handcuffs(src) /obj/item/storage/belt/security/MP/UPP name = "\improper Type 43 military police rig" @@ -422,7 +422,7 @@ new /obj/item/weapon/gun/energy/taser(src) new /obj/item/device/flash(src) new /obj/item/weapon/baton(src) - new /obj/item/handcuffs(src) + new /obj/item/restraint/handcuffs(src) new /obj/item/reagent_container/spray/pepper(src) new /obj/item/ammo_magazine/revolver/upp/shrapnel(src) @@ -439,8 +439,8 @@ new /obj/item/weapon/baton(src) new /obj/item/reagent_container/spray/pepper(src) new /obj/item/device/clue_scanner(src) - new /obj/item/handcuffs(src) - new /obj/item/handcuffs(src) + new /obj/item/restraint/handcuffs(src) + new /obj/item/restraint/handcuffs(src) new /obj/item/explosive/grenade/flashbang(src) /obj/item/storage/belt/security/MP/CMB/synth/fill_preset_inventory() @@ -449,8 +449,8 @@ new /obj/item/weapon/baton(src) new /obj/item/reagent_container/spray/pepper(src) new /obj/item/device/clue_scanner(src) - new /obj/item/handcuffs(src) - new /obj/item/handcuffs(src) + new /obj/item/restraint/handcuffs(src) + new /obj/item/restraint/handcuffs(src) new /obj/item/explosive/grenade/flashbang(src) /obj/item/storage/belt/marine diff --git a/code/game/objects/items/storage/boxes.dm b/code/game/objects/items/storage/boxes.dm index 4b7ecc4c5599..ab221b89bfe2 100644 --- a/code/game/objects/items/storage/boxes.dm +++ b/code/game/objects/items/storage/boxes.dm @@ -345,14 +345,28 @@ icon_state = "handcuff" /obj/item/storage/box/handcuffs/fill_preset_inventory() - new /obj/item/handcuffs(src) - new /obj/item/handcuffs(src) - new /obj/item/handcuffs(src) - new /obj/item/handcuffs(src) - new /obj/item/handcuffs(src) - new /obj/item/handcuffs(src) - new /obj/item/handcuffs(src) + new /obj/item/restraint/handcuffs(src) + new /obj/item/restraint/handcuffs(src) + new /obj/item/restraint/handcuffs(src) + new /obj/item/restraint/handcuffs(src) + new /obj/item/restraint/handcuffs(src) + new /obj/item/restraint/handcuffs(src) + new /obj/item/restraint/handcuffs(src) + + +/obj/item/storage/box/legcuffs + name = "box of legcuffs" + desc = "A box full of legcuffs." + icon_state = "handcuff" +/obj/item/storage/box/legcuffs/fill_preset_inventory() + new /obj/item/restraint/legcuffs(src) + new /obj/item/restraint/legcuffs(src) + new /obj/item/restraint/legcuffs(src) + new /obj/item/restraint/legcuffs(src) + new /obj/item/restraint/legcuffs(src) + new /obj/item/restraint/legcuffs(src) + new /obj/item/restraint/legcuffs(src) /obj/item/storage/box/zipcuffs name = "box of zip cuffs" @@ -360,20 +374,20 @@ icon_state = "handcuff" /obj/item/storage/box/zipcuffs/fill_preset_inventory() - new /obj/item/handcuffs/zip(src) - new /obj/item/handcuffs/zip(src) - new /obj/item/handcuffs/zip(src) - new /obj/item/handcuffs/zip(src) - new /obj/item/handcuffs/zip(src) - new /obj/item/handcuffs/zip(src) - new /obj/item/handcuffs/zip(src) - new /obj/item/handcuffs/zip(src) - new /obj/item/handcuffs/zip(src) - new /obj/item/handcuffs/zip(src) - new /obj/item/handcuffs/zip(src) - new /obj/item/handcuffs/zip(src) - new /obj/item/handcuffs/zip(src) - new /obj/item/handcuffs/zip(src) + new /obj/item/restraint/handcuffs/zip(src) + new /obj/item/restraint/handcuffs/zip(src) + new /obj/item/restraint/handcuffs/zip(src) + new /obj/item/restraint/handcuffs/zip(src) + new /obj/item/restraint/handcuffs/zip(src) + new /obj/item/restraint/handcuffs/zip(src) + new /obj/item/restraint/handcuffs/zip(src) + new /obj/item/restraint/handcuffs/zip(src) + new /obj/item/restraint/handcuffs/zip(src) + new /obj/item/restraint/handcuffs/zip(src) + new /obj/item/restraint/handcuffs/zip(src) + new /obj/item/restraint/handcuffs/zip(src) + new /obj/item/restraint/handcuffs/zip(src) + new /obj/item/restraint/handcuffs/zip(src) /obj/item/storage/box/zipcuffs/small name = "small box of zip cuffs" @@ -381,13 +395,13 @@ w_class = SIZE_MEDIUM /obj/item/storage/box/zipcuffs/fill_preset_inventory() - new /obj/item/handcuffs/zip(src) - new /obj/item/handcuffs/zip(src) - new /obj/item/handcuffs/zip(src) - new /obj/item/handcuffs/zip(src) - new /obj/item/handcuffs/zip(src) - new /obj/item/handcuffs/zip(src) - new /obj/item/handcuffs/zip(src) + new /obj/item/restraint/handcuffs/zip(src) + new /obj/item/restraint/handcuffs/zip(src) + new /obj/item/restraint/handcuffs/zip(src) + new /obj/item/restraint/handcuffs/zip(src) + new /obj/item/restraint/handcuffs/zip(src) + new /obj/item/restraint/handcuffs/zip(src) + new /obj/item/restraint/handcuffs/zip(src) /obj/item/storage/box/tapes name = "box of regulation tapes" @@ -560,7 +574,7 @@ new /obj/item/device/flashlight/flare(src) /obj/item/storage/box/m94/update_icon() - if(!contents.len) + if(!length(contents)) icon_state = "m94_e" else icon_state = "m94" @@ -576,7 +590,7 @@ new /obj/item/device/flashlight/flare/signal(src) /obj/item/storage/box/m94/signal/update_icon() - if(!contents.len) + if(!length(contents)) icon_state = "m89_e" else icon_state = "m89" @@ -594,6 +608,24 @@ var/grenade_type = /obj/item/explosive/grenade/high_explosive has_gamemode_skin = TRUE +/obj/item/storage/box/nade_box/Initialize() + . = ..() + RegisterSignal(src, COMSIG_ITEM_DROPPED, PROC_REF(try_forced_folding)) + +/obj/item/storage/box/nade_box/proc/try_forced_folding(datum/source, mob/user) + SIGNAL_HANDLER + + if(!isturf(loc)) + return + + if(length(contents)) + return + + UnregisterSignal(src, COMSIG_ITEM_DROPPED) + storage_close(user) + to_chat(user, SPAN_NOTICE("You throw away [src].")) + qdel(src) + /obj/item/storage/box/nade_box/post_skin_selection() base_icon = icon_state @@ -602,9 +634,8 @@ new grenade_type(src) /obj/item/storage/box/nade_box/update_icon() - if(!contents.len) + if(!length(contents)) icon_state = "[base_icon]_e" - qdel(src) //No reason to keep it - nobody will reuse it... else icon_state = base_icon @@ -714,7 +745,7 @@ storage_slots = 7 max_w_class = 0 use_sound = "rip" - var/isopened = 0 + var/isopened = FALSE /obj/item/storage/box/MRE/fill_preset_inventory() pickflavor() @@ -752,13 +783,16 @@ /obj/item/storage/box/MRE/Initialize() . = ..() - isopened = 0 + isopened = FALSE icon_state = "mealpack" RegisterSignal(src, COMSIG_ITEM_DROPPED, PROC_REF(try_forced_folding)) /obj/item/storage/box/MRE/proc/try_forced_folding(datum/source, mob/user) SIGNAL_HANDLER + if(!isturf(loc)) + return + if(locate(/obj/item/reagent_container/food/snacks/packaged_meal) in src) return @@ -768,10 +802,8 @@ qdel(src) /obj/item/storage/box/MRE/update_icon() - if(!contents.len) - qdel(src) - else if(!isopened) - isopened = 1 + if(!isopened) + isopened = TRUE icon_state = "mealpackopened" //food boxes for storage in bulk diff --git a/code/game/objects/items/storage/firstaid.dm b/code/game/objects/items/storage/firstaid.dm index 201e34654624..314628bab9a3 100644 --- a/code/game/objects/items/storage/firstaid.dm +++ b/code/game/objects/items/storage/firstaid.dm @@ -385,7 +385,7 @@ . = ..() var/pills_amount = contents.len if(pills_amount) - var/percentage_filled = round(pills_amount/max_storage_space * 100) + var/percentage_filled = floor(pills_amount/max_storage_space * 100) switch(percentage_filled) if(80 to 101) . += SPAN_INFO("The [name] seems fairly full.") diff --git a/code/game/objects/items/storage/large_holster.dm b/code/game/objects/items/storage/large_holster.dm index 09885db34fc9..220bf4e86d1e 100644 --- a/code/game/objects/items/storage/large_holster.dm +++ b/code/game/objects/items/storage/large_holster.dm @@ -321,7 +321,7 @@ fuel.forceMove(get_turf(user)) fuel = new_fuel visible_message("[user] swaps out the fuel tank in [src].","You swap out the fuel tank in [src] and drop the old one.") - to_chat(user, "The newly inserted [new_fuel.caliber] contains: [round(new_fuel.get_ammo_percent())]% fuel.") + to_chat(user, "The newly inserted [new_fuel.caliber] contains: [floor(new_fuel.get_ammo_percent())]% fuel.") user.temp_drop_inv_item(new_fuel) new_fuel.moveToNullspace() //necessary to not confuse the storage system playsound(src, 'sound/machines/click.ogg', 25, TRUE) @@ -336,11 +336,11 @@ . += "It is storing a M240-T incinerator unit." if (get_dist(user, src) <= 1) if(fuel) - . += "The [fuel.caliber] currently contains: [round(fuel.get_ammo_percent())]% fuel." + . += "The [fuel.caliber] currently contains: [floor(fuel.get_ammo_percent())]% fuel." if(fuelB) - . += "The [fuelB.caliber] currently contains: [round(fuelB.get_ammo_percent())]% fuel." + . += "The [fuelB.caliber] currently contains: [floor(fuelB.get_ammo_percent())]% fuel." if(fuelX) - . += "The [fuelX.caliber] currently contains: [round(fuelX.get_ammo_percent())]% fuel." + . += "The [fuelX.caliber] currently contains: [floor(fuelX.get_ammo_percent())]% fuel." /datum/action/item_action/specialist/toggle_fuel ability_primacy = SPEC_PRIMARY_ACTION_1 diff --git a/code/game/objects/items/storage/misc.dm b/code/game/objects/items/storage/misc.dm index 424a4f5be0e8..e8da7936ddb6 100644 --- a/code/game/objects/items/storage/misc.dm +++ b/code/game/objects/items/storage/misc.dm @@ -119,6 +119,7 @@ w_class = SIZE_SMALL max_w_class = SIZE_TINY storage_slots = 2 + can_hold = list(/obj/item/weapon/gun/pistol/clfpistol, /obj/item/ammo_magazine/pistol/clfpistol) /obj/item/storage/box/clf/fill_preset_inventory() new /obj/item/weapon/gun/pistol/clfpistol(src) @@ -132,6 +133,7 @@ w_class = SIZE_MEDIUM max_w_class = SIZE_MEDIUM storage_slots = 3 + can_hold = list(/obj/item/weapon/gun/pistol/t73, /obj/item/ammo_magazine/pistol/t73) /obj/item/storage/box/upp/fill_preset_inventory() new /obj/item/weapon/gun/pistol/t73(src) @@ -142,11 +144,11 @@ name = "M8 cartridge bayonet packaging" desc = "Contains one M8 Cartridge Bayonet and two sister CO2 cartridges. Thanks for being a dedicated Boots magazine subscriber!" icon_state = "co2_box" - can_hold = list(/obj/item/attachable/bayonet/co2, /obj/item/co2_cartridge) foldable = TRUE storage_slots = 3 w_class = SIZE_SMALL max_w_class = SIZE_SMALL + can_hold = list(/obj/item/attachable/bayonet/co2, /obj/item/co2_cartridge) /obj/item/storage/box/co2_knife/fill_preset_inventory() new /obj/item/attachable/bayonet/co2(src) diff --git a/code/game/objects/items/storage/pouch.dm b/code/game/objects/items/storage/pouch.dm index 1b75a1a7d89d..caf1f25676b3 100644 --- a/code/game/objects/items/storage/pouch.dm +++ b/code/game/objects/items/storage/pouch.dm @@ -938,7 +938,7 @@ /obj/item/storage/pouch/pressurized_reagent_canister/proc/fill_autoinjector(obj/item/reagent_container/hypospray/autoinjector/autoinjector) var/max_uses = autoinjector.volume / autoinjector.amount_per_transfer_from_this - max_uses = round(max_uses) == max_uses ? max_uses : round(max_uses) + 1 + max_uses = floor(max_uses) == max_uses ? max_uses : floor(max_uses) + 1 if(inner && inner.reagents.total_volume > 0 && (autoinjector.uses_left < max_uses)) inner.reagents.trans_to(autoinjector, autoinjector.volume) autoinjector.update_uses_left() diff --git a/code/game/objects/items/storage/storage.dm b/code/game/objects/items/storage/storage.dm index 51a73d2f0444..7b616b275793 100644 --- a/code/game/objects/items/storage/storage.dm +++ b/code/game/objects/items/storage/storage.dm @@ -259,7 +259,7 @@ GLOBAL_LIST_EMPTY_TYPED(item_storage_box_cache, /datum/item_storage_box) if(!opened) //initialize background box storage_start.screen_loc = "4:16,2:16" - storage_continue.screen_loc = "4:[round(storage_cap_width+(storage_width-storage_cap_width*2)/2+2)],2:16" + storage_continue.screen_loc = "4:[floor(storage_cap_width+(storage_width-storage_cap_width*2)/2+2)],2:16" storage_end.screen_loc = "4:[19+storage_width-storage_cap_width],2:16" var/startpoint = 0 @@ -294,7 +294,7 @@ GLOBAL_LIST_EMPTY_TYPED(item_storage_box_cache, /datum/item_storage_box) storage_start.overlays += ISB.continued storage_start.overlays += ISB.end - O.screen_loc = "4:[round((startpoint+endpoint)/2)+(2+O.hud_offset)],2:16" + O.screen_loc = "4:[floor((startpoint+endpoint)/2)+(2+O.hud_offset)],2:16" O.layer = ABOVE_HUD_LAYER O.plane = ABOVE_HUD_PLANE @@ -390,7 +390,7 @@ GLOBAL_LIST_EMPTY_TYPED(item_storage_box_cache, /datum/item_storage_box) var/row_num = 0 var/col_count = min(7,storage_slots) -1 if (adjusted_contents > 7) - row_num = round((adjusted_contents-1) / 7) // 7 is the maximum allowed width. + row_num = floor((adjusted_contents-1) / 7) // 7 is the maximum allowed width. slot_orient_objs(row_num, col_count, numbered_contents) return diff --git a/code/game/objects/items/tanks/tanks.dm b/code/game/objects/items/tanks/tanks.dm index 5a929a171fc6..7d6da672b721 100644 --- a/code/game/objects/items/tanks/tanks.dm +++ b/code/game/objects/items/tanks/tanks.dm @@ -61,7 +61,7 @@ if(pressure>0) to_chat(user, SPAN_NOTICE("Pressure: [round(pressure,0.1)] kPa")) to_chat(user, SPAN_NOTICE("[gas_type]: 100%")) - to_chat(user, SPAN_NOTICE("Temperature: [round(temperature-T0C)]°C")) + to_chat(user, SPAN_NOTICE("Temperature: [floor(temperature-T0C)]°C")) else to_chat(user, SPAN_NOTICE("Tank is empty!")) src.add_fingerprint(user) @@ -84,12 +84,12 @@ /obj/item/tank/ui_data(mob/user) var/list/data = list() - data["tankPressure"] = round(pressure) - data["tankMaxPressure"] = round(pressure_full) - data["ReleasePressure"] = round(distribute_pressure) - data["defaultReleasePressure"] = round(TANK_DEFAULT_RELEASE_PRESSURE) - data["maxReleasePressure"] = round(TANK_MAX_RELEASE_PRESSURE) - data["minReleasePressure"] = round(TANK_MIN_RELEASE_PRESSURE) + data["tankPressure"] = floor(pressure) + data["tankMaxPressure"] = floor(pressure_full) + data["ReleasePressure"] = floor(distribute_pressure) + data["defaultReleasePressure"] = floor(TANK_DEFAULT_RELEASE_PRESSURE) + data["maxReleasePressure"] = floor(TANK_MAX_RELEASE_PRESSURE) + data["minReleasePressure"] = floor(TANK_MIN_RELEASE_PRESSURE) var/mask_connected = FALSE var/using_internal = FALSE @@ -122,7 +122,7 @@ src.distribute_pressure = TANK_MIN_RELEASE_PRESSURE else if(text2num(tgui_pressure) != null) pressure = text2num(tgui_pressure) - src.distribute_pressure = min(max(round(src.distribute_pressure), 0), TANK_MAX_RELEASE_PRESSURE) + src.distribute_pressure = min(max(floor(src.distribute_pressure), 0), TANK_MAX_RELEASE_PRESSURE) . = TRUE if("valve") diff --git a/code/game/objects/items/tools/experimental_tools.dm b/code/game/objects/items/tools/experimental_tools.dm index dad06367b43d..fc58f95909c9 100644 --- a/code/game/objects/items/tools/experimental_tools.dm +++ b/code/game/objects/items/tools/experimental_tools.dm @@ -107,7 +107,7 @@ icon_state = "autocomp" if(pdcell && pdcell.charge) overlays.Cut() - switch(round(pdcell.charge * 100 / pdcell.maxcharge)) + switch(floor(pdcell.charge * 100 / pdcell.maxcharge)) if(1 to 32) overlays += "cpr_batt_lo" if(33 to 65) @@ -118,7 +118,7 @@ /obj/item/clothing/suit/auto_cpr/get_examine_text(mob/user) . = ..() - . += SPAN_NOTICE("It has [round(pdcell.charge * 100 / pdcell.maxcharge)]% charge remaining.") + . += SPAN_NOTICE("It has [floor(pdcell.charge * 100 / pdcell.maxcharge)]% charge remaining.") @@ -230,7 +230,7 @@ overlays += "+filtering" if(pdcell && pdcell.charge) - switch(round(pdcell.charge * 100 / pdcell.maxcharge)) + switch(floor(pdcell.charge * 100 / pdcell.maxcharge)) if(85 to INFINITY) overlays += "dialysis_battery_100" if(60 to 84) @@ -249,7 +249,7 @@ /obj/item/tool/portadialysis/get_examine_text(mob/user) . = ..() var/currentpercent = 0 - currentpercent = round(pdcell.charge * 100 / pdcell.maxcharge) + currentpercent = floor(pdcell.charge * 100 / pdcell.maxcharge) . += SPAN_INFO("It has [currentpercent]% charge left in its internal battery.") /obj/item/tool/portadialysis/proc/painful_detach() diff --git a/code/game/objects/items/tools/maintenance_tools.dm b/code/game/objects/items/tools/maintenance_tools.dm index 574d08e6a15b..8febff63ee5d 100644 --- a/code/game/objects/items/tools/maintenance_tools.dm +++ b/code/game/objects/items/tools/maintenance_tools.dm @@ -50,6 +50,7 @@ throw_range = 5 matter = list("metal" = 75) attack_verb = list("stabbed") + flags_item = CAN_DIG_SHRAPNEL inherent_traits = list(TRAIT_TOOL_SCREWDRIVER) @@ -141,7 +142,7 @@ icon_state = "tac_cutters" /obj/item/tool/wirecutters/attack(mob/living/carbon/C, mob/user) - if((C.handcuffed) && (istype(C.handcuffed, /obj/item/handcuffs/cable))) + if((C.handcuffed) && (istype(C.handcuffed, /obj/item/restraint/adjustable/cable))) user.visible_message("\The [usr] cuts \the [C]'s restraints with \the [src]!",\ "You cut \the [C]'s restraints with \the [src]!",\ "You hear cable being cut.") @@ -493,6 +494,7 @@ w_class = SIZE_LARGE force = MELEE_FORCE_STRONG flags_equip_slot = SLOT_SUIT_STORE + flags_atom = FPRINT|QUICK_DRAWABLE pry_capable = IS_PRY_CAPABLE_FORCE //but not really ///Whether the Maintenance Jack is on crowbar or wrench mode var/crowbar_mode = TRUE //False for wrench mode @@ -555,13 +557,19 @@ if(requires_superstrength_pry) if(!HAS_TRAIT(user, TRAIT_SUPER_STRONG)) //basically IS_PRY_CAPABLE_CROWBAR return - if(!attacked_door.density) //If its open - return if(attacked_door.heavy) //Unopenable to_chat(usr, SPAN_DANGER("You cannot force [attacked_door] open.")) return if(user.action_busy) return + if(!attacked_door.density && !attacked_door.arePowerSystemsOn()) //If its open and unpowered + attacked_door.close(TRUE) + return + if(attacked_door.density && !attacked_door.arePowerSystemsOn()) // if its closed and unpowered + attacked_door.open(TRUE) + return + if(!attacked_door.density) //If its open + return user.visible_message(SPAN_DANGER("[user] jams [src] into [attacked_door] and starts to pry it open."), SPAN_DANGER("You jam [src] into [attacked_door] and start to pry it open.")) diff --git a/code/game/objects/items/toys/cards.dm b/code/game/objects/items/toys/cards.dm index 39584b2bbb89..f63efd61a615 100644 --- a/code/game/objects/items/toys/cards.dm +++ b/code/game/objects/items/toys/cards.dm @@ -462,7 +462,7 @@ overlays += I return - var/offset = Floor(80/cards_length) + var/offset = floor(80/cards_length) var/matrix/M = matrix() if(direction) @@ -482,13 +482,13 @@ var/image/I = new(src.icon, (concealed ? P.back_icon : P.card_icon)) switch(direction) if(SOUTH) - I.pixel_x = 8 - Floor(offset*i/4) + I.pixel_x = 8 - floor(offset*i/4) if(WEST) - I.pixel_y = -6 + Floor(offset*i/4) + I.pixel_y = -6 + floor(offset*i/4) if(EAST) - I.pixel_y = 8 - Floor(offset*i/4) + I.pixel_y = 8 - floor(offset*i/4) else - I.pixel_x = -7 + Floor(offset*i/4) + I.pixel_x = -7 + floor(offset*i/4) I.transform = M overlays += I i++ diff --git a/code/game/objects/items/weapons/blades.dm b/code/game/objects/items/weapons/blades.dm index a2a4aa8db75d..ce1bb2ded072 100644 --- a/code/game/objects/items/weapons/blades.dm +++ b/code/game/objects/items/weapons/blades.dm @@ -3,7 +3,7 @@ desc = "A dusty sword commonly seen in historical museums. Where you got this is a mystery, for sure. Only a mercenary would be nuts enough to carry one of these. Sharpened to deal massive damage." icon_state = "mercsword" item_state = "machete" - flags_atom = FPRINT|CONDUCT + flags_atom = FPRINT|QUICK_DRAWABLE|CONDUCT flags_equip_slot = SLOT_WAIST force = MELEE_FORCE_STRONG throwforce = MELEE_FORCE_WEAK @@ -114,7 +114,7 @@ icon_state = "throwing_knife" item_state = "combat_knife" desc = "A military knife designed to be thrown at the enemy. Much quieter than a firearm, but requires a steady hand to be used optimally, although you should probably just use a gun instead." - flags_atom = FPRINT|CONDUCT + flags_atom = FPRINT|QUICK_DRAWABLE|CONDUCT sharp = IS_SHARP_ITEM_ACCURATE force = MELEE_FORCE_TIER_1 w_class = SIZE_SMALL @@ -125,6 +125,7 @@ attack_verb = list("slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut") flags_equip_slot = SLOT_STORE|SLOT_FACE flags_armor_protection = SLOT_FACE + flags_item = CAN_DIG_SHRAPNEL /obj/item/weapon/unathiknife name = "duelling knife" diff --git a/code/game/objects/items/weapons/energy.dm b/code/game/objects/items/weapons/energy.dm index 75668cebd5ee..c50fb9ea4e60 100644 --- a/code/game/objects/items/weapons/energy.dm +++ b/code/game/objects/items/weapons/energy.dm @@ -1,6 +1,6 @@ /obj/item/weapon/energy var/active = 0 - flags_atom = FPRINT|NOBLOODY + flags_atom = FPRINT|QUICK_DRAWABLE|NOBLOODY /obj/item/weapon/energy/axe name = "energy axe" @@ -11,7 +11,7 @@ throw_speed = SPEED_FAST throw_range = 5 w_class = SIZE_MEDIUM - flags_atom = FPRINT|CONDUCT|NOBLOODY + flags_atom = FPRINT|CONDUCT|QUICK_DRAWABLE|NOBLOODY flags_item = NOSHIELD attack_verb = list("attacked", "chopped", "cleaved", "torn", "cut") @@ -47,7 +47,7 @@ throw_speed = SPEED_FAST throw_range = 5 w_class = SIZE_SMALL - flags_atom = FPRINT|NOBLOODY + flags_atom = FPRINT|QUICK_DRAWABLE|NOBLOODY flags_item = NOSHIELD attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut") diff --git a/code/game/objects/items/weapons/misc.dm b/code/game/objects/items/weapons/misc.dm index d46619e581e9..c80da310fe51 100644 --- a/code/game/objects/items/weapons/misc.dm +++ b/code/game/objects/items/weapons/misc.dm @@ -3,7 +3,7 @@ desc = "A tool used by great men to placate the frothing masses." icon_state = "chain" item_state = "chain" - flags_atom = FPRINT|CONDUCT + flags_atom = FPRINT|QUICK_DRAWABLE|CONDUCT flags_equip_slot = SLOT_WAIST force = MELEE_FORCE_WEAK throwforce = MELEE_FORCE_WEAK diff --git a/code/game/objects/items/weapons/shields.dm b/code/game/objects/items/weapons/shields.dm index 92400e2d3184..232936c263ae 100644 --- a/code/game/objects/items/weapons/shields.dm +++ b/code/game/objects/items/weapons/shields.dm @@ -101,7 +101,7 @@ desc = "A shield capable of stopping most projectile and melee attacks. It can be retracted, expanded, and stored anywhere." icon = 'icons/obj/items/weapons/weapons.dmi' icon_state = "eshield0" // eshield1 for expanded - flags_atom = FPRINT|CONDUCT|NOBLOODY + flags_atom = FPRINT|QUICK_DRAWABLE|CONDUCT|NOBLOODY force = 3 passive_block = 50 // Shield activation takes over functionality, and no slowdown. readied_block = 50 diff --git a/code/game/objects/items/weapons/stunbaton.dm b/code/game/objects/items/weapons/stunbaton.dm index 2362a70e6e1e..9c1f065bcf7e 100644 --- a/code/game/objects/items/weapons/stunbaton.dm +++ b/code/game/objects/items/weapons/stunbaton.dm @@ -54,7 +54,7 @@ /obj/item/weapon/baton/get_examine_text(mob/user) . = ..() if(bcell) - . += SPAN_NOTICE("The baton is [round(bcell.percent())]% charged.") + . += SPAN_NOTICE("The baton is [floor(bcell.percent())]% charged.") else . += SPAN_WARNING("The baton does not have a power source installed.") diff --git a/code/game/objects/items/weapons/twohanded.dm b/code/game/objects/items/weapons/twohanded.dm index 36e0ea702a95..c363dc551450 100644 --- a/code/game/objects/items/weapons/twohanded.dm +++ b/code/game/objects/items/weapons/twohanded.dm @@ -132,7 +132,7 @@ edge = 1 w_class = SIZE_LARGE flags_equip_slot = SLOT_BACK - flags_atom = FPRINT|CONDUCT + flags_atom = FPRINT|QUICK_DRAWABLE|CONDUCT flags_item = TWOHANDED attack_verb = list("attacked", "chopped", "cleaved", "torn", "cut") @@ -161,7 +161,7 @@ edge = 0 w_class = SIZE_LARGE flags_equip_slot = SLOT_BACK - flags_atom = FPRINT|CONDUCT + flags_atom = FPRINT|QUICK_DRAWABLE|CONDUCT flags_item = TWOHANDED attack_verb = list("smashed", "beaten", "slammed", "struck", "smashed", "battered", "cracked") @@ -188,7 +188,7 @@ force_wielded = 75 wieldsound = 'sound/weapons/saberon.ogg' unwieldsound = 'sound/weapons/saberoff.ogg' - flags_atom = FPRINT|NOBLOODY + flags_atom = FPRINT|QUICK_DRAWABLE|NOBLOODY flags_item = NOSHIELD|TWOHANDED attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut") diff --git a/code/game/objects/items/weapons/weapon.dm b/code/game/objects/items/weapons/weapon.dm index 3d53dfb86b73..5dd98bfa5708 100644 --- a/code/game/objects/items/weapons/weapon.dm +++ b/code/game/objects/items/weapons/weapon.dm @@ -3,6 +3,7 @@ name = "weapon" icon = 'icons/obj/items/weapons/weapons.dmi' hitsound = "swing_hit" + flags_atom = FPRINT|QUICK_DRAWABLE /obj/item/get_examine_text(mob/user) . = ..() diff --git a/code/game/objects/items/weapons/weaponry.dm b/code/game/objects/items/weapons/weaponry.dm index f3c76bcff638..89f5d2186271 100644 --- a/code/game/objects/items/weapons/weaponry.dm +++ b/code/game/objects/items/weapons/weaponry.dm @@ -139,7 +139,7 @@ desc = "A rod with some wire wrapped around the top. It'd be easy to attach something to the top bit." icon_state = "wiredrod" item_state = "rods" - flags_atom = FPRINT|CONDUCT + flags_atom = FPRINT|QUICK_DRAWABLE|CONDUCT force = MELEE_FORCE_WEAK throwforce = MELEE_FORCE_WEAK w_class = SIZE_MEDIUM @@ -175,7 +175,7 @@

Katanas are thrice as sharp as European swords and thrice as hard for that matter too. Anything a longsword can cut through, a katana can cut through better. I'm pretty sure a katana could easily bisect a knight wearing full plate with a simple vertical slash.

\

Ever wonder why medieval Europe never bothered conquering Japan? That's right, they were too scared to fight the disciplined Samurai and their katanas of destruction. Even in World War II, American soldiers targeted the men with the katanas first because their killing power was feared and respected.

" icon_state = "katana" - flags_atom = FPRINT|CONDUCT + flags_atom = FPRINT|QUICK_DRAWABLE|CONDUCT force = 4444 throwforce = MELEE_FORCE_VERY_STRONG sharp = IS_SHARP_ITEM_BIG @@ -219,7 +219,7 @@ var/power = force if(user.skills) - power = round(power * (1 + 0.3*user.skills.get_skill_level(SKILL_MELEE_WEAPONS))) //30% bonus per melee level + power = floor(power * (1 + 0.3*user.skills.get_skill_level(SKILL_MELEE_WEAPONS))) //30% bonus per melee level //if the target also has a katana (and we aren't attacking ourselves), we add some suspense diff --git a/code/game/objects/objs.dm b/code/game/objects/objs.dm index 66b41fff9127..f93f2dab0984 100644 --- a/code/game/objects/objs.dm +++ b/code/game/objects/objs.dm @@ -234,7 +234,7 @@ /obj/proc/afterbuckle(mob/M as mob) // Called after somebody buckled / unbuckled handle_rotation() // To be removed when we have full dir support in set_buckled - SEND_SIGNAL(src, COSMIG_OBJ_AFTER_BUCKLE, buckled_mob) + SEND_SIGNAL(src, COMSIG_OBJ_AFTER_BUCKLE, buckled_mob) if(!buckled_mob) UnregisterSignal(M, COMSIG_PARENT_QDELETING) else @@ -306,6 +306,7 @@ if (M.mob_size <= MOB_SIZE_XENO) if ((M.stat == DEAD && istype(src, /obj/structure/bed/roller) || HAS_TRAIT(M, TRAIT_OPPOSABLE_THUMBS))) do_buckle(M, user) + return if ((M.mob_size > MOB_SIZE_HUMAN)) to_chat(user, SPAN_WARNING("[M] is too big to buckle in.")) return @@ -374,7 +375,7 @@ return 0 bullet_ping(P) if(P.ammo.damage) - update_health(round(P.ammo.damage / 2)) + update_health(floor(P.ammo.damage / 2)) return 1 /obj/item/proc/get_mob_overlay(mob/user_mob, slot) diff --git a/code/game/objects/structures/barricade/barricade.dm b/code/game/objects/structures/barricade/barricade.dm index edb13ac16e5a..28036f92d018 100644 --- a/code/game/objects/structures/barricade/barricade.dm +++ b/code/game/objects/structures/barricade/barricade.dm @@ -264,7 +264,7 @@ bullet.damage = bullet.damage * brute_projectile_multiplier if(istype(bullet.ammo, /datum/ammo/xeno/boiler_gas)) - take_damage(round(50 * burn_multiplier)) + take_damage(floor(50 * burn_multiplier)) else if(bullet.ammo.flags_ammo_behavior & AMMO_ANTISTRUCT) take_damage(bullet.damage * ANTISTRUCT_DMG_MULT_BARRICADES) @@ -279,9 +279,9 @@ new /obj/item/stack/barbed_wire(loc) if(stack_type) var/stack_amt - stack_amt = round(stack_amount * (health/starting_maxhealth)) //Get an amount of sheets back equivalent to remaining health. Obviously, fully destroyed means 0 + stack_amt = floor(stack_amount * (health/starting_maxhealth)) //Get an amount of sheets back equivalent to remaining health. Obviously, fully destroyed means 0 if(upgraded) - stack_amt += round(2 * (health/starting_maxhealth)) + stack_amt += floor(2 * (health/starting_maxhealth)) if(stack_amt) new stack_type(loc, stack_amt) else @@ -304,7 +304,7 @@ deconstruct(FALSE) create_shrapnel(location, rand(2,5), direction, , /datum/ammo/bullet/shrapnel/light, cause_data) else - update_health(round(severity * explosive_multiplier)) + update_health(floor(severity * explosive_multiplier)) /obj/structure/barricade/get_explosion_resistance(direction) if(!density || direction == turn(dir, 90) || direction == turn(dir, -90)) @@ -359,7 +359,7 @@ update_icon() /obj/structure/barricade/proc/update_damage_state() - var/health_percent = round(health/maxhealth * 100) + var/health_percent = floor(health/maxhealth * 100) switch(health_percent) if(0 to 25) damage_state = BARRICADE_DMG_HEAVY if(25 to 50) damage_state = BARRICADE_DMG_MODERATE diff --git a/code/game/objects/structures/barricade/deployable.dm b/code/game/objects/structures/barricade/deployable.dm index ca35f82bdde5..e53c917dc2bb 100644 --- a/code/game/objects/structures/barricade/deployable.dm +++ b/code/game/objects/structures/barricade/deployable.dm @@ -269,7 +269,7 @@ /obj/item/stack/folding_barricade/get_examine_text(mob/user) . = ..() - if(round(min(stack_health)/maxhealth * 100) <= 75) + if(floor(min(stack_health)/maxhealth * 100) <= 75) . += SPAN_WARNING("It appears to be damaged.") /obj/item/stack/folding_barricade/three diff --git a/code/game/objects/structures/bookcase.dm b/code/game/objects/structures/bookcase.dm index b310bd00aa07..a6fc95fa0d73 100644 --- a/code/game/objects/structures/bookcase.dm +++ b/code/game/objects/structures/bookcase.dm @@ -7,6 +7,24 @@ density = TRUE opacity = TRUE +/obj/structure/bookcase/deconstruct(disassembled) + new /obj/item/stack/sheet/metal(loc) + return ..() + +/obj/structure/bookcase/attack_alien(mob/living/carbon/xenomorph/xeno) + if(xeno.a_intent == INTENT_HARM) + if(unslashable) + return + xeno.animation_attack_on(src) + playsound(loc, 'sound/effects/metalhit.ogg', 25, 1) + xeno.visible_message(SPAN_DANGER("[xeno] slices [src] apart!"), + SPAN_DANGER("We slice [src] apart!"), null, 5, CHAT_TYPE_XENO_COMBAT) + deconstruct(FALSE) + return XENO_ATTACK_ACTION + else + attack_hand(xeno) + return XENO_NONCOMBAT_ACTION + /obj/structure/bookcase/Initialize() . = ..() for(var/obj/item/I in loc) @@ -20,12 +38,18 @@ O.forceMove(src) update_icon() else if(HAS_TRAIT(O, TRAIT_TOOL_PEN)) - var/newname = stripped_input(usr, "What would you like to title this bookshelf?") + var/newname = stripped_input(user, "What would you like to title this bookshelf?") if(!newname) return else name = ("bookcase ([strip_html(newname)])") playsound(src, "paper_writing", 15, TRUE) + else if(HAS_TRAIT(O, TRAIT_TOOL_WRENCH)) + playsound(loc, 'sound/items/Ratchet.ogg', 25, 1) + if(do_after(user, 1 SECONDS, INTERRUPT_MOVED, BUSY_ICON_FRIENDLY, src)) + user.visible_message("[user] deconstructs [src].", \ + "You deconstruct [src].", "You hear a noise.") + deconstruct(FALSE) else ..() @@ -33,7 +57,7 @@ if(contents.len) var/obj/item/book/choice = input("Which book would you like to remove from the shelf?") as null|obj in contents if(choice) - if(usr.is_mob_incapacitated() || !in_range(loc, usr)) + if(user.is_mob_incapacitated() || !in_range(loc, user)) return if(ishuman(user)) if(!user.get_active_hand()) @@ -67,7 +91,7 @@ /obj/structure/bookcase/manuals/medical - name = "Medical Manuals bookcase" + name = "medical manuals bookcase" /obj/structure/bookcase/manuals/medical/Initialize() . = ..() @@ -78,7 +102,7 @@ /obj/structure/bookcase/manuals/engineering - name = "Engineering Manuals bookcase" + name = "engineering manuals bookcase" /obj/structure/bookcase/manuals/engineering/Initialize() . = ..() @@ -90,7 +114,7 @@ update_icon() /obj/structure/bookcase/manuals/research_and_development - name = "R&D Manuals bookcase" + name = "\improper R&D manuals bookcase" /obj/structure/bookcase/manuals/research_and_development/Initialize() . = ..() diff --git a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm index 6742e8b31700..93fe78e63d98 100644 --- a/code/game/objects/structures/crates_lockers/closets.dm +++ b/code/game/objects/structures/crates_lockers/closets.dm @@ -127,7 +127,7 @@ var/obj/item/explosive/plastic/P = I if(P.active) continue - var/item_size = Ceiling(I.w_class / 2) + var/item_size = ceil(I.w_class / 2) if(stored_units + item_size > storage_capacity) continue if(!I.anchored) diff --git a/code/game/objects/structures/crates_lockers/closets/secure/cm_closets.dm b/code/game/objects/structures/crates_lockers/closets/secure/cm_closets.dm index 6c711a7bcabe..baa9e9bd8cc9 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/cm_closets.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/cm_closets.dm @@ -170,7 +170,7 @@ GLOBAL_LIST_EMPTY(co_secure_boxes) new /obj/item/weapon/gun/energy/taser(src) new /obj/item/weapon/baton(src) new /obj/item/device/flash(src) - new /obj/item/handcuffs(src) + new /obj/item/restraint/handcuffs(src) new /obj/item/reagent_container/spray/pepper(src) new /obj/item/storage/pouch/general/medium(src) if(prob(50)) @@ -205,7 +205,7 @@ GLOBAL_LIST_EMPTY(co_secure_boxes) new /obj/item/storage/backpack/satchel/sec(src) new /obj/item/device/flash(src) new /obj/item/reagent_container/spray/pepper(src) - new /obj/item/handcuffs(src) + new /obj/item/restraint/handcuffs(src) new /obj/item/storage/pouch/general/large(src) /obj/structure/closet/secure_closet/military_officer_spare diff --git a/code/game/objects/structures/crates_lockers/closets/secure/freezer.dm b/code/game/objects/structures/crates_lockers/closets/secure/freezer.dm index 323ff50fd63b..f42db78dcf39 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/freezer.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/freezer.dm @@ -152,8 +152,14 @@ return cooldown = 5 var/containers = 0 + var/containers_ready = FALSE for(var/obj/item/reagent_container/glass/I in freezer.contents) if(I.reagents.replace_with(polymerization_recipe, "paraformaldehyde", 3)) containers++ + if(!I.reagents.has_reagent("formaldehyde", 3) || !I.reagents.has_reagent("water", 3)) + containers_ready = TRUE if(containers > 3) break + + if(containers_ready) //at least 1 container has finished, ring the bell + playsound(freezer.loc, 'sound/machines/ding.ogg', 150) diff --git a/code/game/objects/structures/fence.dm b/code/game/objects/structures/fence.dm index 60a8682a4930..7c602c34380f 100644 --- a/code/game/objects/structures/fence.dm +++ b/code/game/objects/structures/fence.dm @@ -3,6 +3,7 @@ desc = "A large metal mesh strewn between two poles. Intended as a cheap way to separate areas, while allowing one to see through it." icon = 'icons/obj/structures/props/fence.dmi' icon_state = "fence0" + throwpass = TRUE density = TRUE anchored = TRUE layer = WINDOW_LAYER @@ -230,6 +231,6 @@ /obj/structure/fence/fire_act(exposed_temperature, exposed_volume) if(exposed_temperature > T0C + 800) - health -= round(exposed_volume / 100) + health -= floor(exposed_volume / 100) healthcheck(0) //Don't make hit sounds, it's dumb with fire/heat ..() diff --git a/code/game/objects/structures/girders.dm b/code/game/objects/structures/girders.dm index 6cd6a5cd0300..01e0e1b717cc 100644 --- a/code/game/objects/structures/girders.dm +++ b/code/game/objects/structures/girders.dm @@ -332,7 +332,7 @@ if(P.ammo.damage_type == BURN) dmg = P.damage else - dmg = round(P.damage * 0.5) + dmg = floor(P.damage * 0.5) if(dmg) health -= dmg take_damage(dmg) diff --git a/code/game/objects/structures/grille.dm b/code/game/objects/structures/grille.dm index 063f6a337290..31d7ee5c9b44 100644 --- a/code/game/objects/structures/grille.dm +++ b/code/game/objects/structures/grille.dm @@ -112,7 +112,7 @@ if(Proj.ammo.damage_type == HALLOSS) return 0 - src.health -= round(Proj.damage*0.3) + src.health -= floor(Proj.damage*0.3) healthcheck() return 1 diff --git a/code/game/objects/structures/platforms.dm b/code/game/objects/structures/platforms.dm index cfffbc90fb7c..5510d319ee1e 100644 --- a/code/game/objects/structures/platforms.dm +++ b/code/game/objects/structures/platforms.dm @@ -142,7 +142,6 @@ icon_state = "kutjevo_platform" name = "raised metal edge" desc = "A raised level of metal, often used to elevate areas above others, or construct bridges. You could probably climb it." - climb_delay = 10 /obj/structure/platform_decoration/kutjevo name = "raised metal corner" diff --git a/code/game/objects/structures/props.dm b/code/game/objects/structures/props.dm index 8c03a4dbd66c..745dd7ed40fc 100644 --- a/code/game/objects/structures/props.dm +++ b/code/game/objects/structures/props.dm @@ -574,7 +574,7 @@ for(var/mob/living/carbon/human/mob in range(heating_range, src)) if(mob.bodytemperature < T20C) - mob.bodytemperature += min(round(T20C - mob.bodytemperature)*0.7, 25) + mob.bodytemperature += min(floor(T20C - mob.bodytemperature)*0.7, 25) mob.recalculate_move_delay = TRUE if(quiet) diff --git a/code/game/objects/structures/reagent_dispensers.dm b/code/game/objects/structures/reagent_dispensers.dm index d0f9f513e7f8..aeab625857d5 100644 --- a/code/game/objects/structures/reagent_dispensers.dm +++ b/code/game/objects/structures/reagent_dispensers.dm @@ -22,6 +22,8 @@ verbs -= /obj/structure/reagent_dispensers/verb/set_APTFT if(chemical) reagents.add_reagent(chemical, reagent_amount) + if(!anchored && is_ground_level(z) && prob(70)) + anchored = TRUE /obj/structure/reagent_dispensers/initialize_pass_flags(datum/pass_flags_container/PF) ..() diff --git a/code/game/objects/structures/stool_bed_chair_nest/chairs.dm b/code/game/objects/structures/stool_bed_chair_nest/chairs.dm index e523906f4cfe..4cdcb1a970ca 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/chairs.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/chairs.dm @@ -150,7 +150,7 @@ stacked_size-- update_overlays() - var/list/candidate_target_turfs = range(round(stacked_size/2), starting_turf) + var/list/candidate_target_turfs = range(floor(stacked_size/2), starting_turf) candidate_target_turfs -= starting_turf var/turf/target_turf = candidate_target_turfs[rand(1, length(candidate_target_turfs))] diff --git a/code/game/objects/structures/surface.dm b/code/game/objects/structures/surface.dm index ac8cf51a407e..0d86f131ebbd 100644 --- a/code/game/objects/structures/surface.dm +++ b/code/game/objects/structures/surface.dm @@ -27,8 +27,8 @@ var/mouse_x = text2num(click_data["icon-x"])-1 // Ranging from 0 to 31 var/mouse_y = text2num(click_data["icon-y"])-1 - var/cell_x = clamp(round(mouse_x/CELLSIZE), 0, CELLS-1) // Ranging from 0 to CELLS-1 - var/cell_y = clamp(round(mouse_y/CELLSIZE), 0, CELLS-1) + var/cell_x = clamp(floor(mouse_x/CELLSIZE), 0, CELLS-1) // Ranging from 0 to CELLS-1 + var/cell_y = clamp(floor(mouse_y/CELLSIZE), 0, CELLS-1) var/list/center = cached_key_number_decode(new_item.center_of_mass) diff --git a/code/game/objects/structures/watercloset.dm b/code/game/objects/structures/watercloset.dm index 1014e8ab7a96..be46d416ffdc 100644 --- a/code/game/objects/structures/watercloset.dm +++ b/code/game/objects/structures/watercloset.dm @@ -22,7 +22,7 @@ /obj/structure/toilet/Initialize() . = ..() - open = round(rand(0, 1)) + open = floor(rand(0, 1)) cistern_overlay = new() cistern_overlay.icon = icon cistern_overlay.layer = ABOVE_MOB_LAYER diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm index 341fcb657080..154cc43d4af2 100644 --- a/code/game/objects/structures/window.dm +++ b/code/game/objects/structures/window.dm @@ -360,7 +360,7 @@ /obj/structure/window/fire_act(exposed_temperature, exposed_volume) if(exposed_temperature > T0C + 800) if(!not_damageable) - health -= round(exposed_volume / 100) + health -= floor(exposed_volume / 100) healthcheck(0) //Don't make hit sounds, it's dumb with fire/heat ..() @@ -373,7 +373,7 @@ /obj/structure/window/phoronbasic/fire_act(exposed_temperature, exposed_volume) if(exposed_temperature > T0C + 32000) - health -= round(exposed_volume / 1000) + health -= floor(exposed_volume / 1000) healthcheck(0) //Don't make hit sounds, it's dumb with fire/heat ..() diff --git a/code/game/sound.dm b/code/game/sound.dm index f2b71d9a64c7..29c471f06e9d 100644 --- a/code/game/sound.dm +++ b/code/game/sound.dm @@ -63,7 +63,7 @@ S.frequency = GET_RANDOM_FREQ // Same frequency for everybody if(!sound_range) - sound_range = round(0.25*vol) //if no specific range, the max range is equal to a quarter of the volume. + sound_range = floor(0.25*vol) //if no specific range, the max range is equal to a quarter of the volume. S.range = sound_range var/turf/turf_source = get_turf(source) diff --git a/code/game/supplyshuttle.dm b/code/game/supplyshuttle.dm index 482139c03707..58db10080fbd 100644 --- a/code/game/supplyshuttle.dm +++ b/code/game/supplyshuttle.dm @@ -412,6 +412,7 @@ GLOBAL_DATUM_INIT(supply_controller, /datum/controller/supply, new()) "Operations", "Weapons", "Vehicle Ammo", + "Vehicle Equipment", "Attachments", "Ammo", "Weapons Specialist Ammo", @@ -488,13 +489,13 @@ GLOBAL_DATUM_INIT(supply_controller, /datum/controller/supply, new()) if(crate_iteration <= 5 && crate_amount < 4) crate_amount = 4 - var/unit_crate_amount = round(crate_amount) + var/unit_crate_amount = floor(crate_amount) var/carry = crate_amount - unit_crate_amount random_crates_carry[pool] += carry var/total_carry = random_crates_carry[pool] if(total_carry >= 1) - var/additional_crates = round(total_carry) + var/additional_crates = floor(total_carry) random_crates_carry[pool] -= additional_crates unit_crate_amount += additional_crates @@ -510,7 +511,7 @@ GLOBAL_DATUM_INIT(supply_controller, /datum/controller/supply, new()) if(!GLOB.supply_packs_datums[supply_info.reference_package]) return - supply_info.cost = round(supply_info.cost * ASRS_COST_MULTIPLIER) //We still do this to raise the weight + supply_info.cost = floor(supply_info.cost * ASRS_COST_MULTIPLIER) //We still do this to raise the weight //We have to create a supply order to make the system spawn it. Here we transform a crate into an order. var/datum/supply_order/supply_order = new /datum/supply_order() supply_order.ordernum = ordernum++ @@ -524,7 +525,7 @@ GLOBAL_DATUM_INIT(supply_controller, /datum/controller/supply, new()) /datum/controller/supply/proc/pick_weighted_crate(list/datum/supply_packs_asrs/cratelist) var/list/datum/supply_packs_asrs/weighted_crate_list = list() for(var/datum/supply_packs_asrs/crate in cratelist) - var/weight = (round(10000/crate.cost)) + var/weight = (floor(10000/crate.cost)) weighted_crate_list[crate] = weight return pickweight(weighted_crate_list) @@ -776,7 +777,7 @@ GLOBAL_DATUM_INIT(supply_controller, /datum/controller/supply, new()) var/datum/supply_packs/supply_pack = GLOB.supply_packs_datums[supply_type] if(supply_pack.contraband || supply_pack.group != last_viewed_group || !supply_pack.buyable) continue //Have to send the type instead of a reference to - temp += "[supply_pack.name] Cost: $[round(supply_pack.cost) * SUPPLY_TO_MONEY_MUPLTIPLIER]
" //the obj because it would get caught by the garbage + temp += "[supply_pack.name] Cost: $[floor(supply_pack.cost) * SUPPLY_TO_MONEY_MUPLTIPLIER]
" //the obj because it would get caught by the garbage else if (href_list["doorder"]) if(world.time < reqtime) @@ -975,7 +976,7 @@ GLOBAL_DATUM_INIT(supply_controller, /datum/controller/supply, new()) var/datum/supply_packs/supply_pack = GLOB.supply_packs_datums[supply_type] if(!is_buyable(supply_pack)) continue - temp += "[supply_pack.name] Cost: $[round(supply_pack.cost) * SUPPLY_TO_MONEY_MUPLTIPLIER]
" //the obj because it would get caught by the garbage + temp += "[supply_pack.name] Cost: $[floor(supply_pack.cost) * SUPPLY_TO_MONEY_MUPLTIPLIER]
" //the obj because it would get caught by the garbage else if (href_list["doorder"]) if(world.time < reqtime) @@ -1053,10 +1054,10 @@ GLOBAL_DATUM_INIT(supply_controller, /datum/controller/supply, new()) if(SO.ordernum == ordernum) supply_order = SO supply_pack = supply_order.object - if(GLOB.supply_controller.points >= round(supply_pack.cost) && GLOB.supply_controller.black_market_points >= supply_pack.dollar_cost) + if(GLOB.supply_controller.points >= floor(supply_pack.cost) && GLOB.supply_controller.black_market_points >= supply_pack.dollar_cost) GLOB.supply_controller.requestlist.Cut(i,i+1) - GLOB.supply_controller.points -= round(supply_pack.cost) - GLOB.supply_controller.black_market_points -= round(supply_pack.dollar_cost) + GLOB.supply_controller.points -= floor(supply_pack.cost) + GLOB.supply_controller.black_market_points -= floor(supply_pack.dollar_cost) if(GLOB.supply_controller.black_market_heat != -1) //-1 Heat means heat is disabled GLOB.supply_controller.black_market_heat = clamp(GLOB.supply_controller.black_market_heat + supply_pack.crate_heat + (supply_pack.crate_heat * rand(rand(-0.25,0),0.25)), 0, 100) // black market heat added is crate heat +- up to 25% of crate heat GLOB.supply_controller.shoppinglist += supply_order @@ -1155,7 +1156,7 @@ GLOBAL_DATUM_INIT(supply_controller, /datum/controller/supply, new()) var/datum/supply_packs/supply_pack = GLOB.supply_packs_datums[supply_type] if(!is_buyable(supply_pack)) continue - temp += "[supply_pack.name] Cost: $[round(supply_pack.dollar_cost)]
" + temp += "[supply_pack.name] Cost: $[floor(supply_pack.dollar_cost)]
" /obj/structure/machinery/computer/supplycomp/proc/handle_mendoza_dialogue() @@ -1367,6 +1368,13 @@ GLOBAL_DATUM_INIT(supply_controller, /datum/controller/supply, new()) name = "Barebones M577 Armored Personal Carrier" ordered_vehicle = /obj/effect/vehicle_spawner/apc/unarmed/broken +/datum/vehicle_order/arc + name = "M540-B Armored Recon Carrier" + ordered_vehicle = /obj/effect/vehicle_spawner/arc + +/datum/vehicle_order/arc/has_vehicle_lock() + return + /obj/structure/machinery/computer/supplycomp/vehicle/Initialize() . = ..() diff --git a/code/game/turfs/transit.dm b/code/game/turfs/transit.dm index dd6a8d920f6f..00175ac5e365 100644 --- a/code/game/turfs/transit.dm +++ b/code/game/turfs/transit.dm @@ -11,7 +11,7 @@ if(isobserver(crosser) || crosser.anchored) return - if(!isitem(crosser) && !isliving(crosser)) + if(!isobj(crosser) && !isliving(crosser)) return if(!istype(old_loc, /turf/open/space)) @@ -24,6 +24,8 @@ /turf/open/space/transit/proc/handle_crosser(atom/movable/crosser) if(QDELETED(crosser)) return + if(crosser.can_paradrop()) //let's not delete people who arent meant to be deleted... This shouldn't happen normally, but if it does, congratulations, you gamed the system + return qdel(crosser) /turf/open/space/transit/dropship @@ -39,14 +41,42 @@ if(!istype(dropship) || dropship.mode != SHUTTLE_CALL) return ..() - if(dropship.destination.id != DROPSHIP_LZ1 && dropship.destination.id != DROPSHIP_LZ2) - return ..() // we're not heading towards the LZs - // you just jumped out of a dropship heading towards the LZ, have fun living on the way down! var/list/ground_z_levels = SSmapping.levels_by_trait(ZTRAIT_GROUND) if(!length(ground_z_levels)) return ..() + if(dropship.paradrop_signal) //if dropship in paradrop mode, drop them near the signal. Whether they have a parachute or not + var/list/valid_turfs = list() + var/turf/location = get_turf(dropship.paradrop_signal.signal_loc) + for(var/turf/turf as anything in RANGE_TURFS(crosser.get_paradrop_scatter(), location)) + var/area/turf_area = get_area(turf) + if(!turf_area || CEILING_IS_PROTECTED(turf_area.ceiling, CEILING_PROTECTION_TIER_1)) + continue + if(turf.density) + continue + var/found_dense = FALSE + for(var/atom/turf_atom in turf) + if(turf_atom.density && turf_atom.can_block_movement) + found_dense = TRUE + break + if(found_dense) + continue + if(protected_by_pylon(TURF_PROTECTION_MORTAR, turf)) + continue + valid_turfs += turf + var/turf/deploy_turf + if(length(valid_turfs)) //if we found a fitting place near the landing zone... + deploy_turf = pick(valid_turfs) + else //if we somehow did not. Drop them right on the signal then, there is nothing we can do + deploy_turf = location + if(crosser.can_paradrop()) + INVOKE_ASYNC(crosser, TYPE_PROC_REF(/atom/movable, handle_paradrop), deploy_turf, dropship.name) + return + INVOKE_ASYNC(crosser, TYPE_PROC_REF(/atom/movable, handle_airdrop), deploy_turf, dropship.name) + return + + //find a random spot to drop them var/list/area/potential_areas = shuffle(SSmapping.areas_in_z["[ground_z_levels[1]]"]) for(var/area/maybe_this_area in potential_areas) @@ -67,53 +97,141 @@ continue // couldnt find one in 10 loops, check another area // we found a good turf, lets drop em - INVOKE_ASYNC(src, PROC_REF(handle_drop), crosser, possible_turf, dropship.name) + if(crosser.can_paradrop()) + INVOKE_ASYNC(crosser, TYPE_PROC_REF(/atom/movable, handle_paradrop), possible_turf, dropship.name) + return + INVOKE_ASYNC(crosser, TYPE_PROC_REF(/atom/movable, handle_airdrop), possible_turf, dropship.name) return + //we didn't find a turf to drop them... This shouldn't happen usually + if(crosser.can_paradrop()) //don't delete them if they were supposed to paradrop + to_chat(crosser, SPAN_BOLDWARNING("Your harness got stuck and you got thrown back in the dropship.")) + var/turf/projected = get_ranged_target_turf(crosser.loc, turn(dir, 180), 15) + INVOKE_ASYNC(crosser, TYPE_PROC_REF(/atom/movable, throw_atom), projected, 50, SPEED_FAST, null, TRUE) + return return ..() // they couldn't be dropped, just delete them -/turf/open/space/transit/dropship/proc/handle_drop(atom/movable/crosser, turf/target, dropship_name) - if(QDELETED(crosser)) - return - ADD_TRAIT(crosser, TRAIT_IMMOBILIZED, TRAIT_SOURCE_DROPSHIP_INTERACTION) +/atom/movable/proc/can_paradrop() + return FALSE + +/atom/movable/proc/get_paradrop_scatter() + return 7 + +/mob/living/carbon/human/can_paradrop() + if(istype(back, /obj/item/parachute)) + return TRUE + return ..() + +/obj/structure/closet/crate/can_paradrop() //for now all crates can be paradropped + return TRUE + +/obj/structure/closet/crate/get_paradrop_scatter() //crates land closer to the signal + return 4 - crosser.pixel_z = 360 - crosser.forceMove(target) - crosser.visible_message(SPAN_WARNING("[crosser] falls out of the sky."), SPAN_HIGHDANGER("As you fall out of the [dropship_name], you plummet towards the ground.")) - animate(crosser, time = 6, pixel_z = 0, flags = ANIMATION_PARALLEL) +/obj/structure/largecrate/can_paradrop() + return TRUE - REMOVE_TRAIT(crosser, TRAIT_IMMOBILIZED, TRAIT_SOURCE_DROPSHIP_INTERACTION) - if(isitem(crosser)) - var/obj/item/item = crosser - item.explosion_throw(200) // give it a bit of a kick +/obj/structure/largecrate/get_paradrop_scatter() + return 4 + +/atom/movable/proc/handle_paradrop(turf/target, dropship_name) + clear_active_explosives() + ADD_TRAIT(src, TRAIT_IMMOBILIZED, TRAIT_SOURCE_DROPSHIP_INTERACTION) + ADD_TRAIT(src, TRAIT_UNDENSE, TRAIT_SOURCE_DROPSHIP_INTERACTION) + var/image/cables = image('icons/obj/structures/droppod_32x64.dmi', src, "chute_cables_static") + overlays += cables + var/image/chute = image('icons/obj/structures/droppod_64x64.dmi', src, "chute_static") + + chute.pixel_x -= 16 + chute.pixel_y += 16 + + overlays += chute + pixel_z = 360 + forceMove(target) + playsound(src, 'sound/items/fulton.ogg', 30, 1) + animate(src, time = 3.5 SECONDS, pixel_z = 0, flags = ANIMATION_PARALLEL) + addtimer(CALLBACK(target, TYPE_PROC_REF(/turf, ceiling_debris)), 2 SECONDS) + addtimer(CALLBACK(src, PROC_REF(clear_parachute), cables, chute), 3.5 SECONDS) + +/mob/living/carbon/handle_paradrop(turf/target, dropship_name) + ..() + if(client) + playsound_client(client, 'sound/items/fulton.ogg', src, 50, 1) //for some reason you don't hear the sound while dropping, maybe because of force move? + +/atom/movable/proc/clear_parachute(image/cables, image/chute) + if(QDELETED(src)) return + REMOVE_TRAIT(src, TRAIT_IMMOBILIZED, TRAIT_SOURCE_DROPSHIP_INTERACTION) + REMOVE_TRAIT(src, TRAIT_UNDENSE, TRAIT_SOURCE_DROPSHIP_INTERACTION) + overlays -= cables + overlays -= chute + +/atom/movable/proc/clear_active_explosives() + for(var/obj/item/explosive/explosive in contents) + if(!explosive.active) + continue + explosive.deconstruct(FALSE) + +/atom/movable/proc/handle_airdrop(turf/target, dropship_name) + clear_active_explosives() + ADD_TRAIT(src, TRAIT_IMMOBILIZED, TRAIT_SOURCE_DROPSHIP_INTERACTION) + pixel_z = 360 + forceMove(target) + animate(src, time = 6, pixel_z = 0, flags = ANIMATION_PARALLEL) + INVOKE_ASYNC(target, TYPE_PROC_REF(/turf, ceiling_debris)) + REMOVE_TRAIT(src, TRAIT_IMMOBILIZED, TRAIT_SOURCE_DROPSHIP_INTERACTION) + +/obj/handle_airdrop(turf/target, dropship_name) + ..() + if(!indestructible && prob(30)) // throwing objects from the air is not always a good idea + deconstruct(FALSE) + +/obj/structure/closet/handle_airdrop(turf/target, dropship_name) // good idea but no + if(!opened) + for(var/atom/movable/content in src) + INVOKE_ASYNC(content, TYPE_PROC_REF(/atom/movable, handle_airdrop), target, dropship_name) + open() + . = ..() - if(!isliving(crosser)) - return // don't know how you got here, but you shouldnt be here. - var/mob/living/fallen_mob = crosser +/obj/item/handle_airdrop(turf/target, dropship_name) + ..() + if(QDELETED(src)) + return + if(!indestructible && w_class < SIZE_MEDIUM) //tiny and small items will be lost, good riddance + deconstruct(FALSE) + return + explosion_throw(200) // give it a bit of a kick + +/obj/item/explosive/handle_airdrop(turf/target, dropship_name) + if(active) + deconstruct(FALSE) + return + ..() +/mob/living/handle_airdrop(turf/target, dropship_name) + ..() playsound(target, "punch", rand(20, 70), TRUE) playsound(target, "punch", rand(20, 70), TRUE) playsound(target, "bone_break", rand(20, 70), TRUE) playsound(target, "bone_break", rand(20, 70), TRUE) - fallen_mob.KnockDown(10) // 10 seconds - fallen_mob.Stun(3) // 3 seconds - - - if(ishuman(fallen_mob)) - var/mob/living/carbon/human/human = fallen_mob - human.last_damage_data = create_cause_data("falling from [dropship_name]", human) - // I'd say falling from space is pretty much like getting hit by an explosion - human.take_overall_armored_damage(300, ARMOR_BOMB, limb_damage_chance = 100) - // but just in case, you will still take a ton of damage. - human.take_overall_damage(200, used_weapon = "falling", limb_damage_chance = 100) - if(human.stat != DEAD) - human.death(human.last_damage_data) - fallen_mob.status_flags |= PERMANENTLY_DEAD - return + KnockDown(10) + Stun(3) // take a little bit more damage otherwise - fallen_mob.take_overall_damage(400, used_weapon = "falling", limb_damage_chance = 100) + take_overall_damage(400, used_weapon = "falling", limb_damage_chance = 100) + visible_message(SPAN_WARNING("[src] falls out of the sky."), SPAN_HIGHDANGER("As you fall out of the [dropship_name], you plummet towards the ground.")) + +/mob/living/carbon/human/handle_airdrop(turf/target, dropship_name) + ..() + last_damage_data = create_cause_data("falling from [dropship_name]", src) + // I'd say falling from space is pretty much like getting hit by an explosion + take_overall_armored_damage(300, ARMOR_BOMB, limb_damage_chance = 100) + // but just in case, you will still take a ton of damage. + take_overall_damage(200, used_weapon = "falling", limb_damage_chance = 100) + if(stat < DEAD) + death(last_damage_data) + status_flags |= PERMANENTLY_DEAD + /turf/open/space/transit/dropship/alamo shuttle_tag = DROPSHIP_ALAMO diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm index 9b0f457cf074..3bc1262b748f 100644 --- a/code/game/turfs/turf.dm +++ b/code/game/turfs/turf.dm @@ -516,7 +516,7 @@ return var/amount = size - var/spread = round(sqrt(size)*1.5) + var/spread = floor(sqrt(size)*1.5) var/list/turfs = list() for(var/turf/open/floor/F in range(src,spread)) diff --git a/code/game/turfs/walls/r_wall.dm b/code/game/turfs/walls/r_wall.dm index 9d256b257090..f9e7fa764e71 100644 --- a/code/game/turfs/walls/r_wall.dm +++ b/code/game/turfs/walls/r_wall.dm @@ -127,7 +127,7 @@ user.visible_message(SPAN_NOTICE("[user] starts repairing the damage to [src]."), SPAN_NOTICE("You start repairing the damage to [src].")) playsound(src, 'sound/items/Welder.ogg', 25, 1) - if(do_after(user, max(5, round(damage / 5) * user.get_skill_duration_multiplier(SKILL_CONSTRUCTION)), INTERRUPT_ALL, BUSY_ICON_FRIENDLY) && istype(src, /turf/closed/wall/r_wall)) + if(do_after(user, max(5, floor(damage / 5) * user.get_skill_duration_multiplier(SKILL_CONSTRUCTION)), INTERRUPT_ALL, BUSY_ICON_FRIENDLY) && istype(src, /turf/closed/wall/r_wall)) user.visible_message(SPAN_NOTICE("[user] finishes repairing the damage to [src]."), SPAN_NOTICE("You finish repairing the damage to [src].")) take_damage(-damage) diff --git a/code/game/turfs/walls/wall_icon.dm b/code/game/turfs/walls/wall_icon.dm index 218d59305bdc..600878ac5963 100644 --- a/code/game/turfs/walls/wall_icon.dm +++ b/code/game/turfs/walls/wall_icon.dm @@ -1,6 +1,6 @@ #define BULLETHOLE_STATES 10 //How many variations of bullethole patterns there are //Formulas. These don't need to be defines, but helpful green. Should likely reuse these for a base 8 icon system. -#define cur_increment(v) round((v-1)/8)+1 +#define cur_increment(v) floor((v-1)/8)+1 /turf/closed/wall/update_icon() ..() @@ -31,7 +31,7 @@ overlays += I if(damage) - var/current_dmg_overlay = round(damage / damage_cap * damage_overlays.len) + 1 + var/current_dmg_overlay = floor(damage / damage_cap * damage_overlays.len) + 1 if(current_dmg_overlay > damage_overlays.len) current_dmg_overlay = damage_overlays.len diff --git a/code/game/turfs/walls/wall_types.dm b/code/game/turfs/walls/wall_types.dm index 7b26854737cc..21839d35af03 100644 --- a/code/game/turfs/walls/wall_types.dm +++ b/code/game/turfs/walls/wall_types.dm @@ -1036,7 +1036,7 @@ INITIALIZE_IMMEDIATE(/turf/closed/wall/indestructible/splashscreen) SPAN_XENONOTICE("You claw \the [src].")) playsound(src, "alien_resin_break", 25) if (M.hivenumber == hivenumber) - take_damage(Ceiling(HEALTH_WALL_XENO * 0.25)) //Four hits for a regular wall + take_damage(ceil(HEALTH_WALL_XENO * 0.25)) //Four hits for a regular wall else take_damage(M.melee_damage_lower*RESIN_XENO_DAMAGE_MULTIPLIER) return XENO_ATTACK_ACTION @@ -1252,7 +1252,7 @@ INITIALIZE_IMMEDIATE(/turf/closed/wall/indestructible/splashscreen) SPAN_XENONOTICE("We claw \the [src].")) playsound(src, "alien_resin_break", 25) if (M.hivenumber == hivenumber) - take_damage(Ceiling(HEALTH_WALL_XENO * 0.25)) //Four hits for a regular wall + take_damage(ceil(HEALTH_WALL_XENO * 0.25)) //Four hits for a regular wall else take_damage(M.melee_damage_lower*RESIN_XENO_DAMAGE_MULTIPLIER) return XENO_ATTACK_ACTION diff --git a/code/game/turfs/walls/walls.dm b/code/game/turfs/walls/walls.dm index 1781739176b7..bb1694359b98 100644 --- a/code/game/turfs/walls/walls.dm +++ b/code/game/turfs/walls/walls.dm @@ -298,7 +298,7 @@ break if(thermite > (damage_cap - damage)/100) // Thermite gains a speed buff when the amount is overkill - var/timereduction = round((thermite - (damage_cap - damage)/100)/5) // Every 5 units over the required amount reduces the sleep by 0.1s + var/timereduction = floor((thermite - (damage_cap - damage)/100)/5) // Every 5 units over the required amount reduces the sleep by 0.1s sleep(max(2, 20 - timereduction)) else sleep(20) @@ -490,7 +490,7 @@ user.visible_message(SPAN_NOTICE("[user] starts repairing the damage to [src]."), SPAN_NOTICE("You start repairing the damage to [src].")) playsound(src, 'sound/items/Welder.ogg', 25, 1) - if(do_after(user, max(5, round(damage / 5) * user.get_skill_duration_multiplier(SKILL_CONSTRUCTION)), INTERRUPT_ALL, BUSY_ICON_FRIENDLY) && istype(src, /turf/closed/wall) && WT && WT.isOn()) + if(do_after(user, max(5, floor(damage / 5) * user.get_skill_duration_multiplier(SKILL_CONSTRUCTION)), INTERRUPT_ALL, BUSY_ICON_FRIENDLY) && istype(src, /turf/closed/wall) && WT && WT.isOn()) user.visible_message(SPAN_NOTICE("[user] finishes repairing the damage to [src]."), SPAN_NOTICE("You finish repairing the damage to [src].")) take_damage(-damage) diff --git a/code/game/verbs/ooc.dm b/code/game/verbs/ooc.dm index 2fe22ef3d4da..d8d3c379862a 100644 --- a/code/game/verbs/ooc.dm +++ b/code/game/verbs/ooc.dm @@ -217,7 +217,7 @@ if(!desired_width) // Calculate desired pixel width using window size and aspect ratio var/height = text2num(map_size[2]) - desired_width = round(height * aspect_ratio) + desired_width = floor(height * aspect_ratio) var/split_size = splittext(sizes["mainwindow.split.size"], "x") var/split_width = text2num(split_size[1]) diff --git a/code/game/verbs/records.dm b/code/game/verbs/records.dm index 05506804790a..3810bf7e99cb 100644 --- a/code/game/verbs/records.dm +++ b/code/game/verbs/records.dm @@ -1,10 +1,8 @@ -//CO Whitelist is '1', Synthetic Whitelist is '2', Yautja Whitelist is '3'. - /client/verb/own_records() set name = "View Own Records" set category = "OOC.Records" - var/list/options = list("Admin", "Merit", "Commanding Officer", "Synthetic", "Yautja") + var/list/options = list("Admin", "Merit", "Whitelist") var/choice = tgui_input_list(usr, "What record do you wish to view?", "Record Choice", options) switch(choice) @@ -12,12 +10,8 @@ show_own_notes(NOTE_ADMIN, choice) if("Merit") show_own_notes(NOTE_MERIT, choice) - if("Commanding Officer") - show_own_notes(NOTE_COMMANDER, choice) - if("Synthetic") - show_own_notes(NOTE_SYNTHETIC, choice) - if("Yautja") - show_own_notes(NOTE_YAUTJA, choice) + if("Whitelist") + show_own_notes(NOTE_WHITELIST, choice) else return to_chat(usr, SPAN_NOTICE("Displaying your [choice] Record.")) @@ -46,12 +40,8 @@ switch(note_category) if(NOTE_MERIT) color = "#9e3dff" - if(NOTE_COMMANDER) + if(NOTE_WHITELIST) color = "#324da5" - if(NOTE_SYNTHETIC) - color = "#39e7a4" - if(NOTE_YAUTJA) - color = "#114e11" dat += "[N.text] by [admin_ckey] ([N.admin_rank]) on [N.date] [NOTE_ROUND_ID(N)] " dat += "

" @@ -69,16 +59,15 @@ //Contributions and suggestions are welcome. //Kindly, forest2001 -/client/verb/other_records() +/client/proc/other_records() set name = "View Target Records" set category = "OOC.Records" ///Management Access - var/MA + var/manager = FALSE ///Edit Access - var/edit_C = FALSE - var/edit_S = FALSE - var/edit_Y = FALSE + var/add_wl = FALSE + var/del_wl = FALSE ///Note category options var/list/options = list() @@ -86,7 +75,7 @@ if(CLIENT_IS_STAFF(src)) options = GLOB.note_categories.Copy() if(admin_holder.rights & R_PERMISSIONS) - MA = TRUE + manager = TRUE else if(!isCouncil(src)) to_chat(usr, SPAN_WARNING("Error: you are not authorised to view the records of another player!")) return @@ -97,15 +86,11 @@ return target = ckey(target) - if(check_whitelist_status(WHITELIST_COMMANDER_COUNCIL)) - options |= "Commanding Officer" - edit_C = TRUE - if(check_whitelist_status(WHITELIST_SYNTHETIC_COUNCIL)) - options |= "Synthetic" - edit_S = TRUE - if(check_whitelist_status(WHITELIST_YAUTJA_COUNCIL)) - options |= "Yautja" - edit_Y = TRUE + if(manager || isCouncil(src)) + options |= "Whitelist" + add_wl = TRUE + if(manager || isSenator(src)) + del_wl = TRUE var/choice = tgui_input_list(usr, "What record do you wish to view?", "Record Choice", options) if(!choice) @@ -115,21 +100,8 @@ show_other_record(NOTE_ADMIN, choice, target, TRUE) if("Merit") show_other_record(NOTE_MERIT, choice, target, TRUE) - if("Commanding Officer") - if(MA || check_whitelist_status(WHITELIST_COMMANDER_LEADER)) - show_other_record(NOTE_COMMANDER, choice, target, TRUE, TRUE) - else - show_other_record(NOTE_COMMANDER, choice, target, edit_C) - if("Synthetic") - if(MA || check_whitelist_status(WHITELIST_SYNTHETIC_LEADER)) - show_other_record(NOTE_SYNTHETIC, choice, target, TRUE, TRUE) - else - show_other_record(NOTE_SYNTHETIC, choice, target, edit_S) - if("Yautja") - if(MA || check_whitelist_status(WHITELIST_YAUTJA_LEADER)) - show_other_record(NOTE_YAUTJA, choice, target, TRUE, TRUE) - else - show_other_record(NOTE_YAUTJA, choice, target, edit_Y) + if("Whitelist") + show_other_record(NOTE_WHITELIST, choice, target, add_wl, del_wl) to_chat(usr, SPAN_NOTICE("Displaying [target]'s [choice] notes.")) @@ -148,15 +120,9 @@ if(NOTE_MERIT) color = "#9e3dff" add_dat = "Add Merit Note
" - if(NOTE_COMMANDER) + if(NOTE_WHITELIST) color = "#324da5" - add_dat = "Add Commander Note
" - if(NOTE_SYNTHETIC) - color = "#39e7a4" - add_dat = "Add Synthetic Note
" - if(NOTE_YAUTJA) - color = "#114e11" - add_dat = "Add Yautja Note
" + add_dat = "Add Whitelist Note
" var/list/datum/view_record/note_view/NL = DB_VIEW(/datum/view_record/note_view, DB_COMP("player_ckey", DB_EQUALS, target)) for(var/datum/view_record/note_view/N as anything in NL) diff --git a/code/game/world.dm b/code/game/world.dm index 5aecfe851051..6a792d1a4e41 100644 --- a/code/game/world.dm +++ b/code/game/world.dm @@ -332,9 +332,7 @@ GLOBAL_LIST_INIT(reboot_sfx, file2list("config/reboot_sfx.txt")) if(!map_load_z_cutoff) return // var/area/global_area = GLOB.areas_by_type[world.area] // We're guaranteed to be touching the global area, so we'll just do this -// var/list/to_add = block( -// locate(old_max + 1, 1, 1), -// locate(maxx, maxy, map_load_z_cutoff)) +// var/list/to_add = block(old_max + 1, 1, 1, maxx, maxy, map_load_z_cutoff) // global_area.contained_turfs += to_add /world/proc/increase_max_y(new_maxy, map_load_z_cutoff = maxz) @@ -345,9 +343,7 @@ GLOBAL_LIST_INIT(reboot_sfx, file2list("config/reboot_sfx.txt")) if(!map_load_z_cutoff) return // var/area/global_area = GLOB.areas_by_type[world.area] // We're guarenteed to be touching the global area, so we'll just do this -// var/list/to_add = block( -// locate(1, old_maxy + 1, 1), -// locate(maxx, maxy, map_load_z_cutoff)) +// var/list/to_add = block(1, old_maxy + 1, 1, maxx, maxy, map_load_z_cutoff) // global_area.contained_turfs += to_add /world/proc/incrementMaxZ() diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index 4194627262a4..979217019f0c 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -95,12 +95,8 @@ color = "#AA0055" else if(N.note_category == NOTE_MERIT) color = "#9e3dff" - else if(N.note_category == NOTE_COMMANDER) + else if(N.note_category == NOTE_WHITELIST) color = "#324da5" - else if(N.note_category == NOTE_SYNTHETIC) - color = "#39e7a4" - else if(N.note_category == NOTE_YAUTJA) - color = "#114e11" dat += "[N.text] by [admin_ckey] ([N.admin_rank])[confidential_text] on [N.date] [NOTE_ROUND_ID(N)] " if(admin_ckey == usr.ckey || admin_ckey == "Adminbot" || check_for_rights(R_PERMISSIONS)) diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index da95fc090da8..aa87f157173c 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -72,6 +72,7 @@ GLOBAL_LIST_INIT(admin_verbs_default, list( /client/proc/cmd_admin_say, /*staff-only ooc chat*/ /client/proc/cmd_mod_say, /* alternate way of typing asay, no different than cmd_admin_say */ /client/proc/cmd_admin_tacmaps_panel, + /client/proc/other_records, )) GLOBAL_LIST_INIT(admin_verbs_admin, list( diff --git a/code/modules/admin/holder2.dm b/code/modules/admin/holder2.dm index 3a3ce661e231..f202e0a6ecbe 100644 --- a/code/modules/admin/holder2.dm +++ b/code/modules/admin/holder2.dm @@ -140,16 +140,14 @@ you will have to do something like if(client.admin_holder.rights & R_ADMIN) your return FALSE return TRUE -/// gets the role dependant data for tgui-say -/datum/admins/proc/get_tgui_say_roles() - var/roles = list() - if(check_for_rights(R_ADMIN)) - roles += "Admin" - if(check_for_rights(R_MOD)) - roles += "Mod" +/// gets any additional channels for tgui-say (admin & mentor) +/datum/admins/proc/get_tgui_say_extra_channels() + var/extra_channels = list() + if(check_for_rights(R_ADMIN) || check_for_rights(R_MOD)) + extra_channels += ADMIN_CHANNEL if(check_for_rights(R_MENTOR)) - roles += "Mentor" - return roles + extra_channels += MENTOR_CHANNEL + return extra_channels /datum/proc/CanProcCall(procname) return TRUE diff --git a/code/modules/admin/player_panel/player_panel.dm b/code/modules/admin/player_panel/player_panel.dm index 86922c525e32..424ed1f74232 100644 --- a/code/modules/admin/player_panel/player_panel.dm +++ b/code/modules/admin/player_panel/player_panel.dm @@ -323,7 +323,7 @@ var/dat = "

Antagonists

" dat += "Current Game Mode: [SSticker.mode.name]
" - dat += "Round Duration: [round(world.time / 36000)]:[add_zero(world.time / 600 % 60, 2)]:[world.time / 100 % 6][world.time / 100 % 10]
" + dat += "Round Duration: [floor(world.time / 36000)]:[add_zero(world.time / 600 % 60, 2)]:[world.time / 100 % 6][world.time / 100 % 10]
" if(length(GLOB.other_factions_human_list)) dat += "
" @@ -381,7 +381,7 @@ if (SSticker.current_state >= GAME_STATE_PLAYING) var/dat = "

Round Status

" dat += "Current Game Mode: [SSticker.mode.name]
" - dat += "Round Duration: [round(world.time / 36000)]:[add_zero(world.time / 600 % 60, 2)]:[world.time / 100 % 6][world.time / 100 % 10]
" + dat += "Round Duration: [floor(world.time / 36000)]:[add_zero(world.time / 600 % 60, 2)]:[world.time / 100 % 6][world.time / 100 % 10]
" if(check_rights(R_DEBUG, 0)) dat += "VV Shuttle Controller

" diff --git a/code/modules/admin/verbs/SDQL2/SDQL_2.dm b/code/modules/admin/verbs/SDQL2/SDQL_2.dm index 05da6d3c8672..2b8bc66652f6 100644 --- a/code/modules/admin/verbs/SDQL2/SDQL_2.dm +++ b/code/modules/admin/verbs/SDQL2/SDQL_2.dm @@ -113,12 +113,13 @@ Here's a slightly more formal quick reference. - The 4 queries you can do are: + The 5 queries you can do are: "SELECT " "CALL ON " "UPDATE SET var=,var2=" "DELETE " + "SINGLECALL ." "" in this context is " [IN ] [chain of MAP/WHERE modifiers]" @@ -155,11 +156,13 @@ Add USING keyword to the front of the query to use options system The defaults aren't necessarily implemented, as there is no need to. Available options: (D) means default - PROCCALL = (D)ASYNC, BLOCKING - SELECT = FORCE_NULLS, (D)SKIP_NULLS + PROCCALL = (D) ASYNC, BLOCKING + SELECT = FORCE_NULLS, (D) SKIP_NULLS PRIORITY = HIGH, (D) NORMAL AUTOGC = (D) AUTOGC, KEEP_ALIVE SEQUENTIAL = TRUE - The queries in this batch will be executed sequentially one by one not in parallel + LISTSOURCE = OPTIMIZED, (D) UNOPTIMIZED + SELECTPRINT = (D) OUTPUT_POPUP, NO_OUTPUT_POPUP Example: USING PROCCALL = BLOCKING, SELECT = FORCE_NULLS, PRIORITY = HIGH SELECT /mob FROM world WHERE z == 1 @@ -174,21 +177,31 @@ #define SDQL2_STATE_SWITCHING 5 #define SDQL2_STATE_HALTING 6 -#define SDQL2_VALID_OPTION_TYPES list("proccall", "select", "priority", "autogc" , "sequential") -#define SDQL2_VALID_OPTION_VALUES list("async", "blocking", "force_nulls", "skip_nulls", "high", "normal", "keep_alive" , "true") +#define SDQL2_VALID_OPTION_TYPES list("proccall", "select", "priority", "autogc" , "sequential", "listsource", "selectprint") +#define SDQL2_VALID_OPTION_VALUES list("async", "blocking", "force_nulls", "skip_nulls", "high", "normal", "keep_alive" , "true", "optimized", "no_output") +/// Don't print nulls that the select picked up. Enabled by default #define SDQL2_OPTION_SELECT_OUTPUT_SKIP_NULLS (1<<0) +/// Require proccalls to finish before continuing the query #define SDQL2_OPTION_BLOCKING_CALLS (1<<1) -#define SDQL2_OPTION_HIGH_PRIORITY (1<<2) //High priority SDQL query, allow using almost all of the tick. +/// High priority SDQL query, allow using almost all of the tick. +#define SDQL2_OPTION_HIGH_PRIORITY (1<<2) +/// Do not delete the query after its completion #define SDQL2_OPTION_DO_NOT_AUTOGC (1<<3) +/// Queries chained together with ; will execute in series instead of in parallel #define SDQL2_OPTION_SEQUENTIAL (1<<4) +/// Change to GLOB.mob_list for /mob or etc. automatically if we're iterating over world. +/// This isn't default because SDQL2 is a technical tool that should be as failure-safe as possible (such as a mob not being added to GLOB.mob_list, for example) +#define SDQL2_OPTION_OPTIMIZED_SOURCE (1<<5) +/// When using SELECT, don't print a popup. Makes SELECT vastly faster. +#define SDQL2_OPTION_NO_OUTPUT_POPUP (1<<6) #define SDQL2_OPTIONS_DEFAULT (SDQL2_OPTION_SELECT_OUTPUT_SKIP_NULLS) #define SDQL2_IS_RUNNING (state == SDQL2_STATE_EXECUTING || state == SDQL2_STATE_SEARCHING || state == SDQL2_STATE_SWITCHING || state == SDQL2_STATE_PRESEARCH) #define SDQL2_HALT_CHECK if(!SDQL2_IS_RUNNING) {state = SDQL2_STATE_HALTING; return FALSE;}; -#define SDQL2_TICK_CHECK ((options & SDQL2_OPTION_HIGH_PRIORITY)? CHECK_TICK_HIGH_PRIORITY : CHECK_TICK) +#define SDQL2_TICK_CHECK ((options & SDQL2_OPTION_HIGH_PRIORITY) ? CHECK_TICK_HIGH_PRIORITY : CHECK_TICK) #define SDQL2_STAGE_SWITCH_CHECK if(state != SDQL2_STATE_SWITCHING){\ if(state == SDQL2_STATE_HALTING){\ @@ -206,12 +219,12 @@ var/prompt = tgui_alert(usr, "Run SDQL2 Query?", "SDQL2", list("Yes", "Cancel")) if (prompt != "Yes") return - var/list/results = world.SDQL2_query(query_text, key_name_admin(usr), "[key_name(usr)]") + var/list/results = world.SDQL2_query(query_text, key_name_admin(usr), "[key_name(usr)]", executor = src) if(length(results) == 3) for(var/I in 1 to 3) to_chat(usr, results[I], confidential = TRUE) -/world/proc/SDQL2_query(query_text, log_entry1, log_entry2, silent = FALSE) +/world/proc/SDQL2_query(query_text, log_entry1, log_entry2, silent = FALSE, client/executor) var/query_log = "executed SDQL query(s): \"[query_text]\"." if(!silent) message_admins("[log_entry1] [query_log]") @@ -243,6 +256,8 @@ if(query.options & SDQL2_OPTION_SEQUENTIAL) sequential = TRUE + SSstatpanels.set_SDQL2_tab(executor) + if(sequential) //Start first one var/datum/sdql2_query/query = popleft(waiting_queue) running += query @@ -492,6 +507,14 @@ GLOBAL_DATUM_INIT(sdql2_vv_statobj, /obj/effect/statclick/sdql2_vv_all, new(null switch(value) if("true") options |= SDQL2_OPTION_SEQUENTIAL + if("listsource") + switch(value) + if("optimized") + options |= SDQL2_OPTION_OPTIMIZED_SOURCE + if("selectprint") + switch(value) + if("no_output") + options |= SDQL2_OPTION_NO_OUTPUT_POPUP /datum/sdql2_query/proc/ARun() INVOKE_ASYNC(src, PROC_REF(Run)) @@ -515,7 +538,11 @@ GLOBAL_DATUM_INIT(sdql2_vv_statobj, /obj/effect/statclick/sdql2_vv_all, new(null SDQL2_STAGE_SWITCH_CHECK state = SDQL2_STATE_SEARCHING - var/list/found = Search(search_tree) + var/list/found = list() + if(length(search_tree)) + found = Search(search_tree) + else + state = SDQL2_STATE_SWITCHING SDQL2_STAGE_SWITCH_CHECK state = SDQL2_STATE_EXECUTING @@ -532,7 +559,7 @@ GLOBAL_DATUM_INIT(sdql2_vv_statobj, /obj/effect/statclick/sdql2_vv_all, new(null var/mob/showmob = C.mob to_chat(showmob, "SDQL query results: [get_query_text()]
\ SDQL query completed: [islist(obj_count_all)? length(obj_count_all) : obj_count_all] objects selected by path, and \ - [where_switched? "[islist(obj_count_eligible)? length(obj_count_eligible) : obj_count_eligible] objects executed on after WHERE keyword selection." : ""]
\ + [where_switched? "[islist(obj_count_eligible)? length(obj_count_eligible) : obj_count_eligible] objects executed on after WHERE keyword selection." : "no execution performed."]
\ SDQL query took [DisplayTimeText(end_time - start_time)] to complete.
", confidential = TRUE) if(length(select_text)) var/text = islist(select_text)? select_text.Join() : select_text @@ -627,8 +654,45 @@ GLOBAL_DATUM_INIT(sdql2_vv_statobj, /obj/effect/statclick/sdql2_vv_all, new(null type = text2path(type) var/typecache = typecacheof(type) - if(ispath(type, /mob)) - for(var/mob/d in location) + if(ispath(type, /mob/living/carbon/human)) + var/list/search_location = location + if((location == world) && (options & SDQL2_OPTION_OPTIMIZED_SOURCE)) + search_location = GLOB.human_mob_list + + for(var/mob/living/carbon/human/d in search_location) + if(typecache[d.type] && (d.can_vv_get() || superuser)) + out += d + SDQL2_TICK_CHECK + SDQL2_HALT_CHECK + + else if(ispath(type, /mob/living/carbon/xenomorph)) + var/list/search_location = location + if((location == world) && (options & SDQL2_OPTION_OPTIMIZED_SOURCE)) + search_location = GLOB.xeno_mob_list + + for(var/mob/living/carbon/xenomorph/d in search_location) + if(typecache[d.type] && (d.can_vv_get() || superuser)) + out += d + SDQL2_TICK_CHECK + SDQL2_HALT_CHECK + + else if(ispath(type, /mob/living)) + var/list/search_location = location + if((location == world) && (options & SDQL2_OPTION_OPTIMIZED_SOURCE)) + search_location = GLOB.living_mob_list + + for(var/mob/living/d in search_location) + if(typecache[d.type] && (d.can_vv_get() || superuser)) + out += d + SDQL2_TICK_CHECK + SDQL2_HALT_CHECK + + else if(ispath(type, /mob)) + var/list/search_location = location + if((location == world) && (options & SDQL2_OPTION_OPTIMIZED_SOURCE)) + search_location = GLOB.mob_list + + for(var/mob/d in search_location) if(typecache[d.type] && (d.can_vv_get() || superuser)) out += d SDQL2_TICK_CHECK @@ -641,6 +705,61 @@ GLOBAL_DATUM_INIT(sdql2_vv_statobj, /obj/effect/statclick/sdql2_vv_all, new(null SDQL2_TICK_CHECK SDQL2_HALT_CHECK + else if(ispath(type, /obj/item/weapon/gun)) + var/list/search_location = location + if((location == world) && (options & SDQL2_OPTION_OPTIMIZED_SOURCE)) + search_location = GLOB.gun_list + + for(var/obj/item/weapon/gun/d in search_location) + if(typecache[d.type] && (d.can_vv_get() || superuser)) + out += d + SDQL2_TICK_CHECK + SDQL2_HALT_CHECK + + else if(ispath(type, /obj/item/ammo_magazine)) + var/list/search_location = location + if((location == world) && (options & SDQL2_OPTION_OPTIMIZED_SOURCE)) + search_location = GLOB.ammo_magazine_list + + for(var/obj/item/ammo_magazine/d in search_location) + if(typecache[d.type] && (d.can_vv_get() || superuser)) + out += d + SDQL2_TICK_CHECK + SDQL2_HALT_CHECK + + else if(ispath(type, /obj/vehicle/multitile)) + var/list/search_location = location + if((location == world) && (options & SDQL2_OPTION_OPTIMIZED_SOURCE)) + search_location = GLOB.all_multi_vehicles + + for(var/obj/item/ammo_magazine/d in search_location) + if(typecache[d.type] && (d.can_vv_get() || superuser)) + out += d + SDQL2_TICK_CHECK + SDQL2_HALT_CHECK + + else if(ispath(type, /obj/structure/closet)) + var/list/search_location = location + if((location == world) && (options & SDQL2_OPTION_OPTIMIZED_SOURCE)) + search_location = GLOB.closet_list + + for(var/obj/item/ammo_magazine/d in search_location) + if(typecache[d.type] && (d.can_vv_get() || superuser)) + out += d + SDQL2_TICK_CHECK + SDQL2_HALT_CHECK + + else if(ispath(type, /obj/structure/cable)) + var/list/search_location = location + if((location == world) && (options & SDQL2_OPTION_OPTIMIZED_SOURCE)) + search_location = GLOB.cable_list + + for(var/obj/item/ammo_magazine/d in search_location) + if(typecache[d.type] && (d.can_vv_get() || superuser)) + out += d + SDQL2_TICK_CHECK + SDQL2_HALT_CHECK + else if(ispath(type, /obj)) for(var/obj/d in location) if(typecache[d.type] && (d.can_vv_get() || superuser)) @@ -662,6 +781,17 @@ GLOBAL_DATUM_INIT(sdql2_vv_statobj, /obj/effect/statclick/sdql2_vv_all, new(null SDQL2_TICK_CHECK SDQL2_HALT_CHECK + else if(ispath(type, /client)) + var/list/search_location = location + if(location == world) // clients aren't picked up by an in world loop + search_location = GLOB.clients + + for(var/client/d in search_location) + if(d.can_vv_get() || superuser) + out += d + SDQL2_TICK_CHECK + SDQL2_HALT_CHECK + else if(ispath(type, /datum)) if(location == world) //snowflake for byond shortcut for(var/datum/d) //stupid byond trick to have it not return atoms to make this less laggy @@ -692,6 +822,10 @@ GLOBAL_DATUM_INIT(sdql2_vv_statobj, /obj/effect/statclick/sdql2_vv_all, new(null SDQL2_TICK_CHECK SDQL2_HALT_CHECK + if("singlecall") + world.SDQL_var(null, query_tree["singlecall"][1], null, null, superuser, src) + obj_count_finished++ + if("delete") for(var/datum/d in found) qdel(d) @@ -704,7 +838,8 @@ GLOBAL_DATUM_INIT(sdql2_vv_statobj, /obj/effect/statclick/sdql2_vv_all, new(null var/print_nulls = !(options & SDQL2_OPTION_SELECT_OUTPUT_SKIP_NULLS) obj_count_finished = select_refs for(var/i in found) - SDQL_print(i, text_list, print_nulls) + if(!(options & SDQL2_OPTION_NO_OUTPUT_POPUP)) + SDQL_print(i, text_list, print_nulls) select_refs[REF(i)] = TRUE SDQL2_TICK_CHECK SDQL2_HALT_CHECK @@ -757,7 +892,7 @@ GLOBAL_DATUM_INIT(sdql2_vv_statobj, /obj/effect/statclick/sdql2_vv_all, new(null SDQL_print(x, text_list) if (!isnull(x) && !isnum(x) && obj_list[x] != null) text_list += " -> " - SDQL_print(obj_list[obj_list[x]]) + SDQL_print(obj_list[x]) text_list += "]
" else if(isnull(object)) @@ -1046,42 +1181,7 @@ GLOBAL_DATUM_INIT(sdql2_vv_statobj, /obj/effect/statclick/sdql2_vv_all, new(null else if(D != null && long && expression[start + 1] == ":" && hascall(D, expression[start])) v = expression[start] else if(!long || expression[start + 1] == ".") - switch(expression[start]) - if("usr") - v = usr - if("src") - v = source - if("marked") - if(usr?.client?.admin_holder?.marked_datum) - v = usr?.client?.admin_holder?.marked_datum - else - return null - if("world") - v = world - if("global") - v = GLOB - if("MC") - v = Master - if("FS") - v = Failsafe - if("CFG") - v = config - else - if(copytext(expression[start], 1, 3) == "SS") //Subsystem //3 == length("SS") + 1 - var/SSname = copytext_char(expression[start], 3) - var/SSlength = length(SSname) - var/datum/controller/subsystem/SS - var/SSmatch - for(var/_SS in Master.subsystems) - SS = _SS - if(copytext("[SS.type]", -SSlength) == SSname) - SSmatch = SS - break - if(!SSmatch) - return null - v = SSmatch - else - return null + v = SDQL2_special_obj_from_string(expression[start], source) else if(object == GLOB) // Shitty ass hack kill me. v = expression[start] if(long) @@ -1092,7 +1192,7 @@ GLOBAL_DATUM_INIT(sdql2_vv_statobj, /obj/effect/statclick/sdql2_vv_all, new(null else if(expression[start + 1] == "\[" && islist(v)) var/list/L = v var/index = query.SDQL_expression(source, expression[start + 2]) - if(isnum(index) && ((round(index) != index) || L.len < index)) + if(isnum(index) && ((floor(index) != index) || L.len < index)) to_chat(usr, SPAN_DANGER("Invalid list index: [index]"), confidential = TRUE) return null return L[index] @@ -1206,8 +1306,45 @@ GLOBAL_DATUM_INIT(sdql2_vv_statobj, /obj/effect/statclick/sdql2_vv_all, new(null query_list += word return query_list +/proc/SDQL2_special_obj_from_string(input_text, datum/source) + switch(input_text) + if("usr") + return usr + if("src") + return source + if("marked") + if(usr?.client?.admin_holder?.marked_datum) + return usr?.client?.admin_holder?.marked_datum + else + return null + if("world") + return world + if("global") + return GLOB + if("MC") + return Master + if("FS") + return Failsafe + if("CFG") + return config + else + if(copytext(input_text, 1, 3) == "SS") //Subsystem //3 == length("SS") + 1 + var/SSname = copytext_char(input_text, 3) + var/SSlength = length(SSname) + var/datum/controller/subsystem/SS + var/SSmatch + for(var/_SS in Master.subsystems) + SS = _SS + if(copytext("[SS.type]", -SSlength) == SSname) + SSmatch = SS + break + if(!SSmatch) + return null + return SSmatch + else + return null -/obj/effect/statclick/SDQL2_delete/Click() +/obj/effect/statclick/SDQL2_delete/clicked() if(!CLIENT_IS_STAFF(usr.client)) message_admins("[key_name_admin(usr)] non-staff clicked on a statclick! ([src])") log_admin("non-staff clicked on a statclick! ([src])") @@ -1215,7 +1352,7 @@ GLOBAL_DATUM_INIT(sdql2_vv_statobj, /obj/effect/statclick/sdql2_vv_all, new(null var/datum/sdql2_query/Q = target Q.delete_click() -/obj/effect/statclick/SDQL2_action/Click() +/obj/effect/statclick/SDQL2_action/clicked() if(!CLIENT_IS_STAFF(usr.client)) message_admins("[key_name_admin(usr)] non-staff clicked on a statclick! ([src])") log_admin("non-staff clicked on a statclick! ([src])") @@ -1226,7 +1363,7 @@ GLOBAL_DATUM_INIT(sdql2_vv_statobj, /obj/effect/statclick/sdql2_vv_all, new(null /obj/effect/statclick/sdql2_vv_all name = "VIEW VARIABLES" -/obj/effect/statclick/sdql2_vv_all/Click() +/obj/effect/statclick/sdql2_vv_all/clicked() if(!CLIENT_IS_STAFF(usr.client)) message_admins("[key_name_admin(usr)] non-staff clicked on a statclick! ([src])") log_admin("non-staff clicked on a statclick! ([src])") diff --git a/code/modules/admin/verbs/SDQL2/SDQL_2_parser.dm b/code/modules/admin/verbs/SDQL2/SDQL_2_parser.dm index 9588e8dc9e94..2caea998a11d 100644 --- a/code/modules/admin/verbs/SDQL2/SDQL_2_parser.dm +++ b/code/modules/admin/verbs/SDQL2/SDQL_2_parser.dm @@ -136,6 +136,9 @@ if("call") call_query(i, node) + if("singlecall") + singlecall_query(i, node) + if("explain") node += "explain" node["explain"] = list() @@ -196,6 +199,14 @@ return i +//singlecall_query: 'CALL' object.call_function +/datum/sdql_parser/proc/singlecall_query(i, list/node) + var/list/func = list() + i = variable(i + 1, func) + node["singlecall"] = func + + return i + // object_selectors: select_item [('FROM' | 'IN') from_item] [modifier_list] /datum/sdql_parser/proc/object_selectors(i, list/node) i = select_item(i, node) diff --git a/code/modules/admin/verbs/SDQL2/SDQL_2_wrappers.dm b/code/modules/admin/verbs/SDQL2/SDQL_2_wrappers.dm index e046990b0ab7..57b707a8ebf0 100644 --- a/code/modules/admin/verbs/SDQL2/SDQL_2_wrappers.dm +++ b/code/modules/admin/verbs/SDQL2/SDQL_2_wrappers.dm @@ -175,6 +175,9 @@ /proc/_sin(X) return sin(X) +/proc/_sleep(Delay) + sleep(Delay) + /proc/_list_add(list/L, ...) if (args.len < 2) return diff --git a/code/modules/admin/verbs/load_event_level.dm b/code/modules/admin/verbs/load_event_level.dm index 72d004e03261..28aab2ef783d 100644 --- a/code/modules/admin/verbs/load_event_level.dm +++ b/code/modules/admin/verbs/load_event_level.dm @@ -38,8 +38,8 @@ to_chat(C, "Failed to load the template to a Z-Level! Sorry!") return - var/center_x = round(loaded.bounds[MAP_MAXX] / 2) // Technically off by 0.5 due to above +1. Whatever - var/center_y = round(loaded.bounds[MAP_MAXY] / 2) + var/center_x = floor(loaded.bounds[MAP_MAXX] / 2) // Technically off by 0.5 due to above +1. Whatever + var/center_y = floor(loaded.bounds[MAP_MAXY] / 2) // Now notify the staff of the load - this goes in addition to the generic template load game log message_admins("Successfully loaded template as new Z-Level by ckey: [logckey], template name: [template.name]", center_x, center_y, loaded.z_value) diff --git a/code/modules/admin/view_variables/color_matrix_editor.dm b/code/modules/admin/view_variables/color_matrix_editor.dm index 078d2fc61221..1e58d7fd61d6 100644 --- a/code/modules/admin/view_variables/color_matrix_editor.dm +++ b/code/modules/admin/view_variables/color_matrix_editor.dm @@ -69,6 +69,7 @@ INITIALIZE_IMMEDIATE(/atom/movable/screen/color_matrix_proxy_view) proxy_view.appearance = image('icons/misc/colortest.dmi', "colors") proxy_view.color = current_color + proxy_view.appearance_flags |= TILE_BOUND proxy_view.register_to_client(owner) /datum/color_matrix_editor/Destroy(force, ...) diff --git a/code/modules/admin/view_variables/filterrific.dm b/code/modules/admin/view_variables/filterrific.dm index 67190faadbbe..2383cd614f33 100644 --- a/code/modules/admin/view_variables/filterrific.dm +++ b/code/modules/admin/view_variables/filterrific.dm @@ -53,7 +53,7 @@ target.change_filter_priority(params["name"], new_priority) . = TRUE if("transition_filter_value") - target.transition_filter(params["name"], 4, params["new_data"]) + target.transition_filter(params["name"], params["new_data"], 4) . = TRUE if("modify_filter_value") var/list/old_filter_data = target.filter_data[params["name"]] @@ -69,7 +69,7 @@ if("modify_color_value") var/new_color = input(usr, "Pick new filter color", "Filteriffic Colors!") as color|null if(new_color) - target.transition_filter(params["name"], 4, list("color" = new_color)) + target.transition_filter(params["name"], list("color" = new_color), 4) . = TRUE if("modify_icon_value") var/icon/new_icon = input("Pick icon:", "Icon") as null|icon diff --git a/code/modules/almayer/machinery.dm b/code/modules/almayer/machinery.dm index 74ce9a81eb88..9411c229d2f3 100644 --- a/code/modules/almayer/machinery.dm +++ b/code/modules/almayer/machinery.dm @@ -73,7 +73,7 @@ /obj/structure/machinery/prop/almayer/CICmap name = "map table" - desc = "A table that displays a map of the current target location" + desc = "A table that displays a map of the current operation location." icon = 'icons/obj/structures/machinery/computer.dmi' icon_state = "maptable" anchored = TRUE @@ -103,6 +103,11 @@ map.tgui_interact(user) +/obj/structure/machinery/prop/almayer/CICmap/computer + name = "map terminal" + desc = "A terminal that displays a map of the current operation location." + icon_state = "security" + /obj/structure/machinery/prop/almayer/CICmap/upp minimap_type = MINIMAP_FLAG_UPP faction = FACTION_UPP diff --git a/code/modules/animations/animation_library.dm b/code/modules/animations/animation_library.dm index f153338487cd..fabd7508b856 100644 --- a/code/modules/animations/animation_library.dm +++ b/code/modules/animations/animation_library.dm @@ -181,7 +181,7 @@ Can look good elsewhere as well.*/ var/pixel_x_diff = 0 var/pixel_y_diff = 0 var/direction = get_dir(src, A) - pixel_offset = round(pixel_offset) // Just to be safe + pixel_offset = floor(pixel_offset) // Just to be safe switch(direction) if(NORTH) pixel_y_diff = pixel_offset diff --git a/code/modules/assembly/signaller.dm b/code/modules/assembly/signaller.dm index 4ac25854e8ea..3e01c357c113 100644 --- a/code/modules/assembly/signaller.dm +++ b/code/modules/assembly/signaller.dm @@ -74,7 +74,7 @@ switch(action) if("set_freq") - set_frequency(clamp(round(text2num(params["value"])), SIGNALLER_FREQ_MIN, SIGNALLER_FREQ_MAX)) + set_frequency(clamp(floor(text2num(params["value"])), SIGNALLER_FREQ_MIN, SIGNALLER_FREQ_MAX)) . = TRUE if("set_signal") diff --git a/code/modules/assembly/timer.dm b/code/modules/assembly/timer.dm index 0dd55dc532a0..3d6307640faa 100644 --- a/code/modules/assembly/timer.dm +++ b/code/modules/assembly/timer.dm @@ -19,7 +19,7 @@ /obj/item/device/assembly/timer/activate() if(!..()) return 0//Cooldown check - time = clamp(round(time), TIMER_MINIMUM_TIME, TIMER_MAXIMUM_TIME) + time = clamp(floor(time), TIMER_MINIMUM_TIME, TIMER_MAXIMUM_TIME) timing = !timing if(timing) START_PROCESSING(SSobj, src) @@ -103,7 +103,7 @@ ui.set_autoupdate(timing) if(!timing) - time = clamp(round(time), TIMER_MINIMUM_TIME, TIMER_MAXIMUM_TIME) + time = clamp(floor(time), TIMER_MINIMUM_TIME, TIMER_MAXIMUM_TIME) STOP_PROCESSING(SSobj, src) else START_PROCESSING(SSobj, src) @@ -112,7 +112,7 @@ . = TRUE if("set_time") - time = clamp(round(text2num(params["time"])) SECONDS, TIMER_MINIMUM_TIME, TIMER_MAXIMUM_TIME) + time = clamp(floor(text2num(params["time"])) SECONDS, TIMER_MINIMUM_TIME, TIMER_MAXIMUM_TIME) . = TRUE /obj/item/device/assembly/timer/ui_data(mob/user) diff --git a/code/modules/asset_cache/asset_cache_client.dm b/code/modules/asset_cache/asset_cache_client.dm index f462fe386bba..cb204c6781a1 100644 --- a/code/modules/asset_cache/asset_cache_client.dm +++ b/code/modules/asset_cache/asset_cache_client.dm @@ -1,7 +1,7 @@ /// Process asset cache client topic calls for "asset_cache_confirm_arrival=[INT]" /client/proc/asset_cache_confirm_arrival(job_id) - var/asset_cache_job = round(text2num(job_id)) + var/asset_cache_job = floor(text2num(job_id)) //because we skip the limiter, we have to make sure this is a valid arrival and not somebody tricking us into letting them append to a list without limit. if (asset_cache_job > 0 && asset_cache_job <= last_asset_job && !(completed_asset_jobs["[asset_cache_job]"])) completed_asset_jobs["[asset_cache_job]"] = TRUE diff --git a/code/modules/asset_cache/asset_list.dm b/code/modules/asset_cache/asset_list.dm index 1d88df0b6a6b..cb3bed635940 100644 --- a/code/modules/asset_cache/asset_list.dm +++ b/code/modules/asset_cache/asset_list.dm @@ -168,7 +168,7 @@ GLOBAL_LIST_EMPTY(asset_datums) var/icon/big = size[SPRSZ_STRIPPED] var/per_line = big.Width() / tiny.Width() var/x = (idx % per_line) * tiny.Width() - var/y = round(idx / per_line) * tiny.Height() + var/y = floor(idx / per_line) * tiny.Height() out += ".[name][size_id].[sprite_id]{background-position:-[x]px -[y]px;}" diff --git a/code/modules/asset_cache/assets/tgui.dm b/code/modules/asset_cache/assets/tgui.dm index 9c79925602c7..4b31d93e037f 100644 --- a/code/modules/asset_cache/assets/tgui.dm +++ b/code/modules/asset_cache/assets/tgui.dm @@ -1,3 +1,23 @@ +// If you use a file(...) object, instead of caching the asset it will be loaded from disk every time it's requested. +// This is useful for development, but not recommended for production. +// And if TGS is defined, we're being run in a production environment. + +#ifdef TGS +/datum/asset/simple/tgui + keep_local_name = FALSE + assets = list( + "tgui.bundle.js" = "tgui/public/tgui.bundle.js", + "tgui.bundle.css" = "tgui/public/tgui.bundle.css", + ) + +/datum/asset/simple/tgui_panel + keep_local_name = FALSE + assets = list( + "tgui-panel.bundle.js" = "tgui/public/tgui-panel.bundle.js", + "tgui-panel.bundle.css" = "tgui/public/tgui-panel.bundle.css", + ) + +#else /datum/asset/simple/tgui keep_local_name = TRUE assets = list( @@ -11,3 +31,5 @@ "tgui-panel.bundle.js" = file("tgui/public/tgui-panel.bundle.js"), "tgui-panel.bundle.css" = file("tgui/public/tgui-panel.bundle.css"), ) + +#endif diff --git a/code/modules/buildmode/buildmode.dm b/code/modules/buildmode/buildmode.dm index bc20a714027d..4b6d84a5ae40 100644 --- a/code/modules/buildmode/buildmode.dm +++ b/code/modules/buildmode/buildmode.dm @@ -80,7 +80,7 @@ var/pos_idx = 0 for(var/thing in elements) var/x = pos_idx % switch_width - var/y = Floor(pos_idx / switch_width) + var/y = floor(pos_idx / switch_width) var/atom/movable/screen/buildmode/B = new buttontype(src, thing) // extra .5 for a nice offset look B.screen_loc = "NORTH-[(1 + 0.5 + y*1.5)],WEST+[0.5 + x*1.5]" diff --git a/code/modules/buildmode/submodes/area_edit.dm b/code/modules/buildmode/submodes/area_edit.dm index 3c2a07c687d3..57b82e30fd3b 100644 --- a/code/modules/buildmode/submodes/area_edit.dm +++ b/code/modules/buildmode/submodes/area_edit.dm @@ -66,7 +66,7 @@ var/choice = alert("Are you sure you want to fill area?", "Area Fill Confirmation", "Yes", "No") if(choice != "Yes") return - for(var/turf/T in block(get_turf(cornerA),get_turf(cornerB))) + for(var/turf/T as anything in block(get_turf(cornerA),get_turf(cornerB))) storedarea.contents.Add(T) log_admin("Build Mode: [key_name(c)] set the area of the region from [AREACOORD(cornerA)] through [AREACOORD(cornerB)] to [storedarea].") diff --git a/code/modules/buildmode/submodes/fill.dm b/code/modules/buildmode/submodes/fill.dm index 59142e712602..52212a9c57c5 100644 --- a/code/modules/buildmode/submodes/fill.dm +++ b/code/modules/buildmode/submodes/fill.dm @@ -49,8 +49,7 @@ if(LAZYACCESS(modifiers, LEFT_CLICK)) //rectangular if(LAZYACCESS(modifiers, CTRL_CLICK)) var/list/deletion_area = block(get_turf(cornerA),get_turf(cornerB)) - for(var/deleted_turfs in deletion_area) - var/turf/T = deleted_turfs + for(var/turf/T as anything in deletion_area) for(var/atom/movable/AM in T) qdel(AM) T.ScrapeAway(INFINITY, CHANGETURF_DEFER_CHANGE) @@ -59,7 +58,7 @@ var/choice = alert("Your selected area is [selection_size] tiles! Continue?", "Large Fill Confirmation", CONFIRM_YES, CONFIRM_NO) if(choice != CONFIRM_YES) return - for(var/turf/T in block(get_turf(cornerA),get_turf(cornerB))) + for(var/turf/T as anything in deletion_area) if(ispath(objholder,/turf)) T = T.ChangeTurf(objholder) T.setDir(BM.build_dir) diff --git a/code/modules/clans/client.dm b/code/modules/clans/client.dm index 3450b7553c51..6e3e728fb1ee 100644 --- a/code/modules/clans/client.dm +++ b/code/modules/clans/client.dm @@ -440,7 +440,7 @@ return if(CLAN_LIMIT_SIZE) var/list/datum/view_record/clan_playerbase_view/clan_players = DB_VIEW(/datum/view_record/clan_playerbase_view/, DB_COMP("clan_id", DB_EQUALS, target.clan_id)) - var/available_slots = Ceiling(clan_players.len / chosen_rank.limit) + var/available_slots = ceil(clan_players.len / chosen_rank.limit) if(players_in_rank >= available_slots) to_chat(src, SPAN_DANGER("This slot is full! (Maximum of [chosen_rank.limit] per player in the clan, currently [available_slots])")) diff --git a/code/modules/client/client_procs.dm b/code/modules/client/client_procs.dm index 213c54f0e201..59d7764c4193 100644 --- a/code/modules/client/client_procs.dm +++ b/code/modules/client/client_procs.dm @@ -43,6 +43,7 @@ GLOBAL_LIST_INIT(whitelisted_client_procs, list( /client/proc/toggle_auto_eject_to_hand, /client/proc/toggle_eject_to_hand, /client/proc/toggle_automatic_punctuation, + /client/proc/toggle_ammo_display_type, /client/proc/toggle_middle_mouse_click, /client/proc/toggle_ability_deactivation, /client/proc/toggle_clickdrag_override, @@ -187,39 +188,21 @@ GLOBAL_LIST_INIT(whitelisted_client_procs, list( var/datum/entity/player/P = get_player_from_key(key) P.add_note(add, FALSE, NOTE_MERIT) - if(href_list["add_wl_info_1"]) - var/key = href_list["add_wl_info_1"] - var/add = input("Add Commander Note") as null|message + if(href_list["add_wl_info"]) + var/key = href_list["add_wl_info"] + var/add = input("Add Whitelist Note") as null|message if(!add) return var/datum/entity/player/P = get_player_from_key(key) - P.add_note(add, FALSE, NOTE_COMMANDER) - - if(href_list["add_wl_info_2"]) - var/key = href_list["add_wl_info_2"] - var/add = input("Add Synthetic Note") as null|message - if(!add) - return - - var/datum/entity/player/P = get_player_from_key(key) - P.add_note(add, FALSE, NOTE_SYNTHETIC) - - if(href_list["add_wl_info_3"]) - var/key = href_list["add_wl_info_3"] - var/add = input("Add Yautja Note") as null|message - if(!add) - return - - var/datum/entity/player/P = get_player_from_key(key) - P.add_note(add, FALSE, NOTE_YAUTJA) + P.add_note(add, FALSE, NOTE_WHITELIST) if(href_list["remove_wl_info"]) var/key = href_list["remove_wl_info"] var/index = text2num(href_list["remove_index"]) var/datum/entity/player/P = get_player_from_key(key) - P.remove_note(index) + P.remove_note(index, whitelist = TRUE) switch(href_list["_src_"]) if("admin_holder") @@ -283,7 +266,7 @@ GLOBAL_LIST_INIT(whitelisted_client_procs, list( //Helps prevent multiple files being uploaded at once. Or right after eachother. var/time_to_wait = fileaccess_timer - world.time if(time_to_wait > 0) - to_chat(src, "Error: AllowUpload(): Spam prevention. Please wait [round(time_to_wait/10)] seconds.") + to_chat(src, "Error: AllowUpload(): Spam prevention. Please wait [floor(time_to_wait/10)] seconds.") return 0 fileaccess_timer = world.time + FTPDELAY */ return 1 @@ -701,39 +684,33 @@ GLOBAL_LIST_INIT(whitelisted_client_procs, list( movement_keys[key] = SOUTH if(SAY_CHANNEL) if(prefs.tgui_say) - var/say = tgui_say_create_open_command(SAY_CHANNEL) - winset(src, "srvkeybinds-[REF(key)]", "parent=default;name=[key];command=[say]") + winset(src, "srvkeybinds-[REF(key)]", "parent=default;name=[key];command=") else winset(src, "srvkeybinds-[REF(key)]", "parent=default;name=[key];command=\"say\\n.typing\"") if(COMMS_CHANNEL) if(prefs.tgui_say) - var/radio = tgui_say_create_open_command(COMMS_CHANNEL) - winset(src, "srvkeybinds-[REF(key)]", "parent=default;name=[key];command=[radio]") + winset(src, "srvkeybinds-[REF(key)]", "parent=default;name=[key];command=") else winset(src, "srvkeybinds-[REF(key)]", "parent=default;name=[key];command=\"say\\n.typing\"") if(ME_CHANNEL) if(prefs.tgui_say) - var/me = tgui_say_create_open_command(ME_CHANNEL) - winset(src, "srvkeybinds-[REF(key)]", "parent=default;name=[key];command=[me]") + winset(src, "srvkeybinds-[REF(key)]", "parent=default;name=[key];command=") else winset(src, "srvkeybinds-[REF(key)]", "parent=default;name=[key];command=\"me\\n.typing\"") if(OOC_CHANNEL) if(prefs.tgui_say) - var/ooc = tgui_say_create_open_command(OOC_CHANNEL) - winset(src, "srvkeybinds-[REF(key)]", "parent=default;name=[key];command=[ooc]") + winset(src, "srvkeybinds-[REF(key)]", "parent=default;name=[key];command=") else winset(src, "srvkeybinds-[REF(key)]", "parent=default;name=[key];command=ooc") if(LOOC_CHANNEL) if(prefs.tgui_say) - var/looc = tgui_say_create_open_command(LOOC_CHANNEL) - winset(src, "srvkeybinds-[REF(key)]", "parent=default;name=[key];command=[looc]") + winset(src, "srvkeybinds-[REF(key)]", "parent=default;name=[key];command=") else winset(src, "srvkeybinds-[REF(key)]", "parent=default;name=[key];command=looc") if(ADMIN_CHANNEL) if(admin_holder?.check_for_rights(R_MOD)) if(prefs.tgui_say) - var/asay = tgui_say_create_open_command(ADMIN_CHANNEL) - winset(src, "srvkeybinds-[REF(key)]", "parent=default;name=[key];command=[asay]") + winset(src, "srvkeybinds-[REF(key)]", "parent=default;name=[key];command=") else winset(src, "srvkeybinds-[REF(key)]", "parent=default;name=[key];command=asay") else @@ -741,8 +718,7 @@ GLOBAL_LIST_INIT(whitelisted_client_procs, list( if(MENTOR_CHANNEL) if(admin_holder?.check_for_rights(R_MENTOR)) if(prefs.tgui_say) - var/mentor = tgui_say_create_open_command(MENTOR_CHANNEL) - winset(src, "srvkeybinds-[REF(key)]", "parent=default;name=[key];command=[mentor]") + winset(src, "srvkeybinds-[REF(key)]", "parent=default;name=[key];command=") else winset(src, "srvkeybinds-[REF(key)]", "parent=default;name=[key];command=mentorsay") else diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index d6874b7fafaa..cd89cfe027f3 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -631,6 +631,8 @@ GLOBAL_LIST_INIT(bgstate_options, list( [toggle_prefs & TOGGLE_MIDDLE_MOUSE_SWAP_HANDS ? "On" : "Off"]
" dat += "Toggle Vendors Vending to Hands: \ [toggle_prefs & TOGGLE_VEND_ITEM_TO_HAND ? "On" : "Off"]
" + dat += "Toggle Semi-Auto Ammo Display Limiter: \ + [toggle_prefs & TOGGLE_AMMO_DISPLAY_TYPE ? "On" : "Off"]
" dat += "Toggle Item Animations Detail Level
" dat += "Toggle Dual Wield Functionality
" if(MENU_SPECIAL) //wart @@ -1266,7 +1268,7 @@ GLOBAL_LIST_INIT(bgstate_options, list( if("pred_age") var/new_predator_age = tgui_input_number(user, "Choose your Predator's age(175 to 3000):", "Character Preference", 1234, 3000, 175) if(new_predator_age) - predator_age = max(min( round(text2num(new_predator_age)), 3000),175) + predator_age = max(min( floor(text2num(new_predator_age)), 3000),175) if("pred_use_legacy") var/legacy_choice = tgui_input_list(user, "What legacy set do you wish to use?", "Legacy Set", PRED_LEGACIES) if(!legacy_choice) @@ -1279,13 +1281,13 @@ GLOBAL_LIST_INIT(bgstate_options, list( predator_translator_type = new_translator_type if("pred_mask_type") var/new_predator_mask_type = tgui_input_number(user, "Choose your mask type:\n(1-12)", "Mask Selection", 1, 12, 1) - if(new_predator_mask_type) predator_mask_type = round(text2num(new_predator_mask_type)) + if(new_predator_mask_type) predator_mask_type = floor(text2num(new_predator_mask_type)) if("pred_armor_type") var/new_predator_armor_type = tgui_input_number(user, "Choose your armor type:\n(1-7)", "Armor Selection", 1, 7, 1) - if(new_predator_armor_type) predator_armor_type = round(text2num(new_predator_armor_type)) + if(new_predator_armor_type) predator_armor_type = floor(text2num(new_predator_armor_type)) if("pred_boot_type") var/new_predator_boot_type = tgui_input_number(user, "Choose your greaves type:\n(1-4)", "Greave Selection", 1, 4, 1) - if(new_predator_boot_type) predator_boot_type = round(text2num(new_predator_boot_type)) + if(new_predator_boot_type) predator_boot_type = floor(text2num(new_predator_boot_type)) if("pred_mask_mat") var/new_pred_mask_mat = tgui_input_list(user, "Choose your mask material:", "Mask Material", PRED_MATERIALS) if(!new_pred_mask_mat) @@ -1500,7 +1502,7 @@ GLOBAL_LIST_INIT(bgstate_options, list( if("age") var/new_age = tgui_input_number(user, "Choose your character's age:\n([AGE_MIN]-[AGE_MAX])", "Character Preference", 19, AGE_MAX, AGE_MIN) if(new_age) - age = max(min( round(text2num(new_age)), AGE_MAX),AGE_MIN) + age = max(min( floor(text2num(new_age)), AGE_MAX),AGE_MIN) if("metadata") var/new_metadata = input(user, "Enter any information you'd like others to see, such as Roleplay-preferences:", "Game Preference" , metadata) as message|null @@ -1956,7 +1958,7 @@ GLOBAL_LIST_INIT(bgstate_options, list( if("save") if(save_cooldown > world.time) - to_chat(user, SPAN_WARNING("You need to wait [round((save_cooldown-world.time)/10)] seconds before you can do that again.")) + to_chat(user, SPAN_WARNING("You need to wait [floor((save_cooldown-world.time)/10)] seconds before you can do that again.")) return var/datum/origin/character_origin = GLOB.origins[origin] var/name_error = character_origin.validate_name(real_name) @@ -1972,7 +1974,7 @@ GLOBAL_LIST_INIT(bgstate_options, list( if("reload") if(reload_cooldown > world.time) - to_chat(user, SPAN_WARNING("You need to wait [round((reload_cooldown-world.time)/10)] seconds before you can do that again.")) + to_chat(user, SPAN_WARNING("You need to wait [floor((reload_cooldown-world.time)/10)] seconds before you can do that again.")) return load_preferences() load_character() diff --git a/code/modules/client/preferences_toggles.dm b/code/modules/client/preferences_toggles.dm index c4017f172f25..9db140f54958 100644 --- a/code/modules/client/preferences_toggles.dm +++ b/code/modules/client/preferences_toggles.dm @@ -264,6 +264,7 @@ "Toggle Help Intent Safety
", "Toggle Guns Auto-Ejecting Magazines
", "Toggle Guns Auto-Ejecting Magazines to Your Hands
", + "Toggle Semi-Auto Ammo Counter
", "Toggle 'Unload Weapon' Ejecting Magazines to Your Hands
", "Toggle Automatic Punctuation
", "Toggle Middle Mouse Ability Activation
", @@ -315,6 +316,12 @@ to_chat(src, SPAN_BOLDNOTICE("Guns with auto-ejectors will automatically eject their magazines.")) prefs.save_preferences() + +/client/proc/toggle_ammo_display_type() + prefs.toggle_prefs ^= TOGGLE_AMMO_DISPLAY_TYPE + to_chat(usr, SPAN_NOTICE("Guns in semi-automatic mode will now display the ammo on every [SPAN_BOLD(prefs.toggle_prefs & TOGGLE_AMMO_DISPLAY_TYPE ? "fifth bullet and when the mag has less than 15 rounds left" : "single bullet")]")) + prefs.save_preferences() + /client/proc/toggle_auto_eject_to_hand() // Toggle whether guns with auto-ejectors will eject their magazines to your offhand prefs.toggle_prefs ^= TOGGLE_AUTO_EJECT_MAGAZINE_TO_HAND if(prefs.toggle_prefs & TOGGLE_AUTO_EJECT_MAGAZINE_TO_HAND) diff --git a/code/modules/clothing/shoes/colour.dm b/code/modules/clothing/shoes/colour.dm index 4318e1a3b184..7d6c8ed3d5dc 100644 --- a/code/modules/clothing/shoes/colour.dm +++ b/code/modules/clothing/shoes/colour.dm @@ -68,32 +68,47 @@ /obj/item/clothing/shoes/orange name = "orange shoes" icon_state = "orange" - var/obj/item/handcuffs/chained = null + var/obj/item/restraint/handcuffs/chained = null -/obj/item/clothing/shoes/orange/proc/attach_cuffs(obj/item/handcuffs/cuffs, mob/user as mob) - if (src.chained) return +/obj/item/clothing/shoes/orange/proc/attach_cuffs(obj/item/restraint/cuffs, mob/user as mob) + if(chained) + return FALSE user.drop_held_item() cuffs.forceMove(src) - src.chained = cuffs - src.slowdown = 15 - src.icon_state = "orange1" + chained = cuffs + slowdown = 15 + icon_state = "orange1" + time_to_equip = (cuffs.breakouttime / 4) + time_to_unequip = cuffs.breakouttime + return TRUE /obj/item/clothing/shoes/orange/proc/remove_cuffs(mob/user as mob) - if (!src.chained) return + if(!chained) + return FALSE - user.put_in_hands(src.chained) - src.chained.add_fingerprint(user) + user.put_in_hands(chained) + chained.add_fingerprint(user) - src.slowdown = initial(slowdown) - src.icon_state = "orange" - src.chained = null + slowdown = initial(slowdown) + icon_state = "orange" + chained = null + time_to_equip = initial(time_to_equip) + time_to_unequip = initial(time_to_unequip) + return TRUE /obj/item/clothing/shoes/orange/attack_self(mob/user as mob) ..() remove_cuffs(user) -/obj/item/clothing/shoes/orange/attackby(H as obj, mob/user as mob) +/obj/item/clothing/shoes/orange/attackby(attacking_object as obj, mob/user as mob) ..() - if (istype(H, /obj/item/handcuffs)) - attach_cuffs(H, user) + if(istype(attacking_object, /obj/item/restraint)) + var/obj/item/restraint/cuffs = attacking_object + if(cuffs.target_zone == SLOT_LEGS) + attach_cuffs(cuffs, user) + +/obj/item/clothing/shoes/orange/get_examine_text(mob/user) + . = ..() + if(chained) + . += SPAN_RED("They are chained with [chained].") diff --git a/code/modules/clothing/spacesuits/captain.dm b/code/modules/clothing/spacesuits/captain.dm index 26bc03eed608..2643e43b2b6a 100644 --- a/code/modules/clothing/spacesuits/captain.dm +++ b/code/modules/clothing/spacesuits/captain.dm @@ -24,7 +24,7 @@ gas_transfer_coefficient = 0.01 permeability_coefficient = 0.02 flags_armor_protection = BODY_FLAG_CHEST|BODY_FLAG_GROIN|BODY_FLAG_LEGS|BODY_FLAG_FEET|BODY_FLAG_ARMS - allowed = list(/obj/item/tank/emergency_oxygen, /obj/item/device/flashlight,/obj/item/weapon/gun, /obj/item/ammo_magazine, /obj/item/weapon/baton,/obj/item/handcuffs) + allowed = list(/obj/item/tank/emergency_oxygen, /obj/item/device/flashlight,/obj/item/weapon/gun, /obj/item/ammo_magazine, /obj/item/weapon/baton,/obj/item/restraint/handcuffs) slowdown = 1.5 armor_melee = CLOTHING_ARMOR_MEDIUMHIGH armor_bullet = CLOTHING_ARMOR_MEDIUMHIGH diff --git a/code/modules/clothing/spacesuits/miscellaneous.dm b/code/modules/clothing/spacesuits/miscellaneous.dm index dd540033b2a2..36dd5f4f04c8 100644 --- a/code/modules/clothing/spacesuits/miscellaneous.dm +++ b/code/modules/clothing/spacesuits/miscellaneous.dm @@ -43,7 +43,7 @@ icon_state = "pirate" item_state = "pirate" w_class = SIZE_MEDIUM - allowed = list(/obj/item/weapon/gun,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/weapon/baton,/obj/item/handcuffs,/obj/item/tank/emergency_oxygen) + allowed = list(/obj/item/weapon/gun,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/weapon/baton,/obj/item/restraint/handcuffs,/obj/item/tank/emergency_oxygen) slowdown = 0 armor_melee = CLOTHING_ARMOR_MEDIUM armor_bullet = CLOTHING_ARMOR_MEDIUM @@ -93,7 +93,7 @@ /obj/item/clothing/suit/space/compression/uscm name = "\improper MK.50 compression suit" desc = "A heavy, bulky civilian space suit, fitted with armored plates. This specific suit has found its way into the ragtag inventory of the USCM's patrol boat requisitions system." - allowed = list(/obj/item/weapon/gun,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/weapon/baton,/obj/item/handcuffs,/obj/item/tank) + allowed = list(/obj/item/weapon/gun,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/weapon/baton,/obj/item/restraint/handcuffs,/obj/item/tank) // Souto man diff --git a/code/modules/clothing/suits/armor.dm b/code/modules/clothing/suits/armor.dm index 82d461c5ca55..7e9a41c6becc 100644 --- a/code/modules/clothing/suits/armor.dm +++ b/code/modules/clothing/suits/armor.dm @@ -47,7 +47,7 @@ /obj/item/device/flashlight, /obj/item/ammo_magazine/, /obj/item/weapon/baton, - /obj/item/handcuffs, + /obj/item/restraint/handcuffs, /obj/item/device/binoculars, /obj/item/storage/large_holster/machete, /obj/item/storage/belt/gun/m4a3, @@ -81,7 +81,7 @@ /obj/item/storage/fancy/cigarettes, /obj/item/tool/lighter, /obj/item/weapon/baton, - /obj/item/handcuffs, + /obj/item/restraint/handcuffs, /obj/item/explosive/grenade, /obj/item/device/binoculars, /obj/item/attachable/bayonet, @@ -250,7 +250,7 @@ gas_transfer_coefficient = 0.01 permeability_coefficient = 0.01 flags_armor_protection = BODY_FLAG_CHEST|BODY_FLAG_GROIN|BODY_FLAG_LEGS|BODY_FLAG_FEET|BODY_FLAG_ARMS - allowed = list(/obj/item/weapon/gun,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/weapon/baton,/obj/item/handcuffs,/obj/item/tank/emergency_oxygen) + allowed = list(/obj/item/weapon/gun,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/weapon/baton,/obj/item/restraint/handcuffs,/obj/item/tank/emergency_oxygen) slowdown = 1 armor_melee = CLOTHING_ARMOR_HIGH armor_bullet = CLOTHING_ARMOR_HIGH @@ -355,7 +355,7 @@ item_state = "centcom" w_class = SIZE_LARGE//bulky item flags_armor_protection = BODY_FLAG_CHEST|BODY_FLAG_GROIN|BODY_FLAG_LEGS|BODY_FLAG_FEET|BODY_FLAG_ARMS|BODY_FLAG_HANDS - allowed = list(/obj/item/weapon/gun,/obj/item/weapon/baton,/obj/item/handcuffs,/obj/item/tank/emergency_oxygen) + allowed = list(/obj/item/weapon/gun,/obj/item/weapon/baton,/obj/item/restraint/handcuffs,/obj/item/tank/emergency_oxygen) flags_inventory = NO_FLAGS flags_inv_hide = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT flags_cold_protection = BODY_FLAG_CHEST|BODY_FLAG_GROIN|BODY_FLAG_LEGS|BODY_FLAG_FEET|BODY_FLAG_ARMS|BODY_FLAG_HANDS diff --git a/code/modules/clothing/suits/bio.dm b/code/modules/clothing/suits/bio.dm index 59e0918550ed..eb99005328bc 100644 --- a/code/modules/clothing/suits/bio.dm +++ b/code/modules/clothing/suits/bio.dm @@ -51,7 +51,7 @@ item_state = "bio_suit" allowed = list( /obj/item/weapon/baton, - /obj/item/handcuffs, + /obj/item/restraint/handcuffs, /obj/item/device/binoculars, /obj/item/attachable/bayonet, diff --git a/code/modules/clothing/suits/jobs.dm b/code/modules/clothing/suits/jobs.dm index 5b97051852a6..589fb3b97221 100644 --- a/code/modules/clothing/suits/jobs.dm +++ b/code/modules/clothing/suits/jobs.dm @@ -181,11 +181,11 @@ /obj/item/ammo_magazine, /obj/item/ammo_casing, /obj/item/weapon/baton, - /obj/item/handcuffs, + /obj/item/restraint/handcuffs, /obj/item/storage/fancy/cigarettes, /obj/item/tool/lighter, /obj/item/weapon/baton, - /obj/item/handcuffs, + /obj/item/restraint/handcuffs, /obj/item/device/binoculars, /obj/item/attachable/bayonet, /obj/item/storage/belt/gun/m4a3, @@ -245,7 +245,7 @@ /obj/item/ammo_magazine, /obj/item/ammo_casing, /obj/item/weapon/baton, - /obj/item/handcuffs, + /obj/item/restraint/handcuffs, /obj/item/device/binoculars, /obj/item/attachable/bayonet, /obj/item/storage/belt/gun/m4a3, @@ -310,7 +310,7 @@ /obj/item/storage/fancy/cigarettes, /obj/item/tool/lighter, /obj/item/weapon/baton, - /obj/item/handcuffs, + /obj/item/restraint/handcuffs, /obj/item/device/binoculars, /obj/item/attachable/bayonet, /obj/item/storage/belt/gun/m4a3, @@ -409,7 +409,7 @@ /obj/item/storage/fancy/cigarettes, /obj/item/tool/lighter, /obj/item/weapon/baton, - /obj/item/handcuffs, + /obj/item/restraint/handcuffs, /obj/item/device/binoculars, /obj/item/attachable/bayonet, diff --git a/code/modules/clothing/suits/labcoat.dm b/code/modules/clothing/suits/labcoat.dm index 1bdb4ca31176..d0f6d1cc868a 100644 --- a/code/modules/clothing/suits/labcoat.dm +++ b/code/modules/clothing/suits/labcoat.dm @@ -20,7 +20,7 @@ /obj/item/storage/fancy/cigarettes, /obj/item/tool/lighter, /obj/item/weapon/baton, - /obj/item/handcuffs, + /obj/item/restraint/handcuffs, /obj/item/device/binoculars, /obj/item/attachable/bayonet, @@ -185,7 +185,7 @@ /obj/item/storage/fancy/cigarettes, /obj/item/tool/lighter, /obj/item/weapon/baton, - /obj/item/handcuffs, + /obj/item/restraint/handcuffs, /obj/item/device/binoculars, /obj/item/attachable/bayonet, /obj/item/storage/belt/gun/m4a3, diff --git a/code/modules/clothing/suits/marine_armor/_marine_armor.dm b/code/modules/clothing/suits/marine_armor/_marine_armor.dm index e2facb987959..15340bc1aae2 100644 --- a/code/modules/clothing/suits/marine_armor/_marine_armor.dm +++ b/code/modules/clothing/suits/marine_armor/_marine_armor.dm @@ -191,7 +191,7 @@ if(. != CHECKS_PASSED) return set_light_range(initial(light_range)) - set_light_power(Floor(initial(light_power) * 0.5)) + set_light_power(floor(initial(light_power) * 0.5)) set_light_on(toggle_on) flags_marine_armor ^= ARMOR_LAMP_ON @@ -270,7 +270,7 @@ /obj/item/storage/fancy/cigarettes, /obj/item/tool/lighter, /obj/item/weapon/baton, - /obj/item/handcuffs, + /obj/item/restraint/handcuffs, /obj/item/explosive/grenade, /obj/item/device/binoculars, /obj/item/attachable/bayonet, diff --git a/code/modules/clothing/suits/marine_armor/ert.dm b/code/modules/clothing/suits/marine_armor/ert.dm index 106b09961103..90fb962ffa93 100644 --- a/code/modules/clothing/suits/marine_armor/ert.dm +++ b/code/modules/clothing/suits/marine_armor/ert.dm @@ -41,7 +41,7 @@ /obj/item/device/flashlight, /obj/item/ammo_magazine/, /obj/item/weapon/baton, - /obj/item/handcuffs, + /obj/item/restraint/handcuffs, /obj/item/storage/fancy/cigarettes, /obj/item/tool/lighter, /obj/item/explosive/grenade, @@ -515,7 +515,7 @@ /obj/item/storage/fancy/cigarettes, /obj/item/tool/lighter, /obj/item/weapon/baton, - /obj/item/handcuffs, + /obj/item/restraint/handcuffs, /obj/item/device/binoculars, /obj/item/attachable/bayonet, /obj/item/device/flashlight, @@ -576,7 +576,7 @@ /obj/item/device/flashlight, /obj/item/ammo_magazine/, /obj/item/weapon/baton, - /obj/item/handcuffs, + /obj/item/restraint/handcuffs, /obj/item/storage/fancy/cigarettes, /obj/item/tool/lighter, /obj/item/explosive/grenade, @@ -611,7 +611,7 @@ /obj/item/device/flashlight, /obj/item/ammo_magazine/, /obj/item/weapon/baton, - /obj/item/handcuffs, + /obj/item/restraint/handcuffs, /obj/item/storage/fancy/cigarettes, /obj/item/tool/lighter, /obj/item/explosive/grenade, @@ -714,7 +714,7 @@ /obj/item/storage/fancy/cigarettes, /obj/item/tool/lighter, /obj/item/weapon/baton, - /obj/item/handcuffs, + /obj/item/restraint/handcuffs, /obj/item/explosive/grenade, /obj/item/device/binoculars, /obj/item/attachable/bayonet, @@ -778,7 +778,7 @@ /obj/item/device/flashlight, /obj/item/ammo_magazine/, /obj/item/weapon/baton, - /obj/item/handcuffs, + /obj/item/restraint/handcuffs, /obj/item/storage/fancy/cigarettes, /obj/item/tool/lighter, /obj/item/explosive/grenade, diff --git a/code/modules/clothing/suits/marine_armor/smartgunner.dm b/code/modules/clothing/suits/marine_armor/smartgunner.dm index 430942fbbef8..8f39ef83045c 100644 --- a/code/modules/clothing/suits/marine_armor/smartgunner.dm +++ b/code/modules/clothing/suits/marine_armor/smartgunner.dm @@ -32,7 +32,7 @@ /obj/item/clothing/suit/storage/marine/smartgunner/mob_can_equip(mob/equipping_mob, slot, disable_warning = FALSE) . = ..() - if(equipping_mob.back) + if(equipping_mob.back && !(equipping_mob.back.flags_item & SMARTGUNNER_BACKPACK_OVERRIDE)) to_chat(equipping_mob, SPAN_WARNING("You can't equip [src] while wearing a backpack.")) return FALSE @@ -48,6 +48,9 @@ if(slot != WEAR_BACK) return + if(equipping_item.flags_item & SMARTGUNNER_BACKPACK_OVERRIDE) + return + . = COMPONENT_HUMAN_CANCEL_ATTEMPT_EQUIP if(equipping_item.flags_equip_slot == SLOT_BACK) diff --git a/code/modules/clothing/suits/marine_coat.dm b/code/modules/clothing/suits/marine_coat.dm index 2dd93eb66aee..78c8154e1810 100644 --- a/code/modules/clothing/suits/marine_coat.dm +++ b/code/modules/clothing/suits/marine_coat.dm @@ -24,7 +24,7 @@ /obj/item/storage/fancy/cigarettes, /obj/item/tool/lighter, /obj/item/weapon/baton, - /obj/item/handcuffs, + /obj/item/restraint/handcuffs, /obj/item/device/binoculars, /obj/item/attachable/bayonet, /obj/item/storage/belt/gun/m4a3, diff --git a/code/modules/clothing/suits/miscellaneous.dm b/code/modules/clothing/suits/miscellaneous.dm index 54148d4f7076..252b99e124bc 100644 --- a/code/modules/clothing/suits/miscellaneous.dm +++ b/code/modules/clothing/suits/miscellaneous.dm @@ -128,7 +128,7 @@ /obj/item/ammo_magazine, /obj/item/ammo_casing, /obj/item/weapon/baton, - /obj/item/handcuffs, + /obj/item/restraint/handcuffs, /obj/item/storage/fancy/cigarettes, /obj/item/tool/lighter, /obj/item/device/taperecorder, @@ -153,7 +153,7 @@ /obj/item/ammo_magazine, /obj/item/ammo_casing, /obj/item/weapon/baton, - /obj/item/handcuffs, + /obj/item/restraint/handcuffs, /obj/item/storage/fancy/cigarettes, /obj/item/tool/lighter, /obj/item/device/taperecorder, @@ -290,7 +290,7 @@ item_state = "webbing" allowed = list( /obj/item/weapon/baton, - /obj/item/handcuffs, + /obj/item/restraint/handcuffs, /obj/item/device/binoculars, /obj/item/attachable/bayonet, @@ -318,7 +318,7 @@ item_state = "synth_utility_vest" allowed = list( /obj/item/weapon/baton, - /obj/item/handcuffs, + /obj/item/restraint/handcuffs, /obj/item/device/binoculars, /obj/item/attachable/bayonet, @@ -455,7 +455,7 @@ /obj/item/storage/fancy/cigarettes, /obj/item/tool/lighter, /obj/item/weapon/baton, - /obj/item/handcuffs, + /obj/item/restraint/handcuffs, /obj/item/device/binoculars, /obj/item/attachable/bayonet, diff --git a/code/modules/clothing/suits/utility.dm b/code/modules/clothing/suits/utility.dm index 133265b34b7e..3b415cf0f9e8 100644 --- a/code/modules/clothing/suits/utility.dm +++ b/code/modules/clothing/suits/utility.dm @@ -112,7 +112,7 @@ allowed = list( /obj/item/weapon/gun, /obj/item/weapon/baton, - /obj/item/handcuffs, + /obj/item/restraint/handcuffs, /obj/item/device/flashlight, /obj/item/device/healthanalyzer, diff --git a/code/modules/cm_aliens/structures/special/pylon_core.dm b/code/modules/cm_aliens/structures/special/pylon_core.dm index add9646c56ac..b0270848950b 100644 --- a/code/modules/cm_aliens/structures/special/pylon_core.dm +++ b/code/modules/cm_aliens/structures/special/pylon_core.dm @@ -32,7 +32,7 @@ . = ..() node = place_node() - for(var/turf/A in range(round(cover_range*PYLON_COVERAGE_MULT), loc)) + for(var/turf/A in range(floor(cover_range*PYLON_COVERAGE_MULT), loc)) LAZYADD(A.linked_pylons, src) linked_turfs += A @@ -66,7 +66,7 @@ for(var/mob/living/carbon/xenomorph/lesser_drone/lesser in linked_hive.totalXenos) lesser_count++ - . += "Currently holding [SPAN_NOTICE("[Floor(lesser_drone_spawns)]")]/[SPAN_NOTICE("[lesser_drone_spawn_limit]")] lesser drones." + . += "Currently holding [SPAN_NOTICE("[floor(lesser_drone_spawns)]")]/[SPAN_NOTICE("[lesser_drone_spawn_limit]")] lesser drones." . += "There are currently [SPAN_NOTICE("[lesser_count]")] lesser drones in the hive. The hive can support [SPAN_NOTICE("[linked_hive.lesser_drone_limit]")] lesser drones." /obj/effect/alien/resin/special/pylon/attack_ghost(mob/dead/observer/user) diff --git a/code/modules/cm_marines/dropship_ammo.dm b/code/modules/cm_marines/dropship_ammo.dm index 0926f2bcefff..7a07891faa94 100644 --- a/code/modules/cm_marines/dropship_ammo.dm +++ b/code/modules/cm_marines/dropship_ammo.dm @@ -231,12 +231,12 @@ /obj/structure/ship_ammo/laser_battery/get_examine_text(mob/user) . = ..() - . += "It's at [round(100*ammo_count/max_ammo_count)]% charge." + . += "It's at [floor(100*ammo_count/max_ammo_count)]% charge." /obj/structure/ship_ammo/laser_battery/show_loaded_desc(mob/user) if(ammo_count) - return "It's loaded with \a [src] at [round(100*ammo_count/max_ammo_count)]% charge." + return "It's loaded with \a [src] at [floor(100*ammo_count/max_ammo_count)]% charge." else return "It's loaded with an empty [name]." diff --git a/code/modules/cm_marines/dropship_equipment.dm b/code/modules/cm_marines/dropship_equipment.dm index af06f468adcd..f5865c05bbd4 100644 --- a/code/modules/cm_marines/dropship_equipment.dm +++ b/code/modules/cm_marines/dropship_equipment.dm @@ -685,7 +685,7 @@ msg_admin_niche("[key_name(user)] is direct-firing [SA] onto [selected_target] at ([target_turf.x],[target_turf.y],[target_turf.z]) [ADMIN_JMP(target_turf)]") if(ammo_travelling_time) - var/total_seconds = max(round(ammo_travelling_time/10),1) + var/total_seconds = max(floor(ammo_travelling_time/10),1) for(var/i = 0 to total_seconds) sleep(10) if(!selected_target || !selected_target.loc)//if laser disappeared before we reached the target, @@ -1290,130 +1290,29 @@ fulton_cooldown = world.time + 50 // Rappel deployment system -/obj/structure/dropship_equipment/rappel_system - name = "\improper HPU-1 Rappel Deployment System" - shorthand = "Rappel" +/obj/structure/dropship_equipment/paradrop_system + name = "\improper HPU-1 Paradrop Deployment System" + shorthand = "PDS" equip_categories = list(DROPSHIP_CREW_WEAPON) icon_state = "rappel_module_packaged" point_cost = 50 combat_equipment = FALSE + var/system_cooldown - var/harness = /obj/item/rappel_harness +/obj/structure/dropship_equipment/paradrop_system/ui_data(mob/user) + . = list() + .["signal"] = "[linked_shuttle.paradrop_signal]" + .["locked"] = !!linked_shuttle.paradrop_signal -/obj/structure/dropship_equipment/rappel_system/update_equipment() +/obj/structure/dropship_equipment/paradrop_system/update_equipment() if(ship_base) icon_state = "rappel_hatch_closed" density = FALSE else icon_state = "rappel_module_packaged" -/obj/effect/warning/rappel - color = "#17d17a" - -/obj/structure/dropship_equipment/rappel_system/attack_hand(mob/living/carbon/human/user) - var/datum/cas_iff_group/cas_group = GLOB.cas_groups[FACTION_MARINE] - var/list/targets = cas_group.cas_signals - - if(!LAZYLEN(targets)) - to_chat(user, SPAN_NOTICE("No CAS signals found.")) - return - - if(!can_use(user)) - return - - var/user_input = tgui_input_list(user, "Choose a target to jump to.", name, targets) - if(!user_input) - return - - if(!can_use(user)) - return - - var/datum/cas_signal/LT = user_input - if(!istype(LT) || !LT.valid_signal()) - return - - var/turf/location = get_turf(LT.signal_loc) - var/area/location_area = get_area(location) - if(CEILING_IS_PROTECTED(location_area.ceiling, CEILING_PROTECTION_TIER_1)) - to_chat(user, SPAN_WARNING("You cannot jump to the target. It is probably underground.")) - return - - var/list/valid_turfs = list() - for(var/turf/T as anything in RANGE_TURFS(2, location)) - var/area/t_area = get_area(T) - if(!t_area || CEILING_IS_PROTECTED(t_area.ceiling, CEILING_PROTECTION_TIER_1)) - continue - if(T.density) - continue - var/found_dense = FALSE - for(var/atom/A in T) - if(A.density && A.can_block_movement) - found_dense = TRUE - break - if(found_dense) - continue - if(protected_by_pylon(TURF_PROTECTION_MORTAR, T)) - continue - valid_turfs += T - - if(!length(valid_turfs)) - to_chat(user, SPAN_WARNING("There's nowhere safe for you to land, the landing zone is too congested.")) - return - - var/turf/deploy_turf = pick(valid_turfs) - - var/obj/effect/warning/rappel/warning_zone = new(deploy_turf) - flick("rappel_hatch_opening", src) - icon_state = "rappel_hatch_open" - user.forceMove(loc) - user.client?.perspective = EYE_PERSPECTIVE - user.client?.eye = deploy_turf - - if(!do_after(user, 4 SECONDS, INTERRUPT_NO_NEEDHAND, BUSY_ICON_FRIENDLY, user, INTERRUPT_MOVED) || !can_use(user) || protected_by_pylon(TURF_PROTECTION_MORTAR, deploy_turf)) - qdel(warning_zone) - flick("rappel_hatch_closing", src) - icon_state = "rappel_hatch_closed" - user.client?.perspective = MOB_PERSPECTIVE - user.client?.eye = user - return - - new /obj/effect/rappel_rope(deploy_turf) - user.forceMove(deploy_turf) - INVOKE_ASYNC(user, TYPE_PROC_REF(/mob/living/carbon/human, animation_rappel)) - user.client?.perspective = MOB_PERSPECTIVE - user.client?.eye = user - deploy_turf.ceiling_debris_check(2) - playsound(deploy_turf, 'sound/items/rappel.ogg', 50, TRUE) - - flick("rappel_hatch_closing", src) - icon_state = "rappel_hatch_closed" - qdel(warning_zone) - -/obj/structure/dropship_equipment/rappel_system/proc/can_use(mob/living/carbon/human/user) - if(linked_shuttle.mode != SHUTTLE_CALL) - to_chat(user, SPAN_WARNING("\The [src] can only be used while in flight.")) - return FALSE - - if(!linked_shuttle.in_flyby) - to_chat(user, SPAN_WARNING("\The [src] requires a flyby flight to be used.")) - return FALSE - - if(user.buckled) - to_chat(user, SPAN_WARNING("You cannot rappel while buckled!")) - return FALSE - - if(user.is_mob_incapacitated()) - to_chat(user, SPAN_WARNING("You are in no state to do that!")) - return FALSE - - if(!istype(user.belt, harness)) - to_chat(user, SPAN_WARNING("You must have a rappel harness equipped in order to use \the [src]!")) - return FALSE - - if(user.action_busy) - return FALSE - - return TRUE +/obj/structure/dropship_equipment/paradrop_system/attack_hand(mob/living/carbon/human/user) + return // used in the simulation room for cas runs, removed the sound and ammo depletion methods. // copying code is definitely bad, but adding an unnecessary sim or not sim boolean check in the open_fire_firemission just doesn't seem right. diff --git a/code/modules/cm_marines/equipment/kit_boxes.dm b/code/modules/cm_marines/equipment/kit_boxes.dm index c26bafe7123a..43e6bc90e220 100644 --- a/code/modules/cm_marines/equipment/kit_boxes.dm +++ b/code/modules/cm_marines/equipment/kit_boxes.dm @@ -522,7 +522,7 @@ name = "\improper Cryo Self Defense Kit" desc = "A basic self-defense kit reserved for emergencies. As you might expect, not much care was put into keeping the stock fresh, who would be insane enough to attack a USCM ship directly?" icon_state = "cryo_defense_kit" - storage_slots = 3 + storage_slots = 4 /obj/item/storage/box/kit/cryo_self_defense/update_icon() if(LAZYLEN(contents)) @@ -533,6 +533,7 @@ /obj/item/storage/box/kit/cryo_self_defense/fill_preset_inventory() new /obj/item/weapon/gun/pistol/mod88/flashlight(src) new /obj/item/attachable/bayonet(src) + new /obj/item/tool/crowbar/red(src) new /obj/item/reagent_container/food/snacks/packaged_meal(src, pick("boneless pork ribs", "grilled chicken", "pizza square", "spaghetti chunks", "chicken tender")) /obj/item/storage/box/kit/exp_trooper diff --git a/code/modules/cm_marines/equipment/mortar/mortar_shells.dm b/code/modules/cm_marines/equipment/mortar/mortar_shells.dm index 45b3a6859d4a..dae0910cc9b4 100644 --- a/code/modules/cm_marines/equipment/mortar/mortar_shells.dm +++ b/code/modules/cm_marines/equipment/mortar/mortar_shells.dm @@ -8,6 +8,8 @@ var/datum/cause_data/cause_data ground_offset_x = 7 ground_offset_y = 6 + /// is it currently on fire and about to explode? + var/burning = FALSE /obj/item/mortar_shell/Destroy() @@ -154,6 +156,35 @@ icon_state = initial(icon_state) +"_unlocked" playsound(loc, 'sound/items/Screwdriver2.ogg', 25, 0, 6) +/obj/item/mortar_shell/ex_act(severity, explosion_direction) + if(!burning) + return ..() + +/obj/item/mortar_shell/attack_hand(mob/user) + if(burning) + to_chat(user, SPAN_DANGER("[src] is on fire and might explode!")) + return + return ..() + +/obj/item/mortar_shell/flamer_fire_act(dam, datum/cause_data/flame_cause_data) + if(burning) + return + burning = TRUE + cause_data = create_cause_data("Burning Mortar Shell", flame_cause_data.resolve_mob(), src) + handle_fire() + +/obj/item/mortar_shell/proc/handle_fire() + visible_message(SPAN_WARNING("[src] catches on fire and starts cooking off! It's gonna blow!")) + anchored = TRUE // don't want other explosions launching it elsewhere + + var/datum/effect_system/spark_spread/sparks = new() + sparks.set_up(n = 10, loca = loc) + sparks.start() + new /obj/effect/warning/explosive(loc, 5 SECONDS) + + addtimer(CALLBACK(src, PROC_REF(detonate), loc), 5 SECONDS) + addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(qdel), (src)), 5.5 SECONDS) + /obj/structure/closet/crate/secure/mortar_ammo name = "\improper M402 mortar ammo crate" desc = "A crate containing live mortar shells with various payloads. DO NOT DROP. KEEP AWAY FROM FIRE SOURCES." diff --git a/code/modules/cm_marines/equipment/mortar/mortars.dm b/code/modules/cm_marines/equipment/mortar/mortars.dm index 51d1509297a3..018bd7b9e11c 100644 --- a/code/modules/cm_marines/equipment/mortar/mortars.dm +++ b/code/modules/cm_marines/equipment/mortar/mortars.dm @@ -173,8 +173,8 @@ SPAN_NOTICE("You finish adjusting [src]'s firing angle and distance to match the new coordinates.")) targ_x = deobfuscate_x(temp_targ_x) targ_y = deobfuscate_y(temp_targ_y) - var/offset_x_max = round(abs((targ_x) - x)/offset_per_turfs) //Offset of mortar shot, grows by 1 every 20 tiles travelled - var/offset_y_max = round(abs((targ_y) - y)/offset_per_turfs) + var/offset_x_max = floor(abs((targ_x) - x)/offset_per_turfs) //Offset of mortar shot, grows by 1 every 20 tiles travelled + var/offset_y_max = floor(abs((targ_y) - y)/offset_per_turfs) offset_x = rand(-offset_x_max, offset_x_max) offset_y = rand(-offset_y_max, offset_y_max) diff --git a/code/modules/cm_marines/m2c.dm b/code/modules/cm_marines/m2c.dm index 23a9d243b134..9afca5ae1fa8 100644 --- a/code/modules/cm_marines/m2c.dm +++ b/code/modules/cm_marines/m2c.dm @@ -369,7 +369,7 @@ return user.visible_message(SPAN_NOTICE("[user] repairs some of the damage on [src]."), \ SPAN_NOTICE("You repair [src].")) - update_health(-round(health_max*0.2)) + update_health(-floor(health_max*0.2)) playsound(src.loc, 'sound/items/Welder2.ogg', 25, 1) else to_chat(user, SPAN_WARNING("You need more fuel in [WT] to repair damage to [src].")) @@ -422,7 +422,7 @@ /obj/structure/machinery/m56d_hmg/auto/proc/force_cooldown(mob/user) user = operator - overheat_value = round((rand(M2C_LOW_COOLDOWN_ROLL, M2C_HIGH_COOLDOWN_ROLL) * overheat_threshold)) + overheat_value = floor((rand(M2C_LOW_COOLDOWN_ROLL, M2C_HIGH_COOLDOWN_ROLL) * overheat_threshold)) playsound(src.loc, 'sound/weapons/hmg_cooling.ogg', 75, 1) to_chat(user, SPAN_NOTICE("[src]'s barrel has cooled down enough to restart firing.")) emergency_cooling = FALSE @@ -479,7 +479,7 @@ var/obj/item/device/m2c_gun/HMG = new(loc) transfer_label_component(HMG) HMG.rounds = rounds - HMG.overheat_value = round(0.5 * overheat_value) + HMG.overheat_value = floor(0.5 * overheat_value) if (HMG.overheat_value <= 10) HMG.overheat_value = 0 HMG.update_icon() diff --git a/code/modules/cm_marines/overwatch.dm b/code/modules/cm_marines/overwatch.dm index 70b2b82d8c86..500d575c053f 100644 --- a/code/modules/cm_marines/overwatch.dm +++ b/code/modules/cm_marines/overwatch.dm @@ -867,6 +867,9 @@ /obj/structure/machinery/computer/overwatch/almayer/broken name = "Broken Overwatch Console" +/obj/structure/machinery/computer/overwatch/almayer/small + icon_state = "engineering_terminal" + /obj/structure/machinery/computer/overwatch/clf faction = FACTION_CLF /obj/structure/machinery/computer/overwatch/upp diff --git a/code/modules/cm_marines/radar.dm b/code/modules/cm_marines/radar.dm index d088b68919b0..80b3bb7bcb0c 100644 --- a/code/modules/cm_marines/radar.dm +++ b/code/modules/cm_marines/radar.dm @@ -95,7 +95,7 @@ if(get_dist_euclidian(here_turf, target_turf) > 24) userot = TRUE - rot = round(Get_Angle(here_turf, target_turf)) + rot = floor(Get_Angle(here_turf, target_turf)) else if(target_turf.z > here_turf.z) pointer="caret-up" diff --git a/code/modules/cm_marines/smartgun_mount.dm b/code/modules/cm_marines/smartgun_mount.dm index b3035511cab7..ce1a25b98c73 100644 --- a/code/modules/cm_marines/smartgun_mount.dm +++ b/code/modules/cm_marines/smartgun_mount.dm @@ -645,7 +645,7 @@ if(do_after(user, 5 SECONDS * user.get_skill_duration_multiplier(SKILL_ENGINEER), INTERRUPT_ALL, BUSY_ICON_FRIENDLY, src)) user.visible_message(SPAN_NOTICE("[user] repairs some damage on [src]."), \ SPAN_NOTICE("You repair [src].")) - update_health(-round(health_max*0.2)) + update_health(-floor(health_max*0.2)) playsound(src.loc, 'sound/items/Welder2.ogg', 25, 1) else to_chat(user, SPAN_WARNING("You need more fuel in [WT] to repair damage to [src].")) @@ -679,7 +679,7 @@ operator.unset_interaction() /obj/structure/machinery/m56d_hmg/proc/update_damage_state() - var/health_percent = round(health/health_max * 100) + var/health_percent = floor(health/health_max * 100) switch(health_percent) if(0 to 25) damage_state = M56D_DMG_HEAVY if(25 to 50) damage_state = M56D_DMG_MODERATE @@ -689,7 +689,7 @@ /obj/structure/machinery/m56d_hmg/bullet_act(obj/projectile/P) //Nope. bullet_ping(P) visible_message(SPAN_WARNING("[src] is hit by the [P.name]!")) - update_health(round(P.damage / 10)) //Universal low damage to what amounts to a post with a gun. + update_health(floor(P.damage / 10)) //Universal low damage to what amounts to a post with a gun. return 1 /obj/structure/machinery/m56d_hmg/attack_alien(mob/living/carbon/xenomorph/xeno) // Those Ayy lmaos. diff --git a/code/modules/cm_marines/vehicle_part_fabricator.dm b/code/modules/cm_marines/vehicle_part_fabricator.dm index fd9b0faafa61..fc71763d96b3 100644 --- a/code/modules/cm_marines/vehicle_part_fabricator.dm +++ b/code/modules/cm_marines/vehicle_part_fabricator.dm @@ -233,9 +233,9 @@ qdel(thing) qdel(powerloader_clamp_used.loaded) powerloader_clamp_used.loaded = null - to_chat(user, SPAN_NOTICE("You recycle \the [thing_to_recycle] into [src], and get back [round(recycle_points * 0.8)] points.")) - msg_admin_niche("[key_name(user)] recycled a [thing_to_recycle] into \the [src] for [round(recycle_points * 0.8)] points.") - add_to_point_store(round(recycle_points * 0.8)) + to_chat(user, SPAN_NOTICE("You recycle \the [thing_to_recycle] into [src], and get back [floor(recycle_points * 0.8)] points.")) + msg_admin_niche("[key_name(user)] recycled a [thing_to_recycle] into \the [src] for [floor(recycle_points * 0.8)] points.") + add_to_point_store(floor(recycle_points * 0.8)) playsound(loc, 'sound/machines/fax.ogg', 40, 1) powerloader_clamp_used.update_icon() diff --git a/code/modules/cm_preds/yaut_bracers.dm b/code/modules/cm_preds/yaut_bracers.dm index 1994d0507884..5577691d64c2 100644 --- a/code/modules/cm_preds/yaut_bracers.dm +++ b/code/modules/cm_preds/yaut_bracers.dm @@ -569,7 +569,7 @@ if(HAS_TRAIT(caller, TRAIT_CLOAKED)) //Turn it off. if(cloak_timer > world.time) - to_chat(M, SPAN_WARNING("Your cloaking device is busy! Time left: [max(round((cloak_timer - world.time) / 10), 1)] seconds.")) + to_chat(M, SPAN_WARNING("Your cloaking device is busy! Time left: [max(floor((cloak_timer - world.time) / 10), 1)] seconds.")) return FALSE decloak(caller) else //Turn it on! @@ -582,7 +582,7 @@ return FALSE if(cloak_timer > world.time) - to_chat(M, SPAN_WARNING("Your cloaking device is still recharging! Time left: [max(round((cloak_timer - world.time) / 10), 1)] seconds.")) + to_chat(M, SPAN_WARNING("Your cloaking device is still recharging! Time left: [max(floor((cloak_timer - world.time) / 10), 1)] seconds.")) return FALSE if(!drain_power(M, 50)) diff --git a/code/modules/cm_preds/yaut_weapons.dm b/code/modules/cm_preds/yaut_weapons.dm index 34233f2ee9cd..2eaf9a5920e0 100644 --- a/code/modules/cm_preds/yaut_weapons.dm +++ b/code/modules/cm_preds/yaut_weapons.dm @@ -147,7 +147,7 @@ desc = "A segmented, lightweight whip made of durable, acid-resistant metal. Not very common among Yautja Hunters, but still a dangerous weapon capable of shredding prey." icon_state = "whip" item_state = "whip" - flags_atom = FPRINT|CONDUCT + flags_atom = FPRINT|QUICK_DRAWABLE|CONDUCT flags_item = ITEM_PREDATOR flags_equip_slot = SLOT_WAIST embeddable = FALSE @@ -172,7 +172,7 @@ name = "clan sword" desc = "An expertly crafted Yautja blade carried by hunters who wish to fight up close. Razor sharp and capable of cutting flesh into ribbons. Commonly carried by aggressive and lethal hunters." icon_state = "clansword" - flags_atom = FPRINT|CONDUCT + flags_atom = FPRINT|QUICK_DRAWABLE|CONDUCT flags_item = ITEM_PREDATOR flags_equip_slot = SLOT_BACK force = MELEE_FORCE_TIER_7 @@ -197,7 +197,7 @@ desc = "A huge, incredibly sharp dual blade used for hunting dangerous prey. This weapon is commonly carried by Yautja who wish to disable and slice apart their foes." icon_state = "predscythe" item_state = "scythe_dual" - flags_atom = FPRINT|CONDUCT + flags_atom = FPRINT|QUICK_DRAWABLE|CONDUCT flags_item = ITEM_PREDATOR flags_equip_slot = SLOT_WAIST force = MELEE_FORCE_TIER_6 @@ -234,7 +234,7 @@ name = "combi-stick" desc = "A compact yet deadly personal weapon. Can be concealed when folded. Functions well as a throwing weapon or defensive tool. A common sight in Yautja packs due to its versatility." icon_state = "combistick" - flags_atom = FPRINT|CONDUCT + flags_atom = FPRINT|QUICK_DRAWABLE|CONDUCT flags_equip_slot = SLOT_BACK flags_item = TWOHANDED|ITEM_PREDATOR w_class = SIZE_LARGE @@ -475,7 +475,7 @@ desc = "A viciously sharp dagger inscribed with ancient Yautja markings. Smells thickly of blood. Carried by some hunters." icon_state = "predknife" item_state = "knife" - flags_atom = FPRINT|CONDUCT + flags_atom = FPRINT|QUICK_DRAWABLE|CONDUCT flags_item = ITEM_PREDATOR|CAN_DIG_SHRAPNEL flags_equip_slot = SLOT_STORE sharp = IS_SHARP_ITEM_ACCURATE @@ -759,7 +759,7 @@ throwforce = MELEE_FORCE_TIER_3 embeddable = FALSE //so predators don't lose their glaive when thrown. sharp = IS_SHARP_ITEM_BIG - flags_atom = FPRINT|CONDUCT + flags_atom = FPRINT|QUICK_DRAWABLE|CONDUCT attack_verb = list("sliced", "slashed", "carved", "diced", "gored") attack_speed = 14 //Default is 7. @@ -1132,7 +1132,7 @@ w_class = SIZE_HUGE force = 0 fire_delay = 3 - flags_atom = FPRINT|CONDUCT + flags_atom = FPRINT|QUICK_DRAWABLE|CONDUCT flags_item = NOBLUDGEON|DELONDROP|IGNITING_ITEM //Can't bludgeon with this. flags_gun_features = GUN_UNUSUAL_DESIGN has_empty_icon = FALSE diff --git a/code/modules/cm_tech/implements/armor.dm b/code/modules/cm_tech/implements/armor.dm index c08bf6d3c128..bbc9c3bd8984 100644 --- a/code/modules/cm_tech/implements/armor.dm +++ b/code/modules/cm_tech/implements/armor.dm @@ -33,7 +33,7 @@ return /obj/item/clothing/accessory/health/proc/get_damage_status() - var/percentage = round(armor_health / armor_maxhealth * 100) + var/percentage = floor(armor_health / armor_maxhealth * 100) switch(percentage) if(0) . = "It is broken." diff --git a/code/modules/cm_tech/techs/marine/tier1/arc.dm b/code/modules/cm_tech/techs/marine/tier1/arc.dm new file mode 100644 index 000000000000..dc02762cc5f0 --- /dev/null +++ b/code/modules/cm_tech/techs/marine/tier1/arc.dm @@ -0,0 +1,40 @@ +/datum/tech/arc + name = "M540-B Armored Recon Carrier" + desc = "Purchase an M540-B Armored Recon Carrier, specialized in assisting groundside command. Able to be driven by Staff Officers, Executive Officers, and Commanding Officers." + icon_state = "upgrade" + + required_points = 5 + + tier = /datum/tier/one + + announce_name = "M540-B ARC ACQUIRED" + announce_message = "An M540-B Armored Recon Carrier has been authorized and will be delivered in the vehicle bay." + + flags = TREE_FLAG_MARINE + +/datum/tech/arc/on_unlock() + . = ..() + + var/obj/structure/machinery/computer/supplycomp/vehicle/comp = GLOB.VehicleElevatorConsole + var/obj/structure/machinery/cm_vending/gear/vehicle_crew/gearcomp = GLOB.VehicleGearConsole + + if(!comp || !gearcomp) + return FALSE + + comp.spent = FALSE + QDEL_NULL_LIST(comp.vehicles) + comp.vehicles = list( + new /datum/vehicle_order/arc() + ) + comp.allowed_roles = list(JOB_SYNTH, JOB_SEA, JOB_SO, JOB_XO, JOB_CO, JOB_GENERAL) + comp.req_access = list(ACCESS_MARINE_COMMAND) + comp.req_one_access = list() + comp.spent = FALSE + + gearcomp.req_access = list(ACCESS_MARINE_COMMAND) + gearcomp.req_one_access = list() + gearcomp.vendor_role = list() + gearcomp.selected_vehicle = "ARC" + gearcomp.available_categories = VEHICLE_ALL_AVAILABLE + + return TRUE diff --git a/code/modules/cm_tech/techs/marine/tier4/nuke.dm b/code/modules/cm_tech/techs/marine/tier4/nuke.dm index 139fefef570c..794e61949320 100644 --- a/code/modules/cm_tech/techs/marine/tier4/nuke.dm +++ b/code/modules/cm_tech/techs/marine/tier4/nuke.dm @@ -36,10 +36,10 @@ return if(ROUND_TIME < NUKE_UNLOCK_TIME) - to_chat(unlocking_mob, SPAN_WARNING("You cannot purchase this node before [Ceiling((NUKE_UNLOCK_TIME + SSticker.round_start_time) / (1 MINUTES))] minutes into the operation.")) + to_chat(unlocking_mob, SPAN_WARNING("You cannot purchase this node before [ceil((NUKE_UNLOCK_TIME + SSticker.round_start_time) / (1 MINUTES))] minutes into the operation.")) return FALSE return TRUE /datum/tech/nuke/proc/handle_description() - desc = "Purchase a nuclear device. Only purchasable [Ceiling((NUKE_UNLOCK_TIME + SSticker.round_start_time) / (1 MINUTES))] minutes into the operation. It's the only way to be sure." + desc = "Purchase a nuclear device. Only purchasable [ceil((NUKE_UNLOCK_TIME + SSticker.round_start_time) / (1 MINUTES))] minutes into the operation. It's the only way to be sure." diff --git a/code/modules/cm_tech/techtree.dm b/code/modules/cm_tech/techtree.dm index a027789185ef..689600fcc5f2 100644 --- a/code/modules/cm_tech/techtree.dm +++ b/code/modules/cm_tech/techtree.dm @@ -62,9 +62,8 @@ // (The `+ 2` on both of these is 1 for a buffer tile, and 1 for the outer `/turf/closed/void`.) var/area_max_x = longest_tier * 2 + 2 var/area_max_y = length(all_techs) * 3 + 2 - for(var/t in block(locate(1, 1, zlevel.z_value), locate(area_max_x, area_max_y, zlevel.z_value))) - var/turf/pos = t - for(var/A in pos) + for(var/turf/pos as anything in block(1, 1, zlevel.z_value, area_max_x, area_max_y, zlevel.z_value)) + for(var/A as anything in pos) qdel(A) if(pos.x == area_max_x || pos.y == area_max_y) @@ -83,7 +82,7 @@ var/x_offset = (longest_tier - tier_length) + 1 var/datum/tier/T = tree_tiers[tier] - for(var/turf/pos in block(locate(x_offset, y_offset, zlevel.z_value), locate(x_offset + tier_length*2, y_offset + 2, zlevel.z_value))) + for(var/turf/pos as anything in block(x_offset, y_offset, zlevel.z_value, x_offset + tier_length*2, y_offset + 2, zlevel.z_value)) pos.ChangeTurf(/turf/open/blank) pos.color = "#000000" LAZYADD(T.tier_turfs, pos) @@ -95,7 +94,7 @@ y_offset += 3 - entrance = locate(Ceiling((longest_tier*2 + 1)*0.5), 2, zlevel.z_value) + entrance = locate(ceil((longest_tier*2 + 1)*0.5), 2, zlevel.z_value) /datum/techtree/ui_status(mob/user, datum/ui_state/state) . = ..() diff --git a/code/modules/defenses/defenses.dm b/code/modules/defenses/defenses.dm index febe4901ae8a..b5e5cdf55766 100644 --- a/code/modules/defenses/defenses.dm +++ b/code/modules/defenses/defenses.dm @@ -456,9 +456,9 @@ visible_message(SPAN_WARNING("[src] is hit by [P]!")) var/ammo_flags = P.ammo.flags_ammo_behavior | P.projectile_override_flags if(ammo_flags & AMMO_ACIDIC) //Fix for xenomorph spit doing baby damage. - update_health(round(P.damage/3)) + update_health(floor(P.damage/3)) else - update_health(round(P.damage/10)) + update_health(floor(P.damage/10)) return TRUE // DAMAGE HANDLING OVER diff --git a/code/modules/defenses/sentry.dm b/code/modules/defenses/sentry.dm index a02e4e7808c9..954e6adca7ec 100644 --- a/code/modules/defenses/sentry.dm +++ b/code/modules/defenses/sentry.dm @@ -365,7 +365,7 @@ targets.Remove(A) continue - if(M.get_target_lock(faction_group) || M.invisibility || HAS_TRAIT(M, TRAIT_ABILITY_BURROWED)) + if(M.get_target_lock(faction_group) || M.invisibility || HAS_TRAIT(M, TRAIT_ABILITY_BURROWED) || M.is_ventcrawling) if(M == target) target = null targets.Remove(M) diff --git a/code/modules/droppod/droppod_ui.dm b/code/modules/droppod/droppod_ui.dm index b0c6683a4f7c..6493e9ec6c21 100644 --- a/code/modules/droppod/droppod_ui.dm +++ b/code/modules/droppod/droppod_ui.dm @@ -42,6 +42,7 @@ GLOBAL_LIST_INIT(droppod_target_mode, list( var/atom/movable/screen/map_view/cam_screen var/atom/movable/screen/background/cam_background var/map_name + var/list/cam_plane_masters var/list/ordered_area = list() var/list/launch_list = list() @@ -132,17 +133,37 @@ GLOBAL_LIST_INIT(droppod_target_mode, list( map_name = "admin_supplypod_bay_[REF(src)]_map" // Initialize map objects cam_screen = new + cam_screen.icon = null cam_screen.name = "screen" cam_screen.assigned_map = map_name cam_screen.del_on_map_removal = TRUE cam_screen.screen_loc = "[map_name]:1,1" + cam_screen.appearance_flags |= TILE_BOUND cam_background = new cam_background.assigned_map = map_name cam_background.del_on_map_removal = TRUE + cam_background.appearance_flags |= TILE_BOUND + + cam_plane_masters = list() + for(var/plane in subtypesof(/atom/movable/screen/plane_master) - /atom/movable/screen/plane_master/blackness) + var/atom/movable/screen/plane_master/instance = new plane() + add_plane(instance) + refresh_view() holder.register_map_obj(cam_screen) holder.register_map_obj(cam_background) + for(var/plane_id in cam_plane_masters) + holder.register_map_obj(cam_plane_masters[plane_id]) + +/datum/admin_podlauncher/proc/add_plane(atom/movable/screen/plane_master/instance) + instance.assigned_map = map_name + instance.appearance_flags |= TILE_BOUND + instance.del_on_map_removal = FALSE + if(instance.blend_mode_override) + instance.blend_mode = instance.blend_mode_override + instance.screen_loc = "[map_name]:CENTER" + cam_plane_masters["[instance.plane]"] = instance /datum/admin_podlauncher/proc/refresh_view() switch(tab_index) @@ -432,4 +453,5 @@ GLOBAL_LIST_INIT(droppod_target_mode, list( user.client?.clear_map(map_name) QDEL_NULL(cam_screen) QDEL_NULL(cam_background) + QDEL_LIST_ASSOC_VAL(cam_plane_masters) qdel(src) diff --git a/code/modules/economy/ATM.dm b/code/modules/economy/ATM.dm index 1345164fcf34..f4aaf7c06560 100644 --- a/code/modules/economy/ATM.dm +++ b/code/modules/economy/ATM.dm @@ -63,7 +63,7 @@ log transactions var/obj/item/spacecash/spacecash = I //consume the money if(spacecash.counterfeit) - authenticated_account.money += round(spacecash.worth * 0.25) + authenticated_account.money += floor(spacecash.worth * 0.25) visible_message(SPAN_DANGER("[src] starts sparking and making error noises as you load [I] into it!")) spark_system.start() else @@ -284,7 +284,7 @@ log transactions previous_account_number = tried_account_num if("e_withdrawal") if(withdrawal_timer > world.time) - alert("Please wait [round((withdrawal_timer-world.time)/10)] seconds before attempting to make another withdrawal.") + alert("Please wait [floor((withdrawal_timer-world.time)/10)] seconds before attempting to make another withdrawal.") return var/amount = max(text2num(href_list["funds_amount"]),0) amount = round(amount, 0.01) @@ -316,7 +316,7 @@ log transactions withdrawal_timer = world.time + 20 if("withdrawal") if(withdrawal_timer > world.time) - alert("Please wait [round((withdrawal_timer-world.time)/10)] seconds before attempting to make another withdrawal.") + alert("Please wait [floor((withdrawal_timer-world.time)/10)] seconds before attempting to make another withdrawal.") return var/amount = max(text2num(href_list["funds_amount"]),0) amount = round(amount, 0.01) diff --git a/code/modules/economy/cash.dm b/code/modules/economy/cash.dm index 6ab8164c248d..b5489f192287 100644 --- a/code/modules/economy/cash.dm +++ b/code/modules/economy/cash.dm @@ -88,7 +88,7 @@ ..() var/oldloc = loc var/amount = tgui_input_number(user, "How many dollars do you want to take? (0 to [src.worth])", "Take Money", 0, src.worth, 0) - amount = round(clamp(amount, 0, src.worth)) + amount = floor(clamp(amount, 0, src.worth)) if(amount == 0) return if(QDELETED(src) || loc != oldloc) diff --git a/code/modules/gear_presets/clf.dm b/code/modules/gear_presets/clf.dm index 143a2271f00e..bb168f22457b 100644 --- a/code/modules/gear_presets/clf.dm +++ b/code/modules/gear_presets/clf.dm @@ -71,6 +71,7 @@ new_human.equip_to_slot_or_del(new /obj/item/storage/belt/shotgun/full/random(new_human), WEAR_WAIST) new_human.equip_to_slot_or_del(new /obj/item/weapon/gun/shotgun/pump/dual_tube/cmb(new_human), WEAR_BACK) + new_human.equip_to_slot_or_del(new /obj/item/attachable/bayonet/upp(new_human), WEAR_FACE) if(prob(50)) spawn_rebel_smg(new_human) else @@ -176,6 +177,7 @@ new_human.equip_to_slot_or_del(new /obj/item/clothing/head/welding, WEAR_HEAD) new_human.equip_to_slot_or_del(new /obj/item/storage/belt/utility/full(new_human), WEAR_WAIST) new_human.equip_to_slot_or_del(new /obj/item/device/radio/headset/distress/CLF/cct, WEAR_L_EAR) + new_human.equip_to_slot_or_del(new /obj/item/attachable/bayonet/upp(new_human), WEAR_FACE) new_human.equip_to_slot_or_del(new /obj/item/storage/backpack/marine/engineerpack/ert, WEAR_BACK) new_human.equip_to_slot_or_del(new /obj/item/explosive/plastic/breaching_charge, WEAR_IN_BACK) new_human.equip_to_slot_or_del(new /obj/item/explosive/plastic/breaching_charge, WEAR_IN_BACK) @@ -300,6 +302,7 @@ new_human.equip_to_slot_or_del(new /obj/item/roller, WEAR_IN_BELT) new_human.equip_to_slot_or_del(new /obj/item/device/radio/headset/distress/CLF/medic(new_human), WEAR_L_EAR) + new_human.equip_to_slot_or_del(new /obj/item/attachable/bayonet/upp(new_human), WEAR_FACE) new_human.equip_to_slot_or_del(new /obj/item/storage/backpack/lightpack(new_human), WEAR_BACK) new_human.equip_to_slot_or_del(new /obj/item/explosive/grenade/custom/ied(new_human), WEAR_IN_BACK) new_human.equip_to_slot_or_del(new /obj/item/storage/firstaid/adv(new_human), WEAR_IN_BACK) @@ -455,6 +458,7 @@ //clothing new_human.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/militia(new_human), WEAR_JACKET) new_human.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/swat(new_human), WEAR_HEAD) + new_human.equip_to_slot_or_del(new /obj/item/attachable/bayonet/upp(new_human), WEAR_FACE) new_human.equip_to_slot_or_del(new /obj/item/clothing/shoes/combat(new_human), WEAR_FEET) new_human.equip_to_slot_or_del(new /obj/item/clothing/gloves/combat(new_human), WEAR_HANDS) new_human.equip_to_slot_or_del(new /obj/item/storage/belt/gun/m4a3/mod88(new_human), WEAR_WAIST) @@ -574,6 +578,7 @@ new_human.equip_to_slot_or_del(new /obj/item/clothing/under/colonist/clf(new_human), WEAR_BODY) new_human.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/militia(new_human), WEAR_JACKET) new_human.equip_to_slot_or_del(new /obj/item/clothing/head/beret/sec/hos(new_human), WEAR_HEAD) + new_human.equip_to_slot_or_del(new /obj/item/attachable/bayonet/upp(new_human), WEAR_FACE) new_human.equip_to_slot_or_del(new /obj/item/clothing/shoes/combat(new_human), WEAR_FEET) new_human.equip_to_slot_or_del(new /obj/item/clothing/gloves/black(new_human), WEAR_HANDS) new_human.equip_to_slot_or_del(new /obj/item/storage/belt/marine(new_human), WEAR_WAIST) diff --git a/code/modules/gear_presets/cmb.dm b/code/modules/gear_presets/cmb.dm index d568e2838ae2..8be44f94a2e8 100644 --- a/code/modules/gear_presets/cmb.dm +++ b/code/modules/gear_presets/cmb.dm @@ -96,7 +96,7 @@ new_human.equip_to_slot_or_del(new /obj/item/ammo_magazine/revolver/cmb/normalpoint, WEAR_IN_ACCESSORY) new_human.equip_to_slot_or_del(new /obj/item/ammo_magazine/revolver/cmb/normalpoint, WEAR_IN_ACCESSORY) new_human.equip_to_slot_or_del(new /obj/item/weapon/gun/shotgun/pump/dual_tube/cmb, WEAR_J_STORE) - new_human.equip_to_slot_or_del(new /obj/item/handcuffs/zip, WEAR_IN_BACK) + new_human.equip_to_slot_or_del(new /obj/item/restraint/handcuffs/zip, WEAR_IN_BACK) new_human.equip_to_slot_or_del(new /obj/item/explosive/grenade/flashbang, WEAR_IN_BACK) new_human.equip_to_slot_or_del(new /obj/item/storage/pouch/shotgun/large, WEAR_R_STORE) new_human.equip_to_slot_or_del(new /obj/item/ammo_magazine/handful/shotgun/buckshot, WEAR_IN_R_STORE) @@ -112,7 +112,7 @@ new_human.equip_to_slot_or_del(new /obj/item/ammo_magazine/pistol/highpower, WEAR_IN_ACCESSORY) new_human.equip_to_slot_or_del(new /obj/item/ammo_magazine/pistol/highpower, WEAR_IN_ACCESSORY) new_human.equip_to_slot_or_del(new /obj/item/weapon/gun/shotgun/pump/dual_tube/cmb, WEAR_J_STORE) - new_human.equip_to_slot_or_del(new /obj/item/handcuffs/zip, WEAR_IN_BACK) + new_human.equip_to_slot_or_del(new /obj/item/restraint/handcuffs/zip, WEAR_IN_BACK) new_human.equip_to_slot_or_del(new /obj/item/explosive/plastic/breaching_charge/rubber, WEAR_IN_BACK) new_human.equip_to_slot_or_del(new /obj/item/storage/pouch/shotgun/large, WEAR_R_STORE) new_human.equip_to_slot_or_del(new /obj/item/ammo_magazine/handful/shotgun/buckshot, WEAR_IN_R_STORE) @@ -128,7 +128,7 @@ new_human.equip_to_slot_or_del(new /obj/item/ammo_magazine/revolver/cmb/normalpoint, WEAR_IN_ACCESSORY) new_human.equip_to_slot_or_del(new /obj/item/ammo_magazine/revolver/cmb/normalpoint, WEAR_IN_ACCESSORY) new_human.equip_to_slot_or_del(new /obj/item/weapon/gun/smg/mp5, WEAR_J_STORE) - new_human.equip_to_slot_or_del(new /obj/item/handcuffs/zip, WEAR_IN_BACK) + new_human.equip_to_slot_or_del(new /obj/item/restraint/handcuffs/zip, WEAR_IN_BACK) new_human.equip_to_slot_or_del(new /obj/item/device/motiondetector, WEAR_L_HAND) new_human.equip_to_slot_or_del(new /obj/item/storage/pouch/magazine/large, WEAR_R_STORE) new_human.equip_to_slot_or_del(new /obj/item/ammo_magazine/smg/mp5, WEAR_IN_R_STORE) @@ -278,8 +278,8 @@ new_human.equip_to_slot_or_del(new /obj/item/storage/belt/medical/lifesaver/full, WEAR_L_HAND) //pouches new_human.equip_to_slot_or_del(new /obj/item/storage/pouch/general/large, WEAR_L_STORE) - new_human.equip_to_slot_or_del(new /obj/item/handcuffs/zip, WEAR_IN_L_STORE) - new_human.equip_to_slot_or_del(new /obj/item/handcuffs/zip, WEAR_IN_L_STORE) + new_human.equip_to_slot_or_del(new /obj/item/restraint/handcuffs/zip, WEAR_IN_L_STORE) + new_human.equip_to_slot_or_del(new /obj/item/restraint/handcuffs/zip, WEAR_IN_L_STORE) new_human.equip_to_slot_or_del(new /obj/item/explosive/grenade/flashbang, WEAR_IN_L_STORE) new_human.equip_to_slot_or_del(new /obj/item/explosive/grenade/custom/teargas, WEAR_IN_L_STORE) new_human.equip_to_slot_or_del(new /obj/item/storage/pouch/tools/tactical, WEAR_R_STORE) diff --git a/code/modules/gear_presets/survivors/fiorina_sciannex/riot_in_progress_insert_fiorina_nightmare.dm b/code/modules/gear_presets/survivors/fiorina_sciannex/riot_in_progress_insert_fiorina_nightmare.dm index 657439a13f50..3fdbe72c05be 100644 --- a/code/modules/gear_presets/survivors/fiorina_sciannex/riot_in_progress_insert_fiorina_nightmare.dm +++ b/code/modules/gear_presets/survivors/fiorina_sciannex/riot_in_progress_insert_fiorina_nightmare.dm @@ -50,7 +50,7 @@ new_human.equip_to_slot_or_del(new /obj/item/ammo_magazine/revolver/cmb/normalpoint, WEAR_IN_ACCESSORY) new_human.equip_to_slot_or_del(new /obj/item/ammo_magazine/revolver/cmb/normalpoint, WEAR_IN_ACCESSORY) new_human.equip_to_slot_or_del(new /obj/item/weapon/gun/shotgun/pump/dual_tube/cmb, WEAR_J_STORE) - new_human.equip_to_slot_or_del(new /obj/item/handcuffs/zip, WEAR_IN_BACK) + new_human.equip_to_slot_or_del(new /obj/item/restraint/handcuffs, WEAR_IN_BACK) new_human.equip_to_slot_or_del(new /obj/item/explosive/grenade/custom/teargas, WEAR_IN_BACK) new_human.equip_to_slot_or_del(new /obj/item/storage/pouch/shotgun, WEAR_R_STORE) new_human.equip_to_slot_or_del(new /obj/item/ammo_magazine/handful/shotgun/buckshot, WEAR_IN_R_STORE) @@ -63,7 +63,7 @@ new_human.equip_to_slot_or_del(new /obj/item/ammo_magazine/pistol/highpower, WEAR_IN_ACCESSORY) new_human.equip_to_slot_or_del(new /obj/item/ammo_magazine/pistol/highpower, WEAR_IN_ACCESSORY) new_human.equip_to_slot_or_del(new /obj/item/weapon/gun/shotgun/pump/dual_tube/cmb, WEAR_J_STORE) - new_human.equip_to_slot_or_del(new /obj/item/handcuffs/zip, WEAR_IN_BACK) + new_human.equip_to_slot_or_del(new /obj/item/restraint/handcuffs, WEAR_IN_BACK) new_human.equip_to_slot_or_del(new /obj/item/explosive/plastic/breaching_charge/rubber, WEAR_IN_BACK) new_human.equip_to_slot_or_del(new /obj/item/storage/pouch/shotgun, WEAR_R_STORE) new_human.equip_to_slot_or_del(new /obj/item/ammo_magazine/handful/shotgun/buckshot, WEAR_IN_R_STORE) @@ -76,7 +76,7 @@ new_human.equip_to_slot_or_del(new /obj/item/ammo_magazine/revolver/cmb/normalpoint, WEAR_IN_ACCESSORY) new_human.equip_to_slot_or_del(new /obj/item/ammo_magazine/revolver/cmb/normalpoint, WEAR_IN_ACCESSORY) new_human.equip_to_slot_or_del(new /obj/item/weapon/gun/smg/mp5, WEAR_J_STORE) - new_human.equip_to_slot_or_del(new /obj/item/handcuffs/zip, WEAR_IN_BACK) + new_human.equip_to_slot_or_del(new /obj/item/restraint/handcuffs, WEAR_IN_BACK) new_human.equip_to_slot_or_del(new /obj/item/device/motiondetector, WEAR_L_HAND) new_human.equip_to_slot_or_del(new /obj/item/storage/pouch/magazine, WEAR_R_STORE) new_human.equip_to_slot_or_del(new /obj/item/ammo_magazine/smg/mp5, WEAR_IN_R_STORE) @@ -120,8 +120,8 @@ new_human.equip_to_slot_or_del(new /obj/item/clothing/accessory/holobadge/cord, WEAR_ACCESSORY) new_human.equip_to_slot_or_del(new /obj/item/clothing/accessory/storage/droppouch, WEAR_ACCESSORY) new_human.equip_to_slot_or_del(new /obj/item/device/defibrillator/upgraded, WEAR_IN_ACCESSORY) - new_human.equip_to_slot_or_del(new /obj/item/handcuffs/zip, WEAR_IN_ACCESSORY) - new_human.equip_to_slot_or_del(new /obj/item/handcuffs/zip, WEAR_IN_ACCESSORY) + new_human.equip_to_slot_or_del(new /obj/item/restraint/handcuffs, WEAR_IN_ACCESSORY) + new_human.equip_to_slot_or_del(new /obj/item/restraint/handcuffs, WEAR_IN_ACCESSORY) new_human.equip_to_slot_or_del(new /obj/item/reagent_container/food/snacks/candy, WEAR_IN_ACCESSORY) new_human.equip_to_slot_or_del(new /obj/item/storage/pill_bottle/imidazoline, WEAR_IN_ACCESSORY) new_human.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/CMB, WEAR_JACKET) @@ -163,8 +163,8 @@ new_human.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/marine/veteran/ua_riot, WEAR_HEAD) new_human.equip_to_slot_or_del(new /obj/item/prop/helmetgarb/riot_shield, WEAR_IN_HELMET) new_human.equip_to_slot_or_del(new /obj/item/storage/backpack/satchel/sec, WEAR_BACK) - new_human.equip_to_slot_or_del(new /obj/item/handcuffs/zip, WEAR_IN_BACK) - new_human.equip_to_slot_or_del(new /obj/item/handcuffs/zip, WEAR_IN_BACK) + new_human.equip_to_slot_or_del(new /obj/item/restraint/handcuffs, WEAR_IN_BACK) + new_human.equip_to_slot_or_del(new /obj/item/restraint/handcuffs, WEAR_IN_BACK) new_human.equip_to_slot_or_del(new /obj/item/explosive/grenade/custom/teargas, WEAR_IN_BACK) new_human.equip_to_slot_or_del(new /obj/item/explosive/grenade/custom/teargas, WEAR_IN_BACK) new_human.equip_to_slot_or_del(new /obj/item/device/flashlight, WEAR_IN_BACK) @@ -240,8 +240,8 @@ /datum/equipment_preset/synth/survivor/cmb/ua_synth/load_gear(mob/living/carbon/human/new_human) //backpack new_human.equip_to_slot_or_del(new /obj/item/storage/backpack/satchel/sec, WEAR_BACK) - new_human.equip_to_slot_or_del(new /obj/item/handcuffs/zip, WEAR_IN_BACK) - new_human.equip_to_slot_or_del(new /obj/item/handcuffs/zip, WEAR_IN_BACK) + new_human.equip_to_slot_or_del(new /obj/item/restraint/handcuffs, WEAR_IN_BACK) + new_human.equip_to_slot_or_del(new /obj/item/restraint/handcuffs, WEAR_IN_BACK) new_human.equip_to_slot_or_del(new /obj/item/explosive/grenade/custom/teargas, WEAR_IN_BACK) new_human.equip_to_slot_or_del(new /obj/item/explosive/grenade/custom/teargas, WEAR_IN_BACK) new_human.equip_to_slot_or_del(new /obj/item/storage/box/packet/baton_slug, WEAR_IN_BACK) @@ -256,9 +256,9 @@ new_human.equip_to_slot_or_del(new /obj/item/clothing/under/marine/ua_riot, WEAR_BODY) new_human.equip_to_slot_or_del(new /obj/item/clothing/accessory/holobadge/cord, WEAR_ACCESSORY) new_human.equip_to_slot_or_del(new /obj/item/clothing/accessory/storage/droppouch, WEAR_ACCESSORY) - new_human.equip_to_slot_or_del(new /obj/item/handcuffs/zip, WEAR_IN_ACCESSORY) - new_human.equip_to_slot_or_del(new /obj/item/handcuffs/zip, WEAR_IN_ACCESSORY) - new_human.equip_to_slot_or_del(new /obj/item/handcuffs/zip, WEAR_IN_ACCESSORY) + new_human.equip_to_slot_or_del(new /obj/item/restraint/handcuffs, WEAR_IN_ACCESSORY) + new_human.equip_to_slot_or_del(new /obj/item/restraint/handcuffs, WEAR_IN_ACCESSORY) + new_human.equip_to_slot_or_del(new /obj/item/restraint/handcuffs, WEAR_IN_ACCESSORY) new_human.equip_to_slot_or_del(new /obj/item/storage/box/flashbangs, WEAR_IN_ACCESSORY) new_human.equip_to_slot_or_del(new /obj/item/explosive/grenade/custom/teargas, WEAR_IN_ACCESSORY) new_human.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/marine/veteran/ua_riot/synth, WEAR_JACKET) diff --git a/code/modules/gear_presets/survivors/solaris/crashlanding-offices_insert_bigred.dm b/code/modules/gear_presets/survivors/solaris/crashlanding-offices_insert_bigred.dm index 8cd72c58ad80..44d029d44c87 100644 --- a/code/modules/gear_presets/survivors/solaris/crashlanding-offices_insert_bigred.dm +++ b/code/modules/gear_presets/survivors/solaris/crashlanding-offices_insert_bigred.dm @@ -159,7 +159,7 @@ new_human.equip_to_slot_or_del(new /obj/item/clothing/accessory/storage/droppouch, WEAR_ACCESSORY) new_human.equip_to_slot_or_del(new /obj/item/tool/surgery/scalpel/manager, WEAR_IN_ACCESSORY) new_human.equip_to_slot_or_del(new /obj/item/reagent_container/food/drinks/flask/weylandyutani, WEAR_IN_ACCESSORY) - new_human.equip_to_slot_or_del(new /obj/item/handcuffs/zip, WEAR_IN_ACCESSORY) + new_human.equip_to_slot_or_del(new /obj/item/restraint/handcuffs/zip, WEAR_IN_ACCESSORY) new_human.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/marine/veteran/pmc/light/synth, WEAR_JACKET) new_human.equip_to_slot_or_del(new /obj/item/weapon/telebaton, WEAR_IN_JACKET) new_human.equip_to_slot_or_del(new /obj/item/ammo_magazine/smg/nailgun, WEAR_IN_JACKET) diff --git a/code/modules/gear_presets/synths.dm b/code/modules/gear_presets/synths.dm index 4eb674cf3796..9bfa2335e94a 100644 --- a/code/modules/gear_presets/synths.dm +++ b/code/modules/gear_presets/synths.dm @@ -461,8 +461,8 @@ WEAR_EYES = /obj/item/clothing/glasses/sunglasses/sechud, WEAR_BODY = /obj/item/clothing/under/colonist/white_service, WEAR_BACK = /obj/item/storage/backpack/satchel/sec, - WEAR_IN_BACK = /obj/item/handcuffs/zip, - WEAR_IN_BACK = /obj/item/handcuffs/zip, + WEAR_IN_BACK = /obj/item/restraint/handcuffs, + WEAR_IN_BACK = /obj/item/restraint/handcuffs, WEAR_JACKET = /obj/item/clothing/suit/storage/webbing, WEAR_WAIST = /obj/item/storage/belt/security/MP/full/synth, WEAR_IN_JACKET = /obj/item/weapon/telebaton, @@ -800,7 +800,7 @@ new_human.equip_to_slot_or_del(new /obj/item/stack/nanopaste(new_human), WEAR_IN_BACK) new_human.equip_to_slot_or_del(new /obj/item/stack/nanopaste(new_human), WEAR_IN_BACK) new_human.equip_to_slot_or_del(new /obj/item/tool/crowbar(new_human), WEAR_IN_BACK) - new_human.equip_to_slot_or_del(new /obj/item/handcuffs/zip(new_human), WEAR_IN_BACK) + new_human.equip_to_slot_or_del(new /obj/item/restraint/handcuffs/zip(new_human), WEAR_IN_BACK) new_human.equip_to_slot_or_del(new /obj/item/weapon/gun/pistol/tranquilizer(new_human), WEAR_IN_BACK) new_human.equip_to_slot_or_del(new /obj/item/device/radio/headset(new_human), WEAR_L_EAR) new_human.equip_to_slot_or_del(new /obj/item/storage/pouch/tools/full(new_human), WEAR_R_STORE) diff --git a/code/modules/gear_presets/upp.dm b/code/modules/gear_presets/upp.dm index cdb955bd9696..450662ba25c3 100644 --- a/code/modules/gear_presets/upp.dm +++ b/code/modules/gear_presets/upp.dm @@ -2671,8 +2671,8 @@ new_human.equip_to_slot_or_del(UPP, WEAR_BODY) new_human.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/marine/faction/UPP/support/synth, WEAR_JACKET) new_human.equip_to_slot_or_del(new /obj/item/weapon/telebaton, WEAR_IN_JACKET) - new_human.equip_to_slot_or_del(new /obj/item/handcuffs, WEAR_IN_JACKET) - new_human.equip_to_slot_or_del(new /obj/item/handcuffs, WEAR_IN_JACKET) + new_human.equip_to_slot_or_del(new /obj/item/restraint/handcuffs, WEAR_IN_JACKET) + new_human.equip_to_slot_or_del(new /obj/item/restraint/handcuffs, WEAR_IN_JACKET) new_human.equip_to_slot_or_del(new /obj/item/device/motiondetector/hacked, WEAR_J_STORE) new_human.equip_to_slot_or_del(new /obj/item/clothing/accessory/patch/upp, WEAR_ACCESSORY) new_human.equip_to_slot_or_del(new /obj/item/clothing/accessory/patch/upp/naval, WEAR_ACCESSORY) @@ -3014,8 +3014,8 @@ new_human.equip_to_slot_or_del(new /obj/item/storage/pouch/magazine/large, WEAR_R_STORE) new_human.equip_to_slot_or_del(new /obj/item/storage/pouch/firstaid/full, WEAR_L_STORE) - new_human.equip_to_slot_or_del(new /obj/item/handcuffs, WEAR_IN_BACK) - new_human.equip_to_slot_or_del(new /obj/item/handcuffs, WEAR_IN_BACK) + new_human.equip_to_slot_or_del(new /obj/item/restraint/handcuffs, WEAR_IN_BACK) + new_human.equip_to_slot_or_del(new /obj/item/restraint/handcuffs, WEAR_IN_BACK) spawn_weapon(/obj/item/weapon/gun/rifle/type71/carbine/commando, /obj/item/ammo_magazine/rifle/type71, new_human, 0, 8) @@ -3143,8 +3143,8 @@ new_human.equip_to_slot_or_del(new /obj/item/reagent_container/food/snacks/upp, WEAR_IN_BACK) new_human.equip_to_slot_or_del(new /obj/item/storage/pouch/explosive/C4, WEAR_L_STORE) - new_human.equip_to_slot_or_del(new /obj/item/handcuffs, WEAR_IN_JACKET) - new_human.equip_to_slot_or_del(new /obj/item/handcuffs, WEAR_IN_JACKET) + new_human.equip_to_slot_or_del(new /obj/item/restraint/handcuffs, WEAR_IN_JACKET) + new_human.equip_to_slot_or_del(new /obj/item/restraint/handcuffs, WEAR_IN_JACKET) spawn_weapon(/obj/item/weapon/gun/rifle/type71/carbine/commando, /obj/item/ammo_magazine/rifle/type71, new_human, 0, 5) @@ -3304,8 +3304,8 @@ new_human.equip_to_slot_or_del(new /obj/item/storage/pouch/magazine/large, WEAR_R_STORE) new_human.equip_to_slot_or_del(new /obj/item/storage/pouch/explosive/C4, WEAR_L_STORE) - new_human.equip_to_slot_or_del(new /obj/item/handcuffs, WEAR_IN_BACK) - new_human.equip_to_slot_or_del(new /obj/item/handcuffs, WEAR_IN_BACK) + new_human.equip_to_slot_or_del(new /obj/item/restraint/handcuffs, WEAR_IN_BACK) + new_human.equip_to_slot_or_del(new /obj/item/restraint/handcuffs, WEAR_IN_BACK) new_human.equip_to_slot_or_del(new /obj/item/storage/box/handcuffs, WEAR_IN_BACK) spawn_weapon(/obj/item/weapon/gun/rifle/type71/carbine/commando, /obj/item/ammo_magazine/rifle/type71, new_human, 0, 7) @@ -3445,8 +3445,8 @@ new_human.equip_to_slot_or_del(new /obj/item/storage/pouch/magazine/large, WEAR_R_STORE) new_human.equip_to_slot_or_del(new /obj/item/storage/pouch/firstaid/full, WEAR_L_STORE) - new_human.equip_to_slot_or_del(new /obj/item/handcuffs, WEAR_IN_BACK) - new_human.equip_to_slot_or_del(new /obj/item/handcuffs, WEAR_IN_BACK) + new_human.equip_to_slot_or_del(new /obj/item/restraint/handcuffs, WEAR_IN_BACK) + new_human.equip_to_slot_or_del(new /obj/item/restraint/handcuffs, WEAR_IN_BACK) spawn_weapon(/obj/item/weapon/gun/rifle/type71/carbine/commando, /obj/item/ammo_magazine/rifle/type71, new_human, 0, 8) @@ -3485,8 +3485,8 @@ new_human.equip_to_slot_or_del(new /obj/item/reagent_container/food/snacks/upp, WEAR_IN_BACK) new_human.equip_to_slot_or_del(new /obj/item/storage/pouch/explosive/C4, WEAR_L_STORE) - new_human.equip_to_slot_or_del(new /obj/item/handcuffs, WEAR_IN_JACKET) - new_human.equip_to_slot_or_del(new /obj/item/handcuffs, WEAR_IN_JACKET) + new_human.equip_to_slot_or_del(new /obj/item/restraint/handcuffs, WEAR_IN_JACKET) + new_human.equip_to_slot_or_del(new /obj/item/restraint/handcuffs, WEAR_IN_JACKET) spawn_weapon(/obj/item/weapon/gun/rifle/type71/carbine/commando, /obj/item/ammo_magazine/rifle/type71, new_human, 0, 5) @@ -3518,8 +3518,8 @@ new_human.equip_to_slot_or_del(new /obj/item/storage/pouch/magazine/large, WEAR_R_STORE) new_human.equip_to_slot_or_del(new /obj/item/storage/pouch/explosive/C4, WEAR_L_STORE) - new_human.equip_to_slot_or_del(new /obj/item/handcuffs, WEAR_IN_BACK) - new_human.equip_to_slot_or_del(new /obj/item/handcuffs, WEAR_IN_BACK) + new_human.equip_to_slot_or_del(new /obj/item/restraint/handcuffs, WEAR_IN_BACK) + new_human.equip_to_slot_or_del(new /obj/item/restraint/handcuffs, WEAR_IN_BACK) new_human.equip_to_slot_or_del(new /obj/item/storage/box/handcuffs, WEAR_IN_BACK) //*****************************************************************************************************/ diff --git a/code/modules/gear_presets/uscm_event.dm b/code/modules/gear_presets/uscm_event.dm index 4968954600ad..1489a5b1d877 100644 --- a/code/modules/gear_presets/uscm_event.dm +++ b/code/modules/gear_presets/uscm_event.dm @@ -98,7 +98,7 @@ new_human.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/marine/MP/general(new_human.back), WEAR_IN_BACK) new_human.equip_to_slot_or_del(new /obj/item/device/cotablet(new_human.back), WEAR_IN_BACK) new_human.equip_to_slot_or_del(new /obj/item/storage/mateba_case/general(new_human.back), WEAR_IN_BACK) - new_human.equip_to_slot_or_del(new /obj/item/handcuffs(new_human.back), WEAR_IN_JACKET) + new_human.equip_to_slot_or_del(new /obj/item/restraint/handcuffs(new_human.back), WEAR_IN_JACKET) new_human.equip_to_slot_or_del(new /obj/item/weapon/telebaton, WEAR_IN_JACKET) new_human.equip_to_slot_or_del(new /obj/item/device/flash, WEAR_IN_JACKET) @@ -174,7 +174,7 @@ //TODO: preload all of those items before equipping the backpack //Otherwise, if you spawn the spy next to other people //they will see messages for them putting guns and explosives into their backpack... - new_human.equip_to_slot_or_del(new /obj/item/handcuffs(new_human.back), WEAR_IN_BACK) + new_human.equip_to_slot_or_del(new /obj/item/restraint/handcuffs(new_human.back), WEAR_IN_BACK) new_human.equip_to_slot_or_del(new /obj/item/weapon/gun/pistol/np92/suppressed/tranq(new_human.back), WEAR_IN_BACK) new_human.equip_to_slot_or_del(new /obj/item/ammo_magazine/pistol/np92/tranq(new_human.back), WEAR_IN_BACK) new_human.equip_to_slot_or_del(new /obj/item/ammo_magazine/pistol/np92/tranq(new_human.back), WEAR_IN_BACK) @@ -241,7 +241,7 @@ new_human.equip_to_slot_or_del(new /obj/item/explosive/grenade/custom/teargas(new_human), WEAR_IN_BACK) new_human.equip_to_slot_or_del(new /obj/item/explosive/grenade/custom/teargas(new_human), WEAR_IN_BACK) new_human.equip_to_slot_or_del(new /obj/item/device/flash(new_human), WEAR_IN_JACKET) - new_human.equip_to_slot_or_del(new /obj/item/handcuffs(new_human), WEAR_IN_JACKET) + new_human.equip_to_slot_or_del(new /obj/item/restraint/handcuffs(new_human), WEAR_IN_JACKET) new_human.equip_to_slot_or_del(new /obj/item/weapon/gun/shotgun/combat(new_human), WEAR_J_STORE) /datum/equipment_preset/uscm_event/provost/tml @@ -288,7 +288,7 @@ new_human.equip_to_slot_or_del(new /obj/item/explosive/grenade/custom/teargas(new_human), WEAR_IN_BACK) new_human.equip_to_slot_or_del(new /obj/item/explosive/grenade/custom/teargas(new_human), WEAR_IN_BACK) new_human.equip_to_slot_or_del(new /obj/item/device/flash(new_human), WEAR_IN_JACKET) - new_human.equip_to_slot_or_del(new /obj/item/handcuffs(new_human), WEAR_IN_JACKET) + new_human.equip_to_slot_or_del(new /obj/item/restraint/handcuffs(new_human), WEAR_IN_JACKET) new_human.equip_to_slot_or_del(new /obj/item/weapon/gun/shotgun/combat(new_human), WEAR_J_STORE) /datum/equipment_preset/uscm_event/provost/inspector @@ -329,7 +329,7 @@ new_human.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/marine/MP/provost/light/flexi(new_human.back), WEAR_IN_BACK) new_human.equip_to_slot_or_del(new /obj/item/device/flash(new_human), WEAR_IN_JACKET) - new_human.equip_to_slot_or_del(new /obj/item/handcuffs(new_human), WEAR_IN_JACKET) + new_human.equip_to_slot_or_del(new /obj/item/restraint/handcuffs(new_human), WEAR_IN_JACKET) /datum/equipment_preset/uscm_event/provost/inspector/advisor name = "Provost Advisor" diff --git a/code/modules/gear_presets/uscm_police.dm b/code/modules/gear_presets/uscm_police.dm index 14e35d990348..76df4d6de2be 100644 --- a/code/modules/gear_presets/uscm_police.dm +++ b/code/modules/gear_presets/uscm_police.dm @@ -226,8 +226,8 @@ new_human.equip_to_slot_or_del(new /obj/item/explosive/grenade/custom/teargas(new_human.back), WEAR_IN_BACK) new_human.equip_to_slot_or_del(new /obj/item/explosive/grenade/custom/teargas(new_human.back), WEAR_IN_BACK) new_human.equip_to_slot_or_del(new /obj/item/explosive/grenade/custom/teargas(new_human.back), WEAR_IN_BACK) - new_human.equip_to_slot_or_del(new /obj/item/handcuffs(new_human.back), WEAR_IN_BACK) - new_human.equip_to_slot_or_del(new /obj/item/handcuffs(new_human.back), WEAR_IN_BACK) + new_human.equip_to_slot_or_del(new /obj/item/restraint/handcuffs(new_human.back), WEAR_IN_BACK) + new_human.equip_to_slot_or_del(new /obj/item/restraint/handcuffs(new_human.back), WEAR_IN_BACK) new_human.equip_to_slot_or_del(new /obj/item/storage/pouch/shotgun/large/beanbag/riot(new_human), WEAR_L_STORE) new_human.equip_to_slot_or_del(new /obj/item/storage/pouch/shotgun/large/beanbag/riot(new_human), WEAR_R_STORE) if(new_human.disabilities & NEARSIGHTED) diff --git a/code/modules/gear_presets/wy_goons.dm b/code/modules/gear_presets/wy_goons.dm index a8f3a443311e..9207b9d55a2d 100644 --- a/code/modules/gear_presets/wy_goons.dm +++ b/code/modules/gear_presets/wy_goons.dm @@ -62,7 +62,7 @@ assignment = JOB_WY_GOON rank = JOB_WY_GOON paygrade = PAY_SHORT_CPO - skills = /datum/skills/MP + skills = /datum/skills/wy_goon /datum/equipment_preset/goon/standard/load_gear(mob/living/carbon/human/new_human) new_human.equip_to_slot_or_del(new /obj/item/device/radio/headset/distress/WY, WEAR_L_EAR) @@ -74,9 +74,9 @@ new_human.equip_to_slot_or_del(new /obj/item/storage/backpack/lightpack, WEAR_BACK) new_human.equip_to_slot_or_del(new /obj/item/weapon/baton, WEAR_IN_BACK) - new_human.equip_to_slot_or_del(new /obj/item/handcuffs/zip, WEAR_IN_BACK) - new_human.equip_to_slot_or_del(new /obj/item/handcuffs/zip, WEAR_IN_BACK) - new_human.equip_to_slot_or_del(new /obj/item/handcuffs/zip, WEAR_IN_BACK) + new_human.equip_to_slot_or_del(new /obj/item/restraint/handcuffs/zip, WEAR_IN_BACK) + new_human.equip_to_slot_or_del(new /obj/item/restraint/handcuffs/zip, WEAR_IN_BACK) + new_human.equip_to_slot_or_del(new /obj/item/restraint/handcuffs/zip, WEAR_IN_BACK) new_human.equip_to_slot_or_del(new /obj/item/tool/crowbar, WEAR_IN_BACK) new_human.equip_to_slot_or_del(new /obj/item/storage/belt/gun/m4a3/mod88, WEAR_WAIST) @@ -88,6 +88,40 @@ new_human.equip_to_slot_or_del(new /obj/item/ammo_magazine/rifle/ap, WEAR_IN_BACK) +/datum/equipment_preset/goon/engineer + name = "Weyland-Yutani Corporate Security Technician (Goon Engineer)" + flags = EQUIPMENT_PRESET_EXTRA + + assignment = JOB_WY_GOON_TECH + rank = JOB_WY_GOON_TECH + paygrade = PAY_SHORT_CPO + skills = /datum/skills/wy_goon_tech + +/datum/equipment_preset/goon/engineer/load_gear(mob/living/carbon/human/new_human) + new_human.equip_to_slot_or_del(new /obj/item/device/radio/headset/distress/WY, WEAR_L_EAR) + new_human.equip_to_slot_or_del(new /obj/item/clothing/under/marine/veteran/pmc/corporate, WEAR_BODY) + new_human.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/marine/veteran/pmc/light/corporate, WEAR_JACKET) + new_human.equip_to_slot_or_del(new /obj/item/clothing/gloves/marine/veteran, WEAR_HANDS) + new_human.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/marine/veteran/pmc/corporate, WEAR_HEAD) + new_human.equip_to_slot_or_del(new /obj/item/clothing/glasses/welding, WEAR_EYES) + new_human.equip_to_slot_or_del(new /obj/item/clothing/shoes/marine/corporate, WEAR_FEET) + + new_human.equip_to_slot_or_del(new /obj/item/storage/backpack/marine/engineerpack/ert, WEAR_BACK) + new_human.equip_to_slot_or_del(new /obj/item/weapon/baton, WEAR_IN_BACK) + new_human.equip_to_slot_or_del(new /obj/item/restraint/handcuffs, WEAR_IN_BACK) + new_human.equip_to_slot_or_del(new /obj/item/ammo_magazine/rifle, WEAR_IN_BACK) + new_human.equip_to_slot_or_del(new /obj/item/ammo_magazine/rifle, WEAR_IN_BACK) + new_human.equip_to_slot_or_del(new /obj/item/ammo_magazine/rifle, WEAR_IN_BACK) + + new_human.equip_to_slot_or_del(new /obj/item/storage/belt/utility/full, WEAR_WAIST) + new_human.equip_to_slot_or_del(new /obj/item/storage/pouch/firstaid/full, WEAR_R_STORE) + new_human.equip_to_slot_or_del(new /obj/item/storage/pouch/construction/full, WEAR_L_STORE) + + new_human.equip_to_slot_or_del(new /obj/item/weapon/gun/rifle/m41a/corporate, WEAR_J_STORE) + new_human.equip_to_slot_or_del(new /obj/item/ammo_magazine/rifle/ap, WEAR_IN_JACKET) + new_human.equip_to_slot_or_del(new /obj/item/ammo_magazine/rifle/ap, WEAR_IN_JACKET) + + /datum/equipment_preset/goon/lead name = "Weyland-Yutani Corporate Security Lead (Goon Lead)" flags = EQUIPMENT_PRESET_EXTRA @@ -95,7 +129,7 @@ assignment = JOB_WY_GOON_LEAD rank = JOB_WY_GOON_LEAD paygrade = PAY_SHORT_CSPO - skills = /datum/skills/MP + skills = /datum/skills/wy_goon_lead /datum/equipment_preset/goon/lead/New() . = ..() @@ -111,9 +145,9 @@ new_human.equip_to_slot_or_del(new /obj/item/storage/backpack/lightpack, WEAR_BACK) new_human.equip_to_slot_or_del(new /obj/item/weapon/baton, WEAR_IN_BACK) - new_human.equip_to_slot_or_del(new /obj/item/handcuffs/zip, WEAR_IN_BACK) - new_human.equip_to_slot_or_del(new /obj/item/handcuffs/zip, WEAR_IN_BACK) - new_human.equip_to_slot_or_del(new /obj/item/handcuffs/zip, WEAR_IN_BACK) + new_human.equip_to_slot_or_del(new /obj/item/restraint/handcuffs/zip, WEAR_IN_BACK) + new_human.equip_to_slot_or_del(new /obj/item/restraint/handcuffs/zip, WEAR_IN_BACK) + new_human.equip_to_slot_or_del(new /obj/item/restraint/handcuffs/zip, WEAR_IN_BACK) new_human.equip_to_slot_or_del(new /obj/item/tool/crowbar, WEAR_IN_BACK) new_human.equip_to_slot_or_del(new /obj/item/storage/belt/gun/m4a3/mod88, WEAR_WAIST) diff --git a/code/modules/holidays/halloween/decorators.dm b/code/modules/holidays/halloween/decorators.dm index 6575ed5ba665..fb12cf96cd82 100644 --- a/code/modules/holidays/halloween/decorators.dm +++ b/code/modules/holidays/halloween/decorators.dm @@ -25,8 +25,7 @@ var/list/turf/valid_turfs = list() var/list/ground_levels = SSmapping.levels_by_trait(ZTRAIT_GROUND) for(var/ground_z in ground_levels) - var/list/turf/all_turfs = block(locate(1, 1, ground_z), locate(world.maxx, world.maxy, ground_z)) - for(var/turf/open/turf in all_turfs) + for(var/turf/open/turf in Z_TURFS(ground_z)) if(turf.is_groundmap_turf) var/valid = TRUE for(var/atom/movable/movable as anything in turf.contents) @@ -42,11 +41,7 @@ if(!length(valid_turfs)) break var/turf/considered_turf = pick(valid_turfs) - var/x_min = max(1, considered_turf.x - exclusion_range) - var/y_min = max(1, considered_turf.y - exclusion_range) - var/x_max = min(world.maxx, considered_turf.x + exclusion_range) - var/y_max = min(world.maxy, considered_turf.y + exclusion_range) - var/list/turf/denied_turfs = block(locate(x_min, y_min, considered_turf.z), locate(x_max, y_max, considered_turf.z)) + var/list/turf/denied_turfs = RANGE_TURFS(exclusion_range, considered_turf) valid_turfs -= denied_turfs picked_turfs += considered_turf diff --git a/code/modules/hydroponics/grown_inedible.dm b/code/modules/hydroponics/grown_inedible.dm index e47ad43acaf1..66478536b77b 100644 --- a/code/modules/hydroponics/grown_inedible.dm +++ b/code/modules/hydroponics/grown_inedible.dm @@ -25,7 +25,7 @@ var/list/reagent_data = S.chems[rid] var/rtotal = reagent_data[1] if(reagent_data.len > 1 && potency > 0) - rtotal += round(potency/reagent_data[2]) + rtotal += floor(potency/reagent_data[2]) reagents.add_reagent(rid,max(1,rtotal)) /obj/item/grown/log diff --git a/code/modules/hydroponics/hydro_tray.dm b/code/modules/hydroponics/hydro_tray.dm index 75bfaa5c31a8..a3b75d0b21aa 100644 --- a/code/modules/hydroponics/hydro_tray.dm +++ b/code/modules/hydroponics/hydro_tray.dm @@ -207,7 +207,7 @@ if(seed.nutrient_consumption > 0 && nutrilevel > 0 && prob(25)) nutrilevel -= max(0,seed.nutrient_consumption * HYDRO_SPEED_MULTIPLIER) if(seed.water_consumption > 0 && waterlevel > 0 && prob(25)) - waterlevel -= round(max(0,(seed.water_consumption * HYDRO_WATER_CONSUMPTION_MULTIPLIER) * HYDRO_SPEED_MULTIPLIER)) + waterlevel -= floor(max(0,(seed.water_consumption * HYDRO_WATER_CONSUMPTION_MULTIPLIER) * HYDRO_SPEED_MULTIPLIER)) // Make sure the plant is not starving or thirsty. Adequate // water and nutrients will cause a plant to become healthier. @@ -226,7 +226,7 @@ // Toxin levels beyond the plant's tolerance cause damage, but // toxins are sucked up each tick and slowly reduce over time. if(toxins > 0) - var/toxin_uptake = max(1,round(toxins/10)) + var/toxin_uptake = max(1,floor(toxins/10)) if(toxins > seed.toxins_tolerance) plant_health -= toxin_uptake toxins -= toxin_uptake @@ -319,7 +319,7 @@ // Water dilutes toxin level. if(water_added > 0) - toxins -= round(water_added/4) + toxins -= floor(water_added/4) temp_chem_holder.reagents.clear_reagents() check_level_sanity() @@ -390,7 +390,7 @@ overlays += "[seed.plant_icon]-harvest" else if(age < seed.maturation) - var/t_growthstate = round(age/seed.maturation * seed.growth_stages) + var/t_growthstate = floor(age/seed.maturation * seed.growth_stages) overlays += "[seed.plant_icon]-grow[t_growthstate]" lastproduce = age else @@ -414,7 +414,7 @@ // Update bioluminescence. if(seed) if(seed.biolum) - set_light(round(seed.potency/10)) + set_light(floor(seed.potency/10)) return set_light(0) @@ -577,7 +577,7 @@ dead = 0 age = 1 //Snowflakey, maybe move this to the seed datum - plant_health = (istype(S, /obj/item/seeds/cutting) ? round(seed.endurance/rand(2,5)) : seed.endurance) + plant_health = (istype(S, /obj/item/seeds/cutting) ? floor(seed.endurance/rand(2,5)) : seed.endurance) lastcycle = world.time diff --git a/code/modules/hydroponics/seed_datums.dm b/code/modules/hydroponics/seed_datums.dm index c8c46bc77759..7723052d2b3b 100644 --- a/code/modules/hydroponics/seed_datums.dm +++ b/code/modules/hydroponics/seed_datums.dm @@ -402,9 +402,9 @@ GLOBAL_LIST_EMPTY(gene_tag_masks) // Gene obfuscation for delicious trial and if(gene.values.len < 6) return - if(yield > 0) yield = max(1,round(yield*0.85)) - if(endurance > 0) endurance = max(1,round(endurance*0.85)) - if(lifespan > 0) lifespan = max(1,round(lifespan*0.85)) + if(yield > 0) yield = max(1,floor(yield*0.85)) + if(endurance > 0) endurance = max(1,floor(endurance*0.85)) + if(lifespan > 0) lifespan = max(1,floor(lifespan*0.85)) if(!products) products = list() products |= gene.values[1] @@ -425,7 +425,7 @@ GLOBAL_LIST_EMPTY(gene_tag_masks) // Gene obfuscation for delicious trial and if(isnull(gene_chem[i])) gene_chem[i] = 0 if(chems[rid][i]) - chems[rid][i] = max(1,round((gene_chem[i] + chems[rid][i])/2)) + chems[rid][i] = max(1,floor((gene_chem[i] + chems[rid][i])/2)) else chems[rid][i] = gene_chem[i] @@ -434,7 +434,7 @@ GLOBAL_LIST_EMPTY(gene_tag_masks) // Gene obfuscation for delicious trial and if(!exude_gasses) exude_gasses = list() exude_gasses |= new_gasses for(var/gas in exude_gasses) - exude_gasses[gas] = max(1,round(exude_gasses[gas]*0.8)) + exude_gasses[gas] = max(1,floor(exude_gasses[gas]*0.8)) alter_temp = gene.values[4] potency = gene.values[5] diff --git a/code/modules/hydroponics/vines.dm b/code/modules/hydroponics/vines.dm index c2a4afaed138..55c4908050e5 100644 --- a/code/modules/hydroponics/vines.dm +++ b/code/modules/hydroponics/vines.dm @@ -138,7 +138,7 @@ if(seed.carnivorous == 2) to_chat(buckled_mob, SPAN_DANGER("\The [src] pierces your flesh greedily!")) - var/damage = rand(round(seed.potency/2),seed.potency) + var/damage = rand(floor(seed.potency/2),seed.potency) if(!istype(H)) H.apply_damage(damage, BRUTE) return @@ -167,7 +167,7 @@ // Update bioluminescence. if(seed.biolum) - set_light(1+round(seed.potency/10)) + set_light(1+floor(seed.potency/10)) return else set_light(0) diff --git a/code/modules/lighting/lighting_mask/shadow_calculator.dm b/code/modules/lighting/lighting_mask/shadow_calculator.dm index cfd4a86f5f3a..480b4d534fbb 100644 --- a/code/modules/lighting/lighting_mask/shadow_calculator.dm +++ b/code/modules/lighting/lighting_mask/shadow_calculator.dm @@ -95,7 +95,7 @@ SSlighting.total_shadow_calculations ++ //Ceiling the range since we need it in integer form - var/range = Ceiling(radius) + var/range = ceil(radius) DO_SOMETHING_IF_DEBUGGING_SHADOWS(var/timer = TICK_USAGE) //Work out our position diff --git a/code/modules/lighting/lighting_static/static_lighting_source.dm b/code/modules/lighting/lighting_static/static_lighting_source.dm index 26bc41d3cb02..872f37bce24d 100644 --- a/code/modules/lighting/lighting_static/static_lighting_source.dm +++ b/code/modules/lighting/lighting_static/static_lighting_source.dm @@ -223,8 +223,8 @@ var/list/turf/turfs = list() if (source_turf) var/oldlum = source_turf.luminosity - source_turf.luminosity = Ceiling(light_range) - for(var/turf/T in view(Ceiling(light_range), source_turf)) + source_turf.luminosity = ceil(light_range) + for(var/turf/T in view(ceil(light_range), source_turf)) if(!IS_OPAQUE_TURF(T)) if (!T.lighting_corners_initialised) T.static_generate_missing_corners() diff --git a/code/modules/mapping/map_template.dm b/code/modules/mapping/map_template.dm index 50a343635de9..ff72ea2e1d1b 100644 --- a/code/modules/mapping/map_template.dm +++ b/code/modules/mapping/map_template.dm @@ -48,18 +48,7 @@ var/list/obj/docking_port/stationary/ports = list() var/list/area/areas = list() - var/list/turfs = block( - locate( - bounds[MAP_MINX], - bounds[MAP_MINY], - bounds[MAP_MINZ] - ), - locate( - bounds[MAP_MAXX], - bounds[MAP_MAXY], - bounds[MAP_MAXZ] - ) - ) + var/list/turfs = block(bounds[MAP_MINX], bounds[MAP_MINY], bounds[MAP_MINZ], bounds[MAP_MAXX], bounds[MAP_MAXY], bounds[MAP_MAXZ]) for(var/turf/current_turf as anything in turfs) var/area/current_turfs_area = current_turf.loc areas |= current_turfs_area @@ -89,8 +78,8 @@ unlit.static_lighting_build_overlay() /datum/map_template/proc/load_new_z(secret = FALSE) - var/x = round((world.maxx - width) * 0.5) + 1 - var/y = round((world.maxy - height) * 0.5) + 1 + var/x = floor((world.maxx - width) * 0.5) + 1 + var/y = floor((world.maxy - height) * 0.5) + 1 var/datum/space_level/level = SSmapping.add_new_zlevel(name, list(), contain_turfs = FALSE) var/datum/parsed_map/parsed = load_map( @@ -115,7 +104,7 @@ /datum/map_template/proc/load(turf/T, centered = FALSE, delete = FALSE) if(centered) - T = locate(T.x - round(width/2) , T.y - round(height/2) , T.z) + T = locate(T.x - floor(width/2) , T.y - floor(height/2) , T.z) if(!T) return if((T.x+width) - 1 > world.maxx) @@ -163,12 +152,9 @@ return /datum/map_template/proc/get_affected_turfs(turf/T, centered = FALSE) - var/turf/placement = T if(centered) - var/turf/corner = locate(placement.x - round(width/2), placement.y - round(height/2), placement.z) - if(corner) - placement = corner - return block(placement, locate(placement.x+width-1, placement.y+height-1, placement.z)) + return RECT_TURFS(floor(width / 2), floor(height / 2), T) + return CORNER_BLOCK(T, width, height) //for your ever biggening badminnery kevinz000 diff --git a/code/modules/mapping/reader.dm b/code/modules/mapping/reader.dm index 424ab22ae4ac..95e75d2d487e 100644 --- a/code/modules/mapping/reader.dm +++ b/code/modules/mapping/reader.dm @@ -355,10 +355,7 @@ // SSmapping.build_area_turfs(z_index) if(!no_changeturf) - var/list/turfs = block( - locate(bounds[MAP_MINX], bounds[MAP_MINY], bounds[MAP_MINZ]), - locate(bounds[MAP_MAXX], bounds[MAP_MAXY], bounds[MAP_MAXZ])) - for(var/turf/T as anything in turfs) + for(var/turf/T as anything in block(bounds[MAP_MINX], bounds[MAP_MINY], bounds[MAP_MINZ], bounds[MAP_MAXX], bounds[MAP_MAXY], bounds[MAP_MAXZ])) //we do this after we load everything in. if we don't, we'll have weird atmos bugs regarding atmos adjacent turfs T.AfterChange(CHANGETURF_IGNORE_AIR) @@ -612,7 +609,7 @@ // We're gonna skip all the entries above the upper x, or maxx if cropMap is set var/x_target = line_len - key_len + 1 - var/x_step_count = ROUND_UP(x_target / key_len) + var/x_step_count = ceil(x_target / key_len) var/final_x = relative_x + (x_step_count - 1) var/x_delta_with = x_upper if(crop_map) diff --git a/code/modules/mapping/space_management/space_reservation.dm b/code/modules/mapping/space_management/space_reservation.dm index 3c47ac3b5c2a..63ec6485e3f3 100644 --- a/code/modules/mapping/space_management/space_reservation.dm +++ b/code/modules/mapping/space_management/space_reservation.dm @@ -131,8 +131,7 @@ if(!final) continue passing = TRUE - for(var/I in final) - var/turf/checking = I + for(var/turf/checking as anything in final) if(!(checking.turf_flags & UNUSED_RESERVATION_TURF)) passing = FALSE break diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index d13d5aa94053..e974a93553a3 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -655,7 +655,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp usr.forceMove(pick(L)) following = null -/mob/dead/observer/proc/scan_health(mob/living/target in oview()) +/mob/dead/observer/proc/scan_health(mob/living/target in view(src.client)) set name = "Scan Health" if(!istype(target)) @@ -1191,7 +1191,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp if(!SSticker.HasRoundStarted()) var/time_remaining = SSticker.GetTimeLeft() if(time_remaining > 0) - . += "Time To Start: [round(time_remaining)]s[SSticker.delay_start ? " (DELAYED)" : ""]" + . += "Time To Start: [floor(time_remaining)]s[SSticker.delay_start ? " (DELAYED)" : ""]" else if(time_remaining == -10) . += "Time To Start: DELAYED" else diff --git a/code/modules/mob/dead/observer/orbit.dm b/code/modules/mob/dead/observer/orbit.dm index 173de5338196..d6b104398f99 100644 --- a/code/modules/mob/dead/observer/orbit.dm +++ b/code/modules/mob/dead/observer/orbit.dm @@ -110,7 +110,7 @@ if(isliving(M)) var/mob/living/player = M - serialized["health"] = Floor(player.health / player.maxHealth * 100) + serialized["health"] = floor(player.health / player.maxHealth * 100) if(isxeno(player)) var/mob/living/carbon/xenomorph/xeno = player @@ -126,7 +126,7 @@ var/obj/item/card/id/id_card = human.get_idcard() var/datum/species/human_species = human.species var/max_health = human_species.total_health != human.maxHealth ? human_species.total_health : human.maxHealth - serialized["health"] = Floor(player.health / max_health * 100) + serialized["health"] = floor(player.health / max_health * 100) serialized["job"] = id_card?.assignment ? id_card.assignment : human.job serialized["nickname"] = human.real_name diff --git a/code/modules/mob/holder.dm b/code/modules/mob/holder.dm index b2a68c997ec9..bcee5b81a100 100644 --- a/code/modules/mob/holder.dm +++ b/code/modules/mob/holder.dm @@ -34,6 +34,15 @@ for(var/mob/living/M in contents) M.show_message(message,m_type) +/obj/item/holder/get_examine_text(mob/user) + . = list() + . += "[icon2html(src, user)] That's \a [src]." + if(desc) + . += desc + if(desc_lore) + . += SPAN_NOTICE("This has an extended lore description.") + + //Mob procs and vars for scooping up /mob/living/var/holder_type @@ -48,8 +57,10 @@ return var/obj/item/holder/mob_holder = new holder_type(loc) - src.forceMove(mob_holder) - mob_holder.name = loc.name + forceMove(mob_holder) + mob_holder.name = name + mob_holder.desc = desc + mob_holder.gender = gender mob_holder.attack_hand(grabber) to_chat(grabber, "You scoop up [src].") diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 2a197dadc2b1..1462594a0b46 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -48,7 +48,7 @@ M.show_message(SPAN_DANGER("You hear something rumbling inside [src]'s stomach..."), SHOW_MESSAGE_AUDIBLE) var/obj/item/I = user.get_active_hand() if(I && I.force) - var/d = rand(round(I.force / 4), I.force) + var/d = rand(floor(I.force / 4), I.force) if(istype(src, /mob/living/carbon/human)) var/mob/living/carbon/human/H = src var/organ = H.get_limb("chest") diff --git a/code/modules/mob/living/carbon/carbon_defines.dm b/code/modules/mob/living/carbon/carbon_defines.dm index 6ff2a96b72f0..03a8abef22af 100644 --- a/code/modules/mob/living/carbon/carbon_defines.dm +++ b/code/modules/mob/living/carbon/carbon_defines.dm @@ -5,7 +5,7 @@ var/life_tick = 0 // The amount of life ticks that have processed on this mob. - var/obj/item/handcuffs/handcuffed = null //Whether or not the mob is handcuffed + var/obj/item/restraint/handcuffs/handcuffed = null //Whether or not the mob is handcuffed var/overeat_cooldown = 0 diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm index 563d0f4107e9..dcbab12c7291 100644 --- a/code/modules/mob/living/carbon/human/examine.dm +++ b/code/modules/mob/living/carbon/human/examine.dm @@ -160,6 +160,13 @@ if(wear_id) msg += "[t_He] [t_is] [wear_id.get_examine_location(src, user, WEAR_ID, t_He, t_his, t_him, t_has, t_is)].\n" + //Restraints + if(handcuffed) + msg += SPAN_ORANGE("[capitalize(t_his)] arms are restrained by [handcuffed].\n") + + if(legcuffed) + msg += SPAN_ORANGE("[capitalize(t_his)] ankles are restrained by [legcuffed].\n") + //Admin-slept if(sleeping > 8000000) msg += SPAN_HIGHDANGER("This player has been slept by staff.\n") diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 4e71b178824d..eb19593bde46 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -171,12 +171,12 @@ var/knockdown_minus_armor = min(knockdown_value * bomb_armor_mult, 1 SECONDS) var/obj/item/item1 = get_active_hand() var/obj/item/item2 = get_inactive_hand() - apply_effect(round(knockdown_minus_armor), WEAKEN) - apply_effect(round(knockdown_minus_armor), STUN) // Remove this to let people crawl after an explosion. Funny but perhaps not desirable. + apply_effect(floor(knockdown_minus_armor), WEAKEN) + apply_effect(floor(knockdown_minus_armor), STUN) // Remove this to let people crawl after an explosion. Funny but perhaps not desirable. var/knockout_value = damage * 0.1 var/knockout_minus_armor = min(knockout_value * bomb_armor_mult * 0.5, 0.5 SECONDS) // the KO time is halved from the knockdown timer. basically same stun time, you just spend less time KO'd. - apply_effect(round(knockout_minus_armor), PARALYZE) - apply_effect(round(knockout_minus_armor) * 2, DAZE) + apply_effect(floor(knockout_minus_armor), PARALYZE) + apply_effect(floor(knockout_minus_armor) * 2, DAZE) explosion_throw(severity, direction) if(item1 && isturf(item1.loc)) @@ -1272,10 +1272,18 @@ if(!H || H.w_uniform?.sensor_mode != SENSOR_MODE_LOCATION) return - if(H.z != src.z || get_dist(src,H) < 1 || src == H) + + var/atom/tracking_atom = H + if(tracking_atom.z != src.z && SSinterior.in_interior(tracking_atom)) + var/datum/interior/interior = SSinterior.get_interior_by_coords(tracking_atom.x, tracking_atom.y, tracking_atom.z) + var/atom/exterior = interior.exterior + if(exterior) + tracking_atom = exterior + + if(tracking_atom.z != src.z || get_dist(src, tracking_atom) < 1 || src == tracking_atom) hud_used.locate_leader.icon_state = "trackondirect[tracking_suffix]" else - hud_used.locate_leader.setDir(Get_Compass_Dir(src,H)) + hud_used.locate_leader.setDir(Get_Compass_Dir(src, tracking_atom)) hud_used.locate_leader.icon_state = "trackon[tracking_suffix]" /mob/living/carbon/proc/locate_nearest_nuke() @@ -1364,30 +1372,29 @@ remove_splints() // target = person whose splints are being removed -// source = person removing the splints -/mob/living/carbon/human/proc/remove_splints(mob/living/carbon/human/source) - var/mob/living/carbon/human/HT = src - var/mob/living/carbon/human/HS = source - - if(!istype(HS)) - HS = src - if(!istype(HS) || !istype(HT)) +// user = person removing the splints +/mob/living/carbon/human/proc/remove_splints(mob/living/carbon/human/user) + var/mob/living/carbon/human/target = src + + if(!istype(user)) + user = src + if(!istype(user) || !istype(target)) return var/cur_hand = "l_hand" - if(!HS.hand) + if(!user.hand) cur_hand = "r_hand" - if(!HS.action_busy) + if(!user.action_busy) var/list/obj/limb/to_splint = list() var/same_arm_side = FALSE // If you are trying to splint yourself, need opposite hand to splint an arm/hand - if(HS.get_limb(cur_hand).status & LIMB_DESTROYED) - to_chat(HS, SPAN_WARNING("You cannot remove splints without a hand.")) + if(user.get_limb(cur_hand).status & LIMB_DESTROYED) + to_chat(user, SPAN_WARNING("You cannot remove splints without a hand.")) return for(var/bodypart in list("l_leg","r_leg","l_arm","r_arm","r_hand","l_hand","r_foot","l_foot","chest","head","groin")) - var/obj/limb/l = HT.get_limb(bodypart) + var/obj/limb/l = target.get_limb(bodypart) if(l && (l.status & LIMB_SPLINTED)) - if(HS == HT) + if(user == target) if((bodypart in list("l_arm", "l_hand")) && (cur_hand == "l_hand")) same_arm_side = TRUE continue @@ -1398,43 +1405,45 @@ var/msg = "" // Have to use this because there are issues with the to_chat macros and text macros and quotation marks if(to_splint.len) - if(do_after(HS, HUMAN_STRIP_DELAY * HS.get_skill_duration_multiplier(SKILL_MEDICAL), INTERRUPT_ALL, BUSY_ICON_GENERIC, HT, INTERRUPT_MOVED, BUSY_ICON_GENERIC)) + if(do_after(user, HUMAN_STRIP_DELAY * user.get_skill_duration_multiplier(SKILL_MEDICAL), INTERRUPT_ALL, BUSY_ICON_GENERIC, target, INTERRUPT_MOVED, BUSY_ICON_GENERIC)) var/can_reach_splints = TRUE var/amount_removed = 0 if(wear_suit && istype(wear_suit,/obj/item/clothing/suit/space)) - var/obj/item/clothing/suit/space/suit = HT.wear_suit + var/obj/item/clothing/suit/space/suit = target.wear_suit if(suit.supporting_limbs && suit.supporting_limbs.len) - msg = "[HS == HT ? "your":"\proper [HT]'s"]" - to_chat(HS, SPAN_WARNING("You cannot remove the splints, [msg] [suit] is supporting some of the breaks.")) + msg = "[user == target ? "your":"\proper [target]'s"]" + to_chat(user, SPAN_WARNING("You cannot remove the splints, [msg] [suit] is supporting some of the breaks.")) can_reach_splints = FALSE if(can_reach_splints) - var/obj/item/stack/W = new /obj/item/stack/medical/splint(HS.loc) - W.amount = 0 //we checked that we have at least one bodypart splinted, so we can create it no prob. Also we need amount to be 0 - W.add_fingerprint(HS) - for(var/obj/limb/l in to_splint) + var/obj/item/stack/medical/splint/new_splint = new(user.loc) + new_splint.amount = 0 //we checked that we have at least one bodypart splinted, so we can create it no prob. Also we need amount to be 0 + new_splint.add_fingerprint(user) + for(var/obj/limb/cur_limb in to_splint) amount_removed++ - l.status &= ~LIMB_SPLINTED + cur_limb.status &= ~LIMB_SPLINTED pain.recalculate_pain() - if(l.status & LIMB_SPLINTED_INDESTRUCTIBLE) - new /obj/item/stack/medical/splint/nano(HS.loc, 1) - l.status &= ~LIMB_SPLINTED_INDESTRUCTIBLE - else if(!W.add(1)) - W = new /obj/item/stack/medical/splint(HS.loc)//old stack is dropped, time for new one - W.amount = 0 - W.add_fingerprint(HS) - W.add(1) - msg = "[HS == HT ? "their own":"\proper [HT]'s"]" - HT.visible_message(SPAN_NOTICE("[HS] removes [msg] [amount_removed>1 ? "splints":"splint"]."), \ + if(cur_limb.status & LIMB_SPLINTED_INDESTRUCTIBLE) + new /obj/item/stack/medical/splint/nano(user.loc, 1) + cur_limb.status &= ~LIMB_SPLINTED_INDESTRUCTIBLE + else if(!new_splint.add(1)) + new_splint = new(user.loc)//old stack is dropped, time for new one + new_splint.amount = 0 + new_splint.add_fingerprint(user) + new_splint.add(1) + if(new_splint.amount == 0) + qdel(new_splint) //we only removed nano splints + msg = "[user == target ? "their own":"\proper [target]'s"]" + target.visible_message(SPAN_NOTICE("[user] removes [msg] [amount_removed>1 ? "splints":"splint"]."), \ SPAN_NOTICE("Your [amount_removed>1 ? "splints are":"splint is"] removed.")) - HT.update_med_icon() + target.update_med_icon() else - msg = "[HS == HT ? "your":"\proper [HT]'s"]" - to_chat(HS, SPAN_NOTICE("You stop trying to remove [msg] splints.")) + msg = "[user == target ? "your":"\proper [target]'s"]" + to_chat(user, SPAN_NOTICE("You stop trying to remove [msg] splints.")) else if(same_arm_side) - to_chat(HS, SPAN_WARNING("You need to use the opposite hand to remove the splints on your arm and hand!")) + to_chat(user, SPAN_WARNING("You need to use the opposite hand to remove the splints on your arm and hand!")) else - to_chat(HS, SPAN_WARNING("There are no splints to remove.")) + to_chat(user, SPAN_WARNING("There are no splints to remove.")) /mob/living/carbon/human/yautja/Initialize(mapload) . = ..(mapload, new_species = "Yautja") @@ -1577,7 +1586,7 @@ QDEL_NULL(legcuffed) handcuff_update() else - var/displaytime = max(1, round(breakouttime / 600)) //Minutes + var/displaytime = max(1, floor(breakouttime / 600)) //Minutes to_chat(src, SPAN_WARNING("You attempt to remove [restraint]. (This will take around [displaytime] minute(s) and you need to stand still)")) for(var/mob/O in viewers(src)) O.show_message(SPAN_DANGER("[usr] attempts to remove [restraint]!"), 1) @@ -1687,3 +1696,11 @@ INVOKE_ASYNC(target, TYPE_PROC_REF(/mob/living/carbon/human, regenerate_icons)) INVOKE_ASYNC(target, TYPE_PROC_REF(/mob/living/carbon/human, update_body), 1, 0) INVOKE_ASYNC(target, TYPE_PROC_REF(/mob/living/carbon/human, update_hair)) + +/mob/living/carbon/human/point_to_atom(atom/A, turf/T) + if(isitem(A)) + var/obj/item/item = A + if(item == get_active_hand() || item == get_inactive_hand()) + item.showoff(src) + return TRUE + return ..() diff --git a/code/modules/mob/living/carbon/human/human_abilities.dm b/code/modules/mob/living/carbon/human/human_abilities.dm index a568e93df5c0..76ebbed06de6 100644 --- a/code/modules/mob/living/carbon/human/human_abilities.dm +++ b/code/modules/mob/living/carbon/human/human_abilities.dm @@ -250,7 +250,7 @@ CULT to_send_to = list(H) message_admins("[key_name_admin(H)] called a tech droppod down at [get_area(assigned_droppod)].", T.x, T.y, T.z) for(var/M in to_send_to) - to_chat(M, SPAN_BLUE("SUPPLY DROP REQUEST: Droppod requested at LONGITUDE: [obfuscate_x(T.x)], LATITUDE: [obfuscate_y(T.y)]. ETA [Floor(land_time*0.1)] seconds.")) + to_chat(M, SPAN_BLUE("SUPPLY DROP REQUEST: Droppod requested at LONGITUDE: [obfuscate_x(T.x)], LATITUDE: [obfuscate_y(T.y)]. ETA [floor(land_time*0.1)] seconds.")) RegisterSignal(assigned_droppod, COMSIG_PARENT_QDELETING, PROC_REF(handle_droppod_deleted)) */ @@ -605,3 +605,26 @@ CULT var/mob/living/carbon/human/human_user = owner SEND_SIGNAL(human_user, COMSIG_MOB_MG_EXIT) + +/datum/action/human_action/toggle_arc_antenna + name = "Toggle Sensor Antenna" + action_icon_state = "recoil_compensation" + +/datum/action/human_action/toggle_arc_antenna/give_to(mob/user) + . = ..() + RegisterSignal(user, COMSIG_MOB_RESET_VIEW, PROC_REF(remove_from)) + +/datum/action/human_action/toggle_arc_antenna/remove_from(mob/user) + . = ..() + UnregisterSignal(user, COMSIG_MOB_RESET_VIEW) + +/datum/action/human_action/toggle_arc_antenna/action_activate() + if(!can_use_action()) + return + + var/mob/living/carbon/human/human_user = owner + if(istype(human_user.buckled, /obj/structure/bed/chair/comfy/vehicle)) + var/obj/structure/bed/chair/comfy/vehicle/vehicle_chair = human_user.buckled + if(istype(vehicle_chair.vehicle, /obj/vehicle/multitile/arc)) + var/obj/vehicle/multitile/arc/vehicle = vehicle_chair.vehicle + vehicle.toggle_antenna(human_user) diff --git a/code/modules/mob/living/carbon/human/human_damage.dm b/code/modules/mob/living/carbon/human/human_damage.dm index 2a03b4f0abff..49e490a33507 100644 --- a/code/modules/mob/living/carbon/human/human_damage.dm +++ b/code/modules/mob/living/carbon/human/human_damage.dm @@ -409,7 +409,7 @@ This function restores all limbs. permanent_kill = FALSE, mob/firer = null, force = FALSE ) if(protection_aura && damage > 0) - damage = round(damage * ((ORDER_HOLD_CALC_LEVEL - protection_aura) / ORDER_HOLD_CALC_LEVEL)) + damage = floor(damage * ((ORDER_HOLD_CALC_LEVEL - protection_aura) / ORDER_HOLD_CALC_LEVEL)) //Handle other types of damage if(damage < 0 || (damagetype != BRUTE) && (damagetype != BURN)) diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index 21af882376eb..930e31a7770f 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -115,7 +115,7 @@ Contains most of the procs that are called when a mob is attacked by something // We cannot return FALSE on fail here, because we haven't checked r_hand yet. Dual-wielding shields perhaps! var/obj/item/weapon/I = l_hand - if(I.IsShield() && !istype(I, /obj/item/weapon/shield) && (prob(50 - round(damage / 3)))) // 'other' shields, like predweapons. Make sure that item/weapon/shield does not apply here, no double-rolls. + if(I.IsShield() && !istype(I, /obj/item/weapon/shield) && (prob(50 - floor(damage / 3)))) // 'other' shields, like predweapons. Make sure that item/weapon/shield does not apply here, no double-rolls. visible_message(SPAN_DANGER("[src] blocks [attack_text] with the [l_hand.name]!"), null, null, 5) return TRUE @@ -139,7 +139,7 @@ Contains most of the procs that are called when a mob is attacked by something return TRUE var/obj/item/weapon/I = r_hand - if(I.IsShield() && !istype(I, /obj/item/weapon/shield) && (prob(50 - round(damage / 3)))) // other shields. Don't doublecheck activable here. + if(I.IsShield() && !istype(I, /obj/item/weapon/shield) && (prob(50 - floor(damage / 3)))) // other shields. Don't doublecheck activable here. visible_message(SPAN_DANGER("[src] blocks [attack_text] with the [r_hand.name]!"), null, null, 5) return TRUE diff --git a/code/modules/mob/living/carbon/human/human_movement.dm b/code/modules/mob/living/carbon/human/human_movement.dm index 1803e289114e..7183d6c802b9 100644 --- a/code/modules/mob/living/carbon/human/human_movement.dm +++ b/code/modules/mob/living/carbon/human/human_movement.dm @@ -138,7 +138,7 @@ if (!r_hand) prob_slip -= 2 else if(r_hand.w_class <= SIZE_SMALL) prob_slip-- - prob_slip = round(prob_slip) + prob_slip = floor(prob_slip) return(prob_slip) /// Updates [TRAIT_FLOORED] based on whether the mob has appropriate limbs to stand or not diff --git a/code/modules/mob/living/carbon/human/life/handle_pulse.dm b/code/modules/mob/living/carbon/human/life/handle_pulse.dm index 38a02a048b5c..11c07e253fdd 100644 --- a/code/modules/mob/living/carbon/human/life/handle_pulse.dm +++ b/code/modules/mob/living/carbon/human/life/handle_pulse.dm @@ -8,7 +8,7 @@ if(stat == DEAD || status_flags & FAKEDEATH) return PULSE_NONE //That's it, you're dead, nothing can influence your pulse - if(round(blood_volume) <= BLOOD_VOLUME_BAD) //How much blood do we have + if(floor(blood_volume) <= BLOOD_VOLUME_BAD) //How much blood do we have return PULSE_THREADY //not enough :( return PULSE_NORM diff --git a/code/modules/mob/living/carbon/human/powers/issue_order.dm b/code/modules/mob/living/carbon/human/powers/issue_order.dm index 1becf805c027..5863bf2ea28f 100644 --- a/code/modules/mob/living/carbon/human/powers/issue_order.dm +++ b/code/modules/mob/living/carbon/human/powers/issue_order.dm @@ -22,7 +22,7 @@ if(order == "help") to_chat(src, SPAN_NOTICE("
Orders give a buff to nearby soldiers for a short period of time, followed by a cooldown, as follows:
Move - Increased mobility and chance to dodge projectiles.
Hold - Increased resistance to pain and combat wounds.
Focus - Increased gun accuracy and effective range.
")) return - if(order == "cancel") + if(!order || order == "cancel") return if(!command_aura_available) diff --git a/code/modules/mob/living/carbon/human/say.dm b/code/modules/mob/living/carbon/human/say.dm index e8702e56c05f..230e178378ae 100644 --- a/code/modules/mob/living/carbon/human/say.dm +++ b/code/modules/mob/living/carbon/human/say.dm @@ -26,7 +26,7 @@ else headset.last_multi_broadcast = world.time if(multibroadcast_cooldown) - .["fail_with"] = "You've used the multi-broadcast system too recently, wait [round(multibroadcast_cooldown / 10)] more seconds." + .["fail_with"] = "You've used the multi-broadcast system too recently, wait [floor(multibroadcast_cooldown / 10)] more seconds." return if(length(message) >= 2 && (message[1] == "." || message[1] == ":" || message[1] == "#")) diff --git a/code/modules/mob/living/carbon/human/species/human.dm b/code/modules/mob/living/carbon/human/species/human.dm index 684bfa672b19..d02a2c3be5bb 100644 --- a/code/modules/mob/living/carbon/human/species/human.dm +++ b/code/modules/mob/living/carbon/human/species/human.dm @@ -39,7 +39,7 @@ /// The limit of the oxyloss gained, ignoring oxyloss from the switch statement var/maximum_oxyloss = clamp((100 - blood_percentage) / 2, oxyloss, 100) if(oxyloss < maximum_oxyloss) - oxyloss += round(max(additional_oxyloss, 0)) + oxyloss += floor(max(additional_oxyloss, 0)) switch(b_volume) if(BLOOD_VOLUME_OKAY to BLOOD_VOLUME_SAFE) diff --git a/code/modules/mob/living/carbon/xenomorph/Evolution.dm b/code/modules/mob/living/carbon/xenomorph/Evolution.dm index b6576b764b51..cd402e2d6fbb 100644 --- a/code/modules/mob/living/carbon/xenomorph/Evolution.dm +++ b/code/modules/mob/living/carbon/xenomorph/Evolution.dm @@ -40,7 +40,7 @@ var/datum/caste_datum/caste_datum = GLOB.xeno_datum_list[castepick] if(caste_datum && caste_datum.minimum_evolve_time > ROUND_TIME) - to_chat(src, SPAN_WARNING("The Hive cannot support this caste yet! ([round((caste_datum.minimum_evolve_time - ROUND_TIME) / 10)] seconds remaining)")) + to_chat(src, SPAN_WARNING("The Hive cannot support this caste yet! ([floor((caste_datum.minimum_evolve_time - ROUND_TIME) / 10)] seconds remaining)")) return if(!evolve_checks()) @@ -391,7 +391,7 @@ used_tier_3_slots -= min(slots_used, slots_free) var/burrowed_factor = min(hive.stored_larva, sqrt(4*hive.stored_larva)) - var/totalXenos = round(burrowed_factor) + var/totalXenos = floor(burrowed_factor) for(var/mob/living/carbon/xenomorph/xeno as anything in hive.totalXenos) if(xeno.counts_for_slots) totalXenos++ diff --git a/code/modules/mob/living/carbon/xenomorph/Facehuggers.dm b/code/modules/mob/living/carbon/xenomorph/Facehuggers.dm index bf88acd2b790..9a87f10d74a3 100644 --- a/code/modules/mob/living/carbon/xenomorph/Facehuggers.dm +++ b/code/modules/mob/living/carbon/xenomorph/Facehuggers.dm @@ -281,7 +281,7 @@ if(isturf(human.loc)) forceMove(human.loc)//Just checkin - if(!human.handle_hugger_attachment(src)) + if(!human.handle_hugger_attachment(src, hugger)) return FALSE attached = TRUE @@ -491,15 +491,14 @@ /** * Human hugger handling */ - -/mob/living/carbon/human/proc/handle_hugger_attachment(obj/item/clothing/mask/facehugger/hugger) +/mob/living/carbon/human/proc/handle_hugger_attachment(obj/item/clothing/mask/facehugger/hugger, mob/living/carbon/xenomorph/facehugger/mob_hugger) var/can_infect = TRUE if(!has_limb("head")) hugger.visible_message(SPAN_WARNING("[hugger] looks for a face to hug on [src], but finds none!")) hugger.go_idle() return FALSE - if(species && !species.handle_hugger_attachment(src, hugger)) + if(species && !species.handle_hugger_attachment(src, hugger, mob_hugger)) return FALSE if(head && !(head.flags_item & NODROP)) @@ -546,10 +545,10 @@ return can_infect -/datum/species/proc/handle_hugger_attachment(mob/living/carbon/human/target, obj/item/clothing/mask/facehugger/hugger) +/datum/species/proc/handle_hugger_attachment(mob/living/carbon/human/target, obj/item/clothing/mask/facehugger/hugger, mob/living/carbon/xenomorph/facehugger/mob_hugger) return TRUE -/datum/species/yautja/handle_hugger_attachment(mob/living/carbon/human/target, obj/item/clothing/mask/facehugger/hugger) +/datum/species/yautja/handle_hugger_attachment(mob/living/carbon/human/target, obj/item/clothing/mask/facehugger/hugger, mob/living/carbon/xenomorph/facehugger/mob_hugger) var/catch_chance = 50 if(target.dir == GLOB.reverse_dir[hugger.dir]) catch_chance += 20 @@ -563,7 +562,10 @@ if(!target.stat && target.dir != hugger.dir && prob(catch_chance)) //Not facing away target.visible_message(SPAN_NOTICE("[target] snatches [hugger] out of the air and squashes it!")) - hugger.die() + if(mob_hugger) + mob_hugger.death(create_cause_data("squished")) + else + hugger.die() return FALSE return TRUE diff --git a/code/modules/mob/living/carbon/xenomorph/XenoOverwatch.dm b/code/modules/mob/living/carbon/xenomorph/XenoOverwatch.dm index 0b0efbc0f34f..0da2b61142e8 100644 --- a/code/modules/mob/living/carbon/xenomorph/XenoOverwatch.dm +++ b/code/modules/mob/living/carbon/xenomorph/XenoOverwatch.dm @@ -93,6 +93,10 @@ to_chat(src, SPAN_XENOWARNING("Our sister's psychic connection is cut off!")) return + if(HAS_TRAIT(src, TRAIT_ABILITY_BURROWED)) + to_chat(src, SPAN_XENOWARNING("We cannot do this in our current state!")) + return + if(observed_xeno && targetXeno && observed_xeno == targetXeno) if(istype(targetXeno, /obj/effect/alien/resin/marker)) to_chat(src, SPAN_XENOWARNING("We are already watching that mark!")) diff --git a/code/modules/mob/living/carbon/xenomorph/XenoProcs.dm b/code/modules/mob/living/carbon/xenomorph/XenoProcs.dm index a09380db7664..31f49887b5b3 100644 --- a/code/modules/mob/living/carbon/xenomorph/XenoProcs.dm +++ b/code/modules/mob/living/carbon/xenomorph/XenoProcs.dm @@ -45,10 +45,10 @@ . += "" - . += "Health: [round(health)]/[round(maxHealth)]" - . += "Armor: [round(0.01*armor_integrity*armor_deflection)+(armor_deflection_buff-armor_deflection_debuff)]/[round(armor_deflection)]" - . += "Plasma: [round(plasma_stored)]/[round(plasma_max)]" - . += "Slash Damage: [round((melee_damage_lower+melee_damage_upper)/2)]" + . += "Health: [floor(health)]/[floor(maxHealth)]" + . += "Armor: [floor(0.01*armor_integrity*armor_deflection)+(armor_deflection_buff-armor_deflection_debuff)]/[floor(armor_deflection)]" + . += "Plasma: [floor(plasma_stored)]/[floor(plasma_max)]" + . += "Slash Damage: [floor((melee_damage_lower+melee_damage_upper)/2)]" var/shieldtotal = 0 for (var/datum/xeno_shield/XS in xeno_shields) @@ -67,7 +67,7 @@ . += "" - var/stored_evolution = round(evolution_stored) + var/stored_evolution = floor(evolution_stored) var/evolve_progress if(caste && caste.evolution_allowed) diff --git a/code/modules/mob/living/carbon/xenomorph/Xenomorph.dm b/code/modules/mob/living/carbon/xenomorph/Xenomorph.dm index 16cfeca8f87e..adfb65169c88 100644 --- a/code/modules/mob/living/carbon/xenomorph/Xenomorph.dm +++ b/code/modules/mob/living/carbon/xenomorph/Xenomorph.dm @@ -857,7 +857,7 @@ if(health < maxHealth) currentHealthRatio = health / maxHealth maxHealth = new_max_health - health = round(maxHealth * currentHealthRatio + 0.5)//Restore our health ratio, so if we're full, we continue to be full, etc. Rounding up (hence the +0.5) + health = floor(maxHealth * currentHealthRatio + 0.5)//Restore our health ratio, so if we're full, we continue to be full, etc. Rounding up (hence the +0.5) if(health > maxHealth) health = maxHealth @@ -871,7 +871,7 @@ return var/plasma_ratio = plasma_stored / plasma_max plasma_max = new_plasma_max - plasma_stored = round(plasma_max * plasma_ratio + 0.5) //Restore our plasma ratio, so if we're full, we continue to be full, etc. Rounding up (hence the +0.5) + plasma_stored = floor(plasma_max * plasma_ratio + 0.5) //Restore our plasma ratio, so if we're full, we continue to be full, etc. Rounding up (hence the +0.5) if(plasma_stored > plasma_max) plasma_stored = plasma_max @@ -884,7 +884,7 @@ /mob/living/carbon/xenomorph/proc/recalculate_armor() //We are calculating it in a roundabout way not to give anyone 100% armor deflection, so we're dividing the differences - armor_deflection = armor_modifier + round(100 - (100 - caste.armor_deflection)) + armor_deflection = armor_modifier + floor(100 - (100 - caste.armor_deflection)) armor_explosive_buff = explosivearmor_modifier /mob/living/carbon/xenomorph/proc/recalculate_damage() @@ -991,7 +991,7 @@ next_move = world.time + 10 SECONDS last_special = world.time + 1 SECONDS - var/displaytime = max(1, round(breakouttime / 600)) //Minutes + var/displaytime = max(1, floor(breakouttime / 600)) //Minutes visible_message(SPAN_DANGER("[src] attempts to remove [legcuffed]!"), SPAN_WARNING("We attempt to remove [legcuffed]. (This will take around [displaytime] minute\s and we must stand still)")) if(!do_after(src, breakouttime, INTERRUPT_NO_NEEDHAND ^ INTERRUPT_RESIST, BUSY_ICON_HOSTILE)) diff --git a/code/modules/mob/living/carbon/xenomorph/abilities/ability_helper_procs.dm b/code/modules/mob/living/carbon/xenomorph/abilities/ability_helper_procs.dm index 9bfc98a7091d..0990df678f61 100644 --- a/code/modules/mob/living/carbon/xenomorph/abilities/ability_helper_procs.dm +++ b/code/modules/mob/living/carbon/xenomorph/abilities/ability_helper_procs.dm @@ -195,6 +195,10 @@ client.pixel_x = -viewoffset client.pixel_y = 0 + for (var/datum/action/xeno_action/onclick/toggle_long_range/action in actions) + action.on_zoom_in() + return + /mob/living/carbon/xenomorph/proc/zoom_out() if(!client) return diff --git a/code/modules/mob/living/carbon/xenomorph/abilities/burrower/burrower_powers.dm b/code/modules/mob/living/carbon/xenomorph/abilities/burrower/burrower_powers.dm index f854272365d0..ee084e77a5a0 100644 --- a/code/modules/mob/living/carbon/xenomorph/abilities/burrower/burrower_powers.dm +++ b/code/modules/mob/living/carbon/xenomorph/abilities/burrower/burrower_powers.dm @@ -126,7 +126,7 @@ return var/area/A = get_area(T) - if(A.flags_area & AREA_NOTUNNEL) + if(A.flags_area & AREA_NOTUNNEL || get_dist(src, T) > 15) to_chat(src, SPAN_XENOWARNING("There's no way to tunnel over there.")) return diff --git a/code/modules/mob/living/carbon/xenomorph/abilities/facehugger/facehugger_abilities.dm b/code/modules/mob/living/carbon/xenomorph/abilities/facehugger/facehugger_abilities.dm index ee1fed3094a7..d60d292cba25 100644 --- a/code/modules/mob/living/carbon/xenomorph/abilities/facehugger/facehugger_abilities.dm +++ b/code/modules/mob/living/carbon/xenomorph/abilities/facehugger/facehugger_abilities.dm @@ -17,3 +17,8 @@ freeze_time = 5 freeze_play_sound = FALSE can_be_shield_blocked = TRUE + +/datum/action/xeno_action/onclick/toggle_long_range/facehugger + handles_movement = FALSE + should_delay = FALSE + ability_primacy = XENO_PRIMARY_ACTION_3 diff --git a/code/modules/mob/living/carbon/xenomorph/abilities/facehugger/facehugger_powers.dm b/code/modules/mob/living/carbon/xenomorph/abilities/facehugger/facehugger_powers.dm index 054762b3c7d4..6eef21c6d5af 100644 --- a/code/modules/mob/living/carbon/xenomorph/abilities/facehugger/facehugger_powers.dm +++ b/code/modules/mob/living/carbon/xenomorph/abilities/facehugger/facehugger_powers.dm @@ -25,4 +25,22 @@ if(current_airlock.density) //if its CLOSED YOU'RE SCUTTLING AND CANNOT POUNCE!!! to_chat(owner, SPAN_WARNING("We cannot do that while squeezing and scuttling!")) return FALSE + + if(HAS_TRAIT(owner, TRAIT_IMMOBILIZED)) + to_chat(owner, SPAN_WARNING("We cannot do that while immobilized!")) + return FALSE + return ..() + +/datum/action/xeno_action/onclick/toggle_long_range/facehugger/on_zoom_out() + . = ..() + + var/mob/living/carbon/xenomorph/facehugger/facehugger = owner + REMOVE_TRAIT(facehugger, TRAIT_IMMOBILIZED, TRAIT_SOURCE_ABILITY("Long-Range Sight")) + +/datum/action/xeno_action/onclick/toggle_long_range/facehugger/on_zoom_in() + . = ..() + + var/mob/living/carbon/xenomorph/facehugger/facehugger = owner + ADD_TRAIT(facehugger, TRAIT_IMMOBILIZED, TRAIT_SOURCE_ABILITY("Long-Range Sight")) + diff --git a/code/modules/mob/living/carbon/xenomorph/abilities/general_abilities.dm b/code/modules/mob/living/carbon/xenomorph/abilities/general_abilities.dm index f36e23394eef..39b05b964648 100644 --- a/code/modules/mob/living/carbon/xenomorph/abilities/general_abilities.dm +++ b/code/modules/mob/living/carbon/xenomorph/abilities/general_abilities.dm @@ -329,6 +329,9 @@ xeno.recalculate_speed() button.icon_state = "template" +/datum/action/xeno_action/onclick/toggle_long_range/proc/on_zoom_in() + return + /datum/action/xeno_action/onclick/toggle_long_range/proc/handle_mob_move_or_look(mob/living/carbon/xenomorph/xeno, actually_moving, direction, specific_direction) SIGNAL_HANDLER movement_buffer-- diff --git a/code/modules/mob/living/carbon/xenomorph/abilities/queen/queen_powers.dm b/code/modules/mob/living/carbon/xenomorph/abilities/queen/queen_powers.dm index 38e643e0d25c..836854d6f956 100644 --- a/code/modules/mob/living/carbon/xenomorph/abilities/queen/queen_powers.dm +++ b/code/modules/mob/living/carbon/xenomorph/abilities/queen/queen_powers.dm @@ -305,7 +305,7 @@ return if(world.time < SSticker.mode.round_time_lobby + SHUTTLE_TIME_LOCK) - to_chat(usr, SPAN_XENOWARNING("You must give some time for larva to spawn before sacrificing them. Please wait another [round((SSticker.mode.round_time_lobby + SHUTTLE_TIME_LOCK - world.time) / 600)] minutes.")) + to_chat(usr, SPAN_XENOWARNING("You must give some time for larva to spawn before sacrificing them. Please wait another [floor((SSticker.mode.round_time_lobby + SHUTTLE_TIME_LOCK - world.time) / 600)] minutes.")) return var/choice = tgui_input_list(user_xeno, "Choose a xenomorph to give evolution points for a burrowed larva:", "Give Evolution Points", user_xeno.hive.totalXenos, theme="hive_status") @@ -819,7 +819,7 @@ return var/list/alerts = list() - for(var/i in RANGE_TURFS(Floor(width/2), T)) + for(var/i as anything in RANGE_TURFS(floor(width/2), T)) alerts += new /obj/effect/warning/alien(i) if(!do_after(Q, time_taken, INTERRUPT_NO_NEEDHAND, BUSY_ICON_FRIENDLY)) @@ -833,7 +833,7 @@ if(!check_and_use_plasma_owner()) return - var/turf/new_turf = locate(max(T.x - Floor(width/2), 1), max(T.y - Floor(height/2), 1), T.z) + var/turf/new_turf = locate(max(T.x - floor(width/2), 1), max(T.y - floor(height/2), 1), T.z) to_chat(Q, SPAN_XENONOTICE("You raise a blockade!")) var/obj/effect/alien/resin/resin_pillar/RP = new pillar_type(new_turf) RP.start_decay(brittle_time, decay_time) diff --git a/code/modules/mob/living/carbon/xenomorph/attack_alien.dm b/code/modules/mob/living/carbon/xenomorph/attack_alien.dm index 45f5ccb5dec1..2576d0bc599b 100644 --- a/code/modules/mob/living/carbon/xenomorph/attack_alien.dm +++ b/code/modules/mob/living/carbon/xenomorph/attack_alien.dm @@ -107,7 +107,7 @@ knock_chance += 2 * attacking_xeno.frenzy_aura if(attacking_xeno.caste && attacking_xeno.caste.is_intelligent) knock_chance += 2 - knock_chance += min(round(damage * 0.25), 10) //Maximum of 15% chance. + knock_chance += min(floor(damage * 0.25), 10) //Maximum of 15% chance. if(prob(knock_chance)) playsound(loc, "alien_claw_metal", 25, 1) attacking_xeno.visible_message(SPAN_DANGER("[attacking_xeno] smashes off [src]'s [wear_mask.name]!"), \ @@ -925,7 +925,7 @@ to_chat(M, SPAN_WARNING("Our claws aren't sharp enough to damage [src].")) return XENO_NO_DELAY_ACTION M.animation_attack_on(src) - health -= round(rand(M.melee_damage_lower, M.melee_damage_upper) * 0.5) + health -= floor(rand(M.melee_damage_lower, M.melee_damage_upper) * 0.5) if(health <= 0) M.visible_message(SPAN_DANGER("[M] smashes [src] apart!"), \ SPAN_DANGER("We slice [src] apart!"), null, 5, CHAT_TYPE_XENO_COMBAT) diff --git a/code/modules/mob/living/carbon/xenomorph/castes/Carrier.dm b/code/modules/mob/living/carbon/xenomorph/castes/Carrier.dm index d290b917e945..3b45abfc60d9 100644 --- a/code/modules/mob/living/carbon/xenomorph/castes/Carrier.dm +++ b/code/modules/mob/living/carbon/xenomorph/castes/Carrier.dm @@ -108,7 +108,7 @@ hugger_image_index.Cut() return - update_clinger_maths(round(( huggers_cur / huggers_max ) * 3.999) + 1) + update_clinger_maths(floor(( huggers_cur / huggers_max ) * 3.999) + 1) for(var/i in hugger_image_index) if(stat == DEAD) diff --git a/code/modules/mob/living/carbon/xenomorph/castes/Queen.dm b/code/modules/mob/living/carbon/xenomorph/castes/Queen.dm index f5207e6abf30..8c3fad8d0af9 100644 --- a/code/modules/mob/living/carbon/xenomorph/castes/Queen.dm +++ b/code/modules/mob/living/carbon/xenomorph/castes/Queen.dm @@ -943,3 +943,11 @@ /mob/living/carbon/xenomorph/queen/alter_ghost(mob/dead/observer/ghost) ghost.icon = queen_standing_icon return ..() + +/mob/living/carbon/xenomorph/queen/point_to_atom(atom/target_atom, turf/target_turf) + recently_pointed_to = world.time + 1 SECONDS + + var/obj/effect/overlay/temp/point/big/greyscale/point = new(target_turf, src, target_atom) + point.color = "#a800a8" + + visible_message("[src] points to [target_atom]", null, null, 5) diff --git a/code/modules/mob/living/carbon/xenomorph/castes/Sentinel.dm b/code/modules/mob/living/carbon/xenomorph/castes/Sentinel.dm index 2e53f97e297b..d1ef02586b68 100644 --- a/code/modules/mob/living/carbon/xenomorph/castes/Sentinel.dm +++ b/code/modules/mob/living/carbon/xenomorph/castes/Sentinel.dm @@ -89,7 +89,7 @@ if (next_slash_buffed) to_chat(bound_xeno, SPAN_XENOHIGHDANGER("We add neurotoxin into our attack, [carbon_target] is about to fall over paralyzed!")) to_chat(carbon_target, SPAN_XENOHIGHDANGER("You feel like you're about to fall over, as [bound_xeno] slashes you with its neurotoxin coated claws!")) - carbon_target.sway_jitter(times = 3, steps = round(NEURO_TOUCH_DELAY/3)) + carbon_target.sway_jitter(times = 3, steps = floor(NEURO_TOUCH_DELAY/3)) carbon_target.apply_effect(4, DAZE) addtimer(CALLBACK(src, PROC_REF(paralyzing_slash), carbon_target), NEURO_TOUCH_DELAY) next_slash_buffed = FALSE diff --git a/code/modules/mob/living/carbon/xenomorph/damage_procs.dm b/code/modules/mob/living/carbon/xenomorph/damage_procs.dm index f399dbcb59cd..c6eb8be5715e 100644 --- a/code/modules/mob/living/carbon/xenomorph/damage_procs.dm +++ b/code/modules/mob/living/carbon/xenomorph/damage_procs.dm @@ -228,7 +228,7 @@ if(!caste) return sleep(XENO_ARMOR_BREAK_PASS_TIME) if(warding_aura && armor_break_to_apply > 0) //Damage to armor reduction - armor_break_to_apply = round(armor_break_to_apply * ((100 - (warding_aura * 15)) / 100)) + armor_break_to_apply = floor(armor_break_to_apply * ((100 - (warding_aura * 15)) / 100)) if(caste) armor_integrity -= armor_break_to_apply if(armor_integrity < 0) diff --git a/code/modules/mob/living/carbon/xenomorph/death.dm b/code/modules/mob/living/carbon/xenomorph/death.dm index d6a9dd01f3cc..82b9291dc555 100644 --- a/code/modules/mob/living/carbon/xenomorph/death.dm +++ b/code/modules/mob/living/carbon/xenomorph/death.dm @@ -36,7 +36,7 @@ XQ.dismount_ovipositor(TRUE) if(GLOB.hive_datum[hivenumber].stored_larva) - GLOB.hive_datum[hivenumber].stored_larva = round(GLOB.hive_datum[hivenumber].stored_larva * 0.5) //Lose half on dead queen + GLOB.hive_datum[hivenumber].stored_larva = floor(GLOB.hive_datum[hivenumber].stored_larva * 0.5) //Lose half on dead queen var/list/players_with_xeno_pref = get_alien_candidates(GLOB.hive_datum[hivenumber]) if(players_with_xeno_pref && istype(GLOB.hive_datum[hivenumber].hive_location, /obj/effect/alien/resin/special/pylon/core)) diff --git a/code/modules/mob/living/carbon/xenomorph/hive_status.dm b/code/modules/mob/living/carbon/xenomorph/hive_status.dm index baa736382733..e7e1fab0dd45 100644 --- a/code/modules/mob/living/carbon/xenomorph/hive_status.dm +++ b/code/modules/mob/living/carbon/xenomorph/hive_status.dm @@ -595,16 +595,16 @@ slots[TIER_3][GUARANTEED_SLOTS][initial(current_caste.caste_type)] = slots_free - slots_used var/burrowed_factor = min(stored_larva, sqrt(4*stored_larva)) - var/effective_total = round(burrowed_factor) + var/effective_total = floor(burrowed_factor) for(var/mob/living/carbon/xenomorph/xeno as anything in totalXenos) if(xeno.counts_for_slots) effective_total++ // Tier 3 slots are always 20% of the total xenos in the hive - slots[TIER_3][OPEN_SLOTS] = max(0, Ceiling(0.20*effective_total/tier_slot_multiplier) - used_tier_3_slots) + slots[TIER_3][OPEN_SLOTS] = max(0, ceil(0.20*effective_total/tier_slot_multiplier) - used_tier_3_slots) // Tier 2 slots are between 30% and 50% of the hive, depending // on how many T3s there are. - slots[TIER_2][OPEN_SLOTS] = max(0, Ceiling(0.5*effective_total/tier_slot_multiplier) - used_tier_2_slots - used_tier_3_slots) + slots[TIER_2][OPEN_SLOTS] = max(0, ceil(0.5*effective_total/tier_slot_multiplier) - used_tier_2_slots - used_tier_3_slots) return slots @@ -726,7 +726,7 @@ if(is_mainship_level(turf?.z)) shipside_humans_weighted_count += GLOB.RoleAuthority.calculate_role_weight(job) hijack_burrowed_surge = TRUE - hijack_burrowed_left = max(Ceiling(shipside_humans_weighted_count * 0.5) - xenos_count, 5) + hijack_burrowed_left = max(ceil(shipside_humans_weighted_count * 0.5) - xenos_count, 5) hivecore_cooldown = FALSE xeno_message(SPAN_XENOBOLDNOTICE("The weeds have recovered! A new hive core can be built!"),3,hivenumber) @@ -832,7 +832,7 @@ if(cycled_xeno.counts_for_slots) countable_xeno_iterator++ - playable_hugger_limit = max(Floor(countable_xeno_iterator / playable_hugger_max_divisor), playable_hugger_minimum) + playable_hugger_limit = max(floor(countable_xeno_iterator / playable_hugger_max_divisor), playable_hugger_minimum) /datum/hive_status/proc/can_spawn_as_hugger(mob/dead/observer/user) if(!GLOB.hive_datum || ! GLOB.hive_datum[hivenumber]) @@ -844,7 +844,7 @@ to_chat(user, SPAN_WARNING("The hive cannot support facehuggers yet...")) return FALSE if(world.time - user.timeofdeath < JOIN_AS_FACEHUGGER_DELAY) - var/time_left = round((user.timeofdeath + JOIN_AS_FACEHUGGER_DELAY - world.time) / 10) + var/time_left = floor((user.timeofdeath + JOIN_AS_FACEHUGGER_DELAY - world.time) / 10) to_chat(user, SPAN_WARNING("You ghosted too recently. You cannot become a facehugger until 3 minutes have passed ([time_left] seconds remaining).")) return FALSE if(totalXenos.len <= 0) @@ -888,7 +888,7 @@ if(cycled_xeno.counts_for_slots) countable_xeno_iterator++ - lesser_drone_limit = max(Floor(countable_xeno_iterator / playable_lesser_drones_max_divisor), lesser_drone_minimum) + lesser_drone_limit = max(floor(countable_xeno_iterator / playable_lesser_drones_max_divisor), lesser_drone_minimum) /datum/hive_status/proc/can_spawn_as_lesser_drone(mob/dead/observer/user, obj/effect/alien/resin/special/pylon/spawning_pylon) if(!GLOB.hive_datum || ! GLOB.hive_datum[hivenumber]) @@ -899,7 +899,7 @@ return FALSE if(world.time - user.timeofdeath < JOIN_AS_LESSER_DRONE_DELAY) - var/time_left = round((user.timeofdeath + JOIN_AS_LESSER_DRONE_DELAY - world.time) / 10) + var/time_left = floor((user.timeofdeath + JOIN_AS_LESSER_DRONE_DELAY - world.time) / 10) to_chat(user, SPAN_WARNING("You ghosted too recently. You cannot become a lesser drone until 30 seconds have passed ([time_left] seconds remaining).")) return FALSE diff --git a/code/modules/mob/living/carbon/xenomorph/life.dm b/code/modules/mob/living/carbon/xenomorph/life.dm index bbd59a74d8b5..1aa83065bf16 100644 --- a/code/modules/mob/living/carbon/xenomorph/life.dm +++ b/code/modules/mob/living/carbon/xenomorph/life.dm @@ -121,7 +121,7 @@ if(use_current_aura || use_leader_aura) for(var/mob/living/carbon/xenomorph/Z as anything in GLOB.living_xeno_list) - if(Z.ignores_pheromones || Z.ignore_aura == current_aura || Z.ignore_aura == leader_current_aura || Z.z != z || get_dist(aura_center, Z) > round(6 + aura_strength * 2) || !HIVE_ALLIED_TO_HIVE(Z.hivenumber, hivenumber)) + if(Z.ignores_pheromones || Z.ignore_aura == current_aura || Z.ignore_aura == leader_current_aura || Z.z != z || get_dist(aura_center, Z) > floor(6 + aura_strength * 2) || !HIVE_ALLIED_TO_HIVE(Z.hivenumber, hivenumber)) continue if(use_leader_aura) Z.affected_by_pheromones(leader_current_aura, leader_aura_strength) @@ -130,7 +130,8 @@ if(frenzy_aura != frenzy_new || warding_aura != warding_new || recovery_aura != recovery_new) frenzy_aura = frenzy_new - warding_aura = warding_new + if(health > crit_health || warding_new > warding_aura || !check_weeds_for_healing()) + warding_aura = warding_new recovery_aura = recovery_new recalculate_move_delay = TRUE hud_set_pheromone() @@ -251,7 +252,7 @@ hud_used.alien_armor_display.icon_state = "armor_00" return TRUE - var/severity = HUD_PAIN_STATES_XENO - Ceiling(((max(health, 0) / maxHealth) * HUD_PAIN_STATES_XENO)) + var/severity = HUD_PAIN_STATES_XENO - ceil(((max(health, 0) / maxHealth) * HUD_PAIN_STATES_XENO)) if(severity) overlay_fullscreen("xeno_pain", /atom/movable/screen/fullscreen/xeno_pain, severity) else @@ -271,7 +272,7 @@ return TRUE if(hud_used.healths) - var/health_stacks = Ceiling((health / maxHealth) * HUD_HEALTH_STATES_XENO) + var/health_stacks = ceil((health / maxHealth) * HUD_HEALTH_STATES_XENO) hud_used.healths.icon_state = "health_[health_stacks]" if(health_stacks >= HUD_HEALTH_STATES_XENO) hud_used.healths.icon_state = "health_full" @@ -283,7 +284,7 @@ hud_used.alien_plasma_display.icon_state = "power_display_empty" else var/plasma_stacks = (get_plasma_percentage() * 0.01) * HUD_PLASMA_STATES_XENO - hud_used.alien_plasma_display.icon_state = "power_display_[Ceiling(plasma_stacks)]" + hud_used.alien_plasma_display.icon_state = "power_display_[ceil(plasma_stacks)]" if(plasma_stacks >= HUD_PLASMA_STATES_XENO) hud_used.alien_plasma_display.icon_state = "power_display_full" else if(plasma_stacks <= 0) @@ -291,7 +292,7 @@ if(hud_used.alien_armor_display) var/armor_stacks = min((get_armor_integrity_percentage() * 0.01) * HUD_ARMOR_STATES_XENO, HUD_ARMOR_STATES_XENO) - hud_used.alien_armor_display.icon_state = "armor_[Floor(armor_stacks)]0" + hud_used.alien_armor_display.icon_state = "armor_[floor(armor_stacks)]0" return TRUE @@ -341,7 +342,7 @@ Make sure their actual health updates immediately.*/ if(!hive) return // can't heal if you have no hive, sorry bud plasma_stored += plasma_gain * plasma_max / 100 if(recovery_aura) - plasma_stored += round(plasma_gain * plasma_max / 100 * recovery_aura/4) //Divided by four because it gets massive fast. 1 is equivalent to weed regen! Only the strongest pheromones should bypass weeds + plasma_stored += floor(plasma_gain * plasma_max / 100 * recovery_aura/4) //Divided by four because it gets massive fast. 1 is equivalent to weed regen! Only the strongest pheromones should bypass weeds if(health < maxHealth && !hardcore && is_hive_living(hive) && last_hit_time + caste.heal_delay_time <= world.time) if(body_position == LYING_DOWN || resting) if(health < 0) //Unconscious @@ -427,6 +428,12 @@ Make sure their actual health updates immediately.*/ queen_locator() return + if(tracking_atom.loc.z != loc.z && SSinterior.in_interior(tracking_atom)) + var/datum/interior/interior = SSinterior.get_interior_by_coords(tracking_atom.x, tracking_atom.y, tracking_atom.z) + var/atom/exterior = interior.exterior + if(exterior) + tracking_atom = exterior + if(tracking_atom.loc.z != loc.z || get_dist(src, tracking_atom) < 1 || src == tracking_atom) locator.icon_state = "trackondirect" else @@ -493,7 +500,7 @@ Make sure their actual health updates immediately.*/ if(hardcore) async_gib(last_damage_data) else if(world.time > next_grace_time && stat == CONSCIOUS) - var/grace_time = crit_grace_time > 0 ? crit_grace_time + (1 SECONDS * max(round(warding_aura - 1), 0)) : 0 + var/grace_time = crit_grace_time > 0 ? crit_grace_time + (1 SECONDS * max(floor(warding_aura - 1), 0)) : 0 if(grace_time) addtimer(CALLBACK(src, PROC_REF(handle_crit)), grace_time) else diff --git a/code/modules/mob/living/carbon/xenomorph/strains/castes/facehugger/watcher.dm b/code/modules/mob/living/carbon/xenomorph/strains/castes/facehugger/watcher.dm index 7fba30b6f352..c5e1cff29c63 100644 --- a/code/modules/mob/living/carbon/xenomorph/strains/castes/facehugger/watcher.dm +++ b/code/modules/mob/living/carbon/xenomorph/strains/castes/facehugger/watcher.dm @@ -1,13 +1,13 @@ /datum/xeno_strain/watcher name = FACEHUGGER_WATCHER - description = "You lose your ability to hide in exchange to see further and the ability to no longer take damage outside of weeds. This enables you to stalk your host from a distance and wait for the perfect oppertunity to strike." + description = "You lose your ability to hide in exchange to see further. This enables you to stalk your host from a distance and wait for the perfect oppertunity to strike." flavor_description = "No need to hide when you can see the danger." actions_to_remove = list( /datum/action/xeno_action/onclick/xenohide, ) actions_to_add = list( - /datum/action/xeno_action/onclick/toggle_long_range/runner, + /datum/action/xeno_action/onclick/toggle_long_range/facehugger, ) behavior_delegate_type = /datum/behavior_delegate/facehugger_watcher @@ -19,3 +19,13 @@ // This has no special effects, it's just here to skip `/datum/behavior_delegate/facehugger_base/on_life()`. /datum/behavior_delegate/facehugger_watcher name = "Watcher Facehugger Behavior Delegate" + +/datum/behavior_delegate/facehugger_watcher/on_life() + // Sap health if we're standing, not on weeds, and not zoomed out + if(bound_xeno.body_position != STANDING_UP) + return + if(bound_xeno.is_zoomed) + return + if(locate(/obj/effect/alien/weeds) in get_turf(bound_xeno)) + return + bound_xeno.adjustBruteLoss(1) diff --git a/code/modules/mob/living/carbon/xenomorph/strains/castes/lurker/vampire.dm b/code/modules/mob/living/carbon/xenomorph/strains/castes/lurker/vampire.dm index 5a0bc5073ee3..34dfcc325943 100644 --- a/code/modules/mob/living/carbon/xenomorph/strains/castes/lurker/vampire.dm +++ b/code/modules/mob/living/carbon/xenomorph/strains/castes/lurker/vampire.dm @@ -1,13 +1,14 @@ /datum/xeno_strain/vampire name = LURKER_VAMPIRE - description = "You lose all of your abilities and you forefeit a chunk of your health and damage in exchange for a large amount of armor, a little bit of movement speed, increased attack speed, and brand new abilities that make you an assassin. Rush on your opponent to disorient them and Flurry to unleash a forward cleave that can hit and slow three talls and heal you for every tall you hit. Use your special AoE Tail Jab to knock talls away, doing more damage with direct hits and even more damage and a stun if they smack into walls. Finally, execute unconscious talls with a headbite that bypasses armor and heals you for a grand amount of health." - flavor_description = "Your thirst for tallhost blood surpasses even mine, child. Show no mercy! Slaughter them all!" + description = "You lose all of your abilities and you forefeit a chunk of your health and damage in exchange for a large amount of armor, a little bit of movement speed, increased attack speed, and brand new abilities that make you an assassin. Rush on your opponent to disorient them and Flurry to unleash a forward cleave that can hit and slow three talls and heal you for every tall you hit. Use your special AoE Tail Jab to knock talls away, doing more damage with direct hits and even more damage and a stun if they smack into walls. Finally, execute unconscious talls with a headbite to heal your wounds." + flavor_description = "Show no mercy! Slaughter them all!" icon_state_prefix = "Vampire" actions_to_remove = list( /datum/action/xeno_action/onclick/lurker_invisibility, /datum/action/xeno_action/onclick/lurker_assassinate, /datum/action/xeno_action/activable/pounce/lurker, + /datum/action/xeno_action/activable/tail_stab, ) actions_to_add = list( /datum/action/xeno_action/activable/pounce/rush, diff --git a/code/modules/mob/living/carbon/xenomorph/strains/castes/runner/acid.dm b/code/modules/mob/living/carbon/xenomorph/strains/castes/runner/acid.dm index f98263871707..6983942fb562 100644 --- a/code/modules/mob/living/carbon/xenomorph/strains/castes/runner/acid.dm +++ b/code/modules/mob/living/carbon/xenomorph/strains/castes/runner/acid.dm @@ -140,7 +140,7 @@ dist = (0.934*dx) + (0.427*dy) else dist = (0.427*dx) + (0.934*dy) - var/damage = round((burn_range - dist) * max_burn_damage / burn_range) + var/damage = floor((burn_range - dist) * max_burn_damage / burn_range) if(isxeno(target_living)) damage *= XVX_ACID_DAMAGEMULT diff --git a/code/modules/mob/living/carbon/xenomorph/update_icons.dm b/code/modules/mob/living/carbon/xenomorph/update_icons.dm index ac0c381f5ed4..3d3dc2133e63 100644 --- a/code/modules/mob/living/carbon/xenomorph/update_icons.dm +++ b/code/modules/mob/living/carbon/xenomorph/update_icons.dm @@ -327,7 +327,7 @@ return var/health_threshold - health_threshold = max(Ceiling((health * 4) / (maxHealth)), 0) //From 0 to 4, in 25% chunks + health_threshold = max(ceil((health * 4) / (maxHealth)), 0) //From 0 to 4, in 25% chunks if(health > HEALTH_THRESHOLD_DEAD) if(health_threshold > 3) wound_icon_holder.icon_state = "none" diff --git a/code/modules/mob/living/carbon/xenomorph/xeno_helpers.dm b/code/modules/mob/living/carbon/xenomorph/xeno_helpers.dm index 2e4b968d5a59..8b3487b7a878 100644 --- a/code/modules/mob/living/carbon/xenomorph/xeno_helpers.dm +++ b/code/modules/mob/living/carbon/xenomorph/xeno_helpers.dm @@ -27,12 +27,12 @@ /mob/living/carbon/xenomorph/proc/get_plasma_percentage() if(plasma_max<=0) return 100 - return round(plasma_stored * 100 / plasma_max) + return floor(plasma_stored * 100 / plasma_max) /mob/living/carbon/xenomorph/proc/get_armor_integrity_percentage() if(armor_deflection<=0) return 100 - return round(armor_integrity * 100 / armor_integrity_max) + return floor(armor_integrity * 100 / armor_integrity_max) /** * Returns the name of the xeno's strain, if it has one. diff --git a/code/modules/mob/living/living_health_procs.dm b/code/modules/mob/living/living_health_procs.dm index 986d8740f11f..15cd243d6818 100644 --- a/code/modules/mob/living/living_health_procs.dm +++ b/code/modules/mob/living/living_health_procs.dm @@ -410,7 +410,7 @@ switch(client.prefs?.pain_overlay_pref_level) if(PAIN_OVERLAY_IMPAIR) - overlay_fullscreen("eye_blur", /atom/movable/screen/fullscreen/impaired, Ceiling(clamp(eye_blurry * 0.3, 1, 6))) + overlay_fullscreen("eye_blur", /atom/movable/screen/fullscreen/impaired, ceil(clamp(eye_blurry * 0.3, 1, 6))) if(PAIN_OVERLAY_LEGACY) overlay_fullscreen("eye_blur", /atom/movable/screen/fullscreen/blurry) else // PAIN_OVERLAY_BLURRY diff --git a/code/modules/mob/living/living_healthscan.dm b/code/modules/mob/living/living_healthscan.dm index 30358dea20c1..b26be6c0d585 100644 --- a/code/modules/mob/living/living_healthscan.dm +++ b/code/modules/mob/living/living_healthscan.dm @@ -77,7 +77,7 @@ GLOBAL_LIST_INIT(known_implants, subtypesof(/obj/item/implant)) var/total_mob_damage = target_mob.getBruteLoss() + target_mob.getFireLoss() + target_mob.getToxLoss() + target_mob.getCloneLoss() // Fake death will make the scanner think they died of oxygen damage, thus it returns enough damage to kill minus already received damage. - return round(POSITIVE(200 - total_mob_damage)) + return floor(POSITIVE(200 - total_mob_damage)) /datum/health_scan/proc/get_holo_card_color(mob/living/target_mob) if(!ishuman(target_mob)) @@ -96,11 +96,11 @@ GLOBAL_LIST_INIT(known_implants, subtypesof(/obj/item/implant)) "patient" = target_mob.name, "dead" = get_death_value(target_mob), "health" = get_health_value(target_mob), - "total_brute" = round(target_mob.getBruteLoss()), - "total_burn" = round(target_mob.getFireLoss()), - "toxin" = round(target_mob.getToxLoss()), + "total_brute" = floor(target_mob.getBruteLoss()), + "total_burn" = floor(target_mob.getFireLoss()), + "toxin" = floor(target_mob.getToxLoss()), "oxy" = get_oxy_value(target_mob), - "clone" = round(target_mob.getCloneLoss()), + "clone" = floor(target_mob.getCloneLoss()), "blood_type" = target_mob.blood_type, "blood_amount" = target_mob.blood_volume, "holocard" = get_holo_card_color(target_mob), @@ -189,8 +189,8 @@ GLOBAL_LIST_INIT(known_implants, subtypesof(/obj/item/implant)) var/list/core_body_parts = list("head", "chest", "groin") var/list/current_list = list( "name" = limb.display_name, - "brute" = round(limb.brute_dam), - "burn" = round(limb.burn_dam), + "brute" = floor(limb.brute_dam), + "burn" = floor(limb.burn_dam), "bandaged" = limb.is_bandaged(), "salved" = limb.is_salved(), "missing" = (limb.status & LIMB_DESTROYED), @@ -574,9 +574,9 @@ GLOBAL_LIST_INIT(known_implants, subtypesof(/obj/item/implant)) else if(org.status & LIMB_SYNTHSKIN) org_name += " (Synthskin)" - var/burn_info = org.burn_dam > 0 ? " [round(org.burn_dam)]" : "0" + var/burn_info = org.burn_dam > 0 ? " [floor(org.burn_dam)]" : "0" burn_info += "[burn_treated ? "" : "{B}"]" - var/brute_info = org.brute_dam > 0 ? " [round(org.brute_dam)]" : "0" + var/brute_info = org.brute_dam > 0 ? " [floor(org.brute_dam)]" : "0" brute_info += "[brute_treated ? "" : "{T}"]" var/fracture_info = "" if(org.status & LIMB_BROKEN) @@ -680,7 +680,7 @@ GLOBAL_LIST_INIT(known_implants, subtypesof(/obj/item/implant)) // Show blood level var/blood_volume = BLOOD_VOLUME_NORMAL if(!(H.species && H.species.flags & NO_BLOOD)) - blood_volume = round(H.blood_volume) + blood_volume = floor(H.blood_volume) var/blood_percent = blood_volume / 560 var/blood_type = H.blood_type diff --git a/code/modules/mob/living/silicon/silicon.dm b/code/modules/mob/living/silicon/silicon.dm index 02c1baa48c28..eb3fe5cd47e7 100644 --- a/code/modules/mob/living/silicon/silicon.dm +++ b/code/modules/mob/living/silicon/silicon.dm @@ -64,7 +64,7 @@ // this function shows health in the Status panel /mob/living/silicon/proc/show_system_integrity() if(!stat) - stat(null, text("System integrity: [round((health/maxHealth)*100)]%")) + stat(null, text("System integrity: [floor((health/maxHealth)*100)]%")) else stat(null, text("Systems nonfunctional")) diff --git a/code/modules/mob/living/simple_animal/hostile/alien.dm b/code/modules/mob/living/simple_animal/hostile/alien.dm index ba7bf741f6c0..3f9a51355292 100644 --- a/code/modules/mob/living/simple_animal/hostile/alien.dm +++ b/code/modules/mob/living/simple_animal/hostile/alien.dm @@ -110,7 +110,7 @@ wound_icon_holder.layer = layer + 0.01 wound_icon_holder.dir = dir - var/health_threshold = max(Ceiling((health * 4) / (maxHealth)), 0) //From 0 to 4, in 25% chunks + var/health_threshold = max(ceil((health * 4) / (maxHealth)), 0) //From 0 to 4, in 25% chunks if(health > HEALTH_THRESHOLD_DEAD) if(health_threshold > 3) wound_icon_holder.icon_state = "none" diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm index 44286b5fabe0..4b3d2257eb9e 100644 --- a/code/modules/mob/mob_defines.dm +++ b/code/modules/mob/mob_defines.dm @@ -163,7 +163,7 @@ var/datum/skills/skills = null //the knowledge you have about certain abilities and actions (e.g. do you how to do surgery?) //see skills.dm in #define folder and code/datums/skills.dm for more info - var/obj/item/legcuffs/legcuffed = null //Same as handcuffs but for legs. Bear traps use this. + var/obj/item/restraint/legcuffs/legcuffed = null //Same as handcuffs but for legs. Bear traps use this. var/list/viruses = list() //List of active diseases diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm index 0f128b5bcb46..8c41e1149f35 100644 --- a/code/modules/mob/mob_helpers.dm +++ b/code/modules/mob/mob_helpers.dm @@ -224,7 +224,7 @@ GLOBAL_LIST_INIT(limb_types_by_name, list( if(strength < 1) return phrase else - strength = Ceiling(strength/5) + strength = ceil(strength/5) var/list/split_phrase = text2list(phrase," ") //Split it up into words. var/list/unstuttered_words = split_phrase.Copy() @@ -331,7 +331,7 @@ GLOBAL_LIST_INIT(limb_types_by_name, list( while(i < steps) animate(pixel_x = old_X + rand(-(strength), strength), pixel_y = old_y + rand(-(strength), strength), easing = JUMP_EASING, time = time_per_step) i++ - animate(pixel_x = old_X, pixel_y = old_y,time = clamp(Floor(strength/PIXELS_PER_STRENGTH_VAL),2,4))//ease it back + animate(pixel_x = old_X, pixel_y = old_y,time = clamp(floor(strength/PIXELS_PER_STRENGTH_VAL),2,4))//ease it back #undef PIXELS_PER_STRENGTH_VAL diff --git a/code/modules/mob/mob_movement.dm b/code/modules/mob/mob_movement.dm index 9d108d36b461..ab5aa898a848 100644 --- a/code/modules/mob/mob_movement.dm +++ b/code/modules/mob/mob_movement.dm @@ -301,5 +301,5 @@ if(stat) prob_slip = 0 // Changing this to zero to make it line up with the comment. - prob_slip = round(prob_slip) + prob_slip = floor(prob_slip) return(prob_slip) diff --git a/code/modules/mob/mob_verbs.dm b/code/modules/mob/mob_verbs.dm index f12d00cc0988..180882a00528 100644 --- a/code/modules/mob/mob_verbs.dm +++ b/code/modules/mob/mob_verbs.dm @@ -121,7 +121,7 @@ return else var/deathtime = world.time - src.timeofdeath - var/deathtimeminutes = round(deathtime / 600) + var/deathtimeminutes = floor(deathtime / 600) var/pluralcheck = "minute" if(deathtimeminutes == 0) pluralcheck = "" diff --git a/code/modules/mob/new_player/new_player.dm b/code/modules/mob/new_player/new_player.dm index f436863b2f2f..1bdf075c938e 100644 --- a/code/modules/mob/new_player/new_player.dm +++ b/code/modules/mob/new_player/new_player.dm @@ -267,8 +267,13 @@ sq.max_engineers = engi_slot_formula(GLOB.clients.len) sq.max_medics = medic_slot_formula(GLOB.clients.len) - if(SSticker.mode.latejoin_larva_drop && SSticker.mode.latejoin_tally - SSticker.mode.latejoin_larva_used >= SSticker.mode.latejoin_larva_drop) - SSticker.mode.latejoin_larva_used += SSticker.mode.latejoin_larva_drop + var/latejoin_larva_drop = SSticker.mode.latejoin_larva_drop + + if (ROUND_TIME < XENO_ROUNDSTART_PROGRESS_TIME_2) + latejoin_larva_drop = SSticker.mode.latejoin_larva_drop_early + + if(latejoin_larva_drop && SSticker.mode.latejoin_tally - SSticker.mode.latejoin_larva_used >= latejoin_larva_drop) + SSticker.mode.latejoin_larva_used += latejoin_larva_drop var/datum/hive_status/hive for(var/hivenumber in GLOB.hive_datum) hive = GLOB.hive_datum[hivenumber] @@ -299,7 +304,7 @@ var/hours = mills / 36000 var/dat = "
" - dat += "Round Duration: [round(hours)]h [round(mins)]m
" + dat += "Round Duration: [floor(hours)]h [floor(mins)]m
" if(SShijack) switch(SShijack.evac_status) @@ -451,7 +456,7 @@ var/time_remaining = SSticker.GetTimeLeft() if(time_remaining > 0) - . += "Time To Start: [round(time_remaining)]s[SSticker.delay_start ? " (DELAYED)" : ""]" + . += "Time To Start: [floor(time_remaining)]s[SSticker.delay_start ? " (DELAYED)" : ""]" else if(time_remaining == -10) . += "Time To Start: DELAYED" else diff --git a/code/modules/nightmare/nmtasks/mapload.dm b/code/modules/nightmare/nmtasks/mapload.dm index a49bbbabdde5..052cb069baec 100644 --- a/code/modules/nightmare/nmtasks/mapload.dm +++ b/code/modules/nightmare/nmtasks/mapload.dm @@ -70,11 +70,9 @@ var/list/bounds = parsed.bounds if(length(bounds) < 6) return - var/list/turf_block = block( locate(bounds[MAP_MINX], bounds[MAP_MINY], bounds[MAP_MINZ]), - locate(bounds[MAP_MAXX], bounds[MAP_MAXY], bounds[MAP_MAXZ])) var/list/area/arealist = list() var/list/atom/atomlist = list() - for(var/turf/turf as anything in turf_block) + for(var/turf/turf as anything in block(bounds[MAP_MINX], bounds[MAP_MINY], bounds[MAP_MINZ], bounds[MAP_MAXX], bounds[MAP_MAXY], bounds[MAP_MAXZ])) atomlist += turf if(turf.loc) arealist |= turf.loc diff --git a/code/modules/nightmare/nmtasks/mapscheduler.dm b/code/modules/nightmare/nmtasks/mapscheduler.dm index 34ceecafb876..b97193eadb21 100644 --- a/code/modules/nightmare/nmtasks/mapscheduler.dm +++ b/code/modules/nightmare/nmtasks/mapscheduler.dm @@ -22,8 +22,7 @@ var/list/tainted = list() for(var/list/bounds as anything in tainted_bounds) - var/list/TT = block( locate(bounds[MAP_MINX], bounds[MAP_MINY], bounds[MAP_MINZ]), - locate(bounds[MAP_MAXX], bounds[MAP_MAXY], bounds[MAP_MAXZ])) + var/list/TT = block(bounds[MAP_MINX], bounds[MAP_MINY], bounds[MAP_MINZ], bounds[MAP_MAXX], bounds[MAP_MAXY], bounds[MAP_MAXZ]) tainted |= TT for(var/turf/T as anything in tainted) diff --git a/code/modules/objectives/data_retrieval.dm b/code/modules/objectives/data_retrieval.dm index f66c578f48fb..ee5053f26c4b 100644 --- a/code/modules/objectives/data_retrieval.dm +++ b/code/modules/objectives/data_retrieval.dm @@ -117,29 +117,14 @@ /datum/cm_objective/retrieve_data/disk/process() var/obj/structure/machinery/computer/disk_reader/reader = disk.loc if(!reader.powered()) - reader.visible_message(SPAN_WARNING("\The [reader] powers down mid-operation as the area looses power.")) - playsound(reader, 'sound/machines/terminal_shutdown.ogg', 25, 1) - SSobjectives.stop_processing_objective(src) - disk.forceMove(reader.loc) - reader.disk = null + SEND_SIGNAL(reader, COMSIG_INTEL_DISK_LOST_POWER) return ..() /datum/cm_objective/retrieve_data/disk/complete() state = OBJECTIVE_COMPLETE - var/obj/structure/machinery/computer/disk_reader/reader = disk.loc - reader.visible_message("\The [reader] pings softly as the upload finishes and ejects the disk.") - playsound(reader, 'sound/machines/screen_output1.ogg', 25, 1) - disk.forceMove(reader.loc) - disk.name = "[disk.name] (complete)" - reader.disk = null - award_points() - - // Now enable the objective to store this disk in the lab. - disk.retrieve_objective.state = OBJECTIVE_ACTIVE - disk.retrieve_objective.activate() - + SEND_SIGNAL(disk.loc, COMSIG_INTEL_DISK_COMPLETED) ..() /datum/cm_objective/retrieve_data/disk/get_tgui_data() @@ -295,34 +280,6 @@ unslashable = TRUE unacidable = TRUE -/obj/structure/machinery/computer/disk_reader/attack_hand(mob/living/user) - if(isxeno(user)) - return - if(disk) - to_chat(user, SPAN_NOTICE("[disk] is currently being uploaded to ARES.")) - -/obj/structure/machinery/computer/disk_reader/attackby(obj/item/W, mob/living/user) - if(istype(W, /obj/item/disk/objective)) - if(istype(disk)) - to_chat(user, SPAN_WARNING("There is a disk in the drive being uploaded already!")) - return FALSE - var/obj/item/disk/objective/newdisk = W - if(newdisk.objective.state == OBJECTIVE_COMPLETE) - to_chat(user, SPAN_WARNING("The reader displays a message stating this disk has already been read and refuses to accept it.")) - return FALSE - if(input(user,"Enter the encryption key","Decrypting [newdisk]","") != newdisk.objective.decryption_password) - to_chat(user, SPAN_WARNING("The reader asks for the encryption key for this disk, not having the correct key you eject the disk.")) - return FALSE - if(istype(disk)) - to_chat(user, SPAN_WARNING("There is a disk in the drive being uploaded already!")) - return FALSE - - if(!(newdisk in user.contents)) - return FALSE - - newdisk.objective.activate() - - user.drop_inv_item_to_loc(W, src) - disk = W - to_chat(user, SPAN_NOTICE("You insert \the [W] and enter the decryption key.")) - user.count_niche_stat(STATISTICS_NICHE_DISK) +/obj/structure/machinery/computer/disk_reader/Initialize() + . = ..() + AddComponent(/datum/component/disk_reader) diff --git a/code/modules/objectives/objective_memory_storage.dm b/code/modules/objectives/objective_memory_storage.dm index 161c78d4d1ba..de2ab30691cc 100644 --- a/code/modules/objectives/objective_memory_storage.dm +++ b/code/modules/objectives/objective_memory_storage.dm @@ -218,6 +218,15 @@ GLOBAL_DATUM_INIT(intel_system, /datum/intel_system, new()) GLOB.intel_system.store_single_objective(O) return 1 +/obj/structure/machinery/computer/intel/disk_reader // ARC computer to save on tile space + name = "\improper SIGINT terminal" + desc = "An USCM computer capable of uploading data to the intelligence database. It has a disk reader slot built into the bottom, as well." + icon_state = "terminal" + +/obj/structure/machinery/computer/intel/disk_reader/Initialize() + . = ..() + AddComponent(/datum/component/disk_reader) + // -------------------------------------------- // *** View objectives with the computer *** // -------------------------------------------- diff --git a/code/modules/organs/limbs.dm b/code/modules/organs/limbs.dm index 4c3954575245..ea9a68bb9c41 100644 --- a/code/modules/organs/limbs.dm +++ b/code/modules/organs/limbs.dm @@ -367,7 +367,7 @@ var/no_perma_damage = owner.status_flags & NO_PERMANENT_DAMAGE var/no_bone_break = owner.chem_effect_flags & CHEM_EFFECT_RESIST_FRACTURE if(previous_brute > 0 && !is_ff && body_part != BODY_FLAG_CHEST && body_part != BODY_FLAG_GROIN && !no_limb_loss && !no_perma_damage && !no_bone_break) - if(CONFIG_GET(flag/limbs_can_break) && brute_dam >= max_damage * CONFIG_GET(number/organ_health_multiplier)) + if(CONFIG_GET(flag/limbs_can_break) && brute_dam >= max_damage * CONFIG_GET(number/organ_health_multiplier) && (status & LIMB_BROKEN)) var/cut_prob = brute/max_damage * 5 if(prob(cut_prob)) limb_delimb(damage_source) @@ -1513,7 +1513,7 @@ treat_grafted var tells it to apply to grafted but unsalved wounds, for burn kit /obj/limb/head/limb_delimb(damage_source) var/obj/item/clothing/head/helmet/owner_helmet = owner.head - if(!istype(owner_helmet) || !owner.allow_gun_usage) + if(!istype(owner_helmet) || (issynth(owner) && !owner.allow_gun_usage)) droplimb(0, 0, damage_source) return diff --git a/code/modules/paperwork/desk_bell.dm b/code/modules/paperwork/desk_bell.dm index ddd4a9dc5d58..87eb24d1ca3e 100644 --- a/code/modules/paperwork/desk_bell.dm +++ b/code/modules/paperwork/desk_bell.dm @@ -96,6 +96,8 @@ /obj/item/desk_bell/ares name = "AI core reception bell" + desc = "The cornerstone of any customer service job. This one is linked to ARES and will notify any active Working Joes upon being rung." + ring_cooldown_length = 60 SECONDS // Prevents spam /obj/item/desk_bell/ares/ring_bell(mob/living/user) if(broken_ringer) diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index 8ec24526fc1e..068344b905f2 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -211,6 +211,7 @@ GLOBAL_LIST_INIT(apc_wire_descriptions, list( "chargingStatus" = charging, "totalLoad" = display_power(lastused_total), "coverLocked" = coverlocked, + "siliconUser" = FALSE, "powerChannels" = list( list( diff --git a/code/modules/power/batteryrack.dm b/code/modules/power/batteryrack.dm index 6956079a6cb0..5630f13a048d 100644 --- a/code/modules/power/batteryrack.dm +++ b/code/modules/power/batteryrack.dm @@ -94,7 +94,7 @@ /obj/structure/machinery/power/smes/batteryrack/chargedisplay() - return round(4 * charge/(capacity ? capacity : 5e6)) + return floor(4 * charge/(capacity ? capacity : 5e6)) /obj/structure/machinery/power/smes/batteryrack/attackby(obj/item/W as obj, mob/user as mob) //these can only be moved by being reconstructed, solves having to remake the powernet. @@ -246,7 +246,7 @@ if(charge < 0.0001) outputting = 0 // stop output if charge falls to zero - overcharge_percent = round((charge / capacity) * 100) + overcharge_percent = floor((charge / capacity) * 100) if (overcharge_percent > 115) //115% is the minimum overcharge for anything to happen overcharge_consequences() diff --git a/code/modules/power/cell.dm b/code/modules/power/cell.dm index 31a096a3a2ee..6d67f207cf12 100644 --- a/code/modules/power/cell.dm +++ b/code/modules/power/cell.dm @@ -63,9 +63,9 @@ /obj/item/cell/get_examine_text(mob/user) . = ..() if(maxcharge <= 2500) - . += SPAN_NOTICE("The manufacturer's label states this cell has a power rating of [maxcharge], and that you should not swallow it.\nThe charge meter reads [round(src.percent() )]%.") + . += SPAN_NOTICE("The manufacturer's label states this cell has a power rating of [maxcharge], and that you should not swallow it.\nThe charge meter reads [floor(src.percent() )]%.") else - . += SPAN_NOTICE("This power cell has an exciting chrome finish, as it is an uber-capacity cell type! It has a power rating of [maxcharge]!\nThe charge meter reads [round(src.percent() )]%.") + . += SPAN_NOTICE("This power cell has an exciting chrome finish, as it is an uber-capacity cell type! It has a power rating of [maxcharge]!\nThe charge meter reads [floor(src.percent() )]%.") if(crit_fail) . += SPAN_DANGER("This power cell seems to be faulty.") diff --git a/code/modules/power/port_gen.dm b/code/modules/power/port_gen.dm index 6a20e9cfe78e..bb158ae30b5e 100644 --- a/code/modules/power/port_gen.dm +++ b/code/modules/power/port_gen.dm @@ -33,7 +33,7 @@ tank [un]loading stuff turn on/off /obj/structure/machinery/power/port_gen/get_examine_text(mob/user) -display round(lastgen) and phorontank amount +display floor(lastgen) and phorontank amount */ @@ -168,8 +168,8 @@ display round(lastgen) and phorontank amount temp_rating += SP.rating for(var/obj/item/CP in component_parts) temp_reliability += CP.reliability - reliability = min(round(temp_reliability / 4), 100) - power_gen = round(initial(power_gen) * (max(2, temp_rating) / 2)) + reliability = min(floor(temp_reliability / 4), 100) + power_gen = floor(initial(power_gen) * (max(2, temp_rating) / 2)) /obj/structure/machinery/power/port_gen/pacman/get_examine_text(mob/user) . = ..() @@ -196,8 +196,8 @@ display round(lastgen) and phorontank amount var/temp = min(needed_sheets, sheet_left) needed_sheets -= temp sheet_left -= temp - sheets -= round(needed_sheets) - needed_sheets -= round(needed_sheets) + sheets -= floor(needed_sheets) + needed_sheets -= floor(needed_sheets) if (sheet_left <= 0 && sheets > 0) sheet_left = 1 - needed_sheets sheets-- diff --git a/code/modules/power/power_monitor.dm b/code/modules/power/power_monitor.dm index d39e3cbb8c0a..9a95047db6cc 100644 --- a/code/modules/power/power_monitor.dm +++ b/code/modules/power/power_monitor.dm @@ -67,7 +67,7 @@ for(var/obj/structure/machinery/power/apc/A in L) t += copytext(add_tspace("\The [A.area]", 30), 1, 30) - t += " [S[A.equipment+1]] [S[A.lighting+1]] [S[A.environ+1]] [add_lspace(A.lastused_total, 6)] [A.cell ? "[add_lspace(round(A.cell.percent()), 3)]% [chg[A.charging+1]]" : " N/C"]
" + t += " [S[A.equipment+1]] [S[A.lighting+1]] [S[A.environ+1]] [add_lspace(A.lastused_total, 6)] [A.cell ? "[add_lspace(floor(A.cell.percent()), 3)]% [chg[A.charging+1]]" : " N/C"]
" total_demand += A.lastused_total t += "
Total demand: [total_demand] W" diff --git a/code/modules/power/powernet.dm b/code/modules/power/powernet.dm index b48acda29df1..0fe62154966b 100644 --- a/code/modules/power/powernet.dm +++ b/code/modules/power/powernet.dm @@ -22,7 +22,7 @@ viewload = 0.8*viewload + 0.2*load - viewload = round(viewload) + viewload = floor(viewload) var/numapc = 0 diff --git a/code/modules/power/smes.dm b/code/modules/power/smes.dm index 46d9374cb832..d05b34e62b2c 100644 --- a/code/modules/power/smes.dm +++ b/code/modules/power/smes.dm @@ -94,7 +94,7 @@ /obj/structure/machinery/power/smes/proc/chargedisplay() - return round(5.5*charge/(capacity ? capacity : 5e6)) + return floor(5.5*charge/(capacity ? capacity : 5e6)) #define SMESRATE 0.05 // rate of internal charge to external power diff --git a/code/modules/power/smes_construction.dm b/code/modules/power/smes_construction.dm index d6fb7bb66841..fdfc18390dbe 100644 --- a/code/modules/power/smes_construction.dm +++ b/code/modules/power/smes_construction.dm @@ -199,7 +199,7 @@ return // Probability of failure if safety circuit is disabled (in %) - var/failure_probability = round((charge / capacity) * 100) + var/failure_probability = floor((charge / capacity) * 100) // If failure probability is below 5% it's usually safe to do modifications if (failure_probability < 5) diff --git a/code/modules/projectiles/ammo_boxes/ammo_boxes.dm b/code/modules/projectiles/ammo_boxes/ammo_boxes.dm index df8a7d7bdd76..7f6919b94f3a 100644 --- a/code/modules/projectiles/ammo_boxes/ammo_boxes.dm +++ b/code/modules/projectiles/ammo_boxes/ammo_boxes.dm @@ -206,11 +206,11 @@ if(handfuls) var/obj/item/ammo_magazine/AM = locate(/obj/item/ammo_magazine) in contents if(AM) - severity = round(AM.current_rounds / 40) + severity = floor(AM.current_rounds / 40) else for(var/obj/item/ammo_magazine/AM in contents) severity += AM.current_rounds - severity = round(severity / 150) + severity = floor(severity / 150) return severity /obj/item/ammo_box/magazine/process_burning(datum/cause_data/flame_cause_data) @@ -401,7 +401,7 @@ return /obj/item/ammo_box/rounds/get_severity() - return round(bullet_amount / 200) //we need a lot of bullets to produce an explosion. + return floor(bullet_amount / 200) //we need a lot of bullets to produce an explosion. /obj/item/ammo_box/rounds/process_burning(datum/cause_data/flame_cause_data) if(can_explode) diff --git a/code/modules/projectiles/ammo_boxes/box_structures.dm b/code/modules/projectiles/ammo_boxes/box_structures.dm index b34c0543bb2c..8ae178edf586 100644 --- a/code/modules/projectiles/ammo_boxes/box_structures.dm +++ b/code/modules/projectiles/ammo_boxes/box_structures.dm @@ -101,7 +101,7 @@ if(item_box.handfuls) var/obj/item/ammo_magazine/AM = locate(/obj/item/ammo_magazine) in item_box.contents if(AM) - . += SPAN_INFO("It has roughly [round(AM.current_rounds/5)] handfuls remaining.") + . += SPAN_INFO("It has roughly [floor(AM.current_rounds/5)] handfuls remaining.") else . += SPAN_INFO("It has [item_box.contents.len] magazines out of [item_box.num_of_magazines].") if(burning) diff --git a/code/modules/projectiles/ammo_boxes/misc_boxes.dm b/code/modules/projectiles/ammo_boxes/misc_boxes.dm index 7b19555f4de5..434239fe25cd 100644 --- a/code/modules/projectiles/ammo_boxes/misc_boxes.dm +++ b/code/modules/projectiles/ammo_boxes/misc_boxes.dm @@ -97,7 +97,7 @@ var/flare_amount = 0 for(var/obj/item/storage/box/m94/flare_box in contents) flare_amount += flare_box.contents.len - flare_amount = round(flare_amount / 8) //10 packs, 8 flares each, maximum total of 10 flares we can throw out + flare_amount = floor(flare_amount / 8) //10 packs, 8 flares each, maximum total of 10 flares we can throw out return flare_amount /obj/item/ammo_box/magazine/misc/flares/process_burning(datum/cause_data/flame_cause_data) diff --git a/code/modules/projectiles/ammunition.dm b/code/modules/projectiles/ammunition.dm index a3ba517c0cae..0e0fccf027db 100644 --- a/code/modules/projectiles/ammunition.dm +++ b/code/modules/projectiles/ammunition.dm @@ -196,7 +196,7 @@ They're all essentially identical when it comes to getting the job done. if(current_rounds < 1) return else - var/severity = round(current_rounds / 50) + var/severity = floor(current_rounds / 50) //the more ammo inside, the faster and harder it cooks off if(severity > 0) addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(explosion), loc, -1, ((severity > 4) ? 0 : -1), clamp(severity, 0, 1), clamp(severity, 0, 2), 1, 0, 0, flame_cause_data), max(5 - severity, 2)) @@ -335,14 +335,14 @@ Turn() or Shift() as there is virtually no overhead. ~N /obj/item/ammo_casing/update_icon() if(max_casings >= current_casings) if(current_casings == 2) name += "s" //In case there is more than one. - if(round((current_casings-1)/8) > current_icon) + if(floor((current_casings-1)/8) > current_icon) current_icon++ icon_state += "_[current_icon]" var/I = current_casings*8 // For the metal. matter = list("metal" = I) var/base_direction = current_casings - (current_icon * 8) - setDir(base_direction + round(base_direction)/3) + setDir(base_direction + floor(base_direction)/3) switch(current_casings) if(3 to 5) w_class = SIZE_SMALL //Slightly heavier. if(9 to 10) w_class = SIZE_MEDIUM //Can't put it in your pockets and stuff. diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index a678ceda165c..69a458a983d0 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -23,7 +23,7 @@ WEAR_L_HAND = 'icons/mob/humans/onmob/items_lefthand_1.dmi', WEAR_R_HAND = 'icons/mob/humans/onmob/items_righthand_1.dmi' ) - flags_atom = FPRINT|CONDUCT + flags_atom = FPRINT|QUICK_DRAWABLE|CONDUCT flags_item = TWOHANDED light_system = DIRECTIONAL_LIGHT @@ -503,13 +503,15 @@ As sniper rifles have both and weapon mods can change them as well. ..() deals w if(slot in list(WEAR_L_HAND, WEAR_R_HAND)) set_gun_user(user) - if(HAS_TRAIT_FROM_ONLY(src, TRAIT_GUN_LIGHT_DEACTIVATED, WEAKREF(user))) + if(HAS_TRAIT_FROM_ONLY(src, TRAIT_GUN_LIGHT_FORCE_DEACTIVATED, WEAKREF(user))) force_light(on = TRUE) - REMOVE_TRAIT(src, TRAIT_GUN_LIGHT_DEACTIVATED, WEAKREF(user)) + REMOVE_TRAIT(src, TRAIT_GUN_LIGHT_FORCE_DEACTIVATED, WEAKREF(user)) else set_gun_user(null) - force_light(on = FALSE) - ADD_TRAIT(src, TRAIT_GUN_LIGHT_DEACTIVATED, WEAKREF(user)) + // we force the light off and turn it back on again when the gun is equipped. Otherwise bad things happen. + if(light_sources()) + force_light(on = FALSE) + ADD_TRAIT(src, TRAIT_GUN_LIGHT_FORCE_DEACTIVATED, WEAKREF(user)) return ..() @@ -650,11 +652,11 @@ As sniper rifles have both and weapon mods can change them as well. ..() deals w for(var/i = 0; i<=CODEX_ARMOR_MAX; i+=CODEX_ARMOR_STEP) damage_armor_profile_headers.Add(i) - damage_armor_profile_marine.Add(round(armor_damage_reduction(GLOB.marine_ranged_stats, damage, i, penetration))) - damage_armor_profile_xeno.Add(round(armor_damage_reduction(GLOB.xeno_ranged_stats, damage, i, penetration))) + damage_armor_profile_marine.Add(floor(armor_damage_reduction(GLOB.marine_ranged_stats, damage, i, penetration))) + damage_armor_profile_xeno.Add(floor(armor_damage_reduction(GLOB.xeno_ranged_stats, damage, i, penetration))) if(!GLOB.xeno_general.armor_ignore_integrity) if(i != 0) - damage_armor_profile_armorbreak.Add("[round(armor_break_calculation(GLOB.xeno_ranged_stats, damage, i, penetration, in_ammo.pen_armor_punch, armor_punch)/i)]%") + damage_armor_profile_armorbreak.Add("[floor(armor_break_calculation(GLOB.xeno_ranged_stats, damage, i, penetration, in_ammo.pen_armor_punch, armor_punch)/i)]%") else damage_armor_profile_armorbreak.Add("N/A") @@ -669,8 +671,8 @@ As sniper rifles have both and weapon mods can change them as well. ..() deals w data["two_handed_only"] = (flags_gun_features & GUN_WIELDED_FIRING_ONLY) data["recoil"] = max(gun_recoil, 0.1) data["unwielded_recoil"] = max(recoil_unwielded, 0.1) - data["firerate"] = round(1 MINUTES / rpm) // 3 minutes so that the values look greater than they actually are - data["burst_firerate"] = round(1 MINUTES / burst_rpm) + data["firerate"] = floor(1 MINUTES / rpm) // 3 minutes so that the values look greater than they actually are + data["burst_firerate"] = floor(1 MINUTES / burst_rpm) data["firerate_second"] = round(1 SECONDS / rpm, 0.01) data["burst_firerate_second"] = round(1 SECONDS / burst_rpm, 0.01) data["scatter"] = max(0.1, scatter + src.scatter) @@ -1222,7 +1224,7 @@ and you're good to go. return TRUE //>>POST PROCESSING AND CLEANUP BEGIN HERE.<< - var/angle = round(Get_Angle(user,target)) //Let's do a muzzle flash. + var/angle = floor(Get_Angle(user,target)) //Let's do a muzzle flash. muzzle_flash(angle,user) //This is where we load the next bullet in the chamber. We check for attachments too, since we don't want to load anything if an attachment is active. @@ -1417,7 +1419,7 @@ and you're good to go. for(var/i in 1 to projectile_to_fire.ammo.bonus_projectiles_amount) BP = new /obj/projectile(attacked_mob.loc, create_cause_data(initial(name), user)) BP.generate_bullet(GLOB.ammo_list[projectile_to_fire.ammo.bonus_projectiles_type], 0, NO_FLAGS) - BP.accuracy = round(BP.accuracy * projectile_to_fire.accuracy/initial(projectile_to_fire.accuracy)) //Modifies accuracy of pellets per fire_bonus_projectiles. + BP.accuracy = floor(BP.accuracy * projectile_to_fire.accuracy/initial(projectile_to_fire.accuracy)) //Modifies accuracy of pellets per fire_bonus_projectiles. BP.damage *= damage_buff BP.bonus_projectile_check = 2 @@ -1608,6 +1610,9 @@ not all weapons use normal magazines etc. load_into_chamber() itself is designed user = gun_user if(flags_gun_features & GUN_AMMO_COUNTER && current_mag) + // toggleable spam control. + if(user.client.prefs.toggle_prefs & TOGGLE_AMMO_DISPLAY_TYPE && gun_firemode == GUN_FIREMODE_SEMIAUTO && current_mag.current_rounds % 5 != 0 && current_mag.current_rounds > 15) + return var/chambered = in_chamber ? TRUE : FALSE to_chat(user, SPAN_DANGER("[current_mag.current_rounds][chambered ? "+1" : ""] / [current_mag.max_rounds] ROUNDS REMAINING")) @@ -1644,7 +1649,7 @@ not all weapons use normal magazines etc. load_into_chamber() itself is designed if(skill_accuracy) gun_accuracy_mult += skill_accuracy * HIT_ACCURACY_MULT_TIER_3 // Accuracy mult increase/decrease per level is equal to attaching/removing a red dot sight - projectile_to_fire.accuracy = round(projectile_to_fire.accuracy * gun_accuracy_mult) // Apply gun accuracy multiplier to projectile accuracy + projectile_to_fire.accuracy = floor(projectile_to_fire.accuracy * gun_accuracy_mult) // Apply gun accuracy multiplier to projectile accuracy projectile_to_fire.scatter += gun_scatter if(wield_delay > 0 && (world.time < wield_time || world.time < pull_time)) @@ -1658,7 +1663,7 @@ not all weapons use normal magazines etc. load_into_chamber() itself is designed var/scatter_debuff = 1 + (SETTLE_SCATTER_MULTIPLIER - 1) * pct_settled projectile_to_fire.scatter *= scatter_debuff - projectile_to_fire.damage = round(projectile_to_fire.damage * damage_mult) // Apply gun damage multiplier to projectile damage + projectile_to_fire.damage = floor(projectile_to_fire.damage * damage_mult) // Apply gun damage multiplier to projectile damage // Apply effective range and falloffs/buildups projectile_to_fire.damage_falloff = damage_falloff_mult * projectile_to_fire.ammo.damage_falloff diff --git a/code/modules/projectiles/gun_attachables.dm b/code/modules/projectiles/gun_attachables.dm index a2801821349c..d1aff8a33969 100644 --- a/code/modules/projectiles/gun_attachables.dm +++ b/code/modules/projectiles/gun_attachables.dm @@ -1761,8 +1761,6 @@ Defined in conflicts.dm of the #defines folder. //but at the same time you are slow when 2 handed aim_speed_mod = CONFIG_GET(number/slowdown_med) - matter = list("wood" = 2000) - select_gamemode_skin(type) /obj/item/attachable/stock/double @@ -3225,6 +3223,10 @@ Defined in conflicts.dm of the #defines folder. to_chat(user, SPAN_WARNING("This chemical will clog the nozzle!")) return + if(istype(gun.current_mag, /obj/item/ammo_magazine/flamer_tank/smoke)) // you can't fire smoke like a projectile! + to_chat(user, SPAN_WARNING("[src] can't be used with this fuel tank!")) + return + gun.last_fired = world.time gun.current_mag.reagents.remove_reagent(flamer_reagent.id, FLAME_REAGENT_USE_AMOUNT * fuel_per_projectile) @@ -3239,7 +3241,7 @@ Defined in conflicts.dm of the #defines folder. var/turf/user_turf = get_turf(user) playsound(user_turf, pick(fire_sounds), 50, TRUE) - to_chat(user, SPAN_WARNING("The gauge reads: [round(gun.current_mag.get_ammo_percent())]% fuel remaining!")) + to_chat(user, SPAN_WARNING("The gauge reads: [floor(gun.current_mag.get_ammo_percent())]% fuel remaining!")) /obj/item/attachable/verticalgrip name = "vertical grip" diff --git a/code/modules/projectiles/gun_helpers.dm b/code/modules/projectiles/gun_helpers.dm index e5d0ef1c0ef8..c4cce7c5f996 100644 --- a/code/modules/projectiles/gun_helpers.dm +++ b/code/modules/projectiles/gun_helpers.dm @@ -517,11 +517,11 @@ DEFINES in setup.dm, referenced here. return FALSE if(istype(slot) && (slot.storage_flags & STORAGE_ALLOW_QUICKDRAW)) - for(var/obj/cycled_weapon in slot.return_inv()) - if(isweapon(cycled_weapon)) + for(var/obj/cycled_object in slot.return_inv()) + if(cycled_object.flags_atom & QUICK_DRAWABLE) return slot - if(isweapon(slot)) //then check for weapons + if(slot.flags_atom & QUICK_DRAWABLE) return slot return FALSE @@ -765,7 +765,6 @@ DEFINES in setup.dm, referenced here. unique_action(usr) - /obj/item/weapon/gun/verb/toggle_gun_safety() set category = "Weapons" set name = "Toggle Gun Safety" @@ -933,6 +932,15 @@ DEFINES in setup.dm, referenced here. return null return params2turf(modifiers["screen-loc"], get_turf(user), user.client) +/// check if the gun contains any light source that is currently turned on. +/obj/item/weapon/gun/proc/light_sources() + var/obj/item/attachable/flashlight/torch + for(var/slot in attachments) + torch = attachments[slot] + if(istype(torch) && torch.light_on == TRUE) + return TRUE // an attachment has light enabled. + return FALSE + /// If this gun has a relevant flashlight attachable attached, (de)activate it /obj/item/weapon/gun/proc/force_light(on) var/obj/item/attachable/flashlight/torch diff --git a/code/modules/projectiles/guns/energy.dm b/code/modules/projectiles/guns/energy.dm index ee122d8f8edd..b2ec3dea63ce 100644 --- a/code/modules/projectiles/guns/energy.dm +++ b/code/modules/projectiles/guns/energy.dm @@ -67,7 +67,7 @@ /obj/item/weapon/gun/energy/emp_act(severity) . = ..() - cell.use(round(cell.maxcharge / severity)) + cell.use(floor(cell.maxcharge / severity)) update_icon() /obj/item/weapon/gun/energy/load_into_chamber() diff --git a/code/modules/projectiles/guns/flamer/flamer.dm b/code/modules/projectiles/guns/flamer/flamer.dm index 64499a71bb12..b15856af1637 100644 --- a/code/modules/projectiles/guns/flamer/flamer.dm +++ b/code/modules/projectiles/guns/flamer/flamer.dm @@ -64,7 +64,7 @@ /obj/item/weapon/gun/flamer/get_examine_text(mob/user) . = ..() if(current_mag) - . += "The fuel gauge shows the current tank is [round(current_mag.get_ammo_percent())]% full!" + . += "The fuel gauge shows the current tank is [floor(current_mag.get_ammo_percent())]% full!" else . += "There's no tank in [src]!" @@ -136,10 +136,13 @@ click_empty(user) else user.track_shot(initial(name)) - if(current_mag.reagents.has_reagent("stablefoam")) - unleash_foam(target, user) + if(istype(current_mag, /obj/item/ammo_magazine/flamer_tank/smoke)) + unleash_smoke(target, user) else - unleash_flame(target, user) + if(current_mag.reagents.has_reagent("stablefoam")) + unleash_foam(target, user) + else + unleash_flame(target, user) return AUTOFIRE_CONTINUE return NONE @@ -229,6 +232,66 @@ new /obj/flamer_fire(to_fire, create_cause_data(initial(name), user), R, max_range, current_mag.reagents, flameshape, target, CALLBACK(src, PROC_REF(show_percentage), user), fuel_pressure, fire_type) +/obj/item/weapon/gun/flamer/proc/unleash_smoke(atom/target, mob/living/user) + last_fired = world.time + if(!current_mag || !current_mag.reagents || !current_mag.reagents.reagent_list.len) + return + + var/source_turf = get_turf(user) + var/smoke_range = 5 // the max range the smoke will travel + var/distance = 0 // the distance traveled + var/use_multiplier = 3 // if you want to increase the ammount of units drained from the tank + var/units_in_smoke = 35 // the smoke overlaps a little so this much is probably already good + + var/datum/reagent/chemical = current_mag.reagents.reagent_list[1] + var/datum/reagents/to_disperse = new() // this is the chemholder that will be used by the chemsmoke + to_disperse.add_reagent(chemical.id, units_in_smoke) + to_disperse.my_atom = src + + var/turf/turfs[] = get_line(user, target, FALSE) + var/turf/first_turf = turfs[1] + var/turf/second_turf = turfs[2] + var/ammount_required = (min(turfs.len, smoke_range) * use_multiplier) // the ammount of units that this click requires + for(var/turf/turf in turfs) + + if(chemical.volume < ammount_required) + smoke_range = floor(chemical.volume / use_multiplier) + + if(distance >= smoke_range) + break + + if(turf.density) + break + else + var/obj/effect/particle_effect/smoke/chem/checker = new() + var/atom/blocked = LinkBlocked(checker, source_turf, turf) + if(blocked) + break + + playsound(turf, 'sound/effects/smoke.ogg', 25, 1) + if(turf != first_turf && turf != second_turf) // we skip the first tile and make it small on the second so the smoke doesn't touch the user + var/datum/effect_system/smoke_spread/chem/smoke = new() + smoke.set_up(to_disperse, 5, loca = turf) + smoke.start() + if(turf == second_turf) + var/datum/effect_system/smoke_spread/chem/smoke = new() + smoke.set_up(to_disperse, 1, loca = turf) + smoke.start() + sleep(2) + + distance++ + + var/ammount_used = distance * use_multiplier // the actual ammount of units that we used + + chemical.volume = max(chemical.volume - ammount_used, 0) + + current_mag.reagents.total_volume = chemical.volume // this is needed for show_percentage to work + + if(chemical.volume < use_multiplier) // there aren't enough units left for a single tile of smoke, empty the tank + current_mag.reagents.clear_reagents() + + show_percentage(user) + /obj/item/weapon/gun/flamer/proc/unleash_foam(atom/target, mob/living/user) last_fired = world.time if(!current_mag || !current_mag.reagents || !current_mag.reagents.reagent_list.len) @@ -246,7 +309,7 @@ for(var/turf/turf in turfs) if(chemical.volume < ammount_required) - foam_range = round(chemical.volume / use_multiplier) + foam_range = floor(chemical.volume / use_multiplier) if(distance >= foam_range) break @@ -284,7 +347,7 @@ /obj/item/weapon/gun/flamer/proc/show_percentage(mob/living/user) if(current_mag) - to_chat(user, SPAN_WARNING("The gauge reads: [round(current_mag.get_ammo_percent())]% fuel remains!")) + to_chat(user, SPAN_WARNING("The gauge reads: [floor(current_mag.get_ammo_percent())]% fuel remains!")) /obj/item/weapon/gun/flamer/underextinguisher starting_attachment_types = list(/obj/item/attachable/attached_gun/extinguisher) @@ -584,7 +647,7 @@ if(!(sig_result & COMPONENT_NO_IGNITE)) switch(fire_variant) if(FIRE_VARIANT_TYPE_B) //Armor Shredding Greenfire, super easy to pat out. 50 duration -> 10 stacks (1 pat/resist) - ignited_morb.TryIgniteMob(round(tied_reagent.durationfire / 5), tied_reagent) + ignited_morb.TryIgniteMob(floor(tied_reagent.durationfire / 5), tied_reagent) else ignited_morb.TryIgniteMob(tied_reagent.durationfire, tied_reagent) @@ -642,7 +705,7 @@ return var/sig_result = SEND_SIGNAL(M, COMSIG_LIVING_FLAMER_CROSSED, tied_reagent) - var/burn_damage = round(burnlevel * 0.5) + var/burn_damage = floor(burnlevel * 0.5) switch(fire_variant) if(FIRE_VARIANT_TYPE_B) //Armor Shredding Greenfire, 2x tile damage (Equiavlent to UT) burn_damage = burnlevel @@ -661,7 +724,7 @@ if(!(sig_result & COMPONENT_NO_IGNITE) && burn_damage) switch(fire_variant) if(FIRE_VARIANT_TYPE_B) //Armor Shredding Greenfire, super easy to pat out. 50 duration -> 10 stacks (1 pat/resist) - M.TryIgniteMob(round(tied_reagent.durationfire / 5), tied_reagent) + M.TryIgniteMob(floor(tied_reagent.durationfire / 5), tied_reagent) else M.TryIgniteMob(tied_reagent.durationfire, tied_reagent) diff --git a/code/modules/projectiles/guns/flamer/flameshape.dm b/code/modules/projectiles/guns/flamer/flameshape.dm index 3e5e398c91e8..0b7c01ed0b0b 100644 --- a/code/modules/projectiles/guns/flamer/flameshape.dm +++ b/code/modules/projectiles/guns/flamer/flameshape.dm @@ -67,7 +67,7 @@ return GLOB.alldirs /datum/flameshape/star/handle_fire_spread(obj/flamer_fire/F, fire_spread_amount, burn_dam, fuel_pressure = 1) - fire_spread_amount = Floor(fire_spread_amount * 1.5) // branch 'length' + fire_spread_amount = floor(fire_spread_amount * 1.5) // branch 'length' var/turf/source_turf = get_turf(F.loc) var/list/dirs = dirs_to_use() diff --git a/code/modules/projectiles/guns/pistols.dm b/code/modules/projectiles/guns/pistols.dm index 362841651b2d..3a85db687b26 100644 --- a/code/modules/projectiles/guns/pistols.dm +++ b/code/modules/projectiles/guns/pistols.dm @@ -715,7 +715,7 @@ /obj/item/weapon/gun/pistol/vp78/set_gun_config_values() ..() - set_fire_delay(FIRE_DELAY_TIER_4) + set_fire_delay(FIRE_DELAY_TIER_7) set_burst_amount(BURST_AMOUNT_TIER_3) set_burst_delay(FIRE_DELAY_TIER_11) accuracy_mult = BASE_ACCURACY_MULT diff --git a/code/modules/projectiles/guns/revolvers.dm b/code/modules/projectiles/guns/revolvers.dm index 48f237f9b562..d031074dabd7 100644 --- a/code/modules/projectiles/guns/revolvers.dm +++ b/code/modules/projectiles/guns/revolvers.dm @@ -534,7 +534,7 @@ desc = "Used to swap the barrels of a mateba revolver." icon = 'icons/obj/items/items.dmi' icon_state = "matebakey" - flags_atom = FPRINT|CONDUCT + flags_atom = FPRINT|QUICK_DRAWABLE|CONDUCT force = 5 w_class = SIZE_TINY throwforce = 5 diff --git a/code/modules/projectiles/guns/specialist/launcher/grenade_launcher.dm b/code/modules/projectiles/guns/specialist/launcher/grenade_launcher.dm index f1d951324930..e2643c580a16 100644 --- a/code/modules/projectiles/guns/specialist/launcher/grenade_launcher.dm +++ b/code/modules/projectiles/guns/specialist/launcher/grenade_launcher.dm @@ -175,7 +175,7 @@ SPAN_WARNING("[to_firer]"), message_flags = CHAT_TYPE_WEAPON_USE) playsound(user.loc, fire_sound, 50, 1) - var/angle = round(Get_Angle(user,target)) + var/angle = floor(Get_Angle(user,target)) muzzle_flash(angle,user) simulate_recoil(0, user) diff --git a/code/modules/projectiles/guns/specialist/launcher/rocket_launcher.dm b/code/modules/projectiles/guns/specialist/launcher/rocket_launcher.dm index 356d0e6c3b48..1f0ae4aed571 100644 --- a/code/modules/projectiles/guns/specialist/launcher/rocket_launcher.dm +++ b/code/modules/projectiles/guns/specialist/launcher/rocket_launcher.dm @@ -189,12 +189,18 @@ smoke.set_up(1, 0, backblast_loc, turn(user.dir, 180)) smoke.start() playsound(src, 'sound/weapons/gun_rocketlauncher.ogg', 100, TRUE, 10) - for(var/mob/living/carbon/C in backblast_loc) - if(C.body_position == STANDING_UP && !HAS_TRAIT(C, TRAIT_EAR_PROTECTION)) //Have to be standing up to get the fun stuff - C.apply_damage(15, BRUTE) //The shockwave hurts, quite a bit. It can knock unarmored targets unconscious in real life - C.apply_effect(4, STUN) //For good measure - C.apply_effect(6, STUTTER) - C.emote("pain") + for(var/mob/living/carbon/mob in backblast_loc) + if(mob.body_position != STANDING_UP || HAS_TRAIT(mob, TRAIT_EAR_PROTECTION)) //Have to be standing up to get the fun stuff + continue + to_chat(mob, SPAN_BOLDWARNING("You got hit by the backblast!")) + mob.apply_damage(15, BRUTE) //The shockwave hurts, quite a bit. It can knock unarmored targets unconscious in real life + var/knockdown_amount = 6 + if(isxeno(mob)) + var/mob/living/carbon/xenomorph/xeno = mob + knockdown_amount = knockdown_amount * (1 - xeno.caste?.xeno_explosion_resistance / 100) + mob.KnockDown(knockdown_amount) + mob.apply_effect(6, STUTTER) + mob.emote("pain") //------------------------------------------------------- //M5 RPG'S MEAN FUCKING COUSIN diff --git a/code/modules/projectiles/guns/specialist/sniper.dm b/code/modules/projectiles/guns/specialist/sniper.dm index 5b4a81fde273..4c5a4fb129cd 100644 --- a/code/modules/projectiles/guns/specialist/sniper.dm +++ b/code/modules/projectiles/guns/specialist/sniper.dm @@ -104,7 +104,7 @@ human.face_atom(target) ///Add a decisecond to the default 1.5 seconds for each two tiles to hit. - var/distance = round(get_dist(target, human) * 0.5) + var/distance = floor(get_dist(target, human) * 0.5) var/f_aiming_time = sniper_rifle.aiming_time + distance var/aim_multiplier = 1 diff --git a/code/modules/projectiles/magazines/flamer.dm b/code/modules/projectiles/magazines/flamer.dm index dfd9eda20d8a..bf5663cad069 100644 --- a/code/modules/projectiles/magazines/flamer.dm +++ b/code/modules/projectiles/magazines/flamer.dm @@ -90,7 +90,7 @@ to_chat(user, SPAN_WARNING("You can't mix fuel mixtures!")) return - if(!to_add.intensityfire && to_add.id != "stablefoam") + if(!to_add.intensityfire && to_add.id != "stablefoam" && !istype(src, /obj/item/ammo_magazine/flamer_tank/smoke)) to_chat(user, SPAN_WARNING("This chemical is not potent enough to be used in a flamethrower!")) return @@ -236,3 +236,9 @@ max_intensity = 60 max_range = 8 max_duration = 50 + +/obj/item/ammo_magazine/flamer_tank/smoke + name = "Custom incinerator smoke tank" + desc = "A tank holding powdered smoke that expands when exposed to an open flame and carries any chemicals along with it." + matter = list("metal" = 3750) + flamer_chem = null diff --git a/code/modules/projectiles/magazines/specialist.dm b/code/modules/projectiles/magazines/specialist.dm index 698d9efeaca2..547d231e1c69 100644 --- a/code/modules/projectiles/magazines/specialist.dm +++ b/code/modules/projectiles/magazines/specialist.dm @@ -254,10 +254,16 @@ user.put_in_hands(fuel) fuel = null update_icon() - desc = initial(desc) + "\n Contains[fuel?" fuel":""] [warhead?" and warhead":""]." return . = ..() +/obj/item/ammo_magazine/rocket/custom/get_examine_text(mob/user) + . = ..() + if(fuel) + . += SPAN_NOTICE("Contains fuel.") + if(warhead) + . += SPAN_NOTICE("Contains a warhead.") + /obj/item/ammo_magazine/rocket/custom/attackby(obj/item/W as obj, mob/user as mob) if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_ENGI)) to_chat(user, SPAN_WARNING("You do not know how to tinker with [name].")) @@ -284,7 +290,6 @@ W.forceMove(src) fuel = W to_chat(user, SPAN_DANGER("You add [W] to [name].")) - desc = initial(desc) + "\n Contains[fuel?" fuel":""] [warhead?" and warhead":""]." playsound(loc, 'sound/items/Screwdriver2.ogg', 25, 0, 6) else if(istype(W,/obj/item/explosive/warhead/rocket) && !locked) if(warhead) @@ -298,7 +303,6 @@ W.forceMove(src) warhead = W to_chat(user, SPAN_DANGER("You add [W] to [name].")) - desc = initial(desc) + "\n Contains[fuel?" fuel":""] [warhead?" and warhead":""]." playsound(loc, 'sound/items/Screwdriver2.ogg', 25, 0, 6) update_icon() diff --git a/code/modules/projectiles/projectile.dm b/code/modules/projectiles/projectile.dm index edb565158185..9026a3e849e6 100644 --- a/code/modules/projectiles/projectile.dm +++ b/code/modules/projectiles/projectile.dm @@ -181,9 +181,9 @@ last_damage_mult = 1 if(effective_range_min && distance_travelled < effective_range_min) - return max(0, damage - round((effective_range_min - distance_travelled) * damage_buildup)) + return max(0, damage - floor((effective_range_min - distance_travelled) * damage_buildup)) else if(distance_travelled > effective_range_max) - return max(0, damage - round((distance_travelled - effective_range_max) * damage_falloff)) + return max(0, damage - floor((distance_travelled - effective_range_max) * damage_falloff)) return damage // Target, firer, shot from (i.e. the gun), projectile range, projectile speed, original target (who was aimed at, not where projectile is going towards) @@ -358,14 +358,7 @@ SEND_SIGNAL(src, COMSIG_BULLET_TERMINAL) // Check we can reach the turf at all based on pathed grid - var/proj_dir = get_dir(current_turf, next_turf) - if((proj_dir & (proj_dir - 1)) && !current_turf.Adjacent(next_turf)) - ammo.on_hit_turf(current_turf, src) - current_turf.bullet_act(src) - return TRUE - - // Check for hits that would occur when moving to turf, such as a blocking cade - if(scan_a_turf(next_turf, proj_dir)) + if(check_canhit(current_turf, next_turf)) return TRUE // Actually move @@ -379,7 +372,7 @@ return TRUE // Process on move effects - if(distance_travelled == round(ammo.max_range / 2)) + if(distance_travelled == floor(ammo.max_range / 2)) ammo.do_at_half_range(src) if(distance_travelled >= ammo.max_range) ammo.do_at_max_range(src) @@ -533,7 +526,8 @@ else direct_hit = TRUE - SEND_SIGNAL(firer, COMSIG_BULLET_DIRECT_HIT, L) + if(firer) + SEND_SIGNAL(firer, COMSIG_BULLET_DIRECT_HIT, L) // At present, Xenos have no inherent effects or localized damage stemming from limb targeting // Therefore we exempt the shooter from direct hit accuracy penalties as well, @@ -600,6 +594,19 @@ if(SEND_SIGNAL(src, COMSIG_BULLET_POST_HANDLE_MOB, L, .) & COMPONENT_BULLET_PASS_THROUGH) return FALSE +/obj/projectile/proc/check_canhit(turf/current_turf, turf/next_turf) + var/proj_dir = get_dir(current_turf, next_turf) + if((proj_dir & (proj_dir - 1)) && !current_turf.Adjacent(next_turf)) + ammo.on_hit_turf(current_turf, src) + current_turf.bullet_act(src) + return TRUE + + // Check for hits that would occur when moving to turf, such as a blocking cade + if(scan_a_turf(next_turf, proj_dir)) + return TRUE + + return FALSE + //---------------------------------------------------------- // \\ // HITTING THE TARGET \\ @@ -1022,7 +1029,7 @@ . = TRUE apply_damage(damage_result, P.ammo.damage_type, P.def_zone, firer = P.firer) - if(P.ammo.shrapnel_chance > 0 && prob(P.ammo.shrapnel_chance + round(damage / 10))) + if(P.ammo.shrapnel_chance > 0 && prob(P.ammo.shrapnel_chance + floor(damage / 10))) if(ammo_flags & AMMO_SPECIAL_EMBED) P.ammo.on_embed(src, organ) @@ -1121,7 +1128,7 @@ P.play_shielded_hit_effect(src) else P.play_hit_effect(src) - if(!stat && prob(5 + round(damage_result / 4))) + if(!stat && prob(5 + floor(damage_result / 4))) var/pain_emote = prob(70) ? "hiss" : "roar" emote(pain_emote) updatehealth() @@ -1164,12 +1171,12 @@ switch(P.ammo.damage_type) if(BRUTE) //Rockets do extra damage to walls. if(ammo_flags & AMMO_ROCKET) - damage = round(damage * 10) + damage = floor(damage * 10) if(BURN) if(ammo_flags & AMMO_ENERGY) - damage = round(damage * 7) + damage = floor(damage * 7) else if(ammo_flags & AMMO_ANTISTRUCT) // Railgun does extra damage to turfs - damage = round(damage * ANTISTRUCT_DMG_MULT_WALL) + damage = floor(damage * ANTISTRUCT_DMG_MULT_WALL) if(ammo_flags & AMMO_BALLISTIC) current_bulletholes++ take_damage(damage, P.firer) @@ -1198,7 +1205,7 @@ /obj/structure/surface/table/bullet_act(obj/projectile/P) bullet_ping(P) - health -= round(P.damage/2) + health -= floor(P.damage/2) if(health < 0) visible_message(SPAN_WARNING("[src] breaks down!")) deconstruct() diff --git a/code/modules/reagents/Chemistry-Colours.dm b/code/modules/reagents/Chemistry-Colours.dm index 70705160f462..f600a7479070 100644 --- a/code/modules/reagents/Chemistry-Colours.dm +++ b/code/modules/reagents/Chemistry-Colours.dm @@ -55,7 +55,7 @@ var/mixedcolor = 0 for(i=1; i<=contents; i++) mixedcolor += weight[i]*color[i] - mixedcolor = round(mixedcolor) + mixedcolor = floor(mixedcolor) //until someone writes a formal proof for this algorithm, let's keep this in // if(mixedcolor<0x00 || mixedcolor>0xFF) diff --git a/code/modules/reagents/Chemistry-Generator.dm b/code/modules/reagents/Chemistry-Generator.dm index b2e6402d4b06..0b03b621e388 100644 --- a/code/modules/reagents/Chemistry-Generator.dm +++ b/code/modules/reagents/Chemistry-Generator.dm @@ -307,7 +307,7 @@ if(isNegativeProperty(P)) new_value = -1 * level else if(isNeutralProperty(P)) - new_value = round(-1 * level / 2) + new_value = floor(-1 * level / 2) else new_value = level diff --git a/code/modules/reagents/Chemistry-Holder.dm b/code/modules/reagents/Chemistry-Holder.dm index 36e8f9e179ff..710cca821385 100644 --- a/code/modules/reagents/Chemistry-Holder.dm +++ b/code/modules/reagents/Chemistry-Holder.dm @@ -266,7 +266,7 @@ if(!has_reagent(B, C.required_reagents[B])) break total_matching_reagents++ - multipliers += round(get_reagent_amount(B) / C.required_reagents[B]) + multipliers += floor(get_reagent_amount(B) / C.required_reagents[B]) for(var/B in C.required_catalysts) if(B == "silver" && istype(my_atom, /obj/item/reagent_container/glass/beaker/silver)) total_matching_catalysts++ @@ -594,9 +594,9 @@ dir = E.dir //only integers please - radius = round(radius) - intensity = round(intensity) - duration = round(duration) + radius = floor(radius) + intensity = floor(intensity) + duration = floor(duration) if(ex_power > 0) explode(sourceturf, ex_power, ex_falloff, ex_falloff_shape, dir, angle) if(intensity > 0) @@ -630,7 +630,7 @@ if(my_atom) //It exists outside of null space. for(var/datum/reagent/R in reagent_list) // if you want to do extra stuff when other chems are present, do it here if(R.id == "iron") - shards += round(R.volume) + shards += floor(R.volume) else if(R.id == "phoron" && R.volume >= EXPLOSION_PHORON_THRESHOLD) shard_type = /datum/ammo/bullet/shrapnel/incendiary diff --git a/code/modules/reagents/chemical_research/Chemical-Research.dm b/code/modules/reagents/chemical_research/Chemical-Research.dm index e66cb474df50..2050e7e8e607 100644 --- a/code/modules/reagents/chemical_research/Chemical-Research.dm +++ b/code/modules/reagents/chemical_research/Chemical-Research.dm @@ -115,7 +115,7 @@ GLOBAL_DATUM_INIT(chemical_data, /datum/chemical_data, new) return FALSE //Make the chem storage scale with number of dispensers storage.recharge_rate += 5 - storage.max_energy += 50 + storage.max_energy += 100 storage.energy = storage.max_energy return storage @@ -125,7 +125,7 @@ GLOBAL_DATUM_INIT(chemical_data, /datum/chemical_data, new) return FALSE //Make the chem storage scale with number of dispensers storage.recharge_rate -= 5 - storage.max_energy -= 50 + storage.max_energy -= 100 storage.energy = storage.max_energy return TRUE diff --git a/code/modules/reagents/chemistry_machinery/acid_harness.dm b/code/modules/reagents/chemistry_machinery/acid_harness.dm index b349b3224d1a..4fa087efc54f 100644 --- a/code/modules/reagents/chemistry_machinery/acid_harness.dm +++ b/code/modules/reagents/chemistry_machinery/acid_harness.dm @@ -162,13 +162,13 @@ switch(action) if("set_inject_amount") - var/inject = round(text2num(params["value"])) + var/inject = floor(text2num(params["value"])) if(inject < 1) inject = 1 acid_core.inject_amount = inject . = TRUE if("set_inject_damage_threshold") - acid_core.inject_damage_threshold = round(text2num(params["value"])) + acid_core.inject_damage_threshold = floor(text2num(params["value"])) . = TRUE if("inject_logic") if(acid_core.inject_logic == ACID_LOGIC_OR) diff --git a/code/modules/reagents/chemistry_machinery/centrifuge.dm b/code/modules/reagents/chemistry_machinery/centrifuge.dm index 6143313377a0..706f33e38096 100644 --- a/code/modules/reagents/chemistry_machinery/centrifuge.dm +++ b/code/modules/reagents/chemistry_machinery/centrifuge.dm @@ -208,7 +208,7 @@ else A.name = "autoinjector (" + A.reagents.reagent_list[1].name + ")" var/numberOfUses = A.reagents.total_volume / A.amount_per_transfer_from_this - A.uses_left = round(numberOfUses) == numberOfUses ? numberOfUses : round(numberOfUses) + 1 + A.uses_left = floor(numberOfUses) == numberOfUses ? numberOfUses : floor(numberOfUses) + 1 A.update_icon() else if(autolabel) diff --git a/code/modules/reagents/chemistry_machinery/chem_dispenser.dm b/code/modules/reagents/chemistry_machinery/chem_dispenser.dm index 62b095ababbe..e897d106528e 100644 --- a/code/modules/reagents/chemistry_machinery/chem_dispenser.dm +++ b/code/modules/reagents/chemistry_machinery/chem_dispenser.dm @@ -134,8 +134,8 @@ /obj/structure/machinery/chem_dispenser/ui_data(mob/user) . = list() .["amount"] = amount - .["energy"] = round(chem_storage.energy) - .["maxEnergy"] = round(chem_storage.max_energy) + .["energy"] = floor(chem_storage.energy) + .["maxEnergy"] = floor(chem_storage.max_energy) .["isBeakerLoaded"] = beaker ? 1 : 0 var/list/beakerContents = list() diff --git a/code/modules/reagents/chemistry_machinery/chem_simulator.dm b/code/modules/reagents/chemistry_machinery/chem_simulator.dm index dd7f008e47d2..42576bdeccd4 100644 --- a/code/modules/reagents/chemistry_machinery/chem_simulator.dm +++ b/code/modules/reagents/chemistry_machinery/chem_simulator.dm @@ -442,7 +442,7 @@ for(var/datum/chem_property/P in creation_template) creation_cost += max(abs(P.value), 1) * P.level if(P.level > 5) // a penalty is added at each level above 5 (+1 at 6, +2 at 7, +4 at 8, +5 at 9, +7 at 10) - creation_cost += P.level - 6 + Ceiling((P.level - 5) / 2) + creation_cost += P.level - 6 + ceil((P.level - 5) / 2) creation_cost += ((new_od_level - 10) / 5) * 3 //3 cost for every 5 units above 10 for(var/rarity in creation_complexity) switch(rarity) diff --git a/code/modules/reagents/chemistry_machinery/chem_storage.dm b/code/modules/reagents/chemistry_machinery/chem_storage.dm index 3df417741d82..a5196147febe 100644 --- a/code/modules/reagents/chemistry_machinery/chem_storage.dm +++ b/code/modules/reagents/chemistry_machinery/chem_storage.dm @@ -12,7 +12,7 @@ var/recharge_cooldown = 15 var/recharge_rate = 10 var/energy = 50 - var/max_energy = 50 + var/max_energy = 100 unslashable = TRUE unacidable = TRUE @@ -41,7 +41,7 @@ /obj/structure/machinery/chem_storage/get_examine_text(mob/user) . = ..() if(in_range(user, src) || istype(user, /mob/dead/observer)) - var/charge = round((energy / max_energy) * 100) + var/charge = floor((energy / max_energy) * 100) . += SPAN_NOTICE("The charge meter reads [charge]%") /obj/structure/machinery/chem_storage/process() diff --git a/code/modules/reagents/chemistry_machinery/reagent_grinder.dm b/code/modules/reagents/chemistry_machinery/reagent_grinder.dm index 3c596b6a79a2..69e6567393b9 100644 --- a/code/modules/reagents/chemistry_machinery/reagent_grinder.dm +++ b/code/modules/reagents/chemistry_machinery/reagent_grinder.dm @@ -270,7 +270,7 @@ else if(O.potency == -1) return 5 else - return round(O.potency) + return floor(O.potency) /obj/structure/machinery/reagentgrinder/proc/get_juice_amount(obj/item/reagent_container/food/snacks/grown/O) if(!istype(O)) @@ -278,7 +278,7 @@ else if(O.potency == -1) return 5 else - return round(5*sqrt(O.potency)) + return floor(5*sqrt(O.potency)) /obj/structure/machinery/reagentgrinder/proc/remove_object(obj/item/O) holdingitems -= O @@ -348,7 +348,7 @@ O.reagents.remove_reagent("nutriment", min(O.reagents.get_reagent_amount("nutriment"), space)) else if(O.reagents != null && O.reagents.has_reagent("nutriment")) - beaker.reagents.add_reagent(r_id, min(round(O.reagents.get_reagent_amount("nutriment")*abs(amount)), space)) + beaker.reagents.add_reagent(r_id, min(floor(O.reagents.get_reagent_amount("nutriment")*abs(amount)), space)) O.reagents.remove_reagent("nutriment", min(O.reagents.get_reagent_amount("nutriment"), space)) else diff --git a/code/modules/reagents/chemistry_properties/prop_neutral.dm b/code/modules/reagents/chemistry_properties/prop_neutral.dm index e1e59b8b886c..67120f4e2627 100644 --- a/code/modules/reagents/chemistry_properties/prop_neutral.dm +++ b/code/modules/reagents/chemistry_properties/prop_neutral.dm @@ -25,7 +25,7 @@ value = 1 /datum/chem_property/neutral/thanatometabolizing/pre_process(mob/living/M) - if(M.stat != DEAD && M.oxyloss < 50 && round(M.blood_volume) > BLOOD_VOLUME_OKAY) + if(M.stat != DEAD && M.oxyloss < 50 && floor(M.blood_volume) > BLOOD_VOLUME_OKAY) return list(REAGENT_CANCEL = TRUE) var/effectiveness = 1 if(M.stat != DEAD) diff --git a/code/modules/reagents/chemistry_reactions/other.dm b/code/modules/reagents/chemistry_reactions/other.dm index 28250aa38803..08402e82ed7f 100644 --- a/code/modules/reagents/chemistry_reactions/other.dm +++ b/code/modules/reagents/chemistry_reactions/other.dm @@ -38,7 +38,7 @@ var/location = get_turf(holder.my_atom) // 100 created volume = 4 heavy range & 7 light range. A few tiles smaller than traitor EMP grandes. // 200 created volume = 8 heavy range & 14 light range. 4 tiles larger than traitor EMP grenades. - empulse(location, round(created_volume / 24), round(created_volume / 14), 1) + empulse(location, floor(created_volume / 24), floor(created_volume / 14), 1) holder.clear_reagents() diff --git a/code/modules/reagents/chemistry_reagents/drink.dm b/code/modules/reagents/chemistry_reagents/drink.dm index 9577f61a3dcd..9015736a2923 100644 --- a/code/modules/reagents/chemistry_reagents/drink.dm +++ b/code/modules/reagents/chemistry_reagents/drink.dm @@ -202,7 +202,7 @@ M = holder.my_atom if(prob(1)) M.emote("shiver") - M.bodytemperature = max(M.bodytemperature - 10 * TEMPERATURE_DAMAGE_COEFFICIENT, 0) + M.bodytemperature = max(M.bodytemperature - 10 * TEMPERATURE_DAMAGE_COEFFICIENT, T0C) M.recalculate_move_delay = TRUE holder.remove_reagent("capsaicin", 5) holder.remove_reagent("hotsauce", 5) diff --git a/code/modules/recycling/recycler.dm b/code/modules/recycling/recycler.dm index abbf010bf4cc..b61854d2e788 100644 --- a/code/modules/recycling/recycler.dm +++ b/code/modules/recycling/recycler.dm @@ -90,7 +90,7 @@ /obj/structure/machinery/recycler/proc/output_materials() for(var/material in stored_matter) if(stored_matter[material] >= sheets_per_batch * 3750) - var/sheets = round(stored_matter[material] / 3750) + var/sheets = floor(stored_matter[material] / 3750) stored_matter[material] -= sheets * 3750 var/obj/item/stack/sheet/sheet_stack switch(material) diff --git a/code/modules/recycling/sortingmachinery.dm b/code/modules/recycling/sortingmachinery.dm index ec1c8c245f2b..fb43d85e079d 100644 --- a/code/modules/recycling/sortingmachinery.dm +++ b/code/modules/recycling/sortingmachinery.dm @@ -245,7 +245,7 @@ P.wrapped = O O.forceMove(P) P.w_class = O.w_class - var/i = round(P.w_class) + var/i = floor(P.w_class) if(i in list(1,2,3,4,5)) P.icon_state = "deliverycrate[i]" switch(i) diff --git a/code/modules/shuttle/computer.dm b/code/modules/shuttle/computer.dm index 5f96de812819..2b3407fa9414 100644 --- a/code/modules/shuttle/computer.dm +++ b/code/modules/shuttle/computer.dm @@ -440,6 +440,8 @@ lifeboat.status = LIFEBOAT_LOCKED lifeboat.available = FALSE lifeboat.set_mode(SHUTTLE_IDLE) + lifeboat.alarm_sound_loop?.stop() + lifeboat.playing_launch_announcement_alarm = FALSE var/obj/docking_port/stationary/lifeboat_dock/lifeboat_dock = lifeboat.get_docked() lifeboat_dock.open_dock() xeno_message(SPAN_XENOANNOUNCE("We have wrested away control of one of the metal birds! They shall not escape!"), 3, xeno.hivenumber) diff --git a/code/modules/shuttle/computers/dropship_computer.dm b/code/modules/shuttle/computers/dropship_computer.dm index 92196cb07e2e..08a35b83071d 100644 --- a/code/modules/shuttle/computers/dropship_computer.dm +++ b/code/modules/shuttle/computers/dropship_computer.dm @@ -84,8 +84,8 @@ recharge_duration = recharge_duration * SHUTTLE_COOLING_FACTOR_RECHARGE - dropship.callTime = round(flight_duration) - dropship.rechargeTime = round(recharge_duration) + dropship.callTime = floor(flight_duration) + dropship.rechargeTime = floor(recharge_duration) /obj/structure/machinery/computer/shuttle/dropship/flight/tgui_interact(mob/user, datum/tgui/ui) ui = SStgui.try_update_ui(user, src, ui) @@ -101,7 +101,7 @@ if(disabled) return UI_UPDATE if(!skip_time_lock && world.time < SSticker.mode.round_time_lobby + SHUTTLE_TIME_LOCK) - to_chat(user, SPAN_WARNING("The shuttle is still undergoing pre-flight fueling and cannot depart yet. Please wait another [round((SSticker.mode.round_time_lobby + SHUTTLE_TIME_LOCK-world.time)/600)] minutes before trying again.")) + to_chat(user, SPAN_WARNING("The shuttle is still undergoing pre-flight fueling and cannot depart yet. Please wait another [floor((SSticker.mode.round_time_lobby + SHUTTLE_TIME_LOCK-world.time)/600)] minutes before trying again.")) return UI_CLOSE if(dropship_control_lost) var/remaining_time = timeleft(door_control_cooldown) / 10 diff --git a/code/modules/shuttle/docking.dm b/code/modules/shuttle/docking.dm index 63e220deadc6..aa9f4d6ad470 100644 --- a/code/modules/shuttle/docking.dm +++ b/code/modules/shuttle/docking.dm @@ -41,7 +41,7 @@ rotation = dir2angle(new_dock.dir)-dir2angle(dir) if ((rotation % 90) != 0) rotation += (rotation % 90) //diagonal rotations not allowed, round up - rotation = SIMPLIFY_DEGREES(rotation) + rotation %%= 360 if(!movement_direction) movement_direction = turn(preferred_direction, 180) diff --git a/code/modules/shuttle/shuttle.dm b/code/modules/shuttle/shuttle.dm index 5e8d1db63716..fc4b0ccd2ee9 100644 --- a/code/modules/shuttle/shuttle.dm +++ b/code/modules/shuttle/shuttle.dm @@ -19,6 +19,8 @@ * port can be used in these places, or the docking port is compatible, etc. */ var/id + ///The original template shuttle_id for this shuttle (so without a suffix identifier) + var/template_id ///Possible destinations var/port_destinations ///this should point -away- from the dockingport door, ie towards the ship @@ -105,9 +107,7 @@ ///returns turfs within our projected rectangle in no particular order /obj/docking_port/proc/return_turfs() var/list/L = return_coords() - var/turf/T0 = locate(L[1],L[2],z) - var/turf/T1 = locate(L[3],L[4],z) - return block(T0,T1) + return block(L[1], L[2], z, L[3], L[4], z) /obj/docking_port/proc/return_center_turf() var/list/L = return_coords() @@ -123,8 +123,8 @@ if(EAST) cos = 0 sin = -1 - var/_x = L[1] + (round(width/2))*cos - (round(height/2))*sin - var/_y = L[2] + (round(width/2))*sin + (round(height/2))*cos + var/_x = L[1] + (floor(width/2))*cos - (floor(height/2))*sin + var/_y = L[2] + (floor(width/2))*sin + (floor(height/2))*cos return locate(_x, _y, z) //returns turfs within our projected rectangle in a specific order. @@ -159,9 +159,7 @@ //Debug proc used to highlight bounding area /obj/docking_port/proc/highlight(_color) var/list/L = return_coords() - var/turf/T0 = locate(L[1],L[2],z) - var/turf/T1 = locate(L[3],L[4],z) - for(var/turf/T in block(T0,T1)) + for(var/turf/T as anything in block(L[1], L[2], z, L[3], L[4], z)) T.color = _color T.maptext = null if(_color) @@ -525,6 +523,7 @@ id = "[id][idnum]" if(name == initial(name)) name = "[name] [idnum]" + template_id = template.shuttle_id // Value without the idnum // ================ END CM Change ================ for(var/area/place as anything in shuttle_areas) diff --git a/code/modules/shuttle/shuttles/dropship.dm b/code/modules/shuttle/shuttles/dropship.dm index cb04d9a81ddb..86e869b3361e 100644 --- a/code/modules/shuttle/shuttles/dropship.dm +++ b/code/modules/shuttle/shuttles/dropship.dm @@ -29,6 +29,7 @@ var/automated_lz_id var/automated_delay var/automated_timer + var/datum/cas_signal/paradrop_signal /obj/docking_port/mobile/marine_dropship/Initialize(mapload) diff --git a/code/modules/shuttles/marine_ferry.dm b/code/modules/shuttles/marine_ferry.dm index 82c5b8e4403d..14787fccb388 100644 --- a/code/modules/shuttles/marine_ferry.dm +++ b/code/modules/shuttles/marine_ferry.dm @@ -147,12 +147,12 @@ moving_status = SHUTTLE_WARMUP if(transit_optimized) - recharging = round(recharge_time * SHUTTLE_OPTIMIZE_FACTOR_RECHARGE) //Optimized flight plan means less recharge time + recharging = floor(recharge_time * SHUTTLE_OPTIMIZE_FACTOR_RECHARGE) //Optimized flight plan means less recharge time else recharging = recharge_time //Prevent the shuttle from moving again until it finishes recharging for(var/obj/structure/dropship_equipment/fuel/cooling_system/CS in equipments) - recharging = round(recharging * SHUTTLE_COOLING_FACTOR_RECHARGE) //cooling system reduces recharge time + recharging = floor(recharging * SHUTTLE_COOLING_FACTOR_RECHARGE) //cooling system reduces recharge time break //START: Heavy lifting backend @@ -194,7 +194,7 @@ for(var/X in equipments) var/obj/structure/dropship_equipment/E = X if(istype(E, /obj/structure/dropship_equipment/fuel/fuel_enhancer)) - travel_time = round(travel_time / SHUTTLE_FUEL_ENHANCE_FACTOR_TRAVEL) //fuel enhancer increases travel time + travel_time = floor(travel_time / SHUTTLE_FUEL_ENHANCE_FACTOR_TRAVEL) //fuel enhancer increases travel time break else if(transit_optimized) @@ -205,7 +205,7 @@ for(var/X in equipments) var/obj/structure/dropship_equipment/E = X if(istype(E, /obj/structure/dropship_equipment/fuel/fuel_enhancer)) - travel_time = round(travel_time * SHUTTLE_FUEL_ENHANCE_FACTOR_TRAVEL) //fuel enhancer reduces travel time + travel_time = floor(travel_time * SHUTTLE_FUEL_ENHANCE_FACTOR_TRAVEL) //fuel enhancer reduces travel time break //START: Heavy lifting backend @@ -324,7 +324,7 @@ if(moving_status != SHUTTLE_IDLE) return moving_status = SHUTTLE_WARMUP if(transit_optimized) - recharging = round(recharge_time * SHUTTLE_OPTIMIZE_FACTOR_RECHARGE) //Optimized flight plan means less recharge time + recharging = floor(recharge_time * SHUTTLE_OPTIMIZE_FACTOR_RECHARGE) //Optimized flight plan means less recharge time else recharging = recharge_time //Prevent the shuttle from moving again until it finishes recharging diff --git a/code/modules/shuttles/shuttle.dm b/code/modules/shuttles/shuttle.dm index a7dbe35a9776..1ded77a0e053 100644 --- a/code/modules/shuttles/shuttle.dm +++ b/code/modules/shuttles/shuttle.dm @@ -51,7 +51,7 @@ moving_status = SHUTTLE_WARMUP if(transit_optimized) - recharging = round(recharge_time * SHUTTLE_OPTIMIZE_FACTOR_RECHARGE) //Optimized flight plan means less recharge time + recharging = floor(recharge_time * SHUTTLE_OPTIMIZE_FACTOR_RECHARGE) //Optimized flight plan means less recharge time else recharging = recharge_time //Prevent the shuttle from moving again until it finishes recharging spawn(warmup_time) diff --git a/code/modules/shuttles/shuttle_console.dm b/code/modules/shuttles/shuttle_console.dm index e83666ca2386..0e9303d13583 100644 --- a/code/modules/shuttles/shuttle_console.dm +++ b/code/modules/shuttles/shuttle_console.dm @@ -188,8 +188,8 @@ GLOBAL_LIST_EMPTY(shuttle_controls) "gun_mission_allowed" = shuttle.can_do_gun_mission, "shuttle_status_message" = shuttle_status_message, "recharging" = shuttle.recharging, - "recharging_seconds" = round(shuttle.recharging/10), - "flight_seconds" = round(shuttle.in_transit_time_left/10), + "recharging_seconds" = floor(shuttle.recharging/10), + "flight_seconds" = floor(shuttle.in_transit_time_left/10), "can_return_home" = shuttle.transit_gun_mission && shuttle.moving_status == SHUTTLE_INTRANSIT && shuttle.in_transit_time_left>abort_timer, "recharge_time" = effective_recharge_time, "recharge_status" = recharge_status, @@ -231,7 +231,7 @@ GLOBAL_LIST_EMPTY(shuttle_controls) return //Comment to test if(!skip_time_lock && world.time < SSticker.mode.round_time_lobby + SHUTTLE_TIME_LOCK && istype(shuttle, /datum/shuttle/ferry/marine)) - to_chat(usr, SPAN_WARNING("The shuttle is still undergoing pre-flight fueling and cannot depart yet. Please wait another [round((SSticker.mode.round_time_lobby + SHUTTLE_TIME_LOCK-world.time)/600)] minutes before trying again.")) + to_chat(usr, SPAN_WARNING("The shuttle is still undergoing pre-flight fueling and cannot depart yet. Please wait another [floor((SSticker.mode.round_time_lobby + SHUTTLE_TIME_LOCK-world.time)/600)] minutes before trying again.")) return if(SSticker.mode.active_lz != src && !onboard && isqueen(usr)) to_chat(usr, SPAN_WARNING("The shuttle isn't responding to prompts, it looks like this isn't the primary shuttle.")) diff --git a/code/modules/tents/folded_tents.dm b/code/modules/tents/folded_tents.dm index fe1a748b750d..6496810f1a85 100644 --- a/code/modules/tents/folded_tents.dm +++ b/code/modules/tents/folded_tents.dm @@ -69,8 +69,7 @@ /obj/item/folded_tent/proc/get_deployment_area(turf/ref_turf) RETURN_TYPE(/list/turf) - var/turf/block_end_turf = locate(ref_turf.x + dim_x - 1, ref_turf.y + dim_y - 1, ref_turf.z) - return block(ref_turf, block_end_turf) + return CORNER_BLOCK(ref_turf, dim_x, dim_y) /obj/item/folded_tent/attack_self(mob/living/user) . = ..() diff --git a/code/modules/tgui/tgui-say/modal.dm b/code/modules/tgui/tgui-say/modal.dm index f1e87e001cef..52625ab98741 100644 --- a/code/modules/tgui/tgui-say/modal.dm +++ b/code/modules/tgui/tgui-say/modal.dm @@ -36,6 +36,7 @@ /datum/tgui_say/New(client/client, id) src.client = client window = new(client, id) + winset(client, "tgui_say", "size=1,1;is-visible=0;") window.subscribe(src, PROC_REF(on_message)) window.is_browser = TRUE @@ -62,12 +63,15 @@ */ /datum/tgui_say/proc/load() window_open = FALSE - winshow(client, "tgui_say", FALSE) + + winset(client, "tgui_say", "pos=700,500;size=380,30;is-visible=0;") + window.send_message("props", list( lightMode = client.prefs?.tgui_say_light_mode, maxLength = max_length, - roles = client.admin_holder?.get_tgui_say_roles() + extraChannels = client.admin_holder?.get_tgui_say_extra_channels() )) + stop_thinking() return TRUE @@ -110,10 +114,10 @@ close() return TRUE if (type == "thinking") - if(payload["mode"] == TRUE) + if(payload["visible"] == TRUE) start_thinking() return TRUE - if(payload["mode"] == FALSE) + if(payload["visible"] == FALSE) stop_thinking() return TRUE return FALSE diff --git a/code/modules/tgui/tgui-say/typing.dm b/code/modules/tgui/tgui-say/typing.dm index 3334ff4a349c..e2d8e5fa2a07 100644 --- a/code/modules/tgui/tgui-say/typing.dm +++ b/code/modules/tgui/tgui-say/typing.dm @@ -22,6 +22,7 @@ remove_all_indicators() return ..() +/// Whether or not to show a typing indicator when speaking. Defaults to on. /client/verb/typing_indicator() set name = "Show/Hide Typing Indicator" set category = "Preferences.Chat" diff --git a/code/modules/tgui/tgui.dm b/code/modules/tgui/tgui.dm index c01452a5b421..96c96a45a75c 100644 --- a/code/modules/tgui/tgui.dm +++ b/code/modules/tgui/tgui.dm @@ -11,7 +11,7 @@ var/mob/user /// The object which owns the UI. var/datum/src_object - /// The title of te UI. + /// The title of the UI. var/title /// The window_id for browse() and onclose(). var/datum/tgui_window/window diff --git a/code/modules/tgui/tgui_alert.dm b/code/modules/tgui/tgui_alert.dm index ce606c74254b..a3fa3c519f01 100644 --- a/code/modules/tgui/tgui_alert.dm +++ b/code/modules/tgui/tgui_alert.dm @@ -8,8 +8,10 @@ * * title - The of the alert modal, shown on the top of the TGUI window. * * buttons - The options that can be chosen by the user, each string is assigned a button on the UI. * * timeout - The timeout of the alert, after which the modal will close and qdel itself. Set to zero for no timeout. + * * autofocus - The bool that controls if this alert should grab window focus. + * * ui_state - The TGUI UI state that will be returned in ui_state(). Default: always_state */ -/proc/tgui_alert(mob/user, message, title, list/buttons, timeout = 60 SECONDS) +/proc/tgui_alert(mob/user, message = "", title, list/buttons = list("Ok"), timeout = 60 SECONDS, autofocus = TRUE, ui_state = GLOB.always_state) if (!user) user = usr if (!istype(user)) @@ -17,8 +19,12 @@ var/client/client = user user = client.mob else - return - var/datum/tgui_modal/alert = new(user, message, title, buttons, timeout) + return null + + if(isnull(user.client)) + return null + + var/datum/tgui_modal/alert = new(user, message, title, buttons, timeout, autofocus, ui_state) alert.tgui_interact(user) alert.wait() if (alert) @@ -36,8 +42,10 @@ * * buttons - The options that can be chosen by the user, each string is assigned a button on the UI. * * callback - The callback to be invoked when a choice is made. * * timeout - The timeout of the alert, after which the modal will close and qdel itself. Set to zero for no timeout. + * * autofocus - The bool that controls if this alert should grab window focus. + * * ui_state - The TGUI UI state that will be returned in ui_state(). Default: always_state */ -/proc/tgui_alert_async(mob/user, message, title, list/buttons, datum/callback/callback, timeout = 60 SECONDS) +/proc/tgui_alert_async(mob/user, message = "", title, list/buttons = list("Ok"), datum/callback/callback, timeout = 60 SECONDS, autofocus = TRUE, ui_state = GLOB.always_state) if (!user) user = usr if (!istype(user)) @@ -45,8 +53,12 @@ var/client/client = user user = client.mob else - return - var/datum/tgui_modal/async/alert = new(user, message, title, buttons, callback, timeout) + return null + + if(isnull(user.client)) + return null + + var/datum/tgui_modal/async/alert = new(user, message, title, buttons, callback, timeout, autofocus, ui_state) alert.tgui_interact(user) /** @@ -68,13 +80,19 @@ var/start_time /// The lifespan of the tgui_modal, after which the window will close and delete itself. var/timeout + /// The bool that controls if this modal should grab window focus + var/autofocus /// Boolean field describing if the tgui_modal was closed by the user. var/closed + /// The TGUI UI state that will be returned in ui_state(). Default: always_state + var/datum/ui_state/state -/datum/tgui_modal/New(mob/user, message, title, list/buttons, timeout) - src.title = title - src.message = message +/datum/tgui_modal/New(mob/user, message, title, list/buttons, timeout, autofocus, ui_state) + src.autofocus = autofocus src.buttons = buttons.Copy() + src.message = message + src.title = title + src.state = ui_state if (timeout) src.timeout = timeout start_time = world.time @@ -82,15 +100,16 @@ /datum/tgui_modal/Destroy(force, ...) SStgui.close_uis(src) - buttons = null - . = ..() + state = null + buttons = null // TG QDEL_NULLs this + return ..() /** * Waits for a user's response to the tgui_modal's prompt before returning. Returns early if * the window was closed by the user. */ /datum/tgui_modal/proc/wait() - while (!choice && !closed) + while (!choice && !closed && !QDELETED(src)) stoplag(0.2 SECONDS) /datum/tgui_modal/tgui_interact(mob/user, datum/tgui/ui) @@ -104,30 +123,44 @@ closed = TRUE /datum/tgui_modal/ui_state(mob/user) - return GLOB.always_state + return state + +/datum/tgui_modal/ui_static_data(mob/user) + var/list/data = list() + data["autofocus"] = autofocus + data["buttons"] = buttons + data["message"] = message + data["large_buttons"] = FALSE // Pref? + data["swapped_buttons"] = FALSE // Pref? + data["title"] = title + return data /datum/tgui_modal/ui_data(mob/user) - . = list( - "title" = title, - "message" = message, - "buttons" = buttons - ) - + var/list/data = list() if(timeout) - .["timeout"] = clamp((timeout - (world.time - start_time) - 1 SECONDS) / (timeout - 1 SECONDS), 0, 1) + data["timeout"] = CLAMP01((timeout - (world.time - start_time) - 1 SECONDS) / (timeout - 1 SECONDS)) + return data -/datum/tgui_modal/ui_act(action, list/params) +/datum/tgui_modal/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state) . = ..() if (.) return switch(action) if("choose") if (!(params["choice"] in buttons)) - return - choice = params["choice"] + CRASH("[ui.user] entered a non-existent button choice: [params["choice"]]") + set_choice(params["choice"]) + closed = TRUE + SStgui.close_uis(src) + return TRUE + if("cancel") + closed = TRUE SStgui.close_uis(src) return TRUE +/datum/tgui_modal/proc/set_choice(choice) + src.choice = choice + /** * # async tgui_modal * @@ -137,8 +170,8 @@ /// The callback to be invoked by the tgui_modal upon having a choice made. var/datum/callback/callback -/datum/tgui_modal/async/New(mob/user, message, title, list/buttons, callback, timeout) - ..(user, title, message, buttons, timeout) +/datum/tgui_modal/async/New(mob/user, message, title, list/buttons, callback, timeout, autofocus, ui_state) + ..(user, title, message, buttons, timeout, autofocus, ui_state) src.callback = callback /datum/tgui_modal/async/Destroy(force, ...) @@ -149,12 +182,10 @@ . = ..() qdel(src) -/datum/tgui_modal/async/ui_act(action, list/params) +/datum/tgui_modal/async/set_choice(choice) . = ..() - if (!. || choice == null) - return - callback.InvokeAsync(choice) - qdel(src) + if(!isnull(src.choice)) + callback?.InvokeAsync(src.choice) /datum/tgui_modal/async/wait() return diff --git a/code/modules/tgui/tgui_input_list.dm b/code/modules/tgui/tgui_input_list.dm index 198fb58ce5fd..ae15cbf621cd 100644 --- a/code/modules/tgui/tgui_input_list.dm +++ b/code/modules/tgui/tgui_input_list.dm @@ -21,25 +21,35 @@ * * This proc should be used to create alerts that the caller will wait for a response from. * Arguments: - * * user - The user to show the alert to. - * * message - The content of the alert, shown in the body of the TGUI window. + * * user - The user to show the input box to. + * * message - The content of the input box, shown in the body of the TGUI window. * * title - The title of the list input, shown on the top of the TGUI window. * * buttons - The options that can be chosen by the user, each string is assigned a button on the UI. * * timeout - The timeout of the alert, after which the list input will close and qdel itself. Set to zero for no timeout. * * theme - The ui theme to use for the TGUI window. + * * default - If an option is already preselected on the UI. Current values, etc. + * * ui_state - The TGUI UI state that will be returned in ui_state(). Default: always_state */ -/proc/tgui_input_list(mob/user, message, title, list/buttons, timeout = 0, theme = null) +/proc/tgui_input_list(mob/user, message, title = "Select", list/buttons, timeout = 0, theme = null, default, ui_state = GLOB.always_state) if (!user) user = usr if(!length(buttons)) - return + stack_trace("tgui_input_list called with no buttons!") + return null if (!istype(user)) if (istype(user, /client)) var/client/client = user user = client.mob else - return - var/datum/tgui_list_input/input = new(user, message, title, buttons, timeout, theme) + return null + + if(isnull(user.client)) + return null + + var/datum/tgui_list_input/input = new(user, message, title, buttons, timeout, theme, default, ui_state) + if(input.invalid) + qdel(input) + return input.tgui_interact(user) input.wait() if (input) @@ -51,26 +61,35 @@ * * This proc should be used to create inputs that invoke a callback with the user's chosen option. * Arguments: - * * user - The user to show the alert to. - * * message - The content of the alert, shown in the body of the TGUI window. - * * title - The of the alert modal, shown on the top of the TGUI window. + * * user - The user to show the input box to. + * * message - The content of the input box, shown in the body of the TGUI window. + * * title - The title of the list input, shown on the top of the TGUI window. * * buttons - The options that can be chosen by the user, each string is assigned a button on the UI. * * callback - The callback to be invoked when a choice is made. - * * timeout - The timeout of the alert, after which the modal will close and qdel itself. Set to zero for no timeout. + * * timeout - The timeout of the alert, after which the list_input will close and qdel itself. Set to zero for no timeout. * * theme - The ui theme to use for the TGUI window. + * * default - If an option is already preselected on the UI. Current values, etc. + * * ui_state - The TGUI UI state that will be returned in ui_state(). Default: always_state */ -/proc/tgui_input_list_async(mob/user, message, title, list/buttons, datum/callback/callback, timeout = 60 SECONDS, theme = null) +/proc/tgui_input_list_async(mob/user, message, title = "Select", list/buttons, datum/callback/callback, timeout = 60 SECONDS, theme = null, default, ui_state = GLOB.always_state) if (!user) user = usr if(!length(buttons)) - return + return null if (!istype(user)) if (istype(user, /client)) var/client/client = user user = client.mob else - return - var/datum/tgui_list_input/async/input = new(user, message, title, buttons, callback, timeout, theme) + return null + + if(isnull(user.client)) + return null + + var/datum/tgui_list_input/async/input = new(user, message, title, buttons, callback, timeout, theme, default, ui_state) + if(input.invalid) + qdel(input) + return input.tgui_interact(user) /** @@ -90,31 +109,44 @@ var/list/buttons_map /// The button that the user has pressed, null if no selection has been made var/choice - /// The time at which the tgui_modal was created, for displaying timeout progress. + /// The default button to be selected + var/default + /// The time at which the tgui_list_input was created, for displaying timeout progress. var/start_time - /// The lifespan of the tgui_modal, after which the window will close and delete itself. + /// The lifespan of the tgui_list_input, after which the window will close and delete itself. var/timeout - /// Boolean field describing if the tgui_modal was closed by the user. + /// Boolean field describing if the tgui_list_input was closed by the user. var/closed + /// The TGUI UI state that will be returned in ui_state(). Default: always_state + var/datum/ui_state/state /// String field for the theme to use var/ui_theme + /// Whether the tgui list input is invalid or not (i.e. due to all list entries being null) + var/invalid = FALSE -/datum/tgui_list_input/New(mob/user, message, title, list/buttons, timeout, theme = null) +/datum/tgui_list_input/New(mob/user, message, title, list/buttons, timeout, theme = null, default, ui_state) src.title = title src.message = message src.buttons = list() src.buttons_map = list() + src.default = default + src.state = ui_state src.ui_theme = theme - + var/list/repeat_items = list() // Gets rid of illegal characters var/static/regex/whitelistedWords = regex(@{"([^\u0020-\u8000]+)"}) for(var/i in buttons) + if(!i) + continue var/string_key = whitelistedWords.Replace("[i]", "") - + //avoids duplicated keys E.g: when areas have the same name + string_key = avoid_assoc_duplicate_keys(string_key, repeat_items) src.buttons += string_key src.buttons_map[string_key] = i + if(length(src.buttons) == 0) + invalid = TRUE if (timeout) src.timeout = timeout start_time = world.time @@ -122,8 +154,9 @@ /datum/tgui_list_input/Destroy(force, ...) SStgui.close_uis(src) - buttons = null - . = ..() + state = null + buttons = null // TG QDEL_NULLs this + return ..() /** * Waits for a user's response to the tgui_list_input's prompt before returning. Returns early if @@ -136,7 +169,7 @@ /datum/tgui_list_input/tgui_interact(mob/user, datum/tgui/ui) ui = SStgui.try_update_ui(user, src, ui) if(!ui) - ui = new(user, src, "ListInput") + ui = new(user, src, "ListInputWindow") ui.open() /datum/tgui_list_input/ui_close(mob/user) @@ -144,37 +177,45 @@ closed = TRUE /datum/tgui_list_input/ui_state(mob/user) - return GLOB.always_state + return state /datum/tgui_list_input/ui_static_data(mob/user) - . = list( - "title" = title, - "message" = message, - "buttons" = buttons, - "theme" = ui_theme - ) + var/list/data = list() + data["init_value"] = default || buttons[1] + data["items"] = buttons + data["large_buttons"] = FALSE // Pref? + data["message"] = message + data["swapped_buttons"] = FALSE // Pref? + data["title"] = title + data["theme"] = ui_theme + return data /datum/tgui_list_input/ui_data(mob/user) - . = list() + var/list/data = list() if(timeout) - .["timeout"] = clamp((timeout - (world.time - start_time) - 1 SECONDS) / (timeout - 1 SECONDS), 0, 1) + data["timeout"] = clamp((timeout - (world.time - start_time) - 1 SECONDS) / (timeout - 1 SECONDS), 0, 1) + return data -/datum/tgui_list_input/ui_act(action, list/params) +/datum/tgui_list_input/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state) . = ..() if (.) return switch(action) - if("choose") - if (!(params["choice"] in buttons)) + if("submit") + if (!(params["entry"] in buttons)) return - choice = buttons_map[params["choice"]] + set_choice(buttons_map[params["entry"]]) + closed = TRUE SStgui.close_uis(src) return TRUE if("cancel") - SStgui.close_uis(src) closed = TRUE + SStgui.close_uis(src) return TRUE +/datum/tgui_list_input/proc/set_choice(choice) + src.choice = choice + /** * # async tgui_list_input * @@ -184,8 +225,8 @@ /// The callback to be invoked by the tgui_modal upon having a choice made. var/datum/callback/callback -/datum/tgui_list_input/async/New(mob/user, message, title, list/buttons, callback, timeout, theme = null) - ..(user, title, message, buttons, timeout, theme) +/datum/tgui_list_input/async/New(mob/user, message, title, list/buttons, callback, timeout, theme = null, default, ui_state) + ..(user, title, message, buttons, timeout, theme, default) src.callback = callback /datum/tgui_list_input/async/Destroy(force, ...) @@ -196,12 +237,10 @@ . = ..() qdel(src) -/datum/tgui_list_input/async/ui_act(action, list/params) +/datum/tgui_list_input/async/set_choice(choice) . = ..() - if (!. || choice == null) - return - callback.InvokeAsync(choice) - qdel(src) + if(!isnull(src.choice)) + callback?.InvokeAsync(src.choice) /datum/tgui_list_input/async/wait() return diff --git a/code/modules/tgui/tgui_number_input.dm b/code/modules/tgui/tgui_number_input.dm index 356448853db3..24ab49b22959 100644 --- a/code/modules/tgui/tgui_number_input.dm +++ b/code/modules/tgui/tgui_number_input.dm @@ -13,8 +13,10 @@ * * max_value - Specifies a maximum value. If none is set, any number can be entered. Pressing "max" defaults to 1000. * * min_value - Specifies a minimum value. Often 0. * * timeout - The timeout of the number input, after which the modal will close and qdel itself. Set to zero for no timeout. + * * integer_only - whether the inputted number is rounded down into an integer. + * * ui_state - The TGUI UI state that will be returned in ui_state(). Default: always_state */ -/proc/tgui_input_number(mob/user, message, title = "Number Input", default = 0, max_value = 10000, min_value = 0, timeout = 0, integer_only = TRUE) +/proc/tgui_input_number(mob/user, message, title = "Number Input", default = 0, max_value = 10000, min_value = 0, timeout = 0, integer_only = TRUE, ui_state = GLOB.always_state) if (!user) user = usr if (!istype(user)) @@ -22,8 +24,12 @@ var/client/client = user user = client.mob else - return - var/datum/tgui_input_number/number_input = new(user, message, title, default, max_value, min_value, timeout, integer_only) + return null + + if (isnull(user.client)) + return null + + var/datum/tgui_input_number/number_input = new(user, message, title, default, max_value, min_value, timeout, integer_only, ui_state) number_input.tgui_interact(user) number_input.wait() if (number_input) @@ -31,8 +37,9 @@ qdel(number_input) ///A clone of tgui_input_number that defaults to accepting negative inputs too. -/proc/tgui_input_real_number(mob/user, message, title = "Number Input", default = 0, max_value = SHORT_REAL_LIMIT, min_value = -SHORT_REAL_LIMIT, timeout = 0, integer_only = FALSE) - return tgui_input_number(user, message, title, default, max_value, min_value, timeout, integer_only) +/proc/tgui_input_real_number(mob/user, message, title = "Number Input", default = 0, max_value = SHORT_REAL_LIMIT, min_value = -SHORT_REAL_LIMIT, timeout = 0, integer_only = FALSE, ui_state = GLOB.always_state) + return tgui_input_number(user, message, title, default, max_value, min_value, timeout, integer_only, ui_state) + /** * Creates an asynchronous TGUI number input window with an associated callback. * @@ -47,8 +54,10 @@ * * min_value - Specifies a minimum value. Often 0. * * callback - The callback to be invoked when a choice is made. * * timeout - The timeout of the number input, after which the modal will close and qdel itself. Set to zero for no timeout. + * * integer_only - whether the inputted number is rounded down into an integer. + * * ui_state - The TGUI UI state that will be returned in ui_state(). Default: always_state */ -/proc/tgui_input_number_async(mob/user, message, title = "Number Input", default = 0, max_value = 10000, min_value = 0, datum/callback/callback, timeout = 60 SECONDS) +/proc/tgui_input_number_async(mob/user, message, title = "Number Input", default = 0, max_value = 10000, min_value = 0, datum/callback/callback, timeout = 60 SECONDS, integer_only = TRUE, ui_state = GLOB.always_state) if (!user) user = usr if (!istype(user)) @@ -57,7 +66,7 @@ user = client.mob else return - var/datum/tgui_input_number/async/number_input = new(user, message, title, default, max_value, min_value, callback, timeout) + var/datum/tgui_input_number/async/number_input = new(user, message, title, default, max_value, min_value, callback, timeout, integer_only, ui_state) number_input.tgui_interact(user) /** @@ -79,23 +88,25 @@ var/message /// The minimum value that can be entered. var/min_value + /// If the final value will be rounded + var/integer_only /// The time at which the number input was created, for displaying timeout progress. var/start_time /// The lifespan of the number input, after which the window will close and delete itself. var/timeout /// The title of the TGUI window var/title - /// If the final value will be rounded - var/integer_only + /// The TGUI UI state that will be returned in ui_state(). Default: always_state + var/datum/ui_state/state - -/datum/tgui_input_number/New(mob/user, message, title, default, max_value, min_value, timeout, integer_only) +/datum/tgui_input_number/New(mob/user, message, title, default, max_value, min_value, timeout, integer_only, ui_state) src.default = default src.max_value = max_value src.message = message src.min_value = min_value src.title = title src.integer_only = integer_only + src.state = ui_state if (timeout) src.timeout = timeout start_time = world.time @@ -113,7 +124,8 @@ /datum/tgui_input_number/Destroy(force, ...) SStgui.close_uis(src) - . = ..() + state = null + return ..() /** * Waits for a user's response to the tgui_input_number's prompt before returning. Returns early if @@ -135,25 +147,27 @@ closed = TRUE /datum/tgui_input_number/ui_state(mob/user) - return GLOB.always_state + return state /datum/tgui_input_number/ui_static_data(mob/user) - . = list( - "init_value" = default, // Default is a reserved keyword - "max_value" = max_value, - "message" = message, - "min_value" = min_value, - "preferences" = list(), - "title" = title, - "integer_only" = integer_only - ) + var/list/data = list() + data["init_value"] = default // Default is a reserved keyword + data["large_buttons"] = FALSE // Pref? + data["max_value"] = max_value + data["message"] = message + data["min_value"] = min_value + data["swapped_buttons"] = FALSE // Pref? + data["title"] = title + data["round_value"] = integer_only + return data /datum/tgui_input_number/ui_data(mob/user) - . = list() + var/list/data = list() if(timeout) - .["timeout"] = CLAMP01((timeout - (world.time - start_time) - 1 SECONDS) / (timeout - 1 SECONDS)) + data["timeout"] = CLAMP01((timeout - (world.time - start_time) - 1 SECONDS) / (timeout - 1 SECONDS)) + return data -/datum/tgui_input_number/ui_act(action, list/params) +/datum/tgui_input_number/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state) . = ..() if (.) return @@ -161,15 +175,15 @@ if("submit") var/choice = params["entry"] if(!isnum(choice)) - CRASH("A non number was input into tgui input number by [usr]") + CRASH("A non number was input into tgui input number by [ui.user]") if(choice != choice) //isnan - CRASH("A NaN was input into tgui input number by [usr]") + CRASH("A NaN was input into tgui input number by [ui.user]") if(integer_only) - choice = round(choice) + choice = floor(choice) if(choice > max_value) - CRASH("A number greater than the max value was input into tgui input number by [usr]") + CRASH("A number greater than the max value was input into tgui input number by [ui.user]") if(choice < min_value) - CRASH("A number less than the min value was input into tgui input number by [usr]") + CRASH("A number less than the min value was input into tgui input number by [ui.user]") set_entry(choice) closed = TRUE SStgui.close_uis(src) @@ -180,7 +194,7 @@ return TRUE /datum/tgui_input_number/proc/set_entry(entry) - src.entry = entry + src.entry = entry /** * # async tgui_input_number @@ -191,8 +205,8 @@ /// The callback to be invoked by the tgui_input_number upon having a choice made. var/datum/callback/callback -/datum/tgui_input_number/async/New(mob/user, message, title, default, max_value, min_value, callback, timeout) - ..(user, message, title, default, max_value, min_value, timeout) +/datum/tgui_input_number/async/New(mob/user, message, title, default, max_value, min_value, callback, timeout, integer_only, ui_state) + ..(user, message, title, default, max_value, min_value, timeout, integer_only, ui_state) src.callback = callback /datum/tgui_input_number/async/Destroy(force, ...) diff --git a/code/modules/tgui/tgui_window.dm b/code/modules/tgui/tgui_window.dm index 21f4a8ba9421..987a2aca92a8 100644 --- a/code/modules/tgui/tgui_window.dm +++ b/code/modules/tgui/tgui_window.dm @@ -26,6 +26,18 @@ var/initial_inline_css var/mouse_event_macro_set = FALSE + /** + * Static list used to map in macros that will then emit execute events to the tgui window + * A small disclaimer though I'm no tech wiz: I don't think it's possible to map in right or middle + * clicks in the current state, as they're keywords rather than modifiers. + */ + var/static/list/byondToTguiEventMap = list( + "MouseDown" = "byond/mousedown", + "MouseUp" = "byond/mouseup", + "Ctrl" = "byond/ctrldown", + "Ctrl+UP" = "byond/ctrlup", + ) + /** * public * @@ -382,11 +394,6 @@ if(mouse_event_macro_set) return - var/list/byondToTguiEventMap = list( - "MouseDown" = "byond/mousedown", - "MouseUp" = "byond/mouseup" - ) - for(var/mouseMacro in byondToTguiEventMap) var/command_template = ".output CONTROL PAYLOAD" var/event_message = TGUI_CREATE_MESSAGE(byondToTguiEventMap[mouseMacro], null) @@ -404,14 +411,9 @@ winset(client, "[mouseMacro]Window[id]Macro", params) mouse_event_macro_set = TRUE - /datum/tgui_window/proc/remove_mouse_macro() if(!mouse_event_macro_set) stack_trace("Unsetting mouse macro on tgui window that has none") - var/list/byondToTguiEventMap = list( - "MouseDown" = "byond/mousedown", - "MouseUp" = "byond/mouseup" - ) for(var/mouseMacro in byondToTguiEventMap) winset(client, null, "[mouseMacro]Window[id]Macro.parent=null") mouse_event_macro_set = FALSE diff --git a/code/modules/tgui_input/checkboxes.dm b/code/modules/tgui_input/checkboxes.dm new file mode 100644 index 000000000000..fa90ee51d7b2 --- /dev/null +++ b/code/modules/tgui_input/checkboxes.dm @@ -0,0 +1,211 @@ +/** + * ### tgui_input_checkbox + * Opens a window with a list of checkboxes and returns a list of selected choices. + * + * * Arguments: + * * user - The mob to display the window to + * * message - The message inside the window + * * title - The title of the window + * * list/items - The list of items to display + * * min_checked - The minimum number of checkboxes that must be checked (defaults to 1) + * * max_checked - The maximum number of checkboxes that can be checked (optional) + * * timeout - The timeout for the input (optional) + * * theme - The ui theme to use for the TGUI window (optional). + * * ui_state - The TGUI UI state that will be returned in ui_state(). Default: always_state + */ +/proc/tgui_input_checkboxes(mob/user, message, title = "Select", list/items, min_checked = 1, max_checked = 50, timeout = 0, theme = null, ui_state = GLOB.always_state) + if (!user) + user = usr + if(!length(items)) + return null + if (!istype(user)) + if (istype(user, /client)) + var/client/client = user + user = client.mob + else + return null + + if(isnull(user.client)) + return null + + var/datum/tgui_checkbox_input/input = new(user, message, title, items, min_checked, max_checked, timeout, theme, ui_state) + input.tgui_interact(user) + input.wait() + if (input) + . = input.choices + qdel(input) + +/** + * ### tgui_input_checkbox + * Opens a window with a list of checkboxes and returns a list of selected choices. + * + * * Arguments: + * * user - The mob to display the window to + * * message - The message inside the window + * * title - The title of the window + * * list/items - The list of items to display + * * min_checked - The minimum number of checkboxes that must be checked (defaults to 1) + * * max_checked - The maximum number of checkboxes that can be checked (optional) + * * callback - The callback to be invoked when a choice is made. + * * timeout - The timeout for the input (optional) + * * theme - The ui theme to use for the TGUI window (optional). + * * ui_state - The TGUI UI state that will be returned in ui_state(). Default: always_state + */ +/proc/tgui_input_checkboxes_async(mob/user, message, title = "Select", list/items, min_checked = 1, max_checked = 50, datum/callback/callback, timeout = 0, theme = null, ui_state = GLOB.always_state) + if (!user) + user = usr + if(!length(items)) + return null + if (!istype(user)) + if (istype(user, /client)) + var/client/client = user + user = client.mob + else + return null + + if(isnull(user.client)) + return null + + var/datum/tgui_checkbox_input/async/input = new(user, message, title, items, min_checked, max_checked, callback, timeout, theme, ui_state) + input.tgui_interact(user) + +/// Window for tgui_input_checkboxes +/datum/tgui_checkbox_input + /// Title of the window + var/title + /// Message to display + var/message + /// List of items to display + var/list/items + /// List of selected items + var/list/choices + /// Time when the input was created + var/start_time + /// Timeout for the input + var/timeout + /// Whether the input was closed + var/closed + /// Minimum number of checkboxes that must be checked + var/min_checked + /// Maximum number of checkboxes that can be checked + var/max_checked + /// The TGUI UI state that will be returned in ui_state(). Default: always_state + var/datum/ui_state/state + /// String field for the theme to use + var/ui_theme + +/datum/tgui_checkbox_input/New(mob/user, message, title, list/items, min_checked, max_checked, timeout, theme = null, ui_state) + src.title = title + src.message = message + src.items = items.Copy() + src.min_checked = min_checked + src.max_checked = max_checked + src.state = ui_state + src.ui_theme = theme + + if (timeout) + src.timeout = timeout + start_time = world.time + QDEL_IN(src, timeout) + +/datum/tgui_checkbox_input/Destroy(force) + SStgui.close_uis(src) + state = null + items = null // TG QDEL_NULLs this + return ..() + +/** + * Waits for a user's response to the tgui_checkbox_input's prompt before returning. Returns early if + * the window was closed by the user. + */ +/datum/tgui_checkbox_input/proc/wait() + while (!closed && !QDELETED(src)) + stoplag(0.2 SECONDS) + +/datum/tgui_checkbox_input/tgui_interact(mob/user, datum/tgui/ui) + ui = SStgui.try_update_ui(user, src, ui) + if(!ui) + ui = new(user, src, "CheckboxInput") + ui.open() + +/datum/tgui_checkbox_input/ui_close(mob/user) + . = ..() + closed = TRUE + +/datum/tgui_checkbox_input/ui_state(mob/user) + return state + +/datum/tgui_checkbox_input/ui_data(mob/user) + var/list/data = list() + + if(timeout) + data["timeout"] = CLAMP01((timeout - (world.time - start_time) - 1 SECONDS) / (timeout - 1 SECONDS)) + + return data + +/datum/tgui_checkbox_input/ui_static_data(mob/user) + var/list/data = list() + + data["items"] = items + data["min_checked"] = min_checked + data["max_checked"] = max_checked + data["large_buttons"] = TRUE // Pref? + data["message"] = message + data["swapped_buttons"] = FALSE // Pref? + data["title"] = title + data["theme"] = ui_theme + + return data + +/datum/tgui_checkbox_input/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state) + . = ..() + if (.) + return + + switch(action) + if("submit") + var/list/selections = params["entry"] + if(length(selections) >= min_checked && length(selections) <= max_checked) + set_choices(selections) + closed = TRUE + SStgui.close_uis(src) + return TRUE + + if("cancel") + closed = TRUE + SStgui.close_uis(src) + return TRUE + + return FALSE + +/datum/tgui_checkbox_input/proc/set_choices(list/selections) + src.choices = selections.Copy() + +/** + * # async tgui_checkbox_input + * + * An asynchronous version of tgui_checkbox_input to be used with callbacks instead of waiting on user responses. + */ +/datum/tgui_checkbox_input/async + /// The callback to be invoked by the tgui_modal upon having a choice made. + var/datum/callback/callback + +/datum/tgui_checkbox_input/async/New(mob/user, message, title, list/items, min_checked, max_checked, callback, timeout, theme = null, ui_state) + ..(user, message, title, items, min_checked, max_checked, callback, timeout, theme, ui_state) + src.callback = callback + +/datum/tgui_checkbox_input/async/Destroy(force, ...) + QDEL_NULL(callback) + . = ..() + +/datum/tgui_checkbox_input/async/ui_close(mob/user) + . = ..() + qdel(src) + +/datum/tgui_checkbox_input/async/set_choices(list/selections) + . = ..() + if(length(choices)) + callback?.InvokeAsync(choices) + +/datum/tgui_checkbox_input/async/wait() + return diff --git a/code/modules/tgui_input/text.dm b/code/modules/tgui_input/text.dm index f60691860d79..15c50554bb90 100644 --- a/code/modules/tgui_input/text.dm +++ b/code/modules/tgui_input/text.dm @@ -15,8 +15,9 @@ * * encode - Toggling this determines if input is filtered via html_encode. Setting this to FALSE gives raw input. * * timeout - The timeout of the textbox, after which the modal will close and qdel itself. Set to zero for no timeout. * * trim - Whether or not to trim leading and trailing whitespace from your input. Defaults to TRUE + * * ui_state - The TGUI UI state that will be returned in ui_state(). Default: always_state */ -/proc/tgui_input_text(mob/user, message = "", title = "Text Input", default, max_length = MAX_MESSAGE_LEN, multiline = FALSE, encode = TRUE, timeout = 0, trim = TRUE) +/proc/tgui_input_text(mob/user, message = "", title = "Text Input", default, max_length = MAX_MESSAGE_LEN, multiline = FALSE, encode = TRUE, timeout = 0, trim = TRUE, ui_state = GLOB.always_state) if (!user) user = usr if (!istype(user)) @@ -24,7 +25,11 @@ var/client/client = user user = client.mob else - return + return null + + if(isnull(user.client)) + return null + // Client does NOT have tgui_input on: Returns regular input /* if(!user.client.prefs.read_preference(/datum/preference/toggle/tgui_input)) @@ -40,7 +45,7 @@ return input(user, message, title, default) as text|null */ - var/datum/tgui_input_text/text_input = new(user, message, title, default, max_length, multiline, encode, timeout, trim) + var/datum/tgui_input_text/text_input = new(user, message, title, default, max_length, multiline, encode, timeout, trim, ui_state) text_input.tgui_interact(user) text_input.wait() if (text_input) @@ -74,16 +79,19 @@ var/timeout /// The title of the TGUI window var/title + /// The TGUI UI state that will be returned in ui_state(). Default: always_state + var/datum/ui_state/state /// Whether to trim leading and trailing spaces var/trim -/datum/tgui_input_text/New(mob/user, message, title, default, max_length, multiline, encode, timeout, trim) +/datum/tgui_input_text/New(mob/user, message, title, default, max_length, multiline, encode, timeout, trim, ui_state) src.default = default src.encode = encode src.max_length = max_length src.message = message src.multiline = multiline src.title = title + src.state = ui_state src.trim = trim if (timeout) src.timeout = timeout @@ -92,6 +100,7 @@ /datum/tgui_input_text/Destroy(force, ...) SStgui.close_uis(src) + state = null return ..() /** @@ -113,7 +122,7 @@ closed = TRUE /datum/tgui_input_text/ui_state(mob/user) - return GLOB.always_state + return state /datum/tgui_input_text/ui_static_data(mob/user) var/list/data = list() diff --git a/code/modules/unit_tests/unit_test.dm b/code/modules/unit_tests/unit_test.dm index 30eae6eef44e..8d04a51bcc19 100644 --- a/code/modules/unit_tests/unit_test.dm +++ b/code/modules/unit_tests/unit_test.dm @@ -64,7 +64,7 @@ GLOBAL_VAR_INIT(focused_test, focused_test()) /datum/unit_test/Destroy() QDEL_LIST(allocated) // clear the test area - for (var/turf/turf in block(locate(1, 1, run_loc_floor_bottom_left.z), locate(world.maxx, world.maxy, run_loc_floor_bottom_left.z))) + for (var/turf/turf as anything in Z_TURFS(run_loc_floor_bottom_left.z)) for (var/content in turf.contents) if (istype(content, /obj/effect/landmark)) continue diff --git a/code/modules/vehicles/apc/apc_command.dm b/code/modules/vehicles/apc/apc_command.dm index e0862ae4f2ab..54647279ec3b 100644 --- a/code/modules/vehicles/apc/apc_command.dm +++ b/code/modules/vehicles/apc/apc_command.dm @@ -43,8 +43,6 @@ return ..() /obj/vehicle/multitile/apc/command/process() - . = ..() - var/turf/apc_turf = get_turf(src) if(health == 0 || !visible_in_tacmap || !is_ground_level(apc_turf.z)) return diff --git a/code/modules/vehicles/arc/arc.dm b/code/modules/vehicles/arc/arc.dm new file mode 100644 index 000000000000..feee097c3638 --- /dev/null +++ b/code/modules/vehicles/arc/arc.dm @@ -0,0 +1,271 @@ +/obj/vehicle/multitile/arc + name = "\improper M540-B Armored Recon Carrier" + desc = "An M540-B Armored Recon Carrier. A lightly armored reconnaissance and intelligence vehicle. Entrances on the sides." + + icon = 'icons/obj/vehicles/arc.dmi' + icon_state = "arc_base" + pixel_x = -48 + pixel_y = -48 + + bound_width = 96 + bound_height = 96 + + bound_x = -32 + bound_y = -32 + + health = 800 + + interior_map = /datum/map_template/interior/arc + + passengers_slots = 3 + xenos_slots = 5 + + entrances = list( + "left" = list(2, 0), + "right" = list(-2, 0), + ) + + entrance_speed = 0.5 SECONDS + + required_skill = SKILL_VEHICLE_LARGE + + movement_sound = 'sound/vehicles/tank_driving.ogg' + + luminosity = 7 + + hardpoints_allowed = list( + /obj/item/hardpoint/locomotion/arc_wheels, + /obj/item/hardpoint/primary/arc_sentry, + /obj/item/hardpoint/support/arc_antenna, + ) + + seats = list( + VEHICLE_DRIVER = null, + ) + + active_hp = list( + VEHICLE_DRIVER = null, + ) + + vehicle_flags = VEHICLE_CLASS_LIGHT + + mob_size_required_to_hit = MOB_SIZE_XENO + + dmg_multipliers = list( + "all" = 1, + "acid" = 1.8, + "slash" = 1.1, + "bullet" = 0.6, + "explosive" = 0.8, + "blunt" = 0.8, + "abstract" = 1, + ) + + move_max_momentum = 2.2 + move_momentum_build_factor = 1.5 + move_turn_momentum_loss_factor = 0.8 + + vehicle_ram_multiplier = VEHICLE_TRAMPLE_DAMAGE_APC_REDUCTION + + /// If the ARC has its antenna up, making it unable to move but enabling the turret and sensor wallhack + var/antenna_deployed = FALSE + /// How long it takes to deploy or retract the antenna + var/antenna_toggle_time = 10 SECONDS + /// Range of the ARC's xenomorph wallhacks + var/sensor_radius = 45 + /// weakrefs of xenos temporarily added to the marine minimap + var/list/minimap_added = list() + +/obj/vehicle/multitile/arc/Initialize() + . = ..() + + var/turf/gotten_turf = get_turf(src) + if(gotten_turf?.z) + SSminimaps.add_marker(src, gotten_turf.z, MINIMAP_FLAG_USCM, "arc", 'icons/ui_icons/map_blips_large.dmi') + + RegisterSignal(src, COMSIG_ARC_ANTENNA_TOGGLED, PROC_REF(on_antenna_toggle)) + +/obj/vehicle/multitile/arc/crew_mousedown(datum/source, atom/object, turf/location, control, params) + var/list/modifiers = params2list(params) + if(modifiers[SHIFT_CLICK] || modifiers[MIDDLE_CLICK] || modifiers[RIGHT_CLICK]) //don't step on examine, point, etc + return + + switch(get_mob_seat(source)) + if(VEHICLE_DRIVER) + if(modifiers[LEFT_CLICK] && modifiers[CTRL_CLICK]) + activate_horn() + +/obj/vehicle/multitile/arc/get_examine_text(mob/user) + . = ..() + if(!isxeno(user)) + return + + if(health > 0) + . += SPAN_XENO("[src] can be crawled under once destroyed.") + else + . += SPAN_XENO("[src] can be crawled under by dragging our sprite to it.") + +/obj/vehicle/multitile/arc/proc/on_antenna_toggle(datum/source) + SIGNAL_HANDLER + + if(antenna_deployed) + START_PROCESSING(SSslowobj, src) + + else + STOP_PROCESSING(SSslowobj, src) + +/obj/vehicle/multitile/arc/process() + var/turf/arc_turf = get_turf(src) + if((health <= 0) || !visible_in_tacmap || !is_ground_level(arc_turf.z)) + return + + var/obj/item/hardpoint/support/arc_antenna/antenna = locate() in hardpoints + if(!antenna || (antenna.health <= 0)) + for(var/datum/weakref/xeno as anything in minimap_added) + SSminimaps.remove_marker(xeno.resolve()) + minimap_added.Remove(xeno) + return + + for(var/mob/living/carbon/xenomorph/current_xeno as anything in GLOB.living_xeno_list) + var/turf/xeno_turf = get_turf(current_xeno) + if(!is_ground_level(xeno_turf.z)) + continue + + var/datum/weakref/xeno_weakref = WEAKREF(current_xeno) + + if(get_dist(src, current_xeno) <= sensor_radius) + if(xeno_weakref in minimap_added) + continue + + SSminimaps.remove_marker(current_xeno) + current_xeno.add_minimap_marker(MINIMAP_FLAG_USCM|MINIMAP_FLAG_XENO) + minimap_added += xeno_weakref + else if(xeno_weakref in minimap_added) + SSminimaps.remove_marker(current_xeno) + current_xeno.add_minimap_marker() + minimap_added -= xeno_weakref + +/obj/vehicle/multitile/arc/relaymove(mob/user, direction) + if(antenna_deployed) + return FALSE + + return ..() + +/obj/vehicle/multitile/arc/load_role_reserved_slots() + var/datum/role_reserved_slots/RRS = new + RRS.category_name = "CIC Officer" + RRS.roles = list(JOB_SO, JOB_SEA, JOB_XO, JOB_CO, JOB_GENERAL) + RRS.total = 2 + role_reserved_slots += RRS + + RRS = new + RRS.category_name = "Intelligence Officer" + RRS.roles = list(JOB_INTEL) + RRS.total = 1 + role_reserved_slots += RRS + +/obj/vehicle/multitile/arc/set_seated_mob(seat, mob/living/M) + . = ..() + if(!.) + return + + give_action(M, /datum/action/human_action/toggle_arc_antenna) + +/obj/vehicle/multitile/arc/add_seated_verbs(mob/living/M, seat) + if(!M.client) + return + add_verb(M.client, list( + /obj/vehicle/multitile/proc/get_status_info, + /obj/vehicle/multitile/arc/proc/open_arc_controls_guide, + /obj/vehicle/multitile/proc/toggle_door_lock, + /obj/vehicle/multitile/proc/activate_horn, + /obj/vehicle/multitile/proc/name_vehicle, + /obj/vehicle/multitile/arc/proc/toggle_antenna, + )) + +/obj/vehicle/multitile/arc/remove_seated_verbs(mob/living/M, seat) + if(!M.client) + return + remove_verb(M.client, list( + /obj/vehicle/multitile/proc/get_status_info, + /obj/vehicle/multitile/arc/proc/open_arc_controls_guide, + /obj/vehicle/multitile/proc/toggle_door_lock, + /obj/vehicle/multitile/proc/activate_horn, + /obj/vehicle/multitile/proc/name_vehicle, + /obj/vehicle/multitile/arc/proc/toggle_antenna, + )) + SStgui.close_user_uis(M, src) + +/obj/vehicle/multitile/arc/initialize_cameras(change_tag = FALSE) + if(!camera) + camera = new /obj/structure/machinery/camera/vehicle(src) + if(change_tag) + camera.c_tag = "#[rand(1,100)] M540-B \"[nickname]\" ARC" + if(camera_int) + camera_int.c_tag = camera.c_tag + " interior" + else + camera.c_tag = "#[rand(1,100)] M540-B ARC" + if(camera_int) + camera_int.c_tag = camera.c_tag + " interior" + +/obj/vehicle/multitile/arc/MouseDrop_T(mob/M, mob/user) + . = ..() + if((M != user) || !isxeno(user)) + return + + if(health > 0) + to_chat(user, SPAN_XENO("We can't go under [src] until it is destroyed!")) + return + + var/turf/current_turf = get_turf(user) + var/dir_to_go = get_dir(current_turf, src) + for(var/i in 1 to 3) + current_turf = get_step(current_turf, dir_to_go) + if(!(current_turf in locs)) + break + + if(current_turf.density) + to_chat(user, SPAN_XENO("The path under [src] is obstructed!")) + return + + // Now we check to make sure the turf on the other side of the ARC isn't dense too + current_turf = get_step(current_turf, dir_to_go) + if(current_turf.density) + to_chat(user, SPAN_XENO("The path under [src] is obstructed!")) + return + + to_chat(user, SPAN_XENO("We begin to crawl under [src]...")) + if(!do_after(user, 3 SECONDS, INTERRUPT_ALL, BUSY_ICON_HOSTILE)) + to_chat(user, SPAN_XENO("We stop crawling under [src].")) + return + + user.forceMove(current_turf) + to_chat(user, SPAN_XENO("We crawl to the other side of [src].")) + +/* +** PRESETS SPAWNERS +*/ +/obj/effect/vehicle_spawner/arc + name = "ARC Transport Spawner" + icon = 'icons/obj/vehicles/apc.dmi' + icon_state = "apc_base" + pixel_x = -48 + pixel_y = -48 + +/obj/effect/vehicle_spawner/arc/Initialize() + . = ..() + spawn_vehicle() + return INITIALIZE_HINT_QDEL + +/obj/effect/vehicle_spawner/arc/spawn_vehicle() + var/obj/vehicle/multitile/arc/ARC = new (loc) + + load_misc(ARC) + load_hardpoints(ARC) + handle_direction(ARC) + ARC.update_icon() + +/obj/effect/vehicle_spawner/arc/load_hardpoints(obj/vehicle/multitile/arc/vehicle) + vehicle.add_hardpoint(new /obj/item/hardpoint/locomotion/arc_wheels) + vehicle.add_hardpoint(new /obj/item/hardpoint/primary/arc_sentry) + vehicle.add_hardpoint(new /obj/item/hardpoint/support/arc_antenna) diff --git a/code/modules/vehicles/arc/verbs.dm b/code/modules/vehicles/arc/verbs.dm new file mode 100644 index 000000000000..3b866236e77d --- /dev/null +++ b/code/modules/vehicles/arc/verbs.dm @@ -0,0 +1,121 @@ +/obj/vehicle/multitile/arc/proc/toggle_antenna(mob/toggler) + set name = "Toggle Sensor Antenna" + set desc = "Raises or lowers the external sensor antenna. While raised, the ARC cannot move." + set category = "Vehicle" + + var/mob/user = toggler || usr + if(!user || !istype(user)) + return + + var/obj/vehicle/multitile/arc/vehicle = user.interactee + if(!istype(vehicle)) + return + + var/seat + for(var/vehicle_seat in vehicle.seats) + if(vehicle.seats[vehicle_seat] == user) + seat = vehicle_seat + break + + if(!seat) + return + + if(vehicle.health < initial(vehicle.health) * 0.5) + to_chat(user, SPAN_WARNING("[vehicle]'s hull is too damaged to operate!")) + return + + var/obj/item/hardpoint/support/arc_antenna/antenna = locate() in vehicle.hardpoints + if(!antenna) + to_chat(user, SPAN_WARNING("[vehicle] has no antenna mounted!")) + return + + if(antenna.deploying) + return + + if(antenna.health <= 0) + to_chat(user, SPAN_WARNING("[antenna] is broken!")) + return + + if(vehicle.antenna_deployed) + to_chat(user, SPAN_NOTICE("You begin to retract [antenna]...")) + antenna.deploying = TRUE + if(!do_after(user, max(vehicle.antenna_toggle_time - antenna.deploy_animation_time, 1 SECONDS), target = vehicle)) + to_chat(user, SPAN_NOTICE("You stop retracting [antenna].")) + antenna.deploying = FALSE + return + + antenna.retract_antenna() + addtimer(CALLBACK(vehicle, PROC_REF(finish_antenna_retract), user), antenna.deploy_animation_time) + + else + to_chat(user, SPAN_NOTICE("You begin to extend [antenna]...")) + antenna.deploying = TRUE + if(!do_after(user, max(vehicle.antenna_toggle_time - antenna.deploy_animation_time, 1 SECONDS), target = vehicle)) + to_chat(user, SPAN_NOTICE("You stop extending [antenna].")) + antenna.deploying = FALSE + return + + antenna.deploy_antenna() + addtimer(CALLBACK(vehicle, PROC_REF(finish_antenna_deploy), user), antenna.deploy_animation_time) + +/obj/vehicle/multitile/arc/proc/finish_antenna_retract(mob/user) + var/obj/item/hardpoint/support/arc_antenna/antenna = locate() in hardpoints + if(!antenna) + antenna.deploying = FALSE + return + + if(user) + to_chat(user, SPAN_NOTICE("You retract [antenna], enabling the ARC to move again.")) + playsound(user, 'sound/machines/hydraulics_2.ogg', 80, TRUE) + antenna_deployed = !antenna_deployed + antenna.deploying = FALSE + update_icon() + SEND_SIGNAL(src, COMSIG_ARC_ANTENNA_TOGGLED) + +/obj/vehicle/multitile/arc/proc/finish_antenna_deploy(mob/user) + var/obj/item/hardpoint/support/arc_antenna/antenna = locate() in hardpoints + if(!antenna) + antenna.deploying = FALSE + return + + if(user) + to_chat(user, SPAN_NOTICE("You extend [antenna], locking the ARC in place.")) + playsound(user, 'sound/machines/hydraulics_2.ogg', 80, TRUE) + antenna_deployed = !antenna_deployed + antenna.deploying = FALSE + update_icon() + SEND_SIGNAL(src, COMSIG_ARC_ANTENNA_TOGGLED) + +/obj/vehicle/multitile/arc/proc/open_arc_controls_guide() + set name = "Vehicle Controls Guide" + set desc = "MANDATORY FOR FIRST PLAY AS VEHICLE CREWMAN OR AFTER UPDATES." + set category = "Vehicle" + + var/mob/user = usr + if(!istype(user)) + return + + var/obj/vehicle/multitile/arc/vehicle = user.interactee + if(!istype(vehicle)) + return + + var/seat + for(var/vehicle_seat in vehicle.seats) + if(vehicle.seats[vehicle_seat] == user) + seat = vehicle_seat + break + + if(!seat) + return + + var/dat = "Common verbs:
\ + 1. \"G: Name Vehicle\" - used to add a custom name to the vehicle. Single use. 26 characters maximum.
\ + 2. \"I: Get Status Info\" - brings up \"Vehicle Status Info\" window with all available information about your vehicle.
\ + 3. \"G: Toggle Sensor Antenna\" - extend or retract the ARC's sensor antenna. While extended, all unknown lifeforms within a large range can be seen by all on the tacmap, but the ARC cannot move. Additionally enables the automated RE700 cannon.
\ + Driver verbs:
1. \"G: Activate Horn\" - activates vehicle horn. Keep in mind, that vehicle horn is very loud and can be heard from afar by both allies and foes.
\ + 2. \"G: Toggle Door Locks\" - toggles vehicle's access restrictions. Crewman, Brig and Command accesses bypass these restrictions.
\ + Driver shortcuts:
1. \"CTRL + Click\" - activates vehicle horn.
" + + show_browser(user, dat, "Vehicle Controls Guide", "vehicle_help", "size=900x500") + onclose(user, "vehicle_help") + return diff --git a/code/modules/vehicles/hardpoints/hardpoint.dm b/code/modules/vehicles/hardpoints/hardpoint.dm index 21e3e4b29f89..485b03573414 100644 --- a/code/modules/vehicles/hardpoints/hardpoint.dm +++ b/code/modules/vehicles/hardpoints/hardpoint.dm @@ -125,6 +125,8 @@ /// Currently selected target to fire at. Set with set_target(). var/atom/target + /// The type of projectile to fire + var/projectile_type = /obj/projectile //----------------------------- //------GENERAL PROCS---------- @@ -149,7 +151,7 @@ if(owner || indestructible) return - health = max(0, health - severity / 2) + take_damage(severity / 2) if(health <= 0) visible_message(SPAN_WARNING("\The [src] disintegrates into useless pile of scrap under the damage it suffered.")) deconstruct(TRUE) @@ -159,7 +161,7 @@ return /obj/item/hardpoint/proc/generate_bullet(mob/user, turf/origin_turf) - var/obj/projectile/P = new(origin_turf, create_cause_data(initial(name), user)) + var/obj/projectile/P = new projectile_type(origin_turf, create_cause_data(initial(name), user)) P.generate_bullet(new ammo.default_ammo) // Apply bullet traits from gun for(var/entry in traits_to_give) @@ -180,7 +182,14 @@ return TRUE /obj/item/hardpoint/proc/take_damage(damage) + if(health <= 0) + return health = max(0, health - damage * damage_multiplier) + if(!health) + on_destroy() + +/obj/item/hardpoint/proc/on_destroy() + return /obj/item/hardpoint/proc/is_activatable() if(health <= 0) @@ -292,7 +301,7 @@ if(health <= 0) data["health"] = null else - data["health"] = round(get_integrity_percent()) + data["health"] = floor(get_integrity_percent()) if(ammo) data["uses_ammo"] = TRUE @@ -491,13 +500,13 @@ health += initial(health)/100 * (amount_fixed / amount_fixed_adjustment) if(health >= initial(health)) health = initial(health) - user.visible_message(SPAN_NOTICE("[user] finishes repairing \the [name]."), SPAN_NOTICE("You finish repairing \the [name]. The integrity of the module is at [SPAN_HELPFUL(round(get_integrity_percent()))]%.")) + user.visible_message(SPAN_NOTICE("[user] finishes repairing \the [name]."), SPAN_NOTICE("You finish repairing \the [name]. The integrity of the module is at [SPAN_HELPFUL(floor(get_integrity_percent()))]%.")) being_repaired = FALSE return - to_chat(user, SPAN_NOTICE("The integrity of \the [src] is now at [SPAN_HELPFUL(round(get_integrity_percent()))]%.")) + to_chat(user, SPAN_NOTICE("The integrity of \the [src] is now at [SPAN_HELPFUL(floor(get_integrity_percent()))]%.")) being_repaired = FALSE - user.visible_message(SPAN_NOTICE("[user] stops repairing \the [name]."), SPAN_NOTICE("You stop repairing \the [name]. The integrity of the module is at [SPAN_HELPFUL(round(get_integrity_percent()))]%.")) + user.visible_message(SPAN_NOTICE("[user] stops repairing \the [name]."), SPAN_NOTICE("You stop repairing \the [name]. The integrity of the module is at [SPAN_HELPFUL(floor(get_integrity_percent()))]%.")) return /// Setter proc for the automatic firing flag. @@ -581,7 +590,6 @@ /// Wrapper proc for the autofire system to ensure the important args aren't null. /obj/item/hardpoint/proc/fire_wrapper(atom/target, mob/living/user, params) - SHOULD_NOT_OVERRIDE(TRUE) if(!target) target = src.target if(!user) @@ -688,7 +696,7 @@ if(muzzle_turf == target_turf) return FALSE - var/angle_diff = SIMPLIFY_DEGREES(dir2angle(dir) - Get_Angle(muzzle_turf, target_turf)) + var/angle_diff = (dir2angle(dir) - Get_Angle(muzzle_turf, target_turf)) %% 360 if(angle_diff < -180) angle_diff += 360 else if(angle_diff > 180) @@ -716,8 +724,10 @@ /obj/item/hardpoint/proc/get_icon_image(x_offset, y_offset, new_dir) var/is_broken = health <= 0 var/image/I = image(icon = disp_icon, icon_state = "[disp_icon_state]_[is_broken ? "1" : "0"]", pixel_x = x_offset, pixel_y = y_offset, dir = new_dir) - switch(round((health / initial(health)) * 100)) - if(0 to 20) + switch(floor((health / initial(health)) * 100)) + if(0) + I.color = "#888888" + if(1 to 20) I.color = "#4e4e4e" if(21 to 40) I.color = "#6e6e6e" @@ -792,3 +802,11 @@ /obj/item/hardpoint/get_applying_acid_time() return 10 SECONDS //you are not supposed to be able to easily combat-melt irreplaceable things. + +/// Proc to be overridden if you want to have special conditions preventing the removal of the hardpoint. Add chat messages in this proc if you want to tell the player why +/obj/item/hardpoint/proc/can_be_removed(mob/remover) + SHOULD_CALL_PARENT(TRUE) + + if(remover.stat > CONSCIOUS) + return FALSE + return TRUE diff --git a/code/modules/vehicles/hardpoints/hardpoint_ammo/arc_sentry_ammo.dm b/code/modules/vehicles/hardpoints/hardpoint_ammo/arc_sentry_ammo.dm new file mode 100644 index 000000000000..f9c28e151514 --- /dev/null +++ b/code/modules/vehicles/hardpoints/hardpoint_ammo/arc_sentry_ammo.dm @@ -0,0 +1,16 @@ +/obj/item/ammo_magazine/hardpoint/arc_sentry + name = "\improper RE700 Rotary Cannon Magazine" + desc = "A magazine for RE700 Rotary Cannon filled with 20mm rounds. Supports IFF." + caliber = "20mm" + icon_state = "ace_autocannon" + w_class = SIZE_LARGE + default_ammo = /datum/ammo/bullet/re700 + max_rounds = 500 + gun_type = /obj/item/hardpoint/primary/arc_sentry + +/obj/item/ammo_magazine/hardpoint/arc_sentry/update_icon() + if(current_rounds > 0) + icon_state = "ace_autocannon" + else + icon_state = "ace_autocannon_empty" + diff --git a/code/modules/vehicles/hardpoints/holder/tank_turret.dm b/code/modules/vehicles/hardpoints/holder/tank_turret.dm index 896628e609bb..403c5871f36b 100644 --- a/code/modules/vehicles/hardpoints/holder/tank_turret.dm +++ b/code/modules/vehicles/hardpoints/holder/tank_turret.dm @@ -119,7 +119,7 @@ data += list(list( // turret smokescreen data "name" = "M34A2-A Turret Smoke Screen", - "health" = health <= 0 ? null : round(get_integrity_percent()), + "health" = health <= 0 ? null : floor(get_integrity_percent()), "uses_ammo" = TRUE, "current_rounds" = ammo.current_rounds / 2, "max_rounds"= ammo.max_rounds / 2, diff --git a/code/modules/vehicles/hardpoints/primary/arc_sentry.dm b/code/modules/vehicles/hardpoints/primary/arc_sentry.dm new file mode 100644 index 000000000000..4b5087b2e608 --- /dev/null +++ b/code/modules/vehicles/hardpoints/primary/arc_sentry.dm @@ -0,0 +1,229 @@ +// APC cannons +/obj/item/hardpoint/primary/arc_sentry + name = "\improper RE700 Rotary Cannon" + desc = "A primary two-barrel cannon for the ARC that shoots 12.7mm IFF-compatible rounds." + icon = 'icons/obj/vehicles/hardpoints/arc.dmi' + + icon_state = "autocannon" + disp_icon = "arc" + disp_icon_state = "autocannon" + activation_sounds = list('sound/weapons/gun_m60.ogg') + + damage_multiplier = 0.1 + health = 125 + + origins = list(0, 0) + + ammo = new /obj/item/ammo_magazine/hardpoint/arc_sentry + max_clips = 2 + + use_muzzle_flash = TRUE + angle_muzzleflash = FALSE + muzzleflash_icon_state = "muzzle_flash_double" + + muzzle_flash_pos = list( + "1" = list(1, 4), + "2" = list(1, -29), + "4" = list(16, 3), + "8" = list(-16, 3) + ) + gun_firemode = GUN_FIREMODE_BURSTFIRE + gun_firemode_list = list( + GUN_FIREMODE_BURSTFIRE, + ) + burst_delay = 2 + burst_amount = 3 + projectile_type = /obj/projectile/arc_sentry + + /// Potential targets the turret can shoot at + var/list/targets = list() + /// The currently focused sentry target + var/atom/movable/sentry_target = null + /// The range that this turret can shoot at the furthest + var/turret_range = 5 + /// What factions this sentry is aligned with + var/faction_group = FACTION_LIST_MARINE + +/obj/item/hardpoint/primary/arc_sentry/on_install(obj/vehicle/multitile/vehicle) + . = ..() + RegisterSignal(owner, COMSIG_ARC_ANTENNA_TOGGLED, PROC_REF(toggle_processing)) + toggle_processing() // We can't know that the antenna is in the same position as when the gun was removed + +/obj/item/hardpoint/primary/arc_sentry/on_uninstall(obj/vehicle/multitile/vehicle) + . = ..() + UnregisterSignal(owner, COMSIG_ARC_ANTENNA_TOGGLED) + STOP_PROCESSING(SSfastobj, src) + +/obj/item/hardpoint/primary/arc_sentry/Destroy() + STOP_PROCESSING(SSfastobj, src) + sentry_target = null + return ..() + +/obj/item/hardpoint/primary/arc_sentry/proc/toggle_processing() + SIGNAL_HANDLER + if(!owner) + return + + var/obj/vehicle/multitile/arc/vehicle = owner + if(vehicle.antenna_deployed) + START_PROCESSING(SSfastobj, src) + + else + STOP_PROCESSING(SSfastobj, src) + +/obj/item/hardpoint/primary/arc_sentry/process() + for(var/mob/living/in_range_mob in range(turret_range, owner)) + targets |= in_range_mob + + if(!length(targets)) + return FALSE + + if(!sentry_target) + sentry_target = pick(targets) + + get_target(sentry_target) + return TRUE + +/obj/item/hardpoint/primary/arc_sentry/set_bullet_traits() + LAZYADD(traits_to_give, list( + BULLET_TRAIT_ENTRY(/datum/element/bullet_trait_iff, faction_group) + )) + +/obj/item/hardpoint/primary/arc_sentry/fire_wrapper(atom/target, mob/living/user, params) + if(!target) + target = src.target + if(!target) + return NONE + + return try_fire(target, null, params) + + +/obj/item/hardpoint/primary/arc_sentry/generate_bullet(mob/user, turf/origin_turf) + var/obj/projectile/arc_sentry/made_projectile = ..() + made_projectile.permutated += owner + return made_projectile + +/obj/item/hardpoint/primary/arc_sentry/start_fire(datum/source, atom/object, turf/location, control, params) + if(QDELETED(object)) + return + if(!COOLDOWN_FINISHED(src, fire_cooldown)) + return + + set_target(object) + SEND_SIGNAL(src, COMSIG_GUN_FIRE) + +/obj/item/hardpoint/primary/arc_sentry/proc/get_target(atom/movable/new_target) + if(QDELETED(new_target)) + sentry_target = null + return + + if(!targets.Find(new_target)) + targets.Add(new_target) + + if(!length(targets)) + return + + var/list/conscious_targets = list() + var/list/unconscious_targets = list() + + for(var/mob/living/living_mob as anything in targets) // orange allows sentry to fire through gas and darkness + if(living_mob.stat == DEAD) + purge_target(living_mob) + continue + + if(living_mob.get_target_lock(faction_group) || living_mob.invisibility || HAS_TRAIT(living_mob, TRAIT_ABILITY_BURROWED)) + purge_target(living_mob) + continue + + var/list/turf/path = get_line(get_turf(src), living_mob) + if(!length(path) || get_dist(get_turf(src), living_mob) > turret_range) + purge_target(living_mob) + continue + + var/blocked = FALSE + for(var/turf/tile as anything in path) + if(tile.density || tile.opacity) + blocked = TRUE + break + + for(var/obj/structure/struct in tile) + if(struct.opacity) + blocked = TRUE + break + + for(var/obj/vehicle/multitile/vehicle in tile) + if(vehicle == owner) // Some of the tiles will inevitably be the ARC itself + continue + blocked = TRUE + break + + if(locate(/obj/effect/particle_effect/smoke) in tile) + blocked = TRUE + break + + if(blocked) + purge_target(living_mob) + continue + + if(living_mob.stat & UNCONSCIOUS) + unconscious_targets += living_mob + else + conscious_targets += living_mob + + if((sentry_target in conscious_targets) || (sentry_target in unconscious_targets)) + sentry_target = sentry_target + + else if(length(conscious_targets)) + sentry_target = pick(conscious_targets) + + else if(length(unconscious_targets)) + sentry_target = pick(unconscious_targets) + + if(!sentry_target) //No targets, don't bother firing + return + + start_fire(object = sentry_target) + +/obj/item/hardpoint/primary/arc_sentry/proc/purge_target(mob/target) + if(target == sentry_target) + sentry_target = null + targets.Remove(target) + +/obj/item/hardpoint/primary/arc_sentry/can_be_removed(mob/remover) + var/obj/vehicle/multitile/arc/arc_owner = owner + if(!istype(arc_owner)) + return TRUE + + if(arc_owner.antenna_deployed) + to_chat(remover, SPAN_WARNING("[src] cannot be removed from [owner] while its antenna is deployed.")) + return FALSE + + return ..() + +/obj/projectile/arc_sentry/Initialize(mapload, datum/cause_data/cause_data) + . = ..() + RegisterSignal(src, COMSIG_BULLET_POST_HANDLE_OBJ, PROC_REF(check_passthrough)) + +/obj/projectile/arc_sentry/check_canhit(turf/current_turf, turf/next_turf) + var/proj_dir = get_dir(current_turf, next_turf) + var/obj/item/hardpoint/arc_sentry = shot_from + if(!(arc_sentry.owner in current_turf) && !(arc_sentry.owner in next_turf) && (proj_dir & (proj_dir - 1)) && !current_turf.Adjacent(next_turf)) + ammo.on_hit_turf(current_turf, src) + current_turf.bullet_act(src) + return TRUE + + // Check for hits that would occur when moving to turf, such as a blocking cade + if(scan_a_turf(next_turf, proj_dir)) + return TRUE + + return FALSE + +/obj/projectile/arc_sentry/proc/check_passthrough(datum/source, obj/hit_obj, bool) + SIGNAL_HANDLER + + if(!istype(shot_from, /obj/item/hardpoint)) + return + + var/obj/item/hardpoint/sentry = shot_from + if(sentry.owner == hit_obj) + return COMPONENT_BULLET_PASS_THROUGH diff --git a/code/modules/vehicles/hardpoints/primary/minigun.dm b/code/modules/vehicles/hardpoints/primary/minigun.dm index 03d1e7be0077..81b383b3fbc2 100644 --- a/code/modules/vehicles/hardpoints/primary/minigun.dm +++ b/code/modules/vehicles/hardpoints/primary/minigun.dm @@ -77,8 +77,8 @@ return spin_stage = clamp(spin_stage, 1, stage_rate_len) - var/old_stage_rate = stage_rate[Floor(old_spin_stage)] - var/new_stage_rate = stage_rate[Floor(spin_stage)] + var/old_stage_rate = stage_rate[floor(old_spin_stage)] + var/new_stage_rate = stage_rate[floor(spin_stage)] if(old_stage_rate != new_stage_rate) stage_delay_mult = 1 / new_stage_rate diff --git a/code/modules/vehicles/hardpoints/support/antenna.dm b/code/modules/vehicles/hardpoints/support/antenna.dm new file mode 100644 index 000000000000..b4980b7e3a3d --- /dev/null +++ b/code/modules/vehicles/hardpoints/support/antenna.dm @@ -0,0 +1,94 @@ +/obj/item/hardpoint/support/arc_antenna + name = "\improper U-56 Radar Antenna" + desc = "A heavy-duty antenna built for the ARC." + icon = 'icons/obj/vehicles/hardpoints/arc.dmi' + + icon_state = "antenna" + disp_icon = "arc" + disp_icon_state = "antenna" + + damage_multiplier = 0.1 + + health = 500 + + /// How long the antenna deploy/retract animation is, keep accurate to the sprite in the dmi + var/deploy_animation_time = 1.2 SECONDS + /// If the antenna is already deploying + var/deploying = FALSE + +/obj/item/hardpoint/support/arc_antenna/proc/deploy_antenna() + set waitfor = FALSE + + disp_icon_state = "" + if(owner) + owner.update_icon() + var/obj/dummy_obj = new() + dummy_obj.icon = 'icons/obj/vehicles/arc.dmi' + dummy_obj.icon_state = "antenna_cover_0" + dummy_obj.dir = owner.dir + dummy_obj.vis_flags = VIS_INHERIT_ID | VIS_INHERIT_LAYER | VIS_INHERIT_PLANE + owner.vis_contents += dummy_obj + flick("antenna_extending", dummy_obj) + sleep(deploy_animation_time) + qdel(dummy_obj) + disp_icon_state = initial(disp_icon_state) + +/obj/item/hardpoint/support/arc_antenna/proc/retract_antenna() + set waitfor = FALSE + + disp_icon_state = "" + if(owner) + owner.update_icon() + var/obj/dummy_obj = new() + dummy_obj.icon = 'icons/obj/vehicles/arc.dmi' + dummy_obj.icon_state = "antenna_cover_0" + dummy_obj.dir = owner.dir + dummy_obj.vis_flags = VIS_INHERIT_ID | VIS_INHERIT_LAYER | VIS_INHERIT_PLANE + owner.vis_contents += dummy_obj + flick("antenna_retracting", dummy_obj) + sleep(deploy_animation_time) + qdel(dummy_obj) + disp_icon_state = initial(disp_icon_state) + +/obj/item/hardpoint/support/arc_antenna/get_icon_image(x_offset, y_offset, new_dir) + var/is_broken = health <= 0 + var/antenna_extended = FALSE + if(istype(owner, /obj/vehicle/multitile/arc)) + var/obj/vehicle/multitile/arc/arc_owner = owner + antenna_extended = arc_owner.antenna_deployed + + var/image/antenna_img = image(icon = disp_icon, icon_state = "[disp_icon_state]_[antenna_extended ? "extended" : "cover"]_[is_broken ? "1" : "0"]", pixel_x = x_offset, pixel_y = y_offset, dir = new_dir) + switch(floor((health / initial(health)) * 100)) + if(0) + antenna_img.color = "#888888" + if(1 to 20) + antenna_img.color = "#4e4e4e" + if(21 to 40) + antenna_img.color = "#6e6e6e" + if(41 to 60) + antenna_img.color = "#8b8b8b" + if(61 to 80) + antenna_img.color = "#bebebe" + else + antenna_img.color = null + return antenna_img + +/obj/item/hardpoint/support/arc_antenna/can_be_removed(mob/remover) + var/obj/vehicle/multitile/arc/arc_owner = owner + if(!istype(arc_owner)) + return TRUE + + if(arc_owner.antenna_deployed) + to_chat(remover, SPAN_WARNING("[src] cannot be removed from [owner] while it is deployed.")) + return FALSE + + return ..() + +/obj/item/hardpoint/support/arc_antenna/on_destroy() + var/obj/vehicle/multitile/arc/arc_owner = owner + if(!istype(arc_owner)) + return + + if(arc_owner.antenna_deployed) + retract_antenna() + addtimer(CALLBACK(arc_owner, TYPE_PROC_REF(/obj/vehicle/multitile/arc, finish_antenna_retract)), deploy_animation_time) diff --git a/code/modules/vehicles/hardpoints/wheels/arc_wheels.dm b/code/modules/vehicles/hardpoints/wheels/arc_wheels.dm new file mode 100644 index 000000000000..9bb6c31746e0 --- /dev/null +++ b/code/modules/vehicles/hardpoints/wheels/arc_wheels.dm @@ -0,0 +1,17 @@ +/obj/item/hardpoint/locomotion/arc_wheels + name = "ARC Wheels" + desc = "Integral to the movement of the ARC." + icon = 'icons/obj/vehicles/hardpoints/arc.dmi' + + damage_multiplier = 0.15 + + icon_state = "tires" + disp_icon = "arc" + disp_icon_state = "arc_wheels" + + health = 500 + + move_delay = VEHICLE_SPEED_SUPERFAST + move_max_momentum = 2 + move_momentum_build_factor = 1.5 + move_turn_momentum_loss_factor = 0.5 diff --git a/code/modules/vehicles/hardpoints/wheels/locomotion.dm b/code/modules/vehicles/hardpoints/wheels/locomotion.dm index dd4173c54fa8..c05ada322a8d 100644 --- a/code/modules/vehicles/hardpoints/wheels/locomotion.dm +++ b/code/modules/vehicles/hardpoints/wheels/locomotion.dm @@ -46,7 +46,7 @@ //of vehicle enter the spray spawn area, it deals a huge amount of damage. But simply nerfing damage will also nerf it for //acid spraying castes like spitters and praetorians, which is not ideal. if(acid.cause_data.cause_name == "resin acid trap") - take_damage = round(take_damage / 3) + take_damage = floor(take_damage / 3) else if(istype(A, /obj/effect/blocker/toxic_water)) //multitile vehicles are, well, multitile and will be receiving damage for each tile, so damage is low per tile. diff --git a/code/modules/vehicles/interior/areas.dm b/code/modules/vehicles/interior/areas.dm index 254bcb6b26ea..399e55e11450 100644 --- a/code/modules/vehicles/interior/areas.dm +++ b/code/modules/vehicles/interior/areas.dm @@ -29,5 +29,9 @@ name = "van interior" icon_state = "van" +/area/interior/vehicle/arc + name = "\improper ARC interior" + icon_state = "arc" + /area/interior/fancylocker name = "closet interior" diff --git a/code/modules/vehicles/interior/interactable/seats.dm b/code/modules/vehicles/interior/interactable/seats.dm index 8abbf9f1190d..1fee4438074a 100644 --- a/code/modules/vehicles/interior/interactable/seats.dm +++ b/code/modules/vehicles/interior/interactable/seats.dm @@ -108,8 +108,6 @@ to_chat(user, SPAN_WARNING("You are unable to use heavy weaponry.")) return - if(!HAS_TRAIT(user, TRAIT_OPPOSABLE_THUMBS)) - return for(var/obj/item/I in user.contents) //prevents shooting while zoomed in, but zoom can still be activated and used without shooting if(I.zoom) I.zoom(user) diff --git a/code/modules/vehicles/interior/interactable/vendors.dm b/code/modules/vehicles/interior/interactable/vendors.dm index d78764da4d73..8069c8ba71e4 100644 --- a/code/modules/vehicles/interior/interactable/vendors.dm +++ b/code/modules/vehicles/interior/interactable/vendors.dm @@ -17,10 +17,6 @@ /obj/item/reagent_container/hypospray/autoinjector/skillless, /obj/item/reagent_container/hypospray/autoinjector/skillless/tramadol, ) - stack_refill = list( - /obj/item/stack/medical/bruise_pack, - /obj/item/stack/medical/ointment, - ) //MED APC version of WY Med, provides resupply for basic stuff. Provides a decent amount of cryobags for evacuating hugged marines. /obj/structure/machinery/cm_vending/sorted/medical/vehicle @@ -57,39 +53,31 @@ /obj/item/reagent_container/hypospray/autoinjector/tricord/skillless, ) - stack_refill = list( - /obj/item/stack/medical/advanced/ointment, - /obj/item/stack/medical/advanced/bruise_pack, - /obj/item/stack/medical/ointment, - /obj/item/stack/medical/bruise_pack, - /obj/item/stack/medical/splint, - ) - /obj/structure/machinery/cm_vending/sorted/medical/vehicle/populate_product_list(scale) listed_products = list( list("FIELD SUPPLIES", -1, null, null), - list("Burn Kit", round(scale * 4), /obj/item/stack/medical/advanced/ointment, VENDOR_ITEM_REGULAR), - list("Trauma Kit", round(scale * 4), /obj/item/stack/medical/advanced/bruise_pack, VENDOR_ITEM_REGULAR), - list("Ointment", round(scale * 5), /obj/item/stack/medical/ointment, VENDOR_ITEM_REGULAR), - list("Roll of Gauze", round(scale * 5), /obj/item/stack/medical/bruise_pack, VENDOR_ITEM_REGULAR), - list("Splints", round(scale * 5), /obj/item/stack/medical/splint, VENDOR_ITEM_REGULAR), + list("Burn Kit", floor(scale * 4), /obj/item/stack/medical/advanced/ointment, VENDOR_ITEM_REGULAR), + list("Trauma Kit", floor(scale * 4), /obj/item/stack/medical/advanced/bruise_pack, VENDOR_ITEM_REGULAR), + list("Ointment", floor(scale * 5), /obj/item/stack/medical/ointment, VENDOR_ITEM_REGULAR), + list("Roll of Gauze", floor(scale * 5), /obj/item/stack/medical/bruise_pack, VENDOR_ITEM_REGULAR), + list("Splints", floor(scale * 5), /obj/item/stack/medical/splint, VENDOR_ITEM_REGULAR), list("AUTOINJECTORS", -1, null, null), - list("Autoinjector (Bicaridine)", round(scale * 3), /obj/item/reagent_container/hypospray/autoinjector/bicaridine, VENDOR_ITEM_REGULAR), - list("Autoinjector (Dexalin+)", round(scale * 3), /obj/item/reagent_container/hypospray/autoinjector/dexalinp, VENDOR_ITEM_REGULAR), - list("Autoinjector (Epinephrine)", round(scale * 3), /obj/item/reagent_container/hypospray/autoinjector/adrenaline, VENDOR_ITEM_REGULAR), - list("Autoinjector (Inaprovaline)", round(scale * 3), /obj/item/reagent_container/hypospray/autoinjector/inaprovaline, VENDOR_ITEM_REGULAR), - list("Autoinjector (Kelotane)", round(scale * 3), /obj/item/reagent_container/hypospray/autoinjector/kelotane, VENDOR_ITEM_REGULAR), - list("Autoinjector (Oxycodone)", round(scale * 3), /obj/item/reagent_container/hypospray/autoinjector/oxycodone, VENDOR_ITEM_REGULAR), - list("Autoinjector (Tramadol)", round(scale * 3), /obj/item/reagent_container/hypospray/autoinjector/tramadol, VENDOR_ITEM_REGULAR), - list("Autoinjector (Tricord)", round(scale * 3), /obj/item/reagent_container/hypospray/autoinjector/tricord, VENDOR_ITEM_REGULAR), + list("Autoinjector (Bicaridine)", floor(scale * 3), /obj/item/reagent_container/hypospray/autoinjector/bicaridine, VENDOR_ITEM_REGULAR), + list("Autoinjector (Dexalin+)", floor(scale * 3), /obj/item/reagent_container/hypospray/autoinjector/dexalinp, VENDOR_ITEM_REGULAR), + list("Autoinjector (Epinephrine)", floor(scale * 3), /obj/item/reagent_container/hypospray/autoinjector/adrenaline, VENDOR_ITEM_REGULAR), + list("Autoinjector (Inaprovaline)", floor(scale * 3), /obj/item/reagent_container/hypospray/autoinjector/inaprovaline, VENDOR_ITEM_REGULAR), + list("Autoinjector (Kelotane)", floor(scale * 3), /obj/item/reagent_container/hypospray/autoinjector/kelotane, VENDOR_ITEM_REGULAR), + list("Autoinjector (Oxycodone)", floor(scale * 3), /obj/item/reagent_container/hypospray/autoinjector/oxycodone, VENDOR_ITEM_REGULAR), + list("Autoinjector (Tramadol)", floor(scale * 3), /obj/item/reagent_container/hypospray/autoinjector/tramadol, VENDOR_ITEM_REGULAR), + list("Autoinjector (Tricord)", floor(scale * 3), /obj/item/reagent_container/hypospray/autoinjector/tricord, VENDOR_ITEM_REGULAR), list("MEDICAL UTILITIES", -1, null, null), - list("Surgical Line", round(scale * 2), /obj/item/tool/surgery/surgical_line, VENDOR_ITEM_REGULAR), - list("Synth-Graft", round(scale * 2), /obj/item/tool/surgery/synthgraft, VENDOR_ITEM_REGULAR), - list("Health Analyzer", round(scale * 4), /obj/item/device/healthanalyzer, VENDOR_ITEM_REGULAR), - list("Stasis Bag", round(scale * 6), /obj/item/bodybag/cryobag, VENDOR_ITEM_REGULAR), - list("Syringe", round(scale * 3), /obj/item/reagent_container/syringe, VENDOR_ITEM_REGULAR) + list("Surgical Line", floor(scale * 2), /obj/item/tool/surgery/surgical_line, VENDOR_ITEM_REGULAR), + list("Synth-Graft", floor(scale * 2), /obj/item/tool/surgery/synthgraft, VENDOR_ITEM_REGULAR), + list("Health Analyzer", floor(scale * 4), /obj/item/device/healthanalyzer, VENDOR_ITEM_REGULAR), + list("Stasis Bag", floor(scale * 6), /obj/item/bodybag/cryobag, VENDOR_ITEM_REGULAR), + list("Syringe", floor(scale * 3), /obj/item/reagent_container/syringe, VENDOR_ITEM_REGULAR) ) //MED APC version of Blood Dispenser @@ -125,7 +113,6 @@ wrenchable = FALSE hackable = FALSE density = FALSE - var/being_restocked = FALSE vend_flags = VEND_CLUTTER_PROTECTION | VEND_LIMITED_INVENTORY | VEND_TO_HAND | VEND_LOAD_AMMO_BOXES @@ -180,15 +167,15 @@ /obj/structure/machinery/cm_vending/sorted/vehicle_supply/populate_product_list(scale) listed_products = list( list("PRIMARY FIREARMS", -1, null, null), - list("M37A2 Pump Shotgun", round(scale * 3), /obj/item/weapon/gun/shotgun/pump, VENDOR_ITEM_REGULAR), - list("M39 Submachinegun", round(scale * 2.5), /obj/item/weapon/gun/smg/m39, VENDOR_ITEM_REGULAR), - list("M41A Pulse Rifle MK2", round(scale * 4), /obj/item/weapon/gun/rifle/m41a, VENDOR_ITEM_REGULAR), - list("M4RA Battle Rifle", round(scale * 2), /obj/item/weapon/gun/rifle/m4ra, VENDOR_ITEM_REGULAR), + list("M37A2 Pump Shotgun", floor(scale * 3), /obj/item/weapon/gun/shotgun/pump, VENDOR_ITEM_REGULAR), + list("M39 Submachinegun", floor(scale * 2.5), /obj/item/weapon/gun/smg/m39, VENDOR_ITEM_REGULAR), + list("M41A Pulse Rifle MK2", floor(scale * 4), /obj/item/weapon/gun/rifle/m41a, VENDOR_ITEM_REGULAR), + list("M4RA Battle Rifle", floor(scale * 2), /obj/item/weapon/gun/rifle/m4ra, VENDOR_ITEM_REGULAR), list("SIDEARMS", -1, null, null), - list("88 Mod 4 Combat Pistol", round(scale * 2), /obj/item/weapon/gun/pistol/mod88, VENDOR_ITEM_REGULAR), - list("M44 Combat Revolver", round(scale * 1.5), /obj/item/weapon/gun/revolver/m44, VENDOR_ITEM_REGULAR), - list("M4A3 Service Pistol", round(scale * 2.5), /obj/item/weapon/gun/pistol/m4a3, VENDOR_ITEM_REGULAR), + list("88 Mod 4 Combat Pistol", floor(scale * 2), /obj/item/weapon/gun/pistol/mod88, VENDOR_ITEM_REGULAR), + list("M44 Combat Revolver", floor(scale * 1.5), /obj/item/weapon/gun/revolver/m44, VENDOR_ITEM_REGULAR), + list("M4A3 Service Pistol", floor(scale * 2.5), /obj/item/weapon/gun/pistol/m4a3, VENDOR_ITEM_REGULAR), list("EXPLOSIVES", -1, null, null), list("M15 Fragmentation Grenade", 0, /obj/item/explosive/grenade/high_explosive/m15, VENDOR_ITEM_REGULAR), @@ -196,29 +183,29 @@ list("M40 HEDP Grenade", 0, /obj/item/explosive/grenade/high_explosive, VENDOR_ITEM_REGULAR), list("M40 HIDP Incendiary Grenade", 0, /obj/item/explosive/grenade/incendiary, VENDOR_ITEM_REGULAR), list("M40 HPDP White Phosphorus Smoke Grenade", 0, /obj/item/explosive/grenade/phosphorus, VENDOR_ITEM_REGULAR), - list("M40 HSDP Smoke Grenade", round(scale * 1), /obj/item/explosive/grenade/smokebomb, VENDOR_ITEM_REGULAR), + list("M40 HSDP Smoke Grenade", floor(scale * 1), /obj/item/explosive/grenade/smokebomb, VENDOR_ITEM_REGULAR), list("M74 AGM-Frag Airburst Grenade", 0, /obj/item/explosive/grenade/high_explosive/airburst, VENDOR_ITEM_REGULAR), list("M74 AGM-Incendiary Airburst Grenade", 0, /obj/item/explosive/grenade/incendiary/airburst, VENDOR_ITEM_REGULAR), list("M74 AGM-Smoke Airburst Grenade", 0, /obj/item/explosive/grenade/smokebomb/airburst, VENDOR_ITEM_REGULAR), list("M74 AGM-Star Shell", 2, /obj/item/explosive/grenade/high_explosive/airburst/starshell, VENDOR_ITEM_REGULAR), list("M74 AGM-Hornet Shell", 0, /obj/item/explosive/grenade/high_explosive/airburst/hornet_shell, VENDOR_ITEM_REGULAR), - list("M40 HIRR Baton Slug", round(scale * 2), /obj/item/explosive/grenade/slug/baton, VENDOR_ITEM_REGULAR), + list("M40 HIRR Baton Slug", floor(scale * 2), /obj/item/explosive/grenade/slug/baton, VENDOR_ITEM_REGULAR), list("M40 MFHS Metal Foam Grenade", 0, /obj/item/explosive/grenade/metal_foam, VENDOR_ITEM_REGULAR), list("Breaching Charge", 0, /obj/item/explosive/plastic/breaching_charge, VENDOR_ITEM_REGULAR), list("Plastic Explosives", 2, /obj/item/explosive/plastic, VENDOR_ITEM_REGULAR), list("REGULAR AMMUNITION", -1, null, null), - list("Box Of Buckshot Shells", round(scale * 3), /obj/item/ammo_magazine/shotgun/buckshot, VENDOR_ITEM_REGULAR), - list("Box Of Flechette Shells", round(scale * 2), /obj/item/ammo_magazine/shotgun/flechette, VENDOR_ITEM_REGULAR), - list("Box Of Shotgun Slugs", round(scale * 4), /obj/item/ammo_magazine/shotgun/slugs, VENDOR_ITEM_REGULAR), - list("M4RA Magazine (10x24mm)", round(scale * 5), /obj/item/ammo_magazine/rifle/m4ra, VENDOR_ITEM_REGULAR), - list("M41A MK2 Magazine (10x24mm)", round(scale * 10), /obj/item/ammo_magazine/rifle, VENDOR_ITEM_REGULAR), - list("M39 HV Magazine (10x20mm)", round(scale * 6), /obj/item/ammo_magazine/smg/m39, VENDOR_ITEM_REGULAR), - list("M44 Speed Loader (.44)", round(scale * 4), /obj/item/ammo_magazine/revolver, VENDOR_ITEM_REGULAR), - list("M4A3 Magazine (9mm)", round(scale * 10), /obj/item/ammo_magazine/pistol, VENDOR_ITEM_REGULAR), + list("Box Of Buckshot Shells", floor(scale * 3), /obj/item/ammo_magazine/shotgun/buckshot, VENDOR_ITEM_REGULAR), + list("Box Of Flechette Shells", floor(scale * 2), /obj/item/ammo_magazine/shotgun/flechette, VENDOR_ITEM_REGULAR), + list("Box Of Shotgun Slugs", floor(scale * 4), /obj/item/ammo_magazine/shotgun/slugs, VENDOR_ITEM_REGULAR), + list("M4RA Magazine (10x24mm)", floor(scale * 5), /obj/item/ammo_magazine/rifle/m4ra, VENDOR_ITEM_REGULAR), + list("M41A MK2 Magazine (10x24mm)", floor(scale * 10), /obj/item/ammo_magazine/rifle, VENDOR_ITEM_REGULAR), + list("M39 HV Magazine (10x20mm)", floor(scale * 6), /obj/item/ammo_magazine/smg/m39, VENDOR_ITEM_REGULAR), + list("M44 Speed Loader (.44)", floor(scale * 4), /obj/item/ammo_magazine/revolver, VENDOR_ITEM_REGULAR), + list("M4A3 Magazine (9mm)", floor(scale * 10), /obj/item/ammo_magazine/pistol, VENDOR_ITEM_REGULAR), list("ARMOR-PIERCING AMMUNITION", -1, null, null), - list("88 Mod 4 AP Magazine (9mm)", round(scale * 8), /obj/item/ammo_magazine/pistol/mod88, VENDOR_ITEM_REGULAR), + list("88 Mod 4 AP Magazine (9mm)", floor(scale * 8), /obj/item/ammo_magazine/pistol/mod88, VENDOR_ITEM_REGULAR), list("M4RA AP Magazine (10x24mm)", 0, /obj/item/ammo_magazine/rifle/m4ra/ap, VENDOR_ITEM_REGULAR), list("M39 AP Magazine (10x20mm)", 0, /obj/item/ammo_magazine/smg/m39/ap, VENDOR_ITEM_REGULAR), list("M41A MK2 AP Magazine (10x24mm)", 0, /obj/item/ammo_magazine/rifle/ap, VENDOR_ITEM_REGULAR), @@ -254,8 +241,8 @@ list("M56 Battery", 0, /obj/item/smartgun_battery, VENDOR_ITEM_REGULAR), list("M56 Smartgun Drum", 0, /obj/item/ammo_magazine/smartgun, VENDOR_ITEM_REGULAR), list("M56D Drum Magazine",0, /obj/item/ammo_magazine/m56d, VENDOR_ITEM_REGULAR), - list("SU-6 Smartpistol Magazine (.45)", round(scale * 2), /obj/item/ammo_magazine/pistol/smart, VENDOR_ITEM_REGULAR), - list("VP78 Magazine", round(scale * 1.5), /obj/item/ammo_magazine/pistol/vp78, VENDOR_ITEM_REGULAR), + list("SU-6 Smartpistol Magazine (.45)", floor(scale * 2), /obj/item/ammo_magazine/pistol/smart, VENDOR_ITEM_REGULAR), + list("VP78 Magazine", floor(scale * 1.5), /obj/item/ammo_magazine/pistol/vp78, VENDOR_ITEM_REGULAR), list("BUILDING MATERIALS", -1, null, null), list("Cardboard x10", 1, /obj/item/stack/sheet/cardboard/small_stack, VENDOR_ITEM_REGULAR), @@ -275,23 +262,23 @@ list("SMG Ammunition Box (10x20mm AP)", 0, /obj/item/ammo_box/rounds/smg/ap, VENDOR_ITEM_REGULAR), list("MISCELLANEOUS", -1, null, null), - list("Box Of MREs", round(scale * 1.5), /obj/item/ammo_box/magazine/misc/mre, VENDOR_ITEM_REGULAR), - list("Box Of M94 Marking Flare Packs", round(scale * 2), /obj/item/ammo_box/magazine/misc/flares, VENDOR_ITEM_REGULAR), - list("Entrenching Tool", round(scale * 2), /obj/item/tool/shovel/etool, VENDOR_ITEM_REGULAR), - list("M5 Bayonet", round(scale * 5), /obj/item/attachable/bayonet, VENDOR_ITEM_REGULAR), + list("Box Of MREs", floor(scale * 1.5), /obj/item/ammo_box/magazine/misc/mre, VENDOR_ITEM_REGULAR), + list("Box Of M94 Marking Flare Packs", floor(scale * 2), /obj/item/ammo_box/magazine/misc/flares, VENDOR_ITEM_REGULAR), + list("Entrenching Tool", floor(scale * 2), /obj/item/tool/shovel/etool, VENDOR_ITEM_REGULAR), + list("M5 Bayonet", floor(scale * 5), /obj/item/attachable/bayonet, VENDOR_ITEM_REGULAR), list("M89-S Signal Flare Pack", 0, /obj/item/storage/box/m94/signal, VENDOR_ITEM_REGULAR), - list("M94 Marking Flare Pack", round(scale * 1), /obj/item/storage/box/m94, VENDOR_ITEM_REGULAR), - list("Machete Scabbard (Full)", round(scale * 1), /obj/item/storage/large_holster/machete/full, VENDOR_ITEM_REGULAR), + list("M94 Marking Flare Pack", floor(scale * 1), /obj/item/storage/box/m94, VENDOR_ITEM_REGULAR), + list("Machete Scabbard (Full)", floor(scale * 1), /obj/item/storage/large_holster/machete/full, VENDOR_ITEM_REGULAR), list("MB-6 Folding Barricades (x3)", 0, /obj/item/stack/folding_barricade/three, VENDOR_ITEM_REGULAR), list("Motion Detector", 0, /obj/item/device/motiondetector, VENDOR_ITEM_REGULAR), list("Roller Bed", 2, /obj/item/roller, VENDOR_ITEM_REGULAR), list("ARMOR AND CLOTHING", -1, null, null), list("Heat Absorbent Coif", 10, /obj/item/clothing/mask/rebreather/scarf, VENDOR_ITEM_REGULAR), - list("M10 Pattern Marine Helmet", round(scale * 3), /obj/item/clothing/head/helmet/marine, VENDOR_ITEM_REGULAR), - list("M3 Pattern Marine Armor", round(scale * 1), /obj/item/clothing/suit/storage/marine, VENDOR_ITEM_REGULAR), - list("M3-EOD Pattern Heavy Armor", round(scale * 1), /obj/item/clothing/suit/storage/marine/heavy, VENDOR_ITEM_REGULAR), - list("M3-L Pattern Light Armor", round(scale * 1), /obj/item/clothing/suit/storage/marine/light, VENDOR_ITEM_REGULAR), + list("M10 Pattern Marine Helmet", floor(scale * 3), /obj/item/clothing/head/helmet/marine, VENDOR_ITEM_REGULAR), + list("M3 Pattern Marine Armor", floor(scale * 1), /obj/item/clothing/suit/storage/marine, VENDOR_ITEM_REGULAR), + list("M3-EOD Pattern Heavy Armor", floor(scale * 1), /obj/item/clothing/suit/storage/marine/heavy, VENDOR_ITEM_REGULAR), + list("M3-L Pattern Light Armor", floor(scale * 1), /obj/item/clothing/suit/storage/marine/light, VENDOR_ITEM_REGULAR), ) //combined from req guns and ammo vendors @@ -330,7 +317,7 @@ to_chat(user, SPAN_WARNING("\The [S] are being stored in [SPAN_HELPFUL("stacks of 5")] for convenience. You need \the [S] stack of at least 5 to restock it.")) return FALSE else - stack_restock = Floor(S.amount / 5) + stack_restock = floor(S.amount / 5) //for the ease of finding enough materials to stack, it will be stored in stacks of 10 sheets just like they come in engie vendor else if(S.amount < 10) @@ -338,7 +325,7 @@ to_chat(user, SPAN_WARNING("\The [S] are being stored in [SPAN_HELPFUL("stacks of 10")] for convenience. You need \the [S] stack of at least 10 to restock it.")) return FALSE else - stack_restock = Floor(S.amount / 10) + stack_restock = floor(S.amount / 10) //item we are restocking is a stack and we need to conveniently restock it //instead of demanding user to split it into stacks of appropriate amount diff --git a/code/modules/vehicles/interior/interior.dm b/code/modules/vehicles/interior/interior.dm index 8fb65602c9b3..6aaeb6439176 100644 --- a/code/modules/vehicles/interior/interior.dm +++ b/code/modules/vehicles/interior/interior.dm @@ -118,7 +118,7 @@ var/list/passengers var/list/bounds = get_bound_turfs() - for(var/turf/T in block(bounds[1], bounds[2])) + for(var/turf/T as anything in block(bounds[1], bounds[2])) for(var/atom/A in T) if(isliving(A)) LAZYADD(passengers, A) @@ -309,12 +309,12 @@ /datum/interior/proc/get_middle_coords() var/turf/min = reservation.bottom_left_turfs[1] var/turf/max = reservation.top_right_turfs[1] - return list(Floor(min.x + (max.x - min.x)/2), Floor(min.y + (max.y - min.y)/2), min.z) + return list(floor(min.x + (max.x - min.x)/2), floor(min.y + (max.y - min.y)/2), min.z) /datum/interior/proc/get_middle_turf() var/list/turf/bounds = get_bound_turfs() - var/turf/middle = locate(Floor(bounds[1].x + (bounds[2].x - bounds[1].x)/2), Floor(bounds[1].y + (bounds[2].y - bounds[1].y)/2), bounds[1].z) + var/turf/middle = locate(floor(bounds[1].x + (bounds[2].x - bounds[1].x)/2), floor(bounds[1].y + (bounds[2].y - bounds[1].y)/2), bounds[1].z) return middle @@ -322,7 +322,7 @@ /datum/interior/proc/find_entrances() var/list/bounds = get_bound_turfs() - for(var/turf/T in block(bounds[1], bounds[2])) + for(var/turf/T as anything in block(bounds[1], bounds[2])) var/obj/effect/landmark/interior/spawn/entrance/E = locate() in T if(E) LAZYADD(entrance_markers, E) @@ -332,6 +332,6 @@ /datum/interior/proc/handle_landmarks() var/list/bounds = get_bound_turfs() - for(var/turf/T in block(bounds[1], bounds[2])) + for(var/turf/T as anything in block(bounds[1], bounds[2])) for(var/obj/effect/landmark/interior/L in T) L.on_load(src) diff --git a/code/modules/vehicles/interior/interior_landmarks.dm b/code/modules/vehicles/interior/interior_landmarks.dm index 90284682d2d4..fa1eee8651ac 100644 --- a/code/modules/vehicles/interior/interior_landmarks.dm +++ b/code/modules/vehicles/interior/interior_landmarks.dm @@ -227,7 +227,7 @@ Phone.pixel_x = pixel_x Phone.pixel_y = pixel_y Phone.phone_category = "Vehicles" - Phone.phone_id = I.exterior.name + Phone.phone_id = replacetext(Phone.phone_id, "\improper", "") // this has to be done because phone IDs need to be the same as their display name (\improper doesn't display, obviously) qdel(src) diff --git a/code/modules/vehicles/multitile/multitile.dm b/code/modules/vehicles/multitile/multitile.dm index f3b7be510b08..ce118fd14c56 100644 --- a/code/modules/vehicles/multitile/multitile.dm +++ b/code/modules/vehicles/multitile/multitile.dm @@ -293,14 +293,14 @@ // Health check is done before the hardpoint takes damage // This way, the frame won't take damage at the same time hardpoints break if(H.can_take_damage()) - H.take_damage(round(damage * get_dmg_multi(type))) + H.take_damage(floor(damage * get_dmg_multi(type))) all_broken = FALSE // If all hardpoints are broken, the vehicle frame begins taking full damage if(all_broken) health = max(0, health - damage * get_dmg_multi(type)) else //otherwise, 1/10th of damage lands on the hull - health = max(0, health - round(damage * get_dmg_multi(type) / 10)) + health = max(0, health - floor(damage * get_dmg_multi(type) / 10)) if(ismob(attacker)) var/mob/M = attacker @@ -334,11 +334,12 @@ // Checked here because we want to be able to null the mob in a seat if(!istype(M)) - return + return FALSE M.set_interaction(src) M.reset_view(src) give_action(M, /datum/action/human_action/vehicle_unbuckle) + return TRUE /// Get crewmember of seat. /obj/vehicle/multitile/proc/get_seat_mob(seat) diff --git a/code/modules/vehicles/multitile/multitile_bump.dm b/code/modules/vehicles/multitile/multitile_bump.dm index 79789af054fa..11005cc87ea2 100644 --- a/code/modules/vehicles/multitile/multitile_bump.dm +++ b/code/modules/vehicles/multitile/multitile_bump.dm @@ -384,7 +384,7 @@ var/obj/item/device/m2c_gun/HMG = new(loc) HMG.name = name HMG.rounds = rounds - HMG.overheat_value = round(0.5 * overheat_value) + HMG.overheat_value = floor(0.5 * overheat_value) if(HMG.overheat_value <= 10) HMG.overheat_value = 0 HMG.update_icon() @@ -494,7 +494,7 @@ /obj/vehicle/handle_vehicle_bump(obj/vehicle/multitile/V) V.take_damage_type(5, "blunt", V) - health = health - Ceiling(maxhealth/2.8) //we destroy any simple vehicle in 3 crushes + health = health - ceil(maxhealth/2.8) //we destroy any simple vehicle in 3 crushes healthcheck() visible_message(SPAN_DANGER("\The [V] crushes into \the [src]!")) @@ -726,7 +726,7 @@ //this adds more flexibility for trample damage damage_percentage *= VEHICLE_TRAMPLE_DAMAGE_APC_REDUCTION - damage_percentage -= round((armor_deflection*(armor_integrity/100)) / VEHICLE_TRAMPLE_DAMAGE_REDUCTION_ARMOR_MULT) // Ravager reduces percentage by ~50% by virtue of having very high armor. + damage_percentage -= floor((armor_deflection*(armor_integrity/100)) / VEHICLE_TRAMPLE_DAMAGE_REDUCTION_ARMOR_MULT) // Ravager reduces percentage by ~50% by virtue of having very high armor. if(locate(/obj/item/hardpoint/support/overdrive_enhancer) in V) damage_percentage += VEHICLE_TRAMPLE_DAMAGE_OVERDRIVE_BUFF @@ -734,7 +734,7 @@ damage_percentage = max(VEHICLE_TRAMPLE_DAMAGE_OVERDRIVE_BUFF, max(0, damage_percentage)) damage_percentage = max(damage_percentage, VEHICLE_TRAMPLE_DAMAGE_MIN) - apply_damage(round((maxHealth / 100) * damage_percentage), BRUTE) + apply_damage(floor((maxHealth / 100) * damage_percentage), BRUTE) last_damage_data = create_cause_data("[initial(V.name)] roadkill", V.seats[VEHICLE_DRIVER]) var/mob/living/driver = V.get_seat_mob(VEHICLE_DRIVER) log_attack("[key_name(src)] was rammed by [key_name(driver)] with [V].") @@ -744,7 +744,7 @@ return TRUE else if (mob_moved) if(momentum_penalty) - V.move_momentum = Floor(V.move_momentum*0.8) + V.move_momentum = floor(V.move_momentum*0.8) V.update_next_move() playsound(loc, "punch", 25, 1) return TRUE @@ -769,7 +769,7 @@ visible_message(SPAN_DANGER("[src] digs it's claws into the ground, slowing [V]'s movement!"), SPAN_DANGER("You dig your claws into the ground, slowing [V]'s movement!")) var/mob_moved = step(src, V.last_move_dir) - V.move_momentum = Floor(V.move_momentum/3) + V.move_momentum = floor(V.move_momentum/3) V.update_next_move() return mob_moved diff --git a/code/modules/vehicles/multitile/multitile_hardpoints.dm b/code/modules/vehicles/multitile/multitile_hardpoints.dm index 2a6f97dda06f..b94b8459890f 100644 --- a/code/modules/vehicles/multitile/multitile_hardpoints.dm +++ b/code/modules/vehicles/multitile/multitile_hardpoints.dm @@ -149,7 +149,7 @@ hps += H var/chosen_hp = tgui_input_list(usr, "Select a hardpoint to remove", "Hardpoint Removal", (hps + "Cancel")) - if(chosen_hp == "Cancel" || !chosen_hp || !in_range(src, user)) + if(chosen_hp == "Cancel" || !chosen_hp || (get_dist(src, user) > 2)) //get_dist uses 2 because the vehicle is 3x3 return var/obj/item/hardpoint/old = chosen_hp @@ -158,6 +158,9 @@ to_chat(user, SPAN_WARNING("There is nothing installed there.")) return + if(!old.can_be_removed(user)) + return + // It's in a holder if(!(old in hardpoints)) for(var/obj/item/hardpoint/holder/H in hardpoints) diff --git a/code/modules/vehicles/multitile/multitile_interaction.dm b/code/modules/vehicles/multitile/multitile_interaction.dm index 552d9cea4561..84b1d4de0efc 100644 --- a/code/modules/vehicles/multitile/multitile_interaction.dm +++ b/code/modules/vehicles/multitile/multitile_interaction.dm @@ -297,7 +297,7 @@ if(ammo_flags & AMMO_ANTISTRUCT|AMMO_ANTIVEHICLE) // Multiplier based on tank railgun relationship, so might have to reconsider multiplier for AMMO_SIEGE in general - damage = round(damage*ANTISTRUCT_DMG_MULT_TANK) + damage = floor(damage*ANTISTRUCT_DMG_MULT_TANK) if(ammo_flags & AMMO_ACIDIC) dam_type = "acid" diff --git a/code/modules/vehicles/multitile/multitile_movement.dm b/code/modules/vehicles/multitile/multitile_movement.dm index b5f308144707..35e909cf7414 100644 --- a/code/modules/vehicles/multitile/multitile_movement.dm +++ b/code/modules/vehicles/multitile/multitile_movement.dm @@ -141,15 +141,18 @@ /obj/vehicle/multitile/proc/can_move(direction) var/can_move = TRUE - var/turf/min_turf = locate(x + bound_x / world.icon_size, y + bound_y / world.icon_size, z) - var/turf/max_turf = locate(min_turf.x + (bound_width / world.icon_size) - 1, min_turf.y + (bound_height / world.icon_size) - 1, z) - var/list/old_turfs = block(min_turf, max_turf) + var/bound_x_tiles = bound_x / world.icon_size + var/bound_y_tiles = bound_y / world.icon_size + var/turf/min_turf = locate(x + bound_x_tiles, y + bound_y_tiles, z) + + var/bound_width_tiles = bound_width / world.icon_size + var/bound_height_tiles = bound_height / world.icon_size + var/list/old_turfs = CORNER_BLOCK(min_turf, bound_width_tiles, bound_height_tiles) var/turf/new_loc = get_step(src, direction) - min_turf = locate(new_loc.x + bound_x / world.icon_size, new_loc.y + bound_y / world.icon_size, z) - max_turf = locate(min_turf.x + (bound_width / world.icon_size) - 1, min_turf.y + (bound_height / world.icon_size) - 1, z) + min_turf = locate(new_loc.x + bound_x_tiles, new_loc.y + bound_y_tiles, z) - for(var/turf/T in block(min_turf, max_turf)) + for(var/turf/T as anything in CORNER_BLOCK(min_turf, bound_width_tiles, bound_height_tiles)) // only check the turfs we're moving to if(T in old_turfs) continue @@ -159,7 +162,7 @@ // Crashed with something that stopped us if(!can_move) - move_momentum = Floor(move_momentum/2) + move_momentum = floor(move_momentum/2) update_next_move() interior_crash_effect() @@ -254,7 +257,7 @@ if(abs(move_momentum) <= 1) return - var/fling_distance = Ceiling(move_momentum/move_max_momentum) * 2 + var/fling_distance = ceil(move_momentum/move_max_momentum) * 2 var/turf/target = interior.get_middle_turf() for (var/x in 0 to fling_distance-1) @@ -264,7 +267,7 @@ break var/list/bounds = interior.get_bound_turfs() - for(var/turf/T in block(bounds[1], bounds[2])) + for(var/turf/T as anything in block(bounds[1], bounds[2])) for(var/atom/movable/A in T) if(A.anchored) continue @@ -272,7 +275,7 @@ if(isliving(A)) var/mob/living/M = A - shake_camera(M, 2, Ceiling(move_momentum/move_max_momentum) * 1) + shake_camera(M, 2, ceil(move_momentum/move_max_momentum) * 1) if(!M.buckled) M.apply_effect(1, STUN) M.apply_effect(2, WEAKEN) diff --git a/code/modules/vehicles/multitile/multitile_verbs.dm b/code/modules/vehicles/multitile/multitile_verbs.dm index 3801cd2e176c..52d8602c9852 100644 --- a/code/modules/vehicles/multitile/multitile_verbs.dm +++ b/code/modules/vehicles/multitile/multitile_verbs.dm @@ -167,7 +167,7 @@ )) data["resistance_data"] = resist_data_list - data["integrity"] = round(100 * health / initial(health)) + data["integrity"] = floor(100 * health / initial(health)) data["door_locked"] = door_locked data["total_passenger_slots"] = interior.passengers_slots data["total_taken_slots"] = interior.passengers_taken_slots diff --git a/code/modules/vehicles/vehicle.dm b/code/modules/vehicles/vehicle.dm index 8632159b4f6d..c78be6fa57ec 100644 --- a/code/modules/vehicles/vehicle.dm +++ b/code/modules/vehicles/vehicle.dm @@ -159,10 +159,11 @@ // Checked here because we want to be able to null the mob in a seat if(!istype(M)) - return + return FALSE M.forceMove(src) M.set_interaction(src) + return TRUE /obj/vehicle/proc/turn_on() if(stat) diff --git a/colonialmarines.dme b/colonialmarines.dme index 72bda9e79671..118435fbd497 100644 --- a/colonialmarines.dme +++ b/colonialmarines.dme @@ -382,6 +382,7 @@ #include "code\datums\ammo\rocket.dm" #include "code\datums\ammo\shrapnel.dm" #include "code\datums\ammo\xeno.dm" +#include "code\datums\ammo\bullet\arc.dm" #include "code\datums\ammo\bullet\bullet.dm" #include "code\datums\ammo\bullet\lever_action.dm" #include "code\datums\ammo\bullet\pistol.dm" @@ -404,6 +405,7 @@ #include "code\datums\components\cluster_stack.dm" #include "code\datums\components\connect_mob_behalf.dm" #include "code\datums\components\crate_tag.dm" +#include "code\datums\components\disk_reader.dm" #include "code\datums\components\footstep.dm" #include "code\datums\components\healing_reduction.dm" #include "code\datums\components\id_lock.dm" @@ -631,6 +633,7 @@ #include "code\datums\skills\synthetic.dm" #include "code\datums\skills\upp.dm" #include "code\datums\skills\uscm.dm" +#include "code\datums\skills\wygoons.dm" #include "code\datums\stamina\_stamina.dm" #include "code\datums\stamina\none.dm" #include "code\datums\statistics\cause_data.dm" @@ -676,6 +679,7 @@ #include "code\datums\supply_packs\restricted_equipment.dm" #include "code\datums\supply_packs\spec_ammo.dm" #include "code\datums\supply_packs\vehicle_ammo.dm" +#include "code\datums\supply_packs\vehicle_equipment.dm" #include "code\datums\supply_packs\weapons.dm" #include "code\datums\tutorial\_tutorial.dm" #include "code\datums\tutorial\_tutorial_menu.dm" @@ -1690,6 +1694,7 @@ #include "code\modules\cm_tech\resources\resource.dm" #include "code\modules\cm_tech\techs\abstract\repeatable.dm" #include "code\modules\cm_tech\techs\abstract\transitory.dm" +#include "code\modules\cm_tech\techs\marine\tier1\arc.dm" #include "code\modules\cm_tech\techs\marine\tier1\points.dm" #include "code\modules\cm_tech\techs\marine\tier2\orbital_ammo.dm" #include "code\modules\cm_tech\techs\marine\tier3\cryo_spec.dm" @@ -2382,6 +2387,7 @@ #include "code\modules\tgui\tgui-say\modal.dm" #include "code\modules\tgui\tgui-say\speech.dm" #include "code\modules\tgui\tgui-say\typing.dm" +#include "code\modules\tgui_input\checkboxes.dm" #include "code\modules\tgui_input\text.dm" #include "code\modules\tgui_panel\audio.dm" #include "code\modules\tgui_panel\external.dm" @@ -2400,6 +2406,8 @@ #include "code\modules\vehicles\apc\apc_command.dm" #include "code\modules\vehicles\apc\apc_medical.dm" #include "code\modules\vehicles\apc\interior.dm" +#include "code\modules\vehicles\arc\arc.dm" +#include "code\modules\vehicles\arc\verbs.dm" #include "code\modules\vehicles\hardpoints\hardpoint.dm" #include "code\modules\vehicles\hardpoints\armor\armor.dm" #include "code\modules\vehicles\hardpoints\armor\ballistic.dm" @@ -2407,6 +2415,7 @@ #include "code\modules\vehicles\hardpoints\armor\concussive.dm" #include "code\modules\vehicles\hardpoints\armor\paladin.dm" #include "code\modules\vehicles\hardpoints\armor\snowplow.dm" +#include "code\modules\vehicles\hardpoints\hardpoint_ammo\arc_sentry_ammo.dm" #include "code\modules\vehicles\hardpoints\hardpoint_ammo\autocannon_ammo.dm" #include "code\modules\vehicles\hardpoints\hardpoint_ammo\cupola_ammo.dm" #include "code\modules\vehicles\hardpoints\hardpoint_ammo\dualcannon_ammo.dm" @@ -2422,6 +2431,7 @@ #include "code\modules\vehicles\hardpoints\hardpoint_ammo\tow_ammo.dm" #include "code\modules\vehicles\hardpoints\holder\holder.dm" #include "code\modules\vehicles\hardpoints\holder\tank_turret.dm" +#include "code\modules\vehicles\hardpoints\primary\arc_sentry.dm" #include "code\modules\vehicles\hardpoints\primary\autocannon.dm" #include "code\modules\vehicles\hardpoints\primary\dual_cannon.dm" #include "code\modules\vehicles\hardpoints\primary\flamer.dm" @@ -2436,12 +2446,14 @@ #include "code\modules\vehicles\hardpoints\secondary\tow.dm" #include "code\modules\vehicles\hardpoints\special\firing_port_weapon.dm" #include "code\modules\vehicles\hardpoints\special\special.dm" +#include "code\modules\vehicles\hardpoints\support\antenna.dm" #include "code\modules\vehicles\hardpoints\support\artillery.dm" #include "code\modules\vehicles\hardpoints\support\flare.dm" #include "code\modules\vehicles\hardpoints\support\iwsa.dm" #include "code\modules\vehicles\hardpoints\support\overdrive.dm" #include "code\modules\vehicles\hardpoints\support\support.dm" #include "code\modules\vehicles\hardpoints\wheels\apc_wheels.dm" +#include "code\modules\vehicles\hardpoints\wheels\arc_wheels.dm" #include "code\modules\vehicles\hardpoints\wheels\locomotion.dm" #include "code\modules\vehicles\hardpoints\wheels\treads.dm" #include "code\modules\vehicles\hardpoints\wheels\van_wheels.dm" diff --git a/dependencies.sh b/dependencies.sh index 01d0ca5c976c..e558b0087f91 100644 --- a/dependencies.sh +++ b/dependencies.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh #Project dependencies file #Final authority on what's required to fully build the project @@ -11,8 +11,8 @@ export BYOND_MINOR=1627 export RUST_G_VERSION=2.1.0 #node version -export NODE_VERSION=14 -export NODE_VERSION_PRECISE=14.16.1 +export NODE_VERSION=20 +export NODE_VERSION_LTS=20.12.0 # SpacemanDMM git tag export SPACEMAN_DMM_VERSION=suite-1.8 diff --git a/html/changelogs/AutoChangeLog-pr-6030.yml b/html/changelogs/AutoChangeLog-pr-6030.yml deleted file mode 100644 index 879a2cd35b55..000000000000 --- a/html/changelogs/AutoChangeLog-pr-6030.yml +++ /dev/null @@ -1,4 +0,0 @@ -author: "realforest2001" -delete-after: True -changes: - - rscadd: "Added the name of an announcement sender, if one exists, to ARES logs." \ No newline at end of file diff --git a/html/changelogs/AutoChangeLog-pr-6204.yml b/html/changelogs/AutoChangeLog-pr-6204.yml deleted file mode 100644 index 099fcc82b7ba..000000000000 --- a/html/changelogs/AutoChangeLog-pr-6204.yml +++ /dev/null @@ -1,4 +0,0 @@ -author: "InsaneRed" -delete-after: True -changes: - - spellcheck: "New flavor text and better strain information" \ No newline at end of file diff --git a/html/changelogs/AutoChangeLog-pr-6244.yml b/html/changelogs/AutoChangeLog-pr-6244.yml new file mode 100644 index 000000000000..8214c4f8e099 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-6244.yml @@ -0,0 +1,19 @@ +author: "Drathek, mullenpaul" +delete-after: True +changes: + - ui: "Finalizes the TGUI React port and brings us back into parity again with TG's interface components" + - ui: "Strip panel is now larger with sprites at 64x64 instead of 48 because as an Image component now they didn't alias the same." + - ui: "VOX panel's second tab now doesn't overlap the other buttons" + - ui: "Wiring panel for some machines is now restored to use circular indicators again" + - ui: "Smart fridge interface is more in line with sorted inventories as far as layout & tooltips" + - ui: "Tacmap drawing interface is tweaked a little to deal with the changes to dropdowns + clicking the tab is now disabled again until the tacmap is ready (It needs minimap subsystem to fire to have icons when flattening the map to be up to date)" + - ui: "Reworks RestrictedInput number handling" + - ui: "Adds the DMIcon, VirtualList (deferred lazy list), Dialogue, MenuBar, StyleableSection, and Checkbox TGUI components (but nothing uses them yet)" + - ui: "Chat: Adds a clear chat button clearing the current tab, mute button to disable unread notifications for a tab, and updates the word highlight regex for case sensitivity" + - ui: "Updates the ship manipulator window to allow replacing any Shuttle" + - ui: "Fixes the supply pod panel not displaying its byondui map correctly" + - ui: "Fixes the research terminal duplicating papers in display old mode." + - ui: "Updates the tgui_input_list to for new features like hotkey selection, duplicate key handling, etc" + - bugfix: "Fixes thinking runtimes when quickly switching between tgsay categories" + - code_imp: "Shuttle subsystem now is less aggressive with reservations (skipping deletion if below a threshold, delaying reservation if above a threshold)" + - bugfix: "Fixes F5 key still refreshing a TGUI window even if default was set to be prevented (e.g. Hotkey interface)" \ No newline at end of file diff --git a/html/changelogs/AutoChangeLog-pr-6251.yml b/html/changelogs/AutoChangeLog-pr-6251.yml new file mode 100644 index 000000000000..1ccb100b5d5b --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-6251.yml @@ -0,0 +1,5 @@ +author: "vero5123" +delete-after: True +changes: + - qol: "Toggleable ammo counter, can now cycle between displaying every fifth or single bullet." + - bugfix: "Light attachments will no longer automatically turn on when the weapon is equipped from suit storage" \ No newline at end of file diff --git a/html/changelogs/AutoChangeLog-pr-6291.yml b/html/changelogs/AutoChangeLog-pr-6291.yml new file mode 100644 index 000000000000..2436dfbc8094 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-6291.yml @@ -0,0 +1,4 @@ +author: "Git-Nivrak" +delete-after: True +changes: + - balance: "Latejoin marines to larva ratio changed to 1:4 for the first 15 minutes, going back to 1:2.5 afterwards." \ No newline at end of file diff --git a/html/changelogs/AutoChangeLog-pr-6297.yml b/html/changelogs/AutoChangeLog-pr-6297.yml new file mode 100644 index 000000000000..dea586c0acf7 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-6297.yml @@ -0,0 +1,5 @@ +author: "HeresKozmos" +delete-after: True +changes: + - mapadd: "Added three new tunnels to New Varadero." + - maptweak: "Adjusts placement of some existing tunnels on New Varadero." \ No newline at end of file diff --git a/html/changelogs/AutoChangeLog-pr-6300.yml b/html/changelogs/AutoChangeLog-pr-6300.yml new file mode 100644 index 000000000000..21c74020de61 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-6300.yml @@ -0,0 +1,5 @@ +author: "Nomoresolvalou" +delete-after: True +changes: + - balance: "unpowered doors are now opened instantly in maintenance jack crowbar mode instead of in three seconds." + - balance: "crowbar mode can now pry doors closed when unpowered." \ No newline at end of file diff --git a/html/changelogs/AutoChangeLog-pr-6302.yml b/html/changelogs/AutoChangeLog-pr-6302.yml new file mode 100644 index 000000000000..300948e5ccdf --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-6302.yml @@ -0,0 +1,4 @@ +author: "Git-Nivrak" +delete-after: True +changes: + - qol: "Changed the Queen's pointing color to purple" \ No newline at end of file diff --git a/html/changelogs/AutoChangeLog-pr-6303.yml b/html/changelogs/AutoChangeLog-pr-6303.yml new file mode 100644 index 000000000000..1810854997f4 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-6303.yml @@ -0,0 +1,4 @@ +author: "doganesi" +delete-after: True +changes: + - bugfix: "Fixed some oversights with custom loadout provided weapon boxes" \ No newline at end of file diff --git a/html/changelogs/AutoChangeLog-pr-6305.yml b/html/changelogs/AutoChangeLog-pr-6305.yml new file mode 100644 index 000000000000..cba43318a117 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-6305.yml @@ -0,0 +1,4 @@ +author: "Doubleumc" +delete-after: True +changes: + - qol: "squad/queen/leader trackers can find targets in interiors" \ No newline at end of file diff --git a/html/changelogs/AutoChangeLog-pr-6306.yml b/html/changelogs/AutoChangeLog-pr-6306.yml new file mode 100644 index 000000000000..2956a6f40ca2 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-6306.yml @@ -0,0 +1,4 @@ +author: "Nomoresolvalou" +delete-after: True +changes: + - bugfix: "fixed cats not specifically defined in code displaying wrong info when held or stored in a container. This should also fix any other mob capable of being picked up that is not defined in code as well." \ No newline at end of file diff --git a/html/changelogs/AutoChangeLog-pr-6307.yml b/html/changelogs/AutoChangeLog-pr-6307.yml new file mode 100644 index 000000000000..45016fd925d6 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-6307.yml @@ -0,0 +1,4 @@ +author: "Doubleumc" +delete-after: True +changes: + - qol: "ghost \"Scan Health\" works at any range" \ No newline at end of file diff --git a/html/changelogs/archive/2024-05.yml b/html/changelogs/archive/2024-05.yml index 74b346b71d1e..cb3bb1eec1ce 100644 --- a/html/changelogs/archive/2024-05.yml +++ b/html/changelogs/archive/2024-05.yml @@ -37,3 +37,180 @@ - imageadd: Added directional blast door sprites from Thwomper for blended black shutters. - code_imp: Renamed operator var in apollo console code to user. +2024-05-03: + InsaneRed: + - spellcheck: New flavor text and better strain information + realforest2001: + - rscadd: Added the name of an announcement sender, if one exists, to ARES logs. +2024-05-04: + AndroBetel: + - qol: Pointing at an item in your hands shows it off. + BasilHerb: + - rscadd: 'Type 80 bayonet to the mouths of the following mobs: CLF Soldier, CLF + Specialist, CLF Medic, CLF Engineer, CLF Leader.' + Drathek: + - bugfix: Fixed weeded corpses staying weeded if they were transported by shuttle + Git-Nivrak: + - bugfix: Synths no longer get affected by boiler's neurotoxin + coldironwarrior: + - rscadd: Added eyewear options, more glove options to the SEA vendor + - rscadd: SEAs now get full versions of the utility holster belt + - rscdel: Removed the CPR dummy from the SEA vendor + iloveloopers: + - qol: Bookcases can now be wrenched or slashed to be deconstructed + - balance: Kutjevo ledges now take only 0.2 seconds to climb instead of 1 whole + second + kivts: + - bugfix: Infinite metal oversight fix. + realforest2001: + - bugfix: Whitelist notes now work properly. Council can add notes to players regarding + whitelist issues. + - rscadd: Changing whitelist flags with the Whitelist Panel now automatically adds + a note with the reason. + - rscadd: Added skillsets specific to WY Goons. + - rscadd: Added a WY Goon Engineer preset. + vero5123: + - bugfix: Fixes microwave food duplication + - bugfix: Fixes scout being able to be decapitated with a helmet on while cloaked. + - bugfix: Fixes sentries firing at xenos while vent crawling. + - bugfix: fixes hugger not dying when squished by predator + - bugfix: Burrower can no longer tunnel across the map. +2024-05-06: + Git-Nivrak: + - balance: Watcher is now immobilized when zoomed out and loses health off weeds + when not zoomed out + ihatethisengine: + - balance: SADAR backblast now knockdowns and is reduced by xeno explosion resistance + s5nt: + - rscadd: Added more materials to pred ship including more sandstone, wood, table + parts, etc for lodge construction, along with more pred specific food to the + pred kitchen. + - maptweak: Slightly expanded pred ship material storage area by moving bracer storage + over to the left side of the ship. +2024-05-07: + Zonespace, d.1.n.a. (original sprites), esselnek (new sprites): + - rscadd: Added the M540-B Armored Recon Carrier as a t1 intel purchase. +2024-05-10: + realforest2001: + - code_imp: Repaths handcuffs and legcuffs to have a shared parent. + - code_imp: Repaths xeno restraints to reduce confusion from the typepath. + - rscadd: Legcuffs work appropriately now, and can be found in small numbers within + security vendors. + - rscadd: Cable restraints can now be adjusted via right-click to fit on wrists + or ankles. + - rscadd: Prison shoe chains now require ankle restraints rather than handcuffs. + - rscadd: Prison shoes that have been chained now have an equp and unequip delay + to account for the chains, proportionate to the breakout time of the item used + in the chains. +2024-05-11: + Tyranicranger4: + - qol: Emptied randomchem vials no longer show up on the data detector + - bugfix: Fixes empty vial storage boxes showing up on the data detector + cuberound: + - balance: projectiles can pass fences + ihatethisengine: + - rscadd: Added paradropping + - rscdel: Removed rappeling + - rscadd: Infection icon now has lower alpha if the human is dead + iloveloopers: + - rscadd: Adds in a new incinerator smoke tank that turns any reagent inside it + into chemsmoke when fired. +2024-05-12: + Git-Nivrak: + - balance: Limbs will now only be delimb-able if they are fractured + XQ: + - qol: Updated the ARES reception bell's description to inform players it notifies + Working Joes when rung. + - qol: Increased the ARES reception bell's cooldown from 5 to 60 seconds. + ihatethisengine: + - balance: only disabled comms can be pyloned + realforest2001: + - rscadd: Handcuffs & Legcuffs now appear on examine. + - rscadd: Added a reason input field to handheld distress beacons. +2024-05-13: + kirieee: + - imageadd: rolled sleeve sprites for all IO uniforms +2024-05-14: + Huffie56: + - balance: added a crowbar to the cryo defense kit. + ihatethisengine: + - bugfix: fixed potential bugs with transparent infection icon + - bugfix: Fixes infinite lifeboat alarm after queen locking + iloveloopers: + - rscadd: Mortar shells will now cook off and explode when flamed + - qol: OT freezer will now play a bell sound when it's done making paraformaldehyde + in a container + neeshacark: + - rscadd: you can now remove shrapnel from your body with the M11 Throwing Knife + and screwdrivers +2024-05-15: + Diegoflores31: + - balance: Removes Generic tail stab from Vampire lurker + - spellcheck: adjusted Vampire lurker description + Git-Nivrak: + - qol: Maintenance jack can now be quick drawn + - code_imp: Added a flag that allows items to be quick draw-able despite not being + weapons. + Zonespace27: + - admin: Added LISTSOURCE and SELECTPRINT options to SDQL queries. + - admin: Added SINGLECALL SQDL query. + - admin: SDQL tab now works. + - admin: Clients can now be selected with SDQL more easily. + ihatethisengine: + - balance: xenos holding on warding don't lose it while on weeds + realforest2001: + - balance: Added a 70% chance groundside reagent tanks start anchored, if they don't + already. + s5nt: + - rscadd: Adds the option for synths to buy different varieties of suit pants, suit + jackets, vests, and dress gloves from their snowflake vendor. +2024-05-16: + Doubleumc: + - bugfix: humans can use vehicle gunner seats again + Drathek: + - balance: Increased the starting stock of most medical vendors but shifts some + reagent bottles from weymeds to weychems + - balance: Med linked medical vendors will now automatically restock items (requires + 20 minutes from round start) and reagents (no time requirement) periodically + if operable + - balance: Groundside medical vendors will now have random stock and reagents missing + if its not WO + - balance: Partial medical item stacks can no longer be refilled at vendors (autoinjectors + and bottles can still be refilled pulling from internal reagent tanks) + - balance: Doubles the starting energy for chemical dispensers + - balance: Discounts all requisitions medical supplies + - ui: Added reagent amount display to vendors that have internal reagent tanks and + tweaked the icon positioning of items slightly + - ui: Tweaked table widths in vendors + - ui: Fixes USCM theme vendors not showing different backgrounds for odd rows + - qol: Restocking a medvendor manually can now be done with just a click rather + than only via mouse drop + - qol: Restocking a vendor can now be performed in bulk from a storage inventory + - click drag the inventory to the vendor and you will restock all the items + you can + - rscadd: Vendors can accept partial stacks when restocking - when an item has a + partial quantity for a stack it is denoted with an asterisk + - rscadd: Added two restock carts for bulk restocking medical vendors, one for items + and the other for reagents (purchasable from requisitions - disassemble with + a wrench - temporary sprites for now) + - bugfix: Fixed some currently unused squad prep vendors + - bugfix: Removing nano splints on a person no longer creates a 0 amount normal + splint + - spellcheck: Tweaked some restock messages and vendor descriptions + - rscadd: Nade boxes now have the same throw away logic when dropped to the ground + instead of in update_icon when empty. + - bugfix: Fixed MREs getting thrown away if you don't drop them to the ground. + - bugfix: Fixed MREs throwing runtimes if spawned on a person that doesn't have + space for the MRE. + - bugfix: Fixed issuing a null order via the issue order verb. + Steelpoint: + - balance: The VP78 pistol has received a rate of fire boost, and it will deal full + damage up to 3 tiles from the shooter's position before suffering damage falloff. + TheGamerdk: + - balance: Milkshakes no longer bring you to absolute zero, just 0 celsius +2024-05-19: + Git-Nivrak: + - rscadd: Changed advanced medhud visor to be displayed on the same eye as normal + medhud visor + iloveloopers: + - spellcheck: Custom rocket description now looks nicer diff --git a/icons/mob/humans/onmob/back.dmi b/icons/mob/humans/onmob/back.dmi index 42d46bcc9abe..128b05455d6e 100644 Binary files a/icons/mob/humans/onmob/back.dmi and b/icons/mob/humans/onmob/back.dmi differ diff --git a/icons/mob/humans/onmob/items_lefthand_0.dmi b/icons/mob/humans/onmob/items_lefthand_0.dmi index 4e8c1d59a41a..7d887799815b 100644 Binary files a/icons/mob/humans/onmob/items_lefthand_0.dmi and b/icons/mob/humans/onmob/items_lefthand_0.dmi differ diff --git a/icons/mob/humans/onmob/items_righthand_0.dmi b/icons/mob/humans/onmob/items_righthand_0.dmi index b8285acc65ad..184946a13f0b 100644 Binary files a/icons/mob/humans/onmob/items_righthand_0.dmi and b/icons/mob/humans/onmob/items_righthand_0.dmi differ diff --git a/icons/mob/humans/onmob/uniform_0.dmi b/icons/mob/humans/onmob/uniform_0.dmi index 9126bfccb699..d24c05123cd4 100644 Binary files a/icons/mob/humans/onmob/uniform_0.dmi and b/icons/mob/humans/onmob/uniform_0.dmi differ diff --git a/icons/obj/items/clothing/backpacks.dmi b/icons/obj/items/clothing/backpacks.dmi index be2602f76c57..99240596a9da 100644 Binary files a/icons/obj/items/clothing/backpacks.dmi and b/icons/obj/items/clothing/backpacks.dmi differ diff --git a/icons/obj/vehicles/arc.dmi b/icons/obj/vehicles/arc.dmi new file mode 100644 index 000000000000..f662d5475ac0 Binary files /dev/null and b/icons/obj/vehicles/arc.dmi differ diff --git a/icons/obj/vehicles/hardpoints/arc.dmi b/icons/obj/vehicles/hardpoints/arc.dmi new file mode 100644 index 000000000000..b971efecff5e Binary files /dev/null and b/icons/obj/vehicles/hardpoints/arc.dmi differ diff --git a/icons/turf/areas_interiors.dmi b/icons/turf/areas_interiors.dmi index 47a95da322ea..6fc30badd763 100644 Binary files a/icons/turf/areas_interiors.dmi and b/icons/turf/areas_interiors.dmi differ diff --git a/icons/ui_icons/map_blips_large.dmi b/icons/ui_icons/map_blips_large.dmi index 0cf41b52a4dc..f03433c8c8ef 100644 Binary files a/icons/ui_icons/map_blips_large.dmi and b/icons/ui_icons/map_blips_large.dmi differ diff --git a/maps/interiors/arc.dmm b/maps/interiors/arc.dmm new file mode 100644 index 000000000000..4da63cbff383 --- /dev/null +++ b/maps/interiors/arc.dmm @@ -0,0 +1,296 @@ +//MAP CONVERTED BY dmm2tgm.py THIS HEADER COMMENT PREVENTS RECONVERSION, DO NOT REMOVE +"aD" = ( +/obj/effect/landmark/interior/spawn/weapons_loader, +/turf/open/shuttle/vehicle{ + icon_state = "floor_3_12" + }, +/area/interior/vehicle/arc) +"be" = ( +/obj/structure/interior_wall/apc{ + icon_state = "door_back" + }, +/turf/open/void/vehicle, +/area/space) +"cJ" = ( +/obj/structure/interior_wall/apc{ + icon_state = "rear_1" + }, +/turf/open/void/vehicle, +/area/space) +"dM" = ( +/obj/structure/interior_wall/apc{ + icon_state = "rear_2" + }, +/turf/open/void/vehicle, +/area/space) +"dU" = ( +/obj/effect/landmark/interior/spawn/vehicle_driver_seat/armor{ + dir = 4 + }, +/obj/structure/machinery/cm_vending/sorted/medical/wall_med/vehicle{ + pixel_x = 6; + pixel_y = 28 + }, +/obj/item/device/megaphone, +/turf/open/shuttle/vehicle{ + icon_state = "floor_3_9_1" + }, +/area/interior/vehicle/arc) +"jb" = ( +/turf/open/shuttle/vehicle{ + icon_state = "floor_3_11" + }, +/area/interior/vehicle/arc) +"ml" = ( +/obj/structure/interior_wall/apc{ + icon_state = "wall" + }, +/obj/effect/landmark/interior/spawn/telephone, +/turf/open/void/vehicle, +/area/space) +"mR" = ( +/obj/structure/interior_wall/apc{ + icon_state = "front_wheel_R" + }, +/turf/open/void/vehicle, +/area/space) +"ro" = ( +/obj/structure/interior_wall/apc{ + alpha = 100; + icon_state = "wall_door_front"; + layer = 5.2; + pixel_y = 32 + }, +/turf/open/void/vehicle, +/area/space) +"ru" = ( +/turf/open/shuttle/vehicle{ + icon_state = "floor_1_6" + }, +/area/interior/vehicle/arc) +"tD" = ( +/obj/structure/interior_wall/apc{ + icon_state = "rear_6" + }, +/turf/open/void/vehicle, +/area/space) +"vt" = ( +/obj/structure/interior_wall/apc{ + icon_state = "rear_wheel_L" + }, +/turf/open/void/vehicle, +/area/space) +"we" = ( +/obj/structure/interior_wall/apc{ + alpha = 100; + icon_state = "door_front"; + layer = 5.2; + pixel_y = 32 + }, +/turf/open/void/vehicle, +/area/space) +"wK" = ( +/obj/structure/interior_wall/apc{ + icon_state = "wheel_front_top_1"; + pixel_x = 1; + pixel_y = -4 + }, +/turf/open/void/vehicle, +/area/space) +"ym" = ( +/obj/structure/interior_wall/apc{ + icon_state = "rear_wheel_R"; + opacity = 0 + }, +/turf/open/void/vehicle, +/area/space) +"yX" = ( +/turf/open/shuttle/vehicle{ + icon_state = "floor_3_8_1" + }, +/area/interior/vehicle/arc) +"CB" = ( +/obj/structure/interior_wall/apc{ + icon_state = "wall"; + opacity = 0 + }, +/turf/open/void/vehicle, +/area/space) +"Dn" = ( +/obj/structure/machinery/prop/almayer/CICmap/computer{ + dir = 4; + pixel_y = 8 + }, +/obj/structure/surface/table/reinforced/prison{ + pixel_y = -3 + }, +/obj/structure/machinery/computer/overwatch/almayer/small{ + dir = 4; + layer = 3.01; + pixel_y = -5 + }, +/turf/open/shuttle/vehicle{ + icon_state = "floor_3_10_1" + }, +/area/interior/vehicle/arc) +"Gy" = ( +/obj/structure/interior_wall/apc{ + icon_state = "front_1" + }, +/turf/open/void/vehicle, +/area/space) +"HB" = ( +/obj/structure/interior_wall/apc{ + icon_state = "corner_small_L" + }, +/obj/structure/interior_wall/apc{ + icon_state = "rear_5" + }, +/turf/open/void/vehicle, +/area/space) +"HJ" = ( +/obj/structure/interior_wall/apc{ + icon_state = "front_6" + }, +/turf/open/void/vehicle, +/area/space) +"Jc" = ( +/obj/structure/interior_wall/apc{ + icon_state = "corner_small_R" + }, +/obj/structure/interior_wall/apc{ + icon_state = "front_5" + }, +/turf/open/void/vehicle, +/area/space) +"Ng" = ( +/obj/structure/interior_wall/apc{ + icon_state = "wall" + }, +/turf/open/void/vehicle, +/area/space) +"NS" = ( +/obj/structure/bed/chair/comfy{ + dir = 8 + }, +/turf/open/shuttle/vehicle{ + icon_state = "floor_3_5" + }, +/area/interior/vehicle/arc) +"Ol" = ( +/obj/effect/landmark/interior/spawn/entrance{ + alpha = 50; + exit_type = /obj/structure/interior_exit/vehicle/apc; + name = "Right APC door"; + tag = "right" + }, +/obj/effect/landmark/interior/spawn/interior_viewport{ + dir = 8; + pixel_x = 5; + pixel_y = 1 + }, +/turf/open/shuttle/vehicle{ + icon_state = "floor_1_12" + }, +/area/interior/vehicle/arc) +"Po" = ( +/obj/structure/surface/table/reinforced/prison{ + pixel_y = -3 + }, +/obj/structure/machinery/computer/intel/disk_reader{ + dir = 4; + pixel_y = 6 + }, +/obj/structure/machinery/computer/groundside_operations{ + dir = 4; + pixel_y = -7 + }, +/turf/open/shuttle/vehicle{ + icon_state = "floor_3_8_1" + }, +/area/interior/vehicle/arc) +"Rb" = ( +/turf/open/void/vehicle, +/area/space) +"Rf" = ( +/obj/structure/interior_wall/apc{ + icon_state = "front_2" + }, +/turf/open/void/vehicle, +/area/space) +"Zs" = ( +/obj/structure/bed/chair/comfy{ + dir = 8 + }, +/turf/open/shuttle/vehicle{ + icon_state = "floor_3_8_1" + }, +/area/interior/vehicle/arc) +"ZF" = ( +/obj/effect/landmark/interior/spawn/interior_viewport{ + dir = 8; + pixel_x = 5; + pixel_y = 8 + }, +/obj/effect/landmark/interior/spawn/entrance{ + alpha = 50; + dir = 1; + exit_type = /obj/structure/interior_exit/vehicle/apc; + name = "Left APC door"; + pixel_y = 32; + tag = "left" + }, +/turf/open/shuttle/vehicle{ + icon_state = "floor_1_11" + }, +/area/interior/vehicle/arc) + +(1,1,1) = {" +tD +HB +dM +cJ +Rb +"} +(2,1,1) = {" +Ng +Po +Dn +vt +Rb +"} +(3,1,1) = {" +ml +Zs +NS +ym +Rb +"} +(4,1,1) = {" +Ng +jb +yX +aD +ro +"} +(5,1,1) = {" +be +ZF +ru +Ol +we +"} +(6,1,1) = {" +wK +CB +dU +mR +Rb +"} +(7,1,1) = {" +HJ +Jc +Rf +Gy +Rb +"} diff --git a/maps/map_files/BigRed/BigRed.dmm b/maps/map_files/BigRed/BigRed.dmm index 82e04ca58330..422a143de94a 100644 --- a/maps/map_files/BigRed/BigRed.dmm +++ b/maps/map_files/BigRed/BigRed.dmm @@ -2905,7 +2905,7 @@ /area/bigredv2/outside/marshal_office) "aiG" = ( /obj/structure/surface/table, -/obj/item/handcuffs, +/obj/item/restraint/handcuffs, /obj/structure/transmitter/colony_net/rotary{ phone_category = "Solaris Ridge"; phone_color = "red"; @@ -2955,7 +2955,7 @@ /area/bigredv2/outside/marshal_office) "aiM" = ( /obj/structure/surface/table, -/obj/item/handcuffs, +/obj/item/restraint/handcuffs, /obj/effect/landmark/item_pool_spawner/survivor_ammo/buckshot, /turf/open/floor, /area/bigredv2/outside/marshal_office) @@ -16219,7 +16219,7 @@ /area/bigredv2/outside/general_store) "aVL" = ( /obj/effect/decal/cleanable/dirt, -/obj/item/handcuffs/cable, +/obj/item/restraint/adjustable/cable, /turf/open/floor, /area/bigredv2/outside/general_store) "aVM" = ( @@ -16667,7 +16667,7 @@ /area/bigredv2/outside/general_store) "aWY" = ( /obj/effect/decal/cleanable/dirt, -/obj/item/handcuffs/cable/cyan, +/obj/item/restraint/adjustable/cable/cyan, /turf/open/floor, /area/bigredv2/outside/general_store) "aXb" = ( @@ -26626,7 +26626,7 @@ /area/bigredv2/caves/mining) "cry" = ( /obj/structure/surface/table/reinforced, -/obj/item/handcuffs, +/obj/item/restraint/handcuffs, /turf/open/floor{ dir = 9; icon_state = "redfull" diff --git a/maps/map_files/BigRed/sprinkles/20.etatunnel_open.dmm b/maps/map_files/BigRed/sprinkles/20.etatunnel_open.dmm index 633a79f6acb9..8f155a1eabef 100644 --- a/maps/map_files/BigRed/sprinkles/20.etatunnel_open.dmm +++ b/maps/map_files/BigRed/sprinkles/20.etatunnel_open.dmm @@ -250,7 +250,7 @@ pixel_x = -11; pixel_y = 1 }, -/obj/item/handcuffs{ +/obj/item/restraint/handcuffs{ pixel_x = 1; pixel_y = 5 }, @@ -432,7 +432,7 @@ /area/bigredv2/caves_sw) "OV" = ( /obj/structure/surface/rack, -/obj/item/handcuffs{ +/obj/item/restraint/handcuffs{ pixel_x = 1; pixel_y = 5 }, @@ -509,7 +509,7 @@ "Ue" = ( /obj/structure/surface/table/reinforced/prison, /obj/item/paper_bundle, -/obj/item/handcuffs{ +/obj/item/restraint/handcuffs{ pixel_y = -3 }, /turf/open/floor/plating{ diff --git a/maps/map_files/BigRed/sprinkles/40.viro_open.dmm b/maps/map_files/BigRed/sprinkles/40.viro_open.dmm index 05e058c4071a..f58cfc3b7977 100644 --- a/maps/map_files/BigRed/sprinkles/40.viro_open.dmm +++ b/maps/map_files/BigRed/sprinkles/40.viro_open.dmm @@ -493,7 +493,7 @@ /area/bigredv2/outside/virology) "bH" = ( /obj/structure/surface/table/almayer, -/obj/item/handcuffs, +/obj/item/restraint/handcuffs, /turf/open/floor{ dir = 6; icon_state = "asteroidwarning" diff --git a/maps/map_files/BigRed/sprinkles/70.se-checkpoint.dmm b/maps/map_files/BigRed/sprinkles/70.se-checkpoint.dmm index 8907ab630fcb..7a3bdb9df798 100644 --- a/maps/map_files/BigRed/sprinkles/70.se-checkpoint.dmm +++ b/maps/map_files/BigRed/sprinkles/70.se-checkpoint.dmm @@ -44,7 +44,7 @@ /area/bigredv2/outside/filtration_cave_cas) "el" = ( /obj/structure/surface/table/almayer, -/obj/item/handcuffs, +/obj/item/restraint/handcuffs, /turf/open/floor, /area/bigred/ground/security) "ge" = ( diff --git a/maps/map_files/BigRed/standalone/crashlanding-eva.dmm b/maps/map_files/BigRed/standalone/crashlanding-eva.dmm index 33eefe09518f..ad059bf053f2 100644 --- a/maps/map_files/BigRed/standalone/crashlanding-eva.dmm +++ b/maps/map_files/BigRed/standalone/crashlanding-eva.dmm @@ -448,7 +448,7 @@ /area/bigredv2/outside/general_offices) "cb" = ( /obj/structure/surface/rack, -/obj/item/restraints, +/obj/item/xeno_restraints, /turf/open/shuttle/dropship/can_surgery/dark_grey, /area/bigredv2/outside/general_offices) "cc" = ( diff --git a/maps/map_files/BigRed/standalone/crashlanding-offices.dmm b/maps/map_files/BigRed/standalone/crashlanding-offices.dmm index 48bac15b3127..0a52f3f9d17d 100644 --- a/maps/map_files/BigRed/standalone/crashlanding-offices.dmm +++ b/maps/map_files/BigRed/standalone/crashlanding-offices.dmm @@ -254,7 +254,7 @@ /area/bigredv2/outside/office_complex) "aU" = ( /obj/structure/surface/rack, -/obj/item/restraints, +/obj/item/xeno_restraints, /turf/open/shuttle/dropship/can_surgery/dark_grey, /area/bigredv2/outside/office_complex) "aV" = ( diff --git a/maps/map_files/CORSAT/Corsat.dmm b/maps/map_files/CORSAT/Corsat.dmm index 6c179dbc8b2c..28db8fa8831f 100644 --- a/maps/map_files/CORSAT/Corsat.dmm +++ b/maps/map_files/CORSAT/Corsat.dmm @@ -4894,7 +4894,7 @@ /area/corsat/gamma/airlock/north) "aoq" = ( /obj/structure/surface/table/almayer, -/obj/item/handcuffs, +/obj/item/restraint/handcuffs, /turf/open/floor/corsat{ dir = 4; icon_state = "red" @@ -13705,7 +13705,7 @@ /area/corsat/omega/airlocknorth/id) "aMA" = ( /obj/structure/surface/table/reinforced, -/obj/item/restraints, +/obj/item/xeno_restraints, /turf/open/floor/corsat{ icon_state = "plate" }, @@ -27154,7 +27154,7 @@ /area/corsat/gamma/medbay) "byJ" = ( /obj/structure/surface/rack, -/obj/item/restraints, +/obj/item/xeno_restraints, /turf/open/floor/corsat{ dir = 1; icon_state = "purplewhite" @@ -28908,7 +28908,7 @@ /area/corsat/sigma/south/security) "bDu" = ( /obj/structure/surface/table/almayer, -/obj/item/handcuffs, +/obj/item/restraint/handcuffs, /turf/open/floor/corsat{ dir = 8; icon_state = "red" @@ -29586,8 +29586,8 @@ /area/corsat/gamma/security) "bFF" = ( /obj/structure/surface/table/almayer, -/obj/item/handcuffs, -/obj/item/handcuffs, +/obj/item/restraint/handcuffs, +/obj/item/restraint/handcuffs, /turf/open/floor/corsat{ dir = 8; icon_state = "red" @@ -33064,8 +33064,8 @@ /area/corsat/omega/checkpoint) "bRn" = ( /obj/structure/surface/rack, -/obj/item/handcuffs, -/obj/item/handcuffs, +/obj/item/restraint/handcuffs, +/obj/item/restraint/handcuffs, /turf/open/floor/corsat{ dir = 4; icon_state = "red" @@ -33269,7 +33269,7 @@ "bSb" = ( /obj/structure/surface/table/almayer, /obj/item/clipboard, -/obj/item/handcuffs/zip, +/obj/item/restraint/handcuffs/zip, /turf/open/floor/corsat{ icon_state = "plate" }, @@ -33308,8 +33308,8 @@ name = "riot cabinet"; req_access_txt = "100" }, -/obj/item/handcuffs, -/obj/item/handcuffs, +/obj/item/restraint/handcuffs, +/obj/item/restraint/handcuffs, /turf/open/floor/corsat{ icon_state = "red" }, @@ -35399,7 +35399,7 @@ dir = 8 }, /obj/structure/surface/table/reinforced, -/obj/item/restraints, +/obj/item/xeno_restraints, /turf/open/floor/corsat{ dir = 8; icon_state = "red" @@ -44668,8 +44668,8 @@ name = "riot cabinet"; req_access_txt = "100" }, -/obj/item/restraints, -/obj/item/restraints, +/obj/item/xeno_restraints, +/obj/item/xeno_restraints, /turf/open/floor/corsat{ dir = 6; icon_state = "red" @@ -63062,7 +63062,7 @@ /area/corsat/omega/hangar) "wrd" = ( /obj/structure/surface/rack, -/obj/item/restraints, +/obj/item/xeno_restraints, /turf/open/shuttle/dropship{ icon_state = "rasputin15" }, @@ -63828,7 +63828,7 @@ /area/corsat/omega/complex) "wUd" = ( /obj/structure/surface/table/almayer, -/obj/item/handcuffs, +/obj/item/restraint/handcuffs, /turf/open/floor/corsat{ dir = 8; icon_state = "red" diff --git a/maps/map_files/DesertDam/Desert_Dam.dmm b/maps/map_files/DesertDam/Desert_Dam.dmm index fff406145a3a..3c4125023686 100644 --- a/maps/map_files/DesertDam/Desert_Dam.dmm +++ b/maps/map_files/DesertDam/Desert_Dam.dmm @@ -18539,7 +18539,7 @@ }, /area/desert_dam/interior/dam_interior/north_tunnel) "bfk" = ( -/obj/item/handcuffs, +/obj/item/restraint/handcuffs, /obj/item/weapon/baton, /obj/structure/surface/table/woodentable/fancy, /turf/open/floor/interior/wood/alt, @@ -26207,7 +26207,7 @@ /area/desert_dam/exterior/valley/valley_mining) "bFf" = ( /obj/structure/surface/table, -/obj/item/handcuffs, +/obj/item/restraint/handcuffs, /turf/open/floor/prison{ dir = 10; icon_state = "darkred2" @@ -37633,7 +37633,7 @@ /area/desert_dam/building/warehouse/breakroom) "cqj" = ( /obj/structure/surface/table, -/obj/item/handcuffs, +/obj/item/restraint/handcuffs, /turf/open/floor/prison{ icon_state = "darkred2" }, diff --git a/maps/map_files/DesertDam/sprinkles/10.damtemple_intact.dmm b/maps/map_files/DesertDam/sprinkles/10.damtemple_intact.dmm index d0ebbc5039d5..6c7e859826db 100644 --- a/maps/map_files/DesertDam/sprinkles/10.damtemple_intact.dmm +++ b/maps/map_files/DesertDam/sprinkles/10.damtemple_intact.dmm @@ -139,7 +139,7 @@ /obj/structure/surface/table/reinforced/prison{ color = "#6b675e" }, -/obj/item/legcuffs/beartrap{ +/obj/item/restraint/legcuffs/beartrap{ pixel_x = -1; pixel_y = 8 }, diff --git a/maps/map_files/FOP_v2_Cellblocks/Prison_Station_FOP.dmm b/maps/map_files/FOP_v2_Cellblocks/Prison_Station_FOP.dmm index a03946d3c6cf..d1dd76922ee1 100644 --- a/maps/map_files/FOP_v2_Cellblocks/Prison_Station_FOP.dmm +++ b/maps/map_files/FOP_v2_Cellblocks/Prison_Station_FOP.dmm @@ -3451,10 +3451,10 @@ /area/prison/research/secret) "aiZ" = ( /obj/structure/surface/rack, -/obj/item/handcuffs, -/obj/item/handcuffs, -/obj/item/handcuffs, -/obj/item/handcuffs, +/obj/item/restraint/handcuffs, +/obj/item/restraint/handcuffs, +/obj/item/restraint/handcuffs, +/obj/item/restraint/handcuffs, /turf/open/floor/prison{ dir = 8; icon_state = "darkpurple2" @@ -13789,7 +13789,7 @@ /area/prison/command/secretary_office) "aMK" = ( /obj/structure/closet, -/obj/item/handcuffs, +/obj/item/restraint/handcuffs, /obj/item/clothing/mask/muzzle, /obj/item/weapon/chainofcommand, /turf/open/floor/prison{ diff --git a/maps/map_files/FOP_v3_Sciannex/Fiorina_SciAnnex.dmm b/maps/map_files/FOP_v3_Sciannex/Fiorina_SciAnnex.dmm index f6e85338a637..fcbdcc4fdc33 100644 --- a/maps/map_files/FOP_v3_Sciannex/Fiorina_SciAnnex.dmm +++ b/maps/map_files/FOP_v3_Sciannex/Fiorina_SciAnnex.dmm @@ -444,7 +444,7 @@ "anl" = ( /obj/item/pamphlet/engineer, /obj/structure/closet, -/obj/item/handcuffs, +/obj/item/restraint/handcuffs, /obj/effect/landmark/objective_landmark/close, /turf/open/floor/prison{ icon_state = "darkredfull2" @@ -2947,7 +2947,7 @@ /area/fiorina/lz/near_lzI) "bMG" = ( /obj/structure/surface/rack, -/obj/item/handcuffs/zip, +/obj/item/restraint/handcuffs/zip, /turf/open/floor/prison{ icon_state = "darkredfull2" }, @@ -18049,7 +18049,7 @@ /area/fiorina/tumor/civres) "kWv" = ( /obj/structure/surface/table/reinforced/prison, -/obj/item/handcuffs, +/obj/item/restraint/handcuffs, /turf/open/floor/prison, /area/fiorina/station/security) "kWx" = ( @@ -19576,7 +19576,7 @@ }, /area/fiorina/station/lowsec) "lNv" = ( -/obj/item/handcuffs/cable/pink, +/obj/item/restraint/adjustable/cable/pink, /turf/open/floor/prison/chapel_carpet{ dir = 1; icon_state = "doubleside" @@ -31005,7 +31005,7 @@ /area/fiorina/tumor/ice_lab) "sQC" = ( /obj/structure/surface/rack, -/obj/item/handcuffs, +/obj/item/restraint/handcuffs, /turf/open/floor/prison{ icon_state = "darkredfull2" }, @@ -38287,7 +38287,7 @@ /area/fiorina/station/chapel) "xoK" = ( /obj/structure/closet, -/obj/item/handcuffs, +/obj/item/restraint/handcuffs, /obj/item/clothing/mask/muzzle, /obj/item/weapon/chainofcommand, /turf/open/floor/wood, diff --git a/maps/map_files/FOP_v3_Sciannex/sprinkles/20.yardbasketball.dmm b/maps/map_files/FOP_v3_Sciannex/sprinkles/20.yardbasketball.dmm index 6662ebf081f0..ce60474959f1 100644 --- a/maps/map_files/FOP_v3_Sciannex/sprinkles/20.yardbasketball.dmm +++ b/maps/map_files/FOP_v3_Sciannex/sprinkles/20.yardbasketball.dmm @@ -36,7 +36,7 @@ "f" = ( /obj/effect/landmark/corpsespawner/ua_riot, /obj/effect/decal/cleanable/blood, -/obj/item/handcuffs/zip{ +/obj/item/restraint/handcuffs/zip{ pixel_y = -12 }, /turf/open/floor/wood, diff --git a/maps/map_files/FOP_v3_Sciannex/sprinkles/25.researchprestine.dmm b/maps/map_files/FOP_v3_Sciannex/sprinkles/25.researchprestine.dmm index 8df7c92de478..9ff0e6e4a246 100644 --- a/maps/map_files/FOP_v3_Sciannex/sprinkles/25.researchprestine.dmm +++ b/maps/map_files/FOP_v3_Sciannex/sprinkles/25.researchprestine.dmm @@ -696,11 +696,11 @@ dir = 1; pixel_y = 21 }, -/obj/item/handcuffs{ +/obj/item/restraint/handcuffs{ pixel_x = -3; pixel_y = 10 }, -/obj/item/handcuffs{ +/obj/item/restraint/handcuffs{ pixel_x = 4 }, /turf/open/floor/prison{ diff --git a/maps/map_files/Ice_Colony_v2/Ice_Colony_v2.dmm b/maps/map_files/Ice_Colony_v2/Ice_Colony_v2.dmm index 74d5921e30de..5326d72de2a8 100644 --- a/maps/map_files/Ice_Colony_v2/Ice_Colony_v2.dmm +++ b/maps/map_files/Ice_Colony_v2/Ice_Colony_v2.dmm @@ -12163,7 +12163,7 @@ /area/ice_colony/surface/command/crisis) "aIv" = ( /obj/structure/surface/table/woodentable, -/obj/item/handcuffs, +/obj/item/restraint/handcuffs, /obj/item/tool/stamp, /turf/open/floor/wood, /area/ice_colony/surface/command/crisis) @@ -28871,7 +28871,7 @@ /area/ice_colony/underground/security/interrogation) "bJH" = ( /obj/structure/surface/table/reinforced, -/obj/item/handcuffs, +/obj/item/restraint/handcuffs, /obj/structure/machinery/flasher_button{ id = "sec_checkpoint"; pixel_y = 24 @@ -30138,7 +30138,7 @@ "bMX" = ( /obj/item/book/manual/marine_law, /obj/structure/surface/table/reinforced, -/obj/item/handcuffs, +/obj/item/restraint/handcuffs, /turf/open/floor{ dir = 1; icon_state = "darkred2" @@ -33966,7 +33966,7 @@ /area/ice_colony/underground/medical/storage) "bXR" = ( /obj/structure/surface/table/woodentable, -/obj/item/handcuffs, +/obj/item/restraint/handcuffs, /obj/item/weapon/baton, /turf/open/floor/wood, /area/ice_colony/underground/security/marshal) diff --git a/maps/map_files/Ice_Colony_v3/Shivas_Snowball.dmm b/maps/map_files/Ice_Colony_v3/Shivas_Snowball.dmm index 1514e8023b99..b1ce353976c2 100644 --- a/maps/map_files/Ice_Colony_v3/Shivas_Snowball.dmm +++ b/maps/map_files/Ice_Colony_v3/Shivas_Snowball.dmm @@ -2249,7 +2249,7 @@ /area/shiva/interior/colony/medseceng) "akT" = ( /obj/structure/surface/table/woodentable, -/obj/item/handcuffs, +/obj/item/restraint/handcuffs, /obj/item/weapon/baton, /turf/open/floor/wood, /area/shiva/interior/colony/medseceng) @@ -20198,7 +20198,7 @@ "pCJ" = ( /obj/item/book/manual/marine_law, /obj/structure/surface/table/reinforced/prison, -/obj/item/handcuffs, +/obj/item/restraint/handcuffs, /turf/open/floor/shiva{ dir = 1; icon_state = "red" @@ -22216,7 +22216,7 @@ /area/shiva/interior/colony/medseceng) "rMe" = ( /obj/structure/surface/table, -/obj/item/handcuffs, +/obj/item/restraint/handcuffs, /obj/item/tool/stamp, /turf/open/floor/shiva{ icon_state = "bluefull" @@ -26358,7 +26358,7 @@ /turf/open/shuttle/dropship/can_surgery/medium_grey_single_wide_left_to_right, /area/shiva/interior/aerodrome) "vWf" = ( -/obj/item/handcuffs, +/obj/item/restraint/handcuffs, /turf/open/floor/shiva{ dir = 8; icon_state = "redfull" diff --git a/maps/map_files/LV522_Chances_Claim/LV522_Chances_Claim.dmm b/maps/map_files/LV522_Chances_Claim/LV522_Chances_Claim.dmm index bdf58d54fb34..94c7420a6da4 100644 --- a/maps/map_files/LV522_Chances_Claim/LV522_Chances_Claim.dmm +++ b/maps/map_files/LV522_Chances_Claim/LV522_Chances_Claim.dmm @@ -17205,8 +17205,8 @@ /area/lv522/atmos/cargo_intake) "hlH" = ( /obj/structure/surface/table/reinforced/prison, -/obj/item/handcuffs/cable/white, -/obj/item/handcuffs/cable/white{ +/obj/item/restraint/adjustable/cable/white, +/obj/item/restraint/adjustable/cable/white{ pixel_y = 4 }, /turf/open/floor/strata{ @@ -18239,13 +18239,13 @@ /area/lv522/indoors/c_block/casino) "hIz" = ( /obj/structure/surface/table/almayer, -/obj/item/handcuffs{ +/obj/item/restraint/handcuffs{ pixel_y = 12 }, -/obj/item/handcuffs{ +/obj/item/restraint/handcuffs{ pixel_y = 6 }, -/obj/item/handcuffs, +/obj/item/restraint/handcuffs, /obj/item/weapon/classic_baton, /turf/open/floor/prison{ icon_state = "darkredfull2" diff --git a/maps/map_files/LV624/LV624.dmm b/maps/map_files/LV624/LV624.dmm index 46f5a179a50e..a9baa8a1efc7 100644 --- a/maps/map_files/LV624/LV624.dmm +++ b/maps/map_files/LV624/LV624.dmm @@ -9358,7 +9358,7 @@ /area/lv624/lazarus/security) "aPv" = ( /obj/structure/surface/table/reinforced/prison, -/obj/item/handcuffs, +/obj/item/restraint/handcuffs, /obj/item/storage/firstaid/adv, /obj/effect/landmark/item_pool_spawner/survivor_ammo/buckshot, /turf/open/floor{ @@ -24636,10 +24636,10 @@ /area/lv624/ground/caves/east_caves) "xwQ" = ( /obj/structure/surface/table/reinforced/prison, -/obj/item/handcuffs/cable/white{ +/obj/item/restraint/adjustable/cable/white{ pixel_y = 4 }, -/obj/item/handcuffs/cable/white, +/obj/item/restraint/adjustable/cable/white, /turf/open/floor{ icon_state = "whiteyellow" }, diff --git a/maps/map_files/LV624/maintemple/1.intact.dmm b/maps/map_files/LV624/maintemple/1.intact.dmm index 8f7c741d80c6..ea69a6c4c787 100644 --- a/maps/map_files/LV624/maintemple/1.intact.dmm +++ b/maps/map_files/LV624/maintemple/1.intact.dmm @@ -515,7 +515,7 @@ /obj/structure/surface/table/reinforced/prison{ color = "#6b675e" }, -/obj/item/restraints, +/obj/item/xeno_restraints, /obj/effect/landmark/objective_landmark/close, /turf/open/floor/strata{ color = "#5e5d5d"; diff --git a/maps/map_files/LV624/standalone/clfship.dmm b/maps/map_files/LV624/standalone/clfship.dmm index 34032943b1c1..090ad40084f7 100644 --- a/maps/map_files/LV624/standalone/clfship.dmm +++ b/maps/map_files/LV624/standalone/clfship.dmm @@ -1328,11 +1328,11 @@ "IP" = ( /obj/structure/bed, /obj/item/bedsheet/yellow, -/obj/item/handcuffs{ +/obj/item/restraint/handcuffs{ pixel_x = 4; pixel_y = 4 }, -/obj/item/handcuffs, +/obj/item/restraint/handcuffs, /turf/open/floor/almayer{ dir = 6; icon_state = "green" diff --git a/maps/map_files/LV624/standalone/corporatedome.dmm b/maps/map_files/LV624/standalone/corporatedome.dmm index 0778d0c61564..9c3eddbac441 100644 --- a/maps/map_files/LV624/standalone/corporatedome.dmm +++ b/maps/map_files/LV624/standalone/corporatedome.dmm @@ -1216,7 +1216,7 @@ "ZG" = ( /obj/effect/decal/cleanable/blood, /obj/effect/landmark/corpsespawner/scientist, -/obj/item/handcuffs, +/obj/item/restraint/handcuffs, /turf/open/floor{ icon_state = "dark" }, diff --git a/maps/map_files/New_Varadero/New_Varadero.dmm b/maps/map_files/New_Varadero/New_Varadero.dmm index 1450edbbd180..5c85b09864e1 100644 --- a/maps/map_files/New_Varadero/New_Varadero.dmm +++ b/maps/map_files/New_Varadero/New_Varadero.dmm @@ -2317,7 +2317,7 @@ pixel_x = -5; pixel_y = 1 }, -/obj/item/handcuffs{ +/obj/item/restraint/handcuffs{ pixel_x = 2; pixel_y = 16 }, @@ -2875,7 +2875,7 @@ }, /area/varadero/interior/chapel) "bPL" = ( -/obj/item/handcuffs{ +/obj/item/restraint/handcuffs{ pixel_x = 2; pixel_y = 16 }, @@ -3629,7 +3629,7 @@ }, /area/varadero/interior/hall_NW) "coc" = ( -/obj/structure/reagent_dispensers/watertank, +/obj/structure/tunnel/maint_tunnel, /turf/open/floor/shiva{ icon_state = "blue" }, @@ -6436,7 +6436,7 @@ id = "north_research_tunnel" }, /turf/open/auto_turf/sand_white/layer1, -/area/varadero/interior/caves/north_research) +/area/varadero/interior_protected/caves/digsite) "emC" = ( /obj/structure/surface/rack, /obj/item/tool/surgery/scalpel/pict_system, @@ -7297,6 +7297,7 @@ /turf/open/floor/wood, /area/varadero/interior/court) "eMD" = ( +/obj/structure/tunnel/maint_tunnel, /turf/open/floor/shiva{ dir = 10; icon_state = "red" @@ -18168,6 +18169,7 @@ }, /area/varadero/interior/medical) "lLq" = ( +/obj/structure/reagent_dispensers/watertank, /turf/open/floor/shiva{ dir = 8; icon_state = "yellowfull" @@ -21989,7 +21991,7 @@ /area/varadero/interior/hall_SE) "ohi" = ( /obj/structure/surface/table/reinforced/prison, -/obj/item/handcuffs, +/obj/item/restraint/handcuffs, /obj/structure/machinery/flasher_button{ id = "sec_checkpoint"; pixel_y = 24 @@ -28062,7 +28064,7 @@ /area/varadero/interior/caves/east) "rTu" = ( /obj/structure/surface/table/woodentable, -/obj/item/handcuffs, +/obj/item/restraint/handcuffs, /obj/item/weapon/baton, /turf/open/floor/wood, /area/varadero/interior/security) @@ -33846,7 +33848,7 @@ "vEa" = ( /obj/structure/closet/crate/medical, /obj/item/tool/wirecutters/clippers, -/obj/item/handcuffs/zip, +/obj/item/restraint/handcuffs/zip, /obj/item/tool/surgery/surgicaldrill, /obj/item/storage/firstaid/adv, /turf/open/floor/shiva{ @@ -35354,11 +35356,11 @@ }, /area/varadero/interior/comms3) "wvI" = ( -/obj/structure/tunnel{ - id = "north_research_tunnel" +/obj/structure/tunnel/maint_tunnel, +/turf/open/floor/shiva{ + icon_state = "purple" }, -/turf/open/auto_turf/sand_white/layer1, -/area/varadero/interior/hall_SE) +/area/varadero/interior/research) "wvK" = ( /obj/structure/closet/crate/freezer, /obj/effect/landmark/objective_landmark/close, @@ -39119,7 +39121,7 @@ oPQ xCn cBI xCn -emt +xCn ljt pGs pGs @@ -41301,7 +41303,7 @@ wmg vSY izs oyi -sDM +wvI fay ebr ebr @@ -52785,7 +52787,7 @@ cto iFb mCF jdm -mCF +mSa mCF mCF mCF @@ -53503,7 +53505,7 @@ pKs chs chs kGq -wvI +ixr ixr ixr ixr @@ -53545,7 +53547,7 @@ xxk xxk xEG cSa -mCF +mSa mCF mCF mCF @@ -62111,7 +62113,7 @@ cty cty aOg mCF -mSa +mCF mCF pGs pGs @@ -62979,7 +62981,7 @@ wXs xJZ ouy eyt -wnE +kbQ kbQ kbQ kbQ @@ -64787,7 +64789,7 @@ eyt eyt jqw qfu -kbQ +wnE sgk kbQ kbQ @@ -65918,7 +65920,7 @@ bsf bsf bsf bsf -bsf +emt bsf bsf pDX diff --git a/maps/map_files/Sorokyne_Strata/Sorokyne_Strata.dmm b/maps/map_files/Sorokyne_Strata/Sorokyne_Strata.dmm index 6b8b6b82e284..db1f07a8b3b1 100644 --- a/maps/map_files/Sorokyne_Strata/Sorokyne_Strata.dmm +++ b/maps/map_files/Sorokyne_Strata/Sorokyne_Strata.dmm @@ -40149,7 +40149,7 @@ "ulv" = ( /obj/structure/surface/rack, /obj/item/weapon/gun/pistol/t73, -/obj/item/handcuffs, +/obj/item/restraint/handcuffs, /turf/open/floor/strata{ icon_state = "red1" }, diff --git a/maps/map_files/USS_Almayer/USS_Almayer.dmm b/maps/map_files/USS_Almayer/USS_Almayer.dmm index 3bb974993f01..d6b44c96bc97 100644 --- a/maps/map_files/USS_Almayer/USS_Almayer.dmm +++ b/maps/map_files/USS_Almayer/USS_Almayer.dmm @@ -7100,11 +7100,11 @@ req_one_access_txt = "3;22;2;19;7" }, /obj/structure/surface/rack, -/obj/item/rappel_harness{ +/obj/item/parachute{ pixel_y = 8 }, -/obj/item/rappel_harness, -/obj/item/rappel_harness{ +/obj/item/parachute, +/obj/item/parachute{ pixel_y = -6 }, /obj/structure/sign/safety/bulkhead_door{ @@ -30261,7 +30261,7 @@ }, /area/almayer/engineering/upper_engineering/starboard) "gpi" = ( -/obj/structure/dropship_equipment/rappel_system, +/obj/structure/dropship_equipment/paradrop_system, /turf/open/floor/almayer{ icon_state = "test_floor4" }, @@ -33988,9 +33988,9 @@ /area/almayer/hallways/lower/port_midship_hallway) "hAG" = ( /obj/structure/closet/crate/internals, -/obj/item/handcuffs/cable/blue, -/obj/item/handcuffs/cable/blue, -/obj/item/handcuffs/cable/cyan, +/obj/item/restraint/adjustable/cable/blue, +/obj/item/restraint/adjustable/cable/blue, +/obj/item/restraint/adjustable/cable/cyan, /obj/effect/spawner/random/toolbox, /turf/open/shuttle/dropship{ icon_state = "rasputin3" @@ -54802,7 +54802,7 @@ "oFn" = ( /obj/structure/surface/table/almayer, /obj/item/tool/wirecutters/clippers, -/obj/item/handcuffs/zip, +/obj/item/restraint/handcuffs/zip, /turf/open/floor/almayer{ icon_state = "plate" }, @@ -67835,7 +67835,7 @@ pixel_x = -5; pixel_y = 5 }, -/obj/item/handcuffs, +/obj/item/restraint/handcuffs, /obj/item/storage/firstaid/regular, /obj/structure/machinery/light{ dir = 8 @@ -78353,7 +78353,7 @@ pixel_y = 5 }, /obj/item/paper, -/obj/item/handcuffs, +/obj/item/restraint/handcuffs, /obj/item/clothing/mask/cigarette/cigar/classic, /obj/item/coin/silver{ desc = "A small coin, bearing the falling falcons insignia."; diff --git a/maps/map_files/generic/Admin_level.dmm b/maps/map_files/generic/Admin_level.dmm index d085d7a99b0c..36538b22cb60 100644 --- a/maps/map_files/generic/Admin_level.dmm +++ b/maps/map_files/generic/Admin_level.dmm @@ -1264,7 +1264,7 @@ "Dw" = ( /obj/structure/closet/secure_closet/brig, /obj/item/book/manual/marine_law, -/obj/item/handcuffs, +/obj/item/restraint/handcuffs, /turf/open/floor/almayer{ dir = 4; icon_state = "red" diff --git a/maps/predship/huntership.dmm b/maps/predship/huntership.dmm index 7c5d633286f0..433d9057dc70 100644 --- a/maps/predship/huntership.dmm +++ b/maps/predship/huntership.dmm @@ -525,6 +525,11 @@ /obj/item/stack/sheet/mineral/sandstone/large_stack, /obj/item/stack/sheet/mineral/sandstone/large_stack, /obj/item/stack/sheet/mineral/sandstone/large_stack, +/obj/item/stack/sheet/mineral/sandstone/large_stack, +/obj/item/stack/sheet/mineral/sandstone/large_stack, +/obj/item/stack/sheet/mineral/sandstone/large_stack, +/obj/item/stack/sheet/mineral/sandstone/large_stack, +/obj/item/stack/sheet/mineral/sandstone/large_stack, /turf/open/floor/corsat{ dir = 1; icon_state = "squareswood" @@ -844,6 +849,13 @@ icon_state = "squareswood" }, /area/yautja) +"bZ" = ( +/obj/item/storage/fancy/candle_box, +/turf/open/floor/corsat{ + dir = 1; + icon_state = "squareswood" + }, +/area/yautja) "ca" = ( /obj/structure/barricade/handrail/strata{ dir = 1 @@ -1029,6 +1041,18 @@ /obj/structure/closet/secure_closet/freezer/fridge{ locked = 0 }, +/obj/item/reagent_container/food/snacks/xemeatpie{ + name = "Elite Hunter's Xenopie" + }, +/obj/item/reagent_container/food/snacks/xemeatpie{ + name = "Elite Hunter's Xenopie" + }, +/obj/item/reagent_container/food/snacks/xemeatpie{ + name = "Elite Hunter's Xenopie" + }, +/obj/item/reagent_container/food/snacks/xemeatpie{ + name = "Elite Hunter's Xenopie" + }, /turf/open/floor{ dir = 10; icon_state = "darkred2" @@ -1343,6 +1367,29 @@ /obj/item/stack/sheet/mineral/sandstone/runed/large_stack, /obj/item/stack/sheet/mineral/sandstone/runed/large_stack, /obj/item/stack/sheet/mineral/sandstone/runed/large_stack, +/obj/item/stack/sheet/mineral/sandstone/runed/large_stack, +/obj/item/stack/sheet/mineral/sandstone/runed/large_stack, +/obj/item/stack/sheet/mineral/sandstone/runed/large_stack, +/obj/item/stack/sheet/mineral/sandstone/runed/large_stack, +/obj/item/stack/sheet/mineral/sandstone/runed/large_stack, +/obj/item/stack/sheet/mineral/sandstone/runed/large_stack, +/obj/item/stack/sheet/mineral/sandstone/runed/large_stack, +/obj/item/stack/sheet/mineral/sandstone/runed/large_stack, +/obj/item/stack/sheet/mineral/sandstone/runed/large_stack, +/obj/item/stack/sheet/mineral/sandstone/runed/large_stack, +/obj/item/stack/sheet/mineral/sandstone/runed/large_stack, +/obj/item/stack/sheet/mineral/sandstone/runed/large_stack, +/obj/item/stack/sheet/mineral/sandstone/runed/large_stack, +/obj/item/stack/sheet/mineral/sandstone/runed/large_stack, +/obj/item/stack/sheet/mineral/sandstone/runed/large_stack, +/obj/item/stack/sheet/mineral/sandstone/runed/large_stack, +/obj/item/stack/sheet/mineral/sandstone/runed/large_stack, +/obj/item/stack/sheet/mineral/sandstone/runed/large_stack, +/obj/item/stack/sheet/mineral/sandstone/runed/large_stack, +/obj/item/stack/sheet/mineral/sandstone/runed/large_stack, +/obj/item/stack/sheet/mineral/sandstone/runed/large_stack, +/obj/item/stack/sheet/mineral/sandstone/runed/large_stack, +/obj/item/stack/sheet/mineral/sandstone/runed/large_stack, /turf/open/floor/corsat{ dir = 1; icon_state = "squareswood" @@ -1547,6 +1594,12 @@ /obj/structure/closet/secure_closet/freezer/fridge{ locked = 0 }, +/obj/item/reagent_container/food/snacks/xemeatpie{ + name = "Elite Hunter's Xenopie" + }, +/obj/item/reagent_container/food/snacks/xemeatpie{ + name = "Elite Hunter's Xenopie" + }, /turf/open/floor{ dir = 1; icon_state = "darkred2" @@ -1734,6 +1787,30 @@ }, /turf/open/shuttle/predship, /area/yautja) +"fI" = ( +/obj/structure/surface/rack{ + color = "#6b675e"; + layer = 2.79 + }, +/obj/item/device/flashlight/lamp, +/obj/item/device/flashlight/lamp, +/obj/item/device/flashlight/lamp, +/obj/item/device/flashlight/lamp, +/obj/item/device/flashlight/lamp, +/obj/item/device/flashlight/lamp, +/obj/item/device/flashlight/lamp, +/obj/item/device/flashlight/lamp, +/obj/item/device/flashlight/lamp, +/obj/item/device/flashlight/lamp, +/obj/item/device/flashlight/lamp, +/obj/item/device/flashlight/lamp, +/obj/item/device/flashlight/lamp, +/obj/item/device/flashlight/lamp, +/turf/open/floor/corsat{ + dir = 1; + icon_state = "squareswood" + }, +/area/yautja) "fS" = ( /obj/structure/barricade/handrail/strata, /turf/open/gm/dirtgrassborder/weedable{ @@ -1807,8 +1884,32 @@ name = "Armory Shutters"; needs_power = 0; pixel_x = 24; - req_one_access_txt = "392"; - needs_power = 0 + req_one_access_txt = "392" + }, +/turf/open/floor/corsat{ + dir = 1; + icon_state = "squareswood" + }, +/area/yautja) +"gN" = ( +/obj/structure/surface/rack{ + color = "#6b675e"; + layer = 2.79 + }, +/obj/item/stack/tile/carpet{ + amount = 50 + }, +/obj/item/stack/tile/carpet{ + amount = 50 + }, +/obj/item/stack/tile/carpet{ + amount = 50 + }, +/obj/item/stack/tile/carpet{ + amount = 50 + }, +/obj/item/stack/tile/carpet{ + amount = 50 }, /turf/open/floor/corsat{ dir = 1; @@ -1859,6 +1960,11 @@ /obj/structure/kitchenspike, /obj/item/reagent_container/food/snacks/sliceable/xenomeatbread, /obj/item/reagent_container/food/snacks/sliceable/xenomeatbread, +/obj/item/reagent_container/food/snacks/sliceable/xenomeatbread, +/obj/item/reagent_container/food/snacks/sliceable/xenomeatbread, +/obj/item/reagent_container/food/snacks/sliceable/xenomeatbread, +/obj/item/reagent_container/food/snacks/sliceable/xenomeatbread, +/obj/item/reagent_container/food/snacks/sliceable/xenomeatbread, /turf/open/floor{ dir = 8; icon_state = "darkred2" @@ -1950,6 +2056,60 @@ icon_state = "desert1" }, /area/yautja) +"mn" = ( +/obj/structure/surface/rack{ + color = "#6b675e"; + layer = 2.79 + }, +/obj/item/device/flashlight/lantern{ + pixel_x = 1; + pixel_y = 9 + }, +/obj/item/device/flashlight/lantern{ + pixel_x = 1; + pixel_y = 9 + }, +/obj/item/device/flashlight/lantern{ + pixel_x = 1; + pixel_y = 9 + }, +/obj/item/device/flashlight/lantern{ + pixel_x = 1; + pixel_y = 9 + }, +/obj/item/device/flashlight/lantern{ + pixel_x = 1; + pixel_y = 9 + }, +/obj/item/device/flashlight/lantern{ + pixel_x = 1; + pixel_y = 9 + }, +/obj/item/device/flashlight/lantern{ + pixel_x = 1; + pixel_y = 9 + }, +/obj/item/device/flashlight/lantern{ + pixel_x = 1; + pixel_y = 9 + }, +/obj/item/device/flashlight/lantern{ + pixel_x = 1; + pixel_y = 9 + }, +/obj/item/device/flashlight/lantern{ + pixel_x = 1; + pixel_y = 9 + }, +/obj/item/device/flashlight/lantern{ + pixel_x = 1; + pixel_y = 9 + }, +/turf/open/floor/corsat{ + dir = 1; + icon_state = "squareswood" + }, +/area/yautja) "mv" = ( /obj/structure/surface/table/reinforced/prison{ color = "#6b675e" @@ -2151,6 +2311,37 @@ icon_state = "multi_tiles" }, /area/yautja) +"sS" = ( +/obj/structure/surface/rack{ + color = "#6b675e"; + layer = 2.79 + }, +/obj/item/stack/sheet/wood{ + amount = 50 + }, +/obj/item/stack/sheet/wood{ + amount = 50 + }, +/obj/item/stack/sheet/wood{ + amount = 50 + }, +/obj/item/stack/sheet/wood{ + amount = 50 + }, +/obj/item/stack/sheet/wood{ + amount = 50 + }, +/obj/item/stack/sheet/wood{ + amount = 50 + }, +/obj/item/stack/sheet/wood{ + amount = 50 + }, +/turf/open/floor/corsat{ + dir = 1; + icon_state = "squareswood" + }, +/area/yautja) "sV" = ( /obj/structure/machinery/door/airlock/yautja{ dir = 1; @@ -2210,18 +2401,22 @@ }, /area/yautja) "tR" = ( -/obj/structure/surface/table/reinforced/prison{ - color = "#6b675e" - }, -/obj/structure/window/reinforced{ - dir = 8; - health = 80 - }, -/obj/structure/window/reinforced{ - dir = 4; - health = 80 +/obj/structure/surface/rack{ + color = "#6b675e"; + layer = 2.79 }, -/obj/item/storage/box/bracer, +/obj/item/frame/table/wood/poor, +/obj/item/frame/table/wood/poor, +/obj/item/frame/table/wood/poor, +/obj/item/frame/table/wood/poor, +/obj/item/frame/table/wood/poor, +/obj/item/frame/table/wood/poor, +/obj/item/frame/table/wood/poor, +/obj/item/frame/table/wood/poor, +/obj/item/frame/table/wood/poor, +/obj/item/frame/table/wood/poor, +/obj/item/frame/table/wood/poor, +/obj/item/frame/table/wood/poor, /turf/open/floor/corsat{ dir = 1; icon_state = "squareswood" @@ -2233,6 +2428,54 @@ }, /turf/open/gm/dirtgrassborder/west, /area/yautja) +"uj" = ( +/obj/structure/surface/rack{ + color = "#6b675e"; + layer = 2.79 + }, +/obj/item/frame/table/gambling, +/obj/item/frame/table/gambling, +/obj/item/frame/table/gambling, +/obj/item/frame/table/gambling, +/obj/item/frame/table/gambling, +/obj/item/frame/table/gambling, +/obj/item/frame/table/gambling, +/obj/item/frame/table/gambling, +/obj/item/frame/table/gambling, +/obj/item/frame/table/gambling, +/obj/item/frame/table/gambling, +/obj/item/frame/table/gambling, +/obj/item/frame/table/gambling, +/obj/item/frame/table/gambling, +/obj/item/frame/table/gambling, +/obj/item/frame/table/gambling, +/obj/item/frame/table/gambling, +/obj/item/frame/table/gambling, +/obj/item/frame/table/gambling, +/obj/item/frame/table/gambling, +/obj/item/frame/table/gambling, +/turf/open/floor/corsat{ + dir = 1; + icon_state = "squareswood" + }, +/area/yautja) +"um" = ( +/obj/structure/surface/rack{ + color = "#6b675e"; + layer = 2.79 + }, +/obj/item/storage/fancy/candle_box, +/obj/item/storage/fancy/candle_box, +/obj/item/storage/fancy/candle_box, +/obj/item/storage/fancy/candle_box, +/obj/item/storage/fancy/candle_box, +/obj/item/storage/fancy/candle_box, +/obj/item/storage/fancy/candle_box, +/turf/open/floor/corsat{ + dir = 1; + icon_state = "squareswood" + }, +/area/yautja) "uO" = ( /obj/structure/bed/chair/hunter{ dir = 4 @@ -2358,6 +2601,24 @@ icon_state = "squareswood" }, /area/yautja) +"yr" = ( +/obj/structure/window/reinforced{ + dir = 8; + health = 80 + }, +/obj/structure/window/reinforced{ + dir = 4; + health = 80 + }, +/obj/structure/surface/table/reinforced/prison{ + color = "#6b675e" + }, +/obj/item/storage/box/bracer, +/turf/open/floor/corsat{ + dir = 1; + icon_state = "squareswood" + }, +/area/yautja) "yH" = ( /obj/structure/closet/secure_closet/freezer/fridge/groceries, /turf/open/floor{ @@ -2394,18 +2655,28 @@ }, /area/yautja) "zZ" = ( -/obj/structure/surface/table/reinforced/prison{ - color = "#6b675e" - }, -/obj/structure/window/reinforced{ - dir = 8; - health = 80 - }, -/obj/structure/window/reinforced{ - dir = 1; - health = 80; - pixel_y = 16 +/obj/structure/surface/rack{ + color = "#6b675e"; + layer = 2.79 }, +/obj/item/frame/table/wood/fancy, +/obj/item/frame/table/wood/fancy, +/obj/item/frame/table/wood/fancy, +/obj/item/frame/table/wood/fancy, +/obj/item/frame/table/wood/fancy, +/obj/item/frame/table/wood/fancy, +/obj/item/frame/table/wood/fancy, +/obj/item/frame/table/wood/fancy, +/obj/item/frame/table/wood/fancy, +/obj/item/frame/table/wood/fancy, +/obj/item/frame/table/wood/fancy, +/obj/item/frame/table/wood/fancy, +/obj/item/frame/table/wood/fancy, +/obj/item/frame/table/wood/fancy, +/obj/item/frame/table/wood/fancy, +/obj/item/frame/table/wood/fancy, +/obj/item/frame/table/wood/fancy, +/obj/item/frame/table/wood/fancy, /turf/open/floor/corsat{ dir = 1; icon_state = "squareswood" @@ -2636,30 +2907,30 @@ /obj/structure/surface/table/reinforced/prison{ color = "#6b675e" }, -/obj/item/legcuffs{ +/obj/item/restraint/legcuffs{ pixel_y = 5 }, -/obj/item/legcuffs{ +/obj/item/restraint/legcuffs{ pixel_y = 5 }, -/obj/item/legcuffs{ +/obj/item/restraint/legcuffs{ pixel_y = 5 }, -/obj/item/legcuffs{ +/obj/item/restraint/legcuffs{ pixel_y = 5 }, -/obj/item/legcuffs{ +/obj/item/restraint/legcuffs{ pixel_y = 5 }, -/obj/item/legcuffs{ +/obj/item/restraint/legcuffs{ pixel_y = 5 }, -/obj/item/handcuffs, -/obj/item/handcuffs, -/obj/item/handcuffs, -/obj/item/handcuffs, -/obj/item/handcuffs, -/obj/item/handcuffs, +/obj/item/restraint/handcuffs, +/obj/item/restraint/handcuffs, +/obj/item/restraint/handcuffs, +/obj/item/restraint/handcuffs, +/obj/item/restraint/handcuffs, +/obj/item/restraint/handcuffs, /turf/open/shuttle/predship, /area/yautja) "GM" = ( @@ -2845,6 +3116,21 @@ /obj/item/stack/sheet/metal{ amount = 50 }, +/obj/item/stack/sheet/metal{ + amount = 50 + }, +/obj/item/stack/sheet/metal{ + amount = 50 + }, +/obj/item/stack/sheet/metal{ + amount = 50 + }, +/obj/item/stack/sheet/metal{ + amount = 50 + }, +/obj/item/stack/sheet/metal{ + amount = 50 + }, /turf/open/floor/corsat{ dir = 1; icon_state = "squareswood" @@ -3109,17 +3395,32 @@ /turf/open/shuttle/predship, /area/yautja) "Ut" = ( -/obj/structure/surface/table/reinforced/prison{ - color = "#6b675e" - }, -/obj/structure/window/reinforced{ - dir = 8; - health = 80 - }, -/obj/structure/window/reinforced{ - dir = 4; - health = 80 +/obj/structure/surface/rack{ + color = "#6b675e"; + layer = 2.79 }, +/obj/item/frame/table/wood, +/obj/item/frame/table/wood, +/obj/item/frame/table/wood, +/obj/item/frame/table/wood, +/obj/item/frame/table/wood, +/obj/item/frame/table/wood, +/obj/item/frame/table/wood, +/obj/item/frame/table/wood, +/obj/item/frame/table/wood, +/obj/item/frame/table/wood, +/obj/item/frame/table/wood, +/obj/item/frame/table/wood, +/obj/item/frame/table/wood, +/obj/item/frame/table/wood, +/obj/item/frame/table/wood, +/obj/item/frame/table/wood, +/obj/item/frame/table/wood, +/obj/item/frame/table/wood, +/obj/item/frame/table/wood, +/obj/item/frame/table/wood, +/obj/item/frame/table/wood, +/obj/item/frame/table/wood, /turf/open/floor/corsat{ dir = 1; icon_state = "squareswood" @@ -3146,12 +3447,12 @@ /obj/structure/surface/table/reinforced/prison{ color = "#6b675e" }, -/obj/item/restraints, -/obj/item/restraints, -/obj/item/restraints, -/obj/item/restraints, -/obj/item/restraints, -/obj/item/restraints, +/obj/item/xeno_restraints, +/obj/item/xeno_restraints, +/obj/item/xeno_restraints, +/obj/item/xeno_restraints, +/obj/item/xeno_restraints, +/obj/item/xeno_restraints, /turf/open/shuttle/predship, /area/yautja) "VT" = ( @@ -5403,7 +5704,7 @@ JH JH JH bL -bL +yr bj bj bj @@ -5475,7 +5776,7 @@ bL bL JH JH -bL +yr bj bM da @@ -5545,9 +5846,9 @@ cP bL bL bL -bL +bZ JH -bL +yr bj cv cP @@ -5619,7 +5920,7 @@ bL mv xO JH -bL +yr bj cP cP @@ -5691,7 +5992,7 @@ cP cP Dk JH -bL +yr bj cP cP @@ -6479,7 +6780,7 @@ cH ti bd ti -Ut +uj bL cP tR @@ -6554,7 +6855,7 @@ bj Ut cP cP -tR +fI bj bj bj @@ -6621,12 +6922,12 @@ cP cP Pm ov -nh -ZM +sS +gN zZ cP cP -tR +mn bj bj bj @@ -6698,7 +6999,7 @@ cP cP cP cP -tR +um bj bj aa diff --git a/maps/predship/regular.dmm b/maps/predship/regular.dmm index 895e8ae84c91..984bd4e7c65a 100644 --- a/maps/predship/regular.dmm +++ b/maps/predship/regular.dmm @@ -1136,12 +1136,12 @@ /area/yautja) "dk" = ( /obj/structure/surface/table/reinforced, -/obj/item/handcuffs, -/obj/item/handcuffs, -/obj/item/handcuffs, -/obj/item/handcuffs, -/obj/item/handcuffs, -/obj/item/handcuffs, +/obj/item/restraint/handcuffs, +/obj/item/restraint/handcuffs, +/obj/item/restraint/handcuffs, +/obj/item/restraint/handcuffs, +/obj/item/restraint/handcuffs, +/obj/item/restraint/handcuffs, /turf/open/floor/holofloor{ dir = 2; icon_state = "cult" @@ -1149,12 +1149,12 @@ /area/yautja) "dl" = ( /obj/structure/surface/table/reinforced, -/obj/item/legcuffs, -/obj/item/legcuffs, -/obj/item/legcuffs, -/obj/item/legcuffs, -/obj/item/legcuffs, -/obj/item/legcuffs, +/obj/item/restraint/legcuffs, +/obj/item/restraint/legcuffs, +/obj/item/restraint/legcuffs, +/obj/item/restraint/legcuffs, +/obj/item/restraint/legcuffs, +/obj/item/restraint/legcuffs, /turf/open/floor/holofloor{ dir = 2; icon_state = "cult" diff --git a/maps/shuttles/ert_shuttle_big.dmm b/maps/shuttles/ert_shuttle_big.dmm index f3983899e249..a07c57e00a20 100644 --- a/maps/shuttles/ert_shuttle_big.dmm +++ b/maps/shuttles/ert_shuttle_big.dmm @@ -84,9 +84,9 @@ pixel_x = -2; pixel_y = 3 }, -/obj/item/handcuffs, -/obj/item/handcuffs, -/obj/item/handcuffs, +/obj/item/restraint/handcuffs, +/obj/item/restraint/handcuffs, +/obj/item/restraint/handcuffs, /turf/open/floor/almayer{ icon_state = "plate" }, diff --git a/maps/templates/lazy_templates/clf_ert_station.dmm b/maps/templates/lazy_templates/clf_ert_station.dmm index 908f8de06dcb..3aa8c800327f 100644 --- a/maps/templates/lazy_templates/clf_ert_station.dmm +++ b/maps/templates/lazy_templates/clf_ert_station.dmm @@ -804,7 +804,7 @@ "sx" = ( /obj/structure/surface/table/woodentable/poor, /obj/item/clothing/glasses/sunglasses/blindfold, -/obj/item/handcuffs, +/obj/item/restraint/handcuffs, /turf/open/floor/wood, /area/adminlevel/ert_station/clf_station) "sC" = ( @@ -1817,8 +1817,8 @@ "Ro" = ( /obj/structure/surface/table/woodentable/poor, /obj/item/clothing/glasses/sunglasses/blindfold, -/obj/item/handcuffs, -/obj/item/handcuffs, +/obj/item/restraint/handcuffs, +/obj/item/restraint/handcuffs, /turf/open/floor/wood, /area/adminlevel/ert_station/clf_station) "Rr" = ( diff --git a/maps/templates/lazy_templates/freelancer_ert_station.dmm b/maps/templates/lazy_templates/freelancer_ert_station.dmm index bf9709e2150d..74c368e4f0b6 100644 --- a/maps/templates/lazy_templates/freelancer_ert_station.dmm +++ b/maps/templates/lazy_templates/freelancer_ert_station.dmm @@ -811,7 +811,7 @@ "Hg" = ( /obj/structure/closet/secure_closet/brig, /obj/item/book/manual/marine_law, -/obj/item/handcuffs, +/obj/item/restraint/handcuffs, /turf/open/floor/almayer{ dir = 4; icon_state = "red" diff --git a/maps/templates/lazy_templates/twe_ert_station.dmm b/maps/templates/lazy_templates/twe_ert_station.dmm index 2c9c696d7842..10e175eae24c 100644 --- a/maps/templates/lazy_templates/twe_ert_station.dmm +++ b/maps/templates/lazy_templates/twe_ert_station.dmm @@ -1465,11 +1465,11 @@ }, /area/adminlevel/ert_station/royal_marines_station) "Cm" = ( -/obj/item/handcuffs{ +/obj/item/restraint/handcuffs{ pixel_y = 12 }, /obj/structure/surface/table/almayer, -/obj/item/handcuffs, +/obj/item/restraint/handcuffs, /obj/item/weapon/baton{ pixel_x = -12 }, @@ -2658,11 +2658,11 @@ "VL" = ( /obj/structure/surface/table/almayer, /obj/item/clothing/suit/straight_jacket, -/obj/item/handcuffs{ +/obj/item/restraint/handcuffs{ pixel_x = -4; pixel_y = 1 }, -/obj/item/handcuffs, +/obj/item/restraint/handcuffs, /obj/effect/decal/cleanable/dirt, /turf/open/floor/almayer{ icon_state = "redfull" diff --git a/maps/templates/lazy_templates/upp_ert_station.dmm b/maps/templates/lazy_templates/upp_ert_station.dmm index ae2a8ad40c47..fd1e6186bf73 100644 --- a/maps/templates/lazy_templates/upp_ert_station.dmm +++ b/maps/templates/lazy_templates/upp_ert_station.dmm @@ -828,11 +828,11 @@ "me" = ( /obj/structure/surface/table/reinforced/prison, /obj/item/clothing/suit/straight_jacket, -/obj/item/handcuffs{ +/obj/item/restraint/handcuffs{ pixel_x = -4; pixel_y = 1 }, -/obj/item/handcuffs, +/obj/item/restraint/handcuffs, /turf/open/floor/strata{ icon_state = "red1" }, diff --git a/node_modules/.yarn-integrity b/node_modules/.yarn-integrity new file mode 100644 index 000000000000..6b671344d4af --- /dev/null +++ b/node_modules/.yarn-integrity @@ -0,0 +1,10 @@ +{ + "systemParams": "win32-x64-93", + "modulesFolders": [], + "flags": [], + "linkedModules": [], + "topLevelPatterns": [], + "lockfileEntries": {}, + "files": [], + "artifacts": {} +} \ No newline at end of file diff --git a/strings/xenotips.txt b/strings/xenotips.txt index d5bc61e7cf79..414d0883e576 100644 --- a/strings/xenotips.txt +++ b/strings/xenotips.txt @@ -37,6 +37,8 @@ You can filter out the Xenomorphs displayed in hive status by health, allowing y Each xeno has their own ‘tackle counter’ on a marine. The range to successfully tackle can be anywhere from two to six tackles based on caste. If a marine gets stunned or knocked over by other means it will reset everyone's tackle counters and they may get up! As a Xenomorph, the list of available tunnels is sorted by their distance to the player! As a Xenomorph, pay attention to what a marine is wearing. If they have no helmet, aiming for the head will be significantly more damaging, if they aren't wearing gloves, then think about going for their hands. +The M540-A Armored Recon Carrier can be crawled under as a xenomorph when destroyed. +The M540-A Armored Recon Carrier is very vulnerable to acid damage. Applying acid to flares makes them burn faster. Melting weapons, ammo or other valuables owned by marines is a good way to debilitate them. The secrete acid shortcut is (by default) Shift + C. diff --git a/tgui/.eslintignore b/tgui/.eslintignore index 7965d0731a6e..d3c0ac79cd88 100644 --- a/tgui/.eslintignore +++ b/tgui/.eslintignore @@ -3,3 +3,14 @@ /**/*.bundle.* /**/*.chunk.* /**/*.hot-update.* +**.lock +**.log +**.json +**.svg +**.scss +**.md +**.css +**.txt +**.woff2 +**.eot +**.ttf diff --git a/tgui/.eslintrc-sonar.yml b/tgui/.eslintrc-sonar.yml index 3cdd49f889e2..ebc57f72c008 100644 --- a/tgui/.eslintrc-sonar.yml +++ b/tgui/.eslintrc-sonar.yml @@ -1,26 +1 @@ -rules: - # radar/cognitive-complexity: error - radar/max-switch-cases: error - radar/no-all-duplicated-branches: error - radar/no-collapsible-if: error - radar/no-collection-size-mischeck: error - radar/no-duplicate-string: error - radar/no-duplicated-branches: error - radar/no-element-overwrite: error - radar/no-extra-arguments: error - radar/no-identical-conditions: error - radar/no-identical-expressions: error - radar/no-identical-functions: error - radar/no-inverted-boolean-check: error - radar/no-one-iteration-loop: error - radar/no-redundant-boolean: error - radar/no-redundant-jump: error - radar/no-same-line-conditional: error - radar/no-small-switch: error - radar/no-unused-collection: error - radar/no-use-of-empty-return-value: error - radar/no-useless-catch: error - radar/prefer-immediate-return: error - radar/prefer-object-literal: error - radar/prefer-single-boolean-return: error - radar/prefer-while: error +extends: 'plugin:sonarjs/recommended' diff --git a/tgui/.eslintrc.yml b/tgui/.eslintrc.yml index fc7385b68b33..4ff25c1f7fe4 100644 --- a/tgui/.eslintrc.yml +++ b/tgui/.eslintrc.yml @@ -11,12 +11,13 @@ env: browser: true node: true plugins: - - radar + - sonarjs - react - unused-imports + - simple-import-sort settings: react: - version: '16.10' + version: '18.2' rules: ## Possible Errors ## ---------------------------------------- @@ -308,13 +309,16 @@ rules: ## Enforce or disallow capitalization of the first letter of a comment # capitalized-comments: error ## Require or disallow trailing commas - comma-dangle: [error, { - arrays: always-multiline, - objects: always-multiline, - imports: always-multiline, - exports: always-multiline, - functions: only-multiline, ## Optional on functions - }] + comma-dangle: [ + error, + { + arrays: always-multiline, + objects: always-multiline, + imports: always-multiline, + exports: always-multiline, + functions: only-multiline, ## Optional on functions + }, + ] ## Enforce consistent spacing before and after commas comma-spacing: [error, { before: false, after: true }] ## Enforce consistent comma style @@ -761,3 +765,6 @@ rules: ## Prevents the use of unused imports. ## This could be done by enabling no-unused-vars, but we're doing this for now unused-imports/no-unused-imports: error + ## https://github.com/lydell/eslint-plugin-simple-import-sort/ + simple-import-sort/imports: error + simple-import-sort/exports: error diff --git a/tgui/.prettierignore b/tgui/.prettierignore index 79e703c95440..a91324ebe6e8 100644 --- a/tgui/.prettierignore +++ b/tgui/.prettierignore @@ -6,6 +6,7 @@ /yarn.lock /.pnp.* +.swcrc /docs /public /packages/tgui-polyfill diff --git a/tgui/.prettierrc.yml b/tgui/.prettierrc.yml index 1eebe6098b11..01769692264f 100644 --- a/tgui/.prettierrc.yml +++ b/tgui/.prettierrc.yml @@ -1,15 +1 @@ -arrowParens: always -breakLongMethodChains: true -endOfLine: lf -importFormatting: oneline -jsxBracketSameLine: true -jsxSingleQuote: false -offsetTernaryExpressions: true -printWidth: 80 -proseWrap: preserve -quoteProps: preserve -semi: true singleQuote: true -tabWidth: 2 -trailingComma: es5 -useTabs: false diff --git a/tgui/.yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs b/tgui/.yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs deleted file mode 100644 index 527659ff97f5..000000000000 --- a/tgui/.yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs +++ /dev/null @@ -1,363 +0,0 @@ -/* eslint-disable */ -//prettier-ignore -module.exports = { -name: "@yarnpkg/plugin-interactive-tools", -factory: function (require) { -var plugin=(()=>{var PR=Object.create,J1=Object.defineProperty,MR=Object.defineProperties,FR=Object.getOwnPropertyDescriptor,LR=Object.getOwnPropertyDescriptors,RR=Object.getOwnPropertyNames,hh=Object.getOwnPropertySymbols,NR=Object.getPrototypeOf,Z4=Object.prototype.hasOwnProperty,aD=Object.prototype.propertyIsEnumerable;var dD=(i,u,f)=>u in i?J1(i,u,{enumerable:!0,configurable:!0,writable:!0,value:f}):i[u]=f,dt=(i,u)=>{for(var f in u||(u={}))Z4.call(u,f)&&dD(i,f,u[f]);if(hh)for(var f of hh(u))aD.call(u,f)&&dD(i,f,u[f]);return i},zn=(i,u)=>MR(i,LR(u)),BR=i=>J1(i,"__esModule",{value:!0});var Si=(i,u)=>{var f={};for(var c in i)Z4.call(i,c)&&u.indexOf(c)<0&&(f[c]=i[c]);if(i!=null&&hh)for(var c of hh(i))u.indexOf(c)<0&&aD.call(i,c)&&(f[c]=i[c]);return f};var Me=(i,u)=>()=>(u||i((u={exports:{}}).exports,u),u.exports),jR=(i,u)=>{for(var f in u)J1(i,f,{get:u[f],enumerable:!0})},UR=(i,u,f)=>{if(u&&typeof u=="object"||typeof u=="function")for(let c of RR(u))!Z4.call(i,c)&&c!=="default"&&J1(i,c,{get:()=>u[c],enumerable:!(f=FR(u,c))||f.enumerable});return i},Er=i=>UR(BR(J1(i!=null?PR(NR(i)):{},"default",i&&i.__esModule&&"default"in i?{get:()=>i.default,enumerable:!0}:{value:i,enumerable:!0})),i);var ey=Me((YH,pD)=>{"use strict";var hD=Object.getOwnPropertySymbols,qR=Object.prototype.hasOwnProperty,zR=Object.prototype.propertyIsEnumerable;function WR(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function HR(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var u={},f=0;f<10;f++)u["_"+String.fromCharCode(f)]=f;var c=Object.getOwnPropertyNames(u).map(function(t){return u[t]});if(c.join("")!=="0123456789")return!1;var g={};return"abcdefghijklmnopqrst".split("").forEach(function(t){g[t]=t}),Object.keys(Object.assign({},g)).join("")==="abcdefghijklmnopqrst"}catch(t){return!1}}pD.exports=HR()?Object.assign:function(i,u){for(var f,c=WR(i),g,t=1;t{"use strict";var ty=ey(),as=typeof Symbol=="function"&&Symbol.for,Q1=as?Symbol.for("react.element"):60103,bR=as?Symbol.for("react.portal"):60106,GR=as?Symbol.for("react.fragment"):60107,VR=as?Symbol.for("react.strict_mode"):60108,YR=as?Symbol.for("react.profiler"):60114,$R=as?Symbol.for("react.provider"):60109,KR=as?Symbol.for("react.context"):60110,XR=as?Symbol.for("react.forward_ref"):60112,JR=as?Symbol.for("react.suspense"):60113,QR=as?Symbol.for("react.memo"):60115,ZR=as?Symbol.for("react.lazy"):60116,mD=typeof Symbol=="function"&&Symbol.iterator;function Z1(i){for(var u="https://reactjs.org/docs/error-decoder.html?invariant="+i,f=1;fmh.length&&mh.push(i)}function uy(i,u,f,c){var g=typeof i;(g==="undefined"||g==="boolean")&&(i=null);var t=!1;if(i===null)t=!0;else switch(g){case"string":case"number":t=!0;break;case"object":switch(i.$$typeof){case Q1:case bR:t=!0}}if(t)return f(c,i,u===""?"."+sy(i,0):u),1;if(t=0,u=u===""?".":u+":",Array.isArray(i))for(var C=0;C{"use strict";kD.exports=xD()});var AD=Me((ga,e2)=>{(function(){var i,u="4.17.21",f=200,c="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",g="Expected a function",t="Invalid `variable` option passed into `_.template`",C="__lodash_hash_undefined__",A=500,x="__lodash_placeholder__",D=1,L=2,N=4,j=1,$=2,h=1,re=2,ce=4,Q=8,oe=16,Se=32,me=64,De=128,J=256,Te=512,Oe=30,Le="...",ot=800,ct=16,Ue=1,be=2,At=3,Ot=1/0,Nt=9007199254740991,Je=17976931348623157e292,V=0/0,ne=4294967295,ge=ne-1,Z=ne>>>1,Ae=[["ary",De],["bind",h],["bindKey",re],["curry",Q],["curryRight",oe],["flip",Te],["partial",Se],["partialRight",me],["rearg",J]],at="[object Arguments]",it="[object Array]",Ft="[object AsyncFunction]",jt="[object Boolean]",hn="[object Date]",Un="[object DOMException]",Jt="[object Error]",Yt="[object Function]",cr="[object GeneratorFunction]",w="[object Map]",pt="[object Number]",Mn="[object Null]",Bn="[object Object]",Xn="[object Promise]",vr="[object Proxy]",gr="[object RegExp]",r0="[object Set]",Ci="[object String]",yo="[object Symbol]",Ds="[object Undefined]",Mu="[object WeakMap]",Gf="[object WeakSet]",iu="[object ArrayBuffer]",ou="[object DataView]",ol="[object Float32Array]",ul="[object Float64Array]",Es="[object Int8Array]",Uo="[object Int16Array]",sl="[object Int32Array]",Ss="[object Uint8Array]",Cs="[object Uint8ClampedArray]",Ti="[object Uint16Array]",Fu="[object Uint32Array]",ll=/\b__p \+= '';/g,fl=/\b(__p \+=) '' \+/g,cl=/(__e\(.*?\)|\b__t\)) \+\n'';/g,al=/&(?:amp|lt|gt|quot|#39);/g,Ui=/[&<>"']/g,Mr=RegExp(al.source),Ac=RegExp(Ui.source),of=/<%-([\s\S]+?)%>/g,Ts=/<%([\s\S]+?)%>/g,xs=/<%=([\s\S]+?)%>/g,dl=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,qi=/^\w*$/,qo=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,kr=/[\\^$.*+?()[\]{}|]/g,Fr=RegExp(kr.source),si=/^\s+/,H0=/\s/,b0=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Bt=/\{\n\/\* \[wrapped with (.+)\] \*/,Lu=/,? & /,c0=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Ru=/[()=,{}\[\]\/\s]/,ks=/\\(\\)?/g,As=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,uu=/\w*$/,wo=/^[-+]0x[0-9a-f]+$/i,zo=/^0b[01]+$/i,Os=/^\[object .+?Constructor\]$/,Is=/^0o[0-7]+$/i,uf=/^(?:0|[1-9]\d*)$/,_n=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Nu=/($^)/,Wo=/['\n\r\u2028\u2029\\]/g,su="\\ud800-\\udfff",Ps="\\u0300-\\u036f",pl="\\ufe20-\\ufe2f",Vf="\\u20d0-\\u20ff",hl=Ps+pl+Vf,Bu="\\u2700-\\u27bf",ju="a-z\\xdf-\\xf6\\xf8-\\xff",sf="\\xac\\xb1\\xd7\\xf7",ro="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Ms="\\u2000-\\u206f",ml=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Uu="A-Z\\xc0-\\xd6\\xd8-\\xde",G0="\\ufe0e\\ufe0f",Fs=sf+ro+Ms+ml,tt="['\u2019]",zi="["+su+"]",lu="["+Fs+"]",Ho="["+hl+"]",O0="\\d+",vl="["+Bu+"]",gl="["+ju+"]",fu="[^"+su+Fs+O0+Bu+ju+Uu+"]",_l="\\ud83c[\\udffb-\\udfff]",Sn="(?:"+Ho+"|"+_l+")",gt="[^"+su+"]",en="(?:\\ud83c[\\udde6-\\uddff]){2}",I0="[\\ud800-\\udbff][\\udc00-\\udfff]",li="["+Uu+"]",qu="\\u200d",Wi="(?:"+gl+"|"+fu+")",zu="(?:"+li+"|"+fu+")",Wu="(?:"+tt+"(?:d|ll|m|re|s|t|ve))?",Ls="(?:"+tt+"(?:D|LL|M|RE|S|T|VE))?",fi=Sn+"?",e0="["+G0+"]?",io="(?:"+qu+"(?:"+[gt,en,I0].join("|")+")"+e0+fi+")*",D0="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Do="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",i0=e0+fi+io,Rs="(?:"+[vl,en,I0].join("|")+")"+i0,a0="(?:"+[gt+Ho+"?",Ho,en,I0,zi].join("|")+")",Hu=RegExp(tt,"g"),V0=RegExp(Ho,"g"),bu=RegExp(_l+"(?="+_l+")|"+a0+i0,"g"),Ns=RegExp([li+"?"+gl+"+"+Wu+"(?="+[lu,li,"$"].join("|")+")",zu+"+"+Ls+"(?="+[lu,li+Wi,"$"].join("|")+")",li+"?"+Wi+"+"+Wu,li+"+"+Ls,Do,D0,O0,Rs].join("|"),"g"),bo=RegExp("["+qu+su+hl+G0+"]"),P0=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,ln=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],lf=-1,nr={};nr[ol]=nr[ul]=nr[Es]=nr[Uo]=nr[sl]=nr[Ss]=nr[Cs]=nr[Ti]=nr[Fu]=!0,nr[at]=nr[it]=nr[iu]=nr[jt]=nr[ou]=nr[hn]=nr[Jt]=nr[Yt]=nr[w]=nr[pt]=nr[Bn]=nr[gr]=nr[r0]=nr[Ci]=nr[Mu]=!1;var rr={};rr[at]=rr[it]=rr[iu]=rr[ou]=rr[jt]=rr[hn]=rr[ol]=rr[ul]=rr[Es]=rr[Uo]=rr[sl]=rr[w]=rr[pt]=rr[Bn]=rr[gr]=rr[r0]=rr[Ci]=rr[yo]=rr[Ss]=rr[Cs]=rr[Ti]=rr[Fu]=!0,rr[Jt]=rr[Yt]=rr[Mu]=!1;var Go={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},Gu={"&":"&","<":"<",">":">",'"':""","'":"'"},yl={"&":"&","<":"<",">":">",""":'"',"'":"'"},cu={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Bs=parseFloat,Vu=parseInt,M0=typeof global=="object"&&global&&global.Object===Object&&global,au=typeof self=="object"&&self&&self.Object===Object&&self,Lr=M0||au||Function("return this")(),F=typeof ga=="object"&&ga&&!ga.nodeType&&ga,R=F&&typeof e2=="object"&&e2&&!e2.nodeType&&e2,U=R&&R.exports===F,H=U&&M0.process,fe=function(){try{var ae=R&&R.require&&R.require("util").types;return ae||H&&H.binding&&H.binding("util")}catch(Be){}}(),ue=fe&&fe.isArrayBuffer,de=fe&&fe.isDate,W=fe&&fe.isMap,ve=fe&&fe.isRegExp,Fe=fe&&fe.isSet,Ge=fe&&fe.isTypedArray;function K(ae,Be,Ie){switch(Ie.length){case 0:return ae.call(Be);case 1:return ae.call(Be,Ie[0]);case 2:return ae.call(Be,Ie[0],Ie[1]);case 3:return ae.call(Be,Ie[0],Ie[1],Ie[2])}return ae.apply(Be,Ie)}function xe(ae,Be,Ie,ht){for(var mt=-1,wn=ae==null?0:ae.length;++mt-1}function wt(ae,Be,Ie){for(var ht=-1,mt=ae==null?0:ae.length;++ht-1;);return Ie}function js(ae,Be){for(var Ie=ae.length;Ie--&&Qe(Be,ae[Ie],0)>-1;);return Ie}function Dl(ae,Be){for(var Ie=ae.length,ht=0;Ie--;)ae[Ie]===Be&&++ht;return ht}var du=Cn(Go),Yu=Cn(Gu);function Us(ae){return"\\"+cu[ae]}function oo(ae,Be){return ae==null?i:ae[Be]}function Hi(ae){return bo.test(ae)}function qs(ae){return P0.test(ae)}function F0(ae){for(var Be,Ie=[];!(Be=ae.next()).done;)Ie.push(Be.value);return Ie}function Gr(ae){var Be=-1,Ie=Array(ae.size);return ae.forEach(function(ht,mt){Ie[++Be]=[mt,ht]}),Ie}function ir(ae,Be){return function(Ie){return ae(Be(Ie))}}function L0(ae,Be){for(var Ie=-1,ht=ae.length,mt=0,wn=[];++Ie-1}function Ju(a,p){var E=this.__data__,I=hf(E,a);return I<0?(++this.size,E.push([a,p])):E[I][1]=p,this}Z0.prototype.clear=df,Z0.prototype.delete=Ba,Z0.prototype.get=Oc,Z0.prototype.has=mu,Z0.prototype.set=Ju;function ei(a){var p=-1,E=a==null?0:a.length;for(this.clear();++p=p?a:p)),a}function vi(a,p,E,I,B,G){var te,se=p&D,Ee=p&L,$e=p&N;if(E&&(te=B?E(a,I,B,G):E(a)),te!==i)return te;if(!Jr(a))return a;var Ke=On(a);if(Ke){if(te=f1(a),!se)return Xr(a,te)}else{var nt=U0(a),Ct=nt==Yt||nt==cr;if(Eu(a))return Od(a,se);if(nt==Bn||nt==at||Ct&&!B){if(te=Ee||Ct?{}:zd(a),!se)return Ee?Zu(a,Wa(te,a)):j0(a,mf(te,a))}else{if(!rr[nt])return B?a:{};te=Wd(a,nt,se)}}G||(G=new co);var Gt=G.get(a);if(Gt)return Gt;G.set(a,te),kp(a)?a.forEach(function(dn){te.add(vi(dn,p,E,dn,a,G))}):Tp(a)&&a.forEach(function(dn,Yn){te.set(Yn,vi(dn,p,E,Yn,a,G))});var an=$e?Ee?Dn:r1:Ee?Yi:q0,qn=Ke?i:an(a);return je(qn||a,function(dn,Yn){qn&&(Yn=dn,dn=a[Yn]),xl(te,Yn,vi(dn,p,E,Yn,a,G))}),te}function Xf(a){var p=q0(a);return function(E){return Rc(E,a,p)}}function Rc(a,p,E){var I=E.length;if(a==null)return!I;for(a=$t(a);I--;){var B=E[I],G=p[B],te=a[B];if(te===i&&!(B in a)||!G(te))return!1}return!0}function Jf(a,p,E){if(typeof a!="function")throw new Yr(g);return wf(function(){a.apply(i,E)},p)}function ao(a,p,E,I){var B=-1,G=xt,te=!0,se=a.length,Ee=[],$e=p.length;if(!se)return Ee;E&&(p=lt(p,qr(E))),I?(G=wt,te=!1):p.length>=f&&(G=So,te=!1,p=new vu(p));e:for(;++BB?0:B+E),I=I===i||I>B?B:jn(I),I<0&&(I+=B),I=E>I?0:Ip(I);E0&&E(se)?p>1?k0(se,p-1,E,I,B):Rt(B,se):I||(B[B.length]=se)}return B}var v=ec(),m=ec(!0);function S(a,p){return a&&v(a,p,q0)}function O(a,p){return a&&m(a,p,q0)}function M(a,p){return st(p,function(E){return rs(a[E])})}function b(a,p){p=Gs(p,a);for(var E=0,I=p.length;a!=null&&Ep}function ut(a,p){return a!=null&&or.call(a,p)}function In(a,p){return a!=null&&p in $t(a)}function A0(a,p,E){return a>=kn(p,E)&&a=120&&Ke.length>=120)?new vu(te&&Ke):i}Ke=a[0];var nt=-1,Ct=se[0];e:for(;++nt-1;)se!==a&&C0.call(se,Ee,1),C0.call(a,Ee,1);return a}function jc(a,p){for(var E=a?p.length:0,I=E-1;E--;){var B=p[E];if(E==I||B!==G){var G=B;es(B)?C0.call(a,B,1):$a(a,B)}}return a}function Ga(a,p){return a+hu(Ai()*(p-a+1))}function Lm(a,p,E,I){for(var B=-1,G=wr(B0((p-a)/(E||1)),0),te=Ie(G);G--;)te[I?G:++B]=a,a+=E;return te}function Va(a,p){var E="";if(!a||p<1||p>Nt)return E;do p%2&&(E+=a),p=hu(p/2),p&&(a+=a);while(p);return E}function Wn(a,p){return m1(Gd(a,p,$i),a+"")}function wd(a){return Fc(Ef(a))}function Dd(a,p){var E=Ef(a);return Yc(E,mi(p,0,E.length))}function Ol(a,p,E,I){if(!Jr(a))return a;p=Gs(p,a);for(var B=-1,G=p.length,te=G-1,se=a;se!=null&&++BB?0:B+p),E=E>B?B:E,E<0&&(E+=B),B=p>E?0:E-p>>>0,p>>>=0;for(var G=Ie(B);++I>>1,te=a[G];te!==null&&!mo(te)&&(E?te<=p:te=f){var $e=p?null:bm(a);if($e)return Y0($e);te=!1,B=So,Ee=new vu}else Ee=p?[]:se;e:for(;++I=I?a:Oo(a,p,E)}var Ad=pu||function(a){return Lr.clearTimeout(a)};function Od(a,p){if(p)return a.slice();var E=a.length,I=Nr?Nr(E):new a.constructor(E);return a.copy(I),I}function Qa(a){var p=new a.constructor(a.byteLength);return new R0(p).set(new R0(a)),p}function jm(a,p){var E=p?Qa(a.buffer):a.buffer;return new a.constructor(E,a.byteOffset,a.byteLength)}function Um(a){var p=new a.constructor(a.source,uu.exec(a));return p.lastIndex=a.lastIndex,p}function qm(a){return Wr?$t(Wr.call(a)):{}}function Id(a,p){var E=p?Qa(a.buffer):a.buffer;return new a.constructor(E,a.byteOffset,a.length)}function Pd(a,p){if(a!==p){var E=a!==i,I=a===null,B=a===a,G=mo(a),te=p!==i,se=p===null,Ee=p===p,$e=mo(p);if(!se&&!$e&&!G&&a>p||G&&te&&Ee&&!se&&!$e||I&&te&&Ee||!E&&Ee||!B)return 1;if(!I&&!G&&!$e&&a=se)return Ee;var $e=E[I];return Ee*($e=="desc"?-1:1)}}return a.index-p.index}function gf(a,p,E,I){for(var B=-1,G=a.length,te=E.length,se=-1,Ee=p.length,$e=wr(G-te,0),Ke=Ie(Ee+$e),nt=!I;++se1?E[B-1]:i,te=B>2?E[2]:i;for(G=a.length>3&&typeof G=="function"?(B--,G):i,te&&Ii(E[0],E[1],te)&&(G=B<3?i:G,B=1),p=$t(p);++I-1?B[G?p[te]:te]:i}}function Rd(a){return yu(function(p){var E=p.length,I=E,B=Qn.prototype.thru;for(a&&p.reverse();I--;){var G=p[I];if(typeof G!="function")throw new Yr(g);if(B&&!te&&Gc(G)=="wrapper")var te=new Qn([],!0)}for(I=te?I:E;++I1&&er.reverse(),Ke&&Eese))return!1;var $e=G.get(a),Ke=G.get(p);if($e&&Ke)return $e==p&&Ke==a;var nt=-1,Ct=!0,Gt=E&$?new vu:i;for(G.set(a,p),G.set(p,a);++nt1?"& ":"")+p[I],p=p.join(E>2?", ":" "),a.replace(b0,`{ -/* [wrapped with `+p+`] */ -`)}function Xm(a){return On(a)||Ll(a)||!!(di&&a&&a[di])}function es(a,p){var E=typeof a;return p=p==null?Nt:p,!!p&&(E=="number"||E!="symbol"&&uf.test(a))&&a>-1&&a%1==0&&a0){if(++p>=ot)return arguments[0]}else p=0;return a.apply(i,arguments)}}function Yc(a,p){var E=-1,I=a.length,B=I-1;for(p=p===i?I:p;++E1?a[p-1]:i;return E=typeof E=="function"?(a.pop(),E):i,sp(a,E)});function fp(a){var p=z(a);return p.__chain__=!0,p}function cp(a,p){return p(a),a}function Kc(a,p){return p(a)}var Wv=yu(function(a){var p=a.length,E=p?a[0]:0,I=this.__wrapped__,B=function(G){return Hs(G,a)};return p>1||this.__actions__.length||!(I instanceof nn)||!es(E)?this.thru(B):(I=I.slice(E,+E+(p?1:0)),I.__actions__.push({func:Kc,args:[B],thisArg:i}),new Qn(I,this.__chain__).thru(function(G){return p&&!G.length&&G.push(i),G}))});function Hv(){return fp(this)}function bv(){return new Qn(this.value(),this.__chain__)}function Gv(){this.__values__===i&&(this.__values__=Op(this.value()));var a=this.__index__>=this.__values__.length,p=a?i:this.__values__[this.__index__++];return{done:a,value:p}}function Vv(){return this}function Yv(a){for(var p,E=this;E instanceof Or;){var I=Jd(E);I.__index__=0,I.__values__=i,p?B.__wrapped__=I:p=I;var B=I;E=E.__wrapped__}return B.__wrapped__=a,p}function Ml(){var a=this.__wrapped__;if(a instanceof nn){var p=a;return this.__actions__.length&&(p=new nn(this)),p=p.reverse(),p.__actions__.push({func:Kc,args:[g1],thisArg:i}),new Qn(p,this.__chain__)}return this.thru(g1)}function Fl(){return xd(this.__wrapped__,this.__actions__)}var Xc=_f(function(a,p,E){or.call(a,E)?++a[E]:ti(a,E,1)});function $v(a,p,E){var I=On(a)?rt:Nc;return E&&Ii(a,p,E)&&(p=i),I(a,cn(p,3))}function Kv(a,p){var E=On(a)?st:Qf;return E(a,cn(p,3))}var Xv=Ld(Qd),D1=Ld($c);function Jv(a,p){return k0(Jc(a,p),1)}function Qv(a,p){return k0(Jc(a,p),Ot)}function ap(a,p,E){return E=E===i?1:jn(E),k0(Jc(a,p),E)}function dp(a,p){var E=On(a)?je:$o;return E(a,cn(p,3))}function pp(a,p){var E=On(a)?Xe:kl;return E(a,cn(p,3))}var Zv=_f(function(a,p,E){or.call(a,E)?a[E].push(p):ti(a,E,[p])});function eg(a,p,E,I){a=Vi(a)?a:Ef(a),E=E&&!I?jn(E):0;var B=a.length;return E<0&&(E=wr(B+E,0)),ia(a)?E<=B&&a.indexOf(p,E)>-1:!!B&&Qe(a,p,E)>-1}var tg=Wn(function(a,p,E){var I=-1,B=typeof p=="function",G=Vi(a)?Ie(a.length):[];return $o(a,function(te){G[++I]=B?K(p,te,E):po(te,p,E)}),G}),hp=_f(function(a,p,E){ti(a,E,p)});function Jc(a,p){var E=On(a)?lt:vd;return E(a,cn(p,3))}function ng(a,p,E,I){return a==null?[]:(On(p)||(p=p==null?[]:[p]),E=I?i:E,On(E)||(E=E==null?[]:[E]),Oi(a,p,E))}var rg=_f(function(a,p,E){a[E?0:1].push(p)},function(){return[[],[]]});function mp(a,p,E){var I=On(a)?yn:bn,B=arguments.length<3;return I(a,cn(p,4),E,B,$o)}function ig(a,p,E){var I=On(a)?sn:bn,B=arguments.length<3;return I(a,cn(p,4),E,B,kl)}function og(a,p){var E=On(a)?st:Qf;return E(a,Zc(cn(p,3)))}function ug(a){var p=On(a)?Fc:wd;return p(a)}function sg(a,p,E){(E?Ii(a,p,E):p===i)?p=1:p=jn(p);var I=On(a)?Lc:Dd;return I(a,p)}function lg(a){var p=On(a)?Kf:Ao;return p(a)}function E1(a){if(a==null)return 0;if(Vi(a))return ia(a)?Rr(a):a.length;var p=U0(a);return p==w||p==r0?a.size:Zf(a).length}function fg(a,p,E){var I=On(a)?ar:Nm;return E&&Ii(a,p,E)&&(p=i),I(a,cn(p,3))}var cg=Wn(function(a,p){if(a==null)return[];var E=p.length;return E>1&&Ii(a,p[0],p[1])?p=[]:E>2&&Ii(p[0],p[1],p[2])&&(p=[p[0]]),Oi(a,k0(p,1),[])}),rc=Sl||function(){return Lr.Date.now()};function ag(a,p){if(typeof p!="function")throw new Yr(g);return a=jn(a),function(){if(--a<1)return p.apply(this,arguments)}}function vp(a,p,E){return p=E?i:p,p=a&&p==null?a.length:p,Lt(a,De,i,i,i,i,p)}function gp(a,p){var E;if(typeof p!="function")throw new Yr(g);return a=jn(a),function(){return--a>0&&(E=p.apply(this,arguments)),a<=1&&(p=i),E}}var S1=Wn(function(a,p,E){var I=h;if(E.length){var B=L0(E,An(S1));I|=Se}return Lt(a,I,p,E,B)}),_p=Wn(function(a,p,E){var I=h|re;if(E.length){var B=L0(E,An(_p));I|=Se}return Lt(p,I,a,E,B)});function C1(a,p,E){p=E?i:p;var I=Lt(a,Q,i,i,i,i,i,p);return I.placeholder=C1.placeholder,I}function yp(a,p,E){p=E?i:p;var I=Lt(a,oe,i,i,i,i,i,p);return I.placeholder=yp.placeholder,I}function wp(a,p,E){var I,B,G,te,se,Ee,$e=0,Ke=!1,nt=!1,Ct=!0;if(typeof a!="function")throw new Yr(g);p=Fo(p)||0,Jr(E)&&(Ke=!!E.leading,nt="maxWait"in E,G=nt?wr(Fo(E.maxWait)||0,p):G,Ct="trailing"in E?!!E.trailing:Ct);function Gt(f0){var Jo=I,Su=B;return I=B=i,$e=f0,te=a.apply(Su,Jo),te}function an(f0){return $e=f0,se=wf(Yn,p),Ke?Gt(f0):te}function qn(f0){var Jo=f0-Ee,Su=f0-$e,Zp=p-Jo;return nt?kn(Zp,G-Su):Zp}function dn(f0){var Jo=f0-Ee,Su=f0-$e;return Ee===i||Jo>=p||Jo<0||nt&&Su>=G}function Yn(){var f0=rc();if(dn(f0))return er(f0);se=wf(Yn,qn(f0))}function er(f0){return se=i,Ct&&I?Gt(f0):(I=B=i,te)}function vo(){se!==i&&Ad(se),$e=0,I=Ee=B=se=i}function Pi(){return se===i?te:er(rc())}function Mi(){var f0=rc(),Jo=dn(f0);if(I=arguments,B=this,Ee=f0,Jo){if(se===i)return an(Ee);if(nt)return Ad(se),se=wf(Yn,p),Gt(Ee)}return se===i&&(se=wf(Yn,p)),te}return Mi.cancel=vo,Mi.flush=Pi,Mi}var dg=Wn(function(a,p){return Jf(a,1,p)}),Dp=Wn(function(a,p,E){return Jf(a,Fo(p)||0,E)});function pg(a){return Lt(a,Te)}function Qc(a,p){if(typeof a!="function"||p!=null&&typeof p!="function")throw new Yr(g);var E=function(){var I=arguments,B=p?p.apply(this,I):I[0],G=E.cache;if(G.has(B))return G.get(B);var te=a.apply(this,I);return E.cache=G.set(B,te)||G,te};return E.cache=new(Qc.Cache||ei),E}Qc.Cache=ei;function Zc(a){if(typeof a!="function")throw new Yr(g);return function(){var p=arguments;switch(p.length){case 0:return!a.call(this);case 1:return!a.call(this,p[0]);case 2:return!a.call(this,p[0],p[1]);case 3:return!a.call(this,p[0],p[1],p[2])}return!a.apply(this,p)}}function ea(a){return gp(2,a)}var hg=Bm(function(a,p){p=p.length==1&&On(p[0])?lt(p[0],qr(cn())):lt(k0(p,1),qr(cn()));var E=p.length;return Wn(function(I){for(var B=-1,G=kn(I.length,E);++B=p}),Ll=_i(function(){return arguments}())?_i:function(a){return n0(a)&&or.call(a,"callee")&&!N0.call(a,"callee")},On=Ie.isArray,x1=ue?qr(ue):Re;function Vi(a){return a!=null&&na(a.length)&&!rs(a)}function l0(a){return n0(a)&&Vi(a)}function kg(a){return a===!0||a===!1||n0(a)&&Ye(a)==jt}var Eu=pi||W1,Ag=de?qr(de):Ce;function Og(a){return n0(a)&&a.nodeType===1&&!ic(a)}function Cp(a){if(a==null)return!0;if(Vi(a)&&(On(a)||typeof a=="string"||typeof a.splice=="function"||Eu(a)||Df(a)||Ll(a)))return!a.length;var p=U0(a);if(p==w||p==r0)return!a.size;if(nc(a))return!Zf(a).length;for(var E in a)if(or.call(a,E))return!1;return!0}function Ig(a,p){return ze(a,p)}function Pg(a,p,E){E=typeof E=="function"?E:i;var I=E?E(a,p):i;return I===i?ze(a,p,i,E):!!I}function k1(a){if(!n0(a))return!1;var p=Ye(a);return p==Jt||p==Un||typeof a.message=="string"&&typeof a.name=="string"&&!ic(a)}function Mg(a){return typeof a=="number"&&Br(a)}function rs(a){if(!Jr(a))return!1;var p=Ye(a);return p==Yt||p==cr||p==Ft||p==vr}function A1(a){return typeof a=="number"&&a==jn(a)}function na(a){return typeof a=="number"&&a>-1&&a%1==0&&a<=Nt}function Jr(a){var p=typeof a;return a!=null&&(p=="object"||p=="function")}function n0(a){return a!=null&&typeof a=="object"}var Tp=W?qr(W):on;function Fg(a,p){return a===p||sr(a,p,Nn(p))}function Lg(a,p,E){return E=typeof E=="function"?E:i,sr(a,p,Nn(p),E)}function Rg(a){return xp(a)&&a!=+a}function Ng(a){if(Zm(a))throw new mt(c);return mn(a)}function Bg(a){return a===null}function O1(a){return a==null}function xp(a){return typeof a=="number"||n0(a)&&Ye(a)==pt}function ic(a){if(!n0(a)||Ye(a)!=Bn)return!1;var p=uo(a);if(p===null)return!0;var E=or.call(p,"constructor")&&p.constructor;return typeof E=="function"&&E instanceof E&&bi.call(E)==af}var ra=ve?qr(ve):pr;function jg(a){return A1(a)&&a>=-Nt&&a<=Nt}var kp=Fe?qr(Fe):Hr;function ia(a){return typeof a=="string"||!On(a)&&n0(a)&&Ye(a)==Ci}function mo(a){return typeof a=="symbol"||n0(a)&&Ye(a)==yo}var Df=Ge?qr(Ge):Vn;function Ap(a){return a===i}function Ug(a){return n0(a)&&U0(a)==Mu}function qg(a){return n0(a)&&Ye(a)==Gf}var zg=bc(Ha),Wg=bc(function(a,p){return a<=p});function Op(a){if(!a)return[];if(Vi(a))return ia(a)?Jn(a):Xr(a);if(u0&&a[u0])return F0(a[u0]());var p=U0(a),E=p==w?Gr:p==r0?Y0:Ef;return E(a)}function is(a){if(!a)return a===0?a:0;if(a=Fo(a),a===Ot||a===-Ot){var p=a<0?-1:1;return p*Je}return a===a?a:0}function jn(a){var p=is(a),E=p%1;return p===p?E?p-E:p:0}function Ip(a){return a?mi(jn(a),0,ne):0}function Fo(a){if(typeof a=="number")return a;if(mo(a))return V;if(Jr(a)){var p=typeof a.valueOf=="function"?a.valueOf():a;a=Jr(p)?p+"":p}if(typeof a!="string")return a===0?a:+a;a=E0(a);var E=zo.test(a);return E||Is.test(a)?Vu(a.slice(2),E?2:8):wo.test(a)?V:+a}function oa(a){return yi(a,Yi(a))}function Hg(a){return a?mi(jn(a),-Nt,Nt):a===0?a:0}function yr(a){return a==null?"":ho(a)}var Pp=Io(function(a,p){if(nc(p)||Vi(p)){yi(p,q0(p),a);return}for(var E in p)or.call(p,E)&&xl(a,E,p[E])}),Mp=Io(function(a,p){yi(p,Yi(p),a)}),ua=Io(function(a,p,E,I){yi(p,Yi(p),a,I)}),bg=Io(function(a,p,E,I){yi(p,q0(p),a,I)}),Gg=yu(Hs);function Vg(a,p){var E=dr(a);return p==null?E:mf(E,p)}var Fp=Wn(function(a,p){a=$t(a);var E=-1,I=p.length,B=I>2?p[2]:i;for(B&&Ii(p[0],p[1],B)&&(I=1);++E1),G}),yi(a,Dn(a),E),I&&(E=vi(E,D|L|N,Gm));for(var B=p.length;B--;)$a(E,p[B]);return E});function l_(a,p){return Bp(a,Zc(cn(p)))}var f_=yu(function(a,p){return a==null?{}:Fm(a,p)});function Bp(a,p){if(a==null)return{};var E=lt(Dn(a),function(I){return[I]});return p=cn(p),yd(a,E,function(I,B){return p(I,B[0])})}function c_(a,p,E){p=Gs(p,a);var I=-1,B=p.length;for(B||(B=1,a=i);++Ip){var I=a;a=p,p=I}if(E||a%1||p%1){var B=Ai();return kn(a+B*(p-a+Bs("1e-"+((B+"").length-1))),p)}return Ga(a,p)}var __=yf(function(a,p,E){return p=p.toLowerCase(),a+(E?Wp(p):p)});function Wp(a){return L1(yr(a).toLowerCase())}function Hp(a){return a=yr(a),a&&a.replace(_n,du).replace(V0,"")}function y_(a,p,E){a=yr(a),p=ho(p);var I=a.length;E=E===i?I:mi(jn(E),0,I);var B=E;return E-=p.length,E>=0&&a.slice(E,B)==p}function M1(a){return a=yr(a),a&&Ac.test(a)?a.replace(Ui,Yu):a}function w_(a){return a=yr(a),a&&Fr.test(a)?a.replace(kr,"\\$&"):a}var D_=yf(function(a,p,E){return a+(E?"-":"")+p.toLowerCase()}),bp=yf(function(a,p,E){return a+(E?" ":"")+p.toLowerCase()}),E_=Fd("toLowerCase");function S_(a,p,E){a=yr(a),p=jn(p);var I=p?Rr(a):0;if(!p||I>=p)return a;var B=(p-I)/2;return Hc(hu(B),E)+a+Hc(B0(B),E)}function C_(a,p,E){a=yr(a),p=jn(p);var I=p?Rr(a):0;return p&&I>>0,E?(a=yr(a),a&&(typeof p=="string"||p!=null&&!ra(p))&&(p=ho(p),!p&&Hi(a))?Vs(Jn(a),0,E):a.split(p,E)):[]}var I_=yf(function(a,p,E){return a+(E?" ":"")+L1(p)});function P_(a,p,E){return a=yr(a),E=E==null?0:mi(jn(E),0,a.length),p=ho(p),a.slice(E,E+p.length)==p}function M_(a,p,E){var I=z.templateSettings;E&&Ii(a,p,E)&&(p=i),a=yr(a),p=ua({},p,I,n1);var B=ua({},p.imports,I.imports,n1),G=q0(B),te=Eo(B,G),se,Ee,$e=0,Ke=p.interpolate||Nu,nt="__p += '",Ct=X0((p.escape||Nu).source+"|"+Ke.source+"|"+(Ke===xs?As:Nu).source+"|"+(p.evaluate||Nu).source+"|$","g"),Gt="//# sourceURL="+(or.call(p,"sourceURL")?(p.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++lf+"]")+` -`;a.replace(Ct,function(dn,Yn,er,vo,Pi,Mi){return er||(er=vo),nt+=a.slice($e,Mi).replace(Wo,Us),Yn&&(se=!0,nt+=`' + -__e(`+Yn+`) + -'`),Pi&&(Ee=!0,nt+=`'; -`+Pi+`; -__p += '`),er&&(nt+=`' + -((__t = (`+er+`)) == null ? '' : __t) + -'`),$e=Mi+dn.length,dn}),nt+=`'; -`;var an=or.call(p,"variable")&&p.variable;if(!an)nt=`with (obj) { -`+nt+` -} -`;else if(Ru.test(an))throw new mt(t);nt=(Ee?nt.replace(ll,""):nt).replace(fl,"$1").replace(cl,"$1;"),nt="function("+(an||"obj")+`) { -`+(an?"":`obj || (obj = {}); -`)+"var __t, __p = ''"+(se?", __e = _.escape":"")+(Ee?`, __j = Array.prototype.join; -function print() { __p += __j.call(arguments, '') } -`:`; -`)+nt+`return __p -}`;var qn=$p(function(){return wn(G,Gt+"return "+nt).apply(i,te)});if(qn.source=nt,k1(qn))throw qn;return qn}function F_(a){return yr(a).toLowerCase()}function L_(a){return yr(a).toUpperCase()}function R_(a,p,E){if(a=yr(a),a&&(E||p===i))return E0(a);if(!a||!(p=ho(p)))return a;var I=Jn(a),B=Jn(p),G=wl(I,B),te=js(I,B)+1;return Vs(I,G,te).join("")}function F1(a,p,E){if(a=yr(a),a&&(E||p===i))return a.slice(0,ai(a)+1);if(!a||!(p=ho(p)))return a;var I=Jn(a),B=js(I,Jn(p))+1;return Vs(I,0,B).join("")}function N_(a,p,E){if(a=yr(a),a&&(E||p===i))return a.replace(si,"");if(!a||!(p=ho(p)))return a;var I=Jn(a),B=wl(I,Jn(p));return Vs(I,B).join("")}function B_(a,p){var E=Oe,I=Le;if(Jr(p)){var B="separator"in p?p.separator:B;E="length"in p?jn(p.length):E,I="omission"in p?ho(p.omission):I}a=yr(a);var G=a.length;if(Hi(a)){var te=Jn(a);G=te.length}if(E>=G)return a;var se=E-Rr(I);if(se<1)return I;var Ee=te?Vs(te,0,se).join(""):a.slice(0,se);if(B===i)return Ee+I;if(te&&(se+=Ee.length-se),ra(B)){if(a.slice(se).search(B)){var $e,Ke=Ee;for(B.global||(B=X0(B.source,yr(uu.exec(B))+"g")),B.lastIndex=0;$e=B.exec(Ke);)var nt=$e.index;Ee=Ee.slice(0,nt===i?se:nt)}}else if(a.indexOf(ho(B),se)!=se){var Ct=Ee.lastIndexOf(B);Ct>-1&&(Ee=Ee.slice(0,Ct))}return Ee+I}function Vp(a){return a=yr(a),a&&Mr.test(a)?a.replace(al,o0):a}var j_=yf(function(a,p,E){return a+(E?" ":"")+p.toUpperCase()}),L1=Fd("toUpperCase");function Yp(a,p,E){return a=yr(a),p=E?i:p,p===i?qs(a)?cf(a):d0(a):a.match(p)||[]}var $p=Wn(function(a,p){try{return K(a,i,p)}catch(E){return k1(E)?E:new mt(E)}}),U_=yu(function(a,p){return je(p,function(E){E=Xo(E),ti(a,E,S1(a[E],a))}),a});function Kp(a){var p=a==null?0:a.length,E=cn();return a=p?lt(a,function(I){if(typeof I[1]!="function")throw new Yr(g);return[E(I[0]),I[1]]}):[],Wn(function(I){for(var B=-1;++BNt)return[];var E=ne,I=kn(a,ne);p=cn(p),a-=ne;for(var B=ci(I,p);++E0||p<0)?new nn(E):(a<0?E=E.takeRight(-a):a&&(E=E.drop(a)),p!==i&&(p=jn(p),E=p<0?E.dropRight(-p):E.take(p-a)),E)},nn.prototype.takeRightWhile=function(a){return this.reverse().takeWhile(a).reverse()},nn.prototype.toArray=function(){return this.take(ne)},S(nn.prototype,function(a,p){var E=/^(?:filter|find|map|reject)|While$/.test(p),I=/^(?:head|last)$/.test(p),B=z[I?"take"+(p=="last"?"Right":""):p],G=I||/^find/.test(p);!B||(z.prototype[p]=function(){var te=this.__wrapped__,se=I?[1]:arguments,Ee=te instanceof nn,$e=se[0],Ke=Ee||On(te),nt=function(Yn){var er=B.apply(z,Rt([Yn],se));return I&&Ct?er[0]:er};Ke&&E&&typeof $e=="function"&&$e.length!=1&&(Ee=Ke=!1);var Ct=this.__chain__,Gt=!!this.__actions__.length,an=G&&!Ct,qn=Ee&&!Gt;if(!G&&Ke){te=qn?te:new nn(this);var dn=a.apply(te,se);return dn.__actions__.push({func:Kc,args:[nt],thisArg:i}),new Qn(dn,Ct)}return an&&qn?a.apply(this,se):(dn=this.thru(nt),an?I?dn.value()[0]:dn.value():dn)})}),je(["pop","push","shift","sort","splice","unshift"],function(a){var p=$r[a],E=/^(?:push|sort|unshift)$/.test(a)?"tap":"thru",I=/^(?:pop|shift)$/.test(a);z.prototype[a]=function(){var B=arguments;if(I&&!this.__chain__){var G=this.value();return p.apply(On(G)?G:[],B)}return this[E](function(te){return p.apply(On(te)?te:[],B)})}}),S(nn.prototype,function(a,p){var E=z[p];if(E){var I=E.name+"";or.call(bt,I)||(bt[I]=[]),bt[I].push({name:p,func:E})}}),bt[zc(i,re).name]=[{name:"wrapper",func:i}],nn.prototype.clone=s0,nn.prototype.reverse=t0,nn.prototype.value=g0,z.prototype.at=Wv,z.prototype.chain=Hv,z.prototype.commit=bv,z.prototype.next=Gv,z.prototype.plant=Yv,z.prototype.reverse=Ml,z.prototype.toJSON=z.prototype.valueOf=z.prototype.value=Fl,z.prototype.first=z.prototype.head,u0&&(z.prototype[u0]=Vv),z},K0=$0();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(Lr._=K0,define(function(){return K0})):R?((R.exports=K0)._=K0,F._=K0):Lr._=K0}).call(ga)});var ay=Me((XH,cy)=>{"use strict";var fr=cy.exports;cy.exports.default=fr;var Pr="[",t2="]",ya="\x07",vh=";",OD=process.env.TERM_PROGRAM==="Apple_Terminal";fr.cursorTo=(i,u)=>{if(typeof i!="number")throw new TypeError("The `x` argument is required");return typeof u!="number"?Pr+(i+1)+"G":Pr+(u+1)+";"+(i+1)+"H"};fr.cursorMove=(i,u)=>{if(typeof i!="number")throw new TypeError("The `x` argument is required");let f="";return i<0?f+=Pr+-i+"D":i>0&&(f+=Pr+i+"C"),u<0?f+=Pr+-u+"A":u>0&&(f+=Pr+u+"B"),f};fr.cursorUp=(i=1)=>Pr+i+"A";fr.cursorDown=(i=1)=>Pr+i+"B";fr.cursorForward=(i=1)=>Pr+i+"C";fr.cursorBackward=(i=1)=>Pr+i+"D";fr.cursorLeft=Pr+"G";fr.cursorSavePosition=OD?"7":Pr+"s";fr.cursorRestorePosition=OD?"8":Pr+"u";fr.cursorGetPosition=Pr+"6n";fr.cursorNextLine=Pr+"E";fr.cursorPrevLine=Pr+"F";fr.cursorHide=Pr+"?25l";fr.cursorShow=Pr+"?25h";fr.eraseLines=i=>{let u="";for(let f=0;f[t2,"8",vh,vh,u,ya,i,t2,"8",vh,vh,ya].join("");fr.image=(i,u={})=>{let f=`${t2}1337;File=inline=1`;return u.width&&(f+=`;width=${u.width}`),u.height&&(f+=`;height=${u.height}`),u.preserveAspectRatio===!1&&(f+=";preserveAspectRatio=0"),f+":"+i.toString("base64")+ya};fr.iTerm={setCwd:(i=process.cwd())=>`${t2}50;CurrentDir=${i}${ya}`,annotation:(i,u={})=>{let f=`${t2}1337;`,c=typeof u.x!="undefined",g=typeof u.y!="undefined";if((c||g)&&!(c&&g&&typeof u.length!="undefined"))throw new Error("`x`, `y` and `length` must be defined when `x` or `y` is defined");return i=i.replace(/\|/g,""),f+=u.isHidden?"AddHiddenAnnotation=":"AddAnnotation=",u.length>0?f+=(c?[i,u.length,u.x,u.y]:[u.length,i]).join("|"):f+=i,f+ya}}});var PD=Me((JH,dy)=>{"use strict";var ID=(i,u)=>{for(let f of Reflect.ownKeys(u))Object.defineProperty(i,f,Object.getOwnPropertyDescriptor(u,f));return i};dy.exports=ID;dy.exports.default=ID});var FD=Me((QH,gh)=>{"use strict";var oN=PD(),_h=new WeakMap,MD=(i,u={})=>{if(typeof i!="function")throw new TypeError("Expected a function");let f,c=!1,g=0,t=i.displayName||i.name||"",C=function(...A){if(_h.set(C,++g),c){if(u.throw===!0)throw new Error(`Function \`${t}\` can only be called once`);return f}return c=!0,f=i.apply(this,A),i=null,f};return oN(C,i),_h.set(C,g),C};gh.exports=MD;gh.exports.default=MD;gh.exports.callCount=i=>{if(!_h.has(i))throw new Error(`The given function \`${i.name}\` is not wrapped by the \`onetime\` package`);return _h.get(i)}});var LD=Me((ZH,yh)=>{yh.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];process.platform!=="win32"&&yh.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&yh.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")});var vy=Me((eb,n2)=>{var uN=require("assert"),r2=LD(),sN=/^win/i.test(process.platform),wh=require("events");typeof wh!="function"&&(wh=wh.EventEmitter);var Bi;process.__signal_exit_emitter__?Bi=process.__signal_exit_emitter__:(Bi=process.__signal_exit_emitter__=new wh,Bi.count=0,Bi.emitted={});Bi.infinite||(Bi.setMaxListeners(Infinity),Bi.infinite=!0);n2.exports=function(i,u){uN.equal(typeof i,"function","a callback must be provided for exit handler"),i2===!1&&RD();var f="exit";u&&u.alwaysLast&&(f="afterexit");var c=function(){Bi.removeListener(f,i),Bi.listeners("exit").length===0&&Bi.listeners("afterexit").length===0&&py()};return Bi.on(f,i),c};n2.exports.unload=py;function py(){!i2||(i2=!1,r2.forEach(function(i){try{process.removeListener(i,hy[i])}catch(u){}}),process.emit=my,process.reallyExit=ND,Bi.count-=1)}function wa(i,u,f){Bi.emitted[i]||(Bi.emitted[i]=!0,Bi.emit(i,u,f))}var hy={};r2.forEach(function(i){hy[i]=function(){var f=process.listeners(i);f.length===Bi.count&&(py(),wa("exit",null,i),wa("afterexit",null,i),sN&&i==="SIGHUP"&&(i="SIGINT"),process.kill(process.pid,i))}});n2.exports.signals=function(){return r2};n2.exports.load=RD;var i2=!1;function RD(){i2||(i2=!0,Bi.count+=1,r2=r2.filter(function(i){try{return process.on(i,hy[i]),!0}catch(u){return!1}}),process.emit=fN,process.reallyExit=lN)}var ND=process.reallyExit;function lN(i){process.exitCode=i||0,wa("exit",process.exitCode,null),wa("afterexit",process.exitCode,null),ND.call(process,process.exitCode)}var my=process.emit;function fN(i,u){if(i==="exit"){u!==void 0&&(process.exitCode=u);var f=my.apply(this,arguments);return wa("exit",process.exitCode,null),wa("afterexit",process.exitCode,null),f}else return my.apply(this,arguments)}});var jD=Me((tb,BD)=>{"use strict";var cN=FD(),aN=vy();BD.exports=cN(()=>{aN(()=>{process.stderr.write("[?25h")},{alwaysLast:!0})})});var gy=Me(Da=>{"use strict";var dN=jD(),Dh=!1;Da.show=(i=process.stderr)=>{!i.isTTY||(Dh=!1,i.write("[?25h"))};Da.hide=(i=process.stderr)=>{!i.isTTY||(dN(),Dh=!0,i.write("[?25l"))};Da.toggle=(i,u)=>{i!==void 0&&(Dh=i),Dh?Da.show(u):Da.hide(u)}});var WD=Me(o2=>{"use strict";var UD=o2&&o2.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(o2,"__esModule",{value:!0});var qD=UD(ay()),zD=UD(gy()),pN=(i,{showCursor:u=!1}={})=>{let f=0,c="",g=!1,t=C=>{!u&&!g&&(zD.default.hide(),g=!0);let A=C+` -`;A!==c&&(c=A,i.write(qD.default.eraseLines(f)+A),f=A.split(` -`).length)};return t.clear=()=>{i.write(qD.default.eraseLines(f)),c="",f=0},t.done=()=>{c="",f=0,u||(zD.default.show(),g=!1)},t};o2.default={create:pN}});var bD=Me((ib,HD)=>{HD.exports=[{name:"AppVeyor",constant:"APPVEYOR",env:"APPVEYOR",pr:"APPVEYOR_PULL_REQUEST_NUMBER"},{name:"Azure Pipelines",constant:"AZURE_PIPELINES",env:"SYSTEM_TEAMFOUNDATIONCOLLECTIONURI",pr:"SYSTEM_PULLREQUEST_PULLREQUESTID"},{name:"Bamboo",constant:"BAMBOO",env:"bamboo_planKey"},{name:"Bitbucket Pipelines",constant:"BITBUCKET",env:"BITBUCKET_COMMIT",pr:"BITBUCKET_PR_ID"},{name:"Bitrise",constant:"BITRISE",env:"BITRISE_IO",pr:"BITRISE_PULL_REQUEST"},{name:"Buddy",constant:"BUDDY",env:"BUDDY_WORKSPACE_ID",pr:"BUDDY_EXECUTION_PULL_REQUEST_ID"},{name:"Buildkite",constant:"BUILDKITE",env:"BUILDKITE",pr:{env:"BUILDKITE_PULL_REQUEST",ne:"false"}},{name:"CircleCI",constant:"CIRCLE",env:"CIRCLECI",pr:"CIRCLE_PULL_REQUEST"},{name:"Cirrus CI",constant:"CIRRUS",env:"CIRRUS_CI",pr:"CIRRUS_PR"},{name:"AWS CodeBuild",constant:"CODEBUILD",env:"CODEBUILD_BUILD_ARN"},{name:"Codeship",constant:"CODESHIP",env:{CI_NAME:"codeship"}},{name:"Drone",constant:"DRONE",env:"DRONE",pr:{DRONE_BUILD_EVENT:"pull_request"}},{name:"dsari",constant:"DSARI",env:"DSARI"},{name:"GitLab CI",constant:"GITLAB",env:"GITLAB_CI"},{name:"GoCD",constant:"GOCD",env:"GO_PIPELINE_LABEL"},{name:"Hudson",constant:"HUDSON",env:"HUDSON_URL"},{name:"Jenkins",constant:"JENKINS",env:["JENKINS_URL","BUILD_ID"],pr:{any:["ghprbPullId","CHANGE_ID"]}},{name:"Magnum CI",constant:"MAGNUM",env:"MAGNUM"},{name:"Netlify CI",constant:"NETLIFY",env:"NETLIFY_BUILD_BASE",pr:{env:"PULL_REQUEST",ne:"false"}},{name:"Sail CI",constant:"SAIL",env:"SAILCI",pr:"SAIL_PULL_REQUEST_NUMBER"},{name:"Semaphore",constant:"SEMAPHORE",env:"SEMAPHORE",pr:"PULL_REQUEST_NUMBER"},{name:"Shippable",constant:"SHIPPABLE",env:"SHIPPABLE",pr:{IS_PULL_REQUEST:"true"}},{name:"Solano CI",constant:"SOLANO",env:"TDDIUM",pr:"TDDIUM_PR_ID"},{name:"Strider CD",constant:"STRIDER",env:"STRIDER"},{name:"TaskCluster",constant:"TASKCLUSTER",env:["TASK_ID","RUN_ID"]},{name:"TeamCity",constant:"TEAMCITY",env:"TEAMCITY_VERSION"},{name:"Travis CI",constant:"TRAVIS",env:"TRAVIS",pr:{env:"TRAVIS_PULL_REQUEST",ne:"false"}}]});var YD=Me(ru=>{"use strict";var GD=bD(),nl=process.env;Object.defineProperty(ru,"_vendors",{value:GD.map(function(i){return i.constant})});ru.name=null;ru.isPR=null;GD.forEach(function(i){var u=Array.isArray(i.env)?i.env:[i.env],f=u.every(function(c){return VD(c)});if(ru[i.constant]=f,f)switch(ru.name=i.name,typeof i.pr){case"string":ru.isPR=!!nl[i.pr];break;case"object":"env"in i.pr?ru.isPR=i.pr.env in nl&&nl[i.pr.env]!==i.pr.ne:"any"in i.pr?ru.isPR=i.pr.any.some(function(c){return!!nl[c]}):ru.isPR=VD(i.pr);break;default:ru.isPR=null}});ru.isCI=!!(nl.CI||nl.CONTINUOUS_INTEGRATION||nl.BUILD_NUMBER||nl.RUN_ID||ru.name);function VD(i){return typeof i=="string"?!!nl[i]:Object.keys(i).every(function(u){return nl[u]===i[u]})}});var KD=Me((ub,$D)=>{"use strict";$D.exports=YD().isCI});var JD=Me((sb,XD)=>{"use strict";var hN=i=>{let u=new Set;do for(let f of Reflect.ownKeys(i))u.add([i,f]);while((i=Reflect.getPrototypeOf(i))&&i!==Object.prototype);return u};XD.exports=(i,{include:u,exclude:f}={})=>{let c=g=>{let t=C=>typeof C=="string"?g===C:C.test(g);return u?u.some(t):f?!f.some(t):!0};for(let[g,t]of hN(i.constructor.prototype)){if(t==="constructor"||!c(t))continue;let C=Reflect.getOwnPropertyDescriptor(g,t);C&&typeof C.value=="function"&&(i[t]=i[t].bind(i))}return i}});var iE=Me(Sr=>{"use strict";Object.defineProperty(Sr,"__esModule",{value:!0});var Ea,u2,Eh,Sh,_y;typeof window=="undefined"||typeof MessageChannel!="function"?(Sa=null,yy=null,wy=function(){if(Sa!==null)try{var i=Sr.unstable_now();Sa(!0,i),Sa=null}catch(u){throw setTimeout(wy,0),u}},QD=Date.now(),Sr.unstable_now=function(){return Date.now()-QD},Ea=function(i){Sa!==null?setTimeout(Ea,0,i):(Sa=i,setTimeout(wy,0))},u2=function(i,u){yy=setTimeout(i,u)},Eh=function(){clearTimeout(yy)},Sh=function(){return!1},_y=Sr.unstable_forceFrameRate=function(){}):(Ch=window.performance,Dy=window.Date,ZD=window.setTimeout,eE=window.clearTimeout,typeof console!="undefined"&&(tE=window.cancelAnimationFrame,typeof window.requestAnimationFrame!="function"&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),typeof tE!="function"&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills")),typeof Ch=="object"&&typeof Ch.now=="function"?Sr.unstable_now=function(){return Ch.now()}:(nE=Dy.now(),Sr.unstable_now=function(){return Dy.now()-nE}),s2=!1,l2=null,Th=-1,Ey=5,Sy=0,Sh=function(){return Sr.unstable_now()>=Sy},_y=function(){},Sr.unstable_forceFrameRate=function(i){0>i||125kh(C,f))x!==void 0&&0>kh(x,C)?(i[c]=x,i[A]=f,c=A):(i[c]=C,i[t]=f,c=t);else if(x!==void 0&&0>kh(x,f))i[c]=x,i[A]=f,c=A;else break e}}return u}return null}function kh(i,u){var f=i.sortIndex-u.sortIndex;return f!==0?f:i.id-u.id}var ds=[],Nf=[],mN=1,_o=null,to=3,Oh=!1,pc=!1,f2=!1;function Ih(i){for(var u=Iu(Nf);u!==null;){if(u.callback===null)Ah(Nf);else if(u.startTime<=i)Ah(Nf),u.sortIndex=u.expirationTime,Ty(ds,u);else break;u=Iu(Nf)}}function xy(i){if(f2=!1,Ih(i),!pc)if(Iu(ds)!==null)pc=!0,Ea(ky);else{var u=Iu(Nf);u!==null&&u2(xy,u.startTime-i)}}function ky(i,u){pc=!1,f2&&(f2=!1,Eh()),Oh=!0;var f=to;try{for(Ih(u),_o=Iu(ds);_o!==null&&(!(_o.expirationTime>u)||i&&!Sh());){var c=_o.callback;if(c!==null){_o.callback=null,to=_o.priorityLevel;var g=c(_o.expirationTime<=u);u=Sr.unstable_now(),typeof g=="function"?_o.callback=g:_o===Iu(ds)&&Ah(ds),Ih(u)}else Ah(ds);_o=Iu(ds)}if(_o!==null)var t=!0;else{var C=Iu(Nf);C!==null&&u2(xy,C.startTime-u),t=!1}return t}finally{_o=null,to=f,Oh=!1}}function rE(i){switch(i){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1e4;default:return 5e3}}var vN=_y;Sr.unstable_ImmediatePriority=1;Sr.unstable_UserBlockingPriority=2;Sr.unstable_NormalPriority=3;Sr.unstable_IdlePriority=5;Sr.unstable_LowPriority=4;Sr.unstable_runWithPriority=function(i,u){switch(i){case 1:case 2:case 3:case 4:case 5:break;default:i=3}var f=to;to=i;try{return u()}finally{to=f}};Sr.unstable_next=function(i){switch(to){case 1:case 2:case 3:var u=3;break;default:u=to}var f=to;to=u;try{return i()}finally{to=f}};Sr.unstable_scheduleCallback=function(i,u,f){var c=Sr.unstable_now();if(typeof f=="object"&&f!==null){var g=f.delay;g=typeof g=="number"&&0c?(i.sortIndex=g,Ty(Nf,i),Iu(ds)===null&&i===Iu(Nf)&&(f2?Eh():f2=!0,u2(xy,g-c))):(i.sortIndex=f,Ty(ds,i),pc||Oh||(pc=!0,Ea(ky))),i};Sr.unstable_cancelCallback=function(i){i.callback=null};Sr.unstable_wrapCallback=function(i){var u=to;return function(){var f=to;to=u;try{return i.apply(this,arguments)}finally{to=f}}};Sr.unstable_getCurrentPriorityLevel=function(){return to};Sr.unstable_shouldYield=function(){var i=Sr.unstable_now();Ih(i);var u=Iu(ds);return u!==_o&&_o!==null&&u!==null&&u.callback!==null&&u.startTime<=i&&u.expirationTime<_o.expirationTime||Sh()};Sr.unstable_requestPaint=vN;Sr.unstable_continueExecution=function(){pc||Oh||(pc=!0,Ea(ky))};Sr.unstable_pauseExecution=function(){};Sr.unstable_getFirstCallbackNode=function(){return Iu(ds)};Sr.unstable_Profiling=null});var Ay=Me((fb,oE)=>{"use strict";oE.exports=iE()});var uE=Me((cb,c2)=>{c2.exports=function i(u){"use strict";var f=ey(),c=lr(),g=Ay();function t(v){for(var m="https://reactjs.org/docs/error-decoder.html?invariant="+v,S=1;Sqo||(v.current=qi[qo],qi[qo]=null,qo--)}function Fr(v,m){qo++,qi[qo]=v.current,v.current=m}var si={},H0={current:si},b0={current:!1},Bt=si;function Lu(v,m){var S=v.type.contextTypes;if(!S)return si;var O=v.stateNode;if(O&&O.__reactInternalMemoizedUnmaskedChildContext===m)return O.__reactInternalMemoizedMaskedChildContext;var M={},b;for(b in S)M[b]=m[b];return O&&(v=v.stateNode,v.__reactInternalMemoizedUnmaskedChildContext=m,v.__reactInternalMemoizedMaskedChildContext=M),M}function c0(v){return v=v.childContextTypes,v!=null}function Ru(v){kr(b0,v),kr(H0,v)}function ks(v){kr(b0,v),kr(H0,v)}function As(v,m,S){if(H0.current!==si)throw Error(t(168));Fr(H0,m,v),Fr(b0,S,v)}function uu(v,m,S){var O=v.stateNode;if(v=m.childContextTypes,typeof O.getChildContext!="function")return S;O=O.getChildContext();for(var M in O)if(!(M in v))throw Error(t(108,Oe(m)||"Unknown",M));return f({},S,{},O)}function wo(v){var m=v.stateNode;return m=m&&m.__reactInternalMemoizedMergedChildContext||si,Bt=H0.current,Fr(H0,m,v),Fr(b0,b0.current,v),!0}function zo(v,m,S){var O=v.stateNode;if(!O)throw Error(t(169));S?(m=uu(v,m,Bt),O.__reactInternalMemoizedMergedChildContext=m,kr(b0,v),kr(H0,v),Fr(H0,m,v)):kr(b0,v),Fr(b0,S,v)}var Os=g.unstable_runWithPriority,Is=g.unstable_scheduleCallback,uf=g.unstable_cancelCallback,_n=g.unstable_shouldYield,Nu=g.unstable_requestPaint,Wo=g.unstable_now,su=g.unstable_getCurrentPriorityLevel,Ps=g.unstable_ImmediatePriority,pl=g.unstable_UserBlockingPriority,Vf=g.unstable_NormalPriority,hl=g.unstable_LowPriority,Bu=g.unstable_IdlePriority,ju={},sf=Nu!==void 0?Nu:function(){},ro=null,Ms=null,ml=!1,Uu=Wo(),G0=1e4>Uu?Wo:function(){return Wo()-Uu};function Fs(){switch(su()){case Ps:return 99;case pl:return 98;case Vf:return 97;case hl:return 96;case Bu:return 95;default:throw Error(t(332))}}function tt(v){switch(v){case 99:return Ps;case 98:return pl;case 97:return Vf;case 96:return hl;case 95:return Bu;default:throw Error(t(332))}}function zi(v,m){return v=tt(v),Os(v,m)}function lu(v,m,S){return v=tt(v),Is(v,m,S)}function Ho(v){return ro===null?(ro=[v],Ms=Is(Ps,vl)):ro.push(v),ju}function O0(){if(Ms!==null){var v=Ms;Ms=null,uf(v)}vl()}function vl(){if(!ml&&ro!==null){ml=!0;var v=0;try{var m=ro;zi(99,function(){for(;v=m&&(ai=!0),v.firstContext=null)}function D0(v,m){if(zu!==v&&m!==!1&&m!==0)if((typeof m!="number"||m===1073741823)&&(zu=v,m=1073741823),m={context:v,observedBits:m,next:null},Wi===null){if(qu===null)throw Error(t(308));Wi=m,qu.dependencies={expirationTime:0,firstContext:m,responders:null}}else Wi=Wi.next=m;return Jt?v._currentValue:v._currentValue2}var Do=!1;function i0(v){return{baseState:v,firstUpdate:null,lastUpdate:null,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function Rs(v){return{baseState:v.baseState,firstUpdate:v.firstUpdate,lastUpdate:v.lastUpdate,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function a0(v,m){return{expirationTime:v,suspenseConfig:m,tag:0,payload:null,callback:null,next:null,nextEffect:null}}function Hu(v,m){v.lastUpdate===null?v.firstUpdate=v.lastUpdate=m:(v.lastUpdate.next=m,v.lastUpdate=m)}function V0(v,m){var S=v.alternate;if(S===null){var O=v.updateQueue,M=null;O===null&&(O=v.updateQueue=i0(v.memoizedState))}else O=v.updateQueue,M=S.updateQueue,O===null?M===null?(O=v.updateQueue=i0(v.memoizedState),M=S.updateQueue=i0(S.memoizedState)):O=v.updateQueue=Rs(M):M===null&&(M=S.updateQueue=Rs(O));M===null||O===M?Hu(O,m):O.lastUpdate===null||M.lastUpdate===null?(Hu(O,m),Hu(M,m)):(Hu(O,m),M.lastUpdate=m)}function bu(v,m){var S=v.updateQueue;S=S===null?v.updateQueue=i0(v.memoizedState):Ns(v,S),S.lastCapturedUpdate===null?S.firstCapturedUpdate=S.lastCapturedUpdate=m:(S.lastCapturedUpdate.next=m,S.lastCapturedUpdate=m)}function Ns(v,m){var S=v.alternate;return S!==null&&m===S.updateQueue&&(m=v.updateQueue=Rs(m)),m}function bo(v,m,S,O,M,b){switch(S.tag){case 1:return v=S.payload,typeof v=="function"?v.call(b,O,M):v;case 3:v.effectTag=v.effectTag&-4097|64;case 0:if(v=S.payload,M=typeof v=="function"?v.call(b,O,M):v,M==null)break;return f({},O,M);case 2:Do=!0}return O}function P0(v,m,S,O,M){Do=!1,m=Ns(v,m);for(var b=m.baseState,ee=null,Ye=0,Ze=m.firstUpdate,ut=b;Ze!==null;){var In=Ze.expirationTime;Inpr?(Hr=mn,mn=null):Hr=mn.sibling;var Vn=jr(Re,mn,ze[pr],Et);if(Vn===null){mn===null&&(mn=Hr);break}v&&mn&&Vn.alternate===null&&m(Re,mn),Ce=b(Vn,Ce,pr),sr===null?on=Vn:sr.sibling=Vn,sr=Vn,mn=Hr}if(pr===ze.length)return S(Re,mn),on;if(mn===null){for(;prpr?(Hr=mn,mn=null):Hr=mn.sibling;var ni=jr(Re,mn,Vn.value,Et);if(ni===null){mn===null&&(mn=Hr);break}v&&mn&&ni.alternate===null&&m(Re,mn),Ce=b(ni,Ce,pr),sr===null?on=ni:sr.sibling=ni,sr=ni,mn=Hr}if(Vn.done)return S(Re,mn),on;if(mn===null){for(;!Vn.done;pr++,Vn=ze.next())Vn=A0(Re,Vn.value,Et),Vn!==null&&(Ce=b(Vn,Ce,pr),sr===null?on=Vn:sr.sibling=Vn,sr=Vn);return on}for(mn=O(Re,mn);!Vn.done;pr++,Vn=ze.next())Vn=gi(mn,Re,pr,Vn.value,Et),Vn!==null&&(v&&Vn.alternate!==null&&mn.delete(Vn.key===null?pr:Vn.key),Ce=b(Vn,Ce,pr),sr===null?on=Vn:sr.sibling=Vn,sr=Vn);return v&&mn.forEach(function(Zf){return m(Re,Zf)}),on}return function(Re,Ce,ze,Et){var on=typeof ze=="object"&&ze!==null&&ze.type===L&&ze.key===null;on&&(ze=ze.props.children);var sr=typeof ze=="object"&&ze!==null;if(sr)switch(ze.$$typeof){case x:e:{for(sr=ze.key,on=Ce;on!==null;){if(on.key===sr)if(on.tag===7?ze.type===L:on.elementType===ze.type){S(Re,on.sibling),Ce=M(on,ze.type===L?ze.props.children:ze.props,Et),Ce.ref=au(Re,on,ze),Ce.return=Re,Re=Ce;break e}else{S(Re,on);break}else m(Re,on);on=on.sibling}ze.type===L?(Ce=mi(ze.props.children,Re.mode,Et,ze.key),Ce.return=Re,Re=Ce):(Et=Hs(ze.type,ze.key,ze.props,null,Re.mode,Et),Et.ref=au(Re,Ce,ze),Et.return=Re,Re=Et)}return ee(Re);case D:e:{for(on=ze.key;Ce!==null;){if(Ce.key===on)if(Ce.tag===4&&Ce.stateNode.containerInfo===ze.containerInfo&&Ce.stateNode.implementation===ze.implementation){S(Re,Ce.sibling),Ce=M(Ce,ze.children||[],Et),Ce.return=Re,Re=Ce;break e}else{S(Re,Ce);break}else m(Re,Ce);Ce=Ce.sibling}Ce=Xf(ze,Re.mode,Et),Ce.return=Re,Re=Ce}return ee(Re)}if(typeof ze=="string"||typeof ze=="number")return ze=""+ze,Ce!==null&&Ce.tag===6?(S(Re,Ce.sibling),Ce=M(Ce,ze,Et),Ce.return=Re,Re=Ce):(S(Re,Ce),Ce=vi(ze,Re.mode,Et),Ce.return=Re,Re=Ce),ee(Re);if(M0(ze))return po(Re,Ce,ze,Et);if(J(ze))return _i(Re,Ce,ze,Et);if(sr&&Lr(Re,ze),typeof ze=="undefined"&&!on)switch(Re.tag){case 1:case 0:throw Re=Re.type,Error(t(152,Re.displayName||Re.name||"Component"))}return S(Re,Ce)}}var R=F(!0),U=F(!1),H={},fe={current:H},ue={current:H},de={current:H};function W(v){if(v===H)throw Error(t(174));return v}function ve(v,m){Fr(de,m,v),Fr(ue,v,v),Fr(fe,H,v),m=Ot(m),kr(fe,v),Fr(fe,m,v)}function Fe(v){kr(fe,v),kr(ue,v),kr(de,v)}function Ge(v){var m=W(de.current),S=W(fe.current);m=Nt(S,v.type,m),S!==m&&(Fr(ue,v,v),Fr(fe,m,v))}function K(v){ue.current===v&&(kr(fe,v),kr(ue,v))}var xe={current:0};function je(v){for(var m=v;m!==null;){if(m.tag===13){var S=m.memoizedState;if(S!==null&&(S=S.dehydrated,S===null||ll(S)||fl(S)))return m}else if(m.tag===19&&m.memoizedProps.revealOrder!==void 0){if((m.effectTag&64)!=0)return m}else if(m.child!==null){m.child.return=m,m=m.child;continue}if(m===v)break;for(;m.sibling===null;){if(m.return===null||m.return===v)return null;m=m.return}m.sibling.return=m.return,m=m.sibling}return null}function Xe(v,m){return{responder:v,props:m}}var rt=C.ReactCurrentDispatcher,st=C.ReactCurrentBatchConfig,xt=0,wt=null,lt=null,Rt=null,yn=null,sn=null,ar=null,rn=0,Hn=null,d0=0,Cr=!1,He=null,Qe=0;function Ne(){throw Error(t(321))}function ft(v,m){if(m===null)return!1;for(var S=0;Srn&&(rn=In,pf(rn))):(Yf(In,Ze.suspenseConfig),b=Ze.eagerReducer===v?Ze.eagerState:v(b,Ze.action)),ee=Ze,Ze=Ze.next}while(Ze!==null&&Ze!==O);ut||(Ye=ee,M=b),Sn(b,m.memoizedState)||(ai=!0),m.memoizedState=b,m.baseUpdate=Ye,m.baseState=M,S.lastRenderedState=b}return[m.memoizedState,S.dispatch]}function ci(v){var m=Cn();return typeof v=="function"&&(v=v()),m.memoizedState=m.baseState=v,v=m.queue={last:null,dispatch:null,lastRenderedReducer:p0,lastRenderedState:v},v=v.dispatch=Us.bind(null,wt,v),[m.memoizedState,v]}function xi(v){return h0(p0,v)}function E0(v,m,S,O){return v={tag:v,create:m,destroy:S,deps:O,next:null},Hn===null?(Hn={lastEffect:null},Hn.lastEffect=v.next=v):(m=Hn.lastEffect,m===null?Hn.lastEffect=v.next=v:(S=m.next,m.next=v,v.next=S,Hn.lastEffect=v)),v}function qr(v,m,S,O){var M=Cn();d0|=v,M.memoizedState=E0(m,S,void 0,O===void 0?null:O)}function Eo(v,m,S,O){var M=bn();O=O===void 0?null:O;var b=void 0;if(lt!==null){var ee=lt.memoizedState;if(b=ee.destroy,O!==null&&ft(O,ee.deps)){E0(0,S,b,O);return}}d0|=v,M.memoizedState=E0(m,S,b,O)}function So(v,m){return qr(516,192,v,m)}function wl(v,m){return Eo(516,192,v,m)}function js(v,m){if(typeof m=="function")return v=v(),m(v),function(){m(null)};if(m!=null)return v=v(),m.current=v,function(){m.current=null}}function Dl(){}function du(v,m){return Cn().memoizedState=[v,m===void 0?null:m],v}function Yu(v,m){var S=bn();m=m===void 0?null:m;var O=S.memoizedState;return O!==null&&m!==null&&ft(m,O[1])?O[0]:(S.memoizedState=[v,m],v)}function Us(v,m,S){if(!(25>Qe))throw Error(t(301));var O=v.alternate;if(v===wt||O!==null&&O===wt)if(Cr=!0,v={expirationTime:xt,suspenseConfig:null,action:S,eagerReducer:null,eagerState:null,next:null},He===null&&(He=new Map),S=He.get(m),S===void 0)He.set(m,v);else{for(m=S;m.next!==null;)m=m.next;m.next=v}else{var M=g0(),b=nr.suspense;M=Kr(M,v,b),b={expirationTime:M,suspenseConfig:b,action:S,eagerReducer:null,eagerState:null,next:null};var ee=m.last;if(ee===null)b.next=b;else{var Ye=ee.next;Ye!==null&&(b.next=Ye),ee.next=b}if(m.last=b,v.expirationTime===0&&(O===null||O.expirationTime===0)&&(O=m.lastRenderedReducer,O!==null))try{var Ze=m.lastRenderedState,ut=O(Ze,S);if(b.eagerReducer=O,b.eagerState=ut,Sn(ut,Ze))return}catch(In){}finally{}_0(v,M)}}var oo={readContext:D0,useCallback:Ne,useContext:Ne,useEffect:Ne,useImperativeHandle:Ne,useLayoutEffect:Ne,useMemo:Ne,useReducer:Ne,useRef:Ne,useState:Ne,useDebugValue:Ne,useResponder:Ne,useDeferredValue:Ne,useTransition:Ne},Hi={readContext:D0,useCallback:du,useContext:D0,useEffect:So,useImperativeHandle:function(v,m,S){return S=S!=null?S.concat([v]):null,qr(4,36,js.bind(null,m,v),S)},useLayoutEffect:function(v,m){return qr(4,36,v,m)},useMemo:function(v,m){var S=Cn();return m=m===void 0?null:m,v=v(),S.memoizedState=[v,m],v},useReducer:function(v,m,S){var O=Cn();return m=S!==void 0?S(m):m,O.memoizedState=O.baseState=m,v=O.queue={last:null,dispatch:null,lastRenderedReducer:v,lastRenderedState:m},v=v.dispatch=Us.bind(null,wt,v),[O.memoizedState,v]},useRef:function(v){var m=Cn();return v={current:v},m.memoizedState=v},useState:ci,useDebugValue:Dl,useResponder:Xe,useDeferredValue:function(v,m){var S=ci(v),O=S[0],M=S[1];return So(function(){g.unstable_next(function(){var b=st.suspense;st.suspense=m===void 0?null:m;try{M(v)}finally{st.suspense=b}})},[v,m]),O},useTransition:function(v){var m=ci(!1),S=m[0],O=m[1];return[du(function(M){O(!0),g.unstable_next(function(){var b=st.suspense;st.suspense=v===void 0?null:v;try{O(!1),M()}finally{st.suspense=b}})},[v,S]),S]}},qs={readContext:D0,useCallback:Yu,useContext:D0,useEffect:wl,useImperativeHandle:function(v,m,S){return S=S!=null?S.concat([v]):null,Eo(4,36,js.bind(null,m,v),S)},useLayoutEffect:function(v,m){return Eo(4,36,v,m)},useMemo:function(v,m){var S=bn();m=m===void 0?null:m;var O=S.memoizedState;return O!==null&&m!==null&&ft(m,O[1])?O[0]:(v=v(),S.memoizedState=[v,m],v)},useReducer:h0,useRef:function(){return bn().memoizedState},useState:xi,useDebugValue:Dl,useResponder:Xe,useDeferredValue:function(v,m){var S=xi(v),O=S[0],M=S[1];return wl(function(){g.unstable_next(function(){var b=st.suspense;st.suspense=m===void 0?null:m;try{M(v)}finally{st.suspense=b}})},[v,m]),O},useTransition:function(v){var m=xi(!1),S=m[0],O=m[1];return[Yu(function(M){O(!0),g.unstable_next(function(){var b=st.suspense;st.suspense=v===void 0?null:v;try{O(!1),M()}finally{st.suspense=b}})},[v,S]),S]}},F0=null,Gr=null,ir=!1;function L0(v,m){var S=xo(5,null,null,0);S.elementType="DELETED",S.type="DELETED",S.stateNode=m,S.return=v,S.effectTag=8,v.lastEffect!==null?(v.lastEffect.nextEffect=S,v.lastEffect=S):v.firstEffect=v.lastEffect=S}function Y0(v,m){switch(v.tag){case 5:return m=Ti(m,v.type,v.pendingProps),m!==null?(v.stateNode=m,!0):!1;case 6:return m=Fu(m,v.pendingProps),m!==null?(v.stateNode=m,!0):!1;case 13:return!1;default:return!1}}function Co(v){if(ir){var m=Gr;if(m){var S=m;if(!Y0(v,m)){if(m=cl(S),!m||!Y0(v,m)){v.effectTag=v.effectTag&-1025|2,ir=!1,F0=v;return}L0(F0,S)}F0=v,Gr=al(m)}else v.effectTag=v.effectTag&-1025|2,ir=!1,F0=v}}function $u(v){for(v=v.return;v!==null&&v.tag!==5&&v.tag!==3&&v.tag!==13;)v=v.return;F0=v}function Vo(v){if(!w||v!==F0)return!1;if(!ir)return $u(v),ir=!0,!1;var m=v.type;if(v.tag!==5||m!=="head"&&m!=="body"&&!at(m,v.memoizedProps))for(m=Gr;m;)L0(v,m),m=cl(m);if($u(v),v.tag===13){if(!w)throw Error(t(316));if(v=v.memoizedState,v=v!==null?v.dehydrated:null,!v)throw Error(t(317));Gr=Ac(v)}else Gr=F0?cl(v.stateNode):null;return!0}function Rr(){w&&(Gr=F0=null,ir=!1)}var Jn=C.ReactCurrentOwner,ai=!1;function o0(v,m,S,O){m.child=v===null?U(m,null,S,O):R(m,v.child,S,O)}function Vr(v,m,S,O,M){S=S.render;var b=m.ref;return io(m,M),O=St(v,m,S,O,b,M),v!==null&&!ai?(m.updateQueue=v.updateQueue,m.effectTag&=-517,v.expirationTime<=M&&(v.expirationTime=0),X0(v,m,M)):(m.effectTag|=1,o0(v,m,O,M),m.child)}function ff(v,m,S,O,M,b){if(v===null){var ee=S.type;return typeof ee=="function"&&!mf(ee)&&ee.defaultProps===void 0&&S.compare===null&&S.defaultProps===void 0?(m.tag=15,m.type=ee,cf(v,m,ee,O,M,b)):(v=Hs(S.type,null,O,null,m.mode,b),v.ref=m.ref,v.return=m,m.child=v)}return ee=v.child,Mm)&&Qn.set(v,m)))}}function Gi(v,m){v.expirationTimev?m:v)}function x0(v){if(v.lastExpiredTime!==0)v.callbackExpirationTime=1073741823,v.callbackPriority=99,v.callbackNode=Ho(Z0.bind(null,v));else{var m=fo(v),S=v.callbackNode;if(m===0)S!==null&&(v.callbackNode=null,v.callbackExpirationTime=0,v.callbackPriority=90);else{var O=g0();if(m===1073741823?O=99:m===1||m===2?O=95:(O=10*(1073741821-m)-10*(1073741821-O),O=0>=O?99:250>=O?98:5250>=O?97:95),S!==null){var M=v.callbackPriority;if(v.callbackExpirationTime===m&&M>=O)return;S!==ju&&uf(S)}v.callbackExpirationTime=m,v.callbackPriority=O,m=m===1073741823?Ho(Z0.bind(null,v)):lu(O,Xu.bind(null,v),{timeout:10*(1073741821-m)-G0()}),v.callbackNode=m}}}function Xu(v,m){if(t0=0,m)return m=g0(),kl(v,m),x0(v),null;var S=fo(v);if(S!==0){if(m=v.callbackNode,(Kt&(Br|zr))!==Fn)throw Error(t(327));if(Ws(),v===X&&S===ye||mu(v,S),Y!==null){var O=Kt;Kt|=Br;var M=ei(v);do try{Ua();break}catch(Ye){Ju(v,Ye)}while(1);if(Wu(),Kt=O,B0.current=M,he===wr)throw m=We,mu(v,S),ao(v,S),x0(v),m;if(Y===null)switch(M=v.finishedWork=v.current.alternate,v.finishedExpirationTime=S,O=he,X=null,O){case lo:case wr:throw Error(t(345));case kn:kl(v,2=S){v.lastPingedTime=S,mu(v,S);break}}if(b=fo(v),b!==0&&b!==S)break;if(O!==0&&O!==S){v.lastPingedTime=O;break}v.timeoutHandle=jt(gu.bind(null,v),M);break}gu(v);break;case hi:if(ao(v,S),O=v.lastSuspendedTime,S===O&&(v.nextKnownPendingLevel=$f(M)),qt&&(M=v.lastPingedTime,M===0||M>=S)){v.lastPingedTime=S,mu(v,S);break}if(M=fo(v),M!==0&&M!==S)break;if(O!==0&&O!==S){v.lastPingedTime=O;break}if(Dt!==1073741823?O=10*(1073741821-Dt)-G0():et===1073741823?O=0:(O=10*(1073741821-et)-5e3,M=G0(),S=10*(1073741821-S)-M,O=M-O,0>O&&(O=0),O=(120>O?120:480>O?480:1080>O?1080:1920>O?1920:3e3>O?3e3:4320>O?4320:1960*Cl(O/1960))-O,S=O?O=0:(M=ee.busyDelayMs|0,b=G0()-(10*(1073741821-b)-(ee.timeoutMs|0||5e3)),O=b<=M?0:M+O-b),10 component higher in the tree to provide a loading indicator or placeholder to display.`+dl(M))}he!==Ai&&(he=kn),b=zs(b,M),Ze=O;do{switch(Ze.tag){case 3:ee=b,Ze.effectTag|=4096,Ze.expirationTime=m;var Ce=pu(Ze,ee,m);bu(Ze,Ce);break e;case 1:ee=b;var ze=Ze.type,Et=Ze.stateNode;if((Ze.effectTag&64)==0&&(typeof ze.getDerivedStateFromError=="function"||Et!==null&&typeof Et.componentDidCatch=="function"&&(Ar===null||!Ar.has(Et)))){Ze.effectTag|=4096,Ze.expirationTime=m;var on=Sl(Ze,ee,m);bu(Ze,on);break e}}Ze=Ze.return}while(Ze!==null)}Y=vu(Y)}catch(sr){m=sr;continue}break}while(1)}function ei(){var v=B0.current;return B0.current=oo,v===null?oo:v}function Yf(v,m){vZt&&(Zt=v)}function ja(){for(;Y!==null;)Y=Ic(Y)}function Ua(){for(;Y!==null&&!_n();)Y=Ic(Y)}function Ic(v){var m=Lc(v.alternate,v,ye);return v.memoizedProps=v.pendingProps,m===null&&(m=vu(v)),hu.current=null,m}function vu(v){Y=v;do{var m=Y.alternate;if(v=Y.return,(Y.effectTag&2048)==0){e:{var S=m;m=Y;var O=ye,M=m.pendingProps;switch(m.tag){case 2:break;case 16:break;case 15:case 0:break;case 1:c0(m.type)&&Ru(m);break;case 3:Fe(m),ks(m),M=m.stateNode,M.pendingContext&&(M.context=M.pendingContext,M.pendingContext=null),(S===null||S.child===null)&&Vo(m)&&ki(m),$r(m);break;case 5:K(m);var b=W(de.current);if(O=m.type,S!==null&&m.stateNode!=null)m0(S,m,O,M,b),S.ref!==m.ref&&(m.effectTag|=128);else if(M){if(S=W(fe.current),Vo(m)){if(M=m,!w)throw Error(t(175));S=Ui(M.stateNode,M.type,M.memoizedProps,b,S,M),M.updateQueue=S,S=S!==null,S&&ki(m)}else{var ee=ne(O,M,b,S,m);Yr(ee,m,!1,!1),m.stateNode=ee,Z(ee,O,M,b,S)&&ki(m)}m.ref!==null&&(m.effectTag|=128)}else if(m.stateNode===null)throw Error(t(166));break;case 6:if(S&&m.stateNode!=null)Tn(S,m,S.memoizedProps,M);else{if(typeof M!="string"&&m.stateNode===null)throw Error(t(166));if(S=W(de.current),b=W(fe.current),Vo(m)){if(S=m,!w)throw Error(t(176));(S=Mr(S.stateNode,S.memoizedProps,S))&&ki(m)}else m.stateNode=Ft(M,S,b,m)}break;case 11:break;case 13:if(kr(xe,m),M=m.memoizedState,(m.effectTag&64)!=0){m.expirationTime=O;break e}M=M!==null,b=!1,S===null?m.memoizedProps.fallback!==void 0&&Vo(m):(O=S.memoizedState,b=O!==null,M||O===null||(O=S.child.sibling,O!==null&&(ee=m.firstEffect,ee!==null?(m.firstEffect=O,O.nextEffect=ee):(m.firstEffect=m.lastEffect=O,O.nextEffect=null),O.effectTag=8))),M&&!b&&(m.mode&2)!=0&&(S===null&&m.memoizedProps.unstable_avoidThisFallback!==!0||(xe.current&1)!=0?he===lo&&(he=T0):((he===lo||he===T0)&&(he=hi),Zt!==0&&X!==null&&(ao(X,ye),$o(X,Zt)))),cr&&M&&(m.effectTag|=4),Yt&&(M||b)&&(m.effectTag|=4);break;case 7:break;case 8:break;case 12:break;case 4:Fe(m),$r(m);break;case 10:fi(m);break;case 9:break;case 14:break;case 17:c0(m.type)&&Ru(m);break;case 19:if(kr(xe,m),M=m.memoizedState,M===null)break;if(b=(m.effectTag&64)!=0,ee=M.rendering,ee===null){if(b)bi(M,!1);else if(he!==lo||S!==null&&(S.effectTag&64)!=0)for(S=m.child;S!==null;){if(ee=je(S),ee!==null){for(m.effectTag|=64,bi(M,!1),S=ee.updateQueue,S!==null&&(m.updateQueue=S,m.effectTag|=4),M.lastEffect===null&&(m.firstEffect=null),m.lastEffect=M.lastEffect,S=O,M=m.child;M!==null;)b=M,O=S,b.effectTag&=2,b.nextEffect=null,b.firstEffect=null,b.lastEffect=null,ee=b.alternate,ee===null?(b.childExpirationTime=0,b.expirationTime=O,b.child=null,b.memoizedProps=null,b.memoizedState=null,b.updateQueue=null,b.dependencies=null):(b.childExpirationTime=ee.childExpirationTime,b.expirationTime=ee.expirationTime,b.child=ee.child,b.memoizedProps=ee.memoizedProps,b.memoizedState=ee.memoizedState,b.updateQueue=ee.updateQueue,O=ee.dependencies,b.dependencies=O===null?null:{expirationTime:O.expirationTime,firstContext:O.firstContext,responders:O.responders}),M=M.sibling;Fr(xe,xe.current&1|2,m),m=m.child;break e}S=S.sibling}}else{if(!b)if(S=je(ee),S!==null){if(m.effectTag|=64,b=!0,S=S.updateQueue,S!==null&&(m.updateQueue=S,m.effectTag|=4),bi(M,!0),M.tail===null&&M.tailMode==="hidden"&&!ee.alternate){m=m.lastEffect=M.lastEffect,m!==null&&(m.nextEffect=null);break}}else G0()>M.tailExpiration&&1M&&(M=O),ee>M&&(M=ee),b=b.sibling;S.childExpirationTime=M}if(m!==null)return m;v!==null&&(v.effectTag&2048)==0&&(v.firstEffect===null&&(v.firstEffect=Y.firstEffect),Y.lastEffect!==null&&(v.lastEffect!==null&&(v.lastEffect.nextEffect=Y.firstEffect),v.lastEffect=Y.lastEffect),1v?m:v}function gu(v){var m=Fs();return zi(99,co.bind(null,v,m)),null}function co(v,m){do Ws();while(dr!==null);if((Kt&(Br|zr))!==Fn)throw Error(t(327));var S=v.finishedWork,O=v.finishedExpirationTime;if(S===null)return null;if(v.finishedWork=null,v.finishedExpirationTime=0,S===v.current)throw Error(t(177));v.callbackNode=null,v.callbackExpirationTime=0,v.callbackPriority=90,v.nextKnownPendingLevel=0;var M=$f(S);if(v.firstPendingTime=M,O<=v.lastSuspendedTime?v.firstSuspendedTime=v.lastSuspendedTime=v.nextKnownPendingLevel=0:O<=v.firstSuspendedTime&&(v.firstSuspendedTime=O-1),O<=v.lastPingedTime&&(v.lastPingedTime=0),O<=v.lastExpiredTime&&(v.lastExpiredTime=0),v===X&&(Y=X=null,ye=0),1=S?mt(v,m,S):(Fr(xe,xe.current&1,m),m=X0(v,m,S),m!==null?m.sibling:null);Fr(xe,xe.current&1,m);break;case 19:if(O=m.childExpirationTime>=S,(v.effectTag&64)!=0){if(O)return $t(v,m,S);m.effectTag|=64}if(M=m.memoizedState,M!==null&&(M.rendering=null,M.tail=null),Fr(xe,xe.current,m),!O)return null}return X0(v,m,S)}ai=!1}}else ai=!1;switch(m.expirationTime=0,m.tag){case 2:if(O=m.type,v!==null&&(v.alternate=null,m.alternate=null,m.effectTag|=2),v=m.pendingProps,M=Lu(m,H0.current),io(m,S),M=St(null,m,O,v,M,S),m.effectTag|=1,typeof M=="object"&&M!==null&&typeof M.render=="function"&&M.$$typeof===void 0){if(m.tag=1,Qt(),c0(O)){var b=!0;wo(m)}else b=!1;m.memoizedState=M.state!==null&&M.state!==void 0?M.state:null;var ee=O.getDerivedStateFromProps;typeof ee=="function"&&Go(m,O,ee,v),M.updater=Gu,m.stateNode=M,M._reactInternalFiber=m,Vu(m,O,v,S),m=Be(null,m,O,!0,b,S)}else m.tag=0,o0(null,m,M,S),m=m.child;return m;case 16:if(M=m.elementType,v!==null&&(v.alternate=null,m.alternate=null,m.effectTag|=2),v=m.pendingProps,Te(M),M._status!==1)throw M._result;switch(M=M._result,m.type=M,b=m.tag=Wa(M),v=I0(M,v),b){case 0:m=K0(null,m,M,v,S);break;case 1:m=ae(null,m,M,v,S);break;case 11:m=Vr(null,m,M,v,S);break;case 14:m=ff(null,m,M,I0(M.type,v),O,S);break;default:throw Error(t(306,M,""))}return m;case 0:return O=m.type,M=m.pendingProps,M=m.elementType===O?M:I0(O,M),K0(v,m,O,M,S);case 1:return O=m.type,M=m.pendingProps,M=m.elementType===O?M:I0(O,M),ae(v,m,O,M,S);case 3:if(Ie(m),O=m.updateQueue,O===null)throw Error(t(282));if(M=m.memoizedState,M=M!==null?M.element:null,P0(m,O,m.pendingProps,null,S),O=m.memoizedState.element,O===M)Rr(),m=X0(v,m,S);else{if((M=m.stateNode.hydrate)&&(w?(Gr=al(m.stateNode.containerInfo),F0=m,M=ir=!0):M=!1),M)for(S=U(m,null,O,S),m.child=S;S;)S.effectTag=S.effectTag&-3|1024,S=S.sibling;else o0(v,m,O,S),Rr();m=m.child}return m;case 5:return Ge(m),v===null&&Co(m),O=m.type,M=m.pendingProps,b=v!==null?v.memoizedProps:null,ee=M.children,at(O,M)?ee=null:b!==null&&at(O,b)&&(m.effectTag|=16),$0(v,m),m.mode&4&&S!==1&&it(O,M)?(m.expirationTime=m.childExpirationTime=1,m=null):(o0(v,m,ee,S),m=m.child),m;case 6:return v===null&&Co(m),null;case 13:return mt(v,m,S);case 4:return ve(m,m.stateNode.containerInfo),O=m.pendingProps,v===null?m.child=R(m,null,O,S):o0(v,m,O,S),m.child;case 11:return O=m.type,M=m.pendingProps,M=m.elementType===O?M:I0(O,M),Vr(v,m,O,M,S);case 7:return o0(v,m,m.pendingProps,S),m.child;case 8:return o0(v,m,m.pendingProps.children,S),m.child;case 12:return o0(v,m,m.pendingProps.children,S),m.child;case 10:e:{if(O=m.type._context,M=m.pendingProps,ee=m.memoizedProps,b=M.value,Ls(m,b),ee!==null){var Ye=ee.value;if(b=Sn(Ye,b)?0:(typeof O._calculateChangedBits=="function"?O._calculateChangedBits(Ye,b):1073741823)|0,b===0){if(ee.children===M.children&&!b0.current){m=X0(v,m,S);break e}}else for(Ye=m.child,Ye!==null&&(Ye.return=m);Ye!==null;){var Ze=Ye.dependencies;if(Ze!==null){ee=Ye.child;for(var ut=Ze.firstContext;ut!==null;){if(ut.context===O&&(ut.observedBits&b)!=0){Ye.tag===1&&(ut=a0(S,null),ut.tag=2,V0(Ye,ut)),Ye.expirationTime=m&&v<=m}function ao(v,m){var S=v.firstSuspendedTime,O=v.lastSuspendedTime;Sm||S===0)&&(v.lastSuspendedTime=m),m<=v.lastPingedTime&&(v.lastPingedTime=0),m<=v.lastExpiredTime&&(v.lastExpiredTime=0)}function $o(v,m){m>v.firstPendingTime&&(v.firstPendingTime=m);var S=v.firstSuspendedTime;S!==0&&(m>=S?v.firstSuspendedTime=v.lastSuspendedTime=v.nextKnownPendingLevel=0:m>=v.lastSuspendedTime&&(v.lastSuspendedTime=m+1),m>v.nextKnownPendingLevel&&(v.nextKnownPendingLevel=m))}function kl(v,m){var S=v.lastExpiredTime;(S===0||S>m)&&(v.lastExpiredTime=m)}function Nc(v){var m=v._reactInternalFiber;if(m===void 0)throw typeof v.render=="function"?Error(t(188)):Error(t(268,Object.keys(v)));return v=Ue(m),v===null?null:v.stateNode}function Al(v,m){v=v.memoizedState,v!==null&&v.dehydrated!==null&&v.retryTime{"use strict";sE.exports=uE()});var cE=Me((db,fE)=>{"use strict";var gN={ALIGN_COUNT:8,ALIGN_AUTO:0,ALIGN_FLEX_START:1,ALIGN_CENTER:2,ALIGN_FLEX_END:3,ALIGN_STRETCH:4,ALIGN_BASELINE:5,ALIGN_SPACE_BETWEEN:6,ALIGN_SPACE_AROUND:7,DIMENSION_COUNT:2,DIMENSION_WIDTH:0,DIMENSION_HEIGHT:1,DIRECTION_COUNT:3,DIRECTION_INHERIT:0,DIRECTION_LTR:1,DIRECTION_RTL:2,DISPLAY_COUNT:2,DISPLAY_FLEX:0,DISPLAY_NONE:1,EDGE_COUNT:9,EDGE_LEFT:0,EDGE_TOP:1,EDGE_RIGHT:2,EDGE_BOTTOM:3,EDGE_START:4,EDGE_END:5,EDGE_HORIZONTAL:6,EDGE_VERTICAL:7,EDGE_ALL:8,EXPERIMENTAL_FEATURE_COUNT:1,EXPERIMENTAL_FEATURE_WEB_FLEX_BASIS:0,FLEX_DIRECTION_COUNT:4,FLEX_DIRECTION_COLUMN:0,FLEX_DIRECTION_COLUMN_REVERSE:1,FLEX_DIRECTION_ROW:2,FLEX_DIRECTION_ROW_REVERSE:3,JUSTIFY_COUNT:6,JUSTIFY_FLEX_START:0,JUSTIFY_CENTER:1,JUSTIFY_FLEX_END:2,JUSTIFY_SPACE_BETWEEN:3,JUSTIFY_SPACE_AROUND:4,JUSTIFY_SPACE_EVENLY:5,LOG_LEVEL_COUNT:6,LOG_LEVEL_ERROR:0,LOG_LEVEL_WARN:1,LOG_LEVEL_INFO:2,LOG_LEVEL_DEBUG:3,LOG_LEVEL_VERBOSE:4,LOG_LEVEL_FATAL:5,MEASURE_MODE_COUNT:3,MEASURE_MODE_UNDEFINED:0,MEASURE_MODE_EXACTLY:1,MEASURE_MODE_AT_MOST:2,NODE_TYPE_COUNT:2,NODE_TYPE_DEFAULT:0,NODE_TYPE_TEXT:1,OVERFLOW_COUNT:3,OVERFLOW_VISIBLE:0,OVERFLOW_HIDDEN:1,OVERFLOW_SCROLL:2,POSITION_TYPE_COUNT:2,POSITION_TYPE_RELATIVE:0,POSITION_TYPE_ABSOLUTE:1,PRINT_OPTIONS_COUNT:3,PRINT_OPTIONS_LAYOUT:1,PRINT_OPTIONS_STYLE:2,PRINT_OPTIONS_CHILDREN:4,UNIT_COUNT:4,UNIT_UNDEFINED:0,UNIT_POINT:1,UNIT_PERCENT:2,UNIT_AUTO:3,WRAP_COUNT:3,WRAP_NO_WRAP:0,WRAP_WRAP:1,WRAP_WRAP_REVERSE:2};fE.exports=gN});var hE=Me((pb,aE)=>{"use strict";var _N=Object.assign||function(i){for(var u=1;u"}}]),i}(),dE=function(){Ph(i,null,[{key:"fromJS",value:function(f){var c=f.width,g=f.height;return new i(c,g)}}]);function i(u,f){Iy(this,i),this.width=u,this.height=f}return Ph(i,[{key:"fromJS",value:function(f){f(this.width,this.height)}},{key:"toString",value:function(){return""}}]),i}(),pE=function(){function i(u,f){Iy(this,i),this.unit=u,this.value=f}return Ph(i,[{key:"fromJS",value:function(f){f(this.unit,this.value)}},{key:"toString",value:function(){switch(this.unit){case ps.UNIT_POINT:return String(this.value);case ps.UNIT_PERCENT:return this.value+"%";case ps.UNIT_AUTO:return"auto";default:return this.value+"?"}}},{key:"valueOf",value:function(){return this.value}}]),i}();aE.exports=function(i,u){function f(C,A,x){var D=C[A];C[A]=function(){for(var L=arguments.length,N=Array(L),j=0;j1?N-1:0),$=1;$1&&arguments[1]!==void 0?arguments[1]:NaN,x=arguments.length>2&&arguments[2]!==void 0?arguments[2]:NaN,D=arguments.length>3&&arguments[3]!==void 0?arguments[3]:ps.DIRECTION_LTR;return C.call(this,A,x,D)}),_N({Config:u.Config,Node:u.Node,Layout:i("Layout",yN),Size:i("Size",dE),Value:i("Value",pE),getInstanceCount:function(){return u.getInstanceCount.apply(u,arguments)}},ps)}});var mE=Me((exports,module)=>{(function(i,u){typeof define=="function"&&define.amd?define([],function(){return u}):typeof module=="object"&&module.exports?module.exports=u:(i.nbind=i.nbind||{}).init=u})(exports,function(Module,cb){typeof Module=="function"&&(cb=Module,Module={}),Module.onRuntimeInitialized=function(i,u){return function(){i&&i.apply(this,arguments);try{Module.ccall("nbind_init")}catch(f){u(f);return}u(null,{bind:Module._nbind_value,reflect:Module.NBind.reflect,queryType:Module.NBind.queryType,toggleLightGC:Module.toggleLightGC,lib:Module})}}(Module.onRuntimeInitialized,cb);var Module;Module||(Module=(typeof Module!="undefined"?Module:null)||{});var moduleOverrides={};for(var key in Module)Module.hasOwnProperty(key)&&(moduleOverrides[key]=Module[key]);var ENVIRONMENT_IS_WEB=!1,ENVIRONMENT_IS_WORKER=!1,ENVIRONMENT_IS_NODE=!1,ENVIRONMENT_IS_SHELL=!1;if(Module.ENVIRONMENT)if(Module.ENVIRONMENT==="WEB")ENVIRONMENT_IS_WEB=!0;else if(Module.ENVIRONMENT==="WORKER")ENVIRONMENT_IS_WORKER=!0;else if(Module.ENVIRONMENT==="NODE")ENVIRONMENT_IS_NODE=!0;else if(Module.ENVIRONMENT==="SHELL")ENVIRONMENT_IS_SHELL=!0;else throw new Error("The provided Module['ENVIRONMENT'] value is not valid. It must be one of: WEB|WORKER|NODE|SHELL.");else ENVIRONMENT_IS_WEB=typeof window=="object",ENVIRONMENT_IS_WORKER=typeof importScripts=="function",ENVIRONMENT_IS_NODE=typeof process=="object"&&typeof require=="function"&&!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_WORKER,ENVIRONMENT_IS_SHELL=!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_NODE&&!ENVIRONMENT_IS_WORKER;if(ENVIRONMENT_IS_NODE){Module.print||(Module.print=console.log),Module.printErr||(Module.printErr=console.warn);var nodeFS,nodePath;Module.read=function(u,f){nodeFS||(nodeFS={}("")),nodePath||(nodePath={}("")),u=nodePath.normalize(u);var c=nodeFS.readFileSync(u);return f?c:c.toString()},Module.readBinary=function(u){var f=Module.read(u,!0);return f.buffer||(f=new Uint8Array(f)),assert(f.buffer),f},Module.load=function(u){globalEval(read(u))},Module.thisProgram||(process.argv.length>1?Module.thisProgram=process.argv[1].replace(/\\/g,"/"):Module.thisProgram="unknown-program"),Module.arguments=process.argv.slice(2),typeof module!="undefined"&&(module.exports=Module),Module.inspect=function(){return"[Emscripten Module object]"}}else if(ENVIRONMENT_IS_SHELL)Module.print||(Module.print=print),typeof printErr!="undefined"&&(Module.printErr=printErr),typeof read!="undefined"?Module.read=read:Module.read=function(){throw"no read() available"},Module.readBinary=function(u){if(typeof readbuffer=="function")return new Uint8Array(readbuffer(u));var f=read(u,"binary");return assert(typeof f=="object"),f},typeof scriptArgs!="undefined"?Module.arguments=scriptArgs:typeof arguments!="undefined"&&(Module.arguments=arguments),typeof quit=="function"&&(Module.quit=function(i,u){quit(i)});else if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){if(Module.read=function(u){var f=new XMLHttpRequest;return f.open("GET",u,!1),f.send(null),f.responseText},ENVIRONMENT_IS_WORKER&&(Module.readBinary=function(u){var f=new XMLHttpRequest;return f.open("GET",u,!1),f.responseType="arraybuffer",f.send(null),new Uint8Array(f.response)}),Module.readAsync=function(u,f,c){var g=new XMLHttpRequest;g.open("GET",u,!0),g.responseType="arraybuffer",g.onload=function(){g.status==200||g.status==0&&g.response?f(g.response):c()},g.onerror=c,g.send(null)},typeof arguments!="undefined"&&(Module.arguments=arguments),typeof console!="undefined")Module.print||(Module.print=function(u){console.log(u)}),Module.printErr||(Module.printErr=function(u){console.warn(u)});else{var TRY_USE_DUMP=!1;Module.print||(Module.print=TRY_USE_DUMP&&typeof dump!="undefined"?function(i){dump(i)}:function(i){})}ENVIRONMENT_IS_WORKER&&(Module.load=importScripts),typeof Module.setWindowTitle=="undefined"&&(Module.setWindowTitle=function(i){document.title=i})}else throw"Unknown runtime environment. Where are we?";function globalEval(i){eval.call(null,i)}!Module.load&&Module.read&&(Module.load=function(u){globalEval(Module.read(u))}),Module.print||(Module.print=function(){}),Module.printErr||(Module.printErr=Module.print),Module.arguments||(Module.arguments=[]),Module.thisProgram||(Module.thisProgram="./this.program"),Module.quit||(Module.quit=function(i,u){throw u}),Module.print=Module.print,Module.printErr=Module.printErr,Module.preRun=[],Module.postRun=[];for(var key in moduleOverrides)moduleOverrides.hasOwnProperty(key)&&(Module[key]=moduleOverrides[key]);moduleOverrides=void 0;var Runtime={setTempRet0:function(i){return tempRet0=i,i},getTempRet0:function(){return tempRet0},stackSave:function(){return STACKTOP},stackRestore:function(i){STACKTOP=i},getNativeTypeSize:function(i){switch(i){case"i1":case"i8":return 1;case"i16":return 2;case"i32":return 4;case"i64":return 8;case"float":return 4;case"double":return 8;default:{if(i[i.length-1]==="*")return Runtime.QUANTUM_SIZE;if(i[0]==="i"){var u=parseInt(i.substr(1));return assert(u%8==0),u/8}else return 0}}},getNativeFieldSize:function(i){return Math.max(Runtime.getNativeTypeSize(i),Runtime.QUANTUM_SIZE)},STACK_ALIGN:16,prepVararg:function(i,u){return u==="double"||u==="i64"?i&7&&(assert((i&7)==4),i+=4):assert((i&3)==0),i},getAlignSize:function(i,u,f){return!f&&(i=="i64"||i=="double")?8:i?Math.min(u||(i?Runtime.getNativeFieldSize(i):0),Runtime.QUANTUM_SIZE):Math.min(u,8)},dynCall:function(i,u,f){return f&&f.length?Module["dynCall_"+i].apply(null,[u].concat(f)):Module["dynCall_"+i].call(null,u)},functionPointers:[],addFunction:function(i){for(var u=0;u>2],f=(u+i+15|0)&-16;if(HEAP32[DYNAMICTOP_PTR>>2]=f,f>=TOTAL_MEMORY){var c=enlargeMemory();if(!c)return HEAP32[DYNAMICTOP_PTR>>2]=u,0}return u},alignMemory:function(i,u){var f=i=Math.ceil(i/(u||16))*(u||16);return f},makeBigInt:function(i,u,f){var c=f?+(i>>>0)+ +(u>>>0)*4294967296:+(i>>>0)+ +(u|0)*4294967296;return c},GLOBAL_BASE:8,QUANTUM_SIZE:4,__dummy__:0};Module.Runtime=Runtime;var ABORT=0,EXITSTATUS=0;function assert(i,u){i||abort("Assertion failed: "+u)}function getCFunc(ident){var func=Module["_"+ident];if(!func)try{func=eval("_"+ident)}catch(i){}return assert(func,"Cannot call unknown function "+ident+" (perhaps LLVM optimizations or closure removed it?)"),func}var cwrap,ccall;(function(){var JSfuncs={stackSave:function(){Runtime.stackSave()},stackRestore:function(){Runtime.stackRestore()},arrayToC:function(i){var u=Runtime.stackAlloc(i.length);return writeArrayToMemory(i,u),u},stringToC:function(i){var u=0;if(i!=null&&i!==0){var f=(i.length<<2)+1;u=Runtime.stackAlloc(f),stringToUTF8(i,u,f)}return u}},toC={string:JSfuncs.stringToC,array:JSfuncs.arrayToC};ccall=function(u,f,c,g,t){var C=getCFunc(u),A=[],x=0;if(g)for(var D=0;D>0]=u;break;case"i8":HEAP8[i>>0]=u;break;case"i16":HEAP16[i>>1]=u;break;case"i32":HEAP32[i>>2]=u;break;case"i64":tempI64=[u>>>0,(tempDouble=u,+Math_abs(tempDouble)>=1?tempDouble>0?(Math_min(+Math_floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math_ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[i>>2]=tempI64[0],HEAP32[i+4>>2]=tempI64[1];break;case"float":HEAPF32[i>>2]=u;break;case"double":HEAPF64[i>>3]=u;break;default:abort("invalid type for setValue: "+f)}}Module.setValue=setValue;function getValue(i,u,f){switch(u=u||"i8",u.charAt(u.length-1)==="*"&&(u="i32"),u){case"i1":return HEAP8[i>>0];case"i8":return HEAP8[i>>0];case"i16":return HEAP16[i>>1];case"i32":return HEAP32[i>>2];case"i64":return HEAP32[i>>2];case"float":return HEAPF32[i>>2];case"double":return HEAPF64[i>>3];default:abort("invalid type for setValue: "+u)}return null}Module.getValue=getValue;var ALLOC_NORMAL=0,ALLOC_STACK=1,ALLOC_STATIC=2,ALLOC_DYNAMIC=3,ALLOC_NONE=4;Module.ALLOC_NORMAL=ALLOC_NORMAL,Module.ALLOC_STACK=ALLOC_STACK,Module.ALLOC_STATIC=ALLOC_STATIC,Module.ALLOC_DYNAMIC=ALLOC_DYNAMIC,Module.ALLOC_NONE=ALLOC_NONE;function allocate(i,u,f,c){var g,t;typeof i=="number"?(g=!0,t=i):(g=!1,t=i.length);var C=typeof u=="string"?u:null,A;if(f==ALLOC_NONE?A=c:A=[typeof _malloc=="function"?_malloc:Runtime.staticAlloc,Runtime.stackAlloc,Runtime.staticAlloc,Runtime.dynamicAlloc][f===void 0?ALLOC_STATIC:f](Math.max(t,C?1:u.length)),g){var c=A,x;for(assert((A&3)==0),x=A+(t&~3);c>2]=0;for(x=A+t;c>0]=0;return A}if(C==="i8")return i.subarray||i.slice?HEAPU8.set(i,A):HEAPU8.set(new Uint8Array(i),A),A;for(var D=0,L,N,j;D>0],f|=c,!(c==0&&!u||(g++,u&&g==u)););u||(u=g);var t="";if(f<128){for(var C=1024,A;u>0;)A=String.fromCharCode.apply(String,HEAPU8.subarray(i,i+Math.min(u,C))),t=t?t+A:A,i+=C,u-=C;return t}return Module.UTF8ToString(i)}Module.Pointer_stringify=Pointer_stringify;function AsciiToString(i){for(var u="";;){var f=HEAP8[i++>>0];if(!f)return u;u+=String.fromCharCode(f)}}Module.AsciiToString=AsciiToString;function stringToAscii(i,u){return writeAsciiToMemory(i,u,!1)}Module.stringToAscii=stringToAscii;var UTF8Decoder=typeof TextDecoder!="undefined"?new TextDecoder("utf8"):void 0;function UTF8ArrayToString(i,u){for(var f=u;i[f];)++f;if(f-u>16&&i.subarray&&UTF8Decoder)return UTF8Decoder.decode(i.subarray(u,f));for(var c,g,t,C,A,x,D="";;){if(c=i[u++],!c)return D;if(!(c&128)){D+=String.fromCharCode(c);continue}if(g=i[u++]&63,(c&224)==192){D+=String.fromCharCode((c&31)<<6|g);continue}if(t=i[u++]&63,(c&240)==224?c=(c&15)<<12|g<<6|t:(C=i[u++]&63,(c&248)==240?c=(c&7)<<18|g<<12|t<<6|C:(A=i[u++]&63,(c&252)==248?c=(c&3)<<24|g<<18|t<<12|C<<6|A:(x=i[u++]&63,c=(c&1)<<30|g<<24|t<<18|C<<12|A<<6|x))),c<65536)D+=String.fromCharCode(c);else{var L=c-65536;D+=String.fromCharCode(55296|L>>10,56320|L&1023)}}}Module.UTF8ArrayToString=UTF8ArrayToString;function UTF8ToString(i){return UTF8ArrayToString(HEAPU8,i)}Module.UTF8ToString=UTF8ToString;function stringToUTF8Array(i,u,f,c){if(!(c>0))return 0;for(var g=f,t=f+c-1,C=0;C=55296&&A<=57343&&(A=65536+((A&1023)<<10)|i.charCodeAt(++C)&1023),A<=127){if(f>=t)break;u[f++]=A}else if(A<=2047){if(f+1>=t)break;u[f++]=192|A>>6,u[f++]=128|A&63}else if(A<=65535){if(f+2>=t)break;u[f++]=224|A>>12,u[f++]=128|A>>6&63,u[f++]=128|A&63}else if(A<=2097151){if(f+3>=t)break;u[f++]=240|A>>18,u[f++]=128|A>>12&63,u[f++]=128|A>>6&63,u[f++]=128|A&63}else if(A<=67108863){if(f+4>=t)break;u[f++]=248|A>>24,u[f++]=128|A>>18&63,u[f++]=128|A>>12&63,u[f++]=128|A>>6&63,u[f++]=128|A&63}else{if(f+5>=t)break;u[f++]=252|A>>30,u[f++]=128|A>>24&63,u[f++]=128|A>>18&63,u[f++]=128|A>>12&63,u[f++]=128|A>>6&63,u[f++]=128|A&63}}return u[f]=0,f-g}Module.stringToUTF8Array=stringToUTF8Array;function stringToUTF8(i,u,f){return stringToUTF8Array(i,HEAPU8,u,f)}Module.stringToUTF8=stringToUTF8;function lengthBytesUTF8(i){for(var u=0,f=0;f=55296&&c<=57343&&(c=65536+((c&1023)<<10)|i.charCodeAt(++f)&1023),c<=127?++u:c<=2047?u+=2:c<=65535?u+=3:c<=2097151?u+=4:c<=67108863?u+=5:u+=6}return u}Module.lengthBytesUTF8=lengthBytesUTF8;var UTF16Decoder=typeof TextDecoder!="undefined"?new TextDecoder("utf-16le"):void 0;function demangle(i){var u=Module.___cxa_demangle||Module.__cxa_demangle;if(u){try{var f=i.substr(1),c=lengthBytesUTF8(f)+1,g=_malloc(c);stringToUTF8(f,g,c);var t=_malloc(4),C=u(g,0,0,t);if(getValue(t,"i32")===0&&C)return Pointer_stringify(C)}catch(A){}finally{g&&_free(g),t&&_free(t),C&&_free(C)}return i}return Runtime.warnOnce("warning: build with -s DEMANGLE_SUPPORT=1 to link in libcxxabi demangling"),i}function demangleAll(i){var u=/__Z[\w\d_]+/g;return i.replace(u,function(f){var c=demangle(f);return f===c?f:f+" ["+c+"]"})}function jsStackTrace(){var i=new Error;if(!i.stack){try{throw new Error(0)}catch(u){i=u}if(!i.stack)return"(no stack trace available)"}return i.stack.toString()}function stackTrace(){var i=jsStackTrace();return Module.extraStackTrace&&(i+=` -`+Module.extraStackTrace()),demangleAll(i)}Module.stackTrace=stackTrace;var HEAP,buffer,HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;function updateGlobalBufferViews(){Module.HEAP8=HEAP8=new Int8Array(buffer),Module.HEAP16=HEAP16=new Int16Array(buffer),Module.HEAP32=HEAP32=new Int32Array(buffer),Module.HEAPU8=HEAPU8=new Uint8Array(buffer),Module.HEAPU16=HEAPU16=new Uint16Array(buffer),Module.HEAPU32=HEAPU32=new Uint32Array(buffer),Module.HEAPF32=HEAPF32=new Float32Array(buffer),Module.HEAPF64=HEAPF64=new Float64Array(buffer)}var STATIC_BASE,STATICTOP,staticSealed,STACK_BASE,STACKTOP,STACK_MAX,DYNAMIC_BASE,DYNAMICTOP_PTR;STATIC_BASE=STATICTOP=STACK_BASE=STACKTOP=STACK_MAX=DYNAMIC_BASE=DYNAMICTOP_PTR=0,staticSealed=!1;function abortOnCannotGrowMemory(){abort("Cannot enlarge memory arrays. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value "+TOTAL_MEMORY+", (2) compile with -s ALLOW_MEMORY_GROWTH=1 which allows increasing the size at runtime but prevents some optimizations, (3) set Module.TOTAL_MEMORY to a higher value before the program runs, or (4) if you want malloc to return NULL (0) instead of this abort, compile with -s ABORTING_MALLOC=0 ")}function enlargeMemory(){abortOnCannotGrowMemory()}var TOTAL_STACK=Module.TOTAL_STACK||5242880,TOTAL_MEMORY=Module.TOTAL_MEMORY||134217728;TOTAL_MEMORY0;){var u=i.shift();if(typeof u=="function"){u();continue}var f=u.func;typeof f=="number"?u.arg===void 0?Module.dynCall_v(f):Module.dynCall_vi(f,u.arg):f(u.arg===void 0?null:u.arg)}}var __ATPRERUN__=[],__ATINIT__=[],__ATMAIN__=[],__ATEXIT__=[],__ATPOSTRUN__=[],runtimeInitialized=!1,runtimeExited=!1;function preRun(){if(Module.preRun)for(typeof Module.preRun=="function"&&(Module.preRun=[Module.preRun]);Module.preRun.length;)addOnPreRun(Module.preRun.shift());callRuntimeCallbacks(__ATPRERUN__)}function ensureInitRuntime(){runtimeInitialized||(runtimeInitialized=!0,callRuntimeCallbacks(__ATINIT__))}function preMain(){callRuntimeCallbacks(__ATMAIN__)}function exitRuntime(){callRuntimeCallbacks(__ATEXIT__),runtimeExited=!0}function postRun(){if(Module.postRun)for(typeof Module.postRun=="function"&&(Module.postRun=[Module.postRun]);Module.postRun.length;)addOnPostRun(Module.postRun.shift());callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(i){__ATPRERUN__.unshift(i)}Module.addOnPreRun=addOnPreRun;function addOnInit(i){__ATINIT__.unshift(i)}Module.addOnInit=addOnInit;function addOnPreMain(i){__ATMAIN__.unshift(i)}Module.addOnPreMain=addOnPreMain;function addOnExit(i){__ATEXIT__.unshift(i)}Module.addOnExit=addOnExit;function addOnPostRun(i){__ATPOSTRUN__.unshift(i)}Module.addOnPostRun=addOnPostRun;function intArrayFromString(i,u,f){var c=f>0?f:lengthBytesUTF8(i)+1,g=new Array(c),t=stringToUTF8Array(i,g,0,g.length);return u&&(g.length=t),g}Module.intArrayFromString=intArrayFromString;function intArrayToString(i){for(var u=[],f=0;f255&&(c&=255),u.push(String.fromCharCode(c))}return u.join("")}Module.intArrayToString=intArrayToString;function writeStringToMemory(i,u,f){Runtime.warnOnce("writeStringToMemory is deprecated and should not be called! Use stringToUTF8() instead!");var c,g;f&&(g=u+lengthBytesUTF8(i),c=HEAP8[g]),stringToUTF8(i,u,Infinity),f&&(HEAP8[g]=c)}Module.writeStringToMemory=writeStringToMemory;function writeArrayToMemory(i,u){HEAP8.set(i,u)}Module.writeArrayToMemory=writeArrayToMemory;function writeAsciiToMemory(i,u,f){for(var c=0;c>0]=i.charCodeAt(c);f||(HEAP8[u>>0]=0)}if(Module.writeAsciiToMemory=writeAsciiToMemory,(!Math.imul||Math.imul(4294967295,5)!==-5)&&(Math.imul=function(u,f){var c=u>>>16,g=u&65535,t=f>>>16,C=f&65535;return g*C+(c*C+g*t<<16)|0}),Math.imul=Math.imul,!Math.fround){var froundBuffer=new Float32Array(1);Math.fround=function(i){return froundBuffer[0]=i,froundBuffer[0]}}Math.fround=Math.fround,Math.clz32||(Math.clz32=function(i){i=i>>>0;for(var u=0;u<32;u++)if(i&1<<31-u)return u;return 32}),Math.clz32=Math.clz32,Math.trunc||(Math.trunc=function(i){return i<0?Math.ceil(i):Math.floor(i)}),Math.trunc=Math.trunc;var Math_abs=Math.abs,Math_cos=Math.cos,Math_sin=Math.sin,Math_tan=Math.tan,Math_acos=Math.acos,Math_asin=Math.asin,Math_atan=Math.atan,Math_atan2=Math.atan2,Math_exp=Math.exp,Math_log=Math.log,Math_sqrt=Math.sqrt,Math_ceil=Math.ceil,Math_floor=Math.floor,Math_pow=Math.pow,Math_imul=Math.imul,Math_fround=Math.fround,Math_round=Math.round,Math_min=Math.min,Math_clz32=Math.clz32,Math_trunc=Math.trunc,runDependencies=0,runDependencyWatcher=null,dependenciesFulfilled=null;function getUniqueRunDependency(i){return i}function addRunDependency(i){runDependencies++,Module.monitorRunDependencies&&Module.monitorRunDependencies(runDependencies)}Module.addRunDependency=addRunDependency;function removeRunDependency(i){if(runDependencies--,Module.monitorRunDependencies&&Module.monitorRunDependencies(runDependencies),runDependencies==0&&(runDependencyWatcher!==null&&(clearInterval(runDependencyWatcher),runDependencyWatcher=null),dependenciesFulfilled)){var u=dependenciesFulfilled;dependenciesFulfilled=null,u()}}Module.removeRunDependency=removeRunDependency,Module.preloadedImages={},Module.preloadedAudios={};var ASM_CONSTS=[function(i,u,f,c,g,t,C,A){return _nbind.callbackSignatureList[i].apply(this,arguments)}];function _emscripten_asm_const_iiiiiiii(i,u,f,c,g,t,C,A){return ASM_CONSTS[i](u,f,c,g,t,C,A)}function _emscripten_asm_const_iiiii(i,u,f,c,g){return ASM_CONSTS[i](u,f,c,g)}function _emscripten_asm_const_iiidddddd(i,u,f,c,g,t,C,A,x){return ASM_CONSTS[i](u,f,c,g,t,C,A,x)}function _emscripten_asm_const_iiididi(i,u,f,c,g,t,C){return ASM_CONSTS[i](u,f,c,g,t,C)}function _emscripten_asm_const_iiii(i,u,f,c){return ASM_CONSTS[i](u,f,c)}function _emscripten_asm_const_iiiid(i,u,f,c,g){return ASM_CONSTS[i](u,f,c,g)}function _emscripten_asm_const_iiiiii(i,u,f,c,g,t){return ASM_CONSTS[i](u,f,c,g,t)}STATIC_BASE=Runtime.GLOBAL_BASE,STATICTOP=STATIC_BASE+12800,__ATINIT__.push({func:function(){__GLOBAL__sub_I_Yoga_cpp()}},{func:function(){__GLOBAL__sub_I_nbind_cc()}},{func:function(){__GLOBAL__sub_I_common_cc()}},{func:function(){__GLOBAL__sub_I_Binding_cc()}}),allocate([0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,127,0,0,192,127,0,0,192,127,0,0,192,127,3,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,3,0,0,0,0,0,192,127,3,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,127,0,0,192,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,127,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,127,0,0,192,127,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,128,191,0,0,128,191,0,0,192,127,0,0,0,0,0,0,0,0,0,0,128,63,1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,3,0,0,0,1,0,0,0,2,0,0,0,0,0,0,0,190,12,0,0,200,12,0,0,208,12,0,0,216,12,0,0,230,12,0,0,242,12,0,0,1,0,0,0,3,0,0,0,0,0,0,0,2,0,0,0,0,0,192,127,3,0,0,0,180,45,0,0,181,45,0,0,182,45,0,0,181,45,0,0,182,45,0,0,0,0,0,0,0,0,0,0,1,0,0,0,2,0,0,0,3,0,0,0,1,0,0,0,4,0,0,0,183,45,0,0,181,45,0,0,181,45,0,0,181,45,0,0,181,45,0,0,181,45,0,0,181,45,0,0,184,45,0,0,185,45,0,0,181,45,0,0,181,45,0,0,182,45,0,0,186,45,0,0,185,45,0,0,148,4,0,0,3,0,0,0,187,45,0,0,164,4,0,0,188,45,0,0,2,0,0,0,189,45,0,0,164,4,0,0,188,45,0,0,185,45,0,0,164,4,0,0,185,45,0,0,164,4,0,0,188,45,0,0,181,45,0,0,182,45,0,0,181,45,0,0,0,0,0,0,0,0,0,0,1,0,0,0,5,0,0,0,6,0,0,0,1,0,0,0,7,0,0,0,183,45,0,0,182,45,0,0,181,45,0,0,190,45,0,0,190,45,0,0,182,45,0,0,182,45,0,0,185,45,0,0,181,45,0,0,185,45,0,0,182,45,0,0,181,45,0,0,185,45,0,0,182,45,0,0,185,45,0,0,48,5,0,0,3,0,0,0,56,5,0,0,1,0,0,0,189,45,0,0,185,45,0,0,164,4,0,0,76,5,0,0,2,0,0,0,191,45,0,0,186,45,0,0,182,45,0,0,185,45,0,0,192,45,0,0,185,45,0,0,182,45,0,0,186,45,0,0,185,45,0,0,76,5,0,0,76,5,0,0,136,5,0,0,182,45,0,0,181,45,0,0,2,0,0,0,190,45,0,0,136,5,0,0,56,19,0,0,156,5,0,0,2,0,0,0,184,45,0,0,0,0,0,0,0,0,0,0,1,0,0,0,8,0,0,0,9,0,0,0,1,0,0,0,10,0,0,0,204,5,0,0,181,45,0,0,181,45,0,0,2,0,0,0,180,45,0,0,204,5,0,0,2,0,0,0,195,45,0,0,236,5,0,0,97,19,0,0,198,45,0,0,211,45,0,0,212,45,0,0,213,45,0,0,214,45,0,0,215,45,0,0,188,45,0,0,182,45,0,0,216,45,0,0,217,45,0,0,218,45,0,0,219,45,0,0,192,45,0,0,181,45,0,0,0,0,0,0,185,45,0,0,110,19,0,0,186,45,0,0,115,19,0,0,221,45,0,0,120,19,0,0,148,4,0,0,132,19,0,0,96,6,0,0,145,19,0,0,222,45,0,0,164,19,0,0,223,45,0,0,173,19,0,0,0,0,0,0,3,0,0,0,104,6,0,0,1,0,0,0,187,45,0,0,0,0,0,0,0,0,0,0,1,0,0,0,11,0,0,0,12,0,0,0,1,0,0,0,13,0,0,0,185,45,0,0,224,45,0,0,164,6,0,0,188,45,0,0,172,6,0,0,180,6,0,0,2,0,0,0,188,6,0,0,7,0,0,0,224,45,0,0,7,0,0,0,164,6,0,0,1,0,0,0,213,45,0,0,185,45,0,0,224,45,0,0,172,6,0,0,185,45,0,0,224,45,0,0,164,6,0,0,185,45,0,0,224,45,0,0,211,45,0,0,211,45,0,0,222,45,0,0,211,45,0,0,224,45,0,0,222,45,0,0,211,45,0,0,224,45,0,0,172,6,0,0,222,45,0,0,211,45,0,0,224,45,0,0,188,45,0,0,222,45,0,0,211,45,0,0,40,7,0,0,188,45,0,0,2,0,0,0,224,45,0,0,185,45,0,0,188,45,0,0,188,45,0,0,188,45,0,0,188,45,0,0,222,45,0,0,224,45,0,0,148,4,0,0,185,45,0,0,148,4,0,0,148,4,0,0,148,4,0,0,148,4,0,0,148,4,0,0,185,45,0,0,164,6,0,0,148,4,0,0,0,0,0,0,0,0,0,0,1,0,0,0,14,0,0,0,15,0,0,0,1,0,0,0,16,0,0,0,148,7,0,0,2,0,0,0,225,45,0,0,183,45,0,0,188,45,0,0,168,7,0,0,5,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,2,0,0,0,234,45,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,148,45,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,9,0,0,5,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,2,0,0,0,242,45,0,0,0,4,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,67,111,117,108,100,32,110,111,116,32,97,108,108,111,99,97,116,101,32,109,101,109,111,114,121,32,102,111,114,32,110,111,100,101,0,67,97,110,110,111,116,32,114,101,115,101,116,32,97,32,110,111,100,101,32,119,104,105,99,104,32,115,116,105,108,108,32,104,97,115,32,99,104,105,108,100,114,101,110,32,97,116,116,97,99,104,101,100,0,67,97,110,110,111,116,32,114,101,115,101,116,32,97,32,110,111,100,101,32,115,116,105,108,108,32,97,116,116,97,99,104,101,100,32,116,111,32,97,32,112,97,114,101,110,116,0,67,111,117,108,100,32,110,111,116,32,97,108,108,111,99,97,116,101,32,109,101,109,111,114,121,32,102,111,114,32,99,111,110,102,105,103,0,67,97,110,110,111,116,32,115,101,116,32,109,101,97,115,117,114,101,32,102,117,110,99,116,105,111,110,58,32,78,111,100,101,115,32,119,105,116,104,32,109,101,97,115,117,114,101,32,102,117,110,99,116,105,111,110,115,32,99,97,110,110,111,116,32,104,97,118,101,32,99,104,105,108,100,114,101,110,46,0,67,104,105,108,100,32,97,108,114,101,97,100,121,32,104,97,115,32,97,32,112,97,114,101,110,116,44,32,105,116,32,109,117,115,116,32,98,101,32,114,101,109,111,118,101,100,32,102,105,114,115,116,46,0,67,97,110,110,111,116,32,97,100,100,32,99,104,105,108,100,58,32,78,111,100,101,115,32,119,105,116,104,32,109,101,97,115,117,114,101,32,102,117,110,99,116,105,111,110,115,32,99,97,110,110,111,116,32,104,97,118,101,32,99,104,105,108,100,114,101,110,46,0,79,110,108,121,32,108,101,97,102,32,110,111,100,101,115,32,119,105,116,104,32,99,117,115,116,111,109,32,109,101,97,115,117,114,101,32,102,117,110,99,116,105,111,110,115,115,104,111,117,108,100,32,109,97,110,117,97,108,108,121,32,109,97,114,107,32,116,104,101,109,115,101,108,118,101,115,32,97,115,32,100,105,114,116,121,0,67,97,110,110,111,116,32,103,101,116,32,108,97,121,111,117,116,32,112,114,111,112,101,114,116,105,101,115,32,111,102,32,109,117,108,116,105,45,101,100,103,101,32,115,104,111,114,116,104,97,110,100,115,0,37,115,37,100,46,123,91,115,107,105,112,112,101,100,93,32,0,119,109,58,32,37,115,44,32,104,109,58,32,37,115,44,32,97,119,58,32,37,102,32,97,104,58,32,37,102,32,61,62,32,100,58,32,40,37,102,44,32,37,102,41,32,37,115,10,0,37,115,37,100,46,123,37,115,0,42,0,119,109,58,32,37,115,44,32,104,109,58,32,37,115,44,32,97,119,58,32,37,102,32,97,104,58,32,37,102,32,37,115,10,0,37,115,37,100,46,125,37,115,0,119,109,58,32,37,115,44,32,104,109,58,32,37,115,44,32,100,58,32,40,37,102,44,32,37,102,41,32,37,115,10,0,79,117,116,32,111,102,32,99,97,99,104,101,32,101,110,116,114,105,101,115,33,10,0,83,99,97,108,101,32,102,97,99,116,111,114,32,115,104,111,117,108,100,32,110,111,116,32,98,101,32,108,101,115,115,32,116,104,97,110,32,122,101,114,111,0,105,110,105,116,105,97,108,0,37,115,10,0,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,0,85,78,68,69,70,73,78,69,68,0,69,88,65,67,84,76,89,0,65,84,95,77,79,83,84,0,76,65,89,95,85,78,68,69,70,73,78,69,68,0,76,65,89,95,69,88,65,67,84,76,89,0,76,65,89,95,65,84,95,77,79,83,84,0,97,118,97,105,108,97,98,108,101,87,105,100,116,104,32,105,115,32,105,110,100,101,102,105,110,105,116,101,32,115,111,32,119,105,100,116,104,77,101,97,115,117,114,101,77,111,100,101,32,109,117,115,116,32,98,101,32,89,71,77,101,97,115,117,114,101,77,111,100,101,85,110,100,101,102,105,110,101,100,0,97,118,97,105,108,97,98,108,101,72,101,105,103,104,116,32,105,115,32,105,110,100,101,102,105,110,105,116,101,32,115,111,32,104,101,105,103,104,116,77,101,97,115,117,114,101,77,111,100,101,32,109,117,115,116,32,98,101,32,89,71,77,101,97,115,117,114,101,77,111,100,101,85,110,100,101,102,105,110,101,100,0,102,108,101,120,0,115,116,114,101,116,99,104,0,109,117,108,116,105,108,105,110,101,45,115,116,114,101,116,99,104,0,69,120,112,101,99,116,101,100,32,110,111,100,101,32,116,111,32,104,97,118,101,32,99,117,115,116,111,109,32,109,101,97,115,117,114,101,32,102,117,110,99,116,105,111,110,0,109,101,97,115,117,114,101,0,69,120,112,101,99,116,32,99,117,115,116,111,109,32,98,97,115,101,108,105,110,101,32,102,117,110,99,116,105,111,110,32,116,111,32,110,111,116,32,114,101,116,117,114,110,32,78,97,78,0,97,98,115,45,109,101,97,115,117,114,101,0,97,98,115,45,108,97,121,111,117,116,0,78,111,100,101,0,99,114,101,97,116,101,68,101,102,97,117,108,116,0,99,114,101,97,116,101,87,105,116,104,67,111,110,102,105,103,0,100,101,115,116,114,111,121,0,114,101,115,101,116,0,99,111,112,121,83,116,121,108,101,0,115,101,116,80,111,115,105,116,105,111,110,84,121,112,101,0,115,101,116,80,111,115,105,116,105,111,110,0,115,101,116,80,111,115,105,116,105,111,110,80,101,114,99,101,110,116,0,115,101,116,65,108,105,103,110,67,111,110,116,101,110,116,0,115,101,116,65,108,105,103,110,73,116,101,109,115,0,115,101,116,65,108,105,103,110,83,101,108,102,0,115,101,116,70,108,101,120,68,105,114,101,99,116,105,111,110,0,115,101,116,70,108,101,120,87,114,97,112,0,115,101,116,74,117,115,116,105,102,121,67,111,110,116,101,110,116,0,115,101,116,77,97,114,103,105,110,0,115,101,116,77,97,114,103,105,110,80,101,114,99,101,110,116,0,115,101,116,77,97,114,103,105,110,65,117,116,111,0,115,101,116,79,118,101,114,102,108,111,119,0,115,101,116,68,105,115,112,108,97,121,0,115,101,116,70,108,101,120,0,115,101,116,70,108,101,120,66,97,115,105,115,0,115,101,116,70,108,101,120,66,97,115,105,115,80,101,114,99,101,110,116,0,115,101,116,70,108,101,120,71,114,111,119,0,115,101,116,70,108,101,120,83,104,114,105,110,107,0,115,101,116,87,105,100,116,104,0,115,101,116,87,105,100,116,104,80,101,114,99,101,110,116,0,115,101,116,87,105,100,116,104,65,117,116,111,0,115,101,116,72,101,105,103,104,116,0,115,101,116,72,101,105,103,104,116,80,101,114,99,101,110,116,0,115,101,116,72,101,105,103,104,116,65,117,116,111,0,115,101,116,77,105,110,87,105,100,116,104,0,115,101,116,77,105,110,87,105,100,116,104,80,101,114,99,101,110,116,0,115,101,116,77,105,110,72,101,105,103,104,116,0,115,101,116,77,105,110,72,101,105,103,104,116,80,101,114,99,101,110,116,0,115,101,116,77,97,120,87,105,100,116,104,0,115,101,116,77,97,120,87,105,100,116,104,80,101,114,99,101,110,116,0,115,101,116,77,97,120,72,101,105,103,104,116,0,115,101,116,77,97,120,72,101,105,103,104,116,80,101,114,99,101,110,116,0,115,101,116,65,115,112,101,99,116,82,97,116,105,111,0,115,101,116,66,111,114,100,101,114,0,115,101,116,80,97,100,100,105,110,103,0,115,101,116,80,97,100,100,105,110,103,80,101,114,99,101,110,116,0,103,101,116,80,111,115,105,116,105,111,110,84,121,112,101,0,103,101,116,80,111,115,105,116,105,111,110,0,103,101,116,65,108,105,103,110,67,111,110,116,101,110,116,0,103,101,116,65,108,105,103,110,73,116,101,109,115,0,103,101,116,65,108,105,103,110,83,101,108,102,0,103,101,116,70,108,101,120,68,105,114,101,99,116,105,111,110,0,103,101,116,70,108,101,120,87,114,97,112,0,103,101,116,74,117,115,116,105,102,121,67,111,110,116,101,110,116,0,103,101,116,77,97,114,103,105,110,0,103,101,116,70,108,101,120,66,97,115,105,115,0,103,101,116,70,108,101,120,71,114,111,119,0,103,101,116,70,108,101,120,83,104,114,105,110,107,0,103,101,116,87,105,100,116,104,0,103,101,116,72,101,105,103,104,116,0,103,101,116,77,105,110,87,105,100,116,104,0,103,101,116,77,105,110,72,101,105,103,104,116,0,103,101,116,77,97,120,87,105,100,116,104,0,103,101,116,77,97,120,72,101,105,103,104,116,0,103,101,116,65,115,112,101,99,116,82,97,116,105,111,0,103,101,116,66,111,114,100,101,114,0,103,101,116,79,118,101,114,102,108,111,119,0,103,101,116,68,105,115,112,108,97,121,0,103,101,116,80,97,100,100,105,110,103,0,105,110,115,101,114,116,67,104,105,108,100,0,114,101,109,111,118,101,67,104,105,108,100,0,103,101,116,67,104,105,108,100,67,111,117,110,116,0,103,101,116,80,97,114,101,110,116,0,103,101,116,67,104,105,108,100,0,115,101,116,77,101,97,115,117,114,101,70,117,110,99,0,117,110,115,101,116,77,101,97,115,117,114,101,70,117,110,99,0,109,97,114,107,68,105,114,116,121,0,105,115,68,105,114,116,121,0,99,97,108,99,117,108,97,116,101,76,97,121,111,117,116,0,103,101,116,67,111,109,112,117,116,101,100,76,101,102,116,0,103,101,116,67,111,109,112,117,116,101,100,82,105,103,104,116,0,103,101,116,67,111,109,112,117,116,101,100,84,111,112,0,103,101,116,67,111,109,112,117,116,101,100,66,111,116,116,111,109,0,103,101,116,67,111,109,112,117,116,101,100,87,105,100,116,104,0,103,101,116,67,111,109,112,117,116,101,100,72,101,105,103,104,116,0,103,101,116,67,111,109,112,117,116,101,100,76,97,121,111,117,116,0,103,101,116,67,111,109,112,117,116,101,100,77,97,114,103,105,110,0,103,101,116,67,111,109,112,117,116,101,100,66,111,114,100,101,114,0,103,101,116,67,111,109,112,117,116,101,100,80,97,100,100,105,110,103,0,67,111,110,102,105,103,0,99,114,101,97,116,101,0,115,101,116,69,120,112,101,114,105,109,101,110,116,97,108,70,101,97,116,117,114,101,69,110,97,98,108,101,100,0,115,101,116,80,111,105,110,116,83,99,97,108,101,70,97,99,116,111,114,0,105,115,69,120,112,101,114,105,109,101,110,116,97,108,70,101,97,116,117,114,101,69,110,97,98,108,101,100,0,86,97,108,117,101,0,76,97,121,111,117,116,0,83,105,122,101,0,103,101,116,73,110,115,116,97,110,99,101,67,111,117,110,116,0,73,110,116,54,52,0,1,1,1,2,2,4,4,4,4,8,8,4,8,118,111,105,100,0,98,111,111,108,0,115,116,100,58,58,115,116,114,105,110,103,0,99,98,70,117,110,99,116,105,111,110,32,38,0,99,111,110,115,116,32,99,98,70,117,110,99,116,105,111,110,32,38,0,69,120,116,101,114,110,97,108,0,66,117,102,102,101,114,0,78,66,105,110,100,73,68,0,78,66,105,110,100,0,98,105,110,100,95,118,97,108,117,101,0,114,101,102,108,101,99,116,0,113,117,101,114,121,84,121,112,101,0,108,97,108,108,111,99,0,108,114,101,115,101,116,0,123,114,101,116,117,114,110,40,95,110,98,105,110,100,46,99,97,108,108,98,97,99,107,83,105,103,110,97,116,117,114,101,76,105,115,116,91,36,48,93,46,97,112,112,108,121,40,116,104,105,115,44,97,114,103,117,109,101,110,116,115,41,41,59,125,0,95,110,98,105,110,100,95,110,101,119,0,17,0,10,0,17,17,17,0,0,0,0,5,0,0,0,0,0,0,9,0,0,0,0,11,0,0,0,0,0,0,0,0,17,0,15,10,17,17,17,3,10,7,0,1,19,9,11,11,0,0,9,6,11,0,0,11,0,6,17,0,0,0,17,17,17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,0,0,0,0,0,0,0,0,17,0,10,10,17,17,17,0,10,0,0,2,0,9,11,0,0,0,9,0,11,0,0,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,12,0,0,0,0,9,12,0,0,0,0,0,12,0,0,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,0,0,0,0,0,0,0,0,0,0,0,13,0,0,0,4,13,0,0,0,0,9,14,0,0,0,0,0,14,0,0,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,15,0,0,0,0,15,0,0,0,0,9,16,0,0,0,0,0,16,0,0,16,0,0,18,0,0,0,18,18,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,18,0,0,0,18,18,18,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,0,0,0,0,0,0,0,0,0,0,0,10,0,0,0,0,10,0,0,0,0,9,11,0,0,0,0,0,11,0,0,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,12,0,0,0,0,9,12,0,0,0,0,0,12,0,0,12,0,0,45,43,32,32,32,48,88,48,120,0,40,110,117,108,108,41,0,45,48,88,43,48,88,32,48,88,45,48,120,43,48,120,32,48,120,0,105,110,102,0,73,78,70,0,110,97,110,0,78,65,78,0,48,49,50,51,52,53,54,55,56,57,65,66,67,68,69,70,46,0,84,33,34,25,13,1,2,3,17,75,28,12,16,4,11,29,18,30,39,104,110,111,112,113,98,32,5,6,15,19,20,21,26,8,22,7,40,36,23,24,9,10,14,27,31,37,35,131,130,125,38,42,43,60,61,62,63,67,71,74,77,88,89,90,91,92,93,94,95,96,97,99,100,101,102,103,105,106,107,108,114,115,116,121,122,123,124,0,73,108,108,101,103,97,108,32,98,121,116,101,32,115,101,113,117,101,110,99,101,0,68,111,109,97,105,110,32,101,114,114,111,114,0,82,101,115,117,108,116,32,110,111,116,32,114,101,112,114,101,115,101,110,116,97,98,108,101,0,78,111,116,32,97,32,116,116,121,0,80,101,114,109,105,115,115,105,111,110,32,100,101,110,105,101,100,0,79,112,101,114,97,116,105,111,110,32,110,111,116,32,112,101,114,109,105,116,116,101,100,0,78,111,32,115,117,99,104,32,102,105,108,101,32,111,114,32,100,105,114,101,99,116,111,114,121,0,78,111,32,115,117,99,104,32,112,114,111,99,101,115,115,0,70,105,108,101,32,101,120,105,115,116,115,0,86,97,108,117,101,32,116,111,111,32,108,97,114,103,101,32,102,111,114,32,100,97,116,97,32,116,121,112,101,0,78,111,32,115,112,97,99,101,32,108,101,102,116,32,111,110,32,100,101,118,105,99,101,0,79,117,116,32,111,102,32,109,101,109,111,114,121,0,82,101,115,111,117,114,99,101,32,98,117,115,121,0,73,110,116,101,114,114,117,112,116,101,100,32,115,121,115,116,101,109,32,99,97,108,108,0,82,101,115,111,117,114,99,101,32,116,101,109,112,111,114,97,114,105,108,121,32,117,110,97,118,97,105,108,97,98,108,101,0,73,110,118,97,108,105,100,32,115,101,101,107,0,67,114,111,115,115,45,100,101,118,105,99,101,32,108,105,110,107,0,82,101,97,100,45,111,110,108,121,32,102,105,108,101,32,115,121,115,116,101,109,0,68,105,114,101,99,116,111,114,121,32,110,111,116,32,101,109,112,116,121,0,67,111,110,110,101,99,116,105,111,110,32,114,101,115,101,116,32,98,121,32,112,101,101,114,0,79,112,101,114,97,116,105,111,110,32,116,105,109,101,100,32,111,117,116,0,67,111,110,110,101,99,116,105,111,110,32,114,101,102,117,115,101,100,0,72,111,115,116,32,105,115,32,100,111,119,110,0,72,111,115,116,32,105,115,32,117,110,114,101,97,99,104,97,98,108,101,0,65,100,100,114,101,115,115,32,105,110,32,117,115,101,0,66,114,111,107,101,110,32,112,105,112,101,0,73,47,79,32,101,114,114,111,114,0,78,111,32,115,117,99,104,32,100,101,118,105,99,101,32,111,114,32,97,100,100,114,101,115,115,0,66,108,111,99,107,32,100,101,118,105,99,101,32,114,101,113,117,105,114,101,100,0,78,111,32,115,117,99,104,32,100,101,118,105,99,101,0,78,111,116,32,97,32,100,105,114,101,99,116,111,114,121,0,73,115,32,97,32,100,105,114,101,99,116,111,114,121,0,84,101,120,116,32,102,105,108,101,32,98,117,115,121,0,69,120,101,99,32,102,111,114,109,97,116,32,101,114,114,111,114,0,73,110,118,97,108,105,100,32,97,114,103,117,109,101,110,116,0,65,114,103,117,109,101,110,116,32,108,105,115,116,32,116,111,111,32,108,111,110,103,0,83,121,109,98,111,108,105,99,32,108,105,110,107,32,108,111,111,112,0,70,105,108,101,110,97,109,101,32,116,111,111,32,108,111,110,103,0,84,111,111,32,109,97,110,121,32,111,112,101,110,32,102,105,108,101,115,32,105,110,32,115,121,115,116,101,109,0,78,111,32,102,105,108,101,32,100,101,115,99,114,105,112,116,111,114,115,32,97,118,97,105,108,97,98,108,101,0,66,97,100,32,102,105,108,101,32,100,101,115,99,114,105,112,116,111,114,0,78,111,32,99,104,105,108,100,32,112,114,111,99,101,115,115,0,66,97,100,32,97,100,100,114,101,115,115,0,70,105,108,101,32,116,111,111,32,108,97,114,103,101,0,84,111,111,32,109,97,110,121,32,108,105,110,107,115,0,78,111,32,108,111,99,107,115,32,97,118,97,105,108,97,98,108,101,0,82,101,115,111,117,114,99,101,32,100,101,97,100,108,111,99,107,32,119,111,117,108,100,32,111,99,99,117,114,0,83,116,97,116,101,32,110,111,116,32,114,101,99,111,118,101,114,97,98,108,101,0,80,114,101,118,105,111,117,115,32,111,119,110,101,114,32,100,105,101,100,0,79,112,101,114,97,116,105,111,110,32,99,97,110,99,101,108,101,100,0,70,117,110,99,116,105,111,110,32,110,111,116,32,105,109,112,108,101,109,101,110,116,101,100,0,78,111,32,109,101,115,115,97,103,101,32,111,102,32,100,101,115,105,114,101,100,32,116,121,112,101,0,73,100,101,110,116,105,102,105,101,114,32,114,101,109,111,118,101,100,0,68,101,118,105,99,101,32,110,111,116,32,97,32,115,116,114,101,97,109,0,78,111,32,100,97,116,97,32,97,118,97,105,108,97,98,108,101,0,68,101,118,105,99,101,32,116,105,109,101,111,117,116,0,79,117,116,32,111,102,32,115,116,114,101,97,109,115,32,114,101,115,111,117,114,99,101,115,0,76,105,110,107,32,104,97,115,32,98,101,101,110,32,115,101,118,101,114,101,100,0,80,114,111,116,111,99,111,108,32,101,114,114,111,114,0,66,97,100,32,109,101,115,115,97,103,101,0,70,105,108,101,32,100,101,115,99,114,105,112,116,111,114,32,105,110,32,98,97,100,32,115,116,97,116,101,0,78,111,116,32,97,32,115,111,99,107,101,116,0,68,101,115,116,105,110,97,116,105,111,110,32,97,100,100,114,101,115,115,32,114,101,113,117,105,114,101,100,0,77,101,115,115,97,103,101,32,116,111,111,32,108,97,114,103,101,0,80,114,111,116,111,99,111,108,32,119,114,111,110,103,32,116,121,112,101,32,102,111,114,32,115,111,99,107,101,116,0,80,114,111,116,111,99,111,108,32,110,111,116,32,97,118,97,105,108,97,98,108,101,0,80,114,111,116,111,99,111,108,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,83,111,99,107,101,116,32,116,121,112,101,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,78,111,116,32,115,117,112,112,111,114,116,101,100,0,80,114,111,116,111,99,111,108,32,102,97,109,105,108,121,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,65,100,100,114,101,115,115,32,102,97,109,105,108,121,32,110,111,116,32,115,117,112,112,111,114,116,101,100,32,98,121,32,112,114,111,116,111,99,111,108,0,65,100,100,114,101,115,115,32,110,111,116,32,97,118,97,105,108,97,98,108,101,0,78,101,116,119,111,114,107,32,105,115,32,100,111,119,110,0,78,101,116,119,111,114,107,32,117,110,114,101,97,99,104,97,98,108,101,0,67,111,110,110,101,99,116,105,111,110,32,114,101,115,101,116,32,98,121,32,110,101,116,119,111,114,107,0,67,111,110,110,101,99,116,105,111,110,32,97,98,111,114,116,101,100,0,78,111,32,98,117,102,102,101,114,32,115,112,97,99,101,32,97,118,97,105,108,97,98,108,101,0,83,111,99,107,101,116,32,105,115,32,99,111,110,110,101,99,116,101,100,0,83,111,99,107,101,116,32,110,111,116,32,99,111,110,110,101,99,116,101,100,0,67,97,110,110,111,116,32,115,101,110,100,32,97,102,116,101,114,32,115,111,99,107,101,116,32,115,104,117,116,100,111,119,110,0,79,112,101,114,97,116,105,111,110,32,97,108,114,101,97,100,121,32,105,110,32,112,114,111,103,114,101,115,115,0,79,112,101,114,97,116,105,111,110,32,105,110,32,112,114,111,103,114,101,115,115,0,83,116,97,108,101,32,102,105,108,101,32,104,97,110,100,108,101,0,82,101,109,111,116,101,32,73,47,79,32,101,114,114,111,114,0,81,117,111,116,97,32,101,120,99,101,101,100,101,100,0,78,111,32,109,101,100,105,117,109,32,102,111,117,110,100,0,87,114,111,110,103,32,109,101,100,105,117,109,32,116,121,112,101,0,78,111,32,101,114,114,111,114,32,105,110,102,111,114,109,97,116,105,111,110,0,0],"i8",ALLOC_NONE,Runtime.GLOBAL_BASE);var tempDoublePtr=STATICTOP;STATICTOP+=16;function _atexit(i,u){__ATEXIT__.unshift({func:i,arg:u})}function ___cxa_atexit(){return _atexit.apply(null,arguments)}function _abort(){Module.abort()}function __ZN8facebook4yoga14YGNodeToStringEPNSt3__212basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEP6YGNode14YGPrintOptionsj(){Module.printErr("missing function: _ZN8facebook4yoga14YGNodeToStringEPNSt3__212basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEP6YGNode14YGPrintOptionsj"),abort(-1)}function __decorate(i,u,f,c){var g=arguments.length,t=g<3?u:c===null?c=Object.getOwnPropertyDescriptor(u,f):c,C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(i,u,f,c);else for(var A=i.length-1;A>=0;A--)(C=i[A])&&(t=(g<3?C(t):g>3?C(u,f,t):C(u,f))||t);return g>3&&t&&Object.defineProperty(u,f,t),t}function _defineHidden(i){return function(u,f){Object.defineProperty(u,f,{configurable:!1,enumerable:!1,value:i,writable:!0})}}var _nbind={};function __nbind_free_external(i){_nbind.externalList[i].dereference(i)}function __nbind_reference_external(i){_nbind.externalList[i].reference()}function _llvm_stackrestore(i){var u=_llvm_stacksave,f=u.LLVM_SAVEDSTACKS[i];u.LLVM_SAVEDSTACKS.splice(i,1),Runtime.stackRestore(f)}function __nbind_register_pool(i,u,f,c){_nbind.Pool.pageSize=i,_nbind.Pool.usedPtr=u/4,_nbind.Pool.rootPtr=f,_nbind.Pool.pagePtr=c/4,HEAP32[u/4]=16909060,HEAP8[u]==1&&(_nbind.bigEndian=!0),HEAP32[u/4]=0,_nbind.makeTypeKindTbl=(t={},t[1024]=_nbind.PrimitiveType,t[64]=_nbind.Int64Type,t[2048]=_nbind.BindClass,t[3072]=_nbind.BindClassPtr,t[4096]=_nbind.SharedClassPtr,t[5120]=_nbind.ArrayType,t[6144]=_nbind.ArrayType,t[7168]=_nbind.CStringType,t[9216]=_nbind.CallbackType,t[10240]=_nbind.BindType,t),_nbind.makeTypeNameTbl={Buffer:_nbind.BufferType,External:_nbind.ExternalType,Int64:_nbind.Int64Type,_nbind_new:_nbind.CreateValueType,bool:_nbind.BooleanType,"cbFunction &":_nbind.CallbackType,"const cbFunction &":_nbind.CallbackType,"const std::string &":_nbind.StringType,"std::string":_nbind.StringType},Module.toggleLightGC=_nbind.toggleLightGC,_nbind.callUpcast=Module.dynCall_ii;var g=_nbind.makeType(_nbind.constructType,{flags:2048,id:0,name:""});g.proto=Module,_nbind.BindClass.list.push(g);var t}function _emscripten_set_main_loop_timing(i,u){if(Browser.mainLoop.timingMode=i,Browser.mainLoop.timingValue=u,!Browser.mainLoop.func)return 1;if(i==0)Browser.mainLoop.scheduler=function(){var C=Math.max(0,Browser.mainLoop.tickStartTime+u-_emscripten_get_now())|0;setTimeout(Browser.mainLoop.runner,C)},Browser.mainLoop.method="timeout";else if(i==1)Browser.mainLoop.scheduler=function(){Browser.requestAnimationFrame(Browser.mainLoop.runner)},Browser.mainLoop.method="rAF";else if(i==2){if(!window.setImmediate){let t=function(C){C.source===window&&C.data===c&&(C.stopPropagation(),f.shift()())};var g=t,f=[],c="setimmediate";window.addEventListener("message",t,!0),window.setImmediate=function(A){f.push(A),ENVIRONMENT_IS_WORKER?(Module.setImmediates===void 0&&(Module.setImmediates=[]),Module.setImmediates.push(A),window.postMessage({target:c})):window.postMessage(c,"*")}}Browser.mainLoop.scheduler=function(){window.setImmediate(Browser.mainLoop.runner)},Browser.mainLoop.method="immediate"}return 0}function _emscripten_get_now(){abort()}function _emscripten_set_main_loop(i,u,f,c,g){Module.noExitRuntime=!0,assert(!Browser.mainLoop.func,"emscripten_set_main_loop: there can only be one main loop function at once: call emscripten_cancel_main_loop to cancel the previous one before setting a new one with different parameters."),Browser.mainLoop.func=i,Browser.mainLoop.arg=c;var t;typeof c!="undefined"?t=function(){Module.dynCall_vi(i,c)}:t=function(){Module.dynCall_v(i)};var C=Browser.mainLoop.currentlyRunningMainloop;if(Browser.mainLoop.runner=function(){if(!ABORT){if(Browser.mainLoop.queue.length>0){var x=Date.now(),D=Browser.mainLoop.queue.shift();if(D.func(D.arg),Browser.mainLoop.remainingBlockers){var L=Browser.mainLoop.remainingBlockers,N=L%1==0?L-1:Math.floor(L);D.counted?Browser.mainLoop.remainingBlockers=N:(N=N+.5,Browser.mainLoop.remainingBlockers=(8*L+N)/9)}if(console.log('main loop blocker "'+D.name+'" took '+(Date.now()-x)+" ms"),Browser.mainLoop.updateStatus(),C1&&Browser.mainLoop.currentFrameNumber%Browser.mainLoop.timingValue!=0){Browser.mainLoop.scheduler();return}else Browser.mainLoop.timingMode==0&&(Browser.mainLoop.tickStartTime=_emscripten_get_now());Browser.mainLoop.method==="timeout"&&Module.ctx&&(Module.printErr("Looks like you are rendering without using requestAnimationFrame for the main loop. You should use 0 for the frame rate in emscripten_set_main_loop in order to use requestAnimationFrame, as that can greatly improve your frame rates!"),Browser.mainLoop.method=""),Browser.mainLoop.runIter(t),!(C0?_emscripten_set_main_loop_timing(0,1e3/u):_emscripten_set_main_loop_timing(1,1),Browser.mainLoop.scheduler()),f)throw"SimulateInfiniteLoop"}var Browser={mainLoop:{scheduler:null,method:"",currentlyRunningMainloop:0,func:null,arg:0,timingMode:0,timingValue:0,currentFrameNumber:0,queue:[],pause:function(){Browser.mainLoop.scheduler=null,Browser.mainLoop.currentlyRunningMainloop++},resume:function(){Browser.mainLoop.currentlyRunningMainloop++;var i=Browser.mainLoop.timingMode,u=Browser.mainLoop.timingValue,f=Browser.mainLoop.func;Browser.mainLoop.func=null,_emscripten_set_main_loop(f,0,!1,Browser.mainLoop.arg,!0),_emscripten_set_main_loop_timing(i,u),Browser.mainLoop.scheduler()},updateStatus:function(){if(Module.setStatus){var i=Module.statusMessage||"Please wait...",u=Browser.mainLoop.remainingBlockers,f=Browser.mainLoop.expectedBlockers;u?u=6;){var Le=J>>Te-6&63;Te-=6,De+=Se[Le]}return Te==2?(De+=Se[(J&3)<<4],De+=me+me):Te==4&&(De+=Se[(J&15)<<2],De+=me),De}h.src="data:audio/x-"+C.substr(-3)+";base64,"+Q(t),L(h)},h.src=$,Browser.safeSetTimeout(function(){L(h)},1e4)}else return N()},Module.preloadPlugins.push(u);function f(){Browser.pointerLock=document.pointerLockElement===Module.canvas||document.mozPointerLockElement===Module.canvas||document.webkitPointerLockElement===Module.canvas||document.msPointerLockElement===Module.canvas}var c=Module.canvas;c&&(c.requestPointerLock=c.requestPointerLock||c.mozRequestPointerLock||c.webkitRequestPointerLock||c.msRequestPointerLock||function(){},c.exitPointerLock=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock||document.msExitPointerLock||function(){},c.exitPointerLock=c.exitPointerLock.bind(document),document.addEventListener("pointerlockchange",f,!1),document.addEventListener("mozpointerlockchange",f,!1),document.addEventListener("webkitpointerlockchange",f,!1),document.addEventListener("mspointerlockchange",f,!1),Module.elementPointerLock&&c.addEventListener("click",function(g){!Browser.pointerLock&&Module.canvas.requestPointerLock&&(Module.canvas.requestPointerLock(),g.preventDefault())},!1))},createContext:function(i,u,f,c){if(u&&Module.ctx&&i==Module.canvas)return Module.ctx;var g,t;if(u){var C={antialias:!1,alpha:!1};if(c)for(var A in c)C[A]=c[A];t=GL.createContext(i,C),t&&(g=GL.getContext(t).GLctx)}else g=i.getContext("2d");return g?(f&&(u||assert(typeof GLctx=="undefined","cannot set in module if GLctx is used, but we are a non-GL context that would replace it"),Module.ctx=g,u&&GL.makeContextCurrent(t),Module.useWebGL=u,Browser.moduleContextCreatedCallbacks.forEach(function(x){x()}),Browser.init()),g):null},destroyContext:function(i,u,f){},fullscreenHandlersInstalled:!1,lockPointer:void 0,resizeCanvas:void 0,requestFullscreen:function(i,u,f){Browser.lockPointer=i,Browser.resizeCanvas=u,Browser.vrDevice=f,typeof Browser.lockPointer=="undefined"&&(Browser.lockPointer=!0),typeof Browser.resizeCanvas=="undefined"&&(Browser.resizeCanvas=!1),typeof Browser.vrDevice=="undefined"&&(Browser.vrDevice=null);var c=Module.canvas;function g(){Browser.isFullscreen=!1;var C=c.parentNode;(document.fullscreenElement||document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement||document.webkitCurrentFullScreenElement)===C?(c.exitFullscreen=document.exitFullscreen||document.cancelFullScreen||document.mozCancelFullScreen||document.msExitFullscreen||document.webkitCancelFullScreen||function(){},c.exitFullscreen=c.exitFullscreen.bind(document),Browser.lockPointer&&c.requestPointerLock(),Browser.isFullscreen=!0,Browser.resizeCanvas&&Browser.setFullscreenCanvasSize()):(C.parentNode.insertBefore(c,C),C.parentNode.removeChild(C),Browser.resizeCanvas&&Browser.setWindowedCanvasSize()),Module.onFullScreen&&Module.onFullScreen(Browser.isFullscreen),Module.onFullscreen&&Module.onFullscreen(Browser.isFullscreen),Browser.updateCanvasDimensions(c)}Browser.fullscreenHandlersInstalled||(Browser.fullscreenHandlersInstalled=!0,document.addEventListener("fullscreenchange",g,!1),document.addEventListener("mozfullscreenchange",g,!1),document.addEventListener("webkitfullscreenchange",g,!1),document.addEventListener("MSFullscreenChange",g,!1));var t=document.createElement("div");c.parentNode.insertBefore(t,c),t.appendChild(c),t.requestFullscreen=t.requestFullscreen||t.mozRequestFullScreen||t.msRequestFullscreen||(t.webkitRequestFullscreen?function(){t.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT)}:null)||(t.webkitRequestFullScreen?function(){t.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT)}:null),f?t.requestFullscreen({vrDisplay:f}):t.requestFullscreen()},requestFullScreen:function(i,u,f){return Module.printErr("Browser.requestFullScreen() is deprecated. Please call Browser.requestFullscreen instead."),Browser.requestFullScreen=function(c,g,t){return Browser.requestFullscreen(c,g,t)},Browser.requestFullscreen(i,u,f)},nextRAF:0,fakeRequestAnimationFrame:function(i){var u=Date.now();if(Browser.nextRAF===0)Browser.nextRAF=u+1e3/60;else for(;u+2>=Browser.nextRAF;)Browser.nextRAF+=1e3/60;var f=Math.max(Browser.nextRAF-u,0);setTimeout(i,f)},requestAnimationFrame:function(u){typeof window=="undefined"?Browser.fakeRequestAnimationFrame(u):(window.requestAnimationFrame||(window.requestAnimationFrame=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame||Browser.fakeRequestAnimationFrame),window.requestAnimationFrame(u))},safeCallback:function(i){return function(){if(!ABORT)return i.apply(null,arguments)}},allowAsyncCallbacks:!0,queuedAsyncCallbacks:[],pauseAsyncCallbacks:function(){Browser.allowAsyncCallbacks=!1},resumeAsyncCallbacks:function(){if(Browser.allowAsyncCallbacks=!0,Browser.queuedAsyncCallbacks.length>0){var i=Browser.queuedAsyncCallbacks;Browser.queuedAsyncCallbacks=[],i.forEach(function(u){u()})}},safeRequestAnimationFrame:function(i){return Browser.requestAnimationFrame(function(){ABORT||(Browser.allowAsyncCallbacks?i():Browser.queuedAsyncCallbacks.push(i))})},safeSetTimeout:function(i,u){return Module.noExitRuntime=!0,setTimeout(function(){ABORT||(Browser.allowAsyncCallbacks?i():Browser.queuedAsyncCallbacks.push(i))},u)},safeSetInterval:function(i,u){return Module.noExitRuntime=!0,setInterval(function(){ABORT||Browser.allowAsyncCallbacks&&i()},u)},getMimetype:function(i){return{jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",bmp:"image/bmp",ogg:"audio/ogg",wav:"audio/wav",mp3:"audio/mpeg"}[i.substr(i.lastIndexOf(".")+1)]},getUserMedia:function(i){window.getUserMedia||(window.getUserMedia=navigator.getUserMedia||navigator.mozGetUserMedia),window.getUserMedia(i)},getMovementX:function(i){return i.movementX||i.mozMovementX||i.webkitMovementX||0},getMovementY:function(i){return i.movementY||i.mozMovementY||i.webkitMovementY||0},getMouseWheelDelta:function(i){var u=0;switch(i.type){case"DOMMouseScroll":u=i.detail;break;case"mousewheel":u=i.wheelDelta;break;case"wheel":u=i.deltaY;break;default:throw"unrecognized mouse wheel event: "+i.type}return u},mouseX:0,mouseY:0,mouseMovementX:0,mouseMovementY:0,touches:{},lastTouches:{},calculateMouseEvent:function(i){if(Browser.pointerLock)i.type!="mousemove"&&"mozMovementX"in i?Browser.mouseMovementX=Browser.mouseMovementY=0:(Browser.mouseMovementX=Browser.getMovementX(i),Browser.mouseMovementY=Browser.getMovementY(i)),typeof SDL!="undefined"?(Browser.mouseX=SDL.mouseX+Browser.mouseMovementX,Browser.mouseY=SDL.mouseY+Browser.mouseMovementY):(Browser.mouseX+=Browser.mouseMovementX,Browser.mouseY+=Browser.mouseMovementY);else{var u=Module.canvas.getBoundingClientRect(),f=Module.canvas.width,c=Module.canvas.height,g=typeof window.scrollX!="undefined"?window.scrollX:window.pageXOffset,t=typeof window.scrollY!="undefined"?window.scrollY:window.pageYOffset;if(i.type==="touchstart"||i.type==="touchend"||i.type==="touchmove"){var C=i.touch;if(C===void 0)return;var A=C.pageX-(g+u.left),x=C.pageY-(t+u.top);A=A*(f/u.width),x=x*(c/u.height);var D={x:A,y:x};if(i.type==="touchstart")Browser.lastTouches[C.identifier]=D,Browser.touches[C.identifier]=D;else if(i.type==="touchend"||i.type==="touchmove"){var L=Browser.touches[C.identifier];L||(L=D),Browser.lastTouches[C.identifier]=L,Browser.touches[C.identifier]=D}return}var N=i.pageX-(g+u.left),j=i.pageY-(t+u.top);N=N*(f/u.width),j=j*(c/u.height),Browser.mouseMovementX=N-Browser.mouseX,Browser.mouseMovementY=j-Browser.mouseY,Browser.mouseX=N,Browser.mouseY=j}},asyncLoad:function(i,u,f,c){var g=c?"":getUniqueRunDependency("al "+i);Module.readAsync(i,function(t){assert(t,'Loading data file "'+i+'" failed (no arrayBuffer).'),u(new Uint8Array(t)),g&&removeRunDependency(g)},function(t){if(f)f();else throw'Loading data file "'+i+'" failed.'}),g&&addRunDependency(g)},resizeListeners:[],updateResizeListeners:function(){var i=Module.canvas;Browser.resizeListeners.forEach(function(u){u(i.width,i.height)})},setCanvasSize:function(i,u,f){var c=Module.canvas;Browser.updateCanvasDimensions(c,i,u),f||Browser.updateResizeListeners()},windowedWidth:0,windowedHeight:0,setFullscreenCanvasSize:function(){if(typeof SDL!="undefined"){var i=HEAPU32[SDL.screen+Runtime.QUANTUM_SIZE*0>>2];i=i|8388608,HEAP32[SDL.screen+Runtime.QUANTUM_SIZE*0>>2]=i}Browser.updateResizeListeners()},setWindowedCanvasSize:function(){if(typeof SDL!="undefined"){var i=HEAPU32[SDL.screen+Runtime.QUANTUM_SIZE*0>>2];i=i&~8388608,HEAP32[SDL.screen+Runtime.QUANTUM_SIZE*0>>2]=i}Browser.updateResizeListeners()},updateCanvasDimensions:function(i,u,f){u&&f?(i.widthNative=u,i.heightNative=f):(u=i.widthNative,f=i.heightNative);var c=u,g=f;if(Module.forcedAspectRatio&&Module.forcedAspectRatio>0&&(c/g>2];return u},getStr:function(){var i=Pointer_stringify(SYSCALLS.get());return i},get64:function(){var i=SYSCALLS.get(),u=SYSCALLS.get();return i>=0?assert(u===0):assert(u===-1),i},getZero:function(){assert(SYSCALLS.get()===0)}};function ___syscall6(i,u){SYSCALLS.varargs=u;try{var f=SYSCALLS.getStreamFromFD();return FS.close(f),0}catch(c){return(typeof FS=="undefined"||!(c instanceof FS.ErrnoError))&&abort(c),-c.errno}}function ___syscall54(i,u){SYSCALLS.varargs=u;try{return 0}catch(f){return(typeof FS=="undefined"||!(f instanceof FS.ErrnoError))&&abort(f),-f.errno}}function _typeModule(i){var u=[[0,1,"X"],[1,1,"const X"],[128,1,"X *"],[256,1,"X &"],[384,1,"X &&"],[512,1,"std::shared_ptr"],[640,1,"std::unique_ptr"],[5120,1,"std::vector"],[6144,2,"std::array"],[9216,-1,"std::function"]];function f(x,D,L,N,j,$){if(D==1){var h=N&896;(h==128||h==256||h==384)&&(x="X const")}var re;return $?re=L.replace("X",x).replace("Y",j):re=x.replace("X",L).replace("Y",j),re.replace(/([*&]) (?=[*&])/g,"$1")}function c(x,D,L,N,j){throw new Error(x+" type "+L.replace("X",D+"?")+(N?" with flag "+N:"")+" in "+j)}function g(x,D,L,N,j,$,h,re){$===void 0&&($="X"),re===void 0&&(re=1);var ce=L(x);if(ce)return ce;var Q=N(x),oe=Q.placeholderFlag,Se=u[oe];h&&Se&&($=f(h[2],h[0],$,Se[0],"?",!0));var me;oe==0&&(me="Unbound"),oe>=10&&(me="Corrupt"),re>20&&(me="Deeply nested"),me&&c(me,x,$,oe,j||"?");var De=Q.paramList[0],J=g(De,D,L,N,j,$,Se,re+1),Te,Oe={flags:Se[0],id:x,name:"",paramList:[J]},Le=[],ot="?";switch(Q.placeholderFlag){case 1:Te=J.spec;break;case 2:if((J.flags&15360)==1024&&J.spec.ptrSize==1){Oe.flags=7168;break}case 3:case 6:case 5:Te=J.spec,(J.flags&15360)!=2048;break;case 8:ot=""+Q.paramList[1],Oe.paramList.push(Q.paramList[1]);break;case 9:for(var ct=0,Ue=Q.paramList[1];ct>2]=i),i}function _llvm_stacksave(){var i=_llvm_stacksave;return i.LLVM_SAVEDSTACKS||(i.LLVM_SAVEDSTACKS=[]),i.LLVM_SAVEDSTACKS.push(Runtime.stackSave()),i.LLVM_SAVEDSTACKS.length-1}function ___syscall140(i,u){SYSCALLS.varargs=u;try{var f=SYSCALLS.getStreamFromFD(),c=SYSCALLS.get(),g=SYSCALLS.get(),t=SYSCALLS.get(),C=SYSCALLS.get(),A=g;return FS.llseek(f,A,C),HEAP32[t>>2]=f.position,f.getdents&&A===0&&C===0&&(f.getdents=null),0}catch(x){return(typeof FS=="undefined"||!(x instanceof FS.ErrnoError))&&abort(x),-x.errno}}function ___syscall146(i,u){SYSCALLS.varargs=u;try{var f=SYSCALLS.get(),c=SYSCALLS.get(),g=SYSCALLS.get(),t=0;___syscall146.buffer||(___syscall146.buffers=[null,[],[]],___syscall146.printChar=function(L,N){var j=___syscall146.buffers[L];assert(j),N===0||N===10?((L===1?Module.print:Module.printErr)(UTF8ArrayToString(j,0)),j.length=0):j.push(N)});for(var C=0;C>2],x=HEAP32[c+(C*8+4)>>2],D=0;Di.pageSize/2||u>i.pageSize-f){var c=_nbind.typeNameTbl.NBind.proto;return c.lalloc(u)}else return HEAPU32[i.usedPtr]=f+u,i.rootPtr+f},i.lreset=function(u,f){var c=HEAPU32[i.pagePtr];if(c){var g=_nbind.typeNameTbl.NBind.proto;g.lreset(u,f)}else HEAPU32[i.usedPtr]=u},i}();_nbind.Pool=Pool;function constructType(i,u){var f=i==10240?_nbind.makeTypeNameTbl[u.name]||_nbind.BindType:_nbind.makeTypeKindTbl[i],c=new f(u);return typeIdTbl[u.id]=c,_nbind.typeNameTbl[u.name]=c,c}_nbind.constructType=constructType;function getType(i){return typeIdTbl[i]}_nbind.getType=getType;function queryType(i){var u=HEAPU8[i],f=_nbind.structureList[u][1];i/=4,f<0&&(++i,f=HEAPU32[i]+1);var c=Array.prototype.slice.call(HEAPU32.subarray(i+1,i+1+f));return u==9&&(c=[c[0],c.slice(1)]),{paramList:c,placeholderFlag:u}}_nbind.queryType=queryType;function getTypes(i,u){return i.map(function(f){return typeof f=="number"?_nbind.getComplexType(f,constructType,getType,queryType,u):_nbind.typeNameTbl[f]})}_nbind.getTypes=getTypes;function readTypeIdList(i,u){return Array.prototype.slice.call(HEAPU32,i/4,i/4+u)}_nbind.readTypeIdList=readTypeIdList;function readAsciiString(i){for(var u=i;HEAPU8[u++];);return String.fromCharCode.apply("",HEAPU8.subarray(i,u-1))}_nbind.readAsciiString=readAsciiString;function readPolicyList(i){var u={};if(i)for(;;){var f=HEAPU32[i/4];if(!f)break;u[readAsciiString(f)]=!0,i+=4}return u}_nbind.readPolicyList=readPolicyList;function getDynCall(i,u){var f={float32_t:"d",float64_t:"d",int64_t:"d",uint64_t:"d",void:"v"},c=i.map(function(t){return f[t.name]||"i"}).join(""),g=Module["dynCall_"+c];if(!g)throw new Error("dynCall_"+c+" not found for "+u+"("+i.map(function(t){return t.name}).join(", ")+")");return g}_nbind.getDynCall=getDynCall;function addMethod(i,u,f,c){var g=i[u];i.hasOwnProperty(u)&&g?((g.arity||g.arity===0)&&(g=_nbind.makeOverloader(g,g.arity),i[u]=g),g.addMethod(f,c)):(f.arity=c,i[u]=f)}_nbind.addMethod=addMethod;function throwError(i){throw new Error(i)}_nbind.throwError=throwError,_nbind.bigEndian=!1,_a=_typeModule(_typeModule),_nbind.Type=_a.Type,_nbind.makeType=_a.makeType,_nbind.getComplexType=_a.getComplexType,_nbind.structureList=_a.structureList;var BindType=function(i){__extends(u,i);function u(){var f=i!==null&&i.apply(this,arguments)||this;return f.heap=HEAPU32,f.ptrSize=4,f}return u.prototype.needsWireRead=function(f){return!!this.wireRead||!!this.makeWireRead},u.prototype.needsWireWrite=function(f){return!!this.wireWrite||!!this.makeWireWrite},u}(_nbind.Type);_nbind.BindType=BindType;var PrimitiveType=function(i){__extends(u,i);function u(f){var c=i.call(this,f)||this,g=f.flags&32?{32:HEAPF32,64:HEAPF64}:f.flags&8?{8:HEAPU8,16:HEAPU16,32:HEAPU32}:{8:HEAP8,16:HEAP16,32:HEAP32};return c.heap=g[f.ptrSize*8],c.ptrSize=f.ptrSize,c}return u.prototype.needsWireWrite=function(f){return!!f&&!!f.Strict},u.prototype.makeWireWrite=function(f,c){return c&&c.Strict&&function(g){if(typeof g=="number")return g;throw new Error("Type mismatch")}},u}(BindType);_nbind.PrimitiveType=PrimitiveType;function pushCString(i,u){if(i==null){if(u&&u.Nullable)return 0;throw new Error("Type mismatch")}if(u&&u.Strict){if(typeof i!="string")throw new Error("Type mismatch")}else i=i.toString();var f=Module.lengthBytesUTF8(i)+1,c=_nbind.Pool.lalloc(f);return Module.stringToUTF8Array(i,HEAPU8,c,f),c}_nbind.pushCString=pushCString;function popCString(i){return i===0?null:Module.Pointer_stringify(i)}_nbind.popCString=popCString;var CStringType=function(i){__extends(u,i);function u(){var f=i!==null&&i.apply(this,arguments)||this;return f.wireRead=popCString,f.wireWrite=pushCString,f.readResources=[_nbind.resources.pool],f.writeResources=[_nbind.resources.pool],f}return u.prototype.makeWireWrite=function(f,c){return function(g){return pushCString(g,c)}},u}(BindType);_nbind.CStringType=CStringType;var BooleanType=function(i){__extends(u,i);function u(){var f=i!==null&&i.apply(this,arguments)||this;return f.wireRead=function(c){return!!c},f}return u.prototype.needsWireWrite=function(f){return!!f&&!!f.Strict},u.prototype.makeWireRead=function(f){return"!!("+f+")"},u.prototype.makeWireWrite=function(f,c){return c&&c.Strict&&function(g){if(typeof g=="boolean")return g;throw new Error("Type mismatch")}||f},u}(BindType);_nbind.BooleanType=BooleanType;var Wrapper=function(){function i(){}return i.prototype.persist=function(){this.__nbindState|=1},i}();_nbind.Wrapper=Wrapper;function makeBound(i,u){var f=function(c){__extends(g,c);function g(t,C,A,x){var D=c.call(this)||this;if(!(D instanceof g))return new(Function.prototype.bind.apply(g,Array.prototype.concat.apply([null],arguments)));var L=C,N=A,j=x;if(t!==_nbind.ptrMarker){var $=D.__nbindConstructor.apply(D,arguments);L=4096|512,j=HEAPU32[$/4],N=HEAPU32[$/4+1]}var h={configurable:!0,enumerable:!1,value:null,writable:!1},re={__nbindFlags:L,__nbindPtr:N};j&&(re.__nbindShared=j,_nbind.mark(D));for(var ce=0,Q=Object.keys(re);ce>=1;var f=_nbind.valueList[i];return _nbind.valueList[i]=firstFreeValue,firstFreeValue=i,f}else{if(u)return _nbind.popShared(i,u);throw new Error("Invalid value slot "+i)}}_nbind.popValue=popValue;var valueBase=18446744073709552e3;function push64(i){return typeof i=="number"?i:pushValue(i)*4096+valueBase}function pop64(i){return i=3?C=Buffer.from(t):C=new Buffer(t),C.copy(c)}else getBuffer(c).set(t)}}_nbind.commitBuffer=commitBuffer;var dirtyList=[],gcTimer=0;function sweep(){for(var i=0,u=dirtyList;i>2]=DYNAMIC_BASE,staticSealed=!0;function invoke_viiiii(i,u,f,c,g,t){try{Module.dynCall_viiiii(i,u,f,c,g,t)}catch(C){if(typeof C!="number"&&C!=="longjmp")throw C;Module.setThrew(1,0)}}function invoke_vif(i,u,f){try{Module.dynCall_vif(i,u,f)}catch(c){if(typeof c!="number"&&c!=="longjmp")throw c;Module.setThrew(1,0)}}function invoke_vid(i,u,f){try{Module.dynCall_vid(i,u,f)}catch(c){if(typeof c!="number"&&c!=="longjmp")throw c;Module.setThrew(1,0)}}function invoke_fiff(i,u,f,c){try{return Module.dynCall_fiff(i,u,f,c)}catch(g){if(typeof g!="number"&&g!=="longjmp")throw g;Module.setThrew(1,0)}}function invoke_vi(i,u){try{Module.dynCall_vi(i,u)}catch(f){if(typeof f!="number"&&f!=="longjmp")throw f;Module.setThrew(1,0)}}function invoke_vii(i,u,f){try{Module.dynCall_vii(i,u,f)}catch(c){if(typeof c!="number"&&c!=="longjmp")throw c;Module.setThrew(1,0)}}function invoke_ii(i,u){try{return Module.dynCall_ii(i,u)}catch(f){if(typeof f!="number"&&f!=="longjmp")throw f;Module.setThrew(1,0)}}function invoke_viddi(i,u,f,c,g){try{Module.dynCall_viddi(i,u,f,c,g)}catch(t){if(typeof t!="number"&&t!=="longjmp")throw t;Module.setThrew(1,0)}}function invoke_vidd(i,u,f,c){try{Module.dynCall_vidd(i,u,f,c)}catch(g){if(typeof g!="number"&&g!=="longjmp")throw g;Module.setThrew(1,0)}}function invoke_iiii(i,u,f,c){try{return Module.dynCall_iiii(i,u,f,c)}catch(g){if(typeof g!="number"&&g!=="longjmp")throw g;Module.setThrew(1,0)}}function invoke_diii(i,u,f,c){try{return Module.dynCall_diii(i,u,f,c)}catch(g){if(typeof g!="number"&&g!=="longjmp")throw g;Module.setThrew(1,0)}}function invoke_di(i,u){try{return Module.dynCall_di(i,u)}catch(f){if(typeof f!="number"&&f!=="longjmp")throw f;Module.setThrew(1,0)}}function invoke_iid(i,u,f){try{return Module.dynCall_iid(i,u,f)}catch(c){if(typeof c!="number"&&c!=="longjmp")throw c;Module.setThrew(1,0)}}function invoke_iii(i,u,f){try{return Module.dynCall_iii(i,u,f)}catch(c){if(typeof c!="number"&&c!=="longjmp")throw c;Module.setThrew(1,0)}}function invoke_viiddi(i,u,f,c,g,t){try{Module.dynCall_viiddi(i,u,f,c,g,t)}catch(C){if(typeof C!="number"&&C!=="longjmp")throw C;Module.setThrew(1,0)}}function invoke_viiiiii(i,u,f,c,g,t,C){try{Module.dynCall_viiiiii(i,u,f,c,g,t,C)}catch(A){if(typeof A!="number"&&A!=="longjmp")throw A;Module.setThrew(1,0)}}function invoke_dii(i,u,f){try{return Module.dynCall_dii(i,u,f)}catch(c){if(typeof c!="number"&&c!=="longjmp")throw c;Module.setThrew(1,0)}}function invoke_i(i){try{return Module.dynCall_i(i)}catch(u){if(typeof u!="number"&&u!=="longjmp")throw u;Module.setThrew(1,0)}}function invoke_iiiiii(i,u,f,c,g,t){try{return Module.dynCall_iiiiii(i,u,f,c,g,t)}catch(C){if(typeof C!="number"&&C!=="longjmp")throw C;Module.setThrew(1,0)}}function invoke_viiid(i,u,f,c,g){try{Module.dynCall_viiid(i,u,f,c,g)}catch(t){if(typeof t!="number"&&t!=="longjmp")throw t;Module.setThrew(1,0)}}function invoke_viififi(i,u,f,c,g,t,C){try{Module.dynCall_viififi(i,u,f,c,g,t,C)}catch(A){if(typeof A!="number"&&A!=="longjmp")throw A;Module.setThrew(1,0)}}function invoke_viii(i,u,f,c){try{Module.dynCall_viii(i,u,f,c)}catch(g){if(typeof g!="number"&&g!=="longjmp")throw g;Module.setThrew(1,0)}}function invoke_v(i){try{Module.dynCall_v(i)}catch(u){if(typeof u!="number"&&u!=="longjmp")throw u;Module.setThrew(1,0)}}function invoke_viid(i,u,f,c){try{Module.dynCall_viid(i,u,f,c)}catch(g){if(typeof g!="number"&&g!=="longjmp")throw g;Module.setThrew(1,0)}}function invoke_idd(i,u,f){try{return Module.dynCall_idd(i,u,f)}catch(c){if(typeof c!="number"&&c!=="longjmp")throw c;Module.setThrew(1,0)}}function invoke_viiii(i,u,f,c,g){try{Module.dynCall_viiii(i,u,f,c,g)}catch(t){if(typeof t!="number"&&t!=="longjmp")throw t;Module.setThrew(1,0)}}Module.asmGlobalArg={Math,Int8Array,Int16Array,Int32Array,Uint8Array,Uint16Array,Uint32Array,Float32Array,Float64Array,NaN:NaN,Infinity:Infinity},Module.asmLibraryArg={abort,assert,enlargeMemory,getTotalMemory,abortOnCannotGrowMemory,invoke_viiiii,invoke_vif,invoke_vid,invoke_fiff,invoke_vi,invoke_vii,invoke_ii,invoke_viddi,invoke_vidd,invoke_iiii,invoke_diii,invoke_di,invoke_iid,invoke_iii,invoke_viiddi,invoke_viiiiii,invoke_dii,invoke_i,invoke_iiiiii,invoke_viiid,invoke_viififi,invoke_viii,invoke_v,invoke_viid,invoke_idd,invoke_viiii,_emscripten_asm_const_iiiii,_emscripten_asm_const_iiidddddd,_emscripten_asm_const_iiiid,__nbind_reference_external,_emscripten_asm_const_iiiiiiii,_removeAccessorPrefix,_typeModule,__nbind_register_pool,__decorate,_llvm_stackrestore,___cxa_atexit,__extends,__nbind_get_value_object,__ZN8facebook4yoga14YGNodeToStringEPNSt3__212basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEP6YGNode14YGPrintOptionsj,_emscripten_set_main_loop_timing,__nbind_register_primitive,__nbind_register_type,_emscripten_memcpy_big,__nbind_register_function,___setErrNo,__nbind_register_class,__nbind_finish,_abort,_nbind_value,_llvm_stacksave,___syscall54,_defineHidden,_emscripten_set_main_loop,_emscripten_get_now,__nbind_register_callback_signature,_emscripten_asm_const_iiiiii,__nbind_free_external,_emscripten_asm_const_iiii,_emscripten_asm_const_iiididi,___syscall6,_atexit,___syscall140,___syscall146,DYNAMICTOP_PTR,tempDoublePtr,ABORT,STACKTOP,STACK_MAX,cttz_i8,___dso_handle};var asm=function(i,u,f){var c=new i.Int8Array(f),g=new i.Int16Array(f),t=new i.Int32Array(f),C=new i.Uint8Array(f),A=new i.Uint16Array(f),x=new i.Uint32Array(f),D=new i.Float32Array(f),L=new i.Float64Array(f),N=u.DYNAMICTOP_PTR|0,j=u.tempDoublePtr|0,$=u.ABORT|0,h=u.STACKTOP|0,re=u.STACK_MAX|0,ce=u.cttz_i8|0,Q=u.___dso_handle|0,oe=0,Se=0,me=0,De=0,J=i.NaN,Te=i.Infinity,Oe=0,Le=0,ot=0,ct=0,Ue=0,be=0,At=i.Math.floor,Ot=i.Math.abs,Nt=i.Math.sqrt,Je=i.Math.pow,V=i.Math.cos,ne=i.Math.sin,ge=i.Math.tan,Z=i.Math.acos,Ae=i.Math.asin,at=i.Math.atan,it=i.Math.atan2,Ft=i.Math.exp,jt=i.Math.log,hn=i.Math.ceil,Un=i.Math.imul,Jt=i.Math.min,Yt=i.Math.max,cr=i.Math.clz32,w=i.Math.fround,pt=u.abort,Mn=u.assert,Bn=u.enlargeMemory,Xn=u.getTotalMemory,vr=u.abortOnCannotGrowMemory,gr=u.invoke_viiiii,r0=u.invoke_vif,Ci=u.invoke_vid,yo=u.invoke_fiff,Ds=u.invoke_vi,Mu=u.invoke_vii,Gf=u.invoke_ii,iu=u.invoke_viddi,ou=u.invoke_vidd,ol=u.invoke_iiii,ul=u.invoke_diii,Es=u.invoke_di,Uo=u.invoke_iid,sl=u.invoke_iii,Ss=u.invoke_viiddi,Cs=u.invoke_viiiiii,Ti=u.invoke_dii,Fu=u.invoke_i,ll=u.invoke_iiiiii,fl=u.invoke_viiid,cl=u.invoke_viififi,al=u.invoke_viii,Ui=u.invoke_v,Mr=u.invoke_viid,Ac=u.invoke_idd,of=u.invoke_viiii,Ts=u._emscripten_asm_const_iiiii,xs=u._emscripten_asm_const_iiidddddd,dl=u._emscripten_asm_const_iiiid,qi=u.__nbind_reference_external,qo=u._emscripten_asm_const_iiiiiiii,kr=u._removeAccessorPrefix,Fr=u._typeModule,si=u.__nbind_register_pool,H0=u.__decorate,b0=u._llvm_stackrestore,Bt=u.___cxa_atexit,Lu=u.__extends,c0=u.__nbind_get_value_object,Ru=u.__ZN8facebook4yoga14YGNodeToStringEPNSt3__212basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEP6YGNode14YGPrintOptionsj,ks=u._emscripten_set_main_loop_timing,As=u.__nbind_register_primitive,uu=u.__nbind_register_type,wo=u._emscripten_memcpy_big,zo=u.__nbind_register_function,Os=u.___setErrNo,Is=u.__nbind_register_class,uf=u.__nbind_finish,_n=u._abort,Nu=u._nbind_value,Wo=u._llvm_stacksave,su=u.___syscall54,Ps=u._defineHidden,pl=u._emscripten_set_main_loop,Vf=u._emscripten_get_now,hl=u.__nbind_register_callback_signature,Bu=u._emscripten_asm_const_iiiiii,ju=u.__nbind_free_external,sf=u._emscripten_asm_const_iiii,ro=u._emscripten_asm_const_iiididi,Ms=u.___syscall6,ml=u._atexit,Uu=u.___syscall140,G0=u.___syscall146,Fs=w(0);let tt=w(0);function zi(e){e=e|0;var n=0;return n=h,h=h+e|0,h=h+15&-16,n|0}function lu(){return h|0}function Ho(e){e=e|0,h=e}function O0(e,n){e=e|0,n=n|0,h=e,re=n}function vl(e,n){e=e|0,n=n|0,oe||(oe=e,Se=n)}function gl(e){e=e|0,be=e}function fu(){return be|0}function _l(){var e=0,n=0;vn(8104,8,400)|0,vn(8504,408,540)|0,e=9044,n=e+44|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));c[9088]=0,c[9089]=1,t[2273]=0,t[2274]=948,t[2275]=948,Bt(17,8104,Q|0)|0}function Sn(e){e=e|0,lf(e+948|0)}function gt(e){return e=w(e),((Ar(e)|0)&2147483647)>>>0>2139095040|0}function en(e,n,r){e=e|0,n=n|0,r=r|0;e:do if(t[e+(n<<3)+4>>2]|0)e=e+(n<<3)|0;else{if((n|2|0)==3?t[e+60>>2]|0:0){e=e+56|0;break}switch(n|0){case 0:case 2:case 4:case 5:{if(t[e+52>>2]|0){e=e+48|0;break e}break}default:}if(t[e+68>>2]|0){e=e+64|0;break}else{e=(n|1|0)==5?948:r;break}}while(0);return e|0}function I0(e){e=e|0;var n=0;return n=uh(1e3)|0,li(e,(n|0)!=0,2456),t[2276]=(t[2276]|0)+1,vn(n|0,8104,1e3)|0,c[e+2>>0]|0&&(t[n+4>>2]=2,t[n+12>>2]=4),t[n+976>>2]=e,n|0}function li(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0;s=h,h=h+16|0,o=s,n||(t[o>>2]=r,zs(e,5,3197,o)),h=s}function qu(){return I0(956)|0}function Wi(e){e=e|0;var n=0;return n=Tt(1e3)|0,zu(n,e),li(t[e+976>>2]|0,1,2456),t[2276]=(t[2276]|0)+1,t[n+944>>2]=0,n|0}function zu(e,n){e=e|0,n=n|0;var r=0;vn(e|0,n|0,948)|0,af(e+948|0,n+948|0),r=e+960|0,e=n+960|0,n=r+40|0;do t[r>>2]=t[e>>2],r=r+4|0,e=e+4|0;while((r|0)<(n|0))}function Wu(e){e=e|0;var n=0,r=0,o=0,s=0;if(n=e+944|0,r=t[n>>2]|0,r|0&&(Ls(r+948|0,e)|0,t[n>>2]=0),r=fi(e)|0,r|0){n=0;do t[(e0(e,n)|0)+944>>2]=0,n=n+1|0;while((n|0)!=(r|0))}r=e+948|0,o=t[r>>2]|0,s=e+952|0,n=t[s>>2]|0,(n|0)!=(o|0)&&(t[s>>2]=n+(~((n+-4-o|0)>>>2)<<2)),io(r),sh(e),t[2276]=(t[2276]|0)+-1}function Ls(e,n){e=e|0,n=n|0;var r=0,o=0,s=0,l=0,d=0,_=0;o=t[e>>2]|0,_=e+4|0,r=t[_>>2]|0,l=r;e:do if((o|0)==(r|0))s=o,d=4;else for(e=o;;){if((t[e>>2]|0)==(n|0)){s=e,d=4;break e}if(e=e+4|0,(e|0)==(r|0)){e=0;break}}while(0);return(d|0)==4&&((s|0)!=(r|0)?(o=s+4|0,e=l-o|0,n=e>>2,n&&(Y1(s|0,o|0,e|0)|0,r=t[_>>2]|0),e=s+(n<<2)|0,(r|0)==(e|0)||(t[_>>2]=r+(~((r+-4-e|0)>>>2)<<2)),e=1):e=0),e|0}function fi(e){return e=e|0,(t[e+952>>2]|0)-(t[e+948>>2]|0)>>2|0}function e0(e,n){e=e|0,n=n|0;var r=0;return r=t[e+948>>2]|0,(t[e+952>>2]|0)-r>>2>>>0>n>>>0?e=t[r+(n<<2)>>2]|0:e=0,e|0}function io(e){e=e|0;var n=0,r=0,o=0,s=0;o=h,h=h+32|0,n=o,s=t[e>>2]|0,r=(t[e+4>>2]|0)-s|0,((t[e+8>>2]|0)-s|0)>>>0>r>>>0&&(s=r>>2,z(n,s,s,e+8|0),dr(e,n),Or(n)),h=o}function D0(e,n){e=e|0,n=n|0;var r=0,o=0,s=0,l=0,d=0,_=0,y=0,k=0;k=fi(e)|0;do if(k|0){if((t[(e0(e,0)|0)+944>>2]|0)==(e|0)){if(!(Ls(e+948|0,n)|0))break;vn(n+400|0,8504,540)|0,t[n+944>>2]=0,ln(e);break}d=t[(t[e+976>>2]|0)+12>>2]|0,_=e+948|0,y=(d|0)==0,r=0,l=0;do o=t[(t[_>>2]|0)+(l<<2)>>2]|0,(o|0)==(n|0)?ln(e):(s=Wi(o)|0,t[(t[_>>2]|0)+(r<<2)>>2]=s,t[s+944>>2]=e,y||Q4[d&15](o,s,e,r),r=r+1|0),l=l+1|0;while((l|0)!=(k|0));if(r>>>0>>0){y=e+948|0,_=e+952|0,d=r,r=t[_>>2]|0;do l=(t[y>>2]|0)+(d<<2)|0,o=l+4|0,s=r-o|0,n=s>>2,n&&(Y1(l|0,o|0,s|0)|0,r=t[_>>2]|0),s=r,o=l+(n<<2)|0,(s|0)!=(o|0)&&(r=s+(~((s+-4-o|0)>>>2)<<2)|0,t[_>>2]=r),d=d+1|0;while((d|0)!=(k|0))}}while(0)}function Do(e){e=e|0;var n=0,r=0,o=0,s=0;i0(e,(fi(e)|0)==0,2491),i0(e,(t[e+944>>2]|0)==0,2545),n=e+948|0,r=t[n>>2]|0,o=e+952|0,s=t[o>>2]|0,(s|0)!=(r|0)&&(t[o>>2]=s+(~((s+-4-r|0)>>>2)<<2)),io(n),n=e+976|0,r=t[n>>2]|0,vn(e|0,8104,1e3)|0,c[r+2>>0]|0&&(t[e+4>>2]=2,t[e+12>>2]=4),t[n>>2]=r}function i0(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0;s=h,h=h+16|0,o=s,n||(t[o>>2]=r,wn(e,5,3197,o)),h=s}function Rs(){return t[2276]|0}function a0(){var e=0;return e=uh(20)|0,Hu((e|0)!=0,2592),t[2277]=(t[2277]|0)+1,t[e>>2]=t[239],t[e+4>>2]=t[240],t[e+8>>2]=t[241],t[e+12>>2]=t[242],t[e+16>>2]=t[243],e|0}function Hu(e,n){e=e|0,n=n|0;var r=0,o=0;o=h,h=h+16|0,r=o,e||(t[r>>2]=n,wn(0,5,3197,r)),h=o}function V0(e){e=e|0,sh(e),t[2277]=(t[2277]|0)+-1}function bu(e,n){e=e|0,n=n|0;var r=0;n?(i0(e,(fi(e)|0)==0,2629),r=1):(r=0,n=0),t[e+964>>2]=n,t[e+988>>2]=r}function Ns(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0,d=0;o=h,h=h+16|0,l=o+8|0,s=o+4|0,d=o,t[s>>2]=n,i0(e,(t[n+944>>2]|0)==0,2709),i0(e,(t[e+964>>2]|0)==0,2763),bo(e),n=e+948|0,t[d>>2]=(t[n>>2]|0)+(r<<2),t[l>>2]=t[d>>2],P0(n,l,s)|0,t[(t[s>>2]|0)+944>>2]=e,ln(e),h=o}function bo(e){e=e|0;var n=0,r=0,o=0,s=0,l=0,d=0,_=0;if(r=fi(e)|0,r|0?(t[(e0(e,0)|0)+944>>2]|0)!=(e|0):0){o=t[(t[e+976>>2]|0)+12>>2]|0,s=e+948|0,l=(o|0)==0,n=0;do d=t[(t[s>>2]|0)+(n<<2)>>2]|0,_=Wi(d)|0,t[(t[s>>2]|0)+(n<<2)>>2]=_,t[_+944>>2]=e,l||Q4[o&15](d,_,e,n),n=n+1|0;while((n|0)!=(r|0))}}function P0(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0,d=0,_=0,y=0,k=0,T=0,P=0,q=0,we=0,le=0,ie=0,Pe=0,ke=0;Pe=h,h=h+64|0,P=Pe+52|0,_=Pe+48|0,q=Pe+28|0,we=Pe+24|0,le=Pe+20|0,ie=Pe,o=t[e>>2]|0,l=o,n=o+((t[n>>2]|0)-l>>2<<2)|0,o=e+4|0,s=t[o>>2]|0,d=e+8|0;do if(s>>>0<(t[d>>2]|0)>>>0){if((n|0)==(s|0)){t[n>>2]=t[r>>2],t[o>>2]=(t[o>>2]|0)+4;break}Qn(e,n,s,n+4|0),n>>>0<=r>>>0&&(r=(t[o>>2]|0)>>>0>r>>>0?r+4|0:r),t[n>>2]=t[r>>2]}else{o=(s-l>>2)+1|0,s=Q0(e)|0,s>>>0>>0&&$n(e),T=t[e>>2]|0,k=(t[d>>2]|0)-T|0,l=k>>1,z(ie,k>>2>>>0>>1>>>0?l>>>0>>0?o:l:s,n-T>>2,e+8|0),T=ie+8|0,o=t[T>>2]|0,l=ie+12|0,k=t[l>>2]|0,d=k,y=o;do if((o|0)==(k|0)){if(k=ie+4|0,o=t[k>>2]|0,ke=t[ie>>2]|0,s=ke,o>>>0<=ke>>>0){o=d-s>>1,o=(o|0)==0?1:o,z(q,o,o>>>2,t[ie+16>>2]|0),t[we>>2]=t[k>>2],t[le>>2]=t[T>>2],t[_>>2]=t[we>>2],t[P>>2]=t[le>>2],s0(q,_,P),o=t[ie>>2]|0,t[ie>>2]=t[q>>2],t[q>>2]=o,o=q+4|0,ke=t[k>>2]|0,t[k>>2]=t[o>>2],t[o>>2]=ke,o=q+8|0,ke=t[T>>2]|0,t[T>>2]=t[o>>2],t[o>>2]=ke,o=q+12|0,ke=t[l>>2]|0,t[l>>2]=t[o>>2],t[o>>2]=ke,Or(q),o=t[T>>2]|0;break}l=o,d=((l-s>>2)+1|0)/-2|0,_=o+(d<<2)|0,s=y-l|0,l=s>>2,l&&(Y1(_|0,o|0,s|0)|0,o=t[k>>2]|0),ke=_+(l<<2)|0,t[T>>2]=ke,t[k>>2]=o+(d<<2),o=ke}while(0);t[o>>2]=t[r>>2],t[T>>2]=(t[T>>2]|0)+4,n=nn(e,ie,n)|0,Or(ie)}while(0);return h=Pe,n|0}function ln(e){e=e|0;var n=0;do{if(n=e+984|0,c[n>>0]|0)break;c[n>>0]=1,D[e+504>>2]=w(J),e=t[e+944>>2]|0}while((e|0)!=0)}function lf(e){e=e|0;var n=0,r=0,o=0;r=t[e>>2]|0,o=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-4-o|0)>>>2)<<2)),Ve(r))}function nr(e){return e=e|0,t[e+944>>2]|0}function rr(e){e=e|0,i0(e,(t[e+964>>2]|0)!=0,2832),ln(e)}function Go(e){return e=e|0,(c[e+984>>0]|0)!=0|0}function Gu(e,n){e=e|0,n=n|0,fL(e,n,400)|0&&(vn(e|0,n|0,400)|0,ln(e))}function yl(e){e=e|0;var n=tt;return n=w(D[e+44>>2]),e=gt(n)|0,w(e?w(0):n)}function cu(e){e=e|0;var n=tt;return n=w(D[e+48>>2]),gt(n)|0&&(n=c[(t[e+976>>2]|0)+2>>0]|0?w(1):w(0)),w(n)}function Bs(e,n){e=e|0,n=n|0,t[e+980>>2]=n}function Vu(e){return e=e|0,t[e+980>>2]|0}function M0(e,n){e=e|0,n=n|0;var r=0;r=e+4|0,(t[r>>2]|0)!=(n|0)&&(t[r>>2]=n,ln(e))}function au(e){return e=e|0,t[e+4>>2]|0}function Lr(e,n){e=e|0,n=n|0;var r=0;r=e+8|0,(t[r>>2]|0)!=(n|0)&&(t[r>>2]=n,ln(e))}function F(e){return e=e|0,t[e+8>>2]|0}function R(e,n){e=e|0,n=n|0;var r=0;r=e+12|0,(t[r>>2]|0)!=(n|0)&&(t[r>>2]=n,ln(e))}function U(e){return e=e|0,t[e+12>>2]|0}function H(e,n){e=e|0,n=n|0;var r=0;r=e+16|0,(t[r>>2]|0)!=(n|0)&&(t[r>>2]=n,ln(e))}function fe(e){return e=e|0,t[e+16>>2]|0}function ue(e,n){e=e|0,n=n|0;var r=0;r=e+20|0,(t[r>>2]|0)!=(n|0)&&(t[r>>2]=n,ln(e))}function de(e){return e=e|0,t[e+20>>2]|0}function W(e,n){e=e|0,n=n|0;var r=0;r=e+24|0,(t[r>>2]|0)!=(n|0)&&(t[r>>2]=n,ln(e))}function ve(e){return e=e|0,t[e+24>>2]|0}function Fe(e,n){e=e|0,n=n|0;var r=0;r=e+28|0,(t[r>>2]|0)!=(n|0)&&(t[r>>2]=n,ln(e))}function Ge(e){return e=e|0,t[e+28>>2]|0}function K(e,n){e=e|0,n=n|0;var r=0;r=e+32|0,(t[r>>2]|0)!=(n|0)&&(t[r>>2]=n,ln(e))}function xe(e){return e=e|0,t[e+32>>2]|0}function je(e,n){e=e|0,n=n|0;var r=0;r=e+36|0,(t[r>>2]|0)!=(n|0)&&(t[r>>2]=n,ln(e))}function Xe(e){return e=e|0,t[e+36>>2]|0}function rt(e,n){e=e|0,n=w(n);var r=0;r=e+40|0,w(D[r>>2])!=n&&(D[r>>2]=n,ln(e))}function st(e,n){e=e|0,n=w(n);var r=0;r=e+44|0,w(D[r>>2])!=n&&(D[r>>2]=n,ln(e))}function xt(e,n){e=e|0,n=w(n);var r=0;r=e+48|0,w(D[r>>2])!=n&&(D[r>>2]=n,ln(e))}function wt(e,n){e=e|0,n=w(n);var r=0,o=0,s=0,l=0;l=gt(n)|0,r=(l^1)&1,o=e+52|0,s=e+56|0,(l|w(D[o>>2])==n?(t[s>>2]|0)==(r|0):0)||(D[o>>2]=n,t[s>>2]=r,ln(e))}function lt(e,n){e=e|0,n=w(n);var r=0,o=0;o=e+52|0,r=e+56|0,(w(D[o>>2])==n?(t[r>>2]|0)==2:0)||(D[o>>2]=n,o=gt(n)|0,t[r>>2]=o?3:2,ln(e))}function Rt(e,n){e=e|0,n=n|0;var r=0,o=0;o=n+52|0,r=t[o+4>>2]|0,n=e,t[n>>2]=t[o>>2],t[n+4>>2]=r}function yn(e,n,r){e=e|0,n=n|0,r=w(r);var o=0,s=0,l=0;l=gt(r)|0,o=(l^1)&1,s=e+132+(n<<3)|0,n=e+132+(n<<3)+4|0,(l|w(D[s>>2])==r?(t[n>>2]|0)==(o|0):0)||(D[s>>2]=r,t[n>>2]=o,ln(e))}function sn(e,n,r){e=e|0,n=n|0,r=w(r);var o=0,s=0,l=0;l=gt(r)|0,o=l?0:2,s=e+132+(n<<3)|0,n=e+132+(n<<3)+4|0,(l|w(D[s>>2])==r?(t[n>>2]|0)==(o|0):0)||(D[s>>2]=r,t[n>>2]=o,ln(e))}function ar(e,n,r){e=e|0,n=n|0,r=r|0;var o=0;o=n+132+(r<<3)|0,n=t[o+4>>2]|0,r=e,t[r>>2]=t[o>>2],t[r+4>>2]=n}function rn(e,n,r){e=e|0,n=n|0,r=w(r);var o=0,s=0,l=0;l=gt(r)|0,o=(l^1)&1,s=e+60+(n<<3)|0,n=e+60+(n<<3)+4|0,(l|w(D[s>>2])==r?(t[n>>2]|0)==(o|0):0)||(D[s>>2]=r,t[n>>2]=o,ln(e))}function Hn(e,n,r){e=e|0,n=n|0,r=w(r);var o=0,s=0,l=0;l=gt(r)|0,o=l?0:2,s=e+60+(n<<3)|0,n=e+60+(n<<3)+4|0,(l|w(D[s>>2])==r?(t[n>>2]|0)==(o|0):0)||(D[s>>2]=r,t[n>>2]=o,ln(e))}function d0(e,n,r){e=e|0,n=n|0,r=r|0;var o=0;o=n+60+(r<<3)|0,n=t[o+4>>2]|0,r=e,t[r>>2]=t[o>>2],t[r+4>>2]=n}function Cr(e,n){e=e|0,n=n|0;var r=0;r=e+60+(n<<3)+4|0,(t[r>>2]|0)!=3&&(D[e+60+(n<<3)>>2]=w(J),t[r>>2]=3,ln(e))}function He(e,n,r){e=e|0,n=n|0,r=w(r);var o=0,s=0,l=0;l=gt(r)|0,o=(l^1)&1,s=e+204+(n<<3)|0,n=e+204+(n<<3)+4|0,(l|w(D[s>>2])==r?(t[n>>2]|0)==(o|0):0)||(D[s>>2]=r,t[n>>2]=o,ln(e))}function Qe(e,n,r){e=e|0,n=n|0,r=w(r);var o=0,s=0,l=0;l=gt(r)|0,o=l?0:2,s=e+204+(n<<3)|0,n=e+204+(n<<3)+4|0,(l|w(D[s>>2])==r?(t[n>>2]|0)==(o|0):0)||(D[s>>2]=r,t[n>>2]=o,ln(e))}function Ne(e,n,r){e=e|0,n=n|0,r=r|0;var o=0;o=n+204+(r<<3)|0,n=t[o+4>>2]|0,r=e,t[r>>2]=t[o>>2],t[r+4>>2]=n}function ft(e,n,r){e=e|0,n=n|0,r=w(r);var o=0,s=0,l=0;l=gt(r)|0,o=(l^1)&1,s=e+276+(n<<3)|0,n=e+276+(n<<3)+4|0,(l|w(D[s>>2])==r?(t[n>>2]|0)==(o|0):0)||(D[s>>2]=r,t[n>>2]=o,ln(e))}function St(e,n){return e=e|0,n=n|0,w(D[e+276+(n<<3)>>2])}function Qt(e,n){e=e|0,n=w(n);var r=0,o=0,s=0,l=0;l=gt(n)|0,r=(l^1)&1,o=e+348|0,s=e+352|0,(l|w(D[o>>2])==n?(t[s>>2]|0)==(r|0):0)||(D[o>>2]=n,t[s>>2]=r,ln(e))}function Cn(e,n){e=e|0,n=w(n);var r=0,o=0;o=e+348|0,r=e+352|0,(w(D[o>>2])==n?(t[r>>2]|0)==2:0)||(D[o>>2]=n,o=gt(n)|0,t[r>>2]=o?3:2,ln(e))}function bn(e){e=e|0;var n=0;n=e+352|0,(t[n>>2]|0)!=3&&(D[e+348>>2]=w(J),t[n>>2]=3,ln(e))}function p0(e,n){e=e|0,n=n|0;var r=0,o=0;o=n+348|0,r=t[o+4>>2]|0,n=e,t[n>>2]=t[o>>2],t[n+4>>2]=r}function h0(e,n){e=e|0,n=w(n);var r=0,o=0,s=0,l=0;l=gt(n)|0,r=(l^1)&1,o=e+356|0,s=e+360|0,(l|w(D[o>>2])==n?(t[s>>2]|0)==(r|0):0)||(D[o>>2]=n,t[s>>2]=r,ln(e))}function ci(e,n){e=e|0,n=w(n);var r=0,o=0;o=e+356|0,r=e+360|0,(w(D[o>>2])==n?(t[r>>2]|0)==2:0)||(D[o>>2]=n,o=gt(n)|0,t[r>>2]=o?3:2,ln(e))}function xi(e){e=e|0;var n=0;n=e+360|0,(t[n>>2]|0)!=3&&(D[e+356>>2]=w(J),t[n>>2]=3,ln(e))}function E0(e,n){e=e|0,n=n|0;var r=0,o=0;o=n+356|0,r=t[o+4>>2]|0,n=e,t[n>>2]=t[o>>2],t[n+4>>2]=r}function qr(e,n){e=e|0,n=w(n);var r=0,o=0,s=0,l=0;l=gt(n)|0,r=(l^1)&1,o=e+364|0,s=e+368|0,(l|w(D[o>>2])==n?(t[s>>2]|0)==(r|0):0)||(D[o>>2]=n,t[s>>2]=r,ln(e))}function Eo(e,n){e=e|0,n=w(n);var r=0,o=0,s=0,l=0;l=gt(n)|0,r=l?0:2,o=e+364|0,s=e+368|0,(l|w(D[o>>2])==n?(t[s>>2]|0)==(r|0):0)||(D[o>>2]=n,t[s>>2]=r,ln(e))}function So(e,n){e=e|0,n=n|0;var r=0,o=0;o=n+364|0,r=t[o+4>>2]|0,n=e,t[n>>2]=t[o>>2],t[n+4>>2]=r}function wl(e,n){e=e|0,n=w(n);var r=0,o=0,s=0,l=0;l=gt(n)|0,r=(l^1)&1,o=e+372|0,s=e+376|0,(l|w(D[o>>2])==n?(t[s>>2]|0)==(r|0):0)||(D[o>>2]=n,t[s>>2]=r,ln(e))}function js(e,n){e=e|0,n=w(n);var r=0,o=0,s=0,l=0;l=gt(n)|0,r=l?0:2,o=e+372|0,s=e+376|0,(l|w(D[o>>2])==n?(t[s>>2]|0)==(r|0):0)||(D[o>>2]=n,t[s>>2]=r,ln(e))}function Dl(e,n){e=e|0,n=n|0;var r=0,o=0;o=n+372|0,r=t[o+4>>2]|0,n=e,t[n>>2]=t[o>>2],t[n+4>>2]=r}function du(e,n){e=e|0,n=w(n);var r=0,o=0,s=0,l=0;l=gt(n)|0,r=(l^1)&1,o=e+380|0,s=e+384|0,(l|w(D[o>>2])==n?(t[s>>2]|0)==(r|0):0)||(D[o>>2]=n,t[s>>2]=r,ln(e))}function Yu(e,n){e=e|0,n=w(n);var r=0,o=0,s=0,l=0;l=gt(n)|0,r=l?0:2,o=e+380|0,s=e+384|0,(l|w(D[o>>2])==n?(t[s>>2]|0)==(r|0):0)||(D[o>>2]=n,t[s>>2]=r,ln(e))}function Us(e,n){e=e|0,n=n|0;var r=0,o=0;o=n+380|0,r=t[o+4>>2]|0,n=e,t[n>>2]=t[o>>2],t[n+4>>2]=r}function oo(e,n){e=e|0,n=w(n);var r=0,o=0,s=0,l=0;l=gt(n)|0,r=(l^1)&1,o=e+388|0,s=e+392|0,(l|w(D[o>>2])==n?(t[s>>2]|0)==(r|0):0)||(D[o>>2]=n,t[s>>2]=r,ln(e))}function Hi(e,n){e=e|0,n=w(n);var r=0,o=0,s=0,l=0;l=gt(n)|0,r=l?0:2,o=e+388|0,s=e+392|0,(l|w(D[o>>2])==n?(t[s>>2]|0)==(r|0):0)||(D[o>>2]=n,t[s>>2]=r,ln(e))}function qs(e,n){e=e|0,n=n|0;var r=0,o=0;o=n+388|0,r=t[o+4>>2]|0,n=e,t[n>>2]=t[o>>2],t[n+4>>2]=r}function F0(e,n){e=e|0,n=w(n);var r=0;r=e+396|0,w(D[r>>2])!=n&&(D[r>>2]=n,ln(e))}function Gr(e){return e=e|0,w(D[e+396>>2])}function ir(e){return e=e|0,w(D[e+400>>2])}function L0(e){return e=e|0,w(D[e+404>>2])}function Y0(e){return e=e|0,w(D[e+408>>2])}function Co(e){return e=e|0,w(D[e+412>>2])}function $u(e){return e=e|0,w(D[e+416>>2])}function Vo(e){return e=e|0,w(D[e+420>>2])}function Rr(e,n){switch(e=e|0,n=n|0,i0(e,(n|0)<6,2918),n|0){case 0:{n=(t[e+496>>2]|0)==2?5:4;break}case 2:{n=(t[e+496>>2]|0)==2?4:5;break}default:}return w(D[e+424+(n<<2)>>2])}function Jn(e,n){switch(e=e|0,n=n|0,i0(e,(n|0)<6,2918),n|0){case 0:{n=(t[e+496>>2]|0)==2?5:4;break}case 2:{n=(t[e+496>>2]|0)==2?4:5;break}default:}return w(D[e+448+(n<<2)>>2])}function ai(e,n){switch(e=e|0,n=n|0,i0(e,(n|0)<6,2918),n|0){case 0:{n=(t[e+496>>2]|0)==2?5:4;break}case 2:{n=(t[e+496>>2]|0)==2?4:5;break}default:}return w(D[e+472+(n<<2)>>2])}function o0(e,n){e=e|0,n=n|0;var r=0,o=tt;return r=t[e+4>>2]|0,(r|0)==(t[n+4>>2]|0)?r?(o=w(D[e>>2]),e=w(Ot(w(o-w(D[n>>2]))))>2]=0,t[o+4>>2]=0,t[o+8>>2]=0,Ru(o|0,e|0,n|0,0),wn(e,3,(c[o+11>>0]|0)<0?t[o>>2]|0:o,r),ML(o),h=r}function $0(e,n,r,o){e=w(e),n=w(n),r=r|0,o=o|0;var s=tt;e=w(e*n),s=w(V4(e,w(1)));do if(Vr(s,w(0))|0)e=w(e-s);else{if(e=w(e-s),Vr(s,w(1))|0){e=w(e+w(1));break}if(r){e=w(e+w(1));break}o||(s>w(.5)?s=w(1):(o=Vr(s,w(.5))|0,s=w(o?1:0)),e=w(e+s))}while(0);return w(e/n)}function K0(e,n,r,o,s,l,d,_,y,k,T,P,q){e=e|0,n=w(n),r=r|0,o=w(o),s=s|0,l=w(l),d=d|0,_=w(_),y=w(y),k=w(k),T=w(T),P=w(P),q=q|0;var we=0,le=tt,ie=tt,Pe=tt,ke=tt,qe=tt,pe=tt;return y>2]),le!=w(0)):0)?(Pe=w($0(n,le,0,0)),ke=w($0(o,le,0,0)),ie=w($0(l,le,0,0)),le=w($0(_,le,0,0))):(ie=l,Pe=n,le=_,ke=o),(s|0)==(e|0)?we=Vr(ie,Pe)|0:we=0,(d|0)==(r|0)?q=Vr(le,ke)|0:q=0,((we?0:(qe=w(n-T),!(ae(e,qe,y)|0)))?!(Be(e,qe,s,y)|0):0)?we=Ie(e,qe,s,l,y)|0:we=1,((q?0:(pe=w(o-P),!(ae(r,pe,k)|0)))?!(Be(r,pe,d,k)|0):0)?q=Ie(r,pe,d,_,k)|0:q=1,q=we&q),q|0}function ae(e,n,r){return e=e|0,n=w(n),r=w(r),(e|0)==1?e=Vr(n,r)|0:e=0,e|0}function Be(e,n,r,o){return e=e|0,n=w(n),r=r|0,o=w(o),(e|0)==2&(r|0)==0?n>=o?e=1:e=Vr(n,o)|0:e=0,e|0}function Ie(e,n,r,o,s){return e=e|0,n=w(n),r=r|0,o=w(o),s=w(s),(e|0)==2&(r|0)==2&o>n?s<=n?e=1:e=Vr(n,s)|0:e=0,e|0}function ht(e,n,r,o,s,l,d,_,y,k,T){e=e|0,n=w(n),r=w(r),o=o|0,s=s|0,l=l|0,d=w(d),_=w(_),y=y|0,k=k|0,T=T|0;var P=0,q=0,we=0,le=0,ie=tt,Pe=tt,ke=0,qe=0,pe=0,_e=0,vt=0,Ln=0,Ht=0,It=0,gn=0,Pn=0,zt=0,Dr=tt,Ki=tt,Xi=tt,Ji=0,Ro=0;zt=h,h=h+160|0,It=zt+152|0,Ht=zt+120|0,Ln=zt+104|0,pe=zt+72|0,le=zt+56|0,vt=zt+8|0,qe=zt,_e=(t[2279]|0)+1|0,t[2279]=_e,gn=e+984|0,((c[gn>>0]|0)!=0?(t[e+512>>2]|0)!=(t[2278]|0):0)?ke=4:(t[e+516>>2]|0)==(o|0)?Pn=0:ke=4,(ke|0)==4&&(t[e+520>>2]=0,t[e+924>>2]=-1,t[e+928>>2]=-1,D[e+932>>2]=w(-1),D[e+936>>2]=w(-1),Pn=1);e:do if(t[e+964>>2]|0)if(ie=w(mt(e,2,d)),Pe=w(mt(e,0,d)),P=e+916|0,Xi=w(D[P>>2]),Ki=w(D[e+920>>2]),Dr=w(D[e+932>>2]),K0(s,n,l,r,t[e+924>>2]|0,Xi,t[e+928>>2]|0,Ki,Dr,w(D[e+936>>2]),ie,Pe,T)|0)ke=22;else if(we=t[e+520>>2]|0,!we)ke=21;else for(q=0;;){if(P=e+524+(q*24|0)|0,Dr=w(D[P>>2]),Ki=w(D[e+524+(q*24|0)+4>>2]),Xi=w(D[e+524+(q*24|0)+16>>2]),K0(s,n,l,r,t[e+524+(q*24|0)+8>>2]|0,Dr,t[e+524+(q*24|0)+12>>2]|0,Ki,Xi,w(D[e+524+(q*24|0)+20>>2]),ie,Pe,T)|0){ke=22;break e}if(q=q+1|0,q>>>0>=we>>>0){ke=21;break}}else{if(y){if(P=e+916|0,!(Vr(w(D[P>>2]),n)|0)){ke=21;break}if(!(Vr(w(D[e+920>>2]),r)|0)){ke=21;break}if((t[e+924>>2]|0)!=(s|0)){ke=21;break}P=(t[e+928>>2]|0)==(l|0)?P:0,ke=22;break}if(we=t[e+520>>2]|0,!we)ke=21;else for(q=0;;){if(P=e+524+(q*24|0)|0,((Vr(w(D[P>>2]),n)|0?Vr(w(D[e+524+(q*24|0)+4>>2]),r)|0:0)?(t[e+524+(q*24|0)+8>>2]|0)==(s|0):0)?(t[e+524+(q*24|0)+12>>2]|0)==(l|0):0){ke=22;break e}if(q=q+1|0,q>>>0>=we>>>0){ke=21;break}}}while(0);do if((ke|0)==21)c[11697]|0?(P=0,ke=28):(P=0,ke=31);else if((ke|0)==22){if(q=(c[11697]|0)!=0,!((P|0)!=0&(Pn^1)))if(q){ke=28;break}else{ke=31;break}le=P+16|0,t[e+908>>2]=t[le>>2],we=P+20|0,t[e+912>>2]=t[we>>2],(c[11698]|0)==0|q^1||(t[qe>>2]=Gn(_e)|0,t[qe+4>>2]=_e,wn(e,4,2972,qe),q=t[e+972>>2]|0,q|0&&Nl[q&127](e),s=$t(s,y)|0,l=$t(l,y)|0,Ro=+w(D[le>>2]),Ji=+w(D[we>>2]),t[vt>>2]=s,t[vt+4>>2]=l,L[vt+8>>3]=+n,L[vt+16>>3]=+r,L[vt+24>>3]=Ro,L[vt+32>>3]=Ji,t[vt+40>>2]=k,wn(e,4,2989,vt))}while(0);return(ke|0)==28&&(q=Gn(_e)|0,t[le>>2]=q,t[le+4>>2]=_e,t[le+8>>2]=Pn?3047:11699,wn(e,4,3038,le),q=t[e+972>>2]|0,q|0&&Nl[q&127](e),vt=$t(s,y)|0,ke=$t(l,y)|0,t[pe>>2]=vt,t[pe+4>>2]=ke,L[pe+8>>3]=+n,L[pe+16>>3]=+r,t[pe+24>>2]=k,wn(e,4,3049,pe),ke=31),(ke|0)==31&&(X0(e,n,r,o,s,l,d,_,y,T),c[11697]|0&&(q=t[2279]|0,vt=Gn(q)|0,t[Ln>>2]=vt,t[Ln+4>>2]=q,t[Ln+8>>2]=Pn?3047:11699,wn(e,4,3083,Ln),q=t[e+972>>2]|0,q|0&&Nl[q&127](e),vt=$t(s,y)|0,Ln=$t(l,y)|0,Ji=+w(D[e+908>>2]),Ro=+w(D[e+912>>2]),t[Ht>>2]=vt,t[Ht+4>>2]=Ln,L[Ht+8>>3]=Ji,L[Ht+16>>3]=Ro,t[Ht+24>>2]=k,wn(e,4,3092,Ht)),t[e+516>>2]=o,P||(q=e+520|0,P=t[q>>2]|0,(P|0)==16&&(c[11697]|0&&wn(e,4,3124,It),t[q>>2]=0,P=0),y?P=e+916|0:(t[q>>2]=P+1,P=e+524+(P*24|0)|0),D[P>>2]=n,D[P+4>>2]=r,t[P+8>>2]=s,t[P+12>>2]=l,t[P+16>>2]=t[e+908>>2],t[P+20>>2]=t[e+912>>2],P=0)),y&&(t[e+416>>2]=t[e+908>>2],t[e+420>>2]=t[e+912>>2],c[e+985>>0]=1,c[gn>>0]=0),t[2279]=(t[2279]|0)+-1,t[e+512>>2]=t[2278],h=zt,Pn|(P|0)==0|0}function mt(e,n,r){e=e|0,n=n|0,r=w(r);var o=tt;return o=w(Tr(e,n,r)),w(o+w(R0(e,n,r)))}function wn(e,n,r,o){e=e|0,n=n|0,r=r|0,o=o|0;var s=0,l=0;l=h,h=h+16|0,s=l,t[s>>2]=o,e?o=t[e+976>>2]|0:o=0,Ku(o,e,n,r,s),h=l}function Gn(e){return e=e|0,(e>>>0>60?3201:3201+(60-e)|0)|0}function $t(e,n){e=e|0,n=n|0;var r=0,o=0,s=0;return s=h,h=h+32|0,r=s+12|0,o=s,t[r>>2]=t[254],t[r+4>>2]=t[255],t[r+8>>2]=t[256],t[o>>2]=t[257],t[o+4>>2]=t[258],t[o+8>>2]=t[259],(e|0)>2?e=11699:e=t[(n?o:r)+(e<<2)>>2]|0,h=s,e|0}function X0(e,n,r,o,s,l,d,_,y,k){e=e|0,n=w(n),r=w(r),o=o|0,s=s|0,l=l|0,d=w(d),_=w(_),y=y|0,k=k|0;var T=0,P=0,q=0,we=0,le=tt,ie=tt,Pe=tt,ke=tt,qe=tt,pe=tt,_e=tt,vt=0,Ln=0,Ht=0,It=tt,gn=tt,Pn=0,zt=tt,Dr=0,Ki=0,Xi=0,Ji=0,Ro=0,kf=0,Af=0,Cu=0,Of=0,Js=0,Qs=0,If=0,Pf=0,Mf=0,Kn=0,Tu=0,Ff=0,us=0,Lf=tt,Rf=tt,Zs=tt,el=tt,ss=tt,Fi=0,nu=0,go=0,xu=0,jl=0,Ul=tt,tl=tt,ql=tt,zl=tt,Li=tt,Di=tt,ku=0,xr=tt,Wl=tt,Qi=tt,ls=tt,Zi=tt,fs=tt,Hl=0,bl=0,cs=tt,Ri=tt,Au=0,Gl=0,Vl=0,Yl=0,En=tt,br=0,Ei=0,eo=0,Ni=0,xn=0,Vt=0,Ou=0,kt=tt,$l=0,Qr=0;Ou=h,h=h+16|0,Fi=Ou+12|0,nu=Ou+8|0,go=Ou+4|0,xu=Ou,i0(e,(s|0)==0|(gt(n)|0)^1,3326),i0(e,(l|0)==0|(gt(r)|0)^1,3406),Ei=so(e,o)|0,t[e+496>>2]=Ei,xn=N0(2,Ei)|0,Vt=N0(0,Ei)|0,D[e+440>>2]=w(Tr(e,xn,d)),D[e+444>>2]=w(R0(e,xn,d)),D[e+428>>2]=w(Tr(e,Vt,d)),D[e+436>>2]=w(R0(e,Vt,d)),D[e+464>>2]=w(C0(e,xn)),D[e+468>>2]=w(di(e,xn)),D[e+452>>2]=w(C0(e,Vt)),D[e+460>>2]=w(di(e,Vt)),D[e+488>>2]=w(u0(e,xn,d)),D[e+492>>2]=w(v0(e,xn,d)),D[e+476>>2]=w(u0(e,Vt,d)),D[e+484>>2]=w(v0(e,Vt,d));do if(t[e+964>>2]|0)To(e,n,r,s,l,d,_);else{if(eo=e+948|0,Ni=(t[e+952>>2]|0)-(t[eo>>2]|0)>>2,!Ni){pu(e,n,r,s,l,d,_);break}if(y?0:Sl(e,n,r,s,l,d,_)|0)break;bo(e),Tu=e+508|0,c[Tu>>0]=0,xn=N0(t[e+4>>2]|0,Ei)|0,Vt=Cl(xn,Ei)|0,br=Nr(xn)|0,Ff=t[e+8>>2]|0,Gl=e+28|0,us=(t[Gl>>2]|0)!=0,Zi=br?d:_,cs=br?_:d,Lf=w(B0(e,xn,d)),Rf=w(hu(e,xn,d)),le=w(B0(e,Vt,d)),fs=w(Fn(e,xn,d)),Ri=w(Fn(e,Vt,d)),Ht=br?s:l,Au=br?l:s,En=br?fs:Ri,qe=br?Ri:fs,ls=w(mt(e,2,d)),ke=w(mt(e,0,d)),ie=w(w(Tn(e+364|0,d))-En),Pe=w(w(Tn(e+380|0,d))-En),pe=w(w(Tn(e+372|0,_))-qe),_e=w(w(Tn(e+388|0,_))-qe),Zs=br?ie:pe,el=br?Pe:_e,ls=w(n-ls),n=w(ls-En),gt(n)|0?En=n:En=w(Ur(w(cc(n,Pe)),ie)),Wl=w(r-ke),n=w(Wl-qe),gt(n)|0?Qi=n:Qi=w(Ur(w(cc(n,_e)),pe)),ie=br?En:Qi,xr=br?Qi:En;e:do if((Ht|0)==1)for(o=0,P=0;;){if(T=e0(e,P)|0,!o)(w(Br(T))>w(0)?w(zr(T))>w(0):0)?o=T:o=0;else if(pi(T)|0){we=0;break e}if(P=P+1|0,P>>>0>=Ni>>>0){we=o;break}}else we=0;while(0);vt=we+500|0,Ln=we+504|0,o=0,T=0,n=w(0),q=0;do{if(P=t[(t[eo>>2]|0)+(q<<2)>>2]|0,(t[P+36>>2]|0)==1)lo(P),c[P+985>>0]=1,c[P+984>>0]=0;else{$r(P),y&&Yo(P,so(P,Ei)|0,ie,xr,En);do if((t[P+24>>2]|0)!=1)if((P|0)==(we|0)){t[vt>>2]=t[2278],D[Ln>>2]=w(0);break}else{wr(e,P,En,s,Qi,En,Qi,l,Ei,k);break}else T|0&&(t[T+960>>2]=P),t[P+960>>2]=0,T=P,o=(o|0)==0?P:o;while(0);Di=w(D[P+504>>2]),n=w(n+w(Di+w(mt(P,xn,En))))}q=q+1|0}while((q|0)!=(Ni|0));for(Xi=n>ie,ku=us&((Ht|0)==2&Xi)?1:Ht,Dr=(Au|0)==1,Ro=Dr&(y^1),kf=(ku|0)==1,Af=(ku|0)==2,Cu=976+(xn<<2)|0,Of=(Au|2|0)==2,Mf=Dr&(us^1),Js=1040+(Vt<<2)|0,Qs=1040+(xn<<2)|0,If=976+(Vt<<2)|0,Pf=(Au|0)!=1,Xi=us&((Ht|0)!=0&Xi),Ki=e+976|0,Dr=Dr^1,n=ie,Pn=0,Ji=0,Di=w(0),ss=w(0);;){e:do if(Pn>>>0>>0)for(Ln=t[eo>>2]|0,q=0,_e=w(0),pe=w(0),Pe=w(0),ie=w(0),P=0,T=0,we=Pn;;){if(vt=t[Ln+(we<<2)>>2]|0,(t[vt+36>>2]|0)!=1?(t[vt+940>>2]=Ji,(t[vt+24>>2]|0)!=1):0){if(ke=w(mt(vt,xn,En)),Kn=t[Cu>>2]|0,r=w(Tn(vt+380+(Kn<<3)|0,Zi)),qe=w(D[vt+504>>2]),r=w(cc(r,qe)),r=w(Ur(w(Tn(vt+364+(Kn<<3)|0,Zi)),r)),us&(q|0)!=0&w(ke+w(pe+r))>n){l=q,ke=_e,Ht=we;break e}ke=w(ke+r),r=w(pe+ke),ke=w(_e+ke),pi(vt)|0&&(Pe=w(Pe+w(Br(vt))),ie=w(ie-w(qe*w(zr(vt))))),T|0&&(t[T+960>>2]=vt),t[vt+960>>2]=0,q=q+1|0,T=vt,P=(P|0)==0?vt:P}else ke=_e,r=pe;if(we=we+1|0,we>>>0>>0)_e=ke,pe=r;else{l=q,Ht=we;break}}else l=0,ke=w(0),Pe=w(0),ie=w(0),P=0,Ht=Pn;while(0);Kn=Pe>w(0)&Pew(0)&ieel&((gt(el)|0)^1))n=el,Kn=51;else if(c[(t[Ki>>2]|0)+3>>0]|0)Kn=51;else{if(It!=w(0)?w(Br(e))!=w(0):0){Kn=53;break}n=ke,Kn=53}while(0);if((Kn|0)==51&&(Kn=0,gt(n)|0?Kn=53:(gn=w(n-ke),zt=n)),(Kn|0)==53&&(Kn=0,ke>2]|0,we=gnw(0),pe=w(gn/It),Pe=w(0),ke=w(0),n=w(0),T=P;do r=w(Tn(T+380+(q<<3)|0,Zi)),ie=w(Tn(T+364+(q<<3)|0,Zi)),ie=w(cc(r,w(Ur(ie,w(D[T+504>>2]))))),we?(r=w(ie*w(zr(T))),(r!=w(-0)?(kt=w(ie-w(qe*r)),Ul=w(kn(T,xn,kt,zt,En)),kt!=Ul):0)&&(Pe=w(Pe-w(Ul-ie)),n=w(n+r))):((vt?(tl=w(Br(T)),tl!=w(0)):0)?(kt=w(ie+w(pe*tl)),ql=w(kn(T,xn,kt,zt,En)),kt!=ql):0)&&(Pe=w(Pe-w(ql-ie)),ke=w(ke-tl)),T=t[T+960>>2]|0;while((T|0)!=0);if(n=w(_e+n),ie=w(gn+Pe),jl)n=w(0);else{qe=w(It+ke),we=t[Cu>>2]|0,vt=iew(0),qe=w(ie/qe),n=w(0);do{kt=w(Tn(P+380+(we<<3)|0,Zi)),Pe=w(Tn(P+364+(we<<3)|0,Zi)),Pe=w(cc(kt,w(Ur(Pe,w(D[P+504>>2]))))),vt?(kt=w(Pe*w(zr(P))),ie=w(-kt),kt!=w(-0)?(kt=w(pe*ie),ie=w(kn(P,xn,w(Pe+(Ln?ie:kt)),zt,En))):ie=Pe):(q?(zl=w(Br(P)),zl!=w(0)):0)?ie=w(kn(P,xn,w(Pe+w(qe*zl)),zt,En)):ie=Pe,n=w(n-w(ie-Pe)),ke=w(mt(P,xn,En)),r=w(mt(P,Vt,En)),ie=w(ie+ke),D[nu>>2]=ie,t[xu>>2]=1,Pe=w(D[P+396>>2]);e:do if(gt(Pe)|0){T=gt(xr)|0;do if(!T){if(Xi|(m0(P,Vt,xr)|0|Dr)||(T0(e,P)|0)!=4||(t[(hi(P,Vt)|0)+4>>2]|0)==3||(t[(Ai(P,Vt)|0)+4>>2]|0)==3)break;D[Fi>>2]=xr,t[go>>2]=1;break e}while(0);if(m0(P,Vt,xr)|0){T=t[P+992+(t[If>>2]<<2)>>2]|0,kt=w(r+w(Tn(T,xr))),D[Fi>>2]=kt,T=Pf&(t[T+4>>2]|0)==2,t[go>>2]=((gt(kt)|0|T)^1)&1;break}else{D[Fi>>2]=xr,t[go>>2]=T?0:2;break}}else kt=w(ie-ke),It=w(kt/Pe),kt=w(Pe*kt),t[go>>2]=1,D[Fi>>2]=w(r+(br?It:kt));while(0);Kt(P,xn,zt,En,xu,nu),Kt(P,Vt,xr,En,go,Fi);do if(m0(P,Vt,xr)|0?0:(T0(e,P)|0)==4){if((t[(hi(P,Vt)|0)+4>>2]|0)==3){T=0;break}T=(t[(Ai(P,Vt)|0)+4>>2]|0)!=3}else T=0;while(0);kt=w(D[nu>>2]),It=w(D[Fi>>2]),$l=t[xu>>2]|0,Qr=t[go>>2]|0,ht(P,br?kt:It,br?It:kt,Ei,br?$l:Qr,br?Qr:$l,En,Qi,y&(T^1),3488,k)|0,c[Tu>>0]=c[Tu>>0]|c[P+508>>0],P=t[P+960>>2]|0}while((P|0)!=0)}}else n=w(0);if(n=w(gn+n),Qr=n>0]=Qr|C[Tu>>0],Af&n>w(0)?(T=t[Cu>>2]|0,((t[e+364+(T<<3)+4>>2]|0)!=0?(Li=w(Tn(e+364+(T<<3)|0,Zi)),Li>=w(0)):0)?ie=w(Ur(w(0),w(Li-w(zt-n)))):ie=w(0)):ie=n,vt=Pn>>>0>>0,vt){we=t[eo>>2]|0,q=Pn,T=0;do P=t[we+(q<<2)>>2]|0,t[P+24>>2]|0||(T=((t[(hi(P,xn)|0)+4>>2]|0)==3&1)+T|0,T=T+((t[(Ai(P,xn)|0)+4>>2]|0)==3&1)|0),q=q+1|0;while((q|0)!=(Ht|0));T?(ke=w(0),r=w(0)):Kn=101}else Kn=101;e:do if((Kn|0)==101)switch(Kn=0,Ff|0){case 1:{T=0,ke=w(ie*w(.5)),r=w(0);break e}case 2:{T=0,ke=ie,r=w(0);break e}case 3:{if(l>>>0<=1){T=0,ke=w(0),r=w(0);break e}r=w((l+-1|0)>>>0),T=0,ke=w(0),r=w(w(Ur(ie,w(0)))/r);break e}case 5:{r=w(ie/w((l+1|0)>>>0)),T=0,ke=r;break e}case 4:{r=w(ie/w(l>>>0)),T=0,ke=w(r*w(.5));break e}default:{T=0,ke=w(0),r=w(0);break e}}while(0);if(n=w(Lf+ke),vt){Pe=w(ie/w(T|0)),q=t[eo>>2]|0,P=Pn,ie=w(0);do{T=t[q+(P<<2)>>2]|0;e:do if((t[T+36>>2]|0)!=1){switch(t[T+24>>2]|0){case 1:{if(X(T,xn)|0){if(!y)break e;kt=w(Y(T,xn,zt)),kt=w(kt+w(C0(e,xn))),kt=w(kt+w(Tr(T,xn,En))),D[T+400+(t[Qs>>2]<<2)>>2]=kt;break e}break}case 0:if(Qr=(t[(hi(T,xn)|0)+4>>2]|0)==3,kt=w(Pe+n),n=Qr?kt:n,y&&(Qr=T+400+(t[Qs>>2]<<2)|0,D[Qr>>2]=w(n+w(D[Qr>>2]))),Qr=(t[(Ai(T,xn)|0)+4>>2]|0)==3,kt=w(Pe+n),n=Qr?kt:n,Ro){kt=w(r+w(mt(T,xn,En))),ie=xr,n=w(n+w(kt+w(D[T+504>>2])));break e}else{n=w(n+w(r+w(ye(T,xn,En)))),ie=w(Ur(ie,w(ye(T,Vt,En))));break e}default:}y&&(kt=w(ke+w(C0(e,xn))),Qr=T+400+(t[Qs>>2]<<2)|0,D[Qr>>2]=w(kt+w(D[Qr>>2])))}while(0);P=P+1|0}while((P|0)!=(Ht|0))}else ie=w(0);if(r=w(Rf+n),Of?ke=w(w(kn(e,Vt,w(Ri+ie),cs,d))-Ri):ke=xr,Pe=w(w(kn(e,Vt,w(Ri+(Mf?xr:ie)),cs,d))-Ri),vt&y){P=Pn;do{q=t[(t[eo>>2]|0)+(P<<2)>>2]|0;do if((t[q+36>>2]|0)!=1){if((t[q+24>>2]|0)==1){if(X(q,Vt)|0){if(kt=w(Y(q,Vt,xr)),kt=w(kt+w(C0(e,Vt))),kt=w(kt+w(Tr(q,Vt,En))),T=t[Js>>2]|0,D[q+400+(T<<2)>>2]=kt,!(gt(kt)|0))break}else T=t[Js>>2]|0;kt=w(C0(e,Vt)),D[q+400+(T<<2)>>2]=w(kt+w(Tr(q,Vt,En)));break}T=T0(e,q)|0;do if((T|0)==4){if((t[(hi(q,Vt)|0)+4>>2]|0)==3){Kn=139;break}if((t[(Ai(q,Vt)|0)+4>>2]|0)==3){Kn=139;break}if(m0(q,Vt,xr)|0){n=le;break}$l=t[q+908+(t[Cu>>2]<<2)>>2]|0,t[Fi>>2]=$l,n=w(D[q+396>>2]),Qr=gt(n)|0,ie=(t[j>>2]=$l,w(D[j>>2])),Qr?n=Pe:(gn=w(mt(q,Vt,En)),kt=w(ie/n),n=w(n*ie),n=w(gn+(br?kt:n))),D[nu>>2]=n,D[Fi>>2]=w(w(mt(q,xn,En))+ie),t[go>>2]=1,t[xu>>2]=1,Kt(q,xn,zt,En,go,Fi),Kt(q,Vt,xr,En,xu,nu),n=w(D[Fi>>2]),gn=w(D[nu>>2]),kt=br?n:gn,n=br?gn:n,Qr=((gt(kt)|0)^1)&1,ht(q,kt,n,Ei,Qr,((gt(n)|0)^1)&1,En,Qi,1,3493,k)|0,n=le}else Kn=139;while(0);e:do if((Kn|0)==139){Kn=0,n=w(ke-w(ye(q,Vt,En)));do if((t[(hi(q,Vt)|0)+4>>2]|0)==3){if((t[(Ai(q,Vt)|0)+4>>2]|0)!=3)break;n=w(le+w(Ur(w(0),w(n*w(.5)))));break e}while(0);if((t[(Ai(q,Vt)|0)+4>>2]|0)==3){n=le;break}if((t[(hi(q,Vt)|0)+4>>2]|0)==3){n=w(le+w(Ur(w(0),n)));break}switch(T|0){case 1:{n=le;break e}case 2:{n=w(le+w(n*w(.5)));break e}default:{n=w(le+n);break e}}}while(0);kt=w(Di+n),Qr=q+400+(t[Js>>2]<<2)|0,D[Qr>>2]=w(kt+w(D[Qr>>2]))}while(0);P=P+1|0}while((P|0)!=(Ht|0))}if(Di=w(Di+Pe),ss=w(Ur(ss,r)),l=Ji+1|0,Ht>>>0>=Ni>>>0)break;n=zt,Pn=Ht,Ji=l}do if(y){if(T=l>>>0>1,T?0:!(he(e)|0))break;if(!(gt(xr)|0)){n=w(xr-Di);e:do switch(t[e+12>>2]|0){case 3:{le=w(le+n),pe=w(0);break}case 2:{le=w(le+w(n*w(.5))),pe=w(0);break}case 4:{xr>Di?pe=w(n/w(l>>>0)):pe=w(0);break}case 7:if(xr>Di){le=w(le+w(n/w(l<<1>>>0))),pe=w(n/w(l>>>0)),pe=T?pe:w(0);break e}else{le=w(le+w(n*w(.5))),pe=w(0);break e}case 6:{pe=w(n/w(Ji>>>0)),pe=xr>Di&T?pe:w(0);break}default:pe=w(0)}while(0);if(l|0)for(vt=1040+(Vt<<2)|0,Ln=976+(Vt<<2)|0,we=0,P=0;;){e:do if(P>>>0>>0)for(ie=w(0),Pe=w(0),n=w(0),q=P;;){T=t[(t[eo>>2]|0)+(q<<2)>>2]|0;do if((t[T+36>>2]|0)!=1?(t[T+24>>2]|0)==0:0){if((t[T+940>>2]|0)!=(we|0))break e;if(We(T,Vt)|0&&(kt=w(D[T+908+(t[Ln>>2]<<2)>>2]),n=w(Ur(n,w(kt+w(mt(T,Vt,En)))))),(T0(e,T)|0)!=5)break;Li=w(et(T)),Li=w(Li+w(Tr(T,0,En))),kt=w(D[T+912>>2]),kt=w(w(kt+w(mt(T,0,En)))-Li),Li=w(Ur(Pe,Li)),kt=w(Ur(ie,kt)),ie=kt,Pe=Li,n=w(Ur(n,w(Li+kt)))}while(0);if(T=q+1|0,T>>>0>>0)q=T;else{q=T;break}}else Pe=w(0),n=w(0),q=P;while(0);if(qe=w(pe+n),r=le,le=w(le+qe),P>>>0>>0){ke=w(r+Pe),T=P;do{P=t[(t[eo>>2]|0)+(T<<2)>>2]|0;e:do if((t[P+36>>2]|0)!=1?(t[P+24>>2]|0)==0:0)switch(T0(e,P)|0){case 1:{kt=w(r+w(Tr(P,Vt,En))),D[P+400+(t[vt>>2]<<2)>>2]=kt;break e}case 3:{kt=w(w(le-w(R0(P,Vt,En)))-w(D[P+908+(t[Ln>>2]<<2)>>2])),D[P+400+(t[vt>>2]<<2)>>2]=kt;break e}case 2:{kt=w(r+w(w(qe-w(D[P+908+(t[Ln>>2]<<2)>>2]))*w(.5))),D[P+400+(t[vt>>2]<<2)>>2]=kt;break e}case 4:{if(kt=w(r+w(Tr(P,Vt,En))),D[P+400+(t[vt>>2]<<2)>>2]=kt,m0(P,Vt,xr)|0||(br?(ie=w(D[P+908>>2]),n=w(ie+w(mt(P,xn,En))),Pe=qe):(Pe=w(D[P+912>>2]),Pe=w(Pe+w(mt(P,Vt,En))),n=qe,ie=w(D[P+908>>2])),Vr(n,ie)|0?Vr(Pe,w(D[P+912>>2]))|0:0))break e;ht(P,n,Pe,Ei,1,1,En,Qi,1,3501,k)|0;break e}case 5:{D[P+404>>2]=w(w(ke-w(et(P)))+w(Y(P,0,xr)));break e}default:break e}while(0);T=T+1|0}while((T|0)!=(q|0))}if(we=we+1|0,(we|0)==(l|0))break;P=q}}}while(0);if(D[e+908>>2]=w(kn(e,2,ls,d,d)),D[e+912>>2]=w(kn(e,0,Wl,_,d)),((ku|0)!=0?(Hl=t[e+32>>2]|0,bl=(ku|0)==2,!(bl&(Hl|0)!=2)):0)?bl&(Hl|0)==2&&(n=w(fs+zt),n=w(Ur(w(cc(n,w(Dt(e,xn,ss,Zi)))),fs)),Kn=198):(n=w(kn(e,xn,ss,Zi,d)),Kn=198),(Kn|0)==198&&(D[e+908+(t[976+(xn<<2)>>2]<<2)>>2]=n),((Au|0)!=0?(Vl=t[e+32>>2]|0,Yl=(Au|0)==2,!(Yl&(Vl|0)!=2)):0)?Yl&(Vl|0)==2&&(n=w(Ri+xr),n=w(Ur(w(cc(n,w(Dt(e,Vt,w(Ri+Di),cs)))),Ri)),Kn=204):(n=w(kn(e,Vt,w(Ri+Di),cs,d)),Kn=204),(Kn|0)==204&&(D[e+908+(t[976+(Vt<<2)>>2]<<2)>>2]=n),y){if((t[Gl>>2]|0)==2){P=976+(Vt<<2)|0,q=1040+(Vt<<2)|0,T=0;do we=e0(e,T)|0,t[we+24>>2]|0||($l=t[P>>2]|0,kt=w(D[e+908+($l<<2)>>2]),Qr=we+400+(t[q>>2]<<2)|0,kt=w(kt-w(D[Qr>>2])),D[Qr>>2]=w(kt-w(D[we+908+($l<<2)>>2]))),T=T+1|0;while((T|0)!=(Ni|0))}if(o|0){T=br?ku:s;do bt(e,o,En,T,Qi,Ei,k),o=t[o+960>>2]|0;while((o|0)!=0)}if(T=(xn|2|0)==3,P=(Vt|2|0)==3,T|P){o=0;do q=t[(t[eo>>2]|0)+(o<<2)>>2]|0,(t[q+36>>2]|0)!=1&&(T&&Zt(e,q,xn),P&&Zt(e,q,Vt)),o=o+1|0;while((o|0)!=(Ni|0))}}}while(0);h=Ou}function ki(e,n){e=e|0,n=w(n);var r=0;li(e,n>=w(0),3147),r=n==w(0),D[e+4>>2]=r?w(0):n}function Yr(e,n,r,o){e=e|0,n=w(n),r=w(r),o=o|0;var s=tt,l=tt,d=0,_=0,y=0;t[2278]=(t[2278]|0)+1,$r(e),m0(e,2,n)|0?(s=w(Tn(t[e+992>>2]|0,n)),y=1,s=w(s+w(mt(e,2,n)))):(s=w(Tn(e+380|0,n)),s>=w(0)?y=2:(y=((gt(n)|0)^1)&1,s=n)),m0(e,0,r)|0?(l=w(Tn(t[e+996>>2]|0,r)),_=1,l=w(l+w(mt(e,0,n)))):(l=w(Tn(e+388|0,r)),l>=w(0)?_=2:(_=((gt(r)|0)^1)&1,l=r)),d=e+976|0,(ht(e,s,l,o,y,_,n,r,1,3189,t[d>>2]|0)|0?(Yo(e,t[e+496>>2]|0,n,r,n),bi(e,w(D[(t[d>>2]|0)+4>>2]),w(0),w(0)),c[11696]|0):0)&&ff(e,7)}function $r(e){e=e|0;var n=0,r=0,o=0,s=0,l=0,d=0,_=0,y=0,k=0,T=0;_=h,h=h+32|0,d=_+24|0,l=_+16|0,o=_+8|0,s=_,r=0;do n=e+380+(r<<3)|0,((t[e+380+(r<<3)+4>>2]|0)!=0?(y=n,k=t[y+4>>2]|0,T=o,t[T>>2]=t[y>>2],t[T+4>>2]=k,T=e+364+(r<<3)|0,k=t[T+4>>2]|0,y=s,t[y>>2]=t[T>>2],t[y+4>>2]=k,t[l>>2]=t[o>>2],t[l+4>>2]=t[o+4>>2],t[d>>2]=t[s>>2],t[d+4>>2]=t[s+4>>2],o0(l,d)|0):0)||(n=e+348+(r<<3)|0),t[e+992+(r<<2)>>2]=n,r=r+1|0;while((r|0)!=2);h=_}function m0(e,n,r){e=e|0,n=n|0,r=w(r);var o=0;switch(e=t[e+992+(t[976+(n<<2)>>2]<<2)>>2]|0,t[e+4>>2]|0){case 0:case 3:{e=0;break}case 1:{w(D[e>>2])>2])>2]|0){case 2:{n=w(w(w(D[e>>2])*n)/w(100));break}case 1:{n=w(D[e>>2]);break}default:n=w(J)}return w(n)}function Yo(e,n,r,o,s){e=e|0,n=n|0,r=w(r),o=w(o),s=w(s);var l=0,d=tt;n=t[e+944>>2]|0?n:1,l=N0(t[e+4>>2]|0,n)|0,n=Cl(l,n)|0,r=w(Wr(e,l,r)),o=w(Wr(e,n,o)),d=w(r+w(Tr(e,l,s))),D[e+400+(t[1040+(l<<2)>>2]<<2)>>2]=d,r=w(r+w(R0(e,l,s))),D[e+400+(t[1e3+(l<<2)>>2]<<2)>>2]=r,r=w(o+w(Tr(e,n,s))),D[e+400+(t[1040+(n<<2)>>2]<<2)>>2]=r,s=w(o+w(R0(e,n,s))),D[e+400+(t[1e3+(n<<2)>>2]<<2)>>2]=s}function bi(e,n,r,o){e=e|0,n=w(n),r=w(r),o=w(o);var s=0,l=0,d=tt,_=tt,y=0,k=0,T=tt,P=0,q=tt,we=tt,le=tt,ie=tt;if(n!=w(0)&&(s=e+400|0,ie=w(D[s>>2]),l=e+404|0,le=w(D[l>>2]),P=e+416|0,we=w(D[P>>2]),k=e+420|0,d=w(D[k>>2]),q=w(ie+r),T=w(le+o),o=w(q+we),_=w(T+d),y=(t[e+988>>2]|0)==1,D[s>>2]=w($0(ie,n,0,y)),D[l>>2]=w($0(le,n,0,y)),r=w(V4(w(we*n),w(1))),Vr(r,w(0))|0?l=0:l=(Vr(r,w(1))|0)^1,r=w(V4(w(d*n),w(1))),Vr(r,w(0))|0?s=0:s=(Vr(r,w(1))|0)^1,ie=w($0(o,n,y&l,y&(l^1))),D[P>>2]=w(ie-w($0(q,n,0,y))),ie=w($0(_,n,y&s,y&(s^1))),D[k>>2]=w(ie-w($0(T,n,0,y))),l=(t[e+952>>2]|0)-(t[e+948>>2]|0)>>2,l|0)){s=0;do bi(e0(e,s)|0,n,q,T),s=s+1|0;while((s|0)!=(l|0))}}function or(e,n,r,o,s){switch(e=e|0,n=n|0,r=r|0,o=o|0,s=s|0,r|0){case 5:case 0:{e=q8(t[489]|0,o,s)|0;break}default:e=AL(o,s)|0}return e|0}function zs(e,n,r,o){e=e|0,n=n|0,r=r|0,o=o|0;var s=0,l=0;s=h,h=h+16|0,l=s,t[l>>2]=o,Ku(e,0,n,r,l),h=s}function Ku(e,n,r,o,s){if(e=e|0,n=n|0,r=r|0,o=o|0,s=s|0,e=e|0?e:956,sD[t[e+8>>2]&1](e,n,r,o,s)|0,(r|0)==5)_n();else return}function J0(e,n,r){e=e|0,n=n|0,r=r|0,c[e+n>>0]=r&1}function af(e,n){e=e|0,n=n|0;var r=0,o=0;t[e>>2]=0,t[e+4>>2]=0,t[e+8>>2]=0,r=n+4|0,o=(t[r>>2]|0)-(t[n>>2]|0)>>2,o|0&&(S0(e,o),El(e,t[n>>2]|0,t[r>>2]|0,o))}function S0(e,n){e=e|0,n=n|0;var r=0;if((Q0(e)|0)>>>0>>0&&$n(e),n>>>0>1073741823)_n();else{r=Tt(n<<2)|0,t[e+4>>2]=r,t[e>>2]=r,t[e+8>>2]=r+(n<<2);return}}function El(e,n,r,o){e=e|0,n=n|0,r=r|0,o=o|0,o=e+4|0,e=r-n|0,(e|0)>0&&(vn(t[o>>2]|0,n|0,e|0)|0,t[o>>2]=(t[o>>2]|0)+(e>>>2<<2))}function Q0(e){return e=e|0,1073741823}function Tr(e,n,r){return e=e|0,n=n|0,r=w(r),(Nr(n)|0?(t[e+96>>2]|0)!=0:0)?e=e+92|0:e=en(e+60|0,t[1040+(n<<2)>>2]|0,992)|0,w(uo(e,r))}function R0(e,n,r){return e=e|0,n=n|0,r=w(r),(Nr(n)|0?(t[e+104>>2]|0)!=0:0)?e=e+100|0:e=en(e+60|0,t[1e3+(n<<2)>>2]|0,992)|0,w(uo(e,r))}function Nr(e){return e=e|0,(e|1|0)==3|0}function uo(e,n){return e=e|0,n=w(n),(t[e+4>>2]|0)==3?n=w(0):n=w(Tn(e,n)),w(n)}function so(e,n){return e=e|0,n=n|0,e=t[e>>2]|0,((e|0)==0?(n|0)>1?n:1:e)|0}function N0(e,n){e=e|0,n=n|0;var r=0;e:do if((n|0)==2){switch(e|0){case 2:{e=3;break e}case 3:break;default:{r=4;break e}}e=2}else r=4;while(0);return e|0}function C0(e,n){e=e|0,n=n|0;var r=tt;return((Nr(n)|0?(t[e+312>>2]|0)!=0:0)?(r=w(D[e+308>>2]),r>=w(0)):0)||(r=w(Ur(w(D[(en(e+276|0,t[1040+(n<<2)>>2]|0,992)|0)>>2]),w(0)))),w(r)}function di(e,n){e=e|0,n=n|0;var r=tt;return((Nr(n)|0?(t[e+320>>2]|0)!=0:0)?(r=w(D[e+316>>2]),r>=w(0)):0)||(r=w(Ur(w(D[(en(e+276|0,t[1e3+(n<<2)>>2]|0,992)|0)>>2]),w(0)))),w(r)}function u0(e,n,r){e=e|0,n=n|0,r=w(r);var o=tt;return((Nr(n)|0?(t[e+240>>2]|0)!=0:0)?(o=w(Tn(e+236|0,r)),o>=w(0)):0)||(o=w(Ur(w(Tn(en(e+204|0,t[1040+(n<<2)>>2]|0,992)|0,r)),w(0)))),w(o)}function v0(e,n,r){e=e|0,n=n|0,r=w(r);var o=tt;return((Nr(n)|0?(t[e+248>>2]|0)!=0:0)?(o=w(Tn(e+244|0,r)),o>=w(0)):0)||(o=w(Ur(w(Tn(en(e+204|0,t[1e3+(n<<2)>>2]|0,992)|0,r)),w(0)))),w(o)}function To(e,n,r,o,s,l,d){e=e|0,n=w(n),r=w(r),o=o|0,s=s|0,l=w(l),d=w(d);var _=tt,y=tt,k=tt,T=tt,P=tt,q=tt,we=0,le=0,ie=0;ie=h,h=h+16|0,we=ie,le=e+964|0,i0(e,(t[le>>2]|0)!=0,3519),_=w(Fn(e,2,n)),y=w(Fn(e,0,n)),k=w(mt(e,2,n)),T=w(mt(e,0,n)),gt(n)|0?P=n:P=w(Ur(w(0),w(w(n-k)-_))),gt(r)|0?q=r:q=w(Ur(w(0),w(w(r-T)-y))),(o|0)==1&(s|0)==1?(D[e+908>>2]=w(kn(e,2,w(n-k),l,l)),n=w(kn(e,0,w(r-T),d,l))):(lD[t[le>>2]&1](we,e,P,o,q,s),P=w(_+w(D[we>>2])),q=w(n-k),D[e+908>>2]=w(kn(e,2,(o|2|0)==2?P:q,l,l)),q=w(y+w(D[we+4>>2])),n=w(r-T),n=w(kn(e,0,(s|2|0)==2?q:n,d,l))),D[e+912>>2]=n,h=ie}function pu(e,n,r,o,s,l,d){e=e|0,n=w(n),r=w(r),o=o|0,s=s|0,l=w(l),d=w(d);var _=tt,y=tt,k=tt,T=tt;k=w(Fn(e,2,l)),_=w(Fn(e,0,l)),T=w(mt(e,2,l)),y=w(mt(e,0,l)),n=w(n-T),D[e+908>>2]=w(kn(e,2,(o|2|0)==2?k:n,l,l)),r=w(r-y),D[e+912>>2]=w(kn(e,0,(s|2|0)==2?_:r,d,l))}function Sl(e,n,r,o,s,l,d){e=e|0,n=w(n),r=w(r),o=o|0,s=s|0,l=w(l),d=w(d);var _=0,y=tt,k=tt;return _=(o|0)==2,((n<=w(0)&_?0:!(r<=w(0)&(s|0)==2))?!((o|0)==1&(s|0)==1):0)?e=0:(y=w(mt(e,0,l)),k=w(mt(e,2,l)),_=n>2]=w(kn(e,2,_?w(0):n,l,l)),n=w(r-y),_=r>2]=w(kn(e,0,_?w(0):n,d,l)),e=1),e|0}function Cl(e,n){return e=e|0,n=n|0,qt(e)|0?e=N0(2,n)|0:e=0,e|0}function B0(e,n,r){return e=e|0,n=n|0,r=w(r),r=w(u0(e,n,r)),w(r+w(C0(e,n)))}function hu(e,n,r){return e=e|0,n=n|0,r=w(r),r=w(v0(e,n,r)),w(r+w(di(e,n)))}function Fn(e,n,r){e=e|0,n=n|0,r=w(r);var o=tt;return o=w(B0(e,n,r)),w(o+w(hu(e,n,r)))}function pi(e){return e=e|0,t[e+24>>2]|0?e=0:w(Br(e))!=w(0)?e=1:e=w(zr(e))!=w(0),e|0}function Br(e){e=e|0;var n=tt;if(t[e+944>>2]|0){if(n=w(D[e+44>>2]),gt(n)|0)return n=w(D[e+40>>2]),e=n>w(0)&((gt(n)|0)^1),w(e?n:w(0))}else n=w(0);return w(n)}function zr(e){e=e|0;var n=tt,r=0,o=tt;do if(t[e+944>>2]|0){if(n=w(D[e+48>>2]),gt(n)|0){if(r=c[(t[e+976>>2]|0)+2>>0]|0,r<<24>>24==0?(o=w(D[e+40>>2]),o>24?w(1):w(0)}}else n=w(0);while(0);return w(n)}function lo(e){e=e|0;var n=0,r=0;if(pa(e+400|0,0,540)|0,c[e+985>>0]=1,bo(e),r=fi(e)|0,r|0){n=e+948|0,e=0;do lo(t[(t[n>>2]|0)+(e<<2)>>2]|0),e=e+1|0;while((e|0)!=(r|0))}}function wr(e,n,r,o,s,l,d,_,y,k){e=e|0,n=n|0,r=w(r),o=o|0,s=w(s),l=w(l),d=w(d),_=_|0,y=y|0,k=k|0;var T=0,P=tt,q=0,we=0,le=tt,ie=tt,Pe=0,ke=tt,qe=0,pe=tt,_e=0,vt=0,Ln=0,Ht=0,It=0,gn=0,Pn=0,zt=0,Dr=0,Ki=0;Dr=h,h=h+16|0,Ln=Dr+12|0,Ht=Dr+8|0,It=Dr+4|0,gn=Dr,zt=N0(t[e+4>>2]|0,y)|0,_e=Nr(zt)|0,P=w(Tn(Ut(n)|0,_e?l:d)),vt=m0(n,2,l)|0,Pn=m0(n,0,d)|0;do if(gt(P)|0?0:!(gt(_e?r:s)|0)){if(T=n+504|0,!(gt(w(D[T>>2]))|0)&&(!(fn(t[n+976>>2]|0,0)|0)||(t[n+500>>2]|0)==(t[2278]|0)))break;D[T>>2]=w(Ur(P,w(Fn(n,zt,l))))}else q=7;while(0);do if((q|0)==7){if(qe=_e^1,!(qe|vt^1)){d=w(Tn(t[n+992>>2]|0,l)),D[n+504>>2]=w(Ur(d,w(Fn(n,2,l))));break}if(!(_e|Pn^1)){d=w(Tn(t[n+996>>2]|0,d)),D[n+504>>2]=w(Ur(d,w(Fn(n,0,l))));break}D[Ln>>2]=w(J),D[Ht>>2]=w(J),t[It>>2]=0,t[gn>>2]=0,ke=w(mt(n,2,l)),pe=w(mt(n,0,l)),vt?(le=w(ke+w(Tn(t[n+992>>2]|0,l))),D[Ln>>2]=le,t[It>>2]=1,we=1):(we=0,le=w(J)),Pn?(P=w(pe+w(Tn(t[n+996>>2]|0,d))),D[Ht>>2]=P,t[gn>>2]=1,T=1):(T=0,P=w(J)),q=t[e+32>>2]|0,_e&(q|0)==2?q=2:(gt(le)|0?!(gt(r)|0):0)&&(D[Ln>>2]=r,t[It>>2]=2,we=2,le=r),(((q|0)==2&qe?0:gt(P)|0)?!(gt(s)|0):0)&&(D[Ht>>2]=s,t[gn>>2]=2,T=2,P=s),ie=w(D[n+396>>2]),Pe=gt(ie)|0;do if(Pe)q=we;else{if((we|0)==1&qe){D[Ht>>2]=w(w(le-ke)/ie),t[gn>>2]=1,T=1,q=1;break}_e&(T|0)==1?(D[Ln>>2]=w(ie*w(P-pe)),t[It>>2]=1,T=1,q=1):q=we}while(0);Ki=gt(r)|0,we=(T0(e,n)|0)!=4,(_e|vt|((o|0)!=1|Ki)|(we|(q|0)==1)?0:(D[Ln>>2]=r,t[It>>2]=1,!Pe))&&(D[Ht>>2]=w(w(r-ke)/ie),t[gn>>2]=1,T=1),(Pn|qe|((_|0)!=1|(gt(s)|0))|(we|(T|0)==1)?0:(D[Ht>>2]=s,t[gn>>2]=1,!Pe))&&(D[Ln>>2]=w(ie*w(s-pe)),t[It>>2]=1),Kt(n,2,l,l,It,Ln),Kt(n,0,d,l,gn,Ht),r=w(D[Ln>>2]),s=w(D[Ht>>2]),ht(n,r,s,y,t[It>>2]|0,t[gn>>2]|0,l,d,0,3565,k)|0,d=w(D[n+908+(t[976+(zt<<2)>>2]<<2)>>2]),D[n+504>>2]=w(Ur(d,w(Fn(n,zt,l))))}while(0);t[n+500>>2]=t[2278],h=Dr}function kn(e,n,r,o,s){return e=e|0,n=n|0,r=w(r),o=w(o),s=w(s),o=w(Dt(e,n,r,o)),w(Ur(o,w(Fn(e,n,s))))}function T0(e,n){return e=e|0,n=n|0,n=n+20|0,n=t[((t[n>>2]|0)==0?e+16|0:n)>>2]|0,((n|0)==5?qt(t[e+4>>2]|0)|0:0)&&(n=1),n|0}function hi(e,n){return e=e|0,n=n|0,(Nr(n)|0?(t[e+96>>2]|0)!=0:0)?n=4:n=t[1040+(n<<2)>>2]|0,e+60+(n<<3)|0}function Ai(e,n){return e=e|0,n=n|0,(Nr(n)|0?(t[e+104>>2]|0)!=0:0)?n=5:n=t[1e3+(n<<2)>>2]|0,e+60+(n<<3)|0}function Kt(e,n,r,o,s,l){switch(e=e|0,n=n|0,r=w(r),o=w(o),s=s|0,l=l|0,r=w(Tn(e+380+(t[976+(n<<2)>>2]<<3)|0,r)),r=w(r+w(mt(e,n,o))),t[s>>2]|0){case 2:case 1:{s=gt(r)|0,o=w(D[l>>2]),D[l>>2]=s|o>2]=2,D[l>>2]=r);break}default:}}function X(e,n){return e=e|0,n=n|0,e=e+132|0,(Nr(n)|0?(t[(en(e,4,948)|0)+4>>2]|0)!=0:0)?e=1:e=(t[(en(e,t[1040+(n<<2)>>2]|0,948)|0)+4>>2]|0)!=0,e|0}function Y(e,n,r){e=e|0,n=n|0,r=w(r);var o=0,s=0;return e=e+132|0,(Nr(n)|0?(o=en(e,4,948)|0,(t[o+4>>2]|0)!=0):0)?s=4:(o=en(e,t[1040+(n<<2)>>2]|0,948)|0,t[o+4>>2]|0?s=4:r=w(0)),(s|0)==4&&(r=w(Tn(o,r))),w(r)}function ye(e,n,r){e=e|0,n=n|0,r=w(r);var o=tt;return o=w(D[e+908+(t[976+(n<<2)>>2]<<2)>>2]),o=w(o+w(Tr(e,n,r))),w(o+w(R0(e,n,r)))}function he(e){e=e|0;var n=0,r=0,o=0;e:do if(qt(t[e+4>>2]|0)|0)n=0;else if((t[e+16>>2]|0)!=5)if(r=fi(e)|0,!r)n=0;else for(n=0;;){if(o=e0(e,n)|0,(t[o+24>>2]|0)==0?(t[o+20>>2]|0)==5:0){n=1;break e}if(n=n+1|0,n>>>0>=r>>>0){n=0;break}}else n=1;while(0);return n|0}function We(e,n){e=e|0,n=n|0;var r=tt;return r=w(D[e+908+(t[976+(n<<2)>>2]<<2)>>2]),r>=w(0)&((gt(r)|0)^1)|0}function et(e){e=e|0;var n=tt,r=0,o=0,s=0,l=0,d=0,_=0,y=tt;if(r=t[e+968>>2]|0,r)y=w(D[e+908>>2]),n=w(D[e+912>>2]),n=w(rD[r&0](e,y,n)),i0(e,(gt(n)|0)^1,3573);else{l=fi(e)|0;do if(l|0){for(r=0,s=0;;){if(o=e0(e,s)|0,t[o+940>>2]|0){d=8;break}if((t[o+24>>2]|0)!=1)if(_=(T0(e,o)|0)==5,_){r=o;break}else r=(r|0)==0?o:r;if(s=s+1|0,s>>>0>=l>>>0){d=8;break}}if((d|0)==8&&!r)break;return n=w(et(r)),w(n+w(D[r+404>>2]))}while(0);n=w(D[e+912>>2])}return w(n)}function Dt(e,n,r,o){e=e|0,n=n|0,r=w(r),o=w(o);var s=tt,l=0;return qt(n)|0?(n=1,l=3):Nr(n)|0?(n=0,l=3):(o=w(J),s=w(J)),(l|0)==3&&(s=w(Tn(e+364+(n<<3)|0,o)),o=w(Tn(e+380+(n<<3)|0,o))),l=o=w(0)&((gt(o)|0)^1)),r=l?o:r,l=s>=w(0)&((gt(s)|0)^1)&r>2]|0,l)|0,le=Cl(Pe,l)|0,ie=Nr(Pe)|0,P=w(mt(n,2,r)),q=w(mt(n,0,r)),m0(n,2,r)|0?_=w(P+w(Tn(t[n+992>>2]|0,r))):(X(n,2)|0?_t(n,2)|0:0)?(_=w(D[e+908>>2]),y=w(C0(e,2)),y=w(_-w(y+w(di(e,2)))),_=w(Y(n,2,r)),_=w(kn(n,2,w(y-w(_+w(_r(n,2,r)))),r,r))):_=w(J),m0(n,0,s)|0?y=w(q+w(Tn(t[n+996>>2]|0,s))):(X(n,0)|0?_t(n,0)|0:0)?(y=w(D[e+912>>2]),qe=w(C0(e,0)),qe=w(y-w(qe+w(di(e,0)))),y=w(Y(n,0,s)),y=w(kn(n,0,w(qe-w(y+w(_r(n,0,s)))),s,r))):y=w(J),k=gt(_)|0,T=gt(y)|0;do if(k^T?(we=w(D[n+396>>2]),!(gt(we)|0)):0)if(k){_=w(P+w(w(y-q)*we));break}else{qe=w(q+w(w(_-P)/we)),y=T?qe:y;break}while(0);T=gt(_)|0,k=gt(y)|0,T|k&&(pe=(T^1)&1,o=r>w(0)&((o|0)!=0&T),_=ie?_:o?r:_,ht(n,_,y,l,ie?pe:o?2:pe,T&(k^1)&1,_,y,0,3623,d)|0,_=w(D[n+908>>2]),_=w(_+w(mt(n,2,r))),y=w(D[n+912>>2]),y=w(y+w(mt(n,0,r)))),ht(n,_,y,l,1,1,_,y,1,3635,d)|0,(_t(n,Pe)|0?!(X(n,Pe)|0):0)?(pe=t[976+(Pe<<2)>>2]|0,qe=w(D[e+908+(pe<<2)>>2]),qe=w(qe-w(D[n+908+(pe<<2)>>2])),qe=w(qe-w(di(e,Pe))),qe=w(qe-w(R0(n,Pe,r))),qe=w(qe-w(_r(n,Pe,ie?r:s))),D[n+400+(t[1040+(Pe<<2)>>2]<<2)>>2]=qe):ke=21;do if((ke|0)==21){if(X(n,Pe)|0?0:(t[e+8>>2]|0)==1){pe=t[976+(Pe<<2)>>2]|0,qe=w(D[e+908+(pe<<2)>>2]),qe=w(w(qe-w(D[n+908+(pe<<2)>>2]))*w(.5)),D[n+400+(t[1040+(Pe<<2)>>2]<<2)>>2]=qe;break}(X(n,Pe)|0?0:(t[e+8>>2]|0)==2)&&(pe=t[976+(Pe<<2)>>2]|0,qe=w(D[e+908+(pe<<2)>>2]),qe=w(qe-w(D[n+908+(pe<<2)>>2])),D[n+400+(t[1040+(Pe<<2)>>2]<<2)>>2]=qe)}while(0);(_t(n,le)|0?!(X(n,le)|0):0)?(pe=t[976+(le<<2)>>2]|0,qe=w(D[e+908+(pe<<2)>>2]),qe=w(qe-w(D[n+908+(pe<<2)>>2])),qe=w(qe-w(di(e,le))),qe=w(qe-w(R0(n,le,r))),qe=w(qe-w(_r(n,le,ie?s:r))),D[n+400+(t[1040+(le<<2)>>2]<<2)>>2]=qe):ke=30;do if((ke|0)==30?!(X(n,le)|0):0){if((T0(e,n)|0)==2){pe=t[976+(le<<2)>>2]|0,qe=w(D[e+908+(pe<<2)>>2]),qe=w(w(qe-w(D[n+908+(pe<<2)>>2]))*w(.5)),D[n+400+(t[1040+(le<<2)>>2]<<2)>>2]=qe;break}pe=(T0(e,n)|0)==3,pe^(t[e+28>>2]|0)==2&&(pe=t[976+(le<<2)>>2]|0,qe=w(D[e+908+(pe<<2)>>2]),qe=w(qe-w(D[n+908+(pe<<2)>>2])),D[n+400+(t[1040+(le<<2)>>2]<<2)>>2]=qe)}while(0)}function Zt(e,n,r){e=e|0,n=n|0,r=r|0;var o=tt,s=0;s=t[976+(r<<2)>>2]|0,o=w(D[n+908+(s<<2)>>2]),o=w(w(D[e+908+(s<<2)>>2])-o),o=w(o-w(D[n+400+(t[1040+(r<<2)>>2]<<2)>>2])),D[n+400+(t[1e3+(r<<2)>>2]<<2)>>2]=o}function qt(e){return e=e|0,(e|1|0)==1|0}function Ut(e){e=e|0;var n=tt;switch(t[e+56>>2]|0){case 0:case 3:{n=w(D[e+40>>2]),n>w(0)&((gt(n)|0)^1)?e=c[(t[e+976>>2]|0)+2>>0]|0?1056:992:e=1056;break}default:e=e+52|0}return e|0}function fn(e,n){return e=e|0,n=n|0,(c[e+n>>0]|0)!=0|0}function _t(e,n){return e=e|0,n=n|0,e=e+132|0,(Nr(n)|0?(t[(en(e,5,948)|0)+4>>2]|0)!=0:0)?e=1:e=(t[(en(e,t[1e3+(n<<2)>>2]|0,948)|0)+4>>2]|0)!=0,e|0}function _r(e,n,r){e=e|0,n=n|0,r=w(r);var o=0,s=0;return e=e+132|0,(Nr(n)|0?(o=en(e,5,948)|0,(t[o+4>>2]|0)!=0):0)?s=4:(o=en(e,t[1e3+(n<<2)>>2]|0,948)|0,t[o+4>>2]|0?s=4:r=w(0)),(s|0)==4&&(r=w(Tn(o,r))),w(r)}function Wr(e,n,r){return e=e|0,n=n|0,r=w(r),X(e,n)|0?r=w(Y(e,n,r)):r=w(-w(_r(e,n,r))),w(r)}function Ar(e){return e=w(e),D[j>>2]=e,t[j>>2]|0|0}function z(e,n,r,o){e=e|0,n=n|0,r=r|0,o=o|0;var s=0;t[e+12>>2]=0,t[e+16>>2]=o;do if(n)if(n>>>0>1073741823)_n();else{s=Tt(n<<2)|0;break}else s=0;while(0);t[e>>2]=s,o=s+(r<<2)|0,t[e+8>>2]=o,t[e+4>>2]=o,t[e+12>>2]=s+(n<<2)}function dr(e,n){e=e|0,n=n|0;var r=0,o=0,s=0,l=0,d=0;o=t[e>>2]|0,d=e+4|0,l=n+4|0,s=(t[d>>2]|0)-o|0,r=(t[l>>2]|0)+(0-(s>>2)<<2)|0,t[l>>2]=r,(s|0)>0?(vn(r|0,o|0,s|0)|0,o=l,r=t[l>>2]|0):o=l,l=t[e>>2]|0,t[e>>2]=r,t[o>>2]=l,l=n+8|0,s=t[d>>2]|0,t[d>>2]=t[l>>2],t[l>>2]=s,l=e+8|0,d=n+12|0,e=t[l>>2]|0,t[l>>2]=t[d>>2],t[d>>2]=e,t[n>>2]=t[o>>2]}function Or(e){e=e|0;var n=0,r=0,o=0;n=t[e+4>>2]|0,r=e+8|0,o=t[r>>2]|0,(o|0)!=(n|0)&&(t[r>>2]=o+(~((o+-4-n|0)>>>2)<<2)),e=t[e>>2]|0,e|0&&Ve(e)}function Qn(e,n,r,o){e=e|0,n=n|0,r=r|0,o=o|0;var s=0,l=0,d=0,_=0;if(d=e+4|0,_=t[d>>2]|0,s=_-o|0,l=s>>2,e=n+(l<<2)|0,e>>>0>>0){o=_;do t[o>>2]=t[e>>2],e=e+4|0,o=(t[d>>2]|0)+4|0,t[d>>2]=o;while(e>>>0>>0)}l|0&&Y1(_+(0-l<<2)|0,n|0,s|0)|0}function nn(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0,d=0,_=0,y=0;return _=n+4|0,y=t[_>>2]|0,s=t[e>>2]|0,d=r,l=d-s|0,o=y+(0-(l>>2)<<2)|0,t[_>>2]=o,(l|0)>0&&vn(o|0,s|0,l|0)|0,s=e+4|0,l=n+8|0,o=(t[s>>2]|0)-d|0,(o|0)>0&&(vn(t[l>>2]|0,r|0,o|0)|0,t[l>>2]=(t[l>>2]|0)+(o>>>2<<2)),d=t[e>>2]|0,t[e>>2]=t[_>>2],t[_>>2]=d,d=t[s>>2]|0,t[s>>2]=t[l>>2],t[l>>2]=d,d=e+8|0,r=n+12|0,e=t[d>>2]|0,t[d>>2]=t[r>>2],t[r>>2]=e,t[n>>2]=t[_>>2],y|0}function s0(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0,d=0;if(d=t[n>>2]|0,l=t[r>>2]|0,(d|0)!=(l|0)){s=e+8|0,r=((l+-4-d|0)>>>2)+1|0,e=d,o=t[s>>2]|0;do t[o>>2]=t[e>>2],o=(t[s>>2]|0)+4|0,t[s>>2]=o,e=e+4|0;while((e|0)!=(l|0));t[n>>2]=d+(r<<2)}}function t0(){_l()}function g0(){var e=0;return e=Tt(4)|0,Kr(e),e|0}function Kr(e){e=e|0,t[e>>2]=a0()|0}function _0(e){e=e|0,e|0&&(Gi(e),Ve(e))}function Gi(e){e=e|0,V0(t[e>>2]|0)}function fo(e,n,r){e=e|0,n=n|0,r=r|0,J0(t[e>>2]|0,n,r)}function x0(e,n){e=e|0,n=w(n),ki(t[e>>2]|0,n)}function Xu(e,n){return e=e|0,n=n|0,fn(t[e>>2]|0,n)|0}function Z0(){var e=0;return e=Tt(8)|0,df(e,0),e|0}function df(e,n){e=e|0,n=n|0,n?n=I0(t[n>>2]|0)|0:n=qu()|0,t[e>>2]=n,t[e+4>>2]=0,Bs(n,e)}function Ba(e){e=e|0;var n=0;return n=Tt(8)|0,df(n,e),n|0}function Oc(e){e=e|0,e|0&&(mu(e),Ve(e))}function mu(e){e=e|0;var n=0;Wu(t[e>>2]|0),n=e+4|0,e=t[n>>2]|0,t[n>>2]=0,e|0&&(Ju(e),Ve(e))}function Ju(e){e=e|0,ei(e)}function ei(e){e=e|0,e=t[e>>2]|0,e|0&&ju(e|0)}function Yf(e){return e=e|0,Vu(e)|0}function pf(e){e=e|0;var n=0,r=0;r=e+4|0,n=t[r>>2]|0,t[r>>2]=0,n|0&&(Ju(n),Ve(n)),Do(t[e>>2]|0)}function ja(e,n){e=e|0,n=n|0,Gu(t[e>>2]|0,t[n>>2]|0)}function Ua(e,n){e=e|0,n=n|0,W(t[e>>2]|0,n)}function Ic(e,n,r){e=e|0,n=n|0,r=+r,yn(t[e>>2]|0,n,w(r))}function vu(e,n,r){e=e|0,n=n|0,r=+r,sn(t[e>>2]|0,n,w(r))}function $f(e,n){e=e|0,n=n|0,R(t[e>>2]|0,n)}function gu(e,n){e=e|0,n=n|0,H(t[e>>2]|0,n)}function co(e,n){e=e|0,n=n|0,ue(t[e>>2]|0,n)}function qa(e,n){e=e|0,n=n|0,M0(t[e>>2]|0,n)}function Ws(e,n){e=e|0,n=n|0,Fe(t[e>>2]|0,n)}function za(e,n){e=e|0,n=n|0,Lr(t[e>>2]|0,n)}function Pc(e,n,r){e=e|0,n=n|0,r=+r,rn(t[e>>2]|0,n,w(r))}function Qu(e,n,r){e=e|0,n=n|0,r=+r,Hn(t[e>>2]|0,n,w(r))}function Mc(e,n){e=e|0,n=n|0,Cr(t[e>>2]|0,n)}function Fc(e,n){e=e|0,n=n|0,K(t[e>>2]|0,n)}function Lc(e,n){e=e|0,n=n|0,je(t[e>>2]|0,n)}function Kf(e,n){e=e|0,n=+n,rt(t[e>>2]|0,w(n))}function Tl(e,n){e=e|0,n=+n,wt(t[e>>2]|0,w(n))}function xl(e,n){e=e|0,n=+n,lt(t[e>>2]|0,w(n))}function hf(e,n){e=e|0,n=+n,st(t[e>>2]|0,w(n))}function xo(e,n){e=e|0,n=+n,xt(t[e>>2]|0,w(n))}function mf(e,n){e=e|0,n=+n,Qt(t[e>>2]|0,w(n))}function Wa(e,n){e=e|0,n=+n,Cn(t[e>>2]|0,w(n))}function ti(e){e=e|0,bn(t[e>>2]|0)}function Hs(e,n){e=e|0,n=+n,h0(t[e>>2]|0,w(n))}function mi(e,n){e=e|0,n=+n,ci(t[e>>2]|0,w(n))}function vi(e){e=e|0,xi(t[e>>2]|0)}function Xf(e,n){e=e|0,n=+n,qr(t[e>>2]|0,w(n))}function Rc(e,n){e=e|0,n=+n,Eo(t[e>>2]|0,w(n))}function Jf(e,n){e=e|0,n=+n,wl(t[e>>2]|0,w(n))}function ao(e,n){e=e|0,n=+n,js(t[e>>2]|0,w(n))}function $o(e,n){e=e|0,n=+n,du(t[e>>2]|0,w(n))}function kl(e,n){e=e|0,n=+n,Yu(t[e>>2]|0,w(n))}function Nc(e,n){e=e|0,n=+n,oo(t[e>>2]|0,w(n))}function Al(e,n){e=e|0,n=+n,Hi(t[e>>2]|0,w(n))}function vf(e,n){e=e|0,n=+n,F0(t[e>>2]|0,w(n))}function Qf(e,n,r){e=e|0,n=n|0,r=+r,ft(t[e>>2]|0,n,w(r))}function k0(e,n,r){e=e|0,n=n|0,r=+r,He(t[e>>2]|0,n,w(r))}function v(e,n,r){e=e|0,n=n|0,r=+r,Qe(t[e>>2]|0,n,w(r))}function m(e){return e=e|0,ve(t[e>>2]|0)|0}function S(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0;o=h,h=h+16|0,s=o,ar(s,t[n>>2]|0,r),O(e,s),h=o}function O(e,n){e=e|0,n=n|0,M(e,t[n+4>>2]|0,+w(D[n>>2]))}function M(e,n,r){e=e|0,n=n|0,r=+r,t[e>>2]=n,L[e+8>>3]=r}function b(e){return e=e|0,U(t[e>>2]|0)|0}function ee(e){return e=e|0,fe(t[e>>2]|0)|0}function Ye(e){return e=e|0,de(t[e>>2]|0)|0}function Ze(e){return e=e|0,au(t[e>>2]|0)|0}function ut(e){return e=e|0,Ge(t[e>>2]|0)|0}function In(e){return e=e|0,F(t[e>>2]|0)|0}function A0(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0;o=h,h=h+16|0,s=o,d0(s,t[n>>2]|0,r),O(e,s),h=o}function jr(e){return e=e|0,xe(t[e>>2]|0)|0}function gi(e){return e=e|0,Xe(t[e>>2]|0)|0}function po(e,n){e=e|0,n=n|0;var r=0,o=0;r=h,h=h+16|0,o=r,Rt(o,t[n>>2]|0),O(e,o),h=r}function _i(e){return e=e|0,+ +w(yl(t[e>>2]|0))}function Re(e){return e=e|0,+ +w(cu(t[e>>2]|0))}function Ce(e,n){e=e|0,n=n|0;var r=0,o=0;r=h,h=h+16|0,o=r,p0(o,t[n>>2]|0),O(e,o),h=r}function ze(e,n){e=e|0,n=n|0;var r=0,o=0;r=h,h=h+16|0,o=r,E0(o,t[n>>2]|0),O(e,o),h=r}function Et(e,n){e=e|0,n=n|0;var r=0,o=0;r=h,h=h+16|0,o=r,So(o,t[n>>2]|0),O(e,o),h=r}function on(e,n){e=e|0,n=n|0;var r=0,o=0;r=h,h=h+16|0,o=r,Dl(o,t[n>>2]|0),O(e,o),h=r}function sr(e,n){e=e|0,n=n|0;var r=0,o=0;r=h,h=h+16|0,o=r,Us(o,t[n>>2]|0),O(e,o),h=r}function mn(e,n){e=e|0,n=n|0;var r=0,o=0;r=h,h=h+16|0,o=r,qs(o,t[n>>2]|0),O(e,o),h=r}function pr(e){return e=e|0,+ +w(Gr(t[e>>2]|0))}function Hr(e,n){return e=e|0,n=n|0,+ +w(St(t[e>>2]|0,n))}function Vn(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0;o=h,h=h+16|0,s=o,Ne(s,t[n>>2]|0,r),O(e,s),h=o}function ni(e,n,r){e=e|0,n=n|0,r=r|0,Ns(t[e>>2]|0,t[n>>2]|0,r)}function Zf(e,n){e=e|0,n=n|0,D0(t[e>>2]|0,t[n>>2]|0)}function Pm(e){return e=e|0,fi(t[e>>2]|0)|0}function Ha(e){return e=e|0,e=nr(t[e>>2]|0)|0,e?e=Yf(e)|0:e=0,e|0}function vd(e,n){return e=e|0,n=n|0,e=e0(t[e>>2]|0,n)|0,e?e=Yf(e)|0:e=0,e|0}function gd(e,n){e=e|0,n=n|0;var r=0,o=0;o=Tt(4)|0,ba(o,n),r=e+4|0,n=t[r>>2]|0,t[r>>2]=o,n|0&&(Ju(n),Ve(n)),bu(t[e>>2]|0,1)}function ba(e,n){e=e|0,n=n|0,Oo(e,n)}function Bc(e,n,r,o,s,l){e=e|0,n=n|0,r=w(r),o=o|0,s=w(s),l=l|0;var d=0,_=0;d=h,h=h+16|0,_=d,Mm(_,Vu(n)|0,+r,o,+s,l),D[e>>2]=w(+L[_>>3]),D[e+4>>2]=w(+L[_+8>>3]),h=d}function Mm(e,n,r,o,s,l){e=e|0,n=n|0,r=+r,o=o|0,s=+s,l=l|0;var d=0,_=0,y=0,k=0,T=0;d=h,h=h+32|0,T=d+8|0,k=d+20|0,y=d,_=d+16|0,L[T>>3]=r,t[k>>2]=o,L[y>>3]=s,t[_>>2]=l,_d(e,t[n+4>>2]|0,T,k,y,_),h=d}function _d(e,n,r,o,s,l){e=e|0,n=n|0,r=r|0,o=o|0,s=s|0,l=l|0;var d=0,_=0;d=h,h=h+16|0,_=d,Zo(_),n=Oi(n)|0,Fm(e,n,+L[r>>3],t[o>>2]|0,+L[s>>3],t[l>>2]|0),eu(_),h=d}function Oi(e){return e=e|0,t[e>>2]|0}function Fm(e,n,r,o,s,l){e=e|0,n=n|0,r=+r,o=o|0,s=+s,l=l|0;var d=0;d=ko(yd()|0)|0,r=+Ko(r),o=jc(o)|0,s=+Ko(s),Ga(e,ro(0,d|0,n|0,+r,o|0,+s,jc(l)|0)|0)}function yd(){var e=0;return c[7608]|0||(Ed(9120),e=7608,t[e>>2]=1,t[e+4>>2]=0),9120}function ko(e){return e=e|0,t[e+8>>2]|0}function Ko(e){return e=+e,+ +Ol(e)}function jc(e){return e=e|0,Dd(e)|0}function Ga(e,n){e=e|0,n=n|0;var r=0,o=0,s=0;s=h,h=h+32|0,r=s,o=n,o&1?(Lm(r,0),c0(o|0,r|0)|0,Va(e,r),Wn(r)):(t[e>>2]=t[n>>2],t[e+4>>2]=t[n+4>>2],t[e+8>>2]=t[n+8>>2],t[e+12>>2]=t[n+12>>2]),h=s}function Lm(e,n){e=e|0,n=n|0,wd(e,n),t[e+8>>2]=0,c[e+24>>0]=0}function Va(e,n){e=e|0,n=n|0,n=n+8|0,t[e>>2]=t[n>>2],t[e+4>>2]=t[n+4>>2],t[e+8>>2]=t[n+8>>2],t[e+12>>2]=t[n+12>>2]}function Wn(e){e=e|0,c[e+24>>0]=0}function wd(e,n){e=e|0,n=n|0,t[e>>2]=n}function Dd(e){return e=e|0,e|0}function Ol(e){return e=+e,+e}function Ed(e){e=e|0,Ao(e,Rm()|0,4)}function Rm(){return 1064}function Ao(e,n,r){e=e|0,n=n|0,r=r|0,t[e>>2]=n,t[e+4>>2]=r,t[e+8>>2]=hl(n|0,r+1|0)|0}function Oo(e,n){e=e|0,n=n|0,n=t[n>>2]|0,t[e>>2]=n,qi(n|0)}function Nm(e){e=e|0;var n=0,r=0;r=e+4|0,n=t[r>>2]|0,t[r>>2]=0,n|0&&(Ju(n),Ve(n)),bu(t[e>>2]|0,0)}function Uc(e){e=e|0,rr(t[e>>2]|0)}function Ya(e){return e=e|0,Go(t[e>>2]|0)|0}function Sd(e,n,r,o){e=e|0,n=+n,r=+r,o=o|0,Yr(t[e>>2]|0,w(n),w(r),o)}function Cd(e){return e=e|0,+ +w(ir(t[e>>2]|0))}function ho(e){return e=e|0,+ +w(Y0(t[e>>2]|0))}function bs(e){return e=e|0,+ +w(L0(t[e>>2]|0))}function $a(e){return e=e|0,+ +w(Co(t[e>>2]|0))}function Td(e){return e=e|0,+ +w($u(t[e>>2]|0))}function qc(e){return e=e|0,+ +w(Vo(t[e>>2]|0))}function xd(e,n){e=e|0,n=n|0,L[e>>3]=+w(ir(t[n>>2]|0)),L[e+8>>3]=+w(Y0(t[n>>2]|0)),L[e+16>>3]=+w(L0(t[n>>2]|0)),L[e+24>>3]=+w(Co(t[n>>2]|0)),L[e+32>>3]=+w($u(t[n>>2]|0)),L[e+40>>3]=+w(Vo(t[n>>2]|0))}function Ka(e,n){return e=e|0,n=n|0,+ +w(Rr(t[e>>2]|0,n))}function kd(e,n){return e=e|0,n=n|0,+ +w(Jn(t[e>>2]|0,n))}function Xa(e,n){return e=e|0,n=n|0,+ +w(ai(t[e>>2]|0,n))}function Ja(){return Rs()|0}function Gs(){Bm(),Vs(),Ad(),Od(),Qa(),jm()}function Bm(){hO(11713,4938,1)}function Vs(){FA(10448)}function Ad(){hA(10408)}function Od(){Bk(10324)}function Qa(){Gx(10096)}function jm(){Um(9132)}function Um(e){e=e|0;var n=0,r=0,o=0,s=0,l=0,d=0,_=0,y=0,k=0,T=0,P=0,q=0,we=0,le=0,ie=0,Pe=0,ke=0,qe=0,pe=0,_e=0,vt=0,Ln=0,Ht=0,It=0,gn=0,Pn=0,zt=0,Dr=0,Ki=0,Xi=0,Ji=0,Ro=0,kf=0,Af=0,Cu=0,Of=0,Js=0,Qs=0,If=0,Pf=0,Mf=0,Kn=0,Tu=0,Ff=0,us=0,Lf=0,Rf=0,Zs=0,el=0,ss=0,Fi=0,nu=0,go=0,xu=0,jl=0,Ul=0,tl=0,ql=0,zl=0,Li=0,Di=0,ku=0,xr=0,Wl=0,Qi=0,ls=0,Zi=0,fs=0,Hl=0,bl=0,cs=0,Ri=0,Au=0,Gl=0,Vl=0,Yl=0,En=0,br=0,Ei=0,eo=0,Ni=0,xn=0,Vt=0,Ou=0;n=h,h=h+672|0,r=n+656|0,Ou=n+648|0,Vt=n+640|0,xn=n+632|0,Ni=n+624|0,eo=n+616|0,Ei=n+608|0,br=n+600|0,En=n+592|0,Yl=n+584|0,Vl=n+576|0,Gl=n+568|0,Au=n+560|0,Ri=n+552|0,cs=n+544|0,bl=n+536|0,Hl=n+528|0,fs=n+520|0,Zi=n+512|0,ls=n+504|0,Qi=n+496|0,Wl=n+488|0,xr=n+480|0,ku=n+472|0,Di=n+464|0,Li=n+456|0,zl=n+448|0,ql=n+440|0,tl=n+432|0,Ul=n+424|0,jl=n+416|0,xu=n+408|0,go=n+400|0,nu=n+392|0,Fi=n+384|0,ss=n+376|0,el=n+368|0,Zs=n+360|0,Rf=n+352|0,Lf=n+344|0,us=n+336|0,Ff=n+328|0,Tu=n+320|0,Kn=n+312|0,Mf=n+304|0,Pf=n+296|0,If=n+288|0,Qs=n+280|0,Js=n+272|0,Of=n+264|0,Cu=n+256|0,Af=n+248|0,kf=n+240|0,Ro=n+232|0,Ji=n+224|0,Xi=n+216|0,Ki=n+208|0,Dr=n+200|0,zt=n+192|0,Pn=n+184|0,gn=n+176|0,It=n+168|0,Ht=n+160|0,Ln=n+152|0,vt=n+144|0,_e=n+136|0,pe=n+128|0,qe=n+120|0,ke=n+112|0,Pe=n+104|0,ie=n+96|0,le=n+88|0,we=n+80|0,q=n+72|0,P=n+64|0,T=n+56|0,k=n+48|0,y=n+40|0,_=n+32|0,d=n+24|0,l=n+16|0,s=n+8|0,o=n,qm(e,3646),Id(e,3651,2)|0,Pd(e,3665,2)|0,zm(e,3682,18)|0,t[Ou>>2]=19,t[Ou+4>>2]=0,t[r>>2]=t[Ou>>2],t[r+4>>2]=t[Ou+4>>2],gf(e,3690,r)|0,t[Vt>>2]=1,t[Vt+4>>2]=0,t[r>>2]=t[Vt>>2],t[r+4>>2]=t[Vt+4>>2],Md(e,3696,r)|0,t[xn>>2]=2,t[xn+4>>2]=0,t[r>>2]=t[xn>>2],t[r+4>>2]=t[xn+4>>2],Xr(e,3706,r)|0,t[Ni>>2]=1,t[Ni+4>>2]=0,t[r>>2]=t[Ni>>2],t[r+4>>2]=t[Ni+4>>2],yi(e,3722,r)|0,t[eo>>2]=2,t[eo+4>>2]=0,t[r>>2]=t[eo>>2],t[r+4>>2]=t[eo+4>>2],yi(e,3734,r)|0,t[Ei>>2]=3,t[Ei+4>>2]=0,t[r>>2]=t[Ei>>2],t[r+4>>2]=t[Ei+4>>2],Xr(e,3753,r)|0,t[br>>2]=4,t[br+4>>2]=0,t[r>>2]=t[br>>2],t[r+4>>2]=t[br+4>>2],Xr(e,3769,r)|0,t[En>>2]=5,t[En+4>>2]=0,t[r>>2]=t[En>>2],t[r+4>>2]=t[En+4>>2],Xr(e,3783,r)|0,t[Yl>>2]=6,t[Yl+4>>2]=0,t[r>>2]=t[Yl>>2],t[r+4>>2]=t[Yl+4>>2],Xr(e,3796,r)|0,t[Vl>>2]=7,t[Vl+4>>2]=0,t[r>>2]=t[Vl>>2],t[r+4>>2]=t[Vl+4>>2],Xr(e,3813,r)|0,t[Gl>>2]=8,t[Gl+4>>2]=0,t[r>>2]=t[Gl>>2],t[r+4>>2]=t[Gl+4>>2],Xr(e,3825,r)|0,t[Au>>2]=3,t[Au+4>>2]=0,t[r>>2]=t[Au>>2],t[r+4>>2]=t[Au+4>>2],yi(e,3843,r)|0,t[Ri>>2]=4,t[Ri+4>>2]=0,t[r>>2]=t[Ri>>2],t[r+4>>2]=t[Ri+4>>2],yi(e,3853,r)|0,t[cs>>2]=9,t[cs+4>>2]=0,t[r>>2]=t[cs>>2],t[r+4>>2]=t[cs+4>>2],Xr(e,3870,r)|0,t[bl>>2]=10,t[bl+4>>2]=0,t[r>>2]=t[bl>>2],t[r+4>>2]=t[bl+4>>2],Xr(e,3884,r)|0,t[Hl>>2]=11,t[Hl+4>>2]=0,t[r>>2]=t[Hl>>2],t[r+4>>2]=t[Hl+4>>2],Xr(e,3896,r)|0,t[fs>>2]=1,t[fs+4>>2]=0,t[r>>2]=t[fs>>2],t[r+4>>2]=t[fs+4>>2],j0(e,3907,r)|0,t[Zi>>2]=2,t[Zi+4>>2]=0,t[r>>2]=t[Zi>>2],t[r+4>>2]=t[Zi+4>>2],j0(e,3915,r)|0,t[ls>>2]=3,t[ls+4>>2]=0,t[r>>2]=t[ls>>2],t[r+4>>2]=t[ls+4>>2],j0(e,3928,r)|0,t[Qi>>2]=4,t[Qi+4>>2]=0,t[r>>2]=t[Qi>>2],t[r+4>>2]=t[Qi+4>>2],j0(e,3948,r)|0,t[Wl>>2]=5,t[Wl+4>>2]=0,t[r>>2]=t[Wl>>2],t[r+4>>2]=t[Wl+4>>2],j0(e,3960,r)|0,t[xr>>2]=6,t[xr+4>>2]=0,t[r>>2]=t[xr>>2],t[r+4>>2]=t[xr+4>>2],j0(e,3974,r)|0,t[ku>>2]=7,t[ku+4>>2]=0,t[r>>2]=t[ku>>2],t[r+4>>2]=t[ku+4>>2],j0(e,3983,r)|0,t[Di>>2]=20,t[Di+4>>2]=0,t[r>>2]=t[Di>>2],t[r+4>>2]=t[Di+4>>2],gf(e,3999,r)|0,t[Li>>2]=8,t[Li+4>>2]=0,t[r>>2]=t[Li>>2],t[r+4>>2]=t[Li+4>>2],j0(e,4012,r)|0,t[zl>>2]=9,t[zl+4>>2]=0,t[r>>2]=t[zl>>2],t[r+4>>2]=t[zl+4>>2],j0(e,4022,r)|0,t[ql>>2]=21,t[ql+4>>2]=0,t[r>>2]=t[ql>>2],t[r+4>>2]=t[ql+4>>2],gf(e,4039,r)|0,t[tl>>2]=10,t[tl+4>>2]=0,t[r>>2]=t[tl>>2],t[r+4>>2]=t[tl+4>>2],j0(e,4053,r)|0,t[Ul>>2]=11,t[Ul+4>>2]=0,t[r>>2]=t[Ul>>2],t[r+4>>2]=t[Ul+4>>2],j0(e,4065,r)|0,t[jl>>2]=12,t[jl+4>>2]=0,t[r>>2]=t[jl>>2],t[r+4>>2]=t[jl+4>>2],j0(e,4084,r)|0,t[xu>>2]=13,t[xu+4>>2]=0,t[r>>2]=t[xu>>2],t[r+4>>2]=t[xu+4>>2],j0(e,4097,r)|0,t[go>>2]=14,t[go+4>>2]=0,t[r>>2]=t[go>>2],t[r+4>>2]=t[go+4>>2],j0(e,4117,r)|0,t[nu>>2]=15,t[nu+4>>2]=0,t[r>>2]=t[nu>>2],t[r+4>>2]=t[nu+4>>2],j0(e,4129,r)|0,t[Fi>>2]=16,t[Fi+4>>2]=0,t[r>>2]=t[Fi>>2],t[r+4>>2]=t[Fi+4>>2],j0(e,4148,r)|0,t[ss>>2]=17,t[ss+4>>2]=0,t[r>>2]=t[ss>>2],t[r+4>>2]=t[ss+4>>2],j0(e,4161,r)|0,t[el>>2]=18,t[el+4>>2]=0,t[r>>2]=t[el>>2],t[r+4>>2]=t[el+4>>2],j0(e,4181,r)|0,t[Zs>>2]=5,t[Zs+4>>2]=0,t[r>>2]=t[Zs>>2],t[r+4>>2]=t[Zs+4>>2],yi(e,4196,r)|0,t[Rf>>2]=6,t[Rf+4>>2]=0,t[r>>2]=t[Rf>>2],t[r+4>>2]=t[Rf+4>>2],yi(e,4206,r)|0,t[Lf>>2]=7,t[Lf+4>>2]=0,t[r>>2]=t[Lf>>2],t[r+4>>2]=t[Lf+4>>2],yi(e,4217,r)|0,t[us>>2]=3,t[us+4>>2]=0,t[r>>2]=t[us>>2],t[r+4>>2]=t[us+4>>2],Zu(e,4235,r)|0,t[Ff>>2]=1,t[Ff+4>>2]=0,t[r>>2]=t[Ff>>2],t[r+4>>2]=t[Ff+4>>2],_f(e,4251,r)|0,t[Tu>>2]=4,t[Tu+4>>2]=0,t[r>>2]=t[Tu>>2],t[r+4>>2]=t[Tu+4>>2],Zu(e,4263,r)|0,t[Kn>>2]=5,t[Kn+4>>2]=0,t[r>>2]=t[Kn>>2],t[r+4>>2]=t[Kn+4>>2],Zu(e,4279,r)|0,t[Mf>>2]=6,t[Mf+4>>2]=0,t[r>>2]=t[Mf>>2],t[r+4>>2]=t[Mf+4>>2],Zu(e,4293,r)|0,t[Pf>>2]=7,t[Pf+4>>2]=0,t[r>>2]=t[Pf>>2],t[r+4>>2]=t[Pf+4>>2],Zu(e,4306,r)|0,t[If>>2]=8,t[If+4>>2]=0,t[r>>2]=t[If>>2],t[r+4>>2]=t[If+4>>2],Zu(e,4323,r)|0,t[Qs>>2]=9,t[Qs+4>>2]=0,t[r>>2]=t[Qs>>2],t[r+4>>2]=t[Qs+4>>2],Zu(e,4335,r)|0,t[Js>>2]=2,t[Js+4>>2]=0,t[r>>2]=t[Js>>2],t[r+4>>2]=t[Js+4>>2],_f(e,4353,r)|0,t[Of>>2]=12,t[Of+4>>2]=0,t[r>>2]=t[Of>>2],t[r+4>>2]=t[Of+4>>2],Io(e,4363,r)|0,t[Cu>>2]=1,t[Cu+4>>2]=0,t[r>>2]=t[Cu>>2],t[r+4>>2]=t[Cu+4>>2],_u(e,4376,r)|0,t[Af>>2]=2,t[Af+4>>2]=0,t[r>>2]=t[Af>>2],t[r+4>>2]=t[Af+4>>2],_u(e,4388,r)|0,t[kf>>2]=13,t[kf+4>>2]=0,t[r>>2]=t[kf>>2],t[r+4>>2]=t[kf+4>>2],Io(e,4402,r)|0,t[Ro>>2]=14,t[Ro+4>>2]=0,t[r>>2]=t[Ro>>2],t[r+4>>2]=t[Ro+4>>2],Io(e,4411,r)|0,t[Ji>>2]=15,t[Ji+4>>2]=0,t[r>>2]=t[Ji>>2],t[r+4>>2]=t[Ji+4>>2],Io(e,4421,r)|0,t[Xi>>2]=16,t[Xi+4>>2]=0,t[r>>2]=t[Xi>>2],t[r+4>>2]=t[Xi+4>>2],Io(e,4433,r)|0,t[Ki>>2]=17,t[Ki+4>>2]=0,t[r>>2]=t[Ki>>2],t[r+4>>2]=t[Ki+4>>2],Io(e,4446,r)|0,t[Dr>>2]=18,t[Dr+4>>2]=0,t[r>>2]=t[Dr>>2],t[r+4>>2]=t[Dr+4>>2],Io(e,4458,r)|0,t[zt>>2]=3,t[zt+4>>2]=0,t[r>>2]=t[zt>>2],t[r+4>>2]=t[zt+4>>2],_u(e,4471,r)|0,t[Pn>>2]=1,t[Pn+4>>2]=0,t[r>>2]=t[Pn>>2],t[r+4>>2]=t[Pn+4>>2],ec(e,4486,r)|0,t[gn>>2]=10,t[gn+4>>2]=0,t[r>>2]=t[gn>>2],t[r+4>>2]=t[gn+4>>2],Zu(e,4496,r)|0,t[It>>2]=11,t[It+4>>2]=0,t[r>>2]=t[It>>2],t[r+4>>2]=t[It+4>>2],Zu(e,4508,r)|0,t[Ht>>2]=3,t[Ht+4>>2]=0,t[r>>2]=t[Ht>>2],t[r+4>>2]=t[Ht+4>>2],_f(e,4519,r)|0,t[Ln>>2]=4,t[Ln+4>>2]=0,t[r>>2]=t[Ln>>2],t[r+4>>2]=t[Ln+4>>2],Wm(e,4530,r)|0,t[vt>>2]=19,t[vt+4>>2]=0,t[r>>2]=t[vt>>2],t[r+4>>2]=t[vt+4>>2],Fd(e,4542,r)|0,t[_e>>2]=12,t[_e+4>>2]=0,t[r>>2]=t[_e>>2],t[r+4>>2]=t[_e+4>>2],yf(e,4554,r)|0,t[pe>>2]=13,t[pe+4>>2]=0,t[r>>2]=t[pe>>2],t[r+4>>2]=t[pe+4>>2],tc(e,4568,r)|0,t[qe>>2]=2,t[qe+4>>2]=0,t[r>>2]=t[qe>>2],t[r+4>>2]=t[qe+4>>2],Hm(e,4578,r)|0,t[ke>>2]=20,t[ke+4>>2]=0,t[r>>2]=t[ke>>2],t[r+4>>2]=t[ke+4>>2],Ld(e,4587,r)|0,t[Pe>>2]=22,t[Pe+4>>2]=0,t[r>>2]=t[Pe>>2],t[r+4>>2]=t[Pe+4>>2],gf(e,4602,r)|0,t[ie>>2]=23,t[ie+4>>2]=0,t[r>>2]=t[ie>>2],t[r+4>>2]=t[ie+4>>2],gf(e,4619,r)|0,t[le>>2]=14,t[le+4>>2]=0,t[r>>2]=t[le>>2],t[r+4>>2]=t[le+4>>2],Rd(e,4629,r)|0,t[we>>2]=1,t[we+4>>2]=0,t[r>>2]=t[we>>2],t[r+4>>2]=t[we+4>>2],zc(e,4637,r)|0,t[q>>2]=4,t[q+4>>2]=0,t[r>>2]=t[q>>2],t[r+4>>2]=t[q+4>>2],_u(e,4653,r)|0,t[P>>2]=5,t[P+4>>2]=0,t[r>>2]=t[P>>2],t[r+4>>2]=t[P+4>>2],_u(e,4669,r)|0,t[T>>2]=6,t[T+4>>2]=0,t[r>>2]=t[T>>2],t[r+4>>2]=t[T+4>>2],_u(e,4686,r)|0,t[k>>2]=7,t[k+4>>2]=0,t[r>>2]=t[k>>2],t[r+4>>2]=t[k+4>>2],_u(e,4701,r)|0,t[y>>2]=8,t[y+4>>2]=0,t[r>>2]=t[y>>2],t[r+4>>2]=t[y+4>>2],_u(e,4719,r)|0,t[_>>2]=9,t[_+4>>2]=0,t[r>>2]=t[_>>2],t[r+4>>2]=t[_+4>>2],_u(e,4736,r)|0,t[d>>2]=21,t[d+4>>2]=0,t[r>>2]=t[d>>2],t[r+4>>2]=t[d+4>>2],Nd(e,4754,r)|0,t[l>>2]=2,t[l+4>>2]=0,t[r>>2]=t[l>>2],t[r+4>>2]=t[l+4>>2],ec(e,4772,r)|0,t[s>>2]=3,t[s+4>>2]=0,t[r>>2]=t[s>>2],t[r+4>>2]=t[s+4>>2],ec(e,4790,r)|0,t[o>>2]=4,t[o+4>>2]=0,t[r>>2]=t[o>>2],t[r+4>>2]=t[o+4>>2],ec(e,4808,r)|0,h=n}function qm(e,n){e=e|0,n=n|0;var r=0;r=Nx()|0,t[e>>2]=r,Bx(r,n),Cf(t[e>>2]|0)}function Id(e,n,r){return e=e|0,n=n|0,r=r|0,Ex(e,Zn(n)|0,r,0),e|0}function Pd(e,n,r){return e=e|0,n=n|0,r=r|0,ux(e,Zn(n)|0,r,0),e|0}function zm(e,n,r){return e=e|0,n=n|0,r=r|0,V9(e,Zn(n)|0,r,0),e|0}function gf(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0,d=0;return o=h,h=h+16|0,s=o+8|0,l=o,d=t[r+4>>2]|0,t[l>>2]=t[r>>2],t[l+4>>2]=d,t[s>>2]=t[l>>2],t[s+4>>2]=t[l+4>>2],I9(e,n,s),h=o,e|0}function Md(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0,d=0;return o=h,h=h+16|0,s=o+8|0,l=o,d=t[r+4>>2]|0,t[l>>2]=t[r>>2],t[l+4>>2]=d,t[s>>2]=t[l>>2],t[s+4>>2]=t[l+4>>2],vo(e,n,s),h=o,e|0}function Xr(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0,d=0;return o=h,h=h+16|0,s=o+8|0,l=o,d=t[r+4>>2]|0,t[l>>2]=t[r>>2],t[l+4>>2]=d,t[s>>2]=t[l>>2],t[s+4>>2]=t[l+4>>2],a(e,n,s),h=o,e|0}function yi(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0,d=0;return o=h,h=h+16|0,s=o+8|0,l=o,d=t[r+4>>2]|0,t[l>>2]=t[r>>2],t[l+4>>2]=d,t[s>>2]=t[l>>2],t[s+4>>2]=t[l+4>>2],n4(e,n,s),h=o,e|0}function j0(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0,d=0;return o=h,h=h+16|0,s=o+8|0,l=o,d=t[r+4>>2]|0,t[l>>2]=t[r>>2],t[l+4>>2]=d,t[s>>2]=t[l>>2],t[s+4>>2]=t[l+4>>2],b_(e,n,s),h=o,e|0}function Zu(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0,d=0;return o=h,h=h+16|0,s=o+8|0,l=o,d=t[r+4>>2]|0,t[l>>2]=t[r>>2],t[l+4>>2]=d,t[s>>2]=t[l>>2],t[s+4>>2]=t[l+4>>2],L_(e,n,s),h=o,e|0}function _f(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0,d=0;return o=h,h=h+16|0,s=o+8|0,l=o,d=t[r+4>>2]|0,t[l>>2]=t[r>>2],t[l+4>>2]=d,t[s>>2]=t[l>>2],t[s+4>>2]=t[l+4>>2],Hp(e,n,s),h=o,e|0}function Io(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0,d=0;return o=h,h=h+16|0,s=o+8|0,l=o,d=t[r+4>>2]|0,t[l>>2]=t[r>>2],t[l+4>>2]=d,t[s>>2]=t[l>>2],t[s+4>>2]=t[l+4>>2],e_(e,n,s),h=o,e|0}function _u(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0,d=0;return o=h,h=h+16|0,s=o+8|0,l=o,d=t[r+4>>2]|0,t[l>>2]=t[r>>2],t[l+4>>2]=d,t[s>>2]=t[l>>2],t[s+4>>2]=t[l+4>>2],Ip(e,n,s),h=o,e|0}function ec(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0,d=0;return o=h,h=h+16|0,s=o+8|0,l=o,d=t[r+4>>2]|0,t[l>>2]=t[r>>2],t[l+4>>2]=d,t[s>>2]=t[l>>2],t[s+4>>2]=t[l+4>>2],Ng(e,n,s),h=o,e|0}function Wm(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0,d=0;return o=h,h=h+16|0,s=o+8|0,l=o,d=t[r+4>>2]|0,t[l>>2]=t[r>>2],t[l+4>>2]=d,t[s>>2]=t[l>>2],t[s+4>>2]=t[l+4>>2],l0(e,n,s),h=o,e|0}function Fd(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0,d=0;return o=h,h=h+16|0,s=o+8|0,l=o,d=t[r+4>>2]|0,t[l>>2]=t[r>>2],t[l+4>>2]=d,t[s>>2]=t[l>>2],t[s+4>>2]=t[l+4>>2],hg(e,n,s),h=o,e|0}function yf(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0,d=0;return o=h,h=h+16|0,s=o+8|0,l=o,d=t[r+4>>2]|0,t[l>>2]=t[r>>2],t[l+4>>2]=d,t[s>>2]=t[l>>2],t[s+4>>2]=t[l+4>>2],sg(e,n,s),h=o,e|0}function tc(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0,d=0;return o=h,h=h+16|0,s=o+8|0,l=o,d=t[r+4>>2]|0,t[l>>2]=t[r>>2],t[l+4>>2]=d,t[s>>2]=t[l>>2],t[s+4>>2]=t[l+4>>2],Kv(e,n,s),h=o,e|0}function Hm(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0,d=0;return o=h,h=h+16|0,s=o+8|0,l=o,d=t[r+4>>2]|0,t[l>>2]=t[r>>2],t[l+4>>2]=d,t[s>>2]=t[l>>2],t[s+4>>2]=t[l+4>>2],y1(e,n,s),h=o,e|0}function Ld(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0,d=0;return o=h,h=h+16|0,s=o+8|0,l=o,d=t[r+4>>2]|0,t[l>>2]=t[r>>2],t[l+4>>2]=d,t[s>>2]=t[l>>2],t[s+4>>2]=t[l+4>>2],wv(e,n,s),h=o,e|0}function Rd(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0,d=0;return o=h,h=h+16|0,s=o+8|0,l=o,d=t[r+4>>2]|0,t[l>>2]=t[r>>2],t[l+4>>2]=d,t[s>>2]=t[l>>2],t[s+4>>2]=t[l+4>>2],fv(e,n,s),h=o,e|0}function zc(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0,d=0;return o=h,h=h+16|0,s=o+8|0,l=o,d=t[r+4>>2]|0,t[l>>2]=t[r>>2],t[l+4>>2]=d,t[s>>2]=t[l>>2],t[s+4>>2]=t[l+4>>2],Gd(e,n,s),h=o,e|0}function Nd(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0,d=0;return o=h,h=h+16|0,s=o+8|0,l=o,d=t[r+4>>2]|0,t[l>>2]=t[r>>2],t[l+4>>2]=d,t[s>>2]=t[l>>2],t[s+4>>2]=t[l+4>>2],Wc(e,n,s),h=o,e|0}function Wc(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0,d=0,_=0;o=h,h=h+16|0,s=o+8|0,l=o,_=t[r>>2]|0,d=t[r+4>>2]|0,r=Zn(n)|0,t[l>>2]=_,t[l+4>>2]=d,t[s>>2]=t[l>>2],t[s+4>>2]=t[l+4>>2],Hc(e,r,s,1),h=o}function Zn(e){return e=e|0,e|0}function Hc(e,n,r,o){e=e|0,n=n|0,r=r|0,o=o|0;var s=0,l=0,d=0,_=0,y=0,k=0,T=0;s=h,h=h+32|0,l=s+16|0,T=s+8|0,_=s,k=t[r>>2]|0,y=t[r+4>>2]|0,d=t[e>>2]|0,e=Za()|0,t[T>>2]=k,t[T+4>>2]=y,t[l>>2]=t[T>>2],t[l+4>>2]=t[T+4>>2],r=Bd(l)|0,t[_>>2]=k,t[_+4>>2]=y,t[l>>2]=t[_>>2],t[l+4>>2]=t[_+4>>2],ur(d,n,e,r,bc(l,o)|0,o),h=s}function Za(){var e=0,n=0;if(c[7616]|0||(yu(9136),Bt(24,9136,Q|0)|0,n=7616,t[n>>2]=1,t[n+4>>2]=0),!(Dn(9136)|0)){e=9136,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));yu(9136)}return 9136}function Bd(e){return e=e|0,0}function bc(e,n){e=e|0,n=n|0;var r=0,o=0,s=0,l=0,d=0,_=0,y=0,k=0,T=0,P=0;return T=h,h=h+32|0,s=T+24|0,d=T+16|0,_=T,y=T+8|0,l=t[e>>2]|0,o=t[e+4>>2]|0,t[_>>2]=l,t[_+4>>2]=o,P=Za()|0,k=P+24|0,e=Lt(n,4)|0,t[y>>2]=e,n=P+28|0,r=t[n>>2]|0,r>>>0<(t[P+32>>2]|0)>>>0?(t[d>>2]=l,t[d+4>>2]=o,t[s>>2]=t[d>>2],t[s+4>>2]=t[d+4>>2],n1(r,s,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(jd(k,_,y),e=t[n>>2]|0),h=T,((e-(t[k>>2]|0)|0)/12|0)+-1|0}function ur(e,n,r,o,s,l){e=e|0,n=n|0,r=r|0,o=o|0,s=s|0,l=l|0;var d=0,_=0,y=0,k=0,T=0,P=0,q=0,we=0;d=h,h=h+32|0,q=d+24|0,P=d+20|0,y=d+16|0,T=d+12|0,k=d+8|0,_=d+4|0,we=d,t[P>>2]=n,t[y>>2]=r,t[T>>2]=o,t[k>>2]=s,t[_>>2]=l,l=e+28|0,t[we>>2]=t[l>>2],t[q>>2]=t[we>>2],e1(e+24|0,q,P,T,k,y,_)|0,t[l>>2]=t[t[l>>2]>>2],h=d}function e1(e,n,r,o,s,l,d){return e=e|0,n=n|0,r=r|0,o=o|0,s=s|0,l=l|0,d=d|0,e=bm(n)|0,n=Tt(24)|0,t1(n+4|0,t[r>>2]|0,t[o>>2]|0,t[s>>2]|0,t[l>>2]|0,t[d>>2]|0),t[n>>2]=t[e>>2],t[e>>2]=n,n|0}function bm(e){return e=e|0,t[e>>2]|0}function t1(e,n,r,o,s,l){e=e|0,n=n|0,r=r|0,o=o|0,s=s|0,l=l|0,t[e>>2]=n,t[e+4>>2]=r,t[e+8>>2]=o,t[e+12>>2]=s,t[e+16>>2]=l}function Lt(e,n){return e=e|0,n=n|0,n|e|0}function n1(e,n,r){e=e|0,n=n|0,r=r|0;var o=0;o=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=o,t[e+8>>2]=r}function jd(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0,d=0,_=0,y=0,k=0,T=0,P=0,q=0;if(k=h,h=h+48|0,o=k+32|0,d=k+24|0,_=k,y=e+4|0,s=(((t[y>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,l=Gm(e)|0,l>>>0>>0)$n(e);else{T=t[e>>2]|0,q=((t[e+8>>2]|0)-T|0)/12|0,P=q<<1,Ud(_,q>>>0>>1>>>0?P>>>0>>0?s:P:l,((t[y>>2]|0)-T|0)/12|0,e+8|0),y=_+8|0,l=t[y>>2]|0,s=t[n+4>>2]|0,r=t[r>>2]|0,t[d>>2]=t[n>>2],t[d+4>>2]=s,t[o>>2]=t[d>>2],t[o+4>>2]=t[d+4>>2],n1(l,o,r),t[y>>2]=(t[y>>2]|0)+12,Vm(e,_),Ym(_),h=k;return}}function Gm(e){return e=e|0,357913941}function Ud(e,n,r,o){e=e|0,n=n|0,r=r|0,o=o|0;var s=0;t[e+12>>2]=0,t[e+16>>2]=o;do if(n)if(n>>>0>357913941)_n();else{s=Tt(n*12|0)|0;break}else s=0;while(0);t[e>>2]=s,o=s+(r*12|0)|0,t[e+8>>2]=o,t[e+4>>2]=o,t[e+12>>2]=s+(n*12|0)}function Vm(e,n){e=e|0,n=n|0;var r=0,o=0,s=0,l=0,d=0;o=t[e>>2]|0,d=e+4|0,l=n+4|0,s=(t[d>>2]|0)-o|0,r=(t[l>>2]|0)+(((s|0)/-12|0)*12|0)|0,t[l>>2]=r,(s|0)>0?(vn(r|0,o|0,s|0)|0,o=l,r=t[l>>2]|0):o=l,l=t[e>>2]|0,t[e>>2]=r,t[o>>2]=l,l=n+8|0,s=t[d>>2]|0,t[d>>2]=t[l>>2],t[l>>2]=s,l=e+8|0,d=n+12|0,e=t[l>>2]|0,t[l>>2]=t[d>>2],t[d>>2]=e,t[n>>2]=t[o>>2]}function Ym(e){e=e|0;var n=0,r=0,o=0;n=t[e+4>>2]|0,r=e+8|0,o=t[r>>2]|0,(o|0)!=(n|0)&&(t[r>>2]=o+(~(((o+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&Ve(e)}function yu(e){e=e|0,Gc(e)}function r1(e){e=e|0,i1(e+24|0)}function Dn(e){return e=e|0,t[e>>2]|0}function i1(e){e=e|0;var n=0,r=0,o=0;r=t[e>>2]|0,o=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-o|0)>>>0)/12|0)*12|0)),Ve(r))}function Gc(e){e=e|0;var n=0;n=An()|0,Nn(e,2,3,n,cn()|0,0),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function An(){return 9228}function cn(){return 1140}function Vc(e,n){e=e|0,n=n|0;var r=0,o=0,s=0,l=0;return r=h,h=h+16|0,o=r+8|0,s=r,l=Il(e)|0,e=t[l+4>>2]|0,t[s>>2]=t[l>>2],t[s+4>>2]=e,t[o>>2]=t[s>>2],t[o+4>>2]=t[s+4>>2],n=$m(n,o)|0,h=r,n|0}function Nn(e,n,r,o,s,l){e=e|0,n=n|0,r=r|0,o=o|0,s=s|0,l=l|0,t[e>>2]=n,t[e+4>>2]=r,t[e+8>>2]=o,t[e+12>>2]=s,t[e+16>>2]=l}function Il(e){return e=e|0,(t[(Za()|0)+24>>2]|0)+(e*12|0)|0}function $m(e,n){e=e|0,n=n|0;var r=0,o=0,s=0;return s=h,h=h+48|0,o=s,r=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(r=t[(t[e>>2]|0)+r>>2]|0),Bl[r&31](o,e),o=o1(o)|0,h=s,o|0}function o1(e){e=e|0;var n=0,r=0,o=0,s=0;return s=h,h=h+32|0,n=s+12|0,r=s,o=U0(u1()|0)|0,o?(s1(n,o),l1(r,n),qd(e,r),e=f1(n)|0):e=zd(e)|0,h=s,e|0}function u1(){var e=0;return c[7632]|0||(nc(9184),Bt(25,9184,Q|0)|0,e=7632,t[e>>2]=1,t[e+4>>2]=0),9184}function U0(e){return e=e|0,t[e+36>>2]|0}function s1(e,n){e=e|0,n=n|0,t[e>>2]=n,t[e+4>>2]=e,t[e+8>>2]=0}function l1(e,n){e=e|0,n=n|0,t[e>>2]=t[n>>2],t[e+4>>2]=t[n+4>>2],t[e+8>>2]=0}function qd(e,n){e=e|0,n=n|0,Ii(n,e,e+8|0,e+16|0,e+24|0,e+32|0,e+40|0)|0}function f1(e){return e=e|0,t[(t[e+4>>2]|0)+8>>2]|0}function zd(e){e=e|0;var n=0,r=0,o=0,s=0,l=0,d=0,_=0,y=0;y=h,h=h+16|0,r=y+4|0,o=y,s=Qo(8)|0,l=s,d=Tt(48)|0,_=d,n=_+48|0;do t[_>>2]=t[e>>2],_=_+4|0,e=e+4|0;while((_|0)<(n|0));return n=l+4|0,t[n>>2]=d,_=Tt(8)|0,d=t[n>>2]|0,t[o>>2]=0,t[r>>2]=t[o>>2],Wd(_,d,r),t[s>>2]=_,h=y,l|0}function Wd(e,n,r){e=e|0,n=n|0,r=r|0,t[e>>2]=n,r=Tt(16)|0,t[r+4>>2]=0,t[r+8>>2]=0,t[r>>2]=1092,t[r+12>>2]=n,t[e+4>>2]=r}function Km(e){e=e|0,da(e),Ve(e)}function Xm(e){e=e|0,e=t[e+12>>2]|0,e|0&&Ve(e)}function es(e){e=e|0,Ve(e)}function Ii(e,n,r,o,s,l,d){return e=e|0,n=n|0,r=r|0,o=o|0,s=s|0,l=l|0,d=d|0,l=c1(t[e>>2]|0,n,r,o,s,l,d)|0,d=e+4|0,t[(t[d>>2]|0)+8>>2]=l,t[(t[d>>2]|0)+8>>2]|0}function c1(e,n,r,o,s,l,d){e=e|0,n=n|0,r=r|0,o=o|0,s=s|0,l=l|0,d=d|0;var _=0,y=0;return _=h,h=h+16|0,y=_,Zo(y),e=Oi(e)|0,d=Jm(e,+L[n>>3],+L[r>>3],+L[o>>3],+L[s>>3],+L[l>>3],+L[d>>3])|0,eu(y),h=_,d|0}function Jm(e,n,r,o,s,l,d){e=e|0,n=+n,r=+r,o=+o,s=+s,l=+l,d=+d;var _=0;return _=ko(a1()|0)|0,n=+Ko(n),r=+Ko(r),o=+Ko(o),s=+Ko(s),l=+Ko(l),xs(0,_|0,e|0,+n,+r,+o,+s,+l,+ +Ko(d))|0}function a1(){var e=0;return c[7624]|0||(Qm(9172),e=7624,t[e>>2]=1,t[e+4>>2]=0),9172}function Qm(e){e=e|0,Ao(e,Zm()|0,6)}function Zm(){return 1112}function nc(e){e=e|0,Ys(e)}function Hd(e){e=e|0,d1(e+24|0),bd(e+16|0)}function d1(e){e=e|0,tv(e)}function bd(e){e=e|0,ev(e)}function ev(e){e=e|0;var n=0,r=0;if(n=t[e>>2]|0,n|0)do r=n,n=t[n>>2]|0,Ve(r);while((n|0)!=0);t[e>>2]=0}function tv(e){e=e|0;var n=0,r=0;if(n=t[e>>2]|0,n|0)do r=n,n=t[n>>2]|0,Ve(r);while((n|0)!=0);t[e>>2]=0}function Ys(e){e=e|0;var n=0;t[e+16>>2]=0,t[e+20>>2]=0,n=e+24|0,t[n>>2]=0,t[e+28>>2]=n,t[e+36>>2]=0,c[e+40>>0]=0,c[e+41>>0]=0}function Gd(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0,d=0,_=0;o=h,h=h+16|0,s=o+8|0,l=o,_=t[r>>2]|0,d=t[r+4>>2]|0,r=Zn(n)|0,t[l>>2]=_,t[l+4>>2]=d,t[s>>2]=t[l>>2],t[s+4>>2]=t[l+4>>2],Vd(e,r,s,0),h=o}function Vd(e,n,r,o){e=e|0,n=n|0,r=r|0,o=o|0;var s=0,l=0,d=0,_=0,y=0,k=0,T=0;s=h,h=h+32|0,l=s+16|0,T=s+8|0,_=s,k=t[r>>2]|0,y=t[r+4>>2]|0,d=t[e>>2]|0,e=p1()|0,t[T>>2]=k,t[T+4>>2]=y,t[l>>2]=t[T>>2],t[l+4>>2]=t[T+4>>2],r=h1(l)|0,t[_>>2]=k,t[_+4>>2]=y,t[l>>2]=t[_>>2],t[l+4>>2]=t[_+4>>2],ur(d,n,e,r,Yd(l,o)|0,o),h=s}function p1(){var e=0,n=0;if(c[7640]|0||(Xo(9232),Bt(26,9232,Q|0)|0,n=7640,t[n>>2]=1,t[n+4>>2]=0),!(Dn(9232)|0)){e=9232,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));Xo(9232)}return 9232}function h1(e){return e=e|0,0}function Yd(e,n){e=e|0,n=n|0;var r=0,o=0,s=0,l=0,d=0,_=0,y=0,k=0,T=0,P=0;return T=h,h=h+32|0,s=T+24|0,d=T+16|0,_=T,y=T+8|0,l=t[e>>2]|0,o=t[e+4>>2]|0,t[_>>2]=l,t[_+4>>2]=o,P=p1()|0,k=P+24|0,e=Lt(n,4)|0,t[y>>2]=e,n=P+28|0,r=t[n>>2]|0,r>>>0<(t[P+32>>2]|0)>>>0?(t[d>>2]=l,t[d+4>>2]=o,t[s>>2]=t[d>>2],t[s+4>>2]=t[d+4>>2],wf(r,s,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(m1(k,_,y),e=t[n>>2]|0),h=T,((e-(t[k>>2]|0)|0)/12|0)+-1|0}function wf(e,n,r){e=e|0,n=n|0,r=r|0;var o=0;o=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=o,t[e+8>>2]=r}function m1(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0,d=0,_=0,y=0,k=0,T=0,P=0,q=0;if(k=h,h=h+48|0,o=k+32|0,d=k+24|0,_=k,y=e+4|0,s=(((t[y>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,l=$d(e)|0,l>>>0>>0)$n(e);else{T=t[e>>2]|0,q=((t[e+8>>2]|0)-T|0)/12|0,P=q<<1,Kd(_,q>>>0>>1>>>0?P>>>0>>0?s:P:l,((t[y>>2]|0)-T|0)/12|0,e+8|0),y=_+8|0,l=t[y>>2]|0,s=t[n+4>>2]|0,r=t[r>>2]|0,t[d>>2]=t[n>>2],t[d+4>>2]=s,t[o>>2]=t[d>>2],t[o+4>>2]=t[d+4>>2],wf(l,o,r),t[y>>2]=(t[y>>2]|0)+12,Yc(e,_),Xd(_),h=k;return}}function $d(e){return e=e|0,357913941}function Kd(e,n,r,o){e=e|0,n=n|0,r=r|0,o=o|0;var s=0;t[e+12>>2]=0,t[e+16>>2]=o;do if(n)if(n>>>0>357913941)_n();else{s=Tt(n*12|0)|0;break}else s=0;while(0);t[e>>2]=s,o=s+(r*12|0)|0,t[e+8>>2]=o,t[e+4>>2]=o,t[e+12>>2]=s+(n*12|0)}function Yc(e,n){e=e|0,n=n|0;var r=0,o=0,s=0,l=0,d=0;o=t[e>>2]|0,d=e+4|0,l=n+4|0,s=(t[d>>2]|0)-o|0,r=(t[l>>2]|0)+(((s|0)/-12|0)*12|0)|0,t[l>>2]=r,(s|0)>0?(vn(r|0,o|0,s|0)|0,o=l,r=t[l>>2]|0):o=l,l=t[e>>2]|0,t[e>>2]=r,t[o>>2]=l,l=n+8|0,s=t[d>>2]|0,t[d>>2]=t[l>>2],t[l>>2]=s,l=e+8|0,d=n+12|0,e=t[l>>2]|0,t[l>>2]=t[d>>2],t[d>>2]=e,t[n>>2]=t[o>>2]}function Xd(e){e=e|0;var n=0,r=0,o=0;n=t[e+4>>2]|0,r=e+8|0,o=t[r>>2]|0,(o|0)!=(n|0)&&(t[r>>2]=o+(~(((o+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&Ve(e)}function Xo(e){e=e|0,Jd(e)}function Pl(e){e=e|0,nv(e+24|0)}function nv(e){e=e|0;var n=0,r=0,o=0;r=t[e>>2]|0,o=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-o|0)>>>0)/12|0)*12|0)),Ve(r))}function Jd(e){e=e|0;var n=0;n=An()|0,Nn(e,2,1,n,rv()|0,3),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function rv(){return 1144}function iv(e,n,r,o,s){e=e|0,n=n|0,r=+r,o=+o,s=s|0;var l=0,d=0,_=0,y=0;l=h,h=h+16|0,d=l+8|0,_=l,y=ov(e)|0,e=t[y+4>>2]|0,t[_>>2]=t[y>>2],t[_+4>>2]=e,t[d>>2]=t[_>>2],t[d+4>>2]=t[_+4>>2],uv(n,d,r,o,s),h=l}function ov(e){return e=e|0,(t[(p1()|0)+24>>2]|0)+(e*12|0)|0}function uv(e,n,r,o,s){e=e|0,n=n|0,r=+r,o=+o,s=s|0;var l=0,d=0,_=0,y=0,k=0;k=h,h=h+16|0,d=k+2|0,_=k+1|0,y=k,l=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(l=t[(t[e>>2]|0)+l>>2]|0),wu(d,r),r=+Du(d,r),wu(_,o),o=+Du(_,o),ts(y,s),y=ns(y,s)|0,iD[l&1](e,r,o,y),h=k}function wu(e,n){e=e|0,n=+n}function Du(e,n){return e=e|0,n=+n,+ +lv(n)}function ts(e,n){e=e|0,n=n|0}function ns(e,n){return e=e|0,n=n|0,sv(n)|0}function sv(e){return e=e|0,e|0}function lv(e){return e=+e,+e}function fv(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0,d=0,_=0;o=h,h=h+16|0,s=o+8|0,l=o,_=t[r>>2]|0,d=t[r+4>>2]|0,r=Zn(n)|0,t[l>>2]=_,t[l+4>>2]=d,t[s>>2]=t[l>>2],t[s+4>>2]=t[l+4>>2],Qd(e,r,s,1),h=o}function Qd(e,n,r,o){e=e|0,n=n|0,r=r|0,o=o|0;var s=0,l=0,d=0,_=0,y=0,k=0,T=0;s=h,h=h+32|0,l=s+16|0,T=s+8|0,_=s,k=t[r>>2]|0,y=t[r+4>>2]|0,d=t[e>>2]|0,e=$c()|0,t[T>>2]=k,t[T+4>>2]=y,t[l>>2]=t[T>>2],t[l+4>>2]=t[T+4>>2],r=Zd(l)|0,t[_>>2]=k,t[_+4>>2]=y,t[l>>2]=t[_>>2],t[l+4>>2]=t[_+4>>2],ur(d,n,e,r,cv(l,o)|0,o),h=s}function $c(){var e=0,n=0;if(c[7648]|0||(np(9268),Bt(27,9268,Q|0)|0,n=7648,t[n>>2]=1,t[n+4>>2]=0),!(Dn(9268)|0)){e=9268,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));np(9268)}return 9268}function Zd(e){return e=e|0,0}function cv(e,n){e=e|0,n=n|0;var r=0,o=0,s=0,l=0,d=0,_=0,y=0,k=0,T=0,P=0;return T=h,h=h+32|0,s=T+24|0,d=T+16|0,_=T,y=T+8|0,l=t[e>>2]|0,o=t[e+4>>2]|0,t[_>>2]=l,t[_+4>>2]=o,P=$c()|0,k=P+24|0,e=Lt(n,4)|0,t[y>>2]=e,n=P+28|0,r=t[n>>2]|0,r>>>0<(t[P+32>>2]|0)>>>0?(t[d>>2]=l,t[d+4>>2]=o,t[s>>2]=t[d>>2],t[s+4>>2]=t[d+4>>2],ep(r,s,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(av(k,_,y),e=t[n>>2]|0),h=T,((e-(t[k>>2]|0)|0)/12|0)+-1|0}function ep(e,n,r){e=e|0,n=n|0,r=r|0;var o=0;o=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=o,t[e+8>>2]=r}function av(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0,d=0,_=0,y=0,k=0,T=0,P=0,q=0;if(k=h,h=h+48|0,o=k+32|0,d=k+24|0,_=k,y=e+4|0,s=(((t[y>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,l=tp(e)|0,l>>>0>>0)$n(e);else{T=t[e>>2]|0,q=((t[e+8>>2]|0)-T|0)/12|0,P=q<<1,dv(_,q>>>0>>1>>>0?P>>>0>>0?s:P:l,((t[y>>2]|0)-T|0)/12|0,e+8|0),y=_+8|0,l=t[y>>2]|0,s=t[n+4>>2]|0,r=t[r>>2]|0,t[d>>2]=t[n>>2],t[d+4>>2]=s,t[o>>2]=t[d>>2],t[o+4>>2]=t[d+4>>2],ep(l,o,r),t[y>>2]=(t[y>>2]|0)+12,pv(e,_),hv(_),h=k;return}}function tp(e){return e=e|0,357913941}function dv(e,n,r,o){e=e|0,n=n|0,r=r|0,o=o|0;var s=0;t[e+12>>2]=0,t[e+16>>2]=o;do if(n)if(n>>>0>357913941)_n();else{s=Tt(n*12|0)|0;break}else s=0;while(0);t[e>>2]=s,o=s+(r*12|0)|0,t[e+8>>2]=o,t[e+4>>2]=o,t[e+12>>2]=s+(n*12|0)}function pv(e,n){e=e|0,n=n|0;var r=0,o=0,s=0,l=0,d=0;o=t[e>>2]|0,d=e+4|0,l=n+4|0,s=(t[d>>2]|0)-o|0,r=(t[l>>2]|0)+(((s|0)/-12|0)*12|0)|0,t[l>>2]=r,(s|0)>0?(vn(r|0,o|0,s|0)|0,o=l,r=t[l>>2]|0):o=l,l=t[e>>2]|0,t[e>>2]=r,t[o>>2]=l,l=n+8|0,s=t[d>>2]|0,t[d>>2]=t[l>>2],t[l>>2]=s,l=e+8|0,d=n+12|0,e=t[l>>2]|0,t[l>>2]=t[d>>2],t[d>>2]=e,t[n>>2]=t[o>>2]}function hv(e){e=e|0;var n=0,r=0,o=0;n=t[e+4>>2]|0,r=e+8|0,o=t[r>>2]|0,(o|0)!=(n|0)&&(t[r>>2]=o+(~(((o+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&Ve(e)}function np(e){e=e|0,Po(e)}function mv(e){e=e|0,vv(e+24|0)}function vv(e){e=e|0;var n=0,r=0,o=0;r=t[e>>2]|0,o=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-o|0)>>>0)/12|0)*12|0)),Ve(r))}function Po(e){e=e|0;var n=0;n=An()|0,Nn(e,2,4,n,gv()|0,0),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function gv(){return 1160}function _v(e,n){e=e|0,n=n|0;var r=0,o=0,s=0,l=0;return r=h,h=h+16|0,o=r+8|0,s=r,l=yv(e)|0,e=t[l+4>>2]|0,t[s>>2]=t[l>>2],t[s+4>>2]=e,t[o>>2]=t[s>>2],t[o+4>>2]=t[s+4>>2],n=rp(n,o)|0,h=r,n|0}function yv(e){return e=e|0,(t[($c()|0)+24>>2]|0)+(e*12|0)|0}function rp(e,n){e=e|0,n=n|0;var r=0;return r=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(r=t[(t[e>>2]|0)+r>>2]|0),ip(dc[r&31](e)|0)|0}function ip(e){return e=e|0,e&1|0}function wv(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0,d=0,_=0;o=h,h=h+16|0,s=o+8|0,l=o,_=t[r>>2]|0,d=t[r+4>>2]|0,r=Zn(n)|0,t[l>>2]=_,t[l+4>>2]=d,t[s>>2]=t[l>>2],t[s+4>>2]=t[l+4>>2],Dv(e,r,s,0),h=o}function Dv(e,n,r,o){e=e|0,n=n|0,r=r|0,o=o|0;var s=0,l=0,d=0,_=0,y=0,k=0,T=0;s=h,h=h+32|0,l=s+16|0,T=s+8|0,_=s,k=t[r>>2]|0,y=t[r+4>>2]|0,d=t[e>>2]|0,e=v1()|0,t[T>>2]=k,t[T+4>>2]=y,t[l>>2]=t[T>>2],t[l+4>>2]=t[T+4>>2],r=g1(l)|0,t[_>>2]=k,t[_+4>>2]=y,t[l>>2]=t[_>>2],t[l+4>>2]=t[_+4>>2],ur(d,n,e,r,Ev(l,o)|0,o),h=s}function v1(){var e=0,n=0;if(c[7656]|0||(up(9304),Bt(28,9304,Q|0)|0,n=7656,t[n>>2]=1,t[n+4>>2]=0),!(Dn(9304)|0)){e=9304,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));up(9304)}return 9304}function g1(e){return e=e|0,0}function Ev(e,n){e=e|0,n=n|0;var r=0,o=0,s=0,l=0,d=0,_=0,y=0,k=0,T=0,P=0;return T=h,h=h+32|0,s=T+24|0,d=T+16|0,_=T,y=T+8|0,l=t[e>>2]|0,o=t[e+4>>2]|0,t[_>>2]=l,t[_+4>>2]=o,P=v1()|0,k=P+24|0,e=Lt(n,4)|0,t[y>>2]=e,n=P+28|0,r=t[n>>2]|0,r>>>0<(t[P+32>>2]|0)>>>0?(t[d>>2]=l,t[d+4>>2]=o,t[s>>2]=t[d>>2],t[s+4>>2]=t[d+4>>2],op(r,s,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(Sv(k,_,y),e=t[n>>2]|0),h=T,((e-(t[k>>2]|0)|0)/12|0)+-1|0}function op(e,n,r){e=e|0,n=n|0,r=r|0;var o=0;o=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=o,t[e+8>>2]=r}function Sv(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0,d=0,_=0,y=0,k=0,T=0,P=0,q=0;if(k=h,h=h+48|0,o=k+32|0,d=k+24|0,_=k,y=e+4|0,s=(((t[y>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,l=Cv(e)|0,l>>>0>>0)$n(e);else{T=t[e>>2]|0,q=((t[e+8>>2]|0)-T|0)/12|0,P=q<<1,Tv(_,q>>>0>>1>>>0?P>>>0>>0?s:P:l,((t[y>>2]|0)-T|0)/12|0,e+8|0),y=_+8|0,l=t[y>>2]|0,s=t[n+4>>2]|0,r=t[r>>2]|0,t[d>>2]=t[n>>2],t[d+4>>2]=s,t[o>>2]=t[d>>2],t[o+4>>2]=t[d+4>>2],op(l,o,r),t[y>>2]=(t[y>>2]|0)+12,xv(e,_),kv(_),h=k;return}}function Cv(e){return e=e|0,357913941}function Tv(e,n,r,o){e=e|0,n=n|0,r=r|0,o=o|0;var s=0;t[e+12>>2]=0,t[e+16>>2]=o;do if(n)if(n>>>0>357913941)_n();else{s=Tt(n*12|0)|0;break}else s=0;while(0);t[e>>2]=s,o=s+(r*12|0)|0,t[e+8>>2]=o,t[e+4>>2]=o,t[e+12>>2]=s+(n*12|0)}function xv(e,n){e=e|0,n=n|0;var r=0,o=0,s=0,l=0,d=0;o=t[e>>2]|0,d=e+4|0,l=n+4|0,s=(t[d>>2]|0)-o|0,r=(t[l>>2]|0)+(((s|0)/-12|0)*12|0)|0,t[l>>2]=r,(s|0)>0?(vn(r|0,o|0,s|0)|0,o=l,r=t[l>>2]|0):o=l,l=t[e>>2]|0,t[e>>2]=r,t[o>>2]=l,l=n+8|0,s=t[d>>2]|0,t[d>>2]=t[l>>2],t[l>>2]=s,l=e+8|0,d=n+12|0,e=t[l>>2]|0,t[l>>2]=t[d>>2],t[d>>2]=e,t[n>>2]=t[o>>2]}function kv(e){e=e|0;var n=0,r=0,o=0;n=t[e+4>>2]|0,r=e+8|0,o=t[r>>2]|0,(o|0)!=(n|0)&&(t[r>>2]=o+(~(((o+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&Ve(e)}function up(e){e=e|0,Iv(e)}function Av(e){e=e|0,Ov(e+24|0)}function Ov(e){e=e|0;var n=0,r=0,o=0;r=t[e>>2]|0,o=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-o|0)>>>0)/12|0)*12|0)),Ve(r))}function Iv(e){e=e|0;var n=0;n=An()|0,Nn(e,2,5,n,Pv()|0,1),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function Pv(){return 1164}function Mv(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0,d=0;o=h,h=h+16|0,s=o+8|0,l=o,d=Fv(e)|0,e=t[d+4>>2]|0,t[l>>2]=t[d>>2],t[l+4>>2]=e,t[s>>2]=t[l>>2],t[s+4>>2]=t[l+4>>2],Lv(n,s,r),h=o}function Fv(e){return e=e|0,(t[(v1()|0)+24>>2]|0)+(e*12|0)|0}function Lv(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0;l=h,h=h+16|0,s=l,o=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(o=t[(t[e>>2]|0)+o>>2]|0),$s(s,r),r=Ks(s,r)|0,Bl[o&31](e,r),Xs(s),h=l}function $s(e,n){e=e|0,n=n|0,Rv(e,n)}function Ks(e,n){return e=e|0,n=n|0,e|0}function Xs(e){e=e|0,Ju(e)}function Rv(e,n){e=e|0,n=n|0,_1(e,n)}function _1(e,n){e=e|0,n=n|0,t[e>>2]=n}function y1(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0,d=0,_=0;o=h,h=h+16|0,s=o+8|0,l=o,_=t[r>>2]|0,d=t[r+4>>2]|0,r=Zn(n)|0,t[l>>2]=_,t[l+4>>2]=d,t[s>>2]=t[l>>2],t[s+4>>2]=t[l+4>>2],sp(e,r,s,0),h=o}function sp(e,n,r,o){e=e|0,n=n|0,r=r|0,o=o|0;var s=0,l=0,d=0,_=0,y=0,k=0,T=0;s=h,h=h+32|0,l=s+16|0,T=s+8|0,_=s,k=t[r>>2]|0,y=t[r+4>>2]|0,d=t[e>>2]|0,e=w1()|0,t[T>>2]=k,t[T+4>>2]=y,t[l>>2]=t[T>>2],t[l+4>>2]=t[T+4>>2],r=Nv(l)|0,t[_>>2]=k,t[_+4>>2]=y,t[l>>2]=t[_>>2],t[l+4>>2]=t[_+4>>2],ur(d,n,e,r,Bv(l,o)|0,o),h=s}function w1(){var e=0,n=0;if(c[7664]|0||(cp(9340),Bt(29,9340,Q|0)|0,n=7664,t[n>>2]=1,t[n+4>>2]=0),!(Dn(9340)|0)){e=9340,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));cp(9340)}return 9340}function Nv(e){return e=e|0,0}function Bv(e,n){e=e|0,n=n|0;var r=0,o=0,s=0,l=0,d=0,_=0,y=0,k=0,T=0,P=0;return T=h,h=h+32|0,s=T+24|0,d=T+16|0,_=T,y=T+8|0,l=t[e>>2]|0,o=t[e+4>>2]|0,t[_>>2]=l,t[_+4>>2]=o,P=w1()|0,k=P+24|0,e=Lt(n,4)|0,t[y>>2]=e,n=P+28|0,r=t[n>>2]|0,r>>>0<(t[P+32>>2]|0)>>>0?(t[d>>2]=l,t[d+4>>2]=o,t[s>>2]=t[d>>2],t[s+4>>2]=t[d+4>>2],lp(r,s,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(jv(k,_,y),e=t[n>>2]|0),h=T,((e-(t[k>>2]|0)|0)/12|0)+-1|0}function lp(e,n,r){e=e|0,n=n|0,r=r|0;var o=0;o=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=o,t[e+8>>2]=r}function jv(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0,d=0,_=0,y=0,k=0,T=0,P=0,q=0;if(k=h,h=h+48|0,o=k+32|0,d=k+24|0,_=k,y=e+4|0,s=(((t[y>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,l=Uv(e)|0,l>>>0>>0)$n(e);else{T=t[e>>2]|0,q=((t[e+8>>2]|0)-T|0)/12|0,P=q<<1,qv(_,q>>>0>>1>>>0?P>>>0>>0?s:P:l,((t[y>>2]|0)-T|0)/12|0,e+8|0),y=_+8|0,l=t[y>>2]|0,s=t[n+4>>2]|0,r=t[r>>2]|0,t[d>>2]=t[n>>2],t[d+4>>2]=s,t[o>>2]=t[d>>2],t[o+4>>2]=t[d+4>>2],lp(l,o,r),t[y>>2]=(t[y>>2]|0)+12,zv(e,_),fp(_),h=k;return}}function Uv(e){return e=e|0,357913941}function qv(e,n,r,o){e=e|0,n=n|0,r=r|0,o=o|0;var s=0;t[e+12>>2]=0,t[e+16>>2]=o;do if(n)if(n>>>0>357913941)_n();else{s=Tt(n*12|0)|0;break}else s=0;while(0);t[e>>2]=s,o=s+(r*12|0)|0,t[e+8>>2]=o,t[e+4>>2]=o,t[e+12>>2]=s+(n*12|0)}function zv(e,n){e=e|0,n=n|0;var r=0,o=0,s=0,l=0,d=0;o=t[e>>2]|0,d=e+4|0,l=n+4|0,s=(t[d>>2]|0)-o|0,r=(t[l>>2]|0)+(((s|0)/-12|0)*12|0)|0,t[l>>2]=r,(s|0)>0?(vn(r|0,o|0,s|0)|0,o=l,r=t[l>>2]|0):o=l,l=t[e>>2]|0,t[e>>2]=r,t[o>>2]=l,l=n+8|0,s=t[d>>2]|0,t[d>>2]=t[l>>2],t[l>>2]=s,l=e+8|0,d=n+12|0,e=t[l>>2]|0,t[l>>2]=t[d>>2],t[d>>2]=e,t[n>>2]=t[o>>2]}function fp(e){e=e|0;var n=0,r=0,o=0;n=t[e+4>>2]|0,r=e+8|0,o=t[r>>2]|0,(o|0)!=(n|0)&&(t[r>>2]=o+(~(((o+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&Ve(e)}function cp(e){e=e|0,Hv(e)}function Kc(e){e=e|0,Wv(e+24|0)}function Wv(e){e=e|0;var n=0,r=0,o=0;r=t[e>>2]|0,o=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-o|0)>>>0)/12|0)*12|0)),Ve(r))}function Hv(e){e=e|0;var n=0;n=An()|0,Nn(e,2,4,n,bv()|0,1),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function bv(){return 1180}function Gv(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0,d=0;return o=h,h=h+16|0,s=o+8|0,l=o,d=Vv(e)|0,e=t[d+4>>2]|0,t[l>>2]=t[d>>2],t[l+4>>2]=e,t[s>>2]=t[l>>2],t[s+4>>2]=t[l+4>>2],r=Yv(n,s,r)|0,h=o,r|0}function Vv(e){return e=e|0,(t[(w1()|0)+24>>2]|0)+(e*12|0)|0}function Yv(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0;return l=h,h=h+16|0,s=l,o=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(o=t[(t[e>>2]|0)+o>>2]|0),Ml(s,r),s=Fl(s,r)|0,s=Xc(J4[o&15](e,s)|0)|0,h=l,s|0}function Ml(e,n){e=e|0,n=n|0}function Fl(e,n){return e=e|0,n=n|0,$v(n)|0}function Xc(e){return e=e|0,e|0}function $v(e){return e=e|0,e|0}function Kv(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0,d=0,_=0;o=h,h=h+16|0,s=o+8|0,l=o,_=t[r>>2]|0,d=t[r+4>>2]|0,r=Zn(n)|0,t[l>>2]=_,t[l+4>>2]=d,t[s>>2]=t[l>>2],t[s+4>>2]=t[l+4>>2],Xv(e,r,s,0),h=o}function Xv(e,n,r,o){e=e|0,n=n|0,r=r|0,o=o|0;var s=0,l=0,d=0,_=0,y=0,k=0,T=0;s=h,h=h+32|0,l=s+16|0,T=s+8|0,_=s,k=t[r>>2]|0,y=t[r+4>>2]|0,d=t[e>>2]|0,e=D1()|0,t[T>>2]=k,t[T+4>>2]=y,t[l>>2]=t[T>>2],t[l+4>>2]=t[T+4>>2],r=Jv(l)|0,t[_>>2]=k,t[_+4>>2]=y,t[l>>2]=t[_>>2],t[l+4>>2]=t[_+4>>2],ur(d,n,e,r,Qv(l,o)|0,o),h=s}function D1(){var e=0,n=0;if(c[7672]|0||(hp(9376),Bt(30,9376,Q|0)|0,n=7672,t[n>>2]=1,t[n+4>>2]=0),!(Dn(9376)|0)){e=9376,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));hp(9376)}return 9376}function Jv(e){return e=e|0,0}function Qv(e,n){e=e|0,n=n|0;var r=0,o=0,s=0,l=0,d=0,_=0,y=0,k=0,T=0,P=0;return T=h,h=h+32|0,s=T+24|0,d=T+16|0,_=T,y=T+8|0,l=t[e>>2]|0,o=t[e+4>>2]|0,t[_>>2]=l,t[_+4>>2]=o,P=D1()|0,k=P+24|0,e=Lt(n,4)|0,t[y>>2]=e,n=P+28|0,r=t[n>>2]|0,r>>>0<(t[P+32>>2]|0)>>>0?(t[d>>2]=l,t[d+4>>2]=o,t[s>>2]=t[d>>2],t[s+4>>2]=t[d+4>>2],ap(r,s,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(dp(k,_,y),e=t[n>>2]|0),h=T,((e-(t[k>>2]|0)|0)/12|0)+-1|0}function ap(e,n,r){e=e|0,n=n|0,r=r|0;var o=0;o=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=o,t[e+8>>2]=r}function dp(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0,d=0,_=0,y=0,k=0,T=0,P=0,q=0;if(k=h,h=h+48|0,o=k+32|0,d=k+24|0,_=k,y=e+4|0,s=(((t[y>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,l=pp(e)|0,l>>>0>>0)$n(e);else{T=t[e>>2]|0,q=((t[e+8>>2]|0)-T|0)/12|0,P=q<<1,Zv(_,q>>>0>>1>>>0?P>>>0>>0?s:P:l,((t[y>>2]|0)-T|0)/12|0,e+8|0),y=_+8|0,l=t[y>>2]|0,s=t[n+4>>2]|0,r=t[r>>2]|0,t[d>>2]=t[n>>2],t[d+4>>2]=s,t[o>>2]=t[d>>2],t[o+4>>2]=t[d+4>>2],ap(l,o,r),t[y>>2]=(t[y>>2]|0)+12,eg(e,_),tg(_),h=k;return}}function pp(e){return e=e|0,357913941}function Zv(e,n,r,o){e=e|0,n=n|0,r=r|0,o=o|0;var s=0;t[e+12>>2]=0,t[e+16>>2]=o;do if(n)if(n>>>0>357913941)_n();else{s=Tt(n*12|0)|0;break}else s=0;while(0);t[e>>2]=s,o=s+(r*12|0)|0,t[e+8>>2]=o,t[e+4>>2]=o,t[e+12>>2]=s+(n*12|0)}function eg(e,n){e=e|0,n=n|0;var r=0,o=0,s=0,l=0,d=0;o=t[e>>2]|0,d=e+4|0,l=n+4|0,s=(t[d>>2]|0)-o|0,r=(t[l>>2]|0)+(((s|0)/-12|0)*12|0)|0,t[l>>2]=r,(s|0)>0?(vn(r|0,o|0,s|0)|0,o=l,r=t[l>>2]|0):o=l,l=t[e>>2]|0,t[e>>2]=r,t[o>>2]=l,l=n+8|0,s=t[d>>2]|0,t[d>>2]=t[l>>2],t[l>>2]=s,l=e+8|0,d=n+12|0,e=t[l>>2]|0,t[l>>2]=t[d>>2],t[d>>2]=e,t[n>>2]=t[o>>2]}function tg(e){e=e|0;var n=0,r=0,o=0;n=t[e+4>>2]|0,r=e+8|0,o=t[r>>2]|0,(o|0)!=(n|0)&&(t[r>>2]=o+(~(((o+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&Ve(e)}function hp(e){e=e|0,rg(e)}function Jc(e){e=e|0,ng(e+24|0)}function ng(e){e=e|0;var n=0,r=0,o=0;r=t[e>>2]|0,o=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-o|0)>>>0)/12|0)*12|0)),Ve(r))}function rg(e){e=e|0;var n=0;n=An()|0,Nn(e,2,5,n,mp()|0,0),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function mp(){return 1196}function ig(e,n){e=e|0,n=n|0;var r=0,o=0,s=0,l=0;return r=h,h=h+16|0,o=r+8|0,s=r,l=og(e)|0,e=t[l+4>>2]|0,t[s>>2]=t[l>>2],t[s+4>>2]=e,t[o>>2]=t[s>>2],t[o+4>>2]=t[s+4>>2],n=ug(n,o)|0,h=r,n|0}function og(e){return e=e|0,(t[(D1()|0)+24>>2]|0)+(e*12|0)|0}function ug(e,n){e=e|0,n=n|0;var r=0;return r=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(r=t[(t[e>>2]|0)+r>>2]|0),Xc(dc[r&31](e)|0)|0}function sg(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0,d=0,_=0;o=h,h=h+16|0,s=o+8|0,l=o,_=t[r>>2]|0,d=t[r+4>>2]|0,r=Zn(n)|0,t[l>>2]=_,t[l+4>>2]=d,t[s>>2]=t[l>>2],t[s+4>>2]=t[l+4>>2],lg(e,r,s,1),h=o}function lg(e,n,r,o){e=e|0,n=n|0,r=r|0,o=o|0;var s=0,l=0,d=0,_=0,y=0,k=0,T=0;s=h,h=h+32|0,l=s+16|0,T=s+8|0,_=s,k=t[r>>2]|0,y=t[r+4>>2]|0,d=t[e>>2]|0,e=E1()|0,t[T>>2]=k,t[T+4>>2]=y,t[l>>2]=t[T>>2],t[l+4>>2]=t[T+4>>2],r=fg(l)|0,t[_>>2]=k,t[_+4>>2]=y,t[l>>2]=t[_>>2],t[l+4>>2]=t[_+4>>2],ur(d,n,e,r,cg(l,o)|0,o),h=s}function E1(){var e=0,n=0;if(c[7680]|0||(C1(9412),Bt(31,9412,Q|0)|0,n=7680,t[n>>2]=1,t[n+4>>2]=0),!(Dn(9412)|0)){e=9412,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));C1(9412)}return 9412}function fg(e){return e=e|0,0}function cg(e,n){e=e|0,n=n|0;var r=0,o=0,s=0,l=0,d=0,_=0,y=0,k=0,T=0,P=0;return T=h,h=h+32|0,s=T+24|0,d=T+16|0,_=T,y=T+8|0,l=t[e>>2]|0,o=t[e+4>>2]|0,t[_>>2]=l,t[_+4>>2]=o,P=E1()|0,k=P+24|0,e=Lt(n,4)|0,t[y>>2]=e,n=P+28|0,r=t[n>>2]|0,r>>>0<(t[P+32>>2]|0)>>>0?(t[d>>2]=l,t[d+4>>2]=o,t[s>>2]=t[d>>2],t[s+4>>2]=t[d+4>>2],rc(r,s,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(ag(k,_,y),e=t[n>>2]|0),h=T,((e-(t[k>>2]|0)|0)/12|0)+-1|0}function rc(e,n,r){e=e|0,n=n|0,r=r|0;var o=0;o=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=o,t[e+8>>2]=r}function ag(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0,d=0,_=0,y=0,k=0,T=0,P=0,q=0;if(k=h,h=h+48|0,o=k+32|0,d=k+24|0,_=k,y=e+4|0,s=(((t[y>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,l=vp(e)|0,l>>>0>>0)$n(e);else{T=t[e>>2]|0,q=((t[e+8>>2]|0)-T|0)/12|0,P=q<<1,gp(_,q>>>0>>1>>>0?P>>>0>>0?s:P:l,((t[y>>2]|0)-T|0)/12|0,e+8|0),y=_+8|0,l=t[y>>2]|0,s=t[n+4>>2]|0,r=t[r>>2]|0,t[d>>2]=t[n>>2],t[d+4>>2]=s,t[o>>2]=t[d>>2],t[o+4>>2]=t[d+4>>2],rc(l,o,r),t[y>>2]=(t[y>>2]|0)+12,S1(e,_),_p(_),h=k;return}}function vp(e){return e=e|0,357913941}function gp(e,n,r,o){e=e|0,n=n|0,r=r|0,o=o|0;var s=0;t[e+12>>2]=0,t[e+16>>2]=o;do if(n)if(n>>>0>357913941)_n();else{s=Tt(n*12|0)|0;break}else s=0;while(0);t[e>>2]=s,o=s+(r*12|0)|0,t[e+8>>2]=o,t[e+4>>2]=o,t[e+12>>2]=s+(n*12|0)}function S1(e,n){e=e|0,n=n|0;var r=0,o=0,s=0,l=0,d=0;o=t[e>>2]|0,d=e+4|0,l=n+4|0,s=(t[d>>2]|0)-o|0,r=(t[l>>2]|0)+(((s|0)/-12|0)*12|0)|0,t[l>>2]=r,(s|0)>0?(vn(r|0,o|0,s|0)|0,o=l,r=t[l>>2]|0):o=l,l=t[e>>2]|0,t[e>>2]=r,t[o>>2]=l,l=n+8|0,s=t[d>>2]|0,t[d>>2]=t[l>>2],t[l>>2]=s,l=e+8|0,d=n+12|0,e=t[l>>2]|0,t[l>>2]=t[d>>2],t[d>>2]=e,t[n>>2]=t[o>>2]}function _p(e){e=e|0;var n=0,r=0,o=0;n=t[e+4>>2]|0,r=e+8|0,o=t[r>>2]|0,(o|0)!=(n|0)&&(t[r>>2]=o+(~(((o+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&Ve(e)}function C1(e){e=e|0,dg(e)}function yp(e){e=e|0,wp(e+24|0)}function wp(e){e=e|0;var n=0,r=0,o=0;r=t[e>>2]|0,o=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-o|0)>>>0)/12|0)*12|0)),Ve(r))}function dg(e){e=e|0;var n=0;n=An()|0,Nn(e,2,6,n,Dp()|0,0),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function Dp(){return 1200}function pg(e,n){e=e|0,n=n|0;var r=0,o=0,s=0,l=0;return r=h,h=h+16|0,o=r+8|0,s=r,l=Qc(e)|0,e=t[l+4>>2]|0,t[s>>2]=t[l>>2],t[s+4>>2]=e,t[o>>2]=t[s>>2],t[o+4>>2]=t[s+4>>2],n=Zc(n,o)|0,h=r,n|0}function Qc(e){return e=e|0,(t[(E1()|0)+24>>2]|0)+(e*12|0)|0}function Zc(e,n){e=e|0,n=n|0;var r=0;return r=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(r=t[(t[e>>2]|0)+r>>2]|0),ea(dc[r&31](e)|0)|0}function ea(e){return e=e|0,e|0}function hg(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0,d=0,_=0;o=h,h=h+16|0,s=o+8|0,l=o,_=t[r>>2]|0,d=t[r+4>>2]|0,r=Zn(n)|0,t[l>>2]=_,t[l+4>>2]=d,t[s>>2]=t[l>>2],t[s+4>>2]=t[l+4>>2],T1(e,r,s,0),h=o}function T1(e,n,r,o){e=e|0,n=n|0,r=r|0,o=o|0;var s=0,l=0,d=0,_=0,y=0,k=0,T=0;s=h,h=h+32|0,l=s+16|0,T=s+8|0,_=s,k=t[r>>2]|0,y=t[r+4>>2]|0,d=t[e>>2]|0,e=ta()|0,t[T>>2]=k,t[T+4>>2]=y,t[l>>2]=t[T>>2],t[l+4>>2]=t[T+4>>2],r=mg(l)|0,t[_>>2]=k,t[_+4>>2]=y,t[l>>2]=t[_>>2],t[l+4>>2]=t[_+4>>2],ur(d,n,e,r,vg(l,o)|0,o),h=s}function ta(){var e=0,n=0;if(c[7688]|0||(Sp(9448),Bt(32,9448,Q|0)|0,n=7688,t[n>>2]=1,t[n+4>>2]=0),!(Dn(9448)|0)){e=9448,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));Sp(9448)}return 9448}function mg(e){return e=e|0,0}function vg(e,n){e=e|0,n=n|0;var r=0,o=0,s=0,l=0,d=0,_=0,y=0,k=0,T=0,P=0;return T=h,h=h+32|0,s=T+24|0,d=T+16|0,_=T,y=T+8|0,l=t[e>>2]|0,o=t[e+4>>2]|0,t[_>>2]=l,t[_+4>>2]=o,P=ta()|0,k=P+24|0,e=Lt(n,4)|0,t[y>>2]=e,n=P+28|0,r=t[n>>2]|0,r>>>0<(t[P+32>>2]|0)>>>0?(t[d>>2]=l,t[d+4>>2]=o,t[s>>2]=t[d>>2],t[s+4>>2]=t[d+4>>2],Ep(r,s,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(gg(k,_,y),e=t[n>>2]|0),h=T,((e-(t[k>>2]|0)|0)/12|0)+-1|0}function Ep(e,n,r){e=e|0,n=n|0,r=r|0;var o=0;o=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=o,t[e+8>>2]=r}function gg(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0,d=0,_=0,y=0,k=0,T=0,P=0,q=0;if(k=h,h=h+48|0,o=k+32|0,d=k+24|0,_=k,y=e+4|0,s=(((t[y>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,l=_g(e)|0,l>>>0>>0)$n(e);else{T=t[e>>2]|0,q=((t[e+8>>2]|0)-T|0)/12|0,P=q<<1,yg(_,q>>>0>>1>>>0?P>>>0>>0?s:P:l,((t[y>>2]|0)-T|0)/12|0,e+8|0),y=_+8|0,l=t[y>>2]|0,s=t[n+4>>2]|0,r=t[r>>2]|0,t[d>>2]=t[n>>2],t[d+4>>2]=s,t[o>>2]=t[d>>2],t[o+4>>2]=t[d+4>>2],Ep(l,o,r),t[y>>2]=(t[y>>2]|0)+12,wg(e,_),Dg(_),h=k;return}}function _g(e){return e=e|0,357913941}function yg(e,n,r,o){e=e|0,n=n|0,r=r|0,o=o|0;var s=0;t[e+12>>2]=0,t[e+16>>2]=o;do if(n)if(n>>>0>357913941)_n();else{s=Tt(n*12|0)|0;break}else s=0;while(0);t[e>>2]=s,o=s+(r*12|0)|0,t[e+8>>2]=o,t[e+4>>2]=o,t[e+12>>2]=s+(n*12|0)}function wg(e,n){e=e|0,n=n|0;var r=0,o=0,s=0,l=0,d=0;o=t[e>>2]|0,d=e+4|0,l=n+4|0,s=(t[d>>2]|0)-o|0,r=(t[l>>2]|0)+(((s|0)/-12|0)*12|0)|0,t[l>>2]=r,(s|0)>0?(vn(r|0,o|0,s|0)|0,o=l,r=t[l>>2]|0):o=l,l=t[e>>2]|0,t[e>>2]=r,t[o>>2]=l,l=n+8|0,s=t[d>>2]|0,t[d>>2]=t[l>>2],t[l>>2]=s,l=e+8|0,d=n+12|0,e=t[l>>2]|0,t[l>>2]=t[d>>2],t[d>>2]=e,t[n>>2]=t[o>>2]}function Dg(e){e=e|0;var n=0,r=0,o=0;n=t[e+4>>2]|0,r=e+8|0,o=t[r>>2]|0,(o|0)!=(n|0)&&(t[r>>2]=o+(~(((o+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&Ve(e)}function Sp(e){e=e|0,Cg(e)}function Eg(e){e=e|0,Sg(e+24|0)}function Sg(e){e=e|0;var n=0,r=0,o=0;r=t[e>>2]|0,o=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-o|0)>>>0)/12|0)*12|0)),Ve(r))}function Cg(e){e=e|0;var n=0;n=An()|0,Nn(e,2,6,n,Mo()|0,1),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function Mo(){return 1204}function Tg(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0,d=0;o=h,h=h+16|0,s=o+8|0,l=o,d=xg(e)|0,e=t[d+4>>2]|0,t[l>>2]=t[d>>2],t[l+4>>2]=e,t[s>>2]=t[l>>2],t[s+4>>2]=t[l+4>>2],Ll(n,s,r),h=o}function xg(e){return e=e|0,(t[(ta()|0)+24>>2]|0)+(e*12|0)|0}function Ll(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0;l=h,h=h+16|0,s=l,o=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(o=t[(t[e>>2]|0)+o>>2]|0),On(s,r),s=x1(s,r)|0,Bl[o&31](e,s),h=l}function On(e,n){e=e|0,n=n|0}function x1(e,n){return e=e|0,n=n|0,Vi(n)|0}function Vi(e){return e=e|0,e|0}function l0(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0,d=0,_=0;o=h,h=h+16|0,s=o+8|0,l=o,_=t[r>>2]|0,d=t[r+4>>2]|0,r=Zn(n)|0,t[l>>2]=_,t[l+4>>2]=d,t[s>>2]=t[l>>2],t[s+4>>2]=t[l+4>>2],kg(e,r,s,0),h=o}function kg(e,n,r,o){e=e|0,n=n|0,r=r|0,o=o|0;var s=0,l=0,d=0,_=0,y=0,k=0,T=0;s=h,h=h+32|0,l=s+16|0,T=s+8|0,_=s,k=t[r>>2]|0,y=t[r+4>>2]|0,d=t[e>>2]|0,e=Eu()|0,t[T>>2]=k,t[T+4>>2]=y,t[l>>2]=t[T>>2],t[l+4>>2]=t[T+4>>2],r=Ag(l)|0,t[_>>2]=k,t[_+4>>2]=y,t[l>>2]=t[_>>2],t[l+4>>2]=t[_+4>>2],ur(d,n,e,r,Og(l,o)|0,o),h=s}function Eu(){var e=0,n=0;if(c[7696]|0||(A1(9484),Bt(33,9484,Q|0)|0,n=7696,t[n>>2]=1,t[n+4>>2]=0),!(Dn(9484)|0)){e=9484,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));A1(9484)}return 9484}function Ag(e){return e=e|0,0}function Og(e,n){e=e|0,n=n|0;var r=0,o=0,s=0,l=0,d=0,_=0,y=0,k=0,T=0,P=0;return T=h,h=h+32|0,s=T+24|0,d=T+16|0,_=T,y=T+8|0,l=t[e>>2]|0,o=t[e+4>>2]|0,t[_>>2]=l,t[_+4>>2]=o,P=Eu()|0,k=P+24|0,e=Lt(n,4)|0,t[y>>2]=e,n=P+28|0,r=t[n>>2]|0,r>>>0<(t[P+32>>2]|0)>>>0?(t[d>>2]=l,t[d+4>>2]=o,t[s>>2]=t[d>>2],t[s+4>>2]=t[d+4>>2],Cp(r,s,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(Ig(k,_,y),e=t[n>>2]|0),h=T,((e-(t[k>>2]|0)|0)/12|0)+-1|0}function Cp(e,n,r){e=e|0,n=n|0,r=r|0;var o=0;o=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=o,t[e+8>>2]=r}function Ig(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0,d=0,_=0,y=0,k=0,T=0,P=0,q=0;if(k=h,h=h+48|0,o=k+32|0,d=k+24|0,_=k,y=e+4|0,s=(((t[y>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,l=Pg(e)|0,l>>>0>>0)$n(e);else{T=t[e>>2]|0,q=((t[e+8>>2]|0)-T|0)/12|0,P=q<<1,k1(_,q>>>0>>1>>>0?P>>>0>>0?s:P:l,((t[y>>2]|0)-T|0)/12|0,e+8|0),y=_+8|0,l=t[y>>2]|0,s=t[n+4>>2]|0,r=t[r>>2]|0,t[d>>2]=t[n>>2],t[d+4>>2]=s,t[o>>2]=t[d>>2],t[o+4>>2]=t[d+4>>2],Cp(l,o,r),t[y>>2]=(t[y>>2]|0)+12,Mg(e,_),rs(_),h=k;return}}function Pg(e){return e=e|0,357913941}function k1(e,n,r,o){e=e|0,n=n|0,r=r|0,o=o|0;var s=0;t[e+12>>2]=0,t[e+16>>2]=o;do if(n)if(n>>>0>357913941)_n();else{s=Tt(n*12|0)|0;break}else s=0;while(0);t[e>>2]=s,o=s+(r*12|0)|0,t[e+8>>2]=o,t[e+4>>2]=o,t[e+12>>2]=s+(n*12|0)}function Mg(e,n){e=e|0,n=n|0;var r=0,o=0,s=0,l=0,d=0;o=t[e>>2]|0,d=e+4|0,l=n+4|0,s=(t[d>>2]|0)-o|0,r=(t[l>>2]|0)+(((s|0)/-12|0)*12|0)|0,t[l>>2]=r,(s|0)>0?(vn(r|0,o|0,s|0)|0,o=l,r=t[l>>2]|0):o=l,l=t[e>>2]|0,t[e>>2]=r,t[o>>2]=l,l=n+8|0,s=t[d>>2]|0,t[d>>2]=t[l>>2],t[l>>2]=s,l=e+8|0,d=n+12|0,e=t[l>>2]|0,t[l>>2]=t[d>>2],t[d>>2]=e,t[n>>2]=t[o>>2]}function rs(e){e=e|0;var n=0,r=0,o=0;n=t[e+4>>2]|0,r=e+8|0,o=t[r>>2]|0,(o|0)!=(n|0)&&(t[r>>2]=o+(~(((o+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&Ve(e)}function A1(e){e=e|0,n0(e)}function na(e){e=e|0,Jr(e+24|0)}function Jr(e){e=e|0;var n=0,r=0,o=0;r=t[e>>2]|0,o=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-o|0)>>>0)/12|0)*12|0)),Ve(r))}function n0(e){e=e|0;var n=0;n=An()|0,Nn(e,2,1,n,Tp()|0,2),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function Tp(){return 1212}function Fg(e,n,r,o){e=e|0,n=n|0,r=r|0,o=o|0;var s=0,l=0,d=0,_=0;s=h,h=h+16|0,l=s+8|0,d=s,_=Lg(e)|0,e=t[_+4>>2]|0,t[d>>2]=t[_>>2],t[d+4>>2]=e,t[l>>2]=t[d>>2],t[l+4>>2]=t[d+4>>2],Rg(n,l,r,o),h=s}function Lg(e){return e=e|0,(t[(Eu()|0)+24>>2]|0)+(e*12|0)|0}function Rg(e,n,r,o){e=e|0,n=n|0,r=r|0,o=o|0;var s=0,l=0,d=0,_=0;_=h,h=h+16|0,l=_+1|0,d=_,s=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(s=t[(t[e>>2]|0)+s>>2]|0),On(l,r),l=x1(l,r)|0,Ml(d,o),d=Fl(d,o)|0,X1[s&15](e,l,d),h=_}function Ng(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0,d=0,_=0;o=h,h=h+16|0,s=o+8|0,l=o,_=t[r>>2]|0,d=t[r+4>>2]|0,r=Zn(n)|0,t[l>>2]=_,t[l+4>>2]=d,t[s>>2]=t[l>>2],t[s+4>>2]=t[l+4>>2],Bg(e,r,s,1),h=o}function Bg(e,n,r,o){e=e|0,n=n|0,r=r|0,o=o|0;var s=0,l=0,d=0,_=0,y=0,k=0,T=0;s=h,h=h+32|0,l=s+16|0,T=s+8|0,_=s,k=t[r>>2]|0,y=t[r+4>>2]|0,d=t[e>>2]|0,e=O1()|0,t[T>>2]=k,t[T+4>>2]=y,t[l>>2]=t[T>>2],t[l+4>>2]=t[T+4>>2],r=xp(l)|0,t[_>>2]=k,t[_+4>>2]=y,t[l>>2]=t[_>>2],t[l+4>>2]=t[_+4>>2],ur(d,n,e,r,ic(l,o)|0,o),h=s}function O1(){var e=0,n=0;if(c[7704]|0||(Ap(9520),Bt(34,9520,Q|0)|0,n=7704,t[n>>2]=1,t[n+4>>2]=0),!(Dn(9520)|0)){e=9520,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));Ap(9520)}return 9520}function xp(e){return e=e|0,0}function ic(e,n){e=e|0,n=n|0;var r=0,o=0,s=0,l=0,d=0,_=0,y=0,k=0,T=0,P=0;return T=h,h=h+32|0,s=T+24|0,d=T+16|0,_=T,y=T+8|0,l=t[e>>2]|0,o=t[e+4>>2]|0,t[_>>2]=l,t[_+4>>2]=o,P=O1()|0,k=P+24|0,e=Lt(n,4)|0,t[y>>2]=e,n=P+28|0,r=t[n>>2]|0,r>>>0<(t[P+32>>2]|0)>>>0?(t[d>>2]=l,t[d+4>>2]=o,t[s>>2]=t[d>>2],t[s+4>>2]=t[d+4>>2],ra(r,s,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(jg(k,_,y),e=t[n>>2]|0),h=T,((e-(t[k>>2]|0)|0)/12|0)+-1|0}function ra(e,n,r){e=e|0,n=n|0,r=r|0;var o=0;o=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=o,t[e+8>>2]=r}function jg(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0,d=0,_=0,y=0,k=0,T=0,P=0,q=0;if(k=h,h=h+48|0,o=k+32|0,d=k+24|0,_=k,y=e+4|0,s=(((t[y>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,l=kp(e)|0,l>>>0>>0)$n(e);else{T=t[e>>2]|0,q=((t[e+8>>2]|0)-T|0)/12|0,P=q<<1,ia(_,q>>>0>>1>>>0?P>>>0>>0?s:P:l,((t[y>>2]|0)-T|0)/12|0,e+8|0),y=_+8|0,l=t[y>>2]|0,s=t[n+4>>2]|0,r=t[r>>2]|0,t[d>>2]=t[n>>2],t[d+4>>2]=s,t[o>>2]=t[d>>2],t[o+4>>2]=t[d+4>>2],ra(l,o,r),t[y>>2]=(t[y>>2]|0)+12,mo(e,_),Df(_),h=k;return}}function kp(e){return e=e|0,357913941}function ia(e,n,r,o){e=e|0,n=n|0,r=r|0,o=o|0;var s=0;t[e+12>>2]=0,t[e+16>>2]=o;do if(n)if(n>>>0>357913941)_n();else{s=Tt(n*12|0)|0;break}else s=0;while(0);t[e>>2]=s,o=s+(r*12|0)|0,t[e+8>>2]=o,t[e+4>>2]=o,t[e+12>>2]=s+(n*12|0)}function mo(e,n){e=e|0,n=n|0;var r=0,o=0,s=0,l=0,d=0;o=t[e>>2]|0,d=e+4|0,l=n+4|0,s=(t[d>>2]|0)-o|0,r=(t[l>>2]|0)+(((s|0)/-12|0)*12|0)|0,t[l>>2]=r,(s|0)>0?(vn(r|0,o|0,s|0)|0,o=l,r=t[l>>2]|0):o=l,l=t[e>>2]|0,t[e>>2]=r,t[o>>2]=l,l=n+8|0,s=t[d>>2]|0,t[d>>2]=t[l>>2],t[l>>2]=s,l=e+8|0,d=n+12|0,e=t[l>>2]|0,t[l>>2]=t[d>>2],t[d>>2]=e,t[n>>2]=t[o>>2]}function Df(e){e=e|0;var n=0,r=0,o=0;n=t[e+4>>2]|0,r=e+8|0,o=t[r>>2]|0,(o|0)!=(n|0)&&(t[r>>2]=o+(~(((o+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&Ve(e)}function Ap(e){e=e|0,zg(e)}function Ug(e){e=e|0,qg(e+24|0)}function qg(e){e=e|0;var n=0,r=0,o=0;r=t[e>>2]|0,o=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-o|0)>>>0)/12|0)*12|0)),Ve(r))}function zg(e){e=e|0;var n=0;n=An()|0,Nn(e,2,1,n,Wg()|0,1),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function Wg(){return 1224}function Op(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0,d=0,_=0;return s=h,h=h+16|0,l=s+8|0,d=s,_=is(e)|0,e=t[_+4>>2]|0,t[d>>2]=t[_>>2],t[d+4>>2]=e,t[l>>2]=t[d>>2],t[l+4>>2]=t[d+4>>2],o=+jn(n,l,r),h=s,+o}function is(e){return e=e|0,(t[(O1()|0)+24>>2]|0)+(e*12|0)|0}function jn(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0,d=0;return l=h,h=h+16|0,s=l,o=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(o=t[(t[e>>2]|0)+o>>2]|0),ts(s,r),s=ns(s,r)|0,d=+Ol(+uD[o&7](e,s)),h=l,+d}function Ip(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0,d=0,_=0;o=h,h=h+16|0,s=o+8|0,l=o,_=t[r>>2]|0,d=t[r+4>>2]|0,r=Zn(n)|0,t[l>>2]=_,t[l+4>>2]=d,t[s>>2]=t[l>>2],t[s+4>>2]=t[l+4>>2],Fo(e,r,s,1),h=o}function Fo(e,n,r,o){e=e|0,n=n|0,r=r|0,o=o|0;var s=0,l=0,d=0,_=0,y=0,k=0,T=0;s=h,h=h+32|0,l=s+16|0,T=s+8|0,_=s,k=t[r>>2]|0,y=t[r+4>>2]|0,d=t[e>>2]|0,e=oa()|0,t[T>>2]=k,t[T+4>>2]=y,t[l>>2]=t[T>>2],t[l+4>>2]=t[T+4>>2],r=Hg(l)|0,t[_>>2]=k,t[_+4>>2]=y,t[l>>2]=t[_>>2],t[l+4>>2]=t[_+4>>2],ur(d,n,e,r,yr(l,o)|0,o),h=s}function oa(){var e=0,n=0;if(c[7712]|0||(Fp(9556),Bt(35,9556,Q|0)|0,n=7712,t[n>>2]=1,t[n+4>>2]=0),!(Dn(9556)|0)){e=9556,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));Fp(9556)}return 9556}function Hg(e){return e=e|0,0}function yr(e,n){e=e|0,n=n|0;var r=0,o=0,s=0,l=0,d=0,_=0,y=0,k=0,T=0,P=0;return T=h,h=h+32|0,s=T+24|0,d=T+16|0,_=T,y=T+8|0,l=t[e>>2]|0,o=t[e+4>>2]|0,t[_>>2]=l,t[_+4>>2]=o,P=oa()|0,k=P+24|0,e=Lt(n,4)|0,t[y>>2]=e,n=P+28|0,r=t[n>>2]|0,r>>>0<(t[P+32>>2]|0)>>>0?(t[d>>2]=l,t[d+4>>2]=o,t[s>>2]=t[d>>2],t[s+4>>2]=t[d+4>>2],Pp(r,s,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(Mp(k,_,y),e=t[n>>2]|0),h=T,((e-(t[k>>2]|0)|0)/12|0)+-1|0}function Pp(e,n,r){e=e|0,n=n|0,r=r|0;var o=0;o=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=o,t[e+8>>2]=r}function Mp(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0,d=0,_=0,y=0,k=0,T=0,P=0,q=0;if(k=h,h=h+48|0,o=k+32|0,d=k+24|0,_=k,y=e+4|0,s=(((t[y>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,l=ua(e)|0,l>>>0>>0)$n(e);else{T=t[e>>2]|0,q=((t[e+8>>2]|0)-T|0)/12|0,P=q<<1,bg(_,q>>>0>>1>>>0?P>>>0>>0?s:P:l,((t[y>>2]|0)-T|0)/12|0,e+8|0),y=_+8|0,l=t[y>>2]|0,s=t[n+4>>2]|0,r=t[r>>2]|0,t[d>>2]=t[n>>2],t[d+4>>2]=s,t[o>>2]=t[d>>2],t[o+4>>2]=t[d+4>>2],Pp(l,o,r),t[y>>2]=(t[y>>2]|0)+12,Gg(e,_),Vg(_),h=k;return}}function ua(e){return e=e|0,357913941}function bg(e,n,r,o){e=e|0,n=n|0,r=r|0,o=o|0;var s=0;t[e+12>>2]=0,t[e+16>>2]=o;do if(n)if(n>>>0>357913941)_n();else{s=Tt(n*12|0)|0;break}else s=0;while(0);t[e>>2]=s,o=s+(r*12|0)|0,t[e+8>>2]=o,t[e+4>>2]=o,t[e+12>>2]=s+(n*12|0)}function Gg(e,n){e=e|0,n=n|0;var r=0,o=0,s=0,l=0,d=0;o=t[e>>2]|0,d=e+4|0,l=n+4|0,s=(t[d>>2]|0)-o|0,r=(t[l>>2]|0)+(((s|0)/-12|0)*12|0)|0,t[l>>2]=r,(s|0)>0?(vn(r|0,o|0,s|0)|0,o=l,r=t[l>>2]|0):o=l,l=t[e>>2]|0,t[e>>2]=r,t[o>>2]=l,l=n+8|0,s=t[d>>2]|0,t[d>>2]=t[l>>2],t[l>>2]=s,l=e+8|0,d=n+12|0,e=t[l>>2]|0,t[l>>2]=t[d>>2],t[d>>2]=e,t[n>>2]=t[o>>2]}function Vg(e){e=e|0;var n=0,r=0,o=0;n=t[e+4>>2]|0,r=e+8|0,o=t[r>>2]|0,(o|0)!=(n|0)&&(t[r>>2]=o+(~(((o+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&Ve(e)}function Fp(e){e=e|0,Kg(e)}function Yg(e){e=e|0,$g(e+24|0)}function $g(e){e=e|0;var n=0,r=0,o=0;r=t[e>>2]|0,o=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-o|0)>>>0)/12|0)*12|0)),Ve(r))}function Kg(e){e=e|0;var n=0;n=An()|0,Nn(e,2,5,n,Xg()|0,0),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function Xg(){return 1232}function Jg(e,n){e=e|0,n=n|0;var r=0,o=0,s=0,l=0,d=0;return o=h,h=h+16|0,s=o+8|0,l=o,d=Qg(e)|0,e=t[d+4>>2]|0,t[l>>2]=t[d>>2],t[l+4>>2]=e,t[s>>2]=t[l>>2],t[s+4>>2]=t[l+4>>2],r=+Zg(n,s),h=o,+r}function Qg(e){return e=e|0,(t[(oa()|0)+24>>2]|0)+(e*12|0)|0}function Zg(e,n){e=e|0,n=n|0;var r=0;return r=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(r=t[(t[e>>2]|0)+r>>2]|0),+ +Ol(+oD[r&15](e))}function e_(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0,d=0,_=0;o=h,h=h+16|0,s=o+8|0,l=o,_=t[r>>2]|0,d=t[r+4>>2]|0,r=Zn(n)|0,t[l>>2]=_,t[l+4>>2]=d,t[s>>2]=t[l>>2],t[s+4>>2]=t[l+4>>2],t_(e,r,s,1),h=o}function t_(e,n,r,o){e=e|0,n=n|0,r=r|0,o=o|0;var s=0,l=0,d=0,_=0,y=0,k=0,T=0;s=h,h=h+32|0,l=s+16|0,T=s+8|0,_=s,k=t[r>>2]|0,y=t[r+4>>2]|0,d=t[e>>2]|0,e=oc()|0,t[T>>2]=k,t[T+4>>2]=y,t[l>>2]=t[T>>2],t[l+4>>2]=t[T+4>>2],r=n_(l)|0,t[_>>2]=k,t[_+4>>2]=y,t[l>>2]=t[_>>2],t[l+4>>2]=t[_+4>>2],ur(d,n,e,r,I1(l,o)|0,o),h=s}function oc(){var e=0,n=0;if(c[7720]|0||(Rp(9592),Bt(36,9592,Q|0)|0,n=7720,t[n>>2]=1,t[n+4>>2]=0),!(Dn(9592)|0)){e=9592,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));Rp(9592)}return 9592}function n_(e){return e=e|0,0}function I1(e,n){e=e|0,n=n|0;var r=0,o=0,s=0,l=0,d=0,_=0,y=0,k=0,T=0,P=0;return T=h,h=h+32|0,s=T+24|0,d=T+16|0,_=T,y=T+8|0,l=t[e>>2]|0,o=t[e+4>>2]|0,t[_>>2]=l,t[_+4>>2]=o,P=oc()|0,k=P+24|0,e=Lt(n,4)|0,t[y>>2]=e,n=P+28|0,r=t[n>>2]|0,r>>>0<(t[P+32>>2]|0)>>>0?(t[d>>2]=l,t[d+4>>2]=o,t[s>>2]=t[d>>2],t[s+4>>2]=t[d+4>>2],Lp(r,s,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(r_(k,_,y),e=t[n>>2]|0),h=T,((e-(t[k>>2]|0)|0)/12|0)+-1|0}function Lp(e,n,r){e=e|0,n=n|0,r=r|0;var o=0;o=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=o,t[e+8>>2]=r}function r_(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0,d=0,_=0,y=0,k=0,T=0,P=0,q=0;if(k=h,h=h+48|0,o=k+32|0,d=k+24|0,_=k,y=e+4|0,s=(((t[y>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,l=i_(e)|0,l>>>0>>0)$n(e);else{T=t[e>>2]|0,q=((t[e+8>>2]|0)-T|0)/12|0,P=q<<1,q0(_,q>>>0>>1>>>0?P>>>0>>0?s:P:l,((t[y>>2]|0)-T|0)/12|0,e+8|0),y=_+8|0,l=t[y>>2]|0,s=t[n+4>>2]|0,r=t[r>>2]|0,t[d>>2]=t[n>>2],t[d+4>>2]=s,t[o>>2]=t[d>>2],t[o+4>>2]=t[d+4>>2],Lp(l,o,r),t[y>>2]=(t[y>>2]|0)+12,Yi(e,_),o_(_),h=k;return}}function i_(e){return e=e|0,357913941}function q0(e,n,r,o){e=e|0,n=n|0,r=r|0,o=o|0;var s=0;t[e+12>>2]=0,t[e+16>>2]=o;do if(n)if(n>>>0>357913941)_n();else{s=Tt(n*12|0)|0;break}else s=0;while(0);t[e>>2]=s,o=s+(r*12|0)|0,t[e+8>>2]=o,t[e+4>>2]=o,t[e+12>>2]=s+(n*12|0)}function Yi(e,n){e=e|0,n=n|0;var r=0,o=0,s=0,l=0,d=0;o=t[e>>2]|0,d=e+4|0,l=n+4|0,s=(t[d>>2]|0)-o|0,r=(t[l>>2]|0)+(((s|0)/-12|0)*12|0)|0,t[l>>2]=r,(s|0)>0?(vn(r|0,o|0,s|0)|0,o=l,r=t[l>>2]|0):o=l,l=t[e>>2]|0,t[e>>2]=r,t[o>>2]=l,l=n+8|0,s=t[d>>2]|0,t[d>>2]=t[l>>2],t[l>>2]=s,l=e+8|0,d=n+12|0,e=t[l>>2]|0,t[l>>2]=t[d>>2],t[d>>2]=e,t[n>>2]=t[o>>2]}function o_(e){e=e|0;var n=0,r=0,o=0;n=t[e+4>>2]|0,r=e+8|0,o=t[r>>2]|0,(o|0)!=(n|0)&&(t[r>>2]=o+(~(((o+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&Ve(e)}function Rp(e){e=e|0,s_(e)}function u_(e){e=e|0,Np(e+24|0)}function Np(e){e=e|0;var n=0,r=0,o=0;r=t[e>>2]|0,o=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-o|0)>>>0)/12|0)*12|0)),Ve(r))}function s_(e){e=e|0;var n=0;n=An()|0,Nn(e,2,7,n,l_()|0,0),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function l_(){return 1276}function f_(e,n){e=e|0,n=n|0;var r=0,o=0,s=0,l=0;return r=h,h=h+16|0,o=r+8|0,s=r,l=Bp(e)|0,e=t[l+4>>2]|0,t[s>>2]=t[l>>2],t[s+4>>2]=e,t[o>>2]=t[s>>2],t[o+4>>2]=t[s+4>>2],n=c_(n,o)|0,h=r,n|0}function Bp(e){return e=e|0,(t[(oc()|0)+24>>2]|0)+(e*12|0)|0}function c_(e,n){e=e|0,n=n|0;var r=0,o=0,s=0;return s=h,h=h+16|0,o=s,r=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(r=t[(t[e>>2]|0)+r>>2]|0),Bl[r&31](o,e),o=jp(o)|0,h=s,o|0}function jp(e){e=e|0;var n=0,r=0,o=0,s=0;return s=h,h=h+32|0,n=s+12|0,r=s,o=U0(Up()|0)|0,o?(s1(n,o),l1(r,n),qp(e,r),e=f1(n)|0):e=zp(e)|0,h=s,e|0}function Up(){var e=0;return c[7736]|0||(Wp(9640),Bt(25,9640,Q|0)|0,e=7736,t[e>>2]=1,t[e+4>>2]=0),9640}function qp(e,n){e=e|0,n=n|0,Ef(n,e,e+8|0)|0}function zp(e){e=e|0;var n=0,r=0,o=0,s=0,l=0,d=0,_=0;return r=h,h=h+16|0,s=r+4|0,d=r,o=Qo(8)|0,n=o,_=Tt(16)|0,t[_>>2]=t[e>>2],t[_+4>>2]=t[e+4>>2],t[_+8>>2]=t[e+8>>2],t[_+12>>2]=t[e+12>>2],l=n+4|0,t[l>>2]=_,e=Tt(8)|0,l=t[l>>2]|0,t[d>>2]=0,t[s>>2]=t[d>>2],P1(e,l,s),t[o>>2]=e,h=r,n|0}function P1(e,n,r){e=e|0,n=n|0,r=r|0,t[e>>2]=n,r=Tt(16)|0,t[r+4>>2]=0,t[r+8>>2]=0,t[r>>2]=1244,t[r+12>>2]=n,t[e+4>>2]=r}function a_(e){e=e|0,da(e),Ve(e)}function d_(e){e=e|0,e=t[e+12>>2]|0,e|0&&Ve(e)}function p_(e){e=e|0,Ve(e)}function Ef(e,n,r){return e=e|0,n=n|0,r=r|0,n=h_(t[e>>2]|0,n,r)|0,r=e+4|0,t[(t[r>>2]|0)+8>>2]=n,t[(t[r>>2]|0)+8>>2]|0}function h_(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0;return o=h,h=h+16|0,s=o,Zo(s),e=Oi(e)|0,r=m_(e,t[n>>2]|0,+L[r>>3])|0,eu(s),h=o,r|0}function m_(e,n,r){e=e|0,n=n|0,r=+r;var o=0;return o=ko(v_()|0)|0,n=jc(n)|0,dl(0,o|0,e|0,n|0,+ +Ko(r))|0}function v_(){var e=0;return c[7728]|0||(g_(9628),e=7728,t[e>>2]=1,t[e+4>>2]=0),9628}function g_(e){e=e|0,Ao(e,__()|0,2)}function __(){return 1264}function Wp(e){e=e|0,Ys(e)}function Hp(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0,d=0,_=0;o=h,h=h+16|0,s=o+8|0,l=o,_=t[r>>2]|0,d=t[r+4>>2]|0,r=Zn(n)|0,t[l>>2]=_,t[l+4>>2]=d,t[s>>2]=t[l>>2],t[s+4>>2]=t[l+4>>2],y_(e,r,s,1),h=o}function y_(e,n,r,o){e=e|0,n=n|0,r=r|0,o=o|0;var s=0,l=0,d=0,_=0,y=0,k=0,T=0;s=h,h=h+32|0,l=s+16|0,T=s+8|0,_=s,k=t[r>>2]|0,y=t[r+4>>2]|0,d=t[e>>2]|0,e=M1()|0,t[T>>2]=k,t[T+4>>2]=y,t[l>>2]=t[T>>2],t[l+4>>2]=t[T+4>>2],r=w_(l)|0,t[_>>2]=k,t[_+4>>2]=y,t[l>>2]=t[_>>2],t[l+4>>2]=t[_+4>>2],ur(d,n,e,r,D_(l,o)|0,o),h=s}function M1(){var e=0,n=0;if(c[7744]|0||(Gp(9684),Bt(37,9684,Q|0)|0,n=7744,t[n>>2]=1,t[n+4>>2]=0),!(Dn(9684)|0)){e=9684,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));Gp(9684)}return 9684}function w_(e){return e=e|0,0}function D_(e,n){e=e|0,n=n|0;var r=0,o=0,s=0,l=0,d=0,_=0,y=0,k=0,T=0,P=0;return T=h,h=h+32|0,s=T+24|0,d=T+16|0,_=T,y=T+8|0,l=t[e>>2]|0,o=t[e+4>>2]|0,t[_>>2]=l,t[_+4>>2]=o,P=M1()|0,k=P+24|0,e=Lt(n,4)|0,t[y>>2]=e,n=P+28|0,r=t[n>>2]|0,r>>>0<(t[P+32>>2]|0)>>>0?(t[d>>2]=l,t[d+4>>2]=o,t[s>>2]=t[d>>2],t[s+4>>2]=t[d+4>>2],bp(r,s,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(E_(k,_,y),e=t[n>>2]|0),h=T,((e-(t[k>>2]|0)|0)/12|0)+-1|0}function bp(e,n,r){e=e|0,n=n|0,r=r|0;var o=0;o=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=o,t[e+8>>2]=r}function E_(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0,d=0,_=0,y=0,k=0,T=0,P=0,q=0;if(k=h,h=h+48|0,o=k+32|0,d=k+24|0,_=k,y=e+4|0,s=(((t[y>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,l=S_(e)|0,l>>>0>>0)$n(e);else{T=t[e>>2]|0,q=((t[e+8>>2]|0)-T|0)/12|0,P=q<<1,C_(_,q>>>0>>1>>>0?P>>>0>>0?s:P:l,((t[y>>2]|0)-T|0)/12|0,e+8|0),y=_+8|0,l=t[y>>2]|0,s=t[n+4>>2]|0,r=t[r>>2]|0,t[d>>2]=t[n>>2],t[d+4>>2]=s,t[o>>2]=t[d>>2],t[o+4>>2]=t[d+4>>2],bp(l,o,r),t[y>>2]=(t[y>>2]|0)+12,T_(e,_),x_(_),h=k;return}}function S_(e){return e=e|0,357913941}function C_(e,n,r,o){e=e|0,n=n|0,r=r|0,o=o|0;var s=0;t[e+12>>2]=0,t[e+16>>2]=o;do if(n)if(n>>>0>357913941)_n();else{s=Tt(n*12|0)|0;break}else s=0;while(0);t[e>>2]=s,o=s+(r*12|0)|0,t[e+8>>2]=o,t[e+4>>2]=o,t[e+12>>2]=s+(n*12|0)}function T_(e,n){e=e|0,n=n|0;var r=0,o=0,s=0,l=0,d=0;o=t[e>>2]|0,d=e+4|0,l=n+4|0,s=(t[d>>2]|0)-o|0,r=(t[l>>2]|0)+(((s|0)/-12|0)*12|0)|0,t[l>>2]=r,(s|0)>0?(vn(r|0,o|0,s|0)|0,o=l,r=t[l>>2]|0):o=l,l=t[e>>2]|0,t[e>>2]=r,t[o>>2]=l,l=n+8|0,s=t[d>>2]|0,t[d>>2]=t[l>>2],t[l>>2]=s,l=e+8|0,d=n+12|0,e=t[l>>2]|0,t[l>>2]=t[d>>2],t[d>>2]=e,t[n>>2]=t[o>>2]}function x_(e){e=e|0;var n=0,r=0,o=0;n=t[e+4>>2]|0,r=e+8|0,o=t[r>>2]|0,(o|0)!=(n|0)&&(t[r>>2]=o+(~(((o+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&Ve(e)}function Gp(e){e=e|0,O_(e)}function k_(e){e=e|0,A_(e+24|0)}function A_(e){e=e|0;var n=0,r=0,o=0;r=t[e>>2]|0,o=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-o|0)>>>0)/12|0)*12|0)),Ve(r))}function O_(e){e=e|0;var n=0;n=An()|0,Nn(e,2,5,n,I_()|0,1),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function I_(){return 1280}function P_(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0,d=0;return o=h,h=h+16|0,s=o+8|0,l=o,d=M_(e)|0,e=t[d+4>>2]|0,t[l>>2]=t[d>>2],t[l+4>>2]=e,t[s>>2]=t[l>>2],t[s+4>>2]=t[l+4>>2],r=F_(n,s,r)|0,h=o,r|0}function M_(e){return e=e|0,(t[(M1()|0)+24>>2]|0)+(e*12|0)|0}function F_(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0,d=0;return d=h,h=h+32|0,s=d,l=d+16|0,o=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(o=t[(t[e>>2]|0)+o>>2]|0),ts(l,r),l=ns(l,r)|0,X1[o&15](s,e,l),l=jp(s)|0,h=d,l|0}function L_(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0,d=0,_=0;o=h,h=h+16|0,s=o+8|0,l=o,_=t[r>>2]|0,d=t[r+4>>2]|0,r=Zn(n)|0,t[l>>2]=_,t[l+4>>2]=d,t[s>>2]=t[l>>2],t[s+4>>2]=t[l+4>>2],R_(e,r,s,1),h=o}function R_(e,n,r,o){e=e|0,n=n|0,r=r|0,o=o|0;var s=0,l=0,d=0,_=0,y=0,k=0,T=0;s=h,h=h+32|0,l=s+16|0,T=s+8|0,_=s,k=t[r>>2]|0,y=t[r+4>>2]|0,d=t[e>>2]|0,e=F1()|0,t[T>>2]=k,t[T+4>>2]=y,t[l>>2]=t[T>>2],t[l+4>>2]=t[T+4>>2],r=N_(l)|0,t[_>>2]=k,t[_+4>>2]=y,t[l>>2]=t[_>>2],t[l+4>>2]=t[_+4>>2],ur(d,n,e,r,B_(l,o)|0,o),h=s}function F1(){var e=0,n=0;if(c[7752]|0||(Kp(9720),Bt(38,9720,Q|0)|0,n=7752,t[n>>2]=1,t[n+4>>2]=0),!(Dn(9720)|0)){e=9720,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));Kp(9720)}return 9720}function N_(e){return e=e|0,0}function B_(e,n){e=e|0,n=n|0;var r=0,o=0,s=0,l=0,d=0,_=0,y=0,k=0,T=0,P=0;return T=h,h=h+32|0,s=T+24|0,d=T+16|0,_=T,y=T+8|0,l=t[e>>2]|0,o=t[e+4>>2]|0,t[_>>2]=l,t[_+4>>2]=o,P=F1()|0,k=P+24|0,e=Lt(n,4)|0,t[y>>2]=e,n=P+28|0,r=t[n>>2]|0,r>>>0<(t[P+32>>2]|0)>>>0?(t[d>>2]=l,t[d+4>>2]=o,t[s>>2]=t[d>>2],t[s+4>>2]=t[d+4>>2],Vp(r,s,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(j_(k,_,y),e=t[n>>2]|0),h=T,((e-(t[k>>2]|0)|0)/12|0)+-1|0}function Vp(e,n,r){e=e|0,n=n|0,r=r|0;var o=0;o=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=o,t[e+8>>2]=r}function j_(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0,d=0,_=0,y=0,k=0,T=0,P=0,q=0;if(k=h,h=h+48|0,o=k+32|0,d=k+24|0,_=k,y=e+4|0,s=(((t[y>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,l=L1(e)|0,l>>>0>>0)$n(e);else{T=t[e>>2]|0,q=((t[e+8>>2]|0)-T|0)/12|0,P=q<<1,Yp(_,q>>>0>>1>>>0?P>>>0>>0?s:P:l,((t[y>>2]|0)-T|0)/12|0,e+8|0),y=_+8|0,l=t[y>>2]|0,s=t[n+4>>2]|0,r=t[r>>2]|0,t[d>>2]=t[n>>2],t[d+4>>2]=s,t[o>>2]=t[d>>2],t[o+4>>2]=t[d+4>>2],Vp(l,o,r),t[y>>2]=(t[y>>2]|0)+12,$p(e,_),U_(_),h=k;return}}function L1(e){return e=e|0,357913941}function Yp(e,n,r,o){e=e|0,n=n|0,r=r|0,o=o|0;var s=0;t[e+12>>2]=0,t[e+16>>2]=o;do if(n)if(n>>>0>357913941)_n();else{s=Tt(n*12|0)|0;break}else s=0;while(0);t[e>>2]=s,o=s+(r*12|0)|0,t[e+8>>2]=o,t[e+4>>2]=o,t[e+12>>2]=s+(n*12|0)}function $p(e,n){e=e|0,n=n|0;var r=0,o=0,s=0,l=0,d=0;o=t[e>>2]|0,d=e+4|0,l=n+4|0,s=(t[d>>2]|0)-o|0,r=(t[l>>2]|0)+(((s|0)/-12|0)*12|0)|0,t[l>>2]=r,(s|0)>0?(vn(r|0,o|0,s|0)|0,o=l,r=t[l>>2]|0):o=l,l=t[e>>2]|0,t[e>>2]=r,t[o>>2]=l,l=n+8|0,s=t[d>>2]|0,t[d>>2]=t[l>>2],t[l>>2]=s,l=e+8|0,d=n+12|0,e=t[l>>2]|0,t[l>>2]=t[d>>2],t[d>>2]=e,t[n>>2]=t[o>>2]}function U_(e){e=e|0;var n=0,r=0,o=0;n=t[e+4>>2]|0,r=e+8|0,o=t[r>>2]|0,(o|0)!=(n|0)&&(t[r>>2]=o+(~(((o+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&Ve(e)}function Kp(e){e=e|0,z_(e)}function q_(e){e=e|0,R1(e+24|0)}function R1(e){e=e|0;var n=0,r=0,o=0;r=t[e>>2]|0,o=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-o|0)>>>0)/12|0)*12|0)),Ve(r))}function z_(e){e=e|0;var n=0;n=An()|0,Nn(e,2,8,n,W_()|0,0),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function W_(){return 1288}function H_(e,n){e=e|0,n=n|0;var r=0,o=0,s=0,l=0;return r=h,h=h+16|0,o=r+8|0,s=r,l=$i(e)|0,e=t[l+4>>2]|0,t[s>>2]=t[l>>2],t[s+4>>2]=e,t[o>>2]=t[s>>2],t[o+4>>2]=t[s+4>>2],n=N1(n,o)|0,h=r,n|0}function $i(e){return e=e|0,(t[(F1()|0)+24>>2]|0)+(e*12|0)|0}function N1(e,n){e=e|0,n=n|0;var r=0;return r=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(r=t[(t[e>>2]|0)+r>>2]|0),Dd(dc[r&31](e)|0)|0}function b_(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0,d=0,_=0;o=h,h=h+16|0,s=o+8|0,l=o,_=t[r>>2]|0,d=t[r+4>>2]|0,r=Zn(n)|0,t[l>>2]=_,t[l+4>>2]=d,t[s>>2]=t[l>>2],t[s+4>>2]=t[l+4>>2],G_(e,r,s,0),h=o}function G_(e,n,r,o){e=e|0,n=n|0,r=r|0,o=o|0;var s=0,l=0,d=0,_=0,y=0,k=0,T=0;s=h,h=h+32|0,l=s+16|0,T=s+8|0,_=s,k=t[r>>2]|0,y=t[r+4>>2]|0,d=t[e>>2]|0,e=B1()|0,t[T>>2]=k,t[T+4>>2]=y,t[l>>2]=t[T>>2],t[l+4>>2]=t[T+4>>2],r=V_(l)|0,t[_>>2]=k,t[_+4>>2]=y,t[l>>2]=t[_>>2],t[l+4>>2]=t[_+4>>2],ur(d,n,e,r,j1(l,o)|0,o),h=s}function B1(){var e=0,n=0;if(c[7760]|0||(q1(9756),Bt(39,9756,Q|0)|0,n=7760,t[n>>2]=1,t[n+4>>2]=0),!(Dn(9756)|0)){e=9756,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));q1(9756)}return 9756}function V_(e){return e=e|0,0}function j1(e,n){e=e|0,n=n|0;var r=0,o=0,s=0,l=0,d=0,_=0,y=0,k=0,T=0,P=0;return T=h,h=h+32|0,s=T+24|0,d=T+16|0,_=T,y=T+8|0,l=t[e>>2]|0,o=t[e+4>>2]|0,t[_>>2]=l,t[_+4>>2]=o,P=B1()|0,k=P+24|0,e=Lt(n,4)|0,t[y>>2]=e,n=P+28|0,r=t[n>>2]|0,r>>>0<(t[P+32>>2]|0)>>>0?(t[d>>2]=l,t[d+4>>2]=o,t[s>>2]=t[d>>2],t[s+4>>2]=t[d+4>>2],Xp(r,s,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(U1(k,_,y),e=t[n>>2]|0),h=T,((e-(t[k>>2]|0)|0)/12|0)+-1|0}function Xp(e,n,r){e=e|0,n=n|0,r=r|0;var o=0;o=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=o,t[e+8>>2]=r}function U1(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0,d=0,_=0,y=0,k=0,T=0,P=0,q=0;if(k=h,h=h+48|0,o=k+32|0,d=k+24|0,_=k,y=e+4|0,s=(((t[y>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,l=Y_(e)|0,l>>>0>>0)$n(e);else{T=t[e>>2]|0,q=((t[e+8>>2]|0)-T|0)/12|0,P=q<<1,$_(_,q>>>0>>1>>>0?P>>>0>>0?s:P:l,((t[y>>2]|0)-T|0)/12|0,e+8|0),y=_+8|0,l=t[y>>2]|0,s=t[n+4>>2]|0,r=t[r>>2]|0,t[d>>2]=t[n>>2],t[d+4>>2]=s,t[o>>2]=t[d>>2],t[o+4>>2]=t[d+4>>2],Xp(l,o,r),t[y>>2]=(t[y>>2]|0)+12,K_(e,_),X_(_),h=k;return}}function Y_(e){return e=e|0,357913941}function $_(e,n,r,o){e=e|0,n=n|0,r=r|0,o=o|0;var s=0;t[e+12>>2]=0,t[e+16>>2]=o;do if(n)if(n>>>0>357913941)_n();else{s=Tt(n*12|0)|0;break}else s=0;while(0);t[e>>2]=s,o=s+(r*12|0)|0,t[e+8>>2]=o,t[e+4>>2]=o,t[e+12>>2]=s+(n*12|0)}function K_(e,n){e=e|0,n=n|0;var r=0,o=0,s=0,l=0,d=0;o=t[e>>2]|0,d=e+4|0,l=n+4|0,s=(t[d>>2]|0)-o|0,r=(t[l>>2]|0)+(((s|0)/-12|0)*12|0)|0,t[l>>2]=r,(s|0)>0?(vn(r|0,o|0,s|0)|0,o=l,r=t[l>>2]|0):o=l,l=t[e>>2]|0,t[e>>2]=r,t[o>>2]=l,l=n+8|0,s=t[d>>2]|0,t[d>>2]=t[l>>2],t[l>>2]=s,l=e+8|0,d=n+12|0,e=t[l>>2]|0,t[l>>2]=t[d>>2],t[d>>2]=e,t[n>>2]=t[o>>2]}function X_(e){e=e|0;var n=0,r=0,o=0;n=t[e+4>>2]|0,r=e+8|0,o=t[r>>2]|0,(o|0)!=(n|0)&&(t[r>>2]=o+(~(((o+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&Ve(e)}function q1(e){e=e|0,Z_(e)}function J_(e){e=e|0,Q_(e+24|0)}function Q_(e){e=e|0;var n=0,r=0,o=0;r=t[e>>2]|0,o=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-o|0)>>>0)/12|0)*12|0)),Ve(r))}function Z_(e){e=e|0;var n=0;n=An()|0,Nn(e,2,8,n,z1()|0,1),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function z1(){return 1292}function W1(e,n,r){e=e|0,n=n|0,r=+r;var o=0,s=0,l=0,d=0;o=h,h=h+16|0,s=o+8|0,l=o,d=e4(e)|0,e=t[d+4>>2]|0,t[l>>2]=t[d>>2],t[l+4>>2]=e,t[s>>2]=t[l>>2],t[s+4>>2]=t[l+4>>2],t4(n,s,r),h=o}function e4(e){return e=e|0,(t[(B1()|0)+24>>2]|0)+(e*12|0)|0}function t4(e,n,r){e=e|0,n=n|0,r=+r;var o=0,s=0,l=0;l=h,h=h+16|0,s=l,o=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(o=t[(t[e>>2]|0)+o>>2]|0),wu(s,r),r=+Du(s,r),nD[o&31](e,r),h=l}function n4(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0,d=0,_=0;o=h,h=h+16|0,s=o+8|0,l=o,_=t[r>>2]|0,d=t[r+4>>2]|0,r=Zn(n)|0,t[l>>2]=_,t[l+4>>2]=d,t[s>>2]=t[l>>2],t[s+4>>2]=t[l+4>>2],r4(e,r,s,0),h=o}function r4(e,n,r,o){e=e|0,n=n|0,r=r|0,o=o|0;var s=0,l=0,d=0,_=0,y=0,k=0,T=0;s=h,h=h+32|0,l=s+16|0,T=s+8|0,_=s,k=t[r>>2]|0,y=t[r+4>>2]|0,d=t[e>>2]|0,e=H1()|0,t[T>>2]=k,t[T+4>>2]=y,t[l>>2]=t[T>>2],t[l+4>>2]=t[T+4>>2],r=i4(l)|0,t[_>>2]=k,t[_+4>>2]=y,t[l>>2]=t[_>>2],t[l+4>>2]=t[_+4>>2],ur(d,n,e,r,o4(l,o)|0,o),h=s}function H1(){var e=0,n=0;if(c[7768]|0||(Qp(9792),Bt(40,9792,Q|0)|0,n=7768,t[n>>2]=1,t[n+4>>2]=0),!(Dn(9792)|0)){e=9792,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));Qp(9792)}return 9792}function i4(e){return e=e|0,0}function o4(e,n){e=e|0,n=n|0;var r=0,o=0,s=0,l=0,d=0,_=0,y=0,k=0,T=0,P=0;return T=h,h=h+32|0,s=T+24|0,d=T+16|0,_=T,y=T+8|0,l=t[e>>2]|0,o=t[e+4>>2]|0,t[_>>2]=l,t[_+4>>2]=o,P=H1()|0,k=P+24|0,e=Lt(n,4)|0,t[y>>2]=e,n=P+28|0,r=t[n>>2]|0,r>>>0<(t[P+32>>2]|0)>>>0?(t[d>>2]=l,t[d+4>>2]=o,t[s>>2]=t[d>>2],t[s+4>>2]=t[d+4>>2],Jp(r,s,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(u4(k,_,y),e=t[n>>2]|0),h=T,((e-(t[k>>2]|0)|0)/12|0)+-1|0}function Jp(e,n,r){e=e|0,n=n|0,r=r|0;var o=0;o=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=o,t[e+8>>2]=r}function u4(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0,d=0,_=0,y=0,k=0,T=0,P=0,q=0;if(k=h,h=h+48|0,o=k+32|0,d=k+24|0,_=k,y=e+4|0,s=(((t[y>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,l=s4(e)|0,l>>>0>>0)$n(e);else{T=t[e>>2]|0,q=((t[e+8>>2]|0)-T|0)/12|0,P=q<<1,l4(_,q>>>0>>1>>>0?P>>>0>>0?s:P:l,((t[y>>2]|0)-T|0)/12|0,e+8|0),y=_+8|0,l=t[y>>2]|0,s=t[n+4>>2]|0,r=t[r>>2]|0,t[d>>2]=t[n>>2],t[d+4>>2]=s,t[o>>2]=t[d>>2],t[o+4>>2]=t[d+4>>2],Jp(l,o,r),t[y>>2]=(t[y>>2]|0)+12,f4(e,_),c4(_),h=k;return}}function s4(e){return e=e|0,357913941}function l4(e,n,r,o){e=e|0,n=n|0,r=r|0,o=o|0;var s=0;t[e+12>>2]=0,t[e+16>>2]=o;do if(n)if(n>>>0>357913941)_n();else{s=Tt(n*12|0)|0;break}else s=0;while(0);t[e>>2]=s,o=s+(r*12|0)|0,t[e+8>>2]=o,t[e+4>>2]=o,t[e+12>>2]=s+(n*12|0)}function f4(e,n){e=e|0,n=n|0;var r=0,o=0,s=0,l=0,d=0;o=t[e>>2]|0,d=e+4|0,l=n+4|0,s=(t[d>>2]|0)-o|0,r=(t[l>>2]|0)+(((s|0)/-12|0)*12|0)|0,t[l>>2]=r,(s|0)>0?(vn(r|0,o|0,s|0)|0,o=l,r=t[l>>2]|0):o=l,l=t[e>>2]|0,t[e>>2]=r,t[o>>2]=l,l=n+8|0,s=t[d>>2]|0,t[d>>2]=t[l>>2],t[l>>2]=s,l=e+8|0,d=n+12|0,e=t[l>>2]|0,t[l>>2]=t[d>>2],t[d>>2]=e,t[n>>2]=t[o>>2]}function c4(e){e=e|0;var n=0,r=0,o=0;n=t[e+4>>2]|0,r=e+8|0,o=t[r>>2]|0,(o|0)!=(n|0)&&(t[r>>2]=o+(~(((o+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&Ve(e)}function Qp(e){e=e|0,p4(e)}function a4(e){e=e|0,d4(e+24|0)}function d4(e){e=e|0;var n=0,r=0,o=0;r=t[e>>2]|0,o=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-o|0)>>>0)/12|0)*12|0)),Ve(r))}function p4(e){e=e|0;var n=0;n=An()|0,Nn(e,2,1,n,h4()|0,2),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function h4(){return 1300}function m4(e,n,r,o){e=e|0,n=n|0,r=r|0,o=+o;var s=0,l=0,d=0,_=0;s=h,h=h+16|0,l=s+8|0,d=s,_=v4(e)|0,e=t[_+4>>2]|0,t[d>>2]=t[_>>2],t[d+4>>2]=e,t[l>>2]=t[d>>2],t[l+4>>2]=t[d+4>>2],g4(n,l,r,o),h=s}function v4(e){return e=e|0,(t[(H1()|0)+24>>2]|0)+(e*12|0)|0}function g4(e,n,r,o){e=e|0,n=n|0,r=r|0,o=+o;var s=0,l=0,d=0,_=0;_=h,h=h+16|0,l=_+1|0,d=_,s=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(s=t[(t[e>>2]|0)+s>>2]|0),ts(l,r),l=ns(l,r)|0,wu(d,o),o=+Du(d,o),cD[s&15](e,l,o),h=_}function a(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0,d=0,_=0;o=h,h=h+16|0,s=o+8|0,l=o,_=t[r>>2]|0,d=t[r+4>>2]|0,r=Zn(n)|0,t[l>>2]=_,t[l+4>>2]=d,t[s>>2]=t[l>>2],t[s+4>>2]=t[l+4>>2],p(e,r,s,0),h=o}function p(e,n,r,o){e=e|0,n=n|0,r=r|0,o=o|0;var s=0,l=0,d=0,_=0,y=0,k=0,T=0;s=h,h=h+32|0,l=s+16|0,T=s+8|0,_=s,k=t[r>>2]|0,y=t[r+4>>2]|0,d=t[e>>2]|0,e=E()|0,t[T>>2]=k,t[T+4>>2]=y,t[l>>2]=t[T>>2],t[l+4>>2]=t[T+4>>2],r=I(l)|0,t[_>>2]=k,t[_+4>>2]=y,t[l>>2]=t[_>>2],t[l+4>>2]=t[_+4>>2],ur(d,n,e,r,B(l,o)|0,o),h=s}function E(){var e=0,n=0;if(c[7776]|0||(nt(9828),Bt(41,9828,Q|0)|0,n=7776,t[n>>2]=1,t[n+4>>2]=0),!(Dn(9828)|0)){e=9828,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));nt(9828)}return 9828}function I(e){return e=e|0,0}function B(e,n){e=e|0,n=n|0;var r=0,o=0,s=0,l=0,d=0,_=0,y=0,k=0,T=0,P=0;return T=h,h=h+32|0,s=T+24|0,d=T+16|0,_=T,y=T+8|0,l=t[e>>2]|0,o=t[e+4>>2]|0,t[_>>2]=l,t[_+4>>2]=o,P=E()|0,k=P+24|0,e=Lt(n,4)|0,t[y>>2]=e,n=P+28|0,r=t[n>>2]|0,r>>>0<(t[P+32>>2]|0)>>>0?(t[d>>2]=l,t[d+4>>2]=o,t[s>>2]=t[d>>2],t[s+4>>2]=t[d+4>>2],G(r,s,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(te(k,_,y),e=t[n>>2]|0),h=T,((e-(t[k>>2]|0)|0)/12|0)+-1|0}function G(e,n,r){e=e|0,n=n|0,r=r|0;var o=0;o=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=o,t[e+8>>2]=r}function te(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0,d=0,_=0,y=0,k=0,T=0,P=0,q=0;if(k=h,h=h+48|0,o=k+32|0,d=k+24|0,_=k,y=e+4|0,s=(((t[y>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,l=se(e)|0,l>>>0>>0)$n(e);else{T=t[e>>2]|0,q=((t[e+8>>2]|0)-T|0)/12|0,P=q<<1,Ee(_,q>>>0>>1>>>0?P>>>0>>0?s:P:l,((t[y>>2]|0)-T|0)/12|0,e+8|0),y=_+8|0,l=t[y>>2]|0,s=t[n+4>>2]|0,r=t[r>>2]|0,t[d>>2]=t[n>>2],t[d+4>>2]=s,t[o>>2]=t[d>>2],t[o+4>>2]=t[d+4>>2],G(l,o,r),t[y>>2]=(t[y>>2]|0)+12,$e(e,_),Ke(_),h=k;return}}function se(e){return e=e|0,357913941}function Ee(e,n,r,o){e=e|0,n=n|0,r=r|0,o=o|0;var s=0;t[e+12>>2]=0,t[e+16>>2]=o;do if(n)if(n>>>0>357913941)_n();else{s=Tt(n*12|0)|0;break}else s=0;while(0);t[e>>2]=s,o=s+(r*12|0)|0,t[e+8>>2]=o,t[e+4>>2]=o,t[e+12>>2]=s+(n*12|0)}function $e(e,n){e=e|0,n=n|0;var r=0,o=0,s=0,l=0,d=0;o=t[e>>2]|0,d=e+4|0,l=n+4|0,s=(t[d>>2]|0)-o|0,r=(t[l>>2]|0)+(((s|0)/-12|0)*12|0)|0,t[l>>2]=r,(s|0)>0?(vn(r|0,o|0,s|0)|0,o=l,r=t[l>>2]|0):o=l,l=t[e>>2]|0,t[e>>2]=r,t[o>>2]=l,l=n+8|0,s=t[d>>2]|0,t[d>>2]=t[l>>2],t[l>>2]=s,l=e+8|0,d=n+12|0,e=t[l>>2]|0,t[l>>2]=t[d>>2],t[d>>2]=e,t[n>>2]=t[o>>2]}function Ke(e){e=e|0;var n=0,r=0,o=0;n=t[e+4>>2]|0,r=e+8|0,o=t[r>>2]|0,(o|0)!=(n|0)&&(t[r>>2]=o+(~(((o+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&Ve(e)}function nt(e){e=e|0,an(e)}function Ct(e){e=e|0,Gt(e+24|0)}function Gt(e){e=e|0;var n=0,r=0,o=0;r=t[e>>2]|0,o=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-o|0)>>>0)/12|0)*12|0)),Ve(r))}function an(e){e=e|0;var n=0;n=An()|0,Nn(e,2,7,n,qn()|0,1),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function qn(){return 1312}function dn(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0,d=0;o=h,h=h+16|0,s=o+8|0,l=o,d=Yn(e)|0,e=t[d+4>>2]|0,t[l>>2]=t[d>>2],t[l+4>>2]=e,t[s>>2]=t[l>>2],t[s+4>>2]=t[l+4>>2],er(n,s,r),h=o}function Yn(e){return e=e|0,(t[(E()|0)+24>>2]|0)+(e*12|0)|0}function er(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0;l=h,h=h+16|0,s=l,o=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(o=t[(t[e>>2]|0)+o>>2]|0),ts(s,r),s=ns(s,r)|0,Bl[o&31](e,s),h=l}function vo(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0,d=0,_=0;o=h,h=h+16|0,s=o+8|0,l=o,_=t[r>>2]|0,d=t[r+4>>2]|0,r=Zn(n)|0,t[l>>2]=_,t[l+4>>2]=d,t[s>>2]=t[l>>2],t[s+4>>2]=t[l+4>>2],Pi(e,r,s,0),h=o}function Pi(e,n,r,o){e=e|0,n=n|0,r=r|0,o=o|0;var s=0,l=0,d=0,_=0,y=0,k=0,T=0;s=h,h=h+32|0,l=s+16|0,T=s+8|0,_=s,k=t[r>>2]|0,y=t[r+4>>2]|0,d=t[e>>2]|0,e=Mi()|0,t[T>>2]=k,t[T+4>>2]=y,t[l>>2]=t[T>>2],t[l+4>>2]=t[T+4>>2],r=f0(l)|0,t[_>>2]=k,t[_+4>>2]=y,t[l>>2]=t[_>>2],t[l+4>>2]=t[_+4>>2],ur(d,n,e,r,Jo(l,o)|0,o),h=s}function Mi(){var e=0,n=0;if(c[7784]|0||(kw(9864),Bt(42,9864,Q|0)|0,n=7784,t[n>>2]=1,t[n+4>>2]=0),!(Dn(9864)|0)){e=9864,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));kw(9864)}return 9864}function f0(e){return e=e|0,0}function Jo(e,n){e=e|0,n=n|0;var r=0,o=0,s=0,l=0,d=0,_=0,y=0,k=0,T=0,P=0;return T=h,h=h+32|0,s=T+24|0,d=T+16|0,_=T,y=T+8|0,l=t[e>>2]|0,o=t[e+4>>2]|0,t[_>>2]=l,t[_+4>>2]=o,P=Mi()|0,k=P+24|0,e=Lt(n,4)|0,t[y>>2]=e,n=P+28|0,r=t[n>>2]|0,r>>>0<(t[P+32>>2]|0)>>>0?(t[d>>2]=l,t[d+4>>2]=o,t[s>>2]=t[d>>2],t[s+4>>2]=t[d+4>>2],Su(r,s,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(Zp(k,_,y),e=t[n>>2]|0),h=T,((e-(t[k>>2]|0)|0)/12|0)+-1|0}function Su(e,n,r){e=e|0,n=n|0,r=r|0;var o=0;o=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=o,t[e+8>>2]=r}function Zp(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0,d=0,_=0,y=0,k=0,T=0,P=0,q=0;if(k=h,h=h+48|0,o=k+32|0,d=k+24|0,_=k,y=e+4|0,s=(((t[y>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,l=v9(e)|0,l>>>0>>0)$n(e);else{T=t[e>>2]|0,q=((t[e+8>>2]|0)-T|0)/12|0,P=q<<1,g9(_,q>>>0>>1>>>0?P>>>0>>0?s:P:l,((t[y>>2]|0)-T|0)/12|0,e+8|0),y=_+8|0,l=t[y>>2]|0,s=t[n+4>>2]|0,r=t[r>>2]|0,t[d>>2]=t[n>>2],t[d+4>>2]=s,t[o>>2]=t[d>>2],t[o+4>>2]=t[d+4>>2],Su(l,o,r),t[y>>2]=(t[y>>2]|0)+12,_9(e,_),y9(_),h=k;return}}function v9(e){return e=e|0,357913941}function g9(e,n,r,o){e=e|0,n=n|0,r=r|0,o=o|0;var s=0;t[e+12>>2]=0,t[e+16>>2]=o;do if(n)if(n>>>0>357913941)_n();else{s=Tt(n*12|0)|0;break}else s=0;while(0);t[e>>2]=s,o=s+(r*12|0)|0,t[e+8>>2]=o,t[e+4>>2]=o,t[e+12>>2]=s+(n*12|0)}function _9(e,n){e=e|0,n=n|0;var r=0,o=0,s=0,l=0,d=0;o=t[e>>2]|0,d=e+4|0,l=n+4|0,s=(t[d>>2]|0)-o|0,r=(t[l>>2]|0)+(((s|0)/-12|0)*12|0)|0,t[l>>2]=r,(s|0)>0?(vn(r|0,o|0,s|0)|0,o=l,r=t[l>>2]|0):o=l,l=t[e>>2]|0,t[e>>2]=r,t[o>>2]=l,l=n+8|0,s=t[d>>2]|0,t[d>>2]=t[l>>2],t[l>>2]=s,l=e+8|0,d=n+12|0,e=t[l>>2]|0,t[l>>2]=t[d>>2],t[d>>2]=e,t[n>>2]=t[o>>2]}function y9(e){e=e|0;var n=0,r=0,o=0;n=t[e+4>>2]|0,r=e+8|0,o=t[r>>2]|0,(o|0)!=(n|0)&&(t[r>>2]=o+(~(((o+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&Ve(e)}function kw(e){e=e|0,E9(e)}function w9(e){e=e|0,D9(e+24|0)}function D9(e){e=e|0;var n=0,r=0,o=0;r=t[e>>2]|0,o=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-o|0)>>>0)/12|0)*12|0)),Ve(r))}function E9(e){e=e|0;var n=0;n=An()|0,Nn(e,2,8,n,S9()|0,1),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function S9(){return 1320}function C9(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0,d=0;o=h,h=h+16|0,s=o+8|0,l=o,d=T9(e)|0,e=t[d+4>>2]|0,t[l>>2]=t[d>>2],t[l+4>>2]=e,t[s>>2]=t[l>>2],t[s+4>>2]=t[l+4>>2],x9(n,s,r),h=o}function T9(e){return e=e|0,(t[(Mi()|0)+24>>2]|0)+(e*12|0)|0}function x9(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0;l=h,h=h+16|0,s=l,o=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(o=t[(t[e>>2]|0)+o>>2]|0),k9(s,r),s=A9(s,r)|0,Bl[o&31](e,s),h=l}function k9(e,n){e=e|0,n=n|0}function A9(e,n){return e=e|0,n=n|0,O9(n)|0}function O9(e){return e=e|0,e|0}function I9(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0,d=0,_=0;o=h,h=h+16|0,s=o+8|0,l=o,_=t[r>>2]|0,d=t[r+4>>2]|0,r=Zn(n)|0,t[l>>2]=_,t[l+4>>2]=d,t[s>>2]=t[l>>2],t[s+4>>2]=t[l+4>>2],P9(e,r,s,0),h=o}function P9(e,n,r,o){e=e|0,n=n|0,r=r|0,o=o|0;var s=0,l=0,d=0,_=0,y=0,k=0,T=0;s=h,h=h+32|0,l=s+16|0,T=s+8|0,_=s,k=t[r>>2]|0,y=t[r+4>>2]|0,d=t[e>>2]|0,e=_4()|0,t[T>>2]=k,t[T+4>>2]=y,t[l>>2]=t[T>>2],t[l+4>>2]=t[T+4>>2],r=M9(l)|0,t[_>>2]=k,t[_+4>>2]=y,t[l>>2]=t[_>>2],t[l+4>>2]=t[_+4>>2],ur(d,n,e,r,F9(l,o)|0,o),h=s}function _4(){var e=0,n=0;if(c[7792]|0||(Ow(9900),Bt(43,9900,Q|0)|0,n=7792,t[n>>2]=1,t[n+4>>2]=0),!(Dn(9900)|0)){e=9900,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));Ow(9900)}return 9900}function M9(e){return e=e|0,0}function F9(e,n){e=e|0,n=n|0;var r=0,o=0,s=0,l=0,d=0,_=0,y=0,k=0,T=0,P=0;return T=h,h=h+32|0,s=T+24|0,d=T+16|0,_=T,y=T+8|0,l=t[e>>2]|0,o=t[e+4>>2]|0,t[_>>2]=l,t[_+4>>2]=o,P=_4()|0,k=P+24|0,e=Lt(n,4)|0,t[y>>2]=e,n=P+28|0,r=t[n>>2]|0,r>>>0<(t[P+32>>2]|0)>>>0?(t[d>>2]=l,t[d+4>>2]=o,t[s>>2]=t[d>>2],t[s+4>>2]=t[d+4>>2],Aw(r,s,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(L9(k,_,y),e=t[n>>2]|0),h=T,((e-(t[k>>2]|0)|0)/12|0)+-1|0}function Aw(e,n,r){e=e|0,n=n|0,r=r|0;var o=0;o=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=o,t[e+8>>2]=r}function L9(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0,d=0,_=0,y=0,k=0,T=0,P=0,q=0;if(k=h,h=h+48|0,o=k+32|0,d=k+24|0,_=k,y=e+4|0,s=(((t[y>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,l=R9(e)|0,l>>>0>>0)$n(e);else{T=t[e>>2]|0,q=((t[e+8>>2]|0)-T|0)/12|0,P=q<<1,N9(_,q>>>0>>1>>>0?P>>>0>>0?s:P:l,((t[y>>2]|0)-T|0)/12|0,e+8|0),y=_+8|0,l=t[y>>2]|0,s=t[n+4>>2]|0,r=t[r>>2]|0,t[d>>2]=t[n>>2],t[d+4>>2]=s,t[o>>2]=t[d>>2],t[o+4>>2]=t[d+4>>2],Aw(l,o,r),t[y>>2]=(t[y>>2]|0)+12,B9(e,_),j9(_),h=k;return}}function R9(e){return e=e|0,357913941}function N9(e,n,r,o){e=e|0,n=n|0,r=r|0,o=o|0;var s=0;t[e+12>>2]=0,t[e+16>>2]=o;do if(n)if(n>>>0>357913941)_n();else{s=Tt(n*12|0)|0;break}else s=0;while(0);t[e>>2]=s,o=s+(r*12|0)|0,t[e+8>>2]=o,t[e+4>>2]=o,t[e+12>>2]=s+(n*12|0)}function B9(e,n){e=e|0,n=n|0;var r=0,o=0,s=0,l=0,d=0;o=t[e>>2]|0,d=e+4|0,l=n+4|0,s=(t[d>>2]|0)-o|0,r=(t[l>>2]|0)+(((s|0)/-12|0)*12|0)|0,t[l>>2]=r,(s|0)>0?(vn(r|0,o|0,s|0)|0,o=l,r=t[l>>2]|0):o=l,l=t[e>>2]|0,t[e>>2]=r,t[o>>2]=l,l=n+8|0,s=t[d>>2]|0,t[d>>2]=t[l>>2],t[l>>2]=s,l=e+8|0,d=n+12|0,e=t[l>>2]|0,t[l>>2]=t[d>>2],t[d>>2]=e,t[n>>2]=t[o>>2]}function j9(e){e=e|0;var n=0,r=0,o=0;n=t[e+4>>2]|0,r=e+8|0,o=t[r>>2]|0,(o|0)!=(n|0)&&(t[r>>2]=o+(~(((o+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&Ve(e)}function Ow(e){e=e|0,z9(e)}function U9(e){e=e|0,q9(e+24|0)}function q9(e){e=e|0;var n=0,r=0,o=0;r=t[e>>2]|0,o=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-o|0)>>>0)/12|0)*12|0)),Ve(r))}function z9(e){e=e|0;var n=0;n=An()|0,Nn(e,2,22,n,W9()|0,0),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function W9(){return 1344}function H9(e,n){e=e|0,n=n|0;var r=0,o=0,s=0,l=0;r=h,h=h+16|0,o=r+8|0,s=r,l=b9(e)|0,e=t[l+4>>2]|0,t[s>>2]=t[l>>2],t[s+4>>2]=e,t[o>>2]=t[s>>2],t[o+4>>2]=t[s+4>>2],G9(n,o),h=r}function b9(e){return e=e|0,(t[(_4()|0)+24>>2]|0)+(e*12|0)|0}function G9(e,n){e=e|0,n=n|0;var r=0;r=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(r=t[(t[e>>2]|0)+r>>2]|0),Nl[r&127](e)}function V9(e,n,r,o){e=e|0,n=n|0,r=r|0,o=o|0;var s=0,l=0;l=t[e>>2]|0,s=y4()|0,e=Y9(r)|0,ur(l,n,s,e,$9(r,o)|0,o)}function y4(){var e=0,n=0;if(c[7800]|0||(Pw(9936),Bt(44,9936,Q|0)|0,n=7800,t[n>>2]=1,t[n+4>>2]=0),!(Dn(9936)|0)){e=9936,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));Pw(9936)}return 9936}function Y9(e){return e=e|0,e|0}function $9(e,n){e=e|0,n=n|0;var r=0,o=0,s=0,l=0,d=0,_=0,y=0;return _=h,h=h+16|0,s=_,l=_+4|0,t[s>>2]=e,y=y4()|0,d=y+24|0,n=Lt(n,4)|0,t[l>>2]=n,r=y+28|0,o=t[r>>2]|0,o>>>0<(t[y+32>>2]|0)>>>0?(Iw(o,e,n),n=(t[r>>2]|0)+8|0,t[r>>2]=n):(K9(d,s,l),n=t[r>>2]|0),h=_,(n-(t[d>>2]|0)>>3)+-1|0}function Iw(e,n,r){e=e|0,n=n|0,r=r|0,t[e>>2]=n,t[e+4>>2]=r}function K9(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0,d=0,_=0,y=0,k=0,T=0;if(_=h,h=h+32|0,s=_,l=e+4|0,d=((t[l>>2]|0)-(t[e>>2]|0)>>3)+1|0,o=X9(e)|0,o>>>0>>0)$n(e);else{y=t[e>>2]|0,T=(t[e+8>>2]|0)-y|0,k=T>>2,J9(s,T>>3>>>0>>1>>>0?k>>>0>>0?d:k:o,(t[l>>2]|0)-y>>3,e+8|0),d=s+8|0,Iw(t[d>>2]|0,t[n>>2]|0,t[r>>2]|0),t[d>>2]=(t[d>>2]|0)+8,Q9(e,s),Z9(s),h=_;return}}function X9(e){return e=e|0,536870911}function J9(e,n,r,o){e=e|0,n=n|0,r=r|0,o=o|0;var s=0;t[e+12>>2]=0,t[e+16>>2]=o;do if(n)if(n>>>0>536870911)_n();else{s=Tt(n<<3)|0;break}else s=0;while(0);t[e>>2]=s,o=s+(r<<3)|0,t[e+8>>2]=o,t[e+4>>2]=o,t[e+12>>2]=s+(n<<3)}function Q9(e,n){e=e|0,n=n|0;var r=0,o=0,s=0,l=0,d=0;o=t[e>>2]|0,d=e+4|0,l=n+4|0,s=(t[d>>2]|0)-o|0,r=(t[l>>2]|0)+(0-(s>>3)<<3)|0,t[l>>2]=r,(s|0)>0?(vn(r|0,o|0,s|0)|0,o=l,r=t[l>>2]|0):o=l,l=t[e>>2]|0,t[e>>2]=r,t[o>>2]=l,l=n+8|0,s=t[d>>2]|0,t[d>>2]=t[l>>2],t[l>>2]=s,l=e+8|0,d=n+12|0,e=t[l>>2]|0,t[l>>2]=t[d>>2],t[d>>2]=e,t[n>>2]=t[o>>2]}function Z9(e){e=e|0;var n=0,r=0,o=0;n=t[e+4>>2]|0,r=e+8|0,o=t[r>>2]|0,(o|0)!=(n|0)&&(t[r>>2]=o+(~((o+-8-n|0)>>>3)<<3)),e=t[e>>2]|0,e|0&&Ve(e)}function Pw(e){e=e|0,nx(e)}function ex(e){e=e|0,tx(e+24|0)}function tx(e){e=e|0;var n=0,r=0,o=0;r=t[e>>2]|0,o=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-8-o|0)>>>3)<<3)),Ve(r))}function nx(e){e=e|0;var n=0;n=An()|0,Nn(e,1,23,n,Mo()|0,1),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function rx(e,n){e=e|0,n=n|0,ox(t[(ix(e)|0)>>2]|0,n)}function ix(e){return e=e|0,(t[(y4()|0)+24>>2]|0)+(e<<3)|0}function ox(e,n){e=e|0,n=n|0;var r=0,o=0;r=h,h=h+16|0,o=r,On(o,n),n=x1(o,n)|0,Nl[e&127](n),h=r}function ux(e,n,r,o){e=e|0,n=n|0,r=r|0,o=o|0;var s=0,l=0;l=t[e>>2]|0,s=w4()|0,e=sx(r)|0,ur(l,n,s,e,lx(r,o)|0,o)}function w4(){var e=0,n=0;if(c[7808]|0||(Fw(9972),Bt(45,9972,Q|0)|0,n=7808,t[n>>2]=1,t[n+4>>2]=0),!(Dn(9972)|0)){e=9972,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));Fw(9972)}return 9972}function sx(e){return e=e|0,e|0}function lx(e,n){e=e|0,n=n|0;var r=0,o=0,s=0,l=0,d=0,_=0,y=0;return _=h,h=h+16|0,s=_,l=_+4|0,t[s>>2]=e,y=w4()|0,d=y+24|0,n=Lt(n,4)|0,t[l>>2]=n,r=y+28|0,o=t[r>>2]|0,o>>>0<(t[y+32>>2]|0)>>>0?(Mw(o,e,n),n=(t[r>>2]|0)+8|0,t[r>>2]=n):(fx(d,s,l),n=t[r>>2]|0),h=_,(n-(t[d>>2]|0)>>3)+-1|0}function Mw(e,n,r){e=e|0,n=n|0,r=r|0,t[e>>2]=n,t[e+4>>2]=r}function fx(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0,d=0,_=0,y=0,k=0,T=0;if(_=h,h=h+32|0,s=_,l=e+4|0,d=((t[l>>2]|0)-(t[e>>2]|0)>>3)+1|0,o=cx(e)|0,o>>>0>>0)$n(e);else{y=t[e>>2]|0,T=(t[e+8>>2]|0)-y|0,k=T>>2,ax(s,T>>3>>>0>>1>>>0?k>>>0>>0?d:k:o,(t[l>>2]|0)-y>>3,e+8|0),d=s+8|0,Mw(t[d>>2]|0,t[n>>2]|0,t[r>>2]|0),t[d>>2]=(t[d>>2]|0)+8,dx(e,s),px(s),h=_;return}}function cx(e){return e=e|0,536870911}function ax(e,n,r,o){e=e|0,n=n|0,r=r|0,o=o|0;var s=0;t[e+12>>2]=0,t[e+16>>2]=o;do if(n)if(n>>>0>536870911)_n();else{s=Tt(n<<3)|0;break}else s=0;while(0);t[e>>2]=s,o=s+(r<<3)|0,t[e+8>>2]=o,t[e+4>>2]=o,t[e+12>>2]=s+(n<<3)}function dx(e,n){e=e|0,n=n|0;var r=0,o=0,s=0,l=0,d=0;o=t[e>>2]|0,d=e+4|0,l=n+4|0,s=(t[d>>2]|0)-o|0,r=(t[l>>2]|0)+(0-(s>>3)<<3)|0,t[l>>2]=r,(s|0)>0?(vn(r|0,o|0,s|0)|0,o=l,r=t[l>>2]|0):o=l,l=t[e>>2]|0,t[e>>2]=r,t[o>>2]=l,l=n+8|0,s=t[d>>2]|0,t[d>>2]=t[l>>2],t[l>>2]=s,l=e+8|0,d=n+12|0,e=t[l>>2]|0,t[l>>2]=t[d>>2],t[d>>2]=e,t[n>>2]=t[o>>2]}function px(e){e=e|0;var n=0,r=0,o=0;n=t[e+4>>2]|0,r=e+8|0,o=t[r>>2]|0,(o|0)!=(n|0)&&(t[r>>2]=o+(~((o+-8-n|0)>>>3)<<3)),e=t[e>>2]|0,e|0&&Ve(e)}function Fw(e){e=e|0,vx(e)}function hx(e){e=e|0,mx(e+24|0)}function mx(e){e=e|0;var n=0,r=0,o=0;r=t[e>>2]|0,o=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-8-o|0)>>>3)<<3)),Ve(r))}function vx(e){e=e|0;var n=0;n=An()|0,Nn(e,1,9,n,gx()|0,1),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function gx(){return 1348}function _x(e,n){return e=e|0,n=n|0,wx(t[(yx(e)|0)>>2]|0,n)|0}function yx(e){return e=e|0,(t[(w4()|0)+24>>2]|0)+(e<<3)|0}function wx(e,n){e=e|0,n=n|0;var r=0,o=0;return r=h,h=h+16|0,o=r,Lw(o,n),n=Rw(o,n)|0,n=Xc(dc[e&31](n)|0)|0,h=r,n|0}function Lw(e,n){e=e|0,n=n|0}function Rw(e,n){return e=e|0,n=n|0,Dx(n)|0}function Dx(e){return e=e|0,e|0}function Ex(e,n,r,o){e=e|0,n=n|0,r=r|0,o=o|0;var s=0,l=0;l=t[e>>2]|0,s=D4()|0,e=Sx(r)|0,ur(l,n,s,e,Cx(r,o)|0,o)}function D4(){var e=0,n=0;if(c[7816]|0||(Bw(10008),Bt(46,10008,Q|0)|0,n=7816,t[n>>2]=1,t[n+4>>2]=0),!(Dn(10008)|0)){e=10008,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));Bw(10008)}return 10008}function Sx(e){return e=e|0,e|0}function Cx(e,n){e=e|0,n=n|0;var r=0,o=0,s=0,l=0,d=0,_=0,y=0;return _=h,h=h+16|0,s=_,l=_+4|0,t[s>>2]=e,y=D4()|0,d=y+24|0,n=Lt(n,4)|0,t[l>>2]=n,r=y+28|0,o=t[r>>2]|0,o>>>0<(t[y+32>>2]|0)>>>0?(Nw(o,e,n),n=(t[r>>2]|0)+8|0,t[r>>2]=n):(Tx(d,s,l),n=t[r>>2]|0),h=_,(n-(t[d>>2]|0)>>3)+-1|0}function Nw(e,n,r){e=e|0,n=n|0,r=r|0,t[e>>2]=n,t[e+4>>2]=r}function Tx(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0,d=0,_=0,y=0,k=0,T=0;if(_=h,h=h+32|0,s=_,l=e+4|0,d=((t[l>>2]|0)-(t[e>>2]|0)>>3)+1|0,o=xx(e)|0,o>>>0>>0)$n(e);else{y=t[e>>2]|0,T=(t[e+8>>2]|0)-y|0,k=T>>2,kx(s,T>>3>>>0>>1>>>0?k>>>0>>0?d:k:o,(t[l>>2]|0)-y>>3,e+8|0),d=s+8|0,Nw(t[d>>2]|0,t[n>>2]|0,t[r>>2]|0),t[d>>2]=(t[d>>2]|0)+8,Ax(e,s),Ox(s),h=_;return}}function xx(e){return e=e|0,536870911}function kx(e,n,r,o){e=e|0,n=n|0,r=r|0,o=o|0;var s=0;t[e+12>>2]=0,t[e+16>>2]=o;do if(n)if(n>>>0>536870911)_n();else{s=Tt(n<<3)|0;break}else s=0;while(0);t[e>>2]=s,o=s+(r<<3)|0,t[e+8>>2]=o,t[e+4>>2]=o,t[e+12>>2]=s+(n<<3)}function Ax(e,n){e=e|0,n=n|0;var r=0,o=0,s=0,l=0,d=0;o=t[e>>2]|0,d=e+4|0,l=n+4|0,s=(t[d>>2]|0)-o|0,r=(t[l>>2]|0)+(0-(s>>3)<<3)|0,t[l>>2]=r,(s|0)>0?(vn(r|0,o|0,s|0)|0,o=l,r=t[l>>2]|0):o=l,l=t[e>>2]|0,t[e>>2]=r,t[o>>2]=l,l=n+8|0,s=t[d>>2]|0,t[d>>2]=t[l>>2],t[l>>2]=s,l=e+8|0,d=n+12|0,e=t[l>>2]|0,t[l>>2]=t[d>>2],t[d>>2]=e,t[n>>2]=t[o>>2]}function Ox(e){e=e|0;var n=0,r=0,o=0;n=t[e+4>>2]|0,r=e+8|0,o=t[r>>2]|0,(o|0)!=(n|0)&&(t[r>>2]=o+(~((o+-8-n|0)>>>3)<<3)),e=t[e>>2]|0,e|0&&Ve(e)}function Bw(e){e=e|0,Mx(e)}function Ix(e){e=e|0,Px(e+24|0)}function Px(e){e=e|0;var n=0,r=0,o=0;r=t[e>>2]|0,o=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-8-o|0)>>>3)<<3)),Ve(r))}function Mx(e){e=e|0;var n=0;n=An()|0,Nn(e,1,15,n,mp()|0,0),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function Fx(e){return e=e|0,Rx(t[(Lx(e)|0)>>2]|0)|0}function Lx(e){return e=e|0,(t[(D4()|0)+24>>2]|0)+(e<<3)|0}function Rx(e){return e=e|0,Xc(ph[e&7]()|0)|0}function Nx(){var e=0;return c[7832]|0||(bx(10052),Bt(25,10052,Q|0)|0,e=7832,t[e>>2]=1,t[e+4>>2]=0),10052}function Bx(e,n){e=e|0,n=n|0,t[e>>2]=jx()|0,t[e+4>>2]=Ux()|0,t[e+12>>2]=n,t[e+8>>2]=qx()|0,t[e+32>>2]=2}function jx(){return 11709}function Ux(){return 1188}function qx(){return eh()|0}function zx(e,n,r,o){e=e|0,n=n|0,r=r|0,o=o|0,(Sf(o,896)|0)==512?r|0&&(Wx(r),Ve(r)):n|0&&(mu(n),Ve(n))}function Sf(e,n){return e=e|0,n=n|0,n&e|0}function Wx(e){e=e|0,e=t[e+4>>2]|0,e|0&&Tf(e)}function eh(){var e=0;return c[7824]|0||(t[2511]=Hx()|0,t[2512]=0,e=7824,t[e>>2]=1,t[e+4>>2]=0),10044}function Hx(){return 0}function bx(e){e=e|0,Ys(e)}function Gx(e){e=e|0;var n=0,r=0,o=0,s=0,l=0;n=h,h=h+32|0,r=n+24|0,l=n+16|0,s=n+8|0,o=n,Vx(e,4827),Yx(e,4834,3)|0,$x(e,3682,47)|0,t[l>>2]=9,t[l+4>>2]=0,t[r>>2]=t[l>>2],t[r+4>>2]=t[l+4>>2],Kx(e,4841,r)|0,t[s>>2]=1,t[s+4>>2]=0,t[r>>2]=t[s>>2],t[r+4>>2]=t[s+4>>2],Xx(e,4871,r)|0,t[o>>2]=10,t[o+4>>2]=0,t[r>>2]=t[o>>2],t[r+4>>2]=t[o+4>>2],Jx(e,4891,r)|0,h=n}function Vx(e,n){e=e|0,n=n|0;var r=0;r=Ok()|0,t[e>>2]=r,Ik(r,n),Cf(t[e>>2]|0)}function Yx(e,n,r){return e=e|0,n=n|0,r=r|0,pk(e,Zn(n)|0,r,0),e|0}function $x(e,n,r){return e=e|0,n=n|0,r=r|0,Q7(e,Zn(n)|0,r,0),e|0}function Kx(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0,d=0;return o=h,h=h+16|0,s=o+8|0,l=o,d=t[r+4>>2]|0,t[l>>2]=t[r>>2],t[l+4>>2]=d,t[s>>2]=t[l>>2],t[s+4>>2]=t[l+4>>2],F7(e,n,s),h=o,e|0}function Xx(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0,d=0;return o=h,h=h+16|0,s=o+8|0,l=o,d=t[r+4>>2]|0,t[l>>2]=t[r>>2],t[l+4>>2]=d,t[s>>2]=t[l>>2],t[s+4>>2]=t[l+4>>2],h7(e,n,s),h=o,e|0}function Jx(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0,d=0;return o=h,h=h+16|0,s=o+8|0,l=o,d=t[r+4>>2]|0,t[l>>2]=t[r>>2],t[l+4>>2]=d,t[s>>2]=t[l>>2],t[s+4>>2]=t[l+4>>2],Qx(e,n,s),h=o,e|0}function Qx(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0,d=0,_=0;o=h,h=h+16|0,s=o+8|0,l=o,_=t[r>>2]|0,d=t[r+4>>2]|0,r=Zn(n)|0,t[l>>2]=_,t[l+4>>2]=d,t[s>>2]=t[l>>2],t[s+4>>2]=t[l+4>>2],Zx(e,r,s,1),h=o}function Zx(e,n,r,o){e=e|0,n=n|0,r=r|0,o=o|0;var s=0,l=0,d=0,_=0,y=0,k=0,T=0;s=h,h=h+32|0,l=s+16|0,T=s+8|0,_=s,k=t[r>>2]|0,y=t[r+4>>2]|0,d=t[e>>2]|0,e=E4()|0,t[T>>2]=k,t[T+4>>2]=y,t[l>>2]=t[T>>2],t[l+4>>2]=t[T+4>>2],r=e7(l)|0,t[_>>2]=k,t[_+4>>2]=y,t[l>>2]=t[_>>2],t[l+4>>2]=t[_+4>>2],ur(d,n,e,r,t7(l,o)|0,o),h=s}function E4(){var e=0,n=0;if(c[7840]|0||(Uw(10100),Bt(48,10100,Q|0)|0,n=7840,t[n>>2]=1,t[n+4>>2]=0),!(Dn(10100)|0)){e=10100,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));Uw(10100)}return 10100}function e7(e){return e=e|0,0}function t7(e,n){e=e|0,n=n|0;var r=0,o=0,s=0,l=0,d=0,_=0,y=0,k=0,T=0,P=0;return T=h,h=h+32|0,s=T+24|0,d=T+16|0,_=T,y=T+8|0,l=t[e>>2]|0,o=t[e+4>>2]|0,t[_>>2]=l,t[_+4>>2]=o,P=E4()|0,k=P+24|0,e=Lt(n,4)|0,t[y>>2]=e,n=P+28|0,r=t[n>>2]|0,r>>>0<(t[P+32>>2]|0)>>>0?(t[d>>2]=l,t[d+4>>2]=o,t[s>>2]=t[d>>2],t[s+4>>2]=t[d+4>>2],jw(r,s,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(n7(k,_,y),e=t[n>>2]|0),h=T,((e-(t[k>>2]|0)|0)/12|0)+-1|0}function jw(e,n,r){e=e|0,n=n|0,r=r|0;var o=0;o=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=o,t[e+8>>2]=r}function n7(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0,d=0,_=0,y=0,k=0,T=0,P=0,q=0;if(k=h,h=h+48|0,o=k+32|0,d=k+24|0,_=k,y=e+4|0,s=(((t[y>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,l=r7(e)|0,l>>>0>>0)$n(e);else{T=t[e>>2]|0,q=((t[e+8>>2]|0)-T|0)/12|0,P=q<<1,i7(_,q>>>0>>1>>>0?P>>>0>>0?s:P:l,((t[y>>2]|0)-T|0)/12|0,e+8|0),y=_+8|0,l=t[y>>2]|0,s=t[n+4>>2]|0,r=t[r>>2]|0,t[d>>2]=t[n>>2],t[d+4>>2]=s,t[o>>2]=t[d>>2],t[o+4>>2]=t[d+4>>2],jw(l,o,r),t[y>>2]=(t[y>>2]|0)+12,o7(e,_),u7(_),h=k;return}}function r7(e){return e=e|0,357913941}function i7(e,n,r,o){e=e|0,n=n|0,r=r|0,o=o|0;var s=0;t[e+12>>2]=0,t[e+16>>2]=o;do if(n)if(n>>>0>357913941)_n();else{s=Tt(n*12|0)|0;break}else s=0;while(0);t[e>>2]=s,o=s+(r*12|0)|0,t[e+8>>2]=o,t[e+4>>2]=o,t[e+12>>2]=s+(n*12|0)}function o7(e,n){e=e|0,n=n|0;var r=0,o=0,s=0,l=0,d=0;o=t[e>>2]|0,d=e+4|0,l=n+4|0,s=(t[d>>2]|0)-o|0,r=(t[l>>2]|0)+(((s|0)/-12|0)*12|0)|0,t[l>>2]=r,(s|0)>0?(vn(r|0,o|0,s|0)|0,o=l,r=t[l>>2]|0):o=l,l=t[e>>2]|0,t[e>>2]=r,t[o>>2]=l,l=n+8|0,s=t[d>>2]|0,t[d>>2]=t[l>>2],t[l>>2]=s,l=e+8|0,d=n+12|0,e=t[l>>2]|0,t[l>>2]=t[d>>2],t[d>>2]=e,t[n>>2]=t[o>>2]}function u7(e){e=e|0;var n=0,r=0,o=0;n=t[e+4>>2]|0,r=e+8|0,o=t[r>>2]|0,(o|0)!=(n|0)&&(t[r>>2]=o+(~(((o+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&Ve(e)}function Uw(e){e=e|0,f7(e)}function s7(e){e=e|0,l7(e+24|0)}function l7(e){e=e|0;var n=0,r=0,o=0;r=t[e>>2]|0,o=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-o|0)>>>0)/12|0)*12|0)),Ve(r))}function f7(e){e=e|0;var n=0;n=An()|0,Nn(e,2,6,n,c7()|0,1),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function c7(){return 1364}function a7(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0,d=0;return o=h,h=h+16|0,s=o+8|0,l=o,d=d7(e)|0,e=t[d+4>>2]|0,t[l>>2]=t[d>>2],t[l+4>>2]=e,t[s>>2]=t[l>>2],t[s+4>>2]=t[l+4>>2],r=p7(n,s,r)|0,h=o,r|0}function d7(e){return e=e|0,(t[(E4()|0)+24>>2]|0)+(e*12|0)|0}function p7(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0;return l=h,h=h+16|0,s=l,o=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(o=t[(t[e>>2]|0)+o>>2]|0),ts(s,r),s=ns(s,r)|0,s=ip(J4[o&15](e,s)|0)|0,h=l,s|0}function h7(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0,d=0,_=0;o=h,h=h+16|0,s=o+8|0,l=o,_=t[r>>2]|0,d=t[r+4>>2]|0,r=Zn(n)|0,t[l>>2]=_,t[l+4>>2]=d,t[s>>2]=t[l>>2],t[s+4>>2]=t[l+4>>2],m7(e,r,s,0),h=o}function m7(e,n,r,o){e=e|0,n=n|0,r=r|0,o=o|0;var s=0,l=0,d=0,_=0,y=0,k=0,T=0;s=h,h=h+32|0,l=s+16|0,T=s+8|0,_=s,k=t[r>>2]|0,y=t[r+4>>2]|0,d=t[e>>2]|0,e=S4()|0,t[T>>2]=k,t[T+4>>2]=y,t[l>>2]=t[T>>2],t[l+4>>2]=t[T+4>>2],r=v7(l)|0,t[_>>2]=k,t[_+4>>2]=y,t[l>>2]=t[_>>2],t[l+4>>2]=t[_+4>>2],ur(d,n,e,r,g7(l,o)|0,o),h=s}function S4(){var e=0,n=0;if(c[7848]|0||(zw(10136),Bt(49,10136,Q|0)|0,n=7848,t[n>>2]=1,t[n+4>>2]=0),!(Dn(10136)|0)){e=10136,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));zw(10136)}return 10136}function v7(e){return e=e|0,0}function g7(e,n){e=e|0,n=n|0;var r=0,o=0,s=0,l=0,d=0,_=0,y=0,k=0,T=0,P=0;return T=h,h=h+32|0,s=T+24|0,d=T+16|0,_=T,y=T+8|0,l=t[e>>2]|0,o=t[e+4>>2]|0,t[_>>2]=l,t[_+4>>2]=o,P=S4()|0,k=P+24|0,e=Lt(n,4)|0,t[y>>2]=e,n=P+28|0,r=t[n>>2]|0,r>>>0<(t[P+32>>2]|0)>>>0?(t[d>>2]=l,t[d+4>>2]=o,t[s>>2]=t[d>>2],t[s+4>>2]=t[d+4>>2],qw(r,s,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(_7(k,_,y),e=t[n>>2]|0),h=T,((e-(t[k>>2]|0)|0)/12|0)+-1|0}function qw(e,n,r){e=e|0,n=n|0,r=r|0;var o=0;o=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=o,t[e+8>>2]=r}function _7(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0,d=0,_=0,y=0,k=0,T=0,P=0,q=0;if(k=h,h=h+48|0,o=k+32|0,d=k+24|0,_=k,y=e+4|0,s=(((t[y>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,l=y7(e)|0,l>>>0>>0)$n(e);else{T=t[e>>2]|0,q=((t[e+8>>2]|0)-T|0)/12|0,P=q<<1,w7(_,q>>>0>>1>>>0?P>>>0>>0?s:P:l,((t[y>>2]|0)-T|0)/12|0,e+8|0),y=_+8|0,l=t[y>>2]|0,s=t[n+4>>2]|0,r=t[r>>2]|0,t[d>>2]=t[n>>2],t[d+4>>2]=s,t[o>>2]=t[d>>2],t[o+4>>2]=t[d+4>>2],qw(l,o,r),t[y>>2]=(t[y>>2]|0)+12,D7(e,_),E7(_),h=k;return}}function y7(e){return e=e|0,357913941}function w7(e,n,r,o){e=e|0,n=n|0,r=r|0,o=o|0;var s=0;t[e+12>>2]=0,t[e+16>>2]=o;do if(n)if(n>>>0>357913941)_n();else{s=Tt(n*12|0)|0;break}else s=0;while(0);t[e>>2]=s,o=s+(r*12|0)|0,t[e+8>>2]=o,t[e+4>>2]=o,t[e+12>>2]=s+(n*12|0)}function D7(e,n){e=e|0,n=n|0;var r=0,o=0,s=0,l=0,d=0;o=t[e>>2]|0,d=e+4|0,l=n+4|0,s=(t[d>>2]|0)-o|0,r=(t[l>>2]|0)+(((s|0)/-12|0)*12|0)|0,t[l>>2]=r,(s|0)>0?(vn(r|0,o|0,s|0)|0,o=l,r=t[l>>2]|0):o=l,l=t[e>>2]|0,t[e>>2]=r,t[o>>2]=l,l=n+8|0,s=t[d>>2]|0,t[d>>2]=t[l>>2],t[l>>2]=s,l=e+8|0,d=n+12|0,e=t[l>>2]|0,t[l>>2]=t[d>>2],t[d>>2]=e,t[n>>2]=t[o>>2]}function E7(e){e=e|0;var n=0,r=0,o=0;n=t[e+4>>2]|0,r=e+8|0,o=t[r>>2]|0,(o|0)!=(n|0)&&(t[r>>2]=o+(~(((o+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&Ve(e)}function zw(e){e=e|0,T7(e)}function S7(e){e=e|0,C7(e+24|0)}function C7(e){e=e|0;var n=0,r=0,o=0;r=t[e>>2]|0,o=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-o|0)>>>0)/12|0)*12|0)),Ve(r))}function T7(e){e=e|0;var n=0;n=An()|0,Nn(e,2,9,n,x7()|0,1),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function x7(){return 1372}function k7(e,n,r){e=e|0,n=n|0,r=+r;var o=0,s=0,l=0,d=0;o=h,h=h+16|0,s=o+8|0,l=o,d=A7(e)|0,e=t[d+4>>2]|0,t[l>>2]=t[d>>2],t[l+4>>2]=e,t[s>>2]=t[l>>2],t[s+4>>2]=t[l+4>>2],O7(n,s,r),h=o}function A7(e){return e=e|0,(t[(S4()|0)+24>>2]|0)+(e*12|0)|0}function O7(e,n,r){e=e|0,n=n|0,r=+r;var o=0,s=0,l=0,d=tt;l=h,h=h+16|0,s=l,o=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(o=t[(t[e>>2]|0)+o>>2]|0),I7(s,r),d=w(P7(s,r)),tD[o&1](e,d),h=l}function I7(e,n){e=e|0,n=+n}function P7(e,n){return e=e|0,n=+n,w(M7(n))}function M7(e){return e=+e,w(e)}function F7(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0,d=0,_=0;o=h,h=h+16|0,s=o+8|0,l=o,_=t[r>>2]|0,d=t[r+4>>2]|0,r=Zn(n)|0,t[l>>2]=_,t[l+4>>2]=d,t[s>>2]=t[l>>2],t[s+4>>2]=t[l+4>>2],L7(e,r,s,0),h=o}function L7(e,n,r,o){e=e|0,n=n|0,r=r|0,o=o|0;var s=0,l=0,d=0,_=0,y=0,k=0,T=0;s=h,h=h+32|0,l=s+16|0,T=s+8|0,_=s,k=t[r>>2]|0,y=t[r+4>>2]|0,d=t[e>>2]|0,e=C4()|0,t[T>>2]=k,t[T+4>>2]=y,t[l>>2]=t[T>>2],t[l+4>>2]=t[T+4>>2],r=R7(l)|0,t[_>>2]=k,t[_+4>>2]=y,t[l>>2]=t[_>>2],t[l+4>>2]=t[_+4>>2],ur(d,n,e,r,N7(l,o)|0,o),h=s}function C4(){var e=0,n=0;if(c[7856]|0||(Hw(10172),Bt(50,10172,Q|0)|0,n=7856,t[n>>2]=1,t[n+4>>2]=0),!(Dn(10172)|0)){e=10172,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));Hw(10172)}return 10172}function R7(e){return e=e|0,0}function N7(e,n){e=e|0,n=n|0;var r=0,o=0,s=0,l=0,d=0,_=0,y=0,k=0,T=0,P=0;return T=h,h=h+32|0,s=T+24|0,d=T+16|0,_=T,y=T+8|0,l=t[e>>2]|0,o=t[e+4>>2]|0,t[_>>2]=l,t[_+4>>2]=o,P=C4()|0,k=P+24|0,e=Lt(n,4)|0,t[y>>2]=e,n=P+28|0,r=t[n>>2]|0,r>>>0<(t[P+32>>2]|0)>>>0?(t[d>>2]=l,t[d+4>>2]=o,t[s>>2]=t[d>>2],t[s+4>>2]=t[d+4>>2],Ww(r,s,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(B7(k,_,y),e=t[n>>2]|0),h=T,((e-(t[k>>2]|0)|0)/12|0)+-1|0}function Ww(e,n,r){e=e|0,n=n|0,r=r|0;var o=0;o=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=o,t[e+8>>2]=r}function B7(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0,d=0,_=0,y=0,k=0,T=0,P=0,q=0;if(k=h,h=h+48|0,o=k+32|0,d=k+24|0,_=k,y=e+4|0,s=(((t[y>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,l=j7(e)|0,l>>>0>>0)$n(e);else{T=t[e>>2]|0,q=((t[e+8>>2]|0)-T|0)/12|0,P=q<<1,U7(_,q>>>0>>1>>>0?P>>>0>>0?s:P:l,((t[y>>2]|0)-T|0)/12|0,e+8|0),y=_+8|0,l=t[y>>2]|0,s=t[n+4>>2]|0,r=t[r>>2]|0,t[d>>2]=t[n>>2],t[d+4>>2]=s,t[o>>2]=t[d>>2],t[o+4>>2]=t[d+4>>2],Ww(l,o,r),t[y>>2]=(t[y>>2]|0)+12,q7(e,_),z7(_),h=k;return}}function j7(e){return e=e|0,357913941}function U7(e,n,r,o){e=e|0,n=n|0,r=r|0,o=o|0;var s=0;t[e+12>>2]=0,t[e+16>>2]=o;do if(n)if(n>>>0>357913941)_n();else{s=Tt(n*12|0)|0;break}else s=0;while(0);t[e>>2]=s,o=s+(r*12|0)|0,t[e+8>>2]=o,t[e+4>>2]=o,t[e+12>>2]=s+(n*12|0)}function q7(e,n){e=e|0,n=n|0;var r=0,o=0,s=0,l=0,d=0;o=t[e>>2]|0,d=e+4|0,l=n+4|0,s=(t[d>>2]|0)-o|0,r=(t[l>>2]|0)+(((s|0)/-12|0)*12|0)|0,t[l>>2]=r,(s|0)>0?(vn(r|0,o|0,s|0)|0,o=l,r=t[l>>2]|0):o=l,l=t[e>>2]|0,t[e>>2]=r,t[o>>2]=l,l=n+8|0,s=t[d>>2]|0,t[d>>2]=t[l>>2],t[l>>2]=s,l=e+8|0,d=n+12|0,e=t[l>>2]|0,t[l>>2]=t[d>>2],t[d>>2]=e,t[n>>2]=t[o>>2]}function z7(e){e=e|0;var n=0,r=0,o=0;n=t[e+4>>2]|0,r=e+8|0,o=t[r>>2]|0,(o|0)!=(n|0)&&(t[r>>2]=o+(~(((o+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&Ve(e)}function Hw(e){e=e|0,b7(e)}function W7(e){e=e|0,H7(e+24|0)}function H7(e){e=e|0;var n=0,r=0,o=0;r=t[e>>2]|0,o=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-o|0)>>>0)/12|0)*12|0)),Ve(r))}function b7(e){e=e|0;var n=0;n=An()|0,Nn(e,2,3,n,G7()|0,2),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function G7(){return 1380}function V7(e,n,r,o){e=e|0,n=n|0,r=r|0,o=o|0;var s=0,l=0,d=0,_=0;s=h,h=h+16|0,l=s+8|0,d=s,_=Y7(e)|0,e=t[_+4>>2]|0,t[d>>2]=t[_>>2],t[d+4>>2]=e,t[l>>2]=t[d>>2],t[l+4>>2]=t[d+4>>2],$7(n,l,r,o),h=s}function Y7(e){return e=e|0,(t[(C4()|0)+24>>2]|0)+(e*12|0)|0}function $7(e,n,r,o){e=e|0,n=n|0,r=r|0,o=o|0;var s=0,l=0,d=0,_=0;_=h,h=h+16|0,l=_+1|0,d=_,s=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(s=t[(t[e>>2]|0)+s>>2]|0),ts(l,r),l=ns(l,r)|0,K7(d,o),d=X7(d,o)|0,X1[s&15](e,l,d),h=_}function K7(e,n){e=e|0,n=n|0}function X7(e,n){return e=e|0,n=n|0,J7(n)|0}function J7(e){return e=e|0,(e|0)!=0|0}function Q7(e,n,r,o){e=e|0,n=n|0,r=r|0,o=o|0;var s=0,l=0;l=t[e>>2]|0,s=T4()|0,e=Z7(r)|0,ur(l,n,s,e,ek(r,o)|0,o)}function T4(){var e=0,n=0;if(c[7864]|0||(Gw(10208),Bt(51,10208,Q|0)|0,n=7864,t[n>>2]=1,t[n+4>>2]=0),!(Dn(10208)|0)){e=10208,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));Gw(10208)}return 10208}function Z7(e){return e=e|0,e|0}function ek(e,n){e=e|0,n=n|0;var r=0,o=0,s=0,l=0,d=0,_=0,y=0;return _=h,h=h+16|0,s=_,l=_+4|0,t[s>>2]=e,y=T4()|0,d=y+24|0,n=Lt(n,4)|0,t[l>>2]=n,r=y+28|0,o=t[r>>2]|0,o>>>0<(t[y+32>>2]|0)>>>0?(bw(o,e,n),n=(t[r>>2]|0)+8|0,t[r>>2]=n):(tk(d,s,l),n=t[r>>2]|0),h=_,(n-(t[d>>2]|0)>>3)+-1|0}function bw(e,n,r){e=e|0,n=n|0,r=r|0,t[e>>2]=n,t[e+4>>2]=r}function tk(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0,d=0,_=0,y=0,k=0,T=0;if(_=h,h=h+32|0,s=_,l=e+4|0,d=((t[l>>2]|0)-(t[e>>2]|0)>>3)+1|0,o=nk(e)|0,o>>>0>>0)$n(e);else{y=t[e>>2]|0,T=(t[e+8>>2]|0)-y|0,k=T>>2,rk(s,T>>3>>>0>>1>>>0?k>>>0>>0?d:k:o,(t[l>>2]|0)-y>>3,e+8|0),d=s+8|0,bw(t[d>>2]|0,t[n>>2]|0,t[r>>2]|0),t[d>>2]=(t[d>>2]|0)+8,ik(e,s),ok(s),h=_;return}}function nk(e){return e=e|0,536870911}function rk(e,n,r,o){e=e|0,n=n|0,r=r|0,o=o|0;var s=0;t[e+12>>2]=0,t[e+16>>2]=o;do if(n)if(n>>>0>536870911)_n();else{s=Tt(n<<3)|0;break}else s=0;while(0);t[e>>2]=s,o=s+(r<<3)|0,t[e+8>>2]=o,t[e+4>>2]=o,t[e+12>>2]=s+(n<<3)}function ik(e,n){e=e|0,n=n|0;var r=0,o=0,s=0,l=0,d=0;o=t[e>>2]|0,d=e+4|0,l=n+4|0,s=(t[d>>2]|0)-o|0,r=(t[l>>2]|0)+(0-(s>>3)<<3)|0,t[l>>2]=r,(s|0)>0?(vn(r|0,o|0,s|0)|0,o=l,r=t[l>>2]|0):o=l,l=t[e>>2]|0,t[e>>2]=r,t[o>>2]=l,l=n+8|0,s=t[d>>2]|0,t[d>>2]=t[l>>2],t[l>>2]=s,l=e+8|0,d=n+12|0,e=t[l>>2]|0,t[l>>2]=t[d>>2],t[d>>2]=e,t[n>>2]=t[o>>2]}function ok(e){e=e|0;var n=0,r=0,o=0;n=t[e+4>>2]|0,r=e+8|0,o=t[r>>2]|0,(o|0)!=(n|0)&&(t[r>>2]=o+(~((o+-8-n|0)>>>3)<<3)),e=t[e>>2]|0,e|0&&Ve(e)}function Gw(e){e=e|0,lk(e)}function uk(e){e=e|0,sk(e+24|0)}function sk(e){e=e|0;var n=0,r=0,o=0;r=t[e>>2]|0,o=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-8-o|0)>>>3)<<3)),Ve(r))}function lk(e){e=e|0;var n=0;n=An()|0,Nn(e,1,24,n,fk()|0,1),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function fk(){return 1392}function ck(e,n){e=e|0,n=n|0,dk(t[(ak(e)|0)>>2]|0,n)}function ak(e){return e=e|0,(t[(T4()|0)+24>>2]|0)+(e<<3)|0}function dk(e,n){e=e|0,n=n|0;var r=0,o=0;r=h,h=h+16|0,o=r,Lw(o,n),n=Rw(o,n)|0,Nl[e&127](n),h=r}function pk(e,n,r,o){e=e|0,n=n|0,r=r|0,o=o|0;var s=0,l=0;l=t[e>>2]|0,s=x4()|0,e=hk(r)|0,ur(l,n,s,e,mk(r,o)|0,o)}function x4(){var e=0,n=0;if(c[7872]|0||(Yw(10244),Bt(52,10244,Q|0)|0,n=7872,t[n>>2]=1,t[n+4>>2]=0),!(Dn(10244)|0)){e=10244,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));Yw(10244)}return 10244}function hk(e){return e=e|0,e|0}function mk(e,n){e=e|0,n=n|0;var r=0,o=0,s=0,l=0,d=0,_=0,y=0;return _=h,h=h+16|0,s=_,l=_+4|0,t[s>>2]=e,y=x4()|0,d=y+24|0,n=Lt(n,4)|0,t[l>>2]=n,r=y+28|0,o=t[r>>2]|0,o>>>0<(t[y+32>>2]|0)>>>0?(Vw(o,e,n),n=(t[r>>2]|0)+8|0,t[r>>2]=n):(vk(d,s,l),n=t[r>>2]|0),h=_,(n-(t[d>>2]|0)>>3)+-1|0}function Vw(e,n,r){e=e|0,n=n|0,r=r|0,t[e>>2]=n,t[e+4>>2]=r}function vk(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0,d=0,_=0,y=0,k=0,T=0;if(_=h,h=h+32|0,s=_,l=e+4|0,d=((t[l>>2]|0)-(t[e>>2]|0)>>3)+1|0,o=gk(e)|0,o>>>0>>0)$n(e);else{y=t[e>>2]|0,T=(t[e+8>>2]|0)-y|0,k=T>>2,_k(s,T>>3>>>0>>1>>>0?k>>>0>>0?d:k:o,(t[l>>2]|0)-y>>3,e+8|0),d=s+8|0,Vw(t[d>>2]|0,t[n>>2]|0,t[r>>2]|0),t[d>>2]=(t[d>>2]|0)+8,yk(e,s),wk(s),h=_;return}}function gk(e){return e=e|0,536870911}function _k(e,n,r,o){e=e|0,n=n|0,r=r|0,o=o|0;var s=0;t[e+12>>2]=0,t[e+16>>2]=o;do if(n)if(n>>>0>536870911)_n();else{s=Tt(n<<3)|0;break}else s=0;while(0);t[e>>2]=s,o=s+(r<<3)|0,t[e+8>>2]=o,t[e+4>>2]=o,t[e+12>>2]=s+(n<<3)}function yk(e,n){e=e|0,n=n|0;var r=0,o=0,s=0,l=0,d=0;o=t[e>>2]|0,d=e+4|0,l=n+4|0,s=(t[d>>2]|0)-o|0,r=(t[l>>2]|0)+(0-(s>>3)<<3)|0,t[l>>2]=r,(s|0)>0?(vn(r|0,o|0,s|0)|0,o=l,r=t[l>>2]|0):o=l,l=t[e>>2]|0,t[e>>2]=r,t[o>>2]=l,l=n+8|0,s=t[d>>2]|0,t[d>>2]=t[l>>2],t[l>>2]=s,l=e+8|0,d=n+12|0,e=t[l>>2]|0,t[l>>2]=t[d>>2],t[d>>2]=e,t[n>>2]=t[o>>2]}function wk(e){e=e|0;var n=0,r=0,o=0;n=t[e+4>>2]|0,r=e+8|0,o=t[r>>2]|0,(o|0)!=(n|0)&&(t[r>>2]=o+(~((o+-8-n|0)>>>3)<<3)),e=t[e>>2]|0,e|0&&Ve(e)}function Yw(e){e=e|0,Sk(e)}function Dk(e){e=e|0,Ek(e+24|0)}function Ek(e){e=e|0;var n=0,r=0,o=0;r=t[e>>2]|0,o=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-8-o|0)>>>3)<<3)),Ve(r))}function Sk(e){e=e|0;var n=0;n=An()|0,Nn(e,1,16,n,Ck()|0,0),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function Ck(){return 1400}function Tk(e){return e=e|0,kk(t[(xk(e)|0)>>2]|0)|0}function xk(e){return e=e|0,(t[(x4()|0)+24>>2]|0)+(e<<3)|0}function kk(e){return e=e|0,Ak(ph[e&7]()|0)|0}function Ak(e){return e=e|0,e|0}function Ok(){var e=0;return c[7880]|0||(Nk(10280),Bt(25,10280,Q|0)|0,e=7880,t[e>>2]=1,t[e+4>>2]=0),10280}function Ik(e,n){e=e|0,n=n|0,t[e>>2]=Pk()|0,t[e+4>>2]=Mk()|0,t[e+12>>2]=n,t[e+8>>2]=Fk()|0,t[e+32>>2]=4}function Pk(){return 11711}function Mk(){return 1356}function Fk(){return eh()|0}function Lk(e,n,r,o){e=e|0,n=n|0,r=r|0,o=o|0,(Sf(o,896)|0)==512?r|0&&(Rk(r),Ve(r)):n|0&&(Gi(n),Ve(n))}function Rk(e){e=e|0,e=t[e+4>>2]|0,e|0&&Tf(e)}function Nk(e){e=e|0,Ys(e)}function Bk(e){e=e|0,jk(e,4920),Uk(e)|0,qk(e)|0}function jk(e,n){e=e|0,n=n|0;var r=0;r=Up()|0,t[e>>2]=r,sA(r,n),Cf(t[e>>2]|0)}function Uk(e){e=e|0;var n=0;return n=t[e>>2]|0,uc(n,Jk()|0),e|0}function qk(e){e=e|0;var n=0;return n=t[e>>2]|0,uc(n,zk()|0),e|0}function zk(){var e=0;return c[7888]|0||($w(10328),Bt(53,10328,Q|0)|0,e=7888,t[e>>2]=1,t[e+4>>2]=0),Dn(10328)|0||$w(10328),10328}function uc(e,n){e=e|0,n=n|0,ur(e,0,n,0,0,0)}function $w(e){e=e|0,bk(e),sc(e,10)}function Wk(e){e=e|0,Hk(e+24|0)}function Hk(e){e=e|0;var n=0,r=0,o=0;r=t[e>>2]|0,o=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-8-o|0)>>>3)<<3)),Ve(r))}function bk(e){e=e|0;var n=0;n=An()|0,Nn(e,5,1,n,$k()|0,2),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function Gk(e,n,r){e=e|0,n=n|0,r=+r,Vk(e,n,r)}function sc(e,n){e=e|0,n=n|0,t[e+20>>2]=n}function Vk(e,n,r){e=e|0,n=n|0,r=+r;var o=0,s=0,l=0,d=0,_=0;o=h,h=h+16|0,l=o+8|0,_=o+13|0,s=o,d=o+12|0,ts(_,n),t[l>>2]=ns(_,n)|0,wu(d,r),L[s>>3]=+Du(d,r),Yk(e,l,s),h=o}function Yk(e,n,r){e=e|0,n=n|0,r=r|0,M(e+8|0,t[n>>2]|0,+L[r>>3]),c[e+24>>0]=1}function $k(){return 1404}function Kk(e,n){return e=e|0,n=+n,Xk(e,n)|0}function Xk(e,n){e=e|0,n=+n;var r=0,o=0,s=0,l=0,d=0,_=0,y=0;return o=h,h=h+16|0,l=o+4|0,d=o+8|0,_=o,s=Qo(8)|0,r=s,y=Tt(16)|0,ts(l,e),e=ns(l,e)|0,wu(d,n),M(y,e,+Du(d,n)),d=r+4|0,t[d>>2]=y,e=Tt(8)|0,d=t[d>>2]|0,t[_>>2]=0,t[l>>2]=t[_>>2],P1(e,d,l),t[s>>2]=e,h=o,r|0}function Jk(){var e=0;return c[7896]|0||(Kw(10364),Bt(54,10364,Q|0)|0,e=7896,t[e>>2]=1,t[e+4>>2]=0),Dn(10364)|0||Kw(10364),10364}function Kw(e){e=e|0,eA(e),sc(e,55)}function Qk(e){e=e|0,Zk(e+24|0)}function Zk(e){e=e|0;var n=0,r=0,o=0;r=t[e>>2]|0,o=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-8-o|0)>>>3)<<3)),Ve(r))}function eA(e){e=e|0;var n=0;n=An()|0,Nn(e,5,4,n,iA()|0,0),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function tA(e){e=e|0,nA(e)}function nA(e){e=e|0,rA(e)}function rA(e){e=e|0,Xw(e+8|0),c[e+24>>0]=1}function Xw(e){e=e|0,t[e>>2]=0,L[e+8>>3]=0}function iA(){return 1424}function oA(){return uA()|0}function uA(){var e=0,n=0,r=0,o=0,s=0,l=0,d=0;return n=h,h=h+16|0,s=n+4|0,d=n,r=Qo(8)|0,e=r,o=Tt(16)|0,Xw(o),l=e+4|0,t[l>>2]=o,o=Tt(8)|0,l=t[l>>2]|0,t[d>>2]=0,t[s>>2]=t[d>>2],P1(o,l,s),t[r>>2]=o,h=n,e|0}function sA(e,n){e=e|0,n=n|0,t[e>>2]=lA()|0,t[e+4>>2]=fA()|0,t[e+12>>2]=n,t[e+8>>2]=cA()|0,t[e+32>>2]=5}function lA(){return 11710}function fA(){return 1416}function cA(){return th()|0}function aA(e,n,r,o){e=e|0,n=n|0,r=r|0,o=o|0,(Sf(o,896)|0)==512?r|0&&(dA(r),Ve(r)):n|0&&Ve(n)}function dA(e){e=e|0,e=t[e+4>>2]|0,e|0&&Tf(e)}function th(){var e=0;return c[7904]|0||(t[2600]=pA()|0,t[2601]=0,e=7904,t[e>>2]=1,t[e+4>>2]=0),10400}function pA(){return t[357]|0}function hA(e){e=e|0,mA(e,4926),vA(e)|0}function mA(e,n){e=e|0,n=n|0;var r=0;r=u1()|0,t[e>>2]=r,kA(r,n),Cf(t[e>>2]|0)}function vA(e){e=e|0;var n=0;return n=t[e>>2]|0,uc(n,gA()|0),e|0}function gA(){var e=0;return c[7912]|0||(Jw(10412),Bt(56,10412,Q|0)|0,e=7912,t[e>>2]=1,t[e+4>>2]=0),Dn(10412)|0||Jw(10412),10412}function Jw(e){e=e|0,wA(e),sc(e,57)}function _A(e){e=e|0,yA(e+24|0)}function yA(e){e=e|0;var n=0,r=0,o=0;r=t[e>>2]|0,o=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-8-o|0)>>>3)<<3)),Ve(r))}function wA(e){e=e|0;var n=0;n=An()|0,Nn(e,5,5,n,CA()|0,0),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function DA(e){e=e|0,EA(e)}function EA(e){e=e|0,SA(e)}function SA(e){e=e|0;var n=0,r=0;n=e+8|0,r=n+48|0;do t[n>>2]=0,n=n+4|0;while((n|0)<(r|0));c[e+56>>0]=1}function CA(){return 1432}function TA(){return xA()|0}function xA(){var e=0,n=0,r=0,o=0,s=0,l=0,d=0,_=0;d=h,h=h+16|0,e=d+4|0,n=d,r=Qo(8)|0,o=r,s=Tt(48)|0,l=s,_=l+48|0;do t[l>>2]=0,l=l+4|0;while((l|0)<(_|0));return l=o+4|0,t[l>>2]=s,_=Tt(8)|0,l=t[l>>2]|0,t[n>>2]=0,t[e>>2]=t[n>>2],Wd(_,l,e),t[r>>2]=_,h=d,o|0}function kA(e,n){e=e|0,n=n|0,t[e>>2]=AA()|0,t[e+4>>2]=OA()|0,t[e+12>>2]=n,t[e+8>>2]=IA()|0,t[e+32>>2]=6}function AA(){return 11704}function OA(){return 1436}function IA(){return th()|0}function PA(e,n,r,o){e=e|0,n=n|0,r=r|0,o=o|0,(Sf(o,896)|0)==512?r|0&&(MA(r),Ve(r)):n|0&&Ve(n)}function MA(e){e=e|0,e=t[e+4>>2]|0,e|0&&Tf(e)}function FA(e){e=e|0,LA(e,4933),RA(e)|0,NA(e)|0}function LA(e,n){e=e|0,n=n|0;var r=0;r=uO()|0,t[e>>2]=r,sO(r,n),Cf(t[e>>2]|0)}function RA(e){e=e|0;var n=0;return n=t[e>>2]|0,uc(n,XA()|0),e|0}function NA(e){e=e|0;var n=0;return n=t[e>>2]|0,uc(n,BA()|0),e|0}function BA(){var e=0;return c[7920]|0||(Qw(10452),Bt(58,10452,Q|0)|0,e=7920,t[e>>2]=1,t[e+4>>2]=0),Dn(10452)|0||Qw(10452),10452}function Qw(e){e=e|0,qA(e),sc(e,1)}function jA(e){e=e|0,UA(e+24|0)}function UA(e){e=e|0;var n=0,r=0,o=0;r=t[e>>2]|0,o=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-8-o|0)>>>3)<<3)),Ve(r))}function qA(e){e=e|0;var n=0;n=An()|0,Nn(e,5,1,n,bA()|0,2),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function zA(e,n,r){e=e|0,n=+n,r=+r,WA(e,n,r)}function WA(e,n,r){e=e|0,n=+n,r=+r;var o=0,s=0,l=0,d=0,_=0;o=h,h=h+32|0,l=o+8|0,_=o+17|0,s=o,d=o+16|0,wu(_,n),L[l>>3]=+Du(_,n),wu(d,r),L[s>>3]=+Du(d,r),HA(e,l,s),h=o}function HA(e,n,r){e=e|0,n=n|0,r=r|0,Zw(e+8|0,+L[n>>3],+L[r>>3]),c[e+24>>0]=1}function Zw(e,n,r){e=e|0,n=+n,r=+r,L[e>>3]=n,L[e+8>>3]=r}function bA(){return 1472}function GA(e,n){return e=+e,n=+n,VA(e,n)|0}function VA(e,n){e=+e,n=+n;var r=0,o=0,s=0,l=0,d=0,_=0,y=0;return o=h,h=h+16|0,d=o+4|0,_=o+8|0,y=o,s=Qo(8)|0,r=s,l=Tt(16)|0,wu(d,e),e=+Du(d,e),wu(_,n),Zw(l,e,+Du(_,n)),_=r+4|0,t[_>>2]=l,l=Tt(8)|0,_=t[_>>2]|0,t[y>>2]=0,t[d>>2]=t[y>>2],e8(l,_,d),t[s>>2]=l,h=o,r|0}function e8(e,n,r){e=e|0,n=n|0,r=r|0,t[e>>2]=n,r=Tt(16)|0,t[r+4>>2]=0,t[r+8>>2]=0,t[r>>2]=1452,t[r+12>>2]=n,t[e+4>>2]=r}function YA(e){e=e|0,da(e),Ve(e)}function $A(e){e=e|0,e=t[e+12>>2]|0,e|0&&Ve(e)}function KA(e){e=e|0,Ve(e)}function XA(){var e=0;return c[7928]|0||(t8(10488),Bt(59,10488,Q|0)|0,e=7928,t[e>>2]=1,t[e+4>>2]=0),Dn(10488)|0||t8(10488),10488}function t8(e){e=e|0,ZA(e),sc(e,60)}function JA(e){e=e|0,QA(e+24|0)}function QA(e){e=e|0;var n=0,r=0,o=0;r=t[e>>2]|0,o=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-8-o|0)>>>3)<<3)),Ve(r))}function ZA(e){e=e|0;var n=0;n=An()|0,Nn(e,5,6,n,rO()|0,0),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function eO(e){e=e|0,tO(e)}function tO(e){e=e|0,nO(e)}function nO(e){e=e|0,n8(e+8|0),c[e+24>>0]=1}function n8(e){e=e|0,t[e>>2]=0,t[e+4>>2]=0,t[e+8>>2]=0,t[e+12>>2]=0}function rO(){return 1492}function iO(){return oO()|0}function oO(){var e=0,n=0,r=0,o=0,s=0,l=0,d=0;return n=h,h=h+16|0,s=n+4|0,d=n,r=Qo(8)|0,e=r,o=Tt(16)|0,n8(o),l=e+4|0,t[l>>2]=o,o=Tt(8)|0,l=t[l>>2]|0,t[d>>2]=0,t[s>>2]=t[d>>2],e8(o,l,s),t[r>>2]=o,h=n,e|0}function uO(){var e=0;return c[7936]|0||(pO(10524),Bt(25,10524,Q|0)|0,e=7936,t[e>>2]=1,t[e+4>>2]=0),10524}function sO(e,n){e=e|0,n=n|0,t[e>>2]=lO()|0,t[e+4>>2]=fO()|0,t[e+12>>2]=n,t[e+8>>2]=cO()|0,t[e+32>>2]=7}function lO(){return 11700}function fO(){return 1484}function cO(){return th()|0}function aO(e,n,r,o){e=e|0,n=n|0,r=r|0,o=o|0,(Sf(o,896)|0)==512?r|0&&(dO(r),Ve(r)):n|0&&Ve(n)}function dO(e){e=e|0,e=t[e+4>>2]|0,e|0&&Tf(e)}function pO(e){e=e|0,Ys(e)}function hO(e,n,r){e=e|0,n=n|0,r=r|0,e=Zn(n)|0,n=mO(r)|0,r=vO(r,0)|0,VO(e,n,r,k4()|0,0)}function mO(e){return e=e|0,e|0}function vO(e,n){e=e|0,n=n|0;var r=0,o=0,s=0,l=0,d=0,_=0,y=0;return _=h,h=h+16|0,s=_,l=_+4|0,t[s>>2]=e,y=k4()|0,d=y+24|0,n=Lt(n,4)|0,t[l>>2]=n,r=y+28|0,o=t[r>>2]|0,o>>>0<(t[y+32>>2]|0)>>>0?(i8(o,e,n),n=(t[r>>2]|0)+8|0,t[r>>2]=n):(SO(d,s,l),n=t[r>>2]|0),h=_,(n-(t[d>>2]|0)>>3)+-1|0}function k4(){var e=0,n=0;if(c[7944]|0||(r8(10568),Bt(61,10568,Q|0)|0,n=7944,t[n>>2]=1,t[n+4>>2]=0),!(Dn(10568)|0)){e=10568,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));r8(10568)}return 10568}function r8(e){e=e|0,yO(e)}function gO(e){e=e|0,_O(e+24|0)}function _O(e){e=e|0;var n=0,r=0,o=0;r=t[e>>2]|0,o=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-8-o|0)>>>3)<<3)),Ve(r))}function yO(e){e=e|0;var n=0;n=An()|0,Nn(e,1,17,n,Dp()|0,0),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function wO(e){return e=e|0,EO(t[(DO(e)|0)>>2]|0)|0}function DO(e){return e=e|0,(t[(k4()|0)+24>>2]|0)+(e<<3)|0}function EO(e){return e=e|0,ea(ph[e&7]()|0)|0}function i8(e,n,r){e=e|0,n=n|0,r=r|0,t[e>>2]=n,t[e+4>>2]=r}function SO(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0,d=0,_=0,y=0,k=0,T=0;if(_=h,h=h+32|0,s=_,l=e+4|0,d=((t[l>>2]|0)-(t[e>>2]|0)>>3)+1|0,o=CO(e)|0,o>>>0>>0)$n(e);else{y=t[e>>2]|0,T=(t[e+8>>2]|0)-y|0,k=T>>2,TO(s,T>>3>>>0>>1>>>0?k>>>0>>0?d:k:o,(t[l>>2]|0)-y>>3,e+8|0),d=s+8|0,i8(t[d>>2]|0,t[n>>2]|0,t[r>>2]|0),t[d>>2]=(t[d>>2]|0)+8,xO(e,s),kO(s),h=_;return}}function CO(e){return e=e|0,536870911}function TO(e,n,r,o){e=e|0,n=n|0,r=r|0,o=o|0;var s=0;t[e+12>>2]=0,t[e+16>>2]=o;do if(n)if(n>>>0>536870911)_n();else{s=Tt(n<<3)|0;break}else s=0;while(0);t[e>>2]=s,o=s+(r<<3)|0,t[e+8>>2]=o,t[e+4>>2]=o,t[e+12>>2]=s+(n<<3)}function xO(e,n){e=e|0,n=n|0;var r=0,o=0,s=0,l=0,d=0;o=t[e>>2]|0,d=e+4|0,l=n+4|0,s=(t[d>>2]|0)-o|0,r=(t[l>>2]|0)+(0-(s>>3)<<3)|0,t[l>>2]=r,(s|0)>0?(vn(r|0,o|0,s|0)|0,o=l,r=t[l>>2]|0):o=l,l=t[e>>2]|0,t[e>>2]=r,t[o>>2]=l,l=n+8|0,s=t[d>>2]|0,t[d>>2]=t[l>>2],t[l>>2]=s,l=e+8|0,d=n+12|0,e=t[l>>2]|0,t[l>>2]=t[d>>2],t[d>>2]=e,t[n>>2]=t[o>>2]}function kO(e){e=e|0;var n=0,r=0,o=0;n=t[e+4>>2]|0,r=e+8|0,o=t[r>>2]|0,(o|0)!=(n|0)&&(t[r>>2]=o+(~((o+-8-n|0)>>>3)<<3)),e=t[e>>2]|0,e|0&&Ve(e)}function AO(){OO()}function OO(){IO(10604)}function IO(e){e=e|0,PO(e,4955)}function PO(e,n){e=e|0,n=n|0;var r=0;r=MO()|0,t[e>>2]=r,FO(r,n),Cf(t[e>>2]|0)}function MO(){var e=0;return c[7952]|0||(WO(10612),Bt(25,10612,Q|0)|0,e=7952,t[e>>2]=1,t[e+4>>2]=0),10612}function FO(e,n){e=e|0,n=n|0,t[e>>2]=BO()|0,t[e+4>>2]=jO()|0,t[e+12>>2]=n,t[e+8>>2]=UO()|0,t[e+32>>2]=8}function Cf(e){e=e|0;var n=0,r=0;n=h,h=h+16|0,r=n,sa()|0,t[r>>2]=e,LO(10608,r),h=n}function sa(){return c[11714]|0||(t[2652]=0,Bt(62,10608,Q|0)|0,c[11714]=1),10608}function LO(e,n){e=e|0,n=n|0;var r=0;r=Tt(8)|0,t[r+4>>2]=t[n>>2],t[r>>2]=t[e>>2],t[e>>2]=r}function RO(e){e=e|0,NO(e)}function NO(e){e=e|0;var n=0,r=0;if(n=t[e>>2]|0,n|0)do r=n,n=t[n>>2]|0,Ve(r);while((n|0)!=0);t[e>>2]=0}function BO(){return 11715}function jO(){return 1496}function UO(){return eh()|0}function qO(e,n,r,o){e=e|0,n=n|0,r=r|0,o=o|0,(Sf(o,896)|0)==512?r|0&&(zO(r),Ve(r)):n|0&&Ve(n)}function zO(e){e=e|0,e=t[e+4>>2]|0,e|0&&Tf(e)}function WO(e){e=e|0,Ys(e)}function HO(e,n){e=e|0,n=n|0;var r=0,o=0;sa()|0,r=t[2652]|0;e:do if(r|0){for(;o=t[r+4>>2]|0,!(o|0?(U8(A4(o)|0,e)|0)==0:0);)if(r=t[r>>2]|0,!r)break e;bO(o,n)}while(0)}function A4(e){return e=e|0,t[e+12>>2]|0}function bO(e,n){e=e|0,n=n|0;var r=0;e=e+36|0,r=t[e>>2]|0,r|0&&(Ju(r),Ve(r)),r=Tt(4)|0,ba(r,n),t[e>>2]=r}function O4(){return c[11716]|0||(t[2664]=0,Bt(63,10656,Q|0)|0,c[11716]=1),10656}function o8(){var e=0;return c[11717]|0?e=t[2665]|0:(GO(),t[2665]=1504,c[11717]=1,e=1504),e|0}function GO(){c[11740]|0||(c[11718]=Lt(Lt(8,0)|0,0)|0,c[11719]=Lt(Lt(0,0)|0,0)|0,c[11720]=Lt(Lt(0,16)|0,0)|0,c[11721]=Lt(Lt(8,0)|0,0)|0,c[11722]=Lt(Lt(0,0)|0,0)|0,c[11723]=Lt(Lt(8,0)|0,0)|0,c[11724]=Lt(Lt(0,0)|0,0)|0,c[11725]=Lt(Lt(8,0)|0,0)|0,c[11726]=Lt(Lt(0,0)|0,0)|0,c[11727]=Lt(Lt(8,0)|0,0)|0,c[11728]=Lt(Lt(0,0)|0,0)|0,c[11729]=Lt(Lt(0,0)|0,32)|0,c[11730]=Lt(Lt(0,0)|0,32)|0,c[11740]=1)}function u8(){return 1572}function VO(e,n,r,o,s){e=e|0,n=n|0,r=r|0,o=o|0,s=s|0;var l=0,d=0,_=0,y=0,k=0,T=0;l=h,h=h+32|0,T=l+16|0,k=l+12|0,y=l+8|0,_=l+4|0,d=l,t[T>>2]=e,t[k>>2]=n,t[y>>2]=r,t[_>>2]=o,t[d>>2]=s,O4()|0,YO(10656,T,k,y,_,d),h=l}function YO(e,n,r,o,s,l){e=e|0,n=n|0,r=r|0,o=o|0,s=s|0,l=l|0;var d=0;d=Tt(24)|0,t1(d+4|0,t[n>>2]|0,t[r>>2]|0,t[o>>2]|0,t[s>>2]|0,t[l>>2]|0),t[d>>2]=t[e>>2],t[e>>2]=d}function s8(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0,d=0,_=0,y=0,k=0,T=0,P=0,q=0,we=0,le=0,ie=0,Pe=0,ke=0,qe=0;if(qe=h,h=h+32|0,le=qe+20|0,ie=qe+8|0,Pe=qe+4|0,ke=qe,n=t[n>>2]|0,n|0){we=le+4|0,y=le+8|0,k=ie+4|0,T=ie+8|0,P=ie+8|0,q=le+8|0;do{if(d=n+4|0,_=I4(d)|0,_|0){if(s=b1(_)|0,t[le>>2]=0,t[we>>2]=0,t[y>>2]=0,o=(G1(_)|0)+1|0,$O(le,o),o|0)for(;o=o+-1|0,os(ie,t[s>>2]|0),l=t[we>>2]|0,l>>>0<(t[q>>2]|0)>>>0?(t[l>>2]=t[ie>>2],t[we>>2]=(t[we>>2]|0)+4):P4(le,ie),o;)s=s+4|0;o=V1(_)|0,t[ie>>2]=0,t[k>>2]=0,t[T>>2]=0;e:do if(t[o>>2]|0)for(s=0,l=0;;){if((s|0)==(l|0)?KO(ie,o):(t[s>>2]=t[o>>2],t[k>>2]=(t[k>>2]|0)+4),o=o+4|0,!(t[o>>2]|0))break e;s=t[k>>2]|0,l=t[P>>2]|0}while(0);t[Pe>>2]=nh(d)|0,t[ke>>2]=Dn(_)|0,XO(r,e,Pe,ke,le,ie),M4(ie),Rl(le)}n=t[n>>2]|0}while((n|0)!=0)}h=qe}function I4(e){return e=e|0,t[e+12>>2]|0}function b1(e){return e=e|0,t[e+12>>2]|0}function G1(e){return e=e|0,t[e+16>>2]|0}function $O(e,n){e=e|0,n=n|0;var r=0,o=0,s=0;s=h,h=h+32|0,r=s,o=t[e>>2]|0,(t[e+8>>2]|0)-o>>2>>>0>>0&&(m8(r,n,(t[e+4>>2]|0)-o>>2,e+8|0),v8(e,r),g8(r)),h=s}function P4(e,n){e=e|0,n=n|0;var r=0,o=0,s=0,l=0,d=0,_=0,y=0,k=0;if(d=h,h=h+32|0,r=d,o=e+4|0,s=((t[o>>2]|0)-(t[e>>2]|0)>>2)+1|0,l=h8(e)|0,l>>>0>>0)$n(e);else{_=t[e>>2]|0,k=(t[e+8>>2]|0)-_|0,y=k>>1,m8(r,k>>2>>>0>>1>>>0?y>>>0>>0?s:y:l,(t[o>>2]|0)-_>>2,e+8|0),l=r+8|0,t[t[l>>2]>>2]=t[n>>2],t[l>>2]=(t[l>>2]|0)+4,v8(e,r),g8(r),h=d;return}}function V1(e){return e=e|0,t[e+8>>2]|0}function KO(e,n){e=e|0,n=n|0;var r=0,o=0,s=0,l=0,d=0,_=0,y=0,k=0;if(d=h,h=h+32|0,r=d,o=e+4|0,s=((t[o>>2]|0)-(t[e>>2]|0)>>2)+1|0,l=p8(e)|0,l>>>0>>0)$n(e);else{_=t[e>>2]|0,k=(t[e+8>>2]|0)-_|0,y=k>>1,mI(r,k>>2>>>0>>1>>>0?y>>>0>>0?s:y:l,(t[o>>2]|0)-_>>2,e+8|0),l=r+8|0,t[t[l>>2]>>2]=t[n>>2],t[l>>2]=(t[l>>2]|0)+4,vI(e,r),gI(r),h=d;return}}function nh(e){return e=e|0,t[e>>2]|0}function XO(e,n,r,o,s,l){e=e|0,n=n|0,r=r|0,o=o|0,s=s|0,l=l|0,JO(e,n,r,o,s,l)}function M4(e){e=e|0;var n=0,r=0,o=0;r=t[e>>2]|0,o=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-4-o|0)>>>2)<<2)),Ve(r))}function Rl(e){e=e|0;var n=0,r=0,o=0;r=t[e>>2]|0,o=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-4-o|0)>>>2)<<2)),Ve(r))}function JO(e,n,r,o,s,l){e=e|0,n=n|0,r=r|0,o=o|0,s=s|0,l=l|0;var d=0,_=0,y=0,k=0,T=0,P=0;d=h,h=h+48|0,T=d+40|0,_=d+32|0,P=d+24|0,y=d+12|0,k=d,Zo(_),e=Oi(e)|0,t[P>>2]=t[n>>2],r=t[r>>2]|0,o=t[o>>2]|0,F4(y,s),QO(k,l),t[T>>2]=t[P>>2],ZO(e,T,r,o,y,k),M4(k),Rl(y),eu(_),h=d}function F4(e,n){e=e|0,n=n|0;var r=0,o=0;t[e>>2]=0,t[e+4>>2]=0,t[e+8>>2]=0,r=n+4|0,o=(t[r>>2]|0)-(t[n>>2]|0)>>2,o|0&&(pI(e,o),hI(e,t[n>>2]|0,t[r>>2]|0,o))}function QO(e,n){e=e|0,n=n|0;var r=0,o=0;t[e>>2]=0,t[e+4>>2]=0,t[e+8>>2]=0,r=n+4|0,o=(t[r>>2]|0)-(t[n>>2]|0)>>2,o|0&&(aI(e,o),dI(e,t[n>>2]|0,t[r>>2]|0,o))}function ZO(e,n,r,o,s,l){e=e|0,n=n|0,r=r|0,o=o|0,s=s|0,l=l|0;var d=0,_=0,y=0,k=0,T=0,P=0;d=h,h=h+32|0,T=d+28|0,P=d+24|0,_=d+12|0,y=d,k=ko(eI()|0)|0,t[P>>2]=t[n>>2],t[T>>2]=t[P>>2],n=lc(T)|0,r=l8(r)|0,o=L4(o)|0,t[_>>2]=t[s>>2],T=s+4|0,t[_+4>>2]=t[T>>2],P=s+8|0,t[_+8>>2]=t[P>>2],t[P>>2]=0,t[T>>2]=0,t[s>>2]=0,s=R4(_)|0,t[y>>2]=t[l>>2],T=l+4|0,t[y+4>>2]=t[T>>2],P=l+8|0,t[y+8>>2]=t[P>>2],t[P>>2]=0,t[T>>2]=0,t[l>>2]=0,qo(0,k|0,e|0,n|0,r|0,o|0,s|0,tI(y)|0)|0,M4(y),Rl(_),h=d}function eI(){var e=0;return c[7968]|0||(fI(10708),e=7968,t[e>>2]=1,t[e+4>>2]=0),10708}function lc(e){return e=e|0,c8(e)|0}function l8(e){return e=e|0,f8(e)|0}function L4(e){return e=e|0,ea(e)|0}function R4(e){return e=e|0,rI(e)|0}function tI(e){return e=e|0,nI(e)|0}function nI(e){e=e|0;var n=0,r=0,o=0;if(o=(t[e+4>>2]|0)-(t[e>>2]|0)|0,r=o>>2,o=Qo(o+4|0)|0,t[o>>2]=r,r|0){n=0;do t[o+4+(n<<2)>>2]=f8(t[(t[e>>2]|0)+(n<<2)>>2]|0)|0,n=n+1|0;while((n|0)!=(r|0))}return o|0}function f8(e){return e=e|0,e|0}function rI(e){e=e|0;var n=0,r=0,o=0;if(o=(t[e+4>>2]|0)-(t[e>>2]|0)|0,r=o>>2,o=Qo(o+4|0)|0,t[o>>2]=r,r|0){n=0;do t[o+4+(n<<2)>>2]=c8((t[e>>2]|0)+(n<<2)|0)|0,n=n+1|0;while((n|0)!=(r|0))}return o|0}function c8(e){e=e|0;var n=0,r=0,o=0,s=0;return s=h,h=h+32|0,n=s+12|0,r=s,o=U0(a8()|0)|0,o?(s1(n,o),l1(r,n),UF(e,r),e=f1(n)|0):e=iI(e)|0,h=s,e|0}function a8(){var e=0;return c[7960]|0||(lI(10664),Bt(25,10664,Q|0)|0,e=7960,t[e>>2]=1,t[e+4>>2]=0),10664}function iI(e){e=e|0;var n=0,r=0,o=0,s=0,l=0,d=0,_=0;return r=h,h=h+16|0,s=r+4|0,d=r,o=Qo(8)|0,n=o,_=Tt(4)|0,t[_>>2]=t[e>>2],l=n+4|0,t[l>>2]=_,e=Tt(8)|0,l=t[l>>2]|0,t[d>>2]=0,t[s>>2]=t[d>>2],d8(e,l,s),t[o>>2]=e,h=r,n|0}function d8(e,n,r){e=e|0,n=n|0,r=r|0,t[e>>2]=n,r=Tt(16)|0,t[r+4>>2]=0,t[r+8>>2]=0,t[r>>2]=1656,t[r+12>>2]=n,t[e+4>>2]=r}function oI(e){e=e|0,da(e),Ve(e)}function uI(e){e=e|0,e=t[e+12>>2]|0,e|0&&Ve(e)}function sI(e){e=e|0,Ve(e)}function lI(e){e=e|0,Ys(e)}function fI(e){e=e|0,Ao(e,cI()|0,5)}function cI(){return 1676}function aI(e,n){e=e|0,n=n|0;var r=0;if((p8(e)|0)>>>0>>0&&$n(e),n>>>0>1073741823)_n();else{r=Tt(n<<2)|0,t[e+4>>2]=r,t[e>>2]=r,t[e+8>>2]=r+(n<<2);return}}function dI(e,n,r,o){e=e|0,n=n|0,r=r|0,o=o|0,o=e+4|0,e=r-n|0,(e|0)>0&&(vn(t[o>>2]|0,n|0,e|0)|0,t[o>>2]=(t[o>>2]|0)+(e>>>2<<2))}function p8(e){return e=e|0,1073741823}function pI(e,n){e=e|0,n=n|0;var r=0;if((h8(e)|0)>>>0>>0&&$n(e),n>>>0>1073741823)_n();else{r=Tt(n<<2)|0,t[e+4>>2]=r,t[e>>2]=r,t[e+8>>2]=r+(n<<2);return}}function hI(e,n,r,o){e=e|0,n=n|0,r=r|0,o=o|0,o=e+4|0,e=r-n|0,(e|0)>0&&(vn(t[o>>2]|0,n|0,e|0)|0,t[o>>2]=(t[o>>2]|0)+(e>>>2<<2))}function h8(e){return e=e|0,1073741823}function mI(e,n,r,o){e=e|0,n=n|0,r=r|0,o=o|0;var s=0;t[e+12>>2]=0,t[e+16>>2]=o;do if(n)if(n>>>0>1073741823)_n();else{s=Tt(n<<2)|0;break}else s=0;while(0);t[e>>2]=s,o=s+(r<<2)|0,t[e+8>>2]=o,t[e+4>>2]=o,t[e+12>>2]=s+(n<<2)}function vI(e,n){e=e|0,n=n|0;var r=0,o=0,s=0,l=0,d=0;o=t[e>>2]|0,d=e+4|0,l=n+4|0,s=(t[d>>2]|0)-o|0,r=(t[l>>2]|0)+(0-(s>>2)<<2)|0,t[l>>2]=r,(s|0)>0?(vn(r|0,o|0,s|0)|0,o=l,r=t[l>>2]|0):o=l,l=t[e>>2]|0,t[e>>2]=r,t[o>>2]=l,l=n+8|0,s=t[d>>2]|0,t[d>>2]=t[l>>2],t[l>>2]=s,l=e+8|0,d=n+12|0,e=t[l>>2]|0,t[l>>2]=t[d>>2],t[d>>2]=e,t[n>>2]=t[o>>2]}function gI(e){e=e|0;var n=0,r=0,o=0;n=t[e+4>>2]|0,r=e+8|0,o=t[r>>2]|0,(o|0)!=(n|0)&&(t[r>>2]=o+(~((o+-4-n|0)>>>2)<<2)),e=t[e>>2]|0,e|0&&Ve(e)}function m8(e,n,r,o){e=e|0,n=n|0,r=r|0,o=o|0;var s=0;t[e+12>>2]=0,t[e+16>>2]=o;do if(n)if(n>>>0>1073741823)_n();else{s=Tt(n<<2)|0;break}else s=0;while(0);t[e>>2]=s,o=s+(r<<2)|0,t[e+8>>2]=o,t[e+4>>2]=o,t[e+12>>2]=s+(n<<2)}function v8(e,n){e=e|0,n=n|0;var r=0,o=0,s=0,l=0,d=0;o=t[e>>2]|0,d=e+4|0,l=n+4|0,s=(t[d>>2]|0)-o|0,r=(t[l>>2]|0)+(0-(s>>2)<<2)|0,t[l>>2]=r,(s|0)>0?(vn(r|0,o|0,s|0)|0,o=l,r=t[l>>2]|0):o=l,l=t[e>>2]|0,t[e>>2]=r,t[o>>2]=l,l=n+8|0,s=t[d>>2]|0,t[d>>2]=t[l>>2],t[l>>2]=s,l=e+8|0,d=n+12|0,e=t[l>>2]|0,t[l>>2]=t[d>>2],t[d>>2]=e,t[n>>2]=t[o>>2]}function g8(e){e=e|0;var n=0,r=0,o=0;n=t[e+4>>2]|0,r=e+8|0,o=t[r>>2]|0,(o|0)!=(n|0)&&(t[r>>2]=o+(~((o+-4-n|0)>>>2)<<2)),e=t[e>>2]|0,e|0&&Ve(e)}function _I(e,n,r,o,s){e=e|0,n=n|0,r=r|0,o=o|0,s=s|0;var l=0,d=0,_=0,y=0,k=0,T=0,P=0,q=0,we=0,le=0,ie=0;if(ie=h,h=h+32|0,T=ie+20|0,P=ie+12|0,k=ie+16|0,q=ie+4|0,we=ie,le=ie+8|0,_=o8()|0,l=t[_>>2]|0,d=t[l>>2]|0,d|0)for(y=t[_+8>>2]|0,_=t[_+4>>2]|0;os(T,d),yI(e,T,_,y),l=l+4|0,d=t[l>>2]|0,d;)y=y+1|0,_=_+1|0;if(l=u8()|0,d=t[l>>2]|0,d|0)do os(T,d),t[P>>2]=t[l+4>>2],wI(n,T,P),l=l+8|0,d=t[l>>2]|0;while((d|0)!=0);if(l=t[(sa()|0)>>2]|0,l|0)do n=t[l+4>>2]|0,os(T,t[(la(n)|0)>>2]|0),t[P>>2]=A4(n)|0,DI(r,T,P),l=t[l>>2]|0;while((l|0)!=0);if(os(k,0),l=O4()|0,t[T>>2]=t[k>>2],s8(T,l,s),l=t[(sa()|0)>>2]|0,l|0){e=T+4|0,n=T+8|0,r=T+8|0;do{if(y=t[l+4>>2]|0,os(P,t[(la(y)|0)>>2]|0),EI(q,_8(y)|0),d=t[q>>2]|0,d|0){t[T>>2]=0,t[e>>2]=0,t[n>>2]=0;do os(we,t[(la(t[d+4>>2]|0)|0)>>2]|0),_=t[e>>2]|0,_>>>0<(t[r>>2]|0)>>>0?(t[_>>2]=t[we>>2],t[e>>2]=(t[e>>2]|0)+4):P4(T,we),d=t[d>>2]|0;while((d|0)!=0);SI(o,P,T),Rl(T)}t[le>>2]=t[P>>2],k=y8(y)|0,t[T>>2]=t[le>>2],s8(T,k,s),bd(q),l=t[l>>2]|0}while((l|0)!=0)}h=ie}function yI(e,n,r,o){e=e|0,n=n|0,r=r|0,o=o|0,RI(e,n,r,o)}function wI(e,n,r){e=e|0,n=n|0,r=r|0,LI(e,n,r)}function la(e){return e=e|0,e|0}function DI(e,n,r){e=e|0,n=n|0,r=r|0,II(e,n,r)}function _8(e){return e=e|0,e+16|0}function EI(e,n){e=e|0,n=n|0;var r=0,o=0,s=0,l=0,d=0,_=0,y=0;if(l=h,h=h+16|0,s=l+8|0,r=l,t[e>>2]=0,o=t[n>>2]|0,t[s>>2]=o,t[r>>2]=e,r=OI(r)|0,o|0){if(o=Tt(12)|0,d=(w8(s)|0)+4|0,e=t[d+4>>2]|0,n=o+4|0,t[n>>2]=t[d>>2],t[n+4>>2]=e,n=t[t[s>>2]>>2]|0,t[s>>2]=n,!n)e=o;else for(n=o;e=Tt(12)|0,y=(w8(s)|0)+4|0,_=t[y+4>>2]|0,d=e+4|0,t[d>>2]=t[y>>2],t[d+4>>2]=_,t[n>>2]=e,d=t[t[s>>2]>>2]|0,t[s>>2]=d,d;)n=e;t[e>>2]=t[r>>2],t[r>>2]=o}h=l}function SI(e,n,r){e=e|0,n=n|0,r=r|0,CI(e,n,r)}function y8(e){return e=e|0,e+24|0}function CI(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0,d=0,_=0;o=h,h=h+32|0,d=o+24|0,s=o+16|0,_=o+12|0,l=o,Zo(s),e=Oi(e)|0,t[_>>2]=t[n>>2],F4(l,r),t[d>>2]=t[_>>2],TI(e,d,l),Rl(l),eu(s),h=o}function TI(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0,d=0,_=0;o=h,h=h+32|0,d=o+16|0,_=o+12|0,s=o,l=ko(xI()|0)|0,t[_>>2]=t[n>>2],t[d>>2]=t[_>>2],n=lc(d)|0,t[s>>2]=t[r>>2],d=r+4|0,t[s+4>>2]=t[d>>2],_=r+8|0,t[s+8>>2]=t[_>>2],t[_>>2]=0,t[d>>2]=0,t[r>>2]=0,Ts(0,l|0,e|0,n|0,R4(s)|0)|0,Rl(s),h=o}function xI(){var e=0;return c[7976]|0||(kI(10720),e=7976,t[e>>2]=1,t[e+4>>2]=0),10720}function kI(e){e=e|0,Ao(e,AI()|0,2)}function AI(){return 1732}function OI(e){return e=e|0,t[e>>2]|0}function w8(e){return e=e|0,t[e>>2]|0}function II(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0,d=0;o=h,h=h+32|0,l=o+16|0,s=o+8|0,d=o,Zo(s),e=Oi(e)|0,t[d>>2]=t[n>>2],r=t[r>>2]|0,t[l>>2]=t[d>>2],D8(e,l,r),eu(s),h=o}function D8(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0,d=0;o=h,h=h+16|0,l=o+4|0,d=o,s=ko(PI()|0)|0,t[d>>2]=t[n>>2],t[l>>2]=t[d>>2],n=lc(l)|0,Ts(0,s|0,e|0,n|0,l8(r)|0)|0,h=o}function PI(){var e=0;return c[7984]|0||(MI(10732),e=7984,t[e>>2]=1,t[e+4>>2]=0),10732}function MI(e){e=e|0,Ao(e,FI()|0,2)}function FI(){return 1744}function LI(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0,d=0;o=h,h=h+32|0,l=o+16|0,s=o+8|0,d=o,Zo(s),e=Oi(e)|0,t[d>>2]=t[n>>2],r=t[r>>2]|0,t[l>>2]=t[d>>2],D8(e,l,r),eu(s),h=o}function RI(e,n,r,o){e=e|0,n=n|0,r=r|0,o=o|0;var s=0,l=0,d=0,_=0;s=h,h=h+32|0,d=s+16|0,l=s+8|0,_=s,Zo(l),e=Oi(e)|0,t[_>>2]=t[n>>2],r=c[r>>0]|0,o=c[o>>0]|0,t[d>>2]=t[_>>2],NI(e,d,r,o),eu(l),h=s}function NI(e,n,r,o){e=e|0,n=n|0,r=r|0,o=o|0;var s=0,l=0,d=0,_=0;s=h,h=h+16|0,d=s+4|0,_=s,l=ko(BI()|0)|0,t[_>>2]=t[n>>2],t[d>>2]=t[_>>2],n=lc(d)|0,r=fa(r)|0,Bu(0,l|0,e|0,n|0,r|0,fa(o)|0)|0,h=s}function BI(){var e=0;return c[7992]|0||(UI(10744),e=7992,t[e>>2]=1,t[e+4>>2]=0),10744}function fa(e){return e=e|0,jI(e)|0}function jI(e){return e=e|0,e&255|0}function UI(e){e=e|0,Ao(e,qI()|0,3)}function qI(){return 1756}function zI(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0,d=0,_=0,y=0,k=0,T=0,P=0,q=0;switch(q=h,h=h+32|0,_=q+8|0,y=q+4|0,k=q+20|0,T=q,_1(e,0),o=jF(n)|0,t[_>>2]=0,P=_+4|0,t[P>>2]=0,t[_+8>>2]=0,o<<24>>24){case 0:{c[k>>0]=0,WI(y,r,k),rh(e,y)|0,ei(y);break}case 8:{P=z4(n)|0,c[k>>0]=8,os(T,t[P+4>>2]|0),HI(y,r,k,T,P+8|0),rh(e,y)|0,ei(y);break}case 9:{if(l=z4(n)|0,n=t[l+4>>2]|0,n|0)for(d=_+8|0,s=l+12|0;n=n+-1|0,os(y,t[s>>2]|0),o=t[P>>2]|0,o>>>0<(t[d>>2]|0)>>>0?(t[o>>2]=t[y>>2],t[P>>2]=(t[P>>2]|0)+4):P4(_,y),n;)s=s+4|0;c[k>>0]=9,os(T,t[l+8>>2]|0),bI(y,r,k,T,_),rh(e,y)|0,ei(y);break}default:P=z4(n)|0,c[k>>0]=o,os(T,t[P+4>>2]|0),GI(y,r,k,T),rh(e,y)|0,ei(y)}Rl(_),h=q}function WI(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0;o=h,h=h+16|0,s=o,Zo(s),n=Oi(n)|0,iP(e,n,c[r>>0]|0),eu(s),h=o}function rh(e,n){e=e|0,n=n|0;var r=0;return r=t[e>>2]|0,r|0&&ju(r|0),t[e>>2]=t[n>>2],t[n>>2]=0,e|0}function HI(e,n,r,o,s){e=e|0,n=n|0,r=r|0,o=o|0,s=s|0;var l=0,d=0,_=0,y=0;l=h,h=h+32|0,_=l+16|0,d=l+8|0,y=l,Zo(d),n=Oi(n)|0,r=c[r>>0]|0,t[y>>2]=t[o>>2],s=t[s>>2]|0,t[_>>2]=t[y>>2],eP(e,n,r,_,s),eu(d),h=l}function bI(e,n,r,o,s){e=e|0,n=n|0,r=r|0,o=o|0,s=s|0;var l=0,d=0,_=0,y=0,k=0;l=h,h=h+32|0,y=l+24|0,d=l+16|0,k=l+12|0,_=l,Zo(d),n=Oi(n)|0,r=c[r>>0]|0,t[k>>2]=t[o>>2],F4(_,s),t[y>>2]=t[k>>2],XI(e,n,r,y,_),Rl(_),eu(d),h=l}function GI(e,n,r,o){e=e|0,n=n|0,r=r|0,o=o|0;var s=0,l=0,d=0,_=0;s=h,h=h+32|0,d=s+16|0,l=s+8|0,_=s,Zo(l),n=Oi(n)|0,r=c[r>>0]|0,t[_>>2]=t[o>>2],t[d>>2]=t[_>>2],VI(e,n,r,d),eu(l),h=s}function VI(e,n,r,o){e=e|0,n=n|0,r=r|0,o=o|0;var s=0,l=0,d=0,_=0;s=h,h=h+16|0,l=s+4|0,_=s,d=ko(YI()|0)|0,r=fa(r)|0,t[_>>2]=t[o>>2],t[l>>2]=t[_>>2],ih(e,Ts(0,d|0,n|0,r|0,lc(l)|0)|0),h=s}function YI(){var e=0;return c[8e3]|0||($I(10756),e=8e3,t[e>>2]=1,t[e+4>>2]=0),10756}function ih(e,n){e=e|0,n=n|0,_1(e,n)}function $I(e){e=e|0,Ao(e,KI()|0,2)}function KI(){return 1772}function XI(e,n,r,o,s){e=e|0,n=n|0,r=r|0,o=o|0,s=s|0;var l=0,d=0,_=0,y=0,k=0;l=h,h=h+32|0,y=l+16|0,k=l+12|0,d=l,_=ko(JI()|0)|0,r=fa(r)|0,t[k>>2]=t[o>>2],t[y>>2]=t[k>>2],o=lc(y)|0,t[d>>2]=t[s>>2],y=s+4|0,t[d+4>>2]=t[y>>2],k=s+8|0,t[d+8>>2]=t[k>>2],t[k>>2]=0,t[y>>2]=0,t[s>>2]=0,ih(e,Bu(0,_|0,n|0,r|0,o|0,R4(d)|0)|0),Rl(d),h=l}function JI(){var e=0;return c[8008]|0||(QI(10768),e=8008,t[e>>2]=1,t[e+4>>2]=0),10768}function QI(e){e=e|0,Ao(e,ZI()|0,3)}function ZI(){return 1784}function eP(e,n,r,o,s){e=e|0,n=n|0,r=r|0,o=o|0,s=s|0;var l=0,d=0,_=0,y=0;l=h,h=h+16|0,_=l+4|0,y=l,d=ko(tP()|0)|0,r=fa(r)|0,t[y>>2]=t[o>>2],t[_>>2]=t[y>>2],o=lc(_)|0,ih(e,Bu(0,d|0,n|0,r|0,o|0,L4(s)|0)|0),h=l}function tP(){var e=0;return c[8016]|0||(nP(10780),e=8016,t[e>>2]=1,t[e+4>>2]=0),10780}function nP(e){e=e|0,Ao(e,rP()|0,3)}function rP(){return 1800}function iP(e,n,r){e=e|0,n=n|0,r=r|0;var o=0;o=ko(oP()|0)|0,ih(e,sf(0,o|0,n|0,fa(r)|0)|0)}function oP(){var e=0;return c[8024]|0||(uP(10792),e=8024,t[e>>2]=1,t[e+4>>2]=0),10792}function uP(e){e=e|0,Ao(e,sP()|0,1)}function sP(){return 1816}function lP(){fP(),cP(),aP()}function fP(){t[2702]=K8(65536)|0}function cP(){PP(10856)}function aP(){dP(10816)}function dP(e){e=e|0,pP(e,5044),hP(e)|0}function pP(e,n){e=e|0,n=n|0;var r=0;r=a8()|0,t[e>>2]=r,TP(r,n),Cf(t[e>>2]|0)}function hP(e){e=e|0;var n=0;return n=t[e>>2]|0,uc(n,mP()|0),e|0}function mP(){var e=0;return c[8032]|0||(E8(10820),Bt(64,10820,Q|0)|0,e=8032,t[e>>2]=1,t[e+4>>2]=0),Dn(10820)|0||E8(10820),10820}function E8(e){e=e|0,_P(e),sc(e,25)}function vP(e){e=e|0,gP(e+24|0)}function gP(e){e=e|0;var n=0,r=0,o=0;r=t[e>>2]|0,o=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-8-o|0)>>>3)<<3)),Ve(r))}function _P(e){e=e|0;var n=0;n=An()|0,Nn(e,5,18,n,EP()|0,1),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function yP(e,n){e=e|0,n=n|0,wP(e,n)}function wP(e,n){e=e|0,n=n|0;var r=0,o=0,s=0;r=h,h=h+16|0,o=r,s=r+4|0,Ml(s,n),t[o>>2]=Fl(s,n)|0,DP(e,o),h=r}function DP(e,n){e=e|0,n=n|0,S8(e+4|0,t[n>>2]|0),c[e+8>>0]=1}function S8(e,n){e=e|0,n=n|0,t[e>>2]=n}function EP(){return 1824}function SP(e){return e=e|0,CP(e)|0}function CP(e){e=e|0;var n=0,r=0,o=0,s=0,l=0,d=0,_=0;return r=h,h=h+16|0,s=r+4|0,d=r,o=Qo(8)|0,n=o,_=Tt(4)|0,Ml(s,e),S8(_,Fl(s,e)|0),l=n+4|0,t[l>>2]=_,e=Tt(8)|0,l=t[l>>2]|0,t[d>>2]=0,t[s>>2]=t[d>>2],d8(e,l,s),t[o>>2]=e,h=r,n|0}function Qo(e){e=e|0;var n=0,r=0;return e=e+7&-8,(e>>>0<=32768?(n=t[2701]|0,e>>>0<=(65536-n|0)>>>0):0)?(r=(t[2702]|0)+n|0,t[2701]=n+e,e=r):(e=K8(e+8|0)|0,t[e>>2]=t[2703],t[2703]=e,e=e+8|0),e|0}function TP(e,n){e=e|0,n=n|0,t[e>>2]=xP()|0,t[e+4>>2]=kP()|0,t[e+12>>2]=n,t[e+8>>2]=AP()|0,t[e+32>>2]=9}function xP(){return 11744}function kP(){return 1832}function AP(){return th()|0}function OP(e,n,r,o){e=e|0,n=n|0,r=r|0,o=o|0,(Sf(o,896)|0)==512?r|0&&(IP(r),Ve(r)):n|0&&Ve(n)}function IP(e){e=e|0,e=t[e+4>>2]|0,e|0&&Tf(e)}function PP(e){e=e|0,MP(e,5052),FP(e)|0,LP(e,5058,26)|0,RP(e,5069,1)|0,NP(e,5077,10)|0,BP(e,5087,19)|0,jP(e,5094,27)|0}function MP(e,n){e=e|0,n=n|0;var r=0;r=IF()|0,t[e>>2]=r,PF(r,n),Cf(t[e>>2]|0)}function FP(e){e=e|0;var n=0;return n=t[e>>2]|0,uc(n,vF()|0),e|0}function LP(e,n,r){return e=e|0,n=n|0,r=r|0,QM(e,Zn(n)|0,r,0),e|0}function RP(e,n,r){return e=e|0,n=n|0,r=r|0,BM(e,Zn(n)|0,r,0),e|0}function NP(e,n,r){return e=e|0,n=n|0,r=r|0,mM(e,Zn(n)|0,r,0),e|0}function BP(e,n,r){return e=e|0,n=n|0,r=r|0,eM(e,Zn(n)|0,r,0),e|0}function C8(e,n){e=e|0,n=n|0;var r=0,o=0;e:for(;;){for(r=t[2703]|0;;){if((r|0)==(n|0))break e;if(o=t[r>>2]|0,t[2703]=o,!r)r=o;else break}Ve(r)}t[2701]=e}function jP(e,n,r){return e=e|0,n=n|0,r=r|0,UP(e,Zn(n)|0,r,0),e|0}function UP(e,n,r,o){e=e|0,n=n|0,r=r|0,o=o|0;var s=0,l=0;l=t[e>>2]|0,s=N4()|0,e=qP(r)|0,ur(l,n,s,e,zP(r,o)|0,o)}function N4(){var e=0,n=0;if(c[8040]|0||(x8(10860),Bt(65,10860,Q|0)|0,n=8040,t[n>>2]=1,t[n+4>>2]=0),!(Dn(10860)|0)){e=10860,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));x8(10860)}return 10860}function qP(e){return e=e|0,e|0}function zP(e,n){e=e|0,n=n|0;var r=0,o=0,s=0,l=0,d=0,_=0,y=0;return _=h,h=h+16|0,s=_,l=_+4|0,t[s>>2]=e,y=N4()|0,d=y+24|0,n=Lt(n,4)|0,t[l>>2]=n,r=y+28|0,o=t[r>>2]|0,o>>>0<(t[y+32>>2]|0)>>>0?(T8(o,e,n),n=(t[r>>2]|0)+8|0,t[r>>2]=n):(WP(d,s,l),n=t[r>>2]|0),h=_,(n-(t[d>>2]|0)>>3)+-1|0}function T8(e,n,r){e=e|0,n=n|0,r=r|0,t[e>>2]=n,t[e+4>>2]=r}function WP(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0,d=0,_=0,y=0,k=0,T=0;if(_=h,h=h+32|0,s=_,l=e+4|0,d=((t[l>>2]|0)-(t[e>>2]|0)>>3)+1|0,o=HP(e)|0,o>>>0>>0)$n(e);else{y=t[e>>2]|0,T=(t[e+8>>2]|0)-y|0,k=T>>2,bP(s,T>>3>>>0>>1>>>0?k>>>0>>0?d:k:o,(t[l>>2]|0)-y>>3,e+8|0),d=s+8|0,T8(t[d>>2]|0,t[n>>2]|0,t[r>>2]|0),t[d>>2]=(t[d>>2]|0)+8,GP(e,s),VP(s),h=_;return}}function HP(e){return e=e|0,536870911}function bP(e,n,r,o){e=e|0,n=n|0,r=r|0,o=o|0;var s=0;t[e+12>>2]=0,t[e+16>>2]=o;do if(n)if(n>>>0>536870911)_n();else{s=Tt(n<<3)|0;break}else s=0;while(0);t[e>>2]=s,o=s+(r<<3)|0,t[e+8>>2]=o,t[e+4>>2]=o,t[e+12>>2]=s+(n<<3)}function GP(e,n){e=e|0,n=n|0;var r=0,o=0,s=0,l=0,d=0;o=t[e>>2]|0,d=e+4|0,l=n+4|0,s=(t[d>>2]|0)-o|0,r=(t[l>>2]|0)+(0-(s>>3)<<3)|0,t[l>>2]=r,(s|0)>0?(vn(r|0,o|0,s|0)|0,o=l,r=t[l>>2]|0):o=l,l=t[e>>2]|0,t[e>>2]=r,t[o>>2]=l,l=n+8|0,s=t[d>>2]|0,t[d>>2]=t[l>>2],t[l>>2]=s,l=e+8|0,d=n+12|0,e=t[l>>2]|0,t[l>>2]=t[d>>2],t[d>>2]=e,t[n>>2]=t[o>>2]}function VP(e){e=e|0;var n=0,r=0,o=0;n=t[e+4>>2]|0,r=e+8|0,o=t[r>>2]|0,(o|0)!=(n|0)&&(t[r>>2]=o+(~((o+-8-n|0)>>>3)<<3)),e=t[e>>2]|0,e|0&&Ve(e)}function x8(e){e=e|0,KP(e)}function YP(e){e=e|0,$P(e+24|0)}function $P(e){e=e|0;var n=0,r=0,o=0;r=t[e>>2]|0,o=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-8-o|0)>>>3)<<3)),Ve(r))}function KP(e){e=e|0;var n=0;n=An()|0,Nn(e,1,11,n,XP()|0,2),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function XP(){return 1840}function JP(e,n,r){e=e|0,n=n|0,r=r|0,ZP(t[(QP(e)|0)>>2]|0,n,r)}function QP(e){return e=e|0,(t[(N4()|0)+24>>2]|0)+(e<<3)|0}function ZP(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0;o=h,h=h+16|0,l=o+1|0,s=o,Ml(l,n),n=Fl(l,n)|0,Ml(s,r),r=Fl(s,r)|0,Bl[e&31](n,r),h=o}function eM(e,n,r,o){e=e|0,n=n|0,r=r|0,o=o|0;var s=0,l=0;l=t[e>>2]|0,s=B4()|0,e=tM(r)|0,ur(l,n,s,e,nM(r,o)|0,o)}function B4(){var e=0,n=0;if(c[8048]|0||(A8(10896),Bt(66,10896,Q|0)|0,n=8048,t[n>>2]=1,t[n+4>>2]=0),!(Dn(10896)|0)){e=10896,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));A8(10896)}return 10896}function tM(e){return e=e|0,e|0}function nM(e,n){e=e|0,n=n|0;var r=0,o=0,s=0,l=0,d=0,_=0,y=0;return _=h,h=h+16|0,s=_,l=_+4|0,t[s>>2]=e,y=B4()|0,d=y+24|0,n=Lt(n,4)|0,t[l>>2]=n,r=y+28|0,o=t[r>>2]|0,o>>>0<(t[y+32>>2]|0)>>>0?(k8(o,e,n),n=(t[r>>2]|0)+8|0,t[r>>2]=n):(rM(d,s,l),n=t[r>>2]|0),h=_,(n-(t[d>>2]|0)>>3)+-1|0}function k8(e,n,r){e=e|0,n=n|0,r=r|0,t[e>>2]=n,t[e+4>>2]=r}function rM(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0,d=0,_=0,y=0,k=0,T=0;if(_=h,h=h+32|0,s=_,l=e+4|0,d=((t[l>>2]|0)-(t[e>>2]|0)>>3)+1|0,o=iM(e)|0,o>>>0>>0)$n(e);else{y=t[e>>2]|0,T=(t[e+8>>2]|0)-y|0,k=T>>2,oM(s,T>>3>>>0>>1>>>0?k>>>0>>0?d:k:o,(t[l>>2]|0)-y>>3,e+8|0),d=s+8|0,k8(t[d>>2]|0,t[n>>2]|0,t[r>>2]|0),t[d>>2]=(t[d>>2]|0)+8,uM(e,s),sM(s),h=_;return}}function iM(e){return e=e|0,536870911}function oM(e,n,r,o){e=e|0,n=n|0,r=r|0,o=o|0;var s=0;t[e+12>>2]=0,t[e+16>>2]=o;do if(n)if(n>>>0>536870911)_n();else{s=Tt(n<<3)|0;break}else s=0;while(0);t[e>>2]=s,o=s+(r<<3)|0,t[e+8>>2]=o,t[e+4>>2]=o,t[e+12>>2]=s+(n<<3)}function uM(e,n){e=e|0,n=n|0;var r=0,o=0,s=0,l=0,d=0;o=t[e>>2]|0,d=e+4|0,l=n+4|0,s=(t[d>>2]|0)-o|0,r=(t[l>>2]|0)+(0-(s>>3)<<3)|0,t[l>>2]=r,(s|0)>0?(vn(r|0,o|0,s|0)|0,o=l,r=t[l>>2]|0):o=l,l=t[e>>2]|0,t[e>>2]=r,t[o>>2]=l,l=n+8|0,s=t[d>>2]|0,t[d>>2]=t[l>>2],t[l>>2]=s,l=e+8|0,d=n+12|0,e=t[l>>2]|0,t[l>>2]=t[d>>2],t[d>>2]=e,t[n>>2]=t[o>>2]}function sM(e){e=e|0;var n=0,r=0,o=0;n=t[e+4>>2]|0,r=e+8|0,o=t[r>>2]|0,(o|0)!=(n|0)&&(t[r>>2]=o+(~((o+-8-n|0)>>>3)<<3)),e=t[e>>2]|0,e|0&&Ve(e)}function A8(e){e=e|0,cM(e)}function lM(e){e=e|0,fM(e+24|0)}function fM(e){e=e|0;var n=0,r=0,o=0;r=t[e>>2]|0,o=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-8-o|0)>>>3)<<3)),Ve(r))}function cM(e){e=e|0;var n=0;n=An()|0,Nn(e,1,11,n,aM()|0,1),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function aM(){return 1852}function dM(e,n){return e=e|0,n=n|0,hM(t[(pM(e)|0)>>2]|0,n)|0}function pM(e){return e=e|0,(t[(B4()|0)+24>>2]|0)+(e<<3)|0}function hM(e,n){e=e|0,n=n|0;var r=0,o=0;return r=h,h=h+16|0,o=r,Ml(o,n),n=Fl(o,n)|0,n=ea(dc[e&31](n)|0)|0,h=r,n|0}function mM(e,n,r,o){e=e|0,n=n|0,r=r|0,o=o|0;var s=0,l=0;l=t[e>>2]|0,s=j4()|0,e=vM(r)|0,ur(l,n,s,e,gM(r,o)|0,o)}function j4(){var e=0,n=0;if(c[8056]|0||(I8(10932),Bt(67,10932,Q|0)|0,n=8056,t[n>>2]=1,t[n+4>>2]=0),!(Dn(10932)|0)){e=10932,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));I8(10932)}return 10932}function vM(e){return e=e|0,e|0}function gM(e,n){e=e|0,n=n|0;var r=0,o=0,s=0,l=0,d=0,_=0,y=0;return _=h,h=h+16|0,s=_,l=_+4|0,t[s>>2]=e,y=j4()|0,d=y+24|0,n=Lt(n,4)|0,t[l>>2]=n,r=y+28|0,o=t[r>>2]|0,o>>>0<(t[y+32>>2]|0)>>>0?(O8(o,e,n),n=(t[r>>2]|0)+8|0,t[r>>2]=n):(_M(d,s,l),n=t[r>>2]|0),h=_,(n-(t[d>>2]|0)>>3)+-1|0}function O8(e,n,r){e=e|0,n=n|0,r=r|0,t[e>>2]=n,t[e+4>>2]=r}function _M(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0,d=0,_=0,y=0,k=0,T=0;if(_=h,h=h+32|0,s=_,l=e+4|0,d=((t[l>>2]|0)-(t[e>>2]|0)>>3)+1|0,o=yM(e)|0,o>>>0>>0)$n(e);else{y=t[e>>2]|0,T=(t[e+8>>2]|0)-y|0,k=T>>2,wM(s,T>>3>>>0>>1>>>0?k>>>0>>0?d:k:o,(t[l>>2]|0)-y>>3,e+8|0),d=s+8|0,O8(t[d>>2]|0,t[n>>2]|0,t[r>>2]|0),t[d>>2]=(t[d>>2]|0)+8,DM(e,s),EM(s),h=_;return}}function yM(e){return e=e|0,536870911}function wM(e,n,r,o){e=e|0,n=n|0,r=r|0,o=o|0;var s=0;t[e+12>>2]=0,t[e+16>>2]=o;do if(n)if(n>>>0>536870911)_n();else{s=Tt(n<<3)|0;break}else s=0;while(0);t[e>>2]=s,o=s+(r<<3)|0,t[e+8>>2]=o,t[e+4>>2]=o,t[e+12>>2]=s+(n<<3)}function DM(e,n){e=e|0,n=n|0;var r=0,o=0,s=0,l=0,d=0;o=t[e>>2]|0,d=e+4|0,l=n+4|0,s=(t[d>>2]|0)-o|0,r=(t[l>>2]|0)+(0-(s>>3)<<3)|0,t[l>>2]=r,(s|0)>0?(vn(r|0,o|0,s|0)|0,o=l,r=t[l>>2]|0):o=l,l=t[e>>2]|0,t[e>>2]=r,t[o>>2]=l,l=n+8|0,s=t[d>>2]|0,t[d>>2]=t[l>>2],t[l>>2]=s,l=e+8|0,d=n+12|0,e=t[l>>2]|0,t[l>>2]=t[d>>2],t[d>>2]=e,t[n>>2]=t[o>>2]}function EM(e){e=e|0;var n=0,r=0,o=0;n=t[e+4>>2]|0,r=e+8|0,o=t[r>>2]|0,(o|0)!=(n|0)&&(t[r>>2]=o+(~((o+-8-n|0)>>>3)<<3)),e=t[e>>2]|0,e|0&&Ve(e)}function I8(e){e=e|0,TM(e)}function SM(e){e=e|0,CM(e+24|0)}function CM(e){e=e|0;var n=0,r=0,o=0;r=t[e>>2]|0,o=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-8-o|0)>>>3)<<3)),Ve(r))}function TM(e){e=e|0;var n=0;n=An()|0,Nn(e,1,7,n,xM()|0,2),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function xM(){return 1860}function kM(e,n,r){return e=e|0,n=n|0,r=r|0,OM(t[(AM(e)|0)>>2]|0,n,r)|0}function AM(e){return e=e|0,(t[(j4()|0)+24>>2]|0)+(e<<3)|0}function OM(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0,d=0,_=0,y=0;return o=h,h=h+32|0,d=o+12|0,l=o+8|0,_=o,y=o+16|0,s=o+4|0,IM(y,n),PM(_,y,n),$s(s,r),r=Ks(s,r)|0,t[d>>2]=t[_>>2],X1[e&15](l,d,r),r=MM(l)|0,ei(l),Xs(s),h=o,r|0}function IM(e,n){e=e|0,n=n|0}function PM(e,n,r){e=e|0,n=n|0,r=r|0,FM(e,r)}function MM(e){return e=e|0,Oi(e)|0}function FM(e,n){e=e|0,n=n|0;var r=0,o=0,s=0;s=h,h=h+16|0,r=s,o=n,o&1?(LM(r,0),c0(o|0,r|0)|0,RM(e,r),NM(r)):t[e>>2]=t[n>>2],h=s}function LM(e,n){e=e|0,n=n|0,wd(e,n),t[e+4>>2]=0,c[e+8>>0]=0}function RM(e,n){e=e|0,n=n|0,t[e>>2]=t[n+4>>2]}function NM(e){e=e|0,c[e+8>>0]=0}function BM(e,n,r,o){e=e|0,n=n|0,r=r|0,o=o|0;var s=0,l=0;l=t[e>>2]|0,s=U4()|0,e=jM(r)|0,ur(l,n,s,e,UM(r,o)|0,o)}function U4(){var e=0,n=0;if(c[8064]|0||(M8(10968),Bt(68,10968,Q|0)|0,n=8064,t[n>>2]=1,t[n+4>>2]=0),!(Dn(10968)|0)){e=10968,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));M8(10968)}return 10968}function jM(e){return e=e|0,e|0}function UM(e,n){e=e|0,n=n|0;var r=0,o=0,s=0,l=0,d=0,_=0,y=0;return _=h,h=h+16|0,s=_,l=_+4|0,t[s>>2]=e,y=U4()|0,d=y+24|0,n=Lt(n,4)|0,t[l>>2]=n,r=y+28|0,o=t[r>>2]|0,o>>>0<(t[y+32>>2]|0)>>>0?(P8(o,e,n),n=(t[r>>2]|0)+8|0,t[r>>2]=n):(qM(d,s,l),n=t[r>>2]|0),h=_,(n-(t[d>>2]|0)>>3)+-1|0}function P8(e,n,r){e=e|0,n=n|0,r=r|0,t[e>>2]=n,t[e+4>>2]=r}function qM(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0,d=0,_=0,y=0,k=0,T=0;if(_=h,h=h+32|0,s=_,l=e+4|0,d=((t[l>>2]|0)-(t[e>>2]|0)>>3)+1|0,o=zM(e)|0,o>>>0>>0)$n(e);else{y=t[e>>2]|0,T=(t[e+8>>2]|0)-y|0,k=T>>2,WM(s,T>>3>>>0>>1>>>0?k>>>0>>0?d:k:o,(t[l>>2]|0)-y>>3,e+8|0),d=s+8|0,P8(t[d>>2]|0,t[n>>2]|0,t[r>>2]|0),t[d>>2]=(t[d>>2]|0)+8,HM(e,s),bM(s),h=_;return}}function zM(e){return e=e|0,536870911}function WM(e,n,r,o){e=e|0,n=n|0,r=r|0,o=o|0;var s=0;t[e+12>>2]=0,t[e+16>>2]=o;do if(n)if(n>>>0>536870911)_n();else{s=Tt(n<<3)|0;break}else s=0;while(0);t[e>>2]=s,o=s+(r<<3)|0,t[e+8>>2]=o,t[e+4>>2]=o,t[e+12>>2]=s+(n<<3)}function HM(e,n){e=e|0,n=n|0;var r=0,o=0,s=0,l=0,d=0;o=t[e>>2]|0,d=e+4|0,l=n+4|0,s=(t[d>>2]|0)-o|0,r=(t[l>>2]|0)+(0-(s>>3)<<3)|0,t[l>>2]=r,(s|0)>0?(vn(r|0,o|0,s|0)|0,o=l,r=t[l>>2]|0):o=l,l=t[e>>2]|0,t[e>>2]=r,t[o>>2]=l,l=n+8|0,s=t[d>>2]|0,t[d>>2]=t[l>>2],t[l>>2]=s,l=e+8|0,d=n+12|0,e=t[l>>2]|0,t[l>>2]=t[d>>2],t[d>>2]=e,t[n>>2]=t[o>>2]}function bM(e){e=e|0;var n=0,r=0,o=0;n=t[e+4>>2]|0,r=e+8|0,o=t[r>>2]|0,(o|0)!=(n|0)&&(t[r>>2]=o+(~((o+-8-n|0)>>>3)<<3)),e=t[e>>2]|0,e|0&&Ve(e)}function M8(e){e=e|0,YM(e)}function GM(e){e=e|0,VM(e+24|0)}function VM(e){e=e|0;var n=0,r=0,o=0;r=t[e>>2]|0,o=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-8-o|0)>>>3)<<3)),Ve(r))}function YM(e){e=e|0;var n=0;n=An()|0,Nn(e,1,1,n,$M()|0,5),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function $M(){return 1872}function KM(e,n,r,o,s,l){e=e|0,n=n|0,r=r|0,o=o|0,s=s|0,l=l|0,JM(t[(XM(e)|0)>>2]|0,n,r,o,s,l)}function XM(e){return e=e|0,(t[(U4()|0)+24>>2]|0)+(e<<3)|0}function JM(e,n,r,o,s,l){e=e|0,n=n|0,r=r|0,o=o|0,s=s|0,l=l|0;var d=0,_=0,y=0,k=0,T=0,P=0;d=h,h=h+32|0,_=d+16|0,y=d+12|0,k=d+8|0,T=d+4|0,P=d,$s(_,n),n=Ks(_,n)|0,$s(y,r),r=Ks(y,r)|0,$s(k,o),o=Ks(k,o)|0,$s(T,s),s=Ks(T,s)|0,$s(P,l),l=Ks(P,l)|0,eD[e&1](n,r,o,s,l),Xs(P),Xs(T),Xs(k),Xs(y),Xs(_),h=d}function QM(e,n,r,o){e=e|0,n=n|0,r=r|0,o=o|0;var s=0,l=0;l=t[e>>2]|0,s=q4()|0,e=ZM(r)|0,ur(l,n,s,e,eF(r,o)|0,o)}function q4(){var e=0,n=0;if(c[8072]|0||(L8(11004),Bt(69,11004,Q|0)|0,n=8072,t[n>>2]=1,t[n+4>>2]=0),!(Dn(11004)|0)){e=11004,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));L8(11004)}return 11004}function ZM(e){return e=e|0,e|0}function eF(e,n){e=e|0,n=n|0;var r=0,o=0,s=0,l=0,d=0,_=0,y=0;return _=h,h=h+16|0,s=_,l=_+4|0,t[s>>2]=e,y=q4()|0,d=y+24|0,n=Lt(n,4)|0,t[l>>2]=n,r=y+28|0,o=t[r>>2]|0,o>>>0<(t[y+32>>2]|0)>>>0?(F8(o,e,n),n=(t[r>>2]|0)+8|0,t[r>>2]=n):(tF(d,s,l),n=t[r>>2]|0),h=_,(n-(t[d>>2]|0)>>3)+-1|0}function F8(e,n,r){e=e|0,n=n|0,r=r|0,t[e>>2]=n,t[e+4>>2]=r}function tF(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0,d=0,_=0,y=0,k=0,T=0;if(_=h,h=h+32|0,s=_,l=e+4|0,d=((t[l>>2]|0)-(t[e>>2]|0)>>3)+1|0,o=nF(e)|0,o>>>0>>0)$n(e);else{y=t[e>>2]|0,T=(t[e+8>>2]|0)-y|0,k=T>>2,rF(s,T>>3>>>0>>1>>>0?k>>>0>>0?d:k:o,(t[l>>2]|0)-y>>3,e+8|0),d=s+8|0,F8(t[d>>2]|0,t[n>>2]|0,t[r>>2]|0),t[d>>2]=(t[d>>2]|0)+8,iF(e,s),oF(s),h=_;return}}function nF(e){return e=e|0,536870911}function rF(e,n,r,o){e=e|0,n=n|0,r=r|0,o=o|0;var s=0;t[e+12>>2]=0,t[e+16>>2]=o;do if(n)if(n>>>0>536870911)_n();else{s=Tt(n<<3)|0;break}else s=0;while(0);t[e>>2]=s,o=s+(r<<3)|0,t[e+8>>2]=o,t[e+4>>2]=o,t[e+12>>2]=s+(n<<3)}function iF(e,n){e=e|0,n=n|0;var r=0,o=0,s=0,l=0,d=0;o=t[e>>2]|0,d=e+4|0,l=n+4|0,s=(t[d>>2]|0)-o|0,r=(t[l>>2]|0)+(0-(s>>3)<<3)|0,t[l>>2]=r,(s|0)>0?(vn(r|0,o|0,s|0)|0,o=l,r=t[l>>2]|0):o=l,l=t[e>>2]|0,t[e>>2]=r,t[o>>2]=l,l=n+8|0,s=t[d>>2]|0,t[d>>2]=t[l>>2],t[l>>2]=s,l=e+8|0,d=n+12|0,e=t[l>>2]|0,t[l>>2]=t[d>>2],t[d>>2]=e,t[n>>2]=t[o>>2]}function oF(e){e=e|0;var n=0,r=0,o=0;n=t[e+4>>2]|0,r=e+8|0,o=t[r>>2]|0,(o|0)!=(n|0)&&(t[r>>2]=o+(~((o+-8-n|0)>>>3)<<3)),e=t[e>>2]|0,e|0&&Ve(e)}function L8(e){e=e|0,lF(e)}function uF(e){e=e|0,sF(e+24|0)}function sF(e){e=e|0;var n=0,r=0,o=0;r=t[e>>2]|0,o=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-8-o|0)>>>3)<<3)),Ve(r))}function lF(e){e=e|0;var n=0;n=An()|0,Nn(e,1,12,n,fF()|0,2),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function fF(){return 1896}function cF(e,n,r){e=e|0,n=n|0,r=r|0,dF(t[(aF(e)|0)>>2]|0,n,r)}function aF(e){return e=e|0,(t[(q4()|0)+24>>2]|0)+(e<<3)|0}function dF(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0;o=h,h=h+16|0,l=o+4|0,s=o,pF(l,n),n=hF(l,n)|0,$s(s,r),r=Ks(s,r)|0,Bl[e&31](n,r),Xs(s),h=o}function pF(e,n){e=e|0,n=n|0}function hF(e,n){return e=e|0,n=n|0,mF(n)|0}function mF(e){return e=e|0,e|0}function vF(){var e=0;return c[8080]|0||(R8(11040),Bt(70,11040,Q|0)|0,e=8080,t[e>>2]=1,t[e+4>>2]=0),Dn(11040)|0||R8(11040),11040}function R8(e){e=e|0,yF(e),sc(e,71)}function gF(e){e=e|0,_F(e+24|0)}function _F(e){e=e|0;var n=0,r=0,o=0;r=t[e>>2]|0,o=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-8-o|0)>>>3)<<3)),Ve(r))}function yF(e){e=e|0;var n=0;n=An()|0,Nn(e,5,7,n,SF()|0,0),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function wF(e){e=e|0,DF(e)}function DF(e){e=e|0,EF(e)}function EF(e){e=e|0,c[e+8>>0]=1}function SF(){return 1936}function CF(){return TF()|0}function TF(){var e=0,n=0,r=0,o=0,s=0,l=0,d=0;return n=h,h=h+16|0,s=n+4|0,d=n,r=Qo(8)|0,e=r,l=e+4|0,t[l>>2]=Tt(1)|0,o=Tt(8)|0,l=t[l>>2]|0,t[d>>2]=0,t[s>>2]=t[d>>2],xF(o,l,s),t[r>>2]=o,h=n,e|0}function xF(e,n,r){e=e|0,n=n|0,r=r|0,t[e>>2]=n,r=Tt(16)|0,t[r+4>>2]=0,t[r+8>>2]=0,t[r>>2]=1916,t[r+12>>2]=n,t[e+4>>2]=r}function kF(e){e=e|0,da(e),Ve(e)}function AF(e){e=e|0,e=t[e+12>>2]|0,e|0&&Ve(e)}function OF(e){e=e|0,Ve(e)}function IF(){var e=0;return c[8088]|0||(BF(11076),Bt(25,11076,Q|0)|0,e=8088,t[e>>2]=1,t[e+4>>2]=0),11076}function PF(e,n){e=e|0,n=n|0,t[e>>2]=MF()|0,t[e+4>>2]=FF()|0,t[e+12>>2]=n,t[e+8>>2]=LF()|0,t[e+32>>2]=10}function MF(){return 11745}function FF(){return 1940}function LF(){return eh()|0}function RF(e,n,r,o){e=e|0,n=n|0,r=r|0,o=o|0,(Sf(o,896)|0)==512?r|0&&(NF(r),Ve(r)):n|0&&Ve(n)}function NF(e){e=e|0,e=t[e+4>>2]|0,e|0&&Tf(e)}function BF(e){e=e|0,Ys(e)}function os(e,n){e=e|0,n=n|0,t[e>>2]=n}function z4(e){return e=e|0,t[e>>2]|0}function jF(e){return e=e|0,c[t[e>>2]>>0]|0}function UF(e,n){e=e|0,n=n|0;var r=0,o=0;r=h,h=h+16|0,o=r,t[o>>2]=t[e>>2],qF(n,o)|0,h=r}function qF(e,n){e=e|0,n=n|0;var r=0;return r=zF(t[e>>2]|0,n)|0,n=e+4|0,t[(t[n>>2]|0)+8>>2]=r,t[(t[n>>2]|0)+8>>2]|0}function zF(e,n){e=e|0,n=n|0;var r=0,o=0;return r=h,h=h+16|0,o=r,Zo(o),e=Oi(e)|0,n=WF(e,t[n>>2]|0)|0,eu(o),h=r,n|0}function Zo(e){e=e|0,t[e>>2]=t[2701],t[e+4>>2]=t[2703]}function WF(e,n){e=e|0,n=n|0;var r=0;return r=ko(HF()|0)|0,sf(0,r|0,e|0,L4(n)|0)|0}function eu(e){e=e|0,C8(t[e>>2]|0,t[e+4>>2]|0)}function HF(){var e=0;return c[8096]|0||(bF(11120),e=8096,t[e>>2]=1,t[e+4>>2]=0),11120}function bF(e){e=e|0,Ao(e,GF()|0,1)}function GF(){return 1948}function VF(){YF()}function YF(){var e=0,n=0,r=0,o=0,s=0,l=0,d=0,_=0,y=0,k=0,T=0,P=0,q=0,we=0,le=0,ie=0;if(le=h,h=h+16|0,T=le+4|0,P=le,si(65536,10804,t[2702]|0,10812),r=o8()|0,n=t[r>>2]|0,e=t[n>>2]|0,e|0)for(o=t[r+8>>2]|0,r=t[r+4>>2]|0;As(e|0,C[r>>0]|0|0,c[o>>0]|0),n=n+4|0,e=t[n>>2]|0,e;)o=o+1|0,r=r+1|0;if(e=u8()|0,n=t[e>>2]|0,n|0)do uu(n|0,t[e+4>>2]|0),e=e+8|0,n=t[e>>2]|0;while((n|0)!=0);uu($F()|0,5167),k=sa()|0,e=t[k>>2]|0;e:do if(e|0){do KF(t[e+4>>2]|0),e=t[e>>2]|0;while((e|0)!=0);if(e=t[k>>2]|0,e|0){y=k;do{for(;s=e,e=t[e>>2]|0,s=t[s+4>>2]|0,!!(XF(s)|0);)if(t[P>>2]=y,t[T>>2]=t[P>>2],JF(k,T)|0,!e)break e;if(QF(s),y=t[y>>2]|0,n=N8(s)|0,l=Wo()|0,d=h,h=h+((1*(n<<2)|0)+15&-16)|0,_=h,h=h+((1*(n<<2)|0)+15&-16)|0,n=t[(_8(s)|0)>>2]|0,n|0)for(r=d,o=_;t[r>>2]=t[(la(t[n+4>>2]|0)|0)>>2],t[o>>2]=t[n+8>>2],n=t[n>>2]|0,n;)r=r+4|0,o=o+4|0;ie=la(s)|0,n=ZF(s)|0,r=N8(s)|0,o=eL(s)|0,Is(ie|0,n|0,d|0,_|0,r|0,o|0,A4(s)|0),b0(l|0)}while((e|0)!=0)}}while(0);if(e=t[(O4()|0)>>2]|0,e|0)do ie=e+4|0,k=I4(ie)|0,s=V1(k)|0,l=b1(k)|0,d=(G1(k)|0)+1|0,_=oh(k)|0,y=B8(ie)|0,k=Dn(k)|0,T=nh(ie)|0,P=W4(ie)|0,zo(0,s|0,l|0,d|0,_|0,y|0,k|0,T|0,P|0,H4(ie)|0),e=t[e>>2]|0;while((e|0)!=0);e=t[(sa()|0)>>2]|0;e:do if(e|0){t:for(;;){if(n=t[e+4>>2]|0,n|0?(q=t[(la(n)|0)>>2]|0,we=t[(y8(n)|0)>>2]|0,we|0):0){r=we;do{n=r+4|0,o=I4(n)|0;n:do if(o|0)switch(Dn(o)|0){case 0:break t;case 4:case 3:case 2:{_=V1(o)|0,y=b1(o)|0,k=(G1(o)|0)+1|0,T=oh(o)|0,P=Dn(o)|0,ie=nh(n)|0,zo(q|0,_|0,y|0,k|0,T|0,0,P|0,ie|0,W4(n)|0,H4(n)|0);break n}case 1:{d=V1(o)|0,_=b1(o)|0,y=(G1(o)|0)+1|0,k=oh(o)|0,T=B8(n)|0,P=Dn(o)|0,ie=nh(n)|0,zo(q|0,d|0,_|0,y|0,k|0,T|0,P|0,ie|0,W4(n)|0,H4(n)|0);break n}case 5:{k=V1(o)|0,T=b1(o)|0,P=(G1(o)|0)+1|0,ie=oh(o)|0,zo(q|0,k|0,T|0,P|0,ie|0,tL(o)|0,Dn(o)|0,0,0,0);break n}default:break n}while(0);r=t[r>>2]|0}while((r|0)!=0)}if(e=t[e>>2]|0,!e)break e}_n()}while(0);uf(),h=le}function $F(){return 11703}function KF(e){e=e|0,c[e+40>>0]=0}function XF(e){return e=e|0,(c[e+40>>0]|0)!=0|0}function JF(e,n){return e=e|0,n=n|0,n=nL(n)|0,e=t[n>>2]|0,t[n>>2]=t[e>>2],Ve(e),t[n>>2]|0}function QF(e){e=e|0,c[e+40>>0]=1}function N8(e){return e=e|0,t[e+20>>2]|0}function ZF(e){return e=e|0,t[e+8>>2]|0}function eL(e){return e=e|0,t[e+32>>2]|0}function oh(e){return e=e|0,t[e+4>>2]|0}function B8(e){return e=e|0,t[e+4>>2]|0}function W4(e){return e=e|0,t[e+8>>2]|0}function H4(e){return e=e|0,t[e+16>>2]|0}function tL(e){return e=e|0,t[e+20>>2]|0}function nL(e){return e=e|0,t[e>>2]|0}function uh(e){e=e|0;var n=0,r=0,o=0,s=0,l=0,d=0,_=0,y=0,k=0,T=0,P=0,q=0,we=0,le=0,ie=0,Pe=0,ke=0,qe=0,pe=0,_e=0,vt=0;vt=h,h=h+16|0,q=vt;do if(e>>>0<245){if(k=e>>>0<11?16:e+11&-8,e=k>>>3,P=t[2783]|0,r=P>>>e,r&3|0)return n=(r&1^1)+e|0,e=11172+(n<<1<<2)|0,r=e+8|0,o=t[r>>2]|0,s=o+8|0,l=t[s>>2]|0,(e|0)==(l|0)?t[2783]=P&~(1<>2]=e,t[r>>2]=l),_e=n<<3,t[o+4>>2]=_e|3,_e=o+_e+4|0,t[_e>>2]=t[_e>>2]|1,_e=s,h=vt,_e|0;if(T=t[2785]|0,k>>>0>T>>>0){if(r|0)return n=2<>>12&16,n=n>>>d,r=n>>>5&8,n=n>>>r,s=n>>>2&4,n=n>>>s,e=n>>>1&2,n=n>>>e,o=n>>>1&1,o=(r|d|s|e|o)+(n>>>o)|0,n=11172+(o<<1<<2)|0,e=n+8|0,s=t[e>>2]|0,d=s+8|0,r=t[d>>2]|0,(n|0)==(r|0)?(e=P&~(1<>2]=n,t[e>>2]=r,e=P),l=(o<<3)-k|0,t[s+4>>2]=k|3,o=s+k|0,t[o+4>>2]=l|1,t[o+l>>2]=l,T|0&&(s=t[2788]|0,n=T>>>3,r=11172+(n<<1<<2)|0,n=1<>2]|0):(t[2783]=e|n,n=r,e=r+8|0),t[e>>2]=s,t[n+12>>2]=s,t[s+8>>2]=n,t[s+12>>2]=r),t[2785]=l,t[2788]=o,_e=d,h=vt,_e|0;if(_=t[2784]|0,_){if(r=(_&0-_)+-1|0,d=r>>>12&16,r=r>>>d,l=r>>>5&8,r=r>>>l,y=r>>>2&4,r=r>>>y,o=r>>>1&2,r=r>>>o,e=r>>>1&1,e=t[11436+((l|d|y|o|e)+(r>>>e)<<2)>>2]|0,r=(t[e+4>>2]&-8)-k|0,o=t[e+16+(((t[e+16>>2]|0)==0&1)<<2)>>2]|0,!o)y=e,l=r;else{do d=(t[o+4>>2]&-8)-k|0,y=d>>>0>>0,r=y?d:r,e=y?o:e,o=t[o+16+(((t[o+16>>2]|0)==0&1)<<2)>>2]|0;while((o|0)!=0);y=e,l=r}if(d=y+k|0,y>>>0>>0){s=t[y+24>>2]|0,n=t[y+12>>2]|0;do if((n|0)==(y|0)){if(e=y+20|0,n=t[e>>2]|0,!n&&(e=y+16|0,n=t[e>>2]|0,!n)){r=0;break}for(;;){if(r=n+20|0,o=t[r>>2]|0,o|0){n=o,e=r;continue}if(r=n+16|0,o=t[r>>2]|0,o)n=o,e=r;else break}t[e>>2]=0,r=n}else r=t[y+8>>2]|0,t[r+12>>2]=n,t[n+8>>2]=r,r=n;while(0);do if(s|0){if(n=t[y+28>>2]|0,e=11436+(n<<2)|0,(y|0)==(t[e>>2]|0)){if(t[e>>2]=r,!r){t[2784]=_&~(1<>2]|0)!=(y|0)&1)<<2)>>2]=r,!r)break;t[r+24>>2]=s,n=t[y+16>>2]|0,n|0&&(t[r+16>>2]=n,t[n+24>>2]=r),n=t[y+20>>2]|0,n|0&&(t[r+20>>2]=n,t[n+24>>2]=r)}while(0);return l>>>0<16?(_e=l+k|0,t[y+4>>2]=_e|3,_e=y+_e+4|0,t[_e>>2]=t[_e>>2]|1):(t[y+4>>2]=k|3,t[d+4>>2]=l|1,t[d+l>>2]=l,T|0&&(o=t[2788]|0,n=T>>>3,r=11172+(n<<1<<2)|0,n=1<>2]|0):(t[2783]=P|n,n=r,e=r+8|0),t[e>>2]=o,t[n+12>>2]=o,t[o+8>>2]=n,t[o+12>>2]=r),t[2785]=l,t[2788]=d),_e=y+8|0,h=vt,_e|0}else P=k}else P=k}else P=k}else if(e>>>0<=4294967231)if(e=e+11|0,k=e&-8,y=t[2784]|0,y){o=0-k|0,e=e>>>8,e?k>>>0>16777215?_=31:(P=(e+1048320|0)>>>16&8,pe=e<>>16&4,pe=pe<>>16&2,_=14-(T|P|_)+(pe<<_>>>15)|0,_=k>>>(_+7|0)&1|_<<1):_=0,r=t[11436+(_<<2)>>2]|0;e:do if(!r)r=0,e=0,pe=57;else for(e=0,d=k<<((_|0)==31?0:25-(_>>>1)|0),l=0;;){if(s=(t[r+4>>2]&-8)-k|0,s>>>0>>0)if(s)e=r,o=s;else{e=r,o=0,s=r,pe=61;break e}if(s=t[r+20>>2]|0,r=t[r+16+(d>>>31<<2)>>2]|0,l=(s|0)==0|(s|0)==(r|0)?l:s,s=(r|0)==0,s){r=l,pe=57;break}else d=d<<((s^1)&1)}while(0);if((pe|0)==57){if((r|0)==0&(e|0)==0){if(e=2<<_,e=y&(e|0-e),!e){P=k;break}P=(e&0-e)+-1|0,d=P>>>12&16,P=P>>>d,l=P>>>5&8,P=P>>>l,_=P>>>2&4,P=P>>>_,T=P>>>1&2,P=P>>>T,r=P>>>1&1,e=0,r=t[11436+((l|d|_|T|r)+(P>>>r)<<2)>>2]|0}r?(s=r,pe=61):(_=e,d=o)}if((pe|0)==61)for(;;)if(pe=0,r=(t[s+4>>2]&-8)-k|0,P=r>>>0>>0,r=P?r:o,e=P?s:e,s=t[s+16+(((t[s+16>>2]|0)==0&1)<<2)>>2]|0,s)o=r,pe=61;else{_=e,d=r;break}if((_|0)!=0?d>>>0<((t[2785]|0)-k|0)>>>0:0){if(l=_+k|0,_>>>0>=l>>>0)return _e=0,h=vt,_e|0;s=t[_+24>>2]|0,n=t[_+12>>2]|0;do if((n|0)==(_|0)){if(e=_+20|0,n=t[e>>2]|0,!n&&(e=_+16|0,n=t[e>>2]|0,!n)){n=0;break}for(;;){if(r=n+20|0,o=t[r>>2]|0,o|0){n=o,e=r;continue}if(r=n+16|0,o=t[r>>2]|0,o)n=o,e=r;else break}t[e>>2]=0}else _e=t[_+8>>2]|0,t[_e+12>>2]=n,t[n+8>>2]=_e;while(0);do if(s){if(e=t[_+28>>2]|0,r=11436+(e<<2)|0,(_|0)==(t[r>>2]|0)){if(t[r>>2]=n,!n){o=y&~(1<>2]|0)!=(_|0)&1)<<2)>>2]=n,!n){o=y;break}t[n+24>>2]=s,e=t[_+16>>2]|0,e|0&&(t[n+16>>2]=e,t[e+24>>2]=n),e=t[_+20>>2]|0,e&&(t[n+20>>2]=e,t[e+24>>2]=n),o=y}else o=y;while(0);do if(d>>>0>=16){if(t[_+4>>2]=k|3,t[l+4>>2]=d|1,t[l+d>>2]=d,n=d>>>3,d>>>0<256){r=11172+(n<<1<<2)|0,e=t[2783]|0,n=1<>2]|0):(t[2783]=e|n,n=r,e=r+8|0),t[e>>2]=l,t[n+12>>2]=l,t[l+8>>2]=n,t[l+12>>2]=r;break}if(n=d>>>8,n?d>>>0>16777215?n=31:(pe=(n+1048320|0)>>>16&8,_e=n<>>16&4,_e=_e<>>16&2,n=14-(qe|pe|n)+(_e<>>15)|0,n=d>>>(n+7|0)&1|n<<1):n=0,r=11436+(n<<2)|0,t[l+28>>2]=n,e=l+16|0,t[e+4>>2]=0,t[e>>2]=0,e=1<>2]=l,t[l+24>>2]=r,t[l+12>>2]=l,t[l+8>>2]=l;break}for(e=d<<((n|0)==31?0:25-(n>>>1)|0),r=t[r>>2]|0;;){if((t[r+4>>2]&-8|0)==(d|0)){pe=97;break}if(o=r+16+(e>>>31<<2)|0,n=t[o>>2]|0,n)e=e<<1,r=n;else{pe=96;break}}if((pe|0)==96){t[o>>2]=l,t[l+24>>2]=r,t[l+12>>2]=l,t[l+8>>2]=l;break}else if((pe|0)==97){pe=r+8|0,_e=t[pe>>2]|0,t[_e+12>>2]=l,t[pe>>2]=l,t[l+8>>2]=_e,t[l+12>>2]=r,t[l+24>>2]=0;break}}else _e=d+k|0,t[_+4>>2]=_e|3,_e=_+_e+4|0,t[_e>>2]=t[_e>>2]|1;while(0);return _e=_+8|0,h=vt,_e|0}else P=k}else P=k;else P=-1;while(0);if(r=t[2785]|0,r>>>0>=P>>>0)return n=r-P|0,e=t[2788]|0,n>>>0>15?(_e=e+P|0,t[2788]=_e,t[2785]=n,t[_e+4>>2]=n|1,t[_e+n>>2]=n,t[e+4>>2]=P|3):(t[2785]=0,t[2788]=0,t[e+4>>2]=r|3,_e=e+r+4|0,t[_e>>2]=t[_e>>2]|1),_e=e+8|0,h=vt,_e|0;if(d=t[2786]|0,d>>>0>P>>>0)return qe=d-P|0,t[2786]=qe,_e=t[2789]|0,pe=_e+P|0,t[2789]=pe,t[pe+4>>2]=qe|1,t[_e+4>>2]=P|3,_e=_e+8|0,h=vt,_e|0;if(t[2901]|0?e=t[2903]|0:(t[2903]=4096,t[2902]=4096,t[2904]=-1,t[2905]=-1,t[2906]=0,t[2894]=0,e=q&-16^1431655768,t[q>>2]=e,t[2901]=e,e=4096),_=P+48|0,y=P+47|0,l=e+y|0,s=0-e|0,k=l&s,k>>>0<=P>>>0||(e=t[2893]|0,e|0?(T=t[2891]|0,q=T+k|0,q>>>0<=T>>>0|q>>>0>e>>>0):0))return _e=0,h=vt,_e|0;e:do if(t[2894]&4)n=0,pe=133;else{r=t[2789]|0;t:do if(r){for(o=11580;e=t[o>>2]|0,!(e>>>0<=r>>>0?(ie=o+4|0,(e+(t[ie>>2]|0)|0)>>>0>r>>>0):0);)if(e=t[o+8>>2]|0,e)o=e;else{pe=118;break t}if(n=l-d&s,n>>>0<2147483647)if(e=xf(n|0)|0,(e|0)==((t[o>>2]|0)+(t[ie>>2]|0)|0)){if((e|0)!=(-1|0)){d=n,l=e,pe=135;break e}}else o=e,pe=126;else n=0}else pe=118;while(0);do if((pe|0)==118)if(r=xf(0)|0,(r|0)!=(-1|0)?(n=r,we=t[2902]|0,le=we+-1|0,n=((le&n|0)==0?0:(le+n&0-we)-n|0)+k|0,we=t[2891]|0,le=n+we|0,n>>>0>P>>>0&n>>>0<2147483647):0){if(ie=t[2893]|0,ie|0?le>>>0<=we>>>0|le>>>0>ie>>>0:0){n=0;break}if(e=xf(n|0)|0,(e|0)==(r|0)){d=n,l=r,pe=135;break e}else o=e,pe=126}else n=0;while(0);do if((pe|0)==126){if(r=0-n|0,!(_>>>0>n>>>0&(n>>>0<2147483647&(o|0)!=(-1|0))))if((o|0)==(-1|0)){n=0;break}else{d=n,l=o,pe=135;break e}if(e=t[2903]|0,e=y-n+e&0-e,e>>>0>=2147483647){d=n,l=o,pe=135;break e}if((xf(e|0)|0)==(-1|0)){xf(r|0)|0,n=0;break}else{d=e+n|0,l=o,pe=135;break e}}while(0);t[2894]=t[2894]|4,pe=133}while(0);if((((pe|0)==133?k>>>0<2147483647:0)?(qe=xf(k|0)|0,ie=xf(0)|0,Pe=ie-qe|0,ke=Pe>>>0>(P+40|0)>>>0,!((qe|0)==(-1|0)|ke^1|qe>>>0>>0&((qe|0)!=(-1|0)&(ie|0)!=(-1|0))^1)):0)&&(d=ke?Pe:n,l=qe,pe=135),(pe|0)==135){n=(t[2891]|0)+d|0,t[2891]=n,n>>>0>(t[2892]|0)>>>0&&(t[2892]=n),y=t[2789]|0;do if(y){for(n=11580;;){if(e=t[n>>2]|0,r=n+4|0,o=t[r>>2]|0,(l|0)==(e+o|0)){pe=145;break}if(s=t[n+8>>2]|0,s)n=s;else break}if(((pe|0)==145?(t[n+12>>2]&8|0)==0:0)?y>>>0>>0&y>>>0>=e>>>0:0){t[r>>2]=o+d,_e=y+8|0,_e=(_e&7|0)==0?0:0-_e&7,pe=y+_e|0,_e=(t[2786]|0)+(d-_e)|0,t[2789]=pe,t[2786]=_e,t[pe+4>>2]=_e|1,t[pe+_e+4>>2]=40,t[2790]=t[2905];break}for(l>>>0<(t[2787]|0)>>>0&&(t[2787]=l),r=l+d|0,n=11580;;){if((t[n>>2]|0)==(r|0)){pe=153;break}if(e=t[n+8>>2]|0,e)n=e;else break}if((pe|0)==153?(t[n+12>>2]&8|0)==0:0){t[n>>2]=l,T=n+4|0,t[T>>2]=(t[T>>2]|0)+d,T=l+8|0,T=l+((T&7|0)==0?0:0-T&7)|0,n=r+8|0,n=r+((n&7|0)==0?0:0-n&7)|0,k=T+P|0,_=n-T-P|0,t[T+4>>2]=P|3;do if((n|0)!=(y|0)){if((n|0)==(t[2788]|0)){_e=(t[2785]|0)+_|0,t[2785]=_e,t[2788]=k,t[k+4>>2]=_e|1,t[k+_e>>2]=_e;break}if(e=t[n+4>>2]|0,(e&3|0)==1){d=e&-8,o=e>>>3;e:do if(e>>>0<256)if(e=t[n+8>>2]|0,r=t[n+12>>2]|0,(r|0)==(e|0)){t[2783]=t[2783]&~(1<>2]=r,t[r+8>>2]=e;break}else{l=t[n+24>>2]|0,e=t[n+12>>2]|0;do if((e|0)==(n|0)){if(o=n+16|0,r=o+4|0,e=t[r>>2]|0,!e)if(e=t[o>>2]|0,e)r=o;else{e=0;break}for(;;){if(o=e+20|0,s=t[o>>2]|0,s|0){e=s,r=o;continue}if(o=e+16|0,s=t[o>>2]|0,s)e=s,r=o;else break}t[r>>2]=0}else _e=t[n+8>>2]|0,t[_e+12>>2]=e,t[e+8>>2]=_e;while(0);if(!l)break;r=t[n+28>>2]|0,o=11436+(r<<2)|0;do if((n|0)!=(t[o>>2]|0)){if(t[l+16+(((t[l+16>>2]|0)!=(n|0)&1)<<2)>>2]=e,!e)break e}else{if(t[o>>2]=e,e|0)break;t[2784]=t[2784]&~(1<>2]=l,r=n+16|0,o=t[r>>2]|0,o|0&&(t[e+16>>2]=o,t[o+24>>2]=e),r=t[r+4>>2]|0,!r)break;t[e+20>>2]=r,t[r+24>>2]=e}while(0);n=n+d|0,s=d+_|0}else s=_;if(n=n+4|0,t[n>>2]=t[n>>2]&-2,t[k+4>>2]=s|1,t[k+s>>2]=s,n=s>>>3,s>>>0<256){r=11172+(n<<1<<2)|0,e=t[2783]|0,n=1<>2]|0):(t[2783]=e|n,n=r,e=r+8|0),t[e>>2]=k,t[n+12>>2]=k,t[k+8>>2]=n,t[k+12>>2]=r;break}n=s>>>8;do if(!n)n=0;else{if(s>>>0>16777215){n=31;break}pe=(n+1048320|0)>>>16&8,_e=n<>>16&4,_e=_e<>>16&2,n=14-(qe|pe|n)+(_e<>>15)|0,n=s>>>(n+7|0)&1|n<<1}while(0);if(o=11436+(n<<2)|0,t[k+28>>2]=n,e=k+16|0,t[e+4>>2]=0,t[e>>2]=0,e=t[2784]|0,r=1<>2]=k,t[k+24>>2]=o,t[k+12>>2]=k,t[k+8>>2]=k;break}for(e=s<<((n|0)==31?0:25-(n>>>1)|0),r=t[o>>2]|0;;){if((t[r+4>>2]&-8|0)==(s|0)){pe=194;break}if(o=r+16+(e>>>31<<2)|0,n=t[o>>2]|0,n)e=e<<1,r=n;else{pe=193;break}}if((pe|0)==193){t[o>>2]=k,t[k+24>>2]=r,t[k+12>>2]=k,t[k+8>>2]=k;break}else if((pe|0)==194){pe=r+8|0,_e=t[pe>>2]|0,t[_e+12>>2]=k,t[pe>>2]=k,t[k+8>>2]=_e,t[k+12>>2]=r,t[k+24>>2]=0;break}}else _e=(t[2786]|0)+_|0,t[2786]=_e,t[2789]=k,t[k+4>>2]=_e|1;while(0);return _e=T+8|0,h=vt,_e|0}for(n=11580;e=t[n>>2]|0,!(e>>>0<=y>>>0?(_e=e+(t[n+4>>2]|0)|0,_e>>>0>y>>>0):0);)n=t[n+8>>2]|0;s=_e+-47|0,e=s+8|0,e=s+((e&7|0)==0?0:0-e&7)|0,s=y+16|0,e=e>>>0>>0?y:e,n=e+8|0,r=l+8|0,r=(r&7|0)==0?0:0-r&7,pe=l+r|0,r=d+-40-r|0,t[2789]=pe,t[2786]=r,t[pe+4>>2]=r|1,t[pe+r+4>>2]=40,t[2790]=t[2905],r=e+4|0,t[r>>2]=27,t[n>>2]=t[2895],t[n+4>>2]=t[2896],t[n+8>>2]=t[2897],t[n+12>>2]=t[2898],t[2895]=l,t[2896]=d,t[2898]=0,t[2897]=n,n=e+24|0;do pe=n,n=n+4|0,t[n>>2]=7;while((pe+8|0)>>>0<_e>>>0);if((e|0)!=(y|0)){if(l=e-y|0,t[r>>2]=t[r>>2]&-2,t[y+4>>2]=l|1,t[e>>2]=l,n=l>>>3,l>>>0<256){r=11172+(n<<1<<2)|0,e=t[2783]|0,n=1<>2]|0):(t[2783]=e|n,n=r,e=r+8|0),t[e>>2]=y,t[n+12>>2]=y,t[y+8>>2]=n,t[y+12>>2]=r;break}if(n=l>>>8,n?l>>>0>16777215?r=31:(pe=(n+1048320|0)>>>16&8,_e=n<>>16&4,_e=_e<>>16&2,r=14-(qe|pe|r)+(_e<>>15)|0,r=l>>>(r+7|0)&1|r<<1):r=0,o=11436+(r<<2)|0,t[y+28>>2]=r,t[y+20>>2]=0,t[s>>2]=0,n=t[2784]|0,e=1<>2]=y,t[y+24>>2]=o,t[y+12>>2]=y,t[y+8>>2]=y;break}for(e=l<<((r|0)==31?0:25-(r>>>1)|0),r=t[o>>2]|0;;){if((t[r+4>>2]&-8|0)==(l|0)){pe=216;break}if(o=r+16+(e>>>31<<2)|0,n=t[o>>2]|0,n)e=e<<1,r=n;else{pe=215;break}}if((pe|0)==215){t[o>>2]=y,t[y+24>>2]=r,t[y+12>>2]=y,t[y+8>>2]=y;break}else if((pe|0)==216){pe=r+8|0,_e=t[pe>>2]|0,t[_e+12>>2]=y,t[pe>>2]=y,t[y+8>>2]=_e,t[y+12>>2]=r,t[y+24>>2]=0;break}}}else{_e=t[2787]|0,(_e|0)==0|l>>>0<_e>>>0&&(t[2787]=l),t[2895]=l,t[2896]=d,t[2898]=0,t[2792]=t[2901],t[2791]=-1,n=0;do _e=11172+(n<<1<<2)|0,t[_e+12>>2]=_e,t[_e+8>>2]=_e,n=n+1|0;while((n|0)!=32);_e=l+8|0,_e=(_e&7|0)==0?0:0-_e&7,pe=l+_e|0,_e=d+-40-_e|0,t[2789]=pe,t[2786]=_e,t[pe+4>>2]=_e|1,t[pe+_e+4>>2]=40,t[2790]=t[2905]}while(0);if(n=t[2786]|0,n>>>0>P>>>0)return qe=n-P|0,t[2786]=qe,_e=t[2789]|0,pe=_e+P|0,t[2789]=pe,t[pe+4>>2]=qe|1,t[_e+4>>2]=P|3,_e=_e+8|0,h=vt,_e|0}return t[(ca()|0)>>2]=12,_e=0,h=vt,_e|0}function sh(e){e=e|0;var n=0,r=0,o=0,s=0,l=0,d=0,_=0,y=0;if(!!e){r=e+-8|0,s=t[2787]|0,e=t[e+-4>>2]|0,n=e&-8,y=r+n|0;do if(e&1)_=r,d=r;else{if(o=t[r>>2]|0,!(e&3)||(d=r+(0-o)|0,l=o+n|0,d>>>0>>0))return;if((d|0)==(t[2788]|0)){if(e=y+4|0,n=t[e>>2]|0,(n&3|0)!=3){_=d,n=l;break}t[2785]=l,t[e>>2]=n&-2,t[d+4>>2]=l|1,t[d+l>>2]=l;return}if(r=o>>>3,o>>>0<256)if(e=t[d+8>>2]|0,n=t[d+12>>2]|0,(n|0)==(e|0)){t[2783]=t[2783]&~(1<>2]=n,t[n+8>>2]=e,_=d,n=l;break}s=t[d+24>>2]|0,e=t[d+12>>2]|0;do if((e|0)==(d|0)){if(r=d+16|0,n=r+4|0,e=t[n>>2]|0,!e)if(e=t[r>>2]|0,e)n=r;else{e=0;break}for(;;){if(r=e+20|0,o=t[r>>2]|0,o|0){e=o,n=r;continue}if(r=e+16|0,o=t[r>>2]|0,o)e=o,n=r;else break}t[n>>2]=0}else _=t[d+8>>2]|0,t[_+12>>2]=e,t[e+8>>2]=_;while(0);if(s){if(n=t[d+28>>2]|0,r=11436+(n<<2)|0,(d|0)==(t[r>>2]|0)){if(t[r>>2]=e,!e){t[2784]=t[2784]&~(1<>2]|0)!=(d|0)&1)<<2)>>2]=e,!e){_=d,n=l;break}t[e+24>>2]=s,n=d+16|0,r=t[n>>2]|0,r|0&&(t[e+16>>2]=r,t[r+24>>2]=e),n=t[n+4>>2]|0,n?(t[e+20>>2]=n,t[n+24>>2]=e,_=d,n=l):(_=d,n=l)}else _=d,n=l}while(0);if(!(d>>>0>=y>>>0)&&(e=y+4|0,o=t[e>>2]|0,!!(o&1))){if(o&2)t[e>>2]=o&-2,t[_+4>>2]=n|1,t[d+n>>2]=n,s=n;else{if(e=t[2788]|0,(y|0)==(t[2789]|0)){if(y=(t[2786]|0)+n|0,t[2786]=y,t[2789]=_,t[_+4>>2]=y|1,(_|0)!=(e|0))return;t[2788]=0,t[2785]=0;return}if((y|0)==(e|0)){y=(t[2785]|0)+n|0,t[2785]=y,t[2788]=d,t[_+4>>2]=y|1,t[d+y>>2]=y;return}s=(o&-8)+n|0,r=o>>>3;do if(o>>>0<256)if(n=t[y+8>>2]|0,e=t[y+12>>2]|0,(e|0)==(n|0)){t[2783]=t[2783]&~(1<>2]=e,t[e+8>>2]=n;break}else{l=t[y+24>>2]|0,e=t[y+12>>2]|0;do if((e|0)==(y|0)){if(r=y+16|0,n=r+4|0,e=t[n>>2]|0,!e)if(e=t[r>>2]|0,e)n=r;else{r=0;break}for(;;){if(r=e+20|0,o=t[r>>2]|0,o|0){e=o,n=r;continue}if(r=e+16|0,o=t[r>>2]|0,o)e=o,n=r;else break}t[n>>2]=0,r=e}else r=t[y+8>>2]|0,t[r+12>>2]=e,t[e+8>>2]=r,r=e;while(0);if(l|0){if(e=t[y+28>>2]|0,n=11436+(e<<2)|0,(y|0)==(t[n>>2]|0)){if(t[n>>2]=r,!r){t[2784]=t[2784]&~(1<>2]|0)!=(y|0)&1)<<2)>>2]=r,!r)break;t[r+24>>2]=l,e=y+16|0,n=t[e>>2]|0,n|0&&(t[r+16>>2]=n,t[n+24>>2]=r),e=t[e+4>>2]|0,e|0&&(t[r+20>>2]=e,t[e+24>>2]=r)}}while(0);if(t[_+4>>2]=s|1,t[d+s>>2]=s,(_|0)==(t[2788]|0)){t[2785]=s;return}}if(e=s>>>3,s>>>0<256){r=11172+(e<<1<<2)|0,n=t[2783]|0,e=1<>2]|0):(t[2783]=n|e,e=r,n=r+8|0),t[n>>2]=_,t[e+12>>2]=_,t[_+8>>2]=e,t[_+12>>2]=r;return}e=s>>>8,e?s>>>0>16777215?e=31:(d=(e+1048320|0)>>>16&8,y=e<>>16&4,y=y<>>16&2,e=14-(l|d|e)+(y<>>15)|0,e=s>>>(e+7|0)&1|e<<1):e=0,o=11436+(e<<2)|0,t[_+28>>2]=e,t[_+20>>2]=0,t[_+16>>2]=0,n=t[2784]|0,r=1<>>1)|0),r=t[o>>2]|0;;){if((t[r+4>>2]&-8|0)==(s|0)){e=73;break}if(o=r+16+(n>>>31<<2)|0,e=t[o>>2]|0,e)n=n<<1,r=e;else{e=72;break}}if((e|0)==72){t[o>>2]=_,t[_+24>>2]=r,t[_+12>>2]=_,t[_+8>>2]=_;break}else if((e|0)==73){d=r+8|0,y=t[d>>2]|0,t[y+12>>2]=_,t[d>>2]=_,t[_+8>>2]=y,t[_+12>>2]=r,t[_+24>>2]=0;break}}else t[2784]=n|r,t[o>>2]=_,t[_+24>>2]=o,t[_+12>>2]=_,t[_+8>>2]=_;while(0);if(y=(t[2791]|0)+-1|0,t[2791]=y,!y)e=11588;else return;for(;e=t[e>>2]|0,e;)e=e+8|0;t[2791]=-1}}}function rL(){return 11628}function iL(e){e=e|0;var n=0,r=0;return n=h,h=h+16|0,r=n,t[r>>2]=sL(t[e+60>>2]|0)|0,e=lh(Ms(6,r|0)|0)|0,h=n,e|0}function j8(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0,d=0,_=0,y=0,k=0,T=0,P=0,q=0,we=0;P=h,h=h+48|0,k=P+16|0,l=P,s=P+32|0,_=e+28|0,o=t[_>>2]|0,t[s>>2]=o,y=e+20|0,o=(t[y>>2]|0)-o|0,t[s+4>>2]=o,t[s+8>>2]=n,t[s+12>>2]=r,o=o+r|0,d=e+60|0,t[l>>2]=t[d>>2],t[l+4>>2]=s,t[l+8>>2]=2,l=lh(G0(146,l|0)|0)|0;e:do if((o|0)!=(l|0)){for(n=2;!((l|0)<0);)if(o=o-l|0,we=t[s+4>>2]|0,q=l>>>0>we>>>0,s=q?s+8|0:s,n=(q<<31>>31)+n|0,we=l-(q?we:0)|0,t[s>>2]=(t[s>>2]|0)+we,q=s+4|0,t[q>>2]=(t[q>>2]|0)-we,t[k>>2]=t[d>>2],t[k+4>>2]=s,t[k+8>>2]=n,l=lh(G0(146,k|0)|0)|0,(o|0)==(l|0)){T=3;break e}t[e+16>>2]=0,t[_>>2]=0,t[y>>2]=0,t[e>>2]=t[e>>2]|32,(n|0)==2?r=0:r=r-(t[s+4>>2]|0)|0}else T=3;while(0);return(T|0)==3&&(we=t[e+44>>2]|0,t[e+16>>2]=we+(t[e+48>>2]|0),t[_>>2]=we,t[y>>2]=we),h=P,r|0}function oL(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0;return s=h,h=h+32|0,l=s,o=s+20|0,t[l>>2]=t[e+60>>2],t[l+4>>2]=0,t[l+8>>2]=n,t[l+12>>2]=o,t[l+16>>2]=r,(lh(Uu(140,l|0)|0)|0)<0?(t[o>>2]=-1,e=-1):e=t[o>>2]|0,h=s,e|0}function lh(e){return e=e|0,e>>>0>4294963200&&(t[(ca()|0)>>2]=0-e,e=-1),e|0}function ca(){return(uL()|0)+64|0}function uL(){return b4()|0}function b4(){return 2084}function sL(e){return e=e|0,e|0}function lL(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0;return s=h,h=h+32|0,o=s,t[e+36>>2]=1,((t[e>>2]&64|0)==0?(t[o>>2]=t[e+60>>2],t[o+4>>2]=21523,t[o+8>>2]=s+16,su(54,o|0)|0):0)&&(c[e+75>>0]=-1),o=j8(e,n,r)|0,h=s,o|0}function U8(e,n){e=e|0,n=n|0;var r=0,o=0;if(r=c[e>>0]|0,o=c[n>>0]|0,r<<24>>24==0?1:r<<24>>24!=o<<24>>24)e=o;else{do e=e+1|0,n=n+1|0,r=c[e>>0]|0,o=c[n>>0]|0;while(!(r<<24>>24==0?1:r<<24>>24!=o<<24>>24));e=o}return(r&255)-(e&255)|0}function fL(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0;e:do if(!r)e=0;else{for(;o=c[e>>0]|0,s=c[n>>0]|0,o<<24>>24==s<<24>>24;)if(r=r+-1|0,r)e=e+1|0,n=n+1|0;else{e=0;break e}e=(o&255)-(s&255)|0}while(0);return e|0}function q8(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0,d=0,_=0,y=0,k=0,T=0,P=0,q=0,we=0,le=0,ie=0;ie=h,h=h+224|0,T=ie+120|0,P=ie+80|0,we=ie,le=ie+136|0,o=P,s=o+40|0;do t[o>>2]=0,o=o+4|0;while((o|0)<(s|0));return t[T>>2]=t[r>>2],(G4(0,n,T,we,P)|0)<0?r=-1:((t[e+76>>2]|0)>-1?q=cL(e)|0:q=0,r=t[e>>2]|0,k=r&32,(c[e+74>>0]|0)<1&&(t[e>>2]=r&-33),o=e+48|0,t[o>>2]|0?r=G4(e,n,T,we,P)|0:(s=e+44|0,l=t[s>>2]|0,t[s>>2]=le,d=e+28|0,t[d>>2]=le,_=e+20|0,t[_>>2]=le,t[o>>2]=80,y=e+16|0,t[y>>2]=le+80,r=G4(e,n,T,we,P)|0,l&&(dh[t[e+36>>2]&7](e,0,0)|0,r=(t[_>>2]|0)==0?-1:r,t[s>>2]=l,t[o>>2]=0,t[y>>2]=0,t[d>>2]=0,t[_>>2]=0)),o=t[e>>2]|0,t[e>>2]=o|k,q|0&&aL(e),r=(o&32|0)==0?r:-1),h=ie,r|0}function G4(e,n,r,o,s){e=e|0,n=n|0,r=r|0,o=o|0,s=s|0;var l=0,d=0,_=0,y=0,k=0,T=0,P=0,q=0,we=0,le=0,ie=0,Pe=0,ke=0,qe=0,pe=0,_e=0,vt=0,Ln=0,Ht=0,It=0,gn=0,Pn=0,zt=0;zt=h,h=h+64|0,Ht=zt+16|0,It=zt,vt=zt+24|0,gn=zt+8|0,Pn=zt+20|0,t[Ht>>2]=n,qe=(e|0)!=0,pe=vt+40|0,_e=pe,vt=vt+39|0,Ln=gn+4|0,d=0,l=0,T=0;e:for(;;){do if((l|0)>-1)if((d|0)>(2147483647-l|0)){t[(ca()|0)>>2]=75,l=-1;break}else{l=d+l|0;break}while(0);if(d=c[n>>0]|0,d<<24>>24)_=n;else{ke=87;break}t:for(;;){switch(d<<24>>24){case 37:{d=_,ke=9;break t}case 0:{d=_;break t}default:}Pe=_+1|0,t[Ht>>2]=Pe,d=c[Pe>>0]|0,_=Pe}t:do if((ke|0)==9)for(;;){if(ke=0,(c[_+1>>0]|0)!=37)break t;if(d=d+1|0,_=_+2|0,t[Ht>>2]=_,(c[_>>0]|0)==37)ke=9;else break}while(0);if(d=d-n|0,qe&&ri(e,n,d),d|0){n=_;continue}y=_+1|0,d=(c[y>>0]|0)+-48|0,d>>>0<10?(Pe=(c[_+2>>0]|0)==36,ie=Pe?d:-1,T=Pe?1:T,y=Pe?_+3|0:y):ie=-1,t[Ht>>2]=y,d=c[y>>0]|0,_=(d<<24>>24)+-32|0;t:do if(_>>>0<32)for(k=0,P=d;;){if(d=1<<_,!(d&75913)){d=P;break t}if(k=d|k,y=y+1|0,t[Ht>>2]=y,d=c[y>>0]|0,_=(d<<24>>24)+-32|0,_>>>0>=32)break;P=d}else k=0;while(0);if(d<<24>>24==42){if(_=y+1|0,d=(c[_>>0]|0)+-48|0,d>>>0<10?(c[y+2>>0]|0)==36:0)t[s+(d<<2)>>2]=10,d=t[o+((c[_>>0]|0)+-48<<3)>>2]|0,T=1,y=y+3|0;else{if(T|0){l=-1;break}qe?(T=(t[r>>2]|0)+(4-1)&~(4-1),d=t[T>>2]|0,t[r>>2]=T+4,T=0,y=_):(d=0,T=0,y=_)}t[Ht>>2]=y,Pe=(d|0)<0,d=Pe?0-d|0:d,k=Pe?k|8192:k}else{if(d=z8(Ht)|0,(d|0)<0){l=-1;break}y=t[Ht>>2]|0}do if((c[y>>0]|0)==46){if((c[y+1>>0]|0)!=42){t[Ht>>2]=y+1,_=z8(Ht)|0,y=t[Ht>>2]|0;break}if(P=y+2|0,_=(c[P>>0]|0)+-48|0,_>>>0<10?(c[y+3>>0]|0)==36:0){t[s+(_<<2)>>2]=10,_=t[o+((c[P>>0]|0)+-48<<3)>>2]|0,y=y+4|0,t[Ht>>2]=y;break}if(T|0){l=-1;break e}qe?(Pe=(t[r>>2]|0)+(4-1)&~(4-1),_=t[Pe>>2]|0,t[r>>2]=Pe+4):_=0,t[Ht>>2]=P,y=P}else _=-1;while(0);for(le=0;;){if(((c[y>>0]|0)+-65|0)>>>0>57){l=-1;break e}if(Pe=y+1|0,t[Ht>>2]=Pe,P=c[(c[y>>0]|0)+-65+(5178+(le*58|0))>>0]|0,q=P&255,(q+-1|0)>>>0<8)le=q,y=Pe;else break}if(!(P<<24>>24)){l=-1;break}we=(ie|0)>-1;do if(P<<24>>24==19)if(we){l=-1;break e}else ke=49;else{if(we){t[s+(ie<<2)>>2]=q,we=o+(ie<<3)|0,ie=t[we+4>>2]|0,ke=It,t[ke>>2]=t[we>>2],t[ke+4>>2]=ie,ke=49;break}if(!qe){l=0;break e}W8(It,q,r)}while(0);if((ke|0)==49?(ke=0,!qe):0){d=0,n=Pe;continue}y=c[y>>0]|0,y=(le|0)!=0&(y&15|0)==3?y&-33:y,we=k&-65537,ie=(k&8192|0)==0?k:we;t:do switch(y|0){case 110:switch((le&255)<<24>>24){case 0:{t[t[It>>2]>>2]=l,d=0,n=Pe;continue e}case 1:{t[t[It>>2]>>2]=l,d=0,n=Pe;continue e}case 2:{d=t[It>>2]|0,t[d>>2]=l,t[d+4>>2]=((l|0)<0)<<31>>31,d=0,n=Pe;continue e}case 3:{g[t[It>>2]>>1]=l,d=0,n=Pe;continue e}case 4:{c[t[It>>2]>>0]=l,d=0,n=Pe;continue e}case 6:{t[t[It>>2]>>2]=l,d=0,n=Pe;continue e}case 7:{d=t[It>>2]|0,t[d>>2]=l,t[d+4>>2]=((l|0)<0)<<31>>31,d=0,n=Pe;continue e}default:{d=0,n=Pe;continue e}}case 112:{y=120,_=_>>>0>8?_:8,n=ie|8,ke=61;break}case 88:case 120:{n=ie,ke=61;break}case 111:{y=It,n=t[y>>2]|0,y=t[y+4>>2]|0,q=pL(n,y,pe)|0,we=_e-q|0,k=0,P=5642,_=(ie&8|0)==0|(_|0)>(we|0)?_:we+1|0,we=ie,ke=67;break}case 105:case 100:if(y=It,n=t[y>>2]|0,y=t[y+4>>2]|0,(y|0)<0){n=fh(0,0,n|0,y|0)|0,y=be,k=It,t[k>>2]=n,t[k+4>>2]=y,k=1,P=5642,ke=66;break t}else{k=(ie&2049|0)!=0&1,P=(ie&2048|0)==0?(ie&1|0)==0?5642:5644:5643,ke=66;break t}case 117:{y=It,k=0,P=5642,n=t[y>>2]|0,y=t[y+4>>2]|0,ke=66;break}case 99:{c[vt>>0]=t[It>>2],n=vt,k=0,P=5642,q=pe,y=1,_=we;break}case 109:{y=hL(t[(ca()|0)>>2]|0)|0,ke=71;break}case 115:{y=t[It>>2]|0,y=y|0?y:5652,ke=71;break}case 67:{t[gn>>2]=t[It>>2],t[Ln>>2]=0,t[It>>2]=gn,q=-1,y=gn,ke=75;break}case 83:{n=t[It>>2]|0,_?(q=_,y=n,ke=75):(wi(e,32,d,0,ie),n=0,ke=84);break}case 65:case 71:case 70:case 69:case 97:case 103:case 102:case 101:{d=vL(e,+L[It>>3],d,_,ie,y)|0,n=Pe;continue e}default:k=0,P=5642,q=pe,y=_,_=ie}while(0);t:do if((ke|0)==61)ie=It,le=t[ie>>2]|0,ie=t[ie+4>>2]|0,q=dL(le,ie,pe,y&32)|0,P=(n&8|0)==0|(le|0)==0&(ie|0)==0,k=P?0:2,P=P?5642:5642+(y>>4)|0,we=n,n=le,y=ie,ke=67;else if((ke|0)==66)q=aa(n,y,pe)|0,we=ie,ke=67;else if((ke|0)==71)ke=0,ie=mL(y,0,_)|0,le=(ie|0)==0,n=y,k=0,P=5642,q=le?y+_|0:ie,y=le?_:ie-y|0,_=we;else if((ke|0)==75){for(ke=0,P=y,n=0,_=0;k=t[P>>2]|0,!(!k||(_=H8(Pn,k)|0,(_|0)<0|_>>>0>(q-n|0)>>>0));)if(n=_+n|0,q>>>0>n>>>0)P=P+4|0;else break;if((_|0)<0){l=-1;break e}if(wi(e,32,d,n,ie),!n)n=0,ke=84;else for(k=0;;){if(_=t[y>>2]|0,!_){ke=84;break t}if(_=H8(Pn,_)|0,k=_+k|0,(k|0)>(n|0)){ke=84;break t}if(ri(e,Pn,_),k>>>0>=n>>>0){ke=84;break}else y=y+4|0}}while(0);if((ke|0)==67)ke=0,y=(n|0)!=0|(y|0)!=0,ie=(_|0)!=0|y,y=((y^1)&1)+(_e-q)|0,n=ie?q:pe,q=pe,y=ie?(_|0)>(y|0)?_:y:_,_=(_|0)>-1?we&-65537:we;else if((ke|0)==84){ke=0,wi(e,32,d,n,ie^8192),d=(d|0)>(n|0)?d:n,n=Pe;continue}le=q-n|0,we=(y|0)<(le|0)?le:y,ie=we+k|0,d=(d|0)<(ie|0)?ie:d,wi(e,32,d,ie,_),ri(e,P,k),wi(e,48,d,ie,_^65536),wi(e,48,we,le,0),ri(e,n,le),wi(e,32,d,ie,_^8192),n=Pe}e:do if((ke|0)==87&&!e)if(!T)l=0;else{for(l=1;n=t[s+(l<<2)>>2]|0,!!n;)if(W8(o+(l<<3)|0,n,r),l=l+1|0,(l|0)>=10){l=1;break e}for(;;){if(t[s+(l<<2)>>2]|0){l=-1;break e}if(l=l+1|0,(l|0)>=10){l=1;break}}}while(0);return h=zt,l|0}function cL(e){return e=e|0,0}function aL(e){e=e|0}function ri(e,n,r){e=e|0,n=n|0,r=r|0,t[e>>2]&32||TL(n,r,e)|0}function z8(e){e=e|0;var n=0,r=0,o=0;if(r=t[e>>2]|0,o=(c[r>>0]|0)+-48|0,o>>>0<10){n=0;do n=o+(n*10|0)|0,r=r+1|0,t[e>>2]=r,o=(c[r>>0]|0)+-48|0;while(o>>>0<10)}else n=0;return n|0}function W8(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0;e:do if(n>>>0<=20)do switch(n|0){case 9:{o=(t[r>>2]|0)+(4-1)&~(4-1),n=t[o>>2]|0,t[r>>2]=o+4,t[e>>2]=n;break e}case 10:{o=(t[r>>2]|0)+(4-1)&~(4-1),n=t[o>>2]|0,t[r>>2]=o+4,o=e,t[o>>2]=n,t[o+4>>2]=((n|0)<0)<<31>>31;break e}case 11:{o=(t[r>>2]|0)+(4-1)&~(4-1),n=t[o>>2]|0,t[r>>2]=o+4,o=e,t[o>>2]=n,t[o+4>>2]=0;break e}case 12:{o=(t[r>>2]|0)+(8-1)&~(8-1),n=o,s=t[n>>2]|0,n=t[n+4>>2]|0,t[r>>2]=o+8,o=e,t[o>>2]=s,t[o+4>>2]=n;break e}case 13:{s=(t[r>>2]|0)+(4-1)&~(4-1),o=t[s>>2]|0,t[r>>2]=s+4,o=(o&65535)<<16>>16,s=e,t[s>>2]=o,t[s+4>>2]=((o|0)<0)<<31>>31;break e}case 14:{s=(t[r>>2]|0)+(4-1)&~(4-1),o=t[s>>2]|0,t[r>>2]=s+4,s=e,t[s>>2]=o&65535,t[s+4>>2]=0;break e}case 15:{s=(t[r>>2]|0)+(4-1)&~(4-1),o=t[s>>2]|0,t[r>>2]=s+4,o=(o&255)<<24>>24,s=e,t[s>>2]=o,t[s+4>>2]=((o|0)<0)<<31>>31;break e}case 16:{s=(t[r>>2]|0)+(4-1)&~(4-1),o=t[s>>2]|0,t[r>>2]=s+4,s=e,t[s>>2]=o&255,t[s+4>>2]=0;break e}case 17:{s=(t[r>>2]|0)+(8-1)&~(8-1),l=+L[s>>3],t[r>>2]=s+8,L[e>>3]=l;break e}case 18:{s=(t[r>>2]|0)+(8-1)&~(8-1),l=+L[s>>3],t[r>>2]=s+8,L[e>>3]=l;break e}default:break e}while(0);while(0)}function dL(e,n,r,o){if(e=e|0,n=n|0,r=r|0,o=o|0,!((e|0)==0&(n|0)==0))do r=r+-1|0,c[r>>0]=C[5694+(e&15)>>0]|0|o,e=ch(e|0,n|0,4)|0,n=be;while(!((e|0)==0&(n|0)==0));return r|0}function pL(e,n,r){if(e=e|0,n=n|0,r=r|0,!((e|0)==0&(n|0)==0))do r=r+-1|0,c[r>>0]=e&7|48,e=ch(e|0,n|0,3)|0,n=be;while(!((e|0)==0&(n|0)==0));return r|0}function aa(e,n,r){e=e|0,n=n|0,r=r|0;var o=0;if(n>>>0>0|(n|0)==0&e>>>0>4294967295){for(;o=K4(e|0,n|0,10,0)|0,r=r+-1|0,c[r>>0]=o&255|48,o=e,e=$4(e|0,n|0,10,0)|0,n>>>0>9|(n|0)==9&o>>>0>4294967295;)n=be;n=e}else n=e;if(n)for(;r=r+-1|0,c[r>>0]=(n>>>0)%10|0|48,!(n>>>0<10);)n=(n>>>0)/10|0;return r|0}function hL(e){return e=e|0,DL(e,t[(wL()|0)+188>>2]|0)|0}function mL(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0,d=0;l=n&255,o=(r|0)!=0;e:do if(o&(e&3|0)!=0)for(s=n&255;;){if((c[e>>0]|0)==s<<24>>24){d=6;break e}if(e=e+1|0,r=r+-1|0,o=(r|0)!=0,!(o&(e&3|0)!=0)){d=5;break}}else d=5;while(0);(d|0)==5&&(o?d=6:r=0);e:do if((d|0)==6&&(s=n&255,(c[e>>0]|0)!=s<<24>>24)){o=Un(l,16843009)|0;t:do if(r>>>0>3){for(;l=t[e>>2]^o,!((l&-2139062144^-2139062144)&l+-16843009|0);)if(e=e+4|0,r=r+-4|0,r>>>0<=3){d=11;break t}}else d=11;while(0);if((d|0)==11&&!r){r=0;break}for(;;){if((c[e>>0]|0)==s<<24>>24)break e;if(e=e+1|0,r=r+-1|0,!r){r=0;break}}}while(0);return(r|0?e:0)|0}function wi(e,n,r,o,s){e=e|0,n=n|0,r=r|0,o=o|0,s=s|0;var l=0,d=0;if(d=h,h=h+256|0,l=d,(r|0)>(o|0)&(s&73728|0)==0){if(s=r-o|0,pa(l|0,n|0,(s>>>0<256?s:256)|0)|0,s>>>0>255){n=r-o|0;do ri(e,l,256),s=s+-256|0;while(s>>>0>255);s=n&255}ri(e,l,s)}h=d}function H8(e,n){return e=e|0,n=n|0,e?e=_L(e,n,0)|0:e=0,e|0}function vL(e,n,r,o,s,l){e=e|0,n=+n,r=r|0,o=o|0,s=s|0,l=l|0;var d=0,_=0,y=0,k=0,T=0,P=0,q=0,we=0,le=0,ie=0,Pe=0,ke=0,qe=0,pe=0,_e=0,vt=0,Ln=0,Ht=0,It=0,gn=0,Pn=0,zt=0,Dr=0;Dr=h,h=h+560|0,y=Dr+8|0,Pe=Dr,zt=Dr+524|0,Pn=zt,k=Dr+512|0,t[Pe>>2]=0,gn=k+12|0,b8(n)|0,(be|0)<0?(n=-n,Ht=1,Ln=5659):(Ht=(s&2049|0)!=0&1,Ln=(s&2048|0)==0?(s&1|0)==0?5660:5665:5662),b8(n)|0,It=be&2146435072;do if(It>>>0<2146435072|(It|0)==2146435072&0<0){if(we=+gL(n,Pe)*2,d=we!=0,d&&(t[Pe>>2]=(t[Pe>>2]|0)+-1),qe=l|32,(qe|0)==97){le=l&32,q=(le|0)==0?Ln:Ln+9|0,P=Ht|2,d=12-o|0;do if(o>>>0>11|(d|0)==0)n=we;else{n=8;do d=d+-1|0,n=n*16;while((d|0)!=0);if((c[q>>0]|0)==45){n=-(n+(-we-n));break}else{n=we+n-n;break}}while(0);_=t[Pe>>2]|0,d=(_|0)<0?0-_|0:_,d=aa(d,((d|0)<0)<<31>>31,gn)|0,(d|0)==(gn|0)&&(d=k+11|0,c[d>>0]=48),c[d+-1>>0]=(_>>31&2)+43,T=d+-2|0,c[T>>0]=l+15,k=(o|0)<1,y=(s&8|0)==0,d=zt;do It=~~n,_=d+1|0,c[d>>0]=C[5694+It>>0]|le,n=(n-+(It|0))*16,((_-Pn|0)==1?!(y&(k&n==0)):0)?(c[_>>0]=46,d=d+2|0):d=_;while(n!=0);It=d-Pn|0,Pn=gn-T|0,gn=(o|0)!=0&(It+-2|0)<(o|0)?o+2|0:It,d=Pn+P+gn|0,wi(e,32,r,d,s),ri(e,q,P),wi(e,48,r,d,s^65536),ri(e,zt,It),wi(e,48,gn-It|0,0,0),ri(e,T,Pn),wi(e,32,r,d,s^8192);break}_=(o|0)<0?6:o,d?(d=(t[Pe>>2]|0)+-28|0,t[Pe>>2]=d,n=we*268435456):(n=we,d=t[Pe>>2]|0),It=(d|0)<0?y:y+288|0,y=It;do _e=~~n>>>0,t[y>>2]=_e,y=y+4|0,n=(n-+(_e>>>0))*1e9;while(n!=0);if((d|0)>0)for(k=It,P=y;;){if(T=(d|0)<29?d:29,d=P+-4|0,d>>>0>=k>>>0){y=0;do pe=X8(t[d>>2]|0,0,T|0)|0,pe=Y4(pe|0,be|0,y|0,0)|0,_e=be,ke=K4(pe|0,_e|0,1e9,0)|0,t[d>>2]=ke,y=$4(pe|0,_e|0,1e9,0)|0,d=d+-4|0;while(d>>>0>=k>>>0);y&&(k=k+-4|0,t[k>>2]=y)}for(y=P;!(y>>>0<=k>>>0);)if(d=y+-4|0,!(t[d>>2]|0))y=d;else break;if(d=(t[Pe>>2]|0)-T|0,t[Pe>>2]=d,(d|0)>0)P=y;else break}else k=It;if((d|0)<0){o=((_+25|0)/9|0)+1|0,ie=(qe|0)==102;do{if(le=0-d|0,le=(le|0)<9?le:9,k>>>0>>0){T=(1<>>le,q=0,d=k;do _e=t[d>>2]|0,t[d>>2]=(_e>>>le)+q,q=Un(_e&T,P)|0,d=d+4|0;while(d>>>0>>0);d=(t[k>>2]|0)==0?k+4|0:k,q?(t[y>>2]=q,k=d,d=y+4|0):(k=d,d=y)}else k=(t[k>>2]|0)==0?k+4|0:k,d=y;y=ie?It:k,y=(d-y>>2|0)>(o|0)?y+(o<<2)|0:d,d=(t[Pe>>2]|0)+le|0,t[Pe>>2]=d}while((d|0)<0);d=k,o=y}else d=k,o=y;if(_e=It,d>>>0>>0){if(y=(_e-d>>2)*9|0,T=t[d>>2]|0,T>>>0>=10){k=10;do k=k*10|0,y=y+1|0;while(T>>>0>=k>>>0)}}else y=0;if(ie=(qe|0)==103,ke=(_|0)!=0,k=_-((qe|0)!=102?y:0)+((ke&ie)<<31>>31)|0,(k|0)<(((o-_e>>2)*9|0)+-9|0)){if(k=k+9216|0,le=It+4+(((k|0)/9|0)+-1024<<2)|0,k=((k|0)%9|0)+1|0,(k|0)<9){T=10;do T=T*10|0,k=k+1|0;while((k|0)!=9)}else T=10;if(P=t[le>>2]|0,q=(P>>>0)%(T>>>0)|0,k=(le+4|0)==(o|0),k&(q|0)==0)k=le;else if(we=(((P>>>0)/(T>>>0)|0)&1|0)==0?9007199254740992:9007199254740994,pe=(T|0)/2|0,n=q>>>0>>0?.5:k&(q|0)==(pe|0)?1:1.5,Ht&&(pe=(c[Ln>>0]|0)==45,n=pe?-n:n,we=pe?-we:we),k=P-q|0,t[le>>2]=k,we+n!=we){if(pe=k+T|0,t[le>>2]=pe,pe>>>0>999999999)for(y=le;k=y+-4|0,t[y>>2]=0,k>>>0>>0&&(d=d+-4|0,t[d>>2]=0),pe=(t[k>>2]|0)+1|0,t[k>>2]=pe,pe>>>0>999999999;)y=k;else k=le;if(y=(_e-d>>2)*9|0,P=t[d>>2]|0,P>>>0>=10){T=10;do T=T*10|0,y=y+1|0;while(P>>>0>=T>>>0)}}else k=le;k=k+4|0,k=o>>>0>k>>>0?k:o,pe=d}else k=o,pe=d;for(qe=k;;){if(qe>>>0<=pe>>>0){Pe=0;break}if(d=qe+-4|0,!(t[d>>2]|0))qe=d;else{Pe=1;break}}o=0-y|0;do if(ie)if(d=((ke^1)&1)+_|0,(d|0)>(y|0)&(y|0)>-5?(T=l+-1|0,_=d+-1-y|0):(T=l+-2|0,_=d+-1|0),d=s&8,d)le=d;else{if(Pe?(vt=t[qe+-4>>2]|0,(vt|0)!=0):0)if((vt>>>0)%10|0)k=0;else{k=0,d=10;do d=d*10|0,k=k+1|0;while(!((vt>>>0)%(d>>>0)|0|0))}else k=9;if(d=((qe-_e>>2)*9|0)+-9|0,(T|32|0)==102){le=d-k|0,le=(le|0)>0?le:0,_=(_|0)<(le|0)?_:le,le=0;break}else{le=d+y-k|0,le=(le|0)>0?le:0,_=(_|0)<(le|0)?_:le,le=0;break}}else T=l,le=s&8;while(0);if(ie=_|le,P=(ie|0)!=0&1,q=(T|32|0)==102,q)ke=0,d=(y|0)>0?y:0;else{if(d=(y|0)<0?o:y,d=aa(d,((d|0)<0)<<31>>31,gn)|0,k=gn,(k-d|0)<2)do d=d+-1|0,c[d>>0]=48;while((k-d|0)<2);c[d+-1>>0]=(y>>31&2)+43,d=d+-2|0,c[d>>0]=T,ke=d,d=k-d|0}if(d=Ht+1+_+P+d|0,wi(e,32,r,d,s),ri(e,Ln,Ht),wi(e,48,r,d,s^65536),q){T=pe>>>0>It>>>0?It:pe,le=zt+9|0,P=le,q=zt+8|0,k=T;do{if(y=aa(t[k>>2]|0,0,le)|0,(k|0)==(T|0))(y|0)==(le|0)&&(c[q>>0]=48,y=q);else if(y>>>0>zt>>>0){pa(zt|0,48,y-Pn|0)|0;do y=y+-1|0;while(y>>>0>zt>>>0)}ri(e,y,P-y|0),k=k+4|0}while(k>>>0<=It>>>0);if(ie|0&&ri(e,5710,1),k>>>0>>0&(_|0)>0)for(;;){if(y=aa(t[k>>2]|0,0,le)|0,y>>>0>zt>>>0){pa(zt|0,48,y-Pn|0)|0;do y=y+-1|0;while(y>>>0>zt>>>0)}if(ri(e,y,(_|0)<9?_:9),k=k+4|0,y=_+-9|0,k>>>0>>0&(_|0)>9)_=y;else{_=y;break}}wi(e,48,_+9|0,9,0)}else{if(ie=Pe?qe:pe+4|0,(_|0)>-1){Pe=zt+9|0,le=(le|0)==0,o=Pe,P=0-Pn|0,q=zt+8|0,T=pe;do{y=aa(t[T>>2]|0,0,Pe)|0,(y|0)==(Pe|0)&&(c[q>>0]=48,y=q);do if((T|0)==(pe|0)){if(k=y+1|0,ri(e,y,1),le&(_|0)<1){y=k;break}ri(e,5710,1),y=k}else{if(y>>>0<=zt>>>0)break;pa(zt|0,48,y+P|0)|0;do y=y+-1|0;while(y>>>0>zt>>>0)}while(0);Pn=o-y|0,ri(e,y,(_|0)>(Pn|0)?Pn:_),_=_-Pn|0,T=T+4|0}while(T>>>0>>0&(_|0)>-1)}wi(e,48,_+18|0,18,0),ri(e,ke,gn-ke|0)}wi(e,32,r,d,s^8192)}else zt=(l&32|0)!=0,d=Ht+3|0,wi(e,32,r,d,s&-65537),ri(e,Ln,Ht),ri(e,n!=n|!1?zt?5686:5690:zt?5678:5682,3),wi(e,32,r,d,s^8192);while(0);return h=Dr,((d|0)<(r|0)?r:d)|0}function b8(e){e=+e;var n=0;return L[j>>3]=e,n=t[j>>2]|0,be=t[j+4>>2]|0,n|0}function gL(e,n){return e=+e,n=n|0,+ +G8(e,n)}function G8(e,n){e=+e,n=n|0;var r=0,o=0,s=0;switch(L[j>>3]=e,r=t[j>>2]|0,o=t[j+4>>2]|0,s=ch(r|0,o|0,52)|0,s&2047){case 0:{e!=0?(e=+G8(e*18446744073709552e3,n),r=(t[n>>2]|0)+-64|0):r=0,t[n>>2]=r;break}case 2047:break;default:t[n>>2]=(s&2047)+-1022,t[j>>2]=r,t[j+4>>2]=o&-2146435073|1071644672,e=+L[j>>3]}return+e}function _L(e,n,r){e=e|0,n=n|0,r=r|0;do if(e){if(n>>>0<128){c[e>>0]=n,e=1;break}if(!(t[t[(yL()|0)+188>>2]>>2]|0))if((n&-128|0)==57216){c[e>>0]=n,e=1;break}else{t[(ca()|0)>>2]=84,e=-1;break}if(n>>>0<2048){c[e>>0]=n>>>6|192,c[e+1>>0]=n&63|128,e=2;break}if(n>>>0<55296|(n&-8192|0)==57344){c[e>>0]=n>>>12|224,c[e+1>>0]=n>>>6&63|128,c[e+2>>0]=n&63|128,e=3;break}if((n+-65536|0)>>>0<1048576){c[e>>0]=n>>>18|240,c[e+1>>0]=n>>>12&63|128,c[e+2>>0]=n>>>6&63|128,c[e+3>>0]=n&63|128,e=4;break}else{t[(ca()|0)>>2]=84,e=-1;break}}else e=1;while(0);return e|0}function yL(){return b4()|0}function wL(){return b4()|0}function DL(e,n){e=e|0,n=n|0;var r=0,o=0;for(o=0;;){if((C[5712+o>>0]|0)==(e|0)){e=2;break}if(r=o+1|0,(r|0)==87){r=5800,o=87,e=5;break}else o=r}if((e|0)==2&&(o?(r=5800,e=5):r=5800),(e|0)==5)for(;;){do e=r,r=r+1|0;while((c[e>>0]|0)!=0);if(o=o+-1|0,o)e=5;else break}return EL(r,t[n+20>>2]|0)|0}function EL(e,n){return e=e|0,n=n|0,SL(e,n)|0}function SL(e,n){return e=e|0,n=n|0,n?n=CL(t[n>>2]|0,t[n+4>>2]|0,e)|0:n=0,(n|0?n:e)|0}function CL(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0,d=0,_=0,y=0,k=0,T=0,P=0,q=0;q=(t[e>>2]|0)+1794895138|0,l=fc(t[e+8>>2]|0,q)|0,o=fc(t[e+12>>2]|0,q)|0,s=fc(t[e+16>>2]|0,q)|0;e:do if((l>>>0>>2>>>0?(P=n-(l<<2)|0,o>>>0

>>0&s>>>0

>>0):0)?((s|o)&3|0)==0:0){for(P=o>>>2,T=s>>>2,k=0;;){if(_=l>>>1,y=k+_|0,d=y<<1,s=d+P|0,o=fc(t[e+(s<<2)>>2]|0,q)|0,s=fc(t[e+(s+1<<2)>>2]|0,q)|0,!(s>>>0>>0&o>>>0<(n-s|0)>>>0)){o=0;break e}if(c[e+(s+o)>>0]|0){o=0;break e}if(o=U8(r,e+s|0)|0,!o)break;if(o=(o|0)<0,(l|0)==1){o=0;break e}else k=o?k:y,l=o?_:l-_|0}o=d+T|0,s=fc(t[e+(o<<2)>>2]|0,q)|0,o=fc(t[e+(o+1<<2)>>2]|0,q)|0,o>>>0>>0&s>>>0<(n-o|0)>>>0?o=(c[e+(o+s)>>0]|0)==0?e+o|0:0:o=0}else o=0;while(0);return o|0}function fc(e,n){e=e|0,n=n|0;var r=0;return r=Z8(e|0)|0,((n|0)==0?e:r)|0}function TL(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0,d=0,_=0;o=r+16|0,s=t[o>>2]|0,s?l=5:xL(r)|0?o=0:(s=t[o>>2]|0,l=5);e:do if((l|0)==5){if(_=r+20|0,d=t[_>>2]|0,o=d,(s-d|0)>>>0>>0){o=dh[t[r+36>>2]&7](r,e,n)|0;break}t:do if((c[r+75>>0]|0)>-1){for(d=n;;){if(!d){l=0,s=e;break t}if(s=d+-1|0,(c[e+s>>0]|0)==10)break;d=s}if(o=dh[t[r+36>>2]&7](r,e,d)|0,o>>>0>>0)break e;l=d,s=e+d|0,n=n-d|0,o=t[_>>2]|0}else l=0,s=e;while(0);vn(o|0,s|0,n|0)|0,t[_>>2]=(t[_>>2]|0)+n,o=l+n|0}while(0);return o|0}function xL(e){e=e|0;var n=0,r=0;return n=e+74|0,r=c[n>>0]|0,c[n>>0]=r+255|r,n=t[e>>2]|0,n&8?(t[e>>2]=n|32,e=-1):(t[e+8>>2]=0,t[e+4>>2]=0,r=t[e+44>>2]|0,t[e+28>>2]=r,t[e+20>>2]=r,t[e+16>>2]=r+(t[e+48>>2]|0),e=0),e|0}function Ur(e,n){e=w(e),n=w(n);var r=0,o=0;r=V8(e)|0;do if((r&2147483647)>>>0<=2139095040){if(o=V8(n)|0,(o&2147483647)>>>0<=2139095040)if((o^r|0)<0){e=(r|0)<0?n:e;break}else{e=e>2]=e,t[j>>2]|0|0}function cc(e,n){e=w(e),n=w(n);var r=0,o=0;r=Y8(e)|0;do if((r&2147483647)>>>0<=2139095040){if(o=Y8(n)|0,(o&2147483647)>>>0<=2139095040)if((o^r|0)<0){e=(r|0)<0?e:n;break}else{e=e>2]=e,t[j>>2]|0|0}function V4(e,n){e=w(e),n=w(n);var r=0,o=0,s=0,l=0,d=0,_=0,y=0,k=0;l=(D[j>>2]=e,t[j>>2]|0),_=(D[j>>2]=n,t[j>>2]|0),r=l>>>23&255,d=_>>>23&255,y=l&-2147483648,s=_<<1;e:do if((s|0)!=0?!((r|0)==255|((kL(n)|0)&2147483647)>>>0>2139095040):0){if(o=l<<1,o>>>0<=s>>>0)return n=w(e*w(0)),w((o|0)==(s|0)?n:e);if(r)o=l&8388607|8388608;else{if(r=l<<9,(r|0)>-1){o=r,r=0;do r=r+-1|0,o=o<<1;while((o|0)>-1)}else r=0;o=l<<1-r}if(d)_=_&8388607|8388608;else{if(l=_<<9,(l|0)>-1){s=0;do s=s+-1|0,l=l<<1;while((l|0)>-1)}else s=0;d=s,_=_<<1-s}s=o-_|0,l=(s|0)>-1;t:do if((r|0)>(d|0)){for(;;){if(l)if(s)o=s;else break;if(o=o<<1,r=r+-1|0,s=o-_|0,l=(s|0)>-1,(r|0)<=(d|0))break t}n=w(e*w(0));break e}while(0);if(l)if(s)o=s;else{n=w(e*w(0));break}if(o>>>0<8388608)do o=o<<1,r=r+-1|0;while(o>>>0<8388608);(r|0)>0?r=o+-8388608|r<<23:r=o>>>(1-r|0),n=(t[j>>2]=r|y,w(D[j>>2]))}else k=3;while(0);return(k|0)==3&&(n=w(e*n),n=w(n/n)),w(n)}function kL(e){return e=w(e),D[j>>2]=e,t[j>>2]|0|0}function AL(e,n){return e=e|0,n=n|0,q8(t[582]|0,e,n)|0}function $n(e){e=e|0,_n()}function da(e){e=e|0}function OL(e,n){return e=e|0,n=n|0,0}function IL(e){return e=e|0,($8(e+4|0)|0)==-1?(Nl[t[(t[e>>2]|0)+8>>2]&127](e),e=1):e=0,e|0}function $8(e){e=e|0;var n=0;return n=t[e>>2]|0,t[e>>2]=n+-1,n+-1|0}function Tf(e){e=e|0,IL(e)|0&&PL(e)}function PL(e){e=e|0;var n=0;n=e+8|0,((t[n>>2]|0)!=0?($8(n)|0)!=-1:0)||Nl[t[(t[e>>2]|0)+16>>2]&127](e)}function Tt(e){e=e|0;var n=0;for(n=(e|0)==0?1:e;e=uh(n)|0,!(e|0);){if(e=FL()|0,!e){e=0;break}fD[e&0]()}return e|0}function K8(e){return e=e|0,Tt(e)|0}function Ve(e){e=e|0,sh(e)}function ML(e){e=e|0,(c[e+11>>0]|0)<0&&Ve(t[e>>2]|0)}function FL(){var e=0;return e=t[2923]|0,t[2923]=e+0,e|0}function LL(){}function fh(e,n,r,o){return e=e|0,n=n|0,r=r|0,o=o|0,o=n-o-(r>>>0>e>>>0|0)>>>0,be=o,e-r>>>0|0|0}function Y4(e,n,r,o){return e=e|0,n=n|0,r=r|0,o=o|0,r=e+r>>>0,be=n+o+(r>>>0>>0|0)>>>0,r|0|0}function pa(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0,d=0;if(l=e+r|0,n=n&255,(r|0)>=67){for(;e&3;)c[e>>0]=n,e=e+1|0;for(o=l&-4|0,s=o-64|0,d=n|n<<8|n<<16|n<<24;(e|0)<=(s|0);)t[e>>2]=d,t[e+4>>2]=d,t[e+8>>2]=d,t[e+12>>2]=d,t[e+16>>2]=d,t[e+20>>2]=d,t[e+24>>2]=d,t[e+28>>2]=d,t[e+32>>2]=d,t[e+36>>2]=d,t[e+40>>2]=d,t[e+44>>2]=d,t[e+48>>2]=d,t[e+52>>2]=d,t[e+56>>2]=d,t[e+60>>2]=d,e=e+64|0;for(;(e|0)<(o|0);)t[e>>2]=d,e=e+4|0}for(;(e|0)<(l|0);)c[e>>0]=n,e=e+1|0;return l-r|0}function X8(e,n,r){return e=e|0,n=n|0,r=r|0,(r|0)<32?(be=n<>>32-r,e<>>r,e>>>r|(n&(1<>>r-32|0)}function vn(e,n,r){e=e|0,n=n|0,r=r|0;var o=0,s=0,l=0;if((r|0)>=8192)return wo(e|0,n|0,r|0)|0;if(l=e|0,s=e+r|0,(e&3)==(n&3)){for(;e&3;){if(!r)return l|0;c[e>>0]=c[n>>0]|0,e=e+1|0,n=n+1|0,r=r-1|0}for(r=s&-4|0,o=r-64|0;(e|0)<=(o|0);)t[e>>2]=t[n>>2],t[e+4>>2]=t[n+4>>2],t[e+8>>2]=t[n+8>>2],t[e+12>>2]=t[n+12>>2],t[e+16>>2]=t[n+16>>2],t[e+20>>2]=t[n+20>>2],t[e+24>>2]=t[n+24>>2],t[e+28>>2]=t[n+28>>2],t[e+32>>2]=t[n+32>>2],t[e+36>>2]=t[n+36>>2],t[e+40>>2]=t[n+40>>2],t[e+44>>2]=t[n+44>>2],t[e+48>>2]=t[n+48>>2],t[e+52>>2]=t[n+52>>2],t[e+56>>2]=t[n+56>>2],t[e+60>>2]=t[n+60>>2],e=e+64|0,n=n+64|0;for(;(e|0)<(r|0);)t[e>>2]=t[n>>2],e=e+4|0,n=n+4|0}else for(r=s-4|0;(e|0)<(r|0);)c[e>>0]=c[n>>0]|0,c[e+1>>0]=c[n+1>>0]|0,c[e+2>>0]=c[n+2>>0]|0,c[e+3>>0]=c[n+3>>0]|0,e=e+4|0,n=n+4|0;for(;(e|0)<(s|0);)c[e>>0]=c[n>>0]|0,e=e+1|0,n=n+1|0;return l|0}function J8(e){e=e|0;var n=0;return n=c[ce+(e&255)>>0]|0,(n|0)<8?n|0:(n=c[ce+(e>>8&255)>>0]|0,(n|0)<8?n+8|0:(n=c[ce+(e>>16&255)>>0]|0,(n|0)<8?n+16|0:(c[ce+(e>>>24)>>0]|0)+24|0))}function Q8(e,n,r,o,s){e=e|0,n=n|0,r=r|0,o=o|0,s=s|0;var l=0,d=0,_=0,y=0,k=0,T=0,P=0,q=0,we=0,le=0;if(T=e,y=n,k=y,d=r,q=o,_=q,!k)return l=(s|0)!=0,_?l?(t[s>>2]=e|0,t[s+4>>2]=n&0,q=0,s=0,be=q,s|0):(q=0,s=0,be=q,s|0):(l&&(t[s>>2]=(T>>>0)%(d>>>0),t[s+4>>2]=0),q=0,s=(T>>>0)/(d>>>0)>>>0,be=q,s|0);l=(_|0)==0;do if(d){if(!l){if(l=(cr(_|0)|0)-(cr(k|0)|0)|0,l>>>0<=31){P=l+1|0,_=31-l|0,n=l-31>>31,d=P,e=T>>>(P>>>0)&n|k<<_,n=k>>>(P>>>0)&n,l=0,_=T<<_;break}return s?(t[s>>2]=e|0,t[s+4>>2]=y|n&0,q=0,s=0,be=q,s|0):(q=0,s=0,be=q,s|0)}if(l=d-1|0,l&d|0){_=(cr(d|0)|0)+33-(cr(k|0)|0)|0,le=64-_|0,P=32-_|0,y=P>>31,we=_-32|0,n=we>>31,d=_,e=P-1>>31&k>>>(we>>>0)|(k<>>(_>>>0))&n,n=n&k>>>(_>>>0),l=T<>>(we>>>0))&y|T<>31;break}return s|0&&(t[s>>2]=l&T,t[s+4>>2]=0),(d|0)==1?(we=y|n&0,le=e|0|0,be=we,le|0):(le=J8(d|0)|0,we=k>>>(le>>>0)|0,le=k<<32-le|T>>>(le>>>0)|0,be=we,le|0)}else{if(l)return s|0&&(t[s>>2]=(k>>>0)%(d>>>0),t[s+4>>2]=0),we=0,le=(k>>>0)/(d>>>0)>>>0,be=we,le|0;if(!T)return s|0&&(t[s>>2]=0,t[s+4>>2]=(k>>>0)%(_>>>0)),we=0,le=(k>>>0)/(_>>>0)>>>0,be=we,le|0;if(l=_-1|0,!(l&_))return s|0&&(t[s>>2]=e|0,t[s+4>>2]=l&k|n&0),we=0,le=k>>>((J8(_|0)|0)>>>0),be=we,le|0;if(l=(cr(_|0)|0)-(cr(k|0)|0)|0,l>>>0<=30){n=l+1|0,_=31-l|0,d=n,e=k<<_|T>>>(n>>>0),n=k>>>(n>>>0),l=0,_=T<<_;break}return s?(t[s>>2]=e|0,t[s+4>>2]=y|n&0,we=0,le=0,be=we,le|0):(we=0,le=0,be=we,le|0)}while(0);if(!d)k=_,y=0,_=0;else{P=r|0|0,T=q|o&0,k=Y4(P|0,T|0,-1,-1)|0,r=be,y=_,_=0;do o=y,y=l>>>31|y<<1,l=_|l<<1,o=e<<1|o>>>31|0,q=e>>>31|n<<1|0,fh(k|0,r|0,o|0,q|0)|0,le=be,we=le>>31|((le|0)<0?-1:0)<<1,_=we&1,e=fh(o|0,q|0,we&P|0,(((le|0)<0?-1:0)>>31|((le|0)<0?-1:0)<<1)&T|0)|0,n=be,d=d-1|0;while((d|0)!=0);k=y,y=0}return d=0,s|0&&(t[s>>2]=e,t[s+4>>2]=n),we=(l|0)>>>31|(k|d)<<1|(d<<1|l>>>31)&0|y,le=(l<<1|0>>>31)&-2|_,be=we,le|0}function $4(e,n,r,o){return e=e|0,n=n|0,r=r|0,o=o|0,Q8(e,n,r,o,0)|0}function xf(e){e=e|0;var n=0,r=0;return r=e+15&-16|0,n=t[N>>2]|0,e=n+r|0,(r|0)>0&(e|0)<(n|0)|(e|0)<0?(vr()|0,Os(12),-1):(t[N>>2]=e,((e|0)>(Xn()|0)?(Bn()|0)==0:0)?(t[N>>2]=n,Os(12),-1):n|0)}function Y1(e,n,r){e=e|0,n=n|0,r=r|0;var o=0;if((n|0)<(e|0)&(e|0)<(n+r|0)){for(o=e,n=n+r|0,e=e+r|0;(r|0)>0;)e=e-1|0,n=n-1|0,r=r-1|0,c[e>>0]=c[n>>0]|0;e=o}else vn(e,n,r)|0;return e|0}function K4(e,n,r,o){e=e|0,n=n|0,r=r|0,o=o|0;var s=0,l=0;return l=h,h=h+16|0,s=l|0,Q8(e,n,r,o,s)|0,h=l,be=t[s+4>>2]|0,t[s>>2]|0|0}function Z8(e){return e=e|0,(e&255)<<24|(e>>8&255)<<16|(e>>16&255)<<8|e>>>24|0}function RL(e,n,r,o,s,l){e=e|0,n=n|0,r=r|0,o=o|0,s=s|0,l=l|0,eD[e&1](n|0,r|0,o|0,s|0,l|0)}function NL(e,n,r){e=e|0,n=n|0,r=w(r),tD[e&1](n|0,w(r))}function BL(e,n,r){e=e|0,n=n|0,r=+r,nD[e&31](n|0,+r)}function jL(e,n,r,o){return e=e|0,n=n|0,r=w(r),o=w(o),w(rD[e&0](n|0,w(r),w(o)))}function UL(e,n){e=e|0,n=n|0,Nl[e&127](n|0)}function qL(e,n,r){e=e|0,n=n|0,r=r|0,Bl[e&31](n|0,r|0)}function zL(e,n){return e=e|0,n=n|0,dc[e&31](n|0)|0}function WL(e,n,r,o,s){e=e|0,n=n|0,r=+r,o=+o,s=s|0,iD[e&1](n|0,+r,+o,s|0)}function HL(e,n,r,o){e=e|0,n=n|0,r=+r,o=+o,CR[e&1](n|0,+r,+o)}function bL(e,n,r,o){return e=e|0,n=n|0,r=r|0,o=o|0,dh[e&7](n|0,r|0,o|0)|0}function VL(e,n,r,o){return e=e|0,n=n|0,r=r|0,o=o|0,+TR[e&1](n|0,r|0,o|0)}function YL(e,n){return e=e|0,n=n|0,+oD[e&15](n|0)}function $L(e,n,r){return e=e|0,n=n|0,r=+r,xR[e&1](n|0,+r)|0}function KL(e,n,r){return e=e|0,n=n|0,r=r|0,J4[e&15](n|0,r|0)|0}function XL(e,n,r,o,s,l){e=e|0,n=n|0,r=r|0,o=+o,s=+s,l=l|0,kR[e&1](n|0,r|0,+o,+s,l|0)}function JL(e,n,r,o,s,l,d){e=e|0,n=n|0,r=r|0,o=o|0,s=s|0,l=l|0,d=d|0,AR[e&1](n|0,r|0,o|0,s|0,l|0,d|0)}function QL(e,n,r){return e=e|0,n=n|0,r=r|0,+uD[e&7](n|0,r|0)}function ZL(e){return e=e|0,ph[e&7]()|0}function eR(e,n,r,o,s,l){return e=e|0,n=n|0,r=r|0,o=o|0,s=s|0,l=l|0,sD[e&1](n|0,r|0,o|0,s|0,l|0)|0}function tR(e,n,r,o,s){e=e|0,n=n|0,r=r|0,o=o|0,s=+s,OR[e&1](n|0,r|0,o|0,+s)}function nR(e,n,r,o,s,l,d){e=e|0,n=n|0,r=r|0,o=w(o),s=s|0,l=w(l),d=d|0,lD[e&1](n|0,r|0,w(o),s|0,w(l),d|0)}function rR(e,n,r,o){e=e|0,n=n|0,r=r|0,o=o|0,X1[e&15](n|0,r|0,o|0)}function iR(e){e=e|0,fD[e&0]()}function oR(e,n,r,o){e=e|0,n=n|0,r=r|0,o=+o,cD[e&15](n|0,r|0,+o)}function uR(e,n,r){return e=e|0,n=+n,r=+r,IR[e&1](+n,+r)|0}function sR(e,n,r,o,s){e=e|0,n=n|0,r=r|0,o=o|0,s=s|0,Q4[e&15](n|0,r|0,o|0,s|0)}function lR(e,n,r,o,s){e=e|0,n=n|0,r=r|0,o=o|0,s=s|0,pt(0)}function fR(e,n){e=e|0,n=w(n),pt(1)}function Lo(e,n){e=e|0,n=+n,pt(2)}function cR(e,n,r){return e=e|0,n=w(n),r=w(r),pt(3),tt}function tn(e){e=e|0,pt(4)}function $1(e,n){e=e|0,n=n|0,pt(5)}function tu(e){return e=e|0,pt(6),0}function aR(e,n,r,o){e=e|0,n=+n,r=+r,o=o|0,pt(7)}function dR(e,n,r){e=e|0,n=+n,r=+r,pt(8)}function pR(e,n,r){return e=e|0,n=n|0,r=r|0,pt(9),0}function hR(e,n,r){return e=e|0,n=n|0,r=r|0,pt(10),0}function ac(e){return e=e|0,pt(11),0}function mR(e,n){return e=e|0,n=+n,pt(12),0}function K1(e,n){return e=e|0,n=n|0,pt(13),0}function vR(e,n,r,o,s){e=e|0,n=n|0,r=+r,o=+o,s=s|0,pt(14)}function gR(e,n,r,o,s,l){e=e|0,n=n|0,r=r|0,o=o|0,s=s|0,l=l|0,pt(15)}function X4(e,n){return e=e|0,n=n|0,pt(16),0}function _R(){return pt(17),0}function yR(e,n,r,o,s){return e=e|0,n=n|0,r=r|0,o=o|0,s=s|0,pt(18),0}function wR(e,n,r,o){e=e|0,n=n|0,r=r|0,o=+o,pt(19)}function DR(e,n,r,o,s,l){e=e|0,n=n|0,r=w(r),o=o|0,s=w(s),l=l|0,pt(20)}function ah(e,n,r){e=e|0,n=n|0,r=r|0,pt(21)}function ER(){pt(22)}function ha(e,n,r){e=e|0,n=n|0,r=+r,pt(23)}function SR(e,n){return e=+e,n=+n,pt(24),0}function ma(e,n,r,o){e=e|0,n=n|0,r=r|0,o=o|0,pt(25)}var eD=[lR,_I],tD=[fR,x0],nD=[Lo,Kf,Tl,xl,hf,xo,mf,Wa,Hs,mi,Xf,Rc,Jf,ao,$o,kl,Nc,Al,vf,Lo,Lo,Lo,Lo,Lo,Lo,Lo,Lo,Lo,Lo,Lo,Lo,Lo],rD=[cR],Nl=[tn,da,Km,Xm,es,a_,d_,p_,YA,$A,KA,oI,uI,sI,kF,AF,OF,Sn,Oc,pf,ti,vi,Nm,Uc,r1,Hd,Pl,mv,Av,Kc,Jc,yp,Eg,na,Ug,Yg,u_,k_,q_,J_,a4,Ct,w9,U9,ex,hx,Ix,_0,s7,S7,W7,uk,Dk,Wk,Qk,tA,_A,DA,jA,JA,eO,gO,RO,d1,vP,YP,lM,SM,GM,uF,gF,wF,tn,tn,tn,tn,tn,tn,tn,tn,tn,tn,tn,tn,tn,tn,tn,tn,tn,tn,tn,tn,tn,tn,tn,tn,tn,tn,tn,tn,tn,tn,tn,tn,tn,tn,tn,tn,tn,tn,tn,tn,tn,tn,tn,tn,tn,tn,tn,tn,tn,tn,tn,tn,tn,tn,tn,tn],Bl=[$1,ja,Ua,$f,gu,co,qa,Ws,za,Mc,Fc,Lc,po,Ce,ze,Et,on,sr,mn,Zf,gd,xd,H9,rx,ck,yP,HO,C8,$1,$1,$1,$1],dc=[tu,iL,Ba,m,b,ee,Ye,Ze,ut,In,jr,gi,Pm,Ha,Ya,Fx,Tk,wO,SP,Qo,tu,tu,tu,tu,tu,tu,tu,tu,tu,tu,tu,tu],iD=[aR,Sd],CR=[dR,zA],dh=[pR,j8,oL,lL,Gv,P_,a7,kM],TR=[hR,Op],oD=[ac,_i,Re,pr,Cd,ho,bs,$a,Td,qc,ac,ac,ac,ac,ac,ac],xR=[mR,Kk],J4=[K1,OL,vd,Vc,_v,ig,pg,f_,H_,_x,Xu,dM,K1,K1,K1,K1],kR=[vR,iv],AR=[gR,KM],uD=[X4,Hr,Ka,kd,Xa,Jg,X4,X4],ph=[_R,Ja,Z0,g0,oA,TA,iO,CF],sD=[yR,or],OR=[wR,m4],lD=[DR,Bc],X1=[ah,S,A0,Vn,ni,Mv,Tg,dn,C9,fo,zI,JP,cF,ah,ah,ah],fD=[ER],cD=[ha,Ic,vu,Pc,Qu,Qf,k0,v,W1,k7,Gk,ha,ha,ha,ha,ha],IR=[SR,GA],Q4=[ma,Fg,zx,V7,Lk,aA,PA,aO,qO,OP,RF,ma,ma,ma,ma,ma];return{_llvm_bswap_i32:Z8,dynCall_idd:uR,dynCall_i:ZL,_i64Subtract:fh,___udivdi3:$4,dynCall_vif:NL,setThrew:vl,dynCall_viii:rR,_bitshift64Lshr:ch,_bitshift64Shl:X8,dynCall_vi:UL,dynCall_viiddi:XL,dynCall_diii:VL,dynCall_iii:KL,_memset:pa,_sbrk:xf,_memcpy:vn,__GLOBAL__sub_I_Yoga_cpp:t0,dynCall_vii:qL,___uremdi3:K4,dynCall_vid:BL,stackAlloc:zi,_nbind_init:VF,getTempRet0:fu,dynCall_di:YL,dynCall_iid:$L,setTempRet0:gl,_i64Add:Y4,dynCall_fiff:jL,dynCall_iiii:bL,_emscripten_get_global_libc:rL,dynCall_viid:oR,dynCall_viiid:tR,dynCall_viififi:nR,dynCall_ii:zL,__GLOBAL__sub_I_Binding_cc:lP,dynCall_viiii:sR,dynCall_iiiiii:eR,stackSave:lu,dynCall_viiiii:RL,__GLOBAL__sub_I_nbind_cc:Gs,dynCall_vidd:HL,_free:sh,runPostSets:LL,dynCall_viiiiii:JL,establishStackSpace:O0,_memmove:Y1,stackRestore:Ho,_malloc:uh,__GLOBAL__sub_I_common_cc:AO,dynCall_viddi:WL,dynCall_dii:QL,dynCall_v:iR}}(Module.asmGlobalArg,Module.asmLibraryArg,buffer),_llvm_bswap_i32=Module._llvm_bswap_i32=asm._llvm_bswap_i32,getTempRet0=Module.getTempRet0=asm.getTempRet0,___udivdi3=Module.___udivdi3=asm.___udivdi3,setThrew=Module.setThrew=asm.setThrew,_bitshift64Lshr=Module._bitshift64Lshr=asm._bitshift64Lshr,_bitshift64Shl=Module._bitshift64Shl=asm._bitshift64Shl,_memset=Module._memset=asm._memset,_sbrk=Module._sbrk=asm._sbrk,_memcpy=Module._memcpy=asm._memcpy,stackAlloc=Module.stackAlloc=asm.stackAlloc,___uremdi3=Module.___uremdi3=asm.___uremdi3,_nbind_init=Module._nbind_init=asm._nbind_init,_i64Subtract=Module._i64Subtract=asm._i64Subtract,setTempRet0=Module.setTempRet0=asm.setTempRet0,_i64Add=Module._i64Add=asm._i64Add,_emscripten_get_global_libc=Module._emscripten_get_global_libc=asm._emscripten_get_global_libc,__GLOBAL__sub_I_Yoga_cpp=Module.__GLOBAL__sub_I_Yoga_cpp=asm.__GLOBAL__sub_I_Yoga_cpp,__GLOBAL__sub_I_Binding_cc=Module.__GLOBAL__sub_I_Binding_cc=asm.__GLOBAL__sub_I_Binding_cc,stackSave=Module.stackSave=asm.stackSave,__GLOBAL__sub_I_nbind_cc=Module.__GLOBAL__sub_I_nbind_cc=asm.__GLOBAL__sub_I_nbind_cc,_free=Module._free=asm._free,runPostSets=Module.runPostSets=asm.runPostSets,establishStackSpace=Module.establishStackSpace=asm.establishStackSpace,_memmove=Module._memmove=asm._memmove,stackRestore=Module.stackRestore=asm.stackRestore,_malloc=Module._malloc=asm._malloc,__GLOBAL__sub_I_common_cc=Module.__GLOBAL__sub_I_common_cc=asm.__GLOBAL__sub_I_common_cc,dynCall_viiiii=Module.dynCall_viiiii=asm.dynCall_viiiii,dynCall_vif=Module.dynCall_vif=asm.dynCall_vif,dynCall_vid=Module.dynCall_vid=asm.dynCall_vid,dynCall_fiff=Module.dynCall_fiff=asm.dynCall_fiff,dynCall_vi=Module.dynCall_vi=asm.dynCall_vi,dynCall_vii=Module.dynCall_vii=asm.dynCall_vii,dynCall_ii=Module.dynCall_ii=asm.dynCall_ii,dynCall_viddi=Module.dynCall_viddi=asm.dynCall_viddi,dynCall_vidd=Module.dynCall_vidd=asm.dynCall_vidd,dynCall_iiii=Module.dynCall_iiii=asm.dynCall_iiii,dynCall_diii=Module.dynCall_diii=asm.dynCall_diii,dynCall_di=Module.dynCall_di=asm.dynCall_di,dynCall_iid=Module.dynCall_iid=asm.dynCall_iid,dynCall_iii=Module.dynCall_iii=asm.dynCall_iii,dynCall_viiddi=Module.dynCall_viiddi=asm.dynCall_viiddi,dynCall_viiiiii=Module.dynCall_viiiiii=asm.dynCall_viiiiii,dynCall_dii=Module.dynCall_dii=asm.dynCall_dii,dynCall_i=Module.dynCall_i=asm.dynCall_i,dynCall_iiiiii=Module.dynCall_iiiiii=asm.dynCall_iiiiii,dynCall_viiid=Module.dynCall_viiid=asm.dynCall_viiid,dynCall_viififi=Module.dynCall_viififi=asm.dynCall_viififi,dynCall_viii=Module.dynCall_viii=asm.dynCall_viii,dynCall_v=Module.dynCall_v=asm.dynCall_v,dynCall_viid=Module.dynCall_viid=asm.dynCall_viid,dynCall_idd=Module.dynCall_idd=asm.dynCall_idd,dynCall_viiii=Module.dynCall_viiii=asm.dynCall_viiii;Runtime.stackAlloc=Module.stackAlloc,Runtime.stackSave=Module.stackSave,Runtime.stackRestore=Module.stackRestore,Runtime.establishStackSpace=Module.establishStackSpace,Runtime.setTempRet0=Module.setTempRet0,Runtime.getTempRet0=Module.getTempRet0,Module.asm=asm;function ExitStatus(i){this.name="ExitStatus",this.message="Program terminated with exit("+i+")",this.status=i}ExitStatus.prototype=new Error,ExitStatus.prototype.constructor=ExitStatus;var initialStackTop,preloadStartTime=null,calledMain=!1;dependenciesFulfilled=function i(){Module.calledRun||run(),Module.calledRun||(dependenciesFulfilled=i)},Module.callMain=Module.callMain=function(u){u=u||[],ensureInitRuntime();var f=u.length+1;function c(){for(var x=0;x<4-1;x++)g.push(0)}var g=[allocate(intArrayFromString(Module.thisProgram),"i8",ALLOC_NORMAL)];c();for(var t=0;t0||(preRun(),runDependencies>0)||Module.calledRun)return;function u(){Module.calledRun||(Module.calledRun=!0,!ABORT&&(ensureInitRuntime(),preMain(),Module.onRuntimeInitialized&&Module.onRuntimeInitialized(),Module._main&&shouldRunNow&&Module.callMain(i),postRun()))}Module.setStatus?(Module.setStatus("Running..."),setTimeout(function(){setTimeout(function(){Module.setStatus("")},1),u()},1)):u()}Module.run=Module.run=run;function exit(i,u){u&&Module.noExitRuntime||(Module.noExitRuntime||(ABORT=!0,EXITSTATUS=i,STACKTOP=initialStackTop,exitRuntime(),Module.onExit&&Module.onExit(i)),ENVIRONMENT_IS_NODE&&process.exit(i),Module.quit(i,new ExitStatus(i)))}Module.exit=Module.exit=exit;var abortDecorators=[];function abort(i){Module.onAbort&&Module.onAbort(i),i!==void 0?(Module.print(i),Module.printErr(i),i=JSON.stringify(i)):i="",ABORT=!0,EXITSTATUS=1;var u=` -If this abort() is unexpected, build with -s ASSERTIONS=1 which can give more information.`,f="abort("+i+") at "+stackTrace()+u;throw abortDecorators&&abortDecorators.forEach(function(c){f=c(f,i)}),f}if(Module.abort=Module.abort=abort,Module.preInit)for(typeof Module.preInit=="function"&&(Module.preInit=[Module.preInit]);Module.preInit.length>0;)Module.preInit.pop()();var shouldRunNow=!0;Module.noInitialRun&&(shouldRunNow=!1),run()})});var hc=Me((hb,vE)=>{"use strict";var wN=hE(),DN=mE(),Py=!1,My=null;DN({},function(i,u){if(!Py){if(Py=!0,i)throw i;My=u}});if(!Py)throw new Error("Failed to load the yoga module - it needed to be loaded synchronously, but didn't");vE.exports=wN(My.bind,My.lib)});var _E=Me((mb,gE)=>{"use strict";gE.exports=({onlyFirst:i=!1}={})=>{let u=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(u,i?void 0:"g")}});var Fy=Me((vb,yE)=>{"use strict";var EN=_E();yE.exports=i=>typeof i=="string"?i.replace(EN(),""):i});var Ry=Me((gb,Ly)=>{"use strict";var wE=i=>Number.isNaN(i)?!1:i>=4352&&(i<=4447||i===9001||i===9002||11904<=i&&i<=12871&&i!==12351||12880<=i&&i<=19903||19968<=i&&i<=42182||43360<=i&&i<=43388||44032<=i&&i<=55203||63744<=i&&i<=64255||65040<=i&&i<=65049||65072<=i&&i<=65131||65281<=i&&i<=65376||65504<=i&&i<=65510||110592<=i&&i<=110593||127488<=i&&i<=127569||131072<=i&&i<=262141);Ly.exports=wE;Ly.exports.default=wE});var EE=Me((_b,DE)=>{"use strict";DE.exports=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g}});var Mh=Me((yb,Ny)=>{"use strict";var SN=Fy(),CN=Ry(),TN=EE(),SE=i=>{if(i=i.replace(TN()," "),typeof i!="string"||i.length===0)return 0;i=SN(i);let u=0;for(let f=0;f=127&&c<=159||c>=768&&c<=879||(c>65535&&f++,u+=CN(c)?2:1)}return u};Ny.exports=SE;Ny.exports.default=SE});var jy=Me((wb,By)=>{"use strict";var xN=Mh(),CE=i=>{let u=0;for(let f of i.split(` -`))u=Math.max(u,xN(f));return u};By.exports=CE;By.exports.default=CE});var TE=Me(a2=>{"use strict";var kN=a2&&a2.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(a2,"__esModule",{value:!0});var AN=kN(jy()),Uy={};a2.default=i=>{if(i.length===0)return{width:0,height:0};if(Uy[i])return Uy[i];let u=AN.default(i),f=i.split(` -`).length;return Uy[i]={width:u,height:f},{width:u,height:f}}});var xE=Me(d2=>{"use strict";var ON=d2&&d2.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(d2,"__esModule",{value:!0});var hr=ON(hc()),IN=(i,u)=>{"position"in u&&i.setPositionType(u.position==="absolute"?hr.default.POSITION_TYPE_ABSOLUTE:hr.default.POSITION_TYPE_RELATIVE)},PN=(i,u)=>{"marginLeft"in u&&i.setMargin(hr.default.EDGE_START,u.marginLeft||0),"marginRight"in u&&i.setMargin(hr.default.EDGE_END,u.marginRight||0),"marginTop"in u&&i.setMargin(hr.default.EDGE_TOP,u.marginTop||0),"marginBottom"in u&&i.setMargin(hr.default.EDGE_BOTTOM,u.marginBottom||0)},MN=(i,u)=>{"paddingLeft"in u&&i.setPadding(hr.default.EDGE_LEFT,u.paddingLeft||0),"paddingRight"in u&&i.setPadding(hr.default.EDGE_RIGHT,u.paddingRight||0),"paddingTop"in u&&i.setPadding(hr.default.EDGE_TOP,u.paddingTop||0),"paddingBottom"in u&&i.setPadding(hr.default.EDGE_BOTTOM,u.paddingBottom||0)},FN=(i,u)=>{var f;"flexGrow"in u&&i.setFlexGrow((f=u.flexGrow)!==null&&f!==void 0?f:0),"flexShrink"in u&&i.setFlexShrink(typeof u.flexShrink=="number"?u.flexShrink:1),"flexDirection"in u&&(u.flexDirection==="row"&&i.setFlexDirection(hr.default.FLEX_DIRECTION_ROW),u.flexDirection==="row-reverse"&&i.setFlexDirection(hr.default.FLEX_DIRECTION_ROW_REVERSE),u.flexDirection==="column"&&i.setFlexDirection(hr.default.FLEX_DIRECTION_COLUMN),u.flexDirection==="column-reverse"&&i.setFlexDirection(hr.default.FLEX_DIRECTION_COLUMN_REVERSE)),"flexBasis"in u&&(typeof u.flexBasis=="number"?i.setFlexBasis(u.flexBasis):typeof u.flexBasis=="string"?i.setFlexBasisPercent(Number.parseInt(u.flexBasis,10)):i.setFlexBasis(NaN)),"alignItems"in u&&((u.alignItems==="stretch"||!u.alignItems)&&i.setAlignItems(hr.default.ALIGN_STRETCH),u.alignItems==="flex-start"&&i.setAlignItems(hr.default.ALIGN_FLEX_START),u.alignItems==="center"&&i.setAlignItems(hr.default.ALIGN_CENTER),u.alignItems==="flex-end"&&i.setAlignItems(hr.default.ALIGN_FLEX_END)),"alignSelf"in u&&((u.alignSelf==="auto"||!u.alignSelf)&&i.setAlignSelf(hr.default.ALIGN_AUTO),u.alignSelf==="flex-start"&&i.setAlignSelf(hr.default.ALIGN_FLEX_START),u.alignSelf==="center"&&i.setAlignSelf(hr.default.ALIGN_CENTER),u.alignSelf==="flex-end"&&i.setAlignSelf(hr.default.ALIGN_FLEX_END)),"justifyContent"in u&&((u.justifyContent==="flex-start"||!u.justifyContent)&&i.setJustifyContent(hr.default.JUSTIFY_FLEX_START),u.justifyContent==="center"&&i.setJustifyContent(hr.default.JUSTIFY_CENTER),u.justifyContent==="flex-end"&&i.setJustifyContent(hr.default.JUSTIFY_FLEX_END),u.justifyContent==="space-between"&&i.setJustifyContent(hr.default.JUSTIFY_SPACE_BETWEEN),u.justifyContent==="space-around"&&i.setJustifyContent(hr.default.JUSTIFY_SPACE_AROUND))},LN=(i,u)=>{var f,c;"width"in u&&(typeof u.width=="number"?i.setWidth(u.width):typeof u.width=="string"?i.setWidthPercent(Number.parseInt(u.width,10)):i.setWidthAuto()),"height"in u&&(typeof u.height=="number"?i.setHeight(u.height):typeof u.height=="string"?i.setHeightPercent(Number.parseInt(u.height,10)):i.setHeightAuto()),"minWidth"in u&&(typeof u.minWidth=="string"?i.setMinWidthPercent(Number.parseInt(u.minWidth,10)):i.setMinWidth((f=u.minWidth)!==null&&f!==void 0?f:0)),"minHeight"in u&&(typeof u.minHeight=="string"?i.setMinHeightPercent(Number.parseInt(u.minHeight,10)):i.setMinHeight((c=u.minHeight)!==null&&c!==void 0?c:0))},RN=(i,u)=>{"display"in u&&i.setDisplay(u.display==="flex"?hr.default.DISPLAY_FLEX:hr.default.DISPLAY_NONE)},NN=(i,u)=>{if("borderStyle"in u){let f=typeof u.borderStyle=="string"?1:0;i.setBorder(hr.default.EDGE_TOP,f),i.setBorder(hr.default.EDGE_BOTTOM,f),i.setBorder(hr.default.EDGE_LEFT,f),i.setBorder(hr.default.EDGE_RIGHT,f)}};d2.default=(i,u={})=>{IN(i,u),PN(i,u),MN(i,u),FN(i,u),LN(i,u),RN(i,u),NN(i,u)}});var AE=Me((Sb,kE)=>{"use strict";kE.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}});var qy=Me((Cb,OE)=>{var p2=AE(),IE={};for(let i of Object.keys(p2))IE[p2[i]]=i;var Xt={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};OE.exports=Xt;for(let i of Object.keys(Xt)){if(!("channels"in Xt[i]))throw new Error("missing channels property: "+i);if(!("labels"in Xt[i]))throw new Error("missing channel labels property: "+i);if(Xt[i].labels.length!==Xt[i].channels)throw new Error("channel and label counts mismatch: "+i);let{channels:u,labels:f}=Xt[i];delete Xt[i].channels,delete Xt[i].labels,Object.defineProperty(Xt[i],"channels",{value:u}),Object.defineProperty(Xt[i],"labels",{value:f})}Xt.rgb.hsl=function(i){let u=i[0]/255,f=i[1]/255,c=i[2]/255,g=Math.min(u,f,c),t=Math.max(u,f,c),C=t-g,A,x;t===g?A=0:u===t?A=(f-c)/C:f===t?A=2+(c-u)/C:c===t&&(A=4+(u-f)/C),A=Math.min(A*60,360),A<0&&(A+=360);let D=(g+t)/2;return t===g?x=0:D<=.5?x=C/(t+g):x=C/(2-t-g),[A,x*100,D*100]};Xt.rgb.hsv=function(i){let u,f,c,g,t,C=i[0]/255,A=i[1]/255,x=i[2]/255,D=Math.max(C,A,x),L=D-Math.min(C,A,x),N=function(j){return(D-j)/6/L+1/2};return L===0?(g=0,t=0):(t=L/D,u=N(C),f=N(A),c=N(x),C===D?g=c-f:A===D?g=1/3+u-c:x===D&&(g=2/3+f-u),g<0?g+=1:g>1&&(g-=1)),[g*360,t*100,D*100]};Xt.rgb.hwb=function(i){let u=i[0],f=i[1],c=i[2],g=Xt.rgb.hsl(i)[0],t=1/255*Math.min(u,Math.min(f,c));return c=1-1/255*Math.max(u,Math.max(f,c)),[g,t*100,c*100]};Xt.rgb.cmyk=function(i){let u=i[0]/255,f=i[1]/255,c=i[2]/255,g=Math.min(1-u,1-f,1-c),t=(1-u-g)/(1-g)||0,C=(1-f-g)/(1-g)||0,A=(1-c-g)/(1-g)||0;return[t*100,C*100,A*100,g*100]};function BN(i,u){return(i[0]-u[0])**2+(i[1]-u[1])**2+(i[2]-u[2])**2}Xt.rgb.keyword=function(i){let u=IE[i];if(u)return u;let f=Infinity,c;for(let g of Object.keys(p2)){let t=p2[g],C=BN(i,t);C.04045?((u+.055)/1.055)**2.4:u/12.92,f=f>.04045?((f+.055)/1.055)**2.4:f/12.92,c=c>.04045?((c+.055)/1.055)**2.4:c/12.92;let g=u*.4124+f*.3576+c*.1805,t=u*.2126+f*.7152+c*.0722,C=u*.0193+f*.1192+c*.9505;return[g*100,t*100,C*100]};Xt.rgb.lab=function(i){let u=Xt.rgb.xyz(i),f=u[0],c=u[1],g=u[2];f/=95.047,c/=100,g/=108.883,f=f>.008856?f**(1/3):7.787*f+16/116,c=c>.008856?c**(1/3):7.787*c+16/116,g=g>.008856?g**(1/3):7.787*g+16/116;let t=116*c-16,C=500*(f-c),A=200*(c-g);return[t,C,A]};Xt.hsl.rgb=function(i){let u=i[0]/360,f=i[1]/100,c=i[2]/100,g,t,C;if(f===0)return C=c*255,[C,C,C];c<.5?g=c*(1+f):g=c+f-c*f;let A=2*c-g,x=[0,0,0];for(let D=0;D<3;D++)t=u+1/3*-(D-1),t<0&&t++,t>1&&t--,6*t<1?C=A+(g-A)*6*t:2*t<1?C=g:3*t<2?C=A+(g-A)*(2/3-t)*6:C=A,x[D]=C*255;return x};Xt.hsl.hsv=function(i){let u=i[0],f=i[1]/100,c=i[2]/100,g=f,t=Math.max(c,.01);c*=2,f*=c<=1?c:2-c,g*=t<=1?t:2-t;let C=(c+f)/2,A=c===0?2*g/(t+g):2*f/(c+f);return[u,A*100,C*100]};Xt.hsv.rgb=function(i){let u=i[0]/60,f=i[1]/100,c=i[2]/100,g=Math.floor(u)%6,t=u-Math.floor(u),C=255*c*(1-f),A=255*c*(1-f*t),x=255*c*(1-f*(1-t));switch(c*=255,g){case 0:return[c,x,C];case 1:return[A,c,C];case 2:return[C,c,x];case 3:return[C,A,c];case 4:return[x,C,c];case 5:return[c,C,A]}};Xt.hsv.hsl=function(i){let u=i[0],f=i[1]/100,c=i[2]/100,g=Math.max(c,.01),t,C;C=(2-f)*c;let A=(2-f)*g;return t=f*g,t/=A<=1?A:2-A,t=t||0,C/=2,[u,t*100,C*100]};Xt.hwb.rgb=function(i){let u=i[0]/360,f=i[1]/100,c=i[2]/100,g=f+c,t;g>1&&(f/=g,c/=g);let C=Math.floor(6*u),A=1-c;t=6*u-C,(C&1)!=0&&(t=1-t);let x=f+t*(A-f),D,L,N;switch(C){default:case 6:case 0:D=A,L=x,N=f;break;case 1:D=x,L=A,N=f;break;case 2:D=f,L=A,N=x;break;case 3:D=f,L=x,N=A;break;case 4:D=x,L=f,N=A;break;case 5:D=A,L=f,N=x;break}return[D*255,L*255,N*255]};Xt.cmyk.rgb=function(i){let u=i[0]/100,f=i[1]/100,c=i[2]/100,g=i[3]/100,t=1-Math.min(1,u*(1-g)+g),C=1-Math.min(1,f*(1-g)+g),A=1-Math.min(1,c*(1-g)+g);return[t*255,C*255,A*255]};Xt.xyz.rgb=function(i){let u=i[0]/100,f=i[1]/100,c=i[2]/100,g,t,C;return g=u*3.2406+f*-1.5372+c*-.4986,t=u*-.9689+f*1.8758+c*.0415,C=u*.0557+f*-.204+c*1.057,g=g>.0031308?1.055*g**(1/2.4)-.055:g*12.92,t=t>.0031308?1.055*t**(1/2.4)-.055:t*12.92,C=C>.0031308?1.055*C**(1/2.4)-.055:C*12.92,g=Math.min(Math.max(0,g),1),t=Math.min(Math.max(0,t),1),C=Math.min(Math.max(0,C),1),[g*255,t*255,C*255]};Xt.xyz.lab=function(i){let u=i[0],f=i[1],c=i[2];u/=95.047,f/=100,c/=108.883,u=u>.008856?u**(1/3):7.787*u+16/116,f=f>.008856?f**(1/3):7.787*f+16/116,c=c>.008856?c**(1/3):7.787*c+16/116;let g=116*f-16,t=500*(u-f),C=200*(f-c);return[g,t,C]};Xt.lab.xyz=function(i){let u=i[0],f=i[1],c=i[2],g,t,C;t=(u+16)/116,g=f/500+t,C=t-c/200;let A=t**3,x=g**3,D=C**3;return t=A>.008856?A:(t-16/116)/7.787,g=x>.008856?x:(g-16/116)/7.787,C=D>.008856?D:(C-16/116)/7.787,g*=95.047,t*=100,C*=108.883,[g,t,C]};Xt.lab.lch=function(i){let u=i[0],f=i[1],c=i[2],g;g=Math.atan2(c,f)*360/2/Math.PI,g<0&&(g+=360);let C=Math.sqrt(f*f+c*c);return[u,C,g]};Xt.lch.lab=function(i){let u=i[0],f=i[1],g=i[2]/360*2*Math.PI,t=f*Math.cos(g),C=f*Math.sin(g);return[u,t,C]};Xt.rgb.ansi16=function(i,u=null){let[f,c,g]=i,t=u===null?Xt.rgb.hsv(i)[2]:u;if(t=Math.round(t/50),t===0)return 30;let C=30+(Math.round(g/255)<<2|Math.round(c/255)<<1|Math.round(f/255));return t===2&&(C+=60),C};Xt.hsv.ansi16=function(i){return Xt.rgb.ansi16(Xt.hsv.rgb(i),i[2])};Xt.rgb.ansi256=function(i){let u=i[0],f=i[1],c=i[2];return u===f&&f===c?u<8?16:u>248?231:Math.round((u-8)/247*24)+232:16+36*Math.round(u/255*5)+6*Math.round(f/255*5)+Math.round(c/255*5)};Xt.ansi16.rgb=function(i){let u=i%10;if(u===0||u===7)return i>50&&(u+=3.5),u=u/10.5*255,[u,u,u];let f=(~~(i>50)+1)*.5,c=(u&1)*f*255,g=(u>>1&1)*f*255,t=(u>>2&1)*f*255;return[c,g,t]};Xt.ansi256.rgb=function(i){if(i>=232){let t=(i-232)*10+8;return[t,t,t]}i-=16;let u,f=Math.floor(i/36)/5*255,c=Math.floor((u=i%36)/6)/5*255,g=u%6/5*255;return[f,c,g]};Xt.rgb.hex=function(i){let f=(((Math.round(i[0])&255)<<16)+((Math.round(i[1])&255)<<8)+(Math.round(i[2])&255)).toString(16).toUpperCase();return"000000".substring(f.length)+f};Xt.hex.rgb=function(i){let u=i.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!u)return[0,0,0];let f=u[0];u[0].length===3&&(f=f.split("").map(A=>A+A).join(""));let c=parseInt(f,16),g=c>>16&255,t=c>>8&255,C=c&255;return[g,t,C]};Xt.rgb.hcg=function(i){let u=i[0]/255,f=i[1]/255,c=i[2]/255,g=Math.max(Math.max(u,f),c),t=Math.min(Math.min(u,f),c),C=g-t,A,x;return C<1?A=t/(1-C):A=0,C<=0?x=0:g===u?x=(f-c)/C%6:g===f?x=2+(c-u)/C:x=4+(u-f)/C,x/=6,x%=1,[x*360,C*100,A*100]};Xt.hsl.hcg=function(i){let u=i[1]/100,f=i[2]/100,c=f<.5?2*u*f:2*u*(1-f),g=0;return c<1&&(g=(f-.5*c)/(1-c)),[i[0],c*100,g*100]};Xt.hsv.hcg=function(i){let u=i[1]/100,f=i[2]/100,c=u*f,g=0;return c<1&&(g=(f-c)/(1-c)),[i[0],c*100,g*100]};Xt.hcg.rgb=function(i){let u=i[0]/360,f=i[1]/100,c=i[2]/100;if(f===0)return[c*255,c*255,c*255];let g=[0,0,0],t=u%1*6,C=t%1,A=1-C,x=0;switch(Math.floor(t)){case 0:g[0]=1,g[1]=C,g[2]=0;break;case 1:g[0]=A,g[1]=1,g[2]=0;break;case 2:g[0]=0,g[1]=1,g[2]=C;break;case 3:g[0]=0,g[1]=A,g[2]=1;break;case 4:g[0]=C,g[1]=0,g[2]=1;break;default:g[0]=1,g[1]=0,g[2]=A}return x=(1-f)*c,[(f*g[0]+x)*255,(f*g[1]+x)*255,(f*g[2]+x)*255]};Xt.hcg.hsv=function(i){let u=i[1]/100,f=i[2]/100,c=u+f*(1-u),g=0;return c>0&&(g=u/c),[i[0],g*100,c*100]};Xt.hcg.hsl=function(i){let u=i[1]/100,c=i[2]/100*(1-u)+.5*u,g=0;return c>0&&c<.5?g=u/(2*c):c>=.5&&c<1&&(g=u/(2*(1-c))),[i[0],g*100,c*100]};Xt.hcg.hwb=function(i){let u=i[1]/100,f=i[2]/100,c=u+f*(1-u);return[i[0],(c-u)*100,(1-c)*100]};Xt.hwb.hcg=function(i){let u=i[1]/100,f=i[2]/100,c=1-f,g=c-u,t=0;return g<1&&(t=(c-g)/(1-g)),[i[0],g*100,t*100]};Xt.apple.rgb=function(i){return[i[0]/65535*255,i[1]/65535*255,i[2]/65535*255]};Xt.rgb.apple=function(i){return[i[0]/255*65535,i[1]/255*65535,i[2]/255*65535]};Xt.gray.rgb=function(i){return[i[0]/100*255,i[0]/100*255,i[0]/100*255]};Xt.gray.hsl=function(i){return[0,0,i[0]]};Xt.gray.hsv=Xt.gray.hsl;Xt.gray.hwb=function(i){return[0,100,i[0]]};Xt.gray.cmyk=function(i){return[0,0,0,i[0]]};Xt.gray.lab=function(i){return[i[0],0,0]};Xt.gray.hex=function(i){let u=Math.round(i[0]/100*255)&255,c=((u<<16)+(u<<8)+u).toString(16).toUpperCase();return"000000".substring(c.length)+c};Xt.rgb.gray=function(i){return[(i[0]+i[1]+i[2])/3/255*100]}});var ME=Me((Tb,PE)=>{var Fh=qy();function jN(){let i={},u=Object.keys(Fh);for(let f=u.length,c=0;c{var zy=qy(),WN=ME(),Ca={},HN=Object.keys(zy);function bN(i){let u=function(...f){let c=f[0];return c==null?c:(c.length>1&&(f=c),i(f))};return"conversion"in i&&(u.conversion=i.conversion),u}function GN(i){let u=function(...f){let c=f[0];if(c==null)return c;c.length>1&&(f=c);let g=i(f);if(typeof g=="object")for(let t=g.length,C=0;C{Ca[i]={},Object.defineProperty(Ca[i],"channels",{value:zy[i].channels}),Object.defineProperty(Ca[i],"labels",{value:zy[i].labels});let u=WN(i);Object.keys(u).forEach(c=>{let g=u[c];Ca[i][c]=GN(g),Ca[i][c].raw=bN(g)})});FE.exports=Ca});var Rh=Me((kb,RE)=>{"use strict";var NE=(i,u)=>(...f)=>`[${i(...f)+u}m`,BE=(i,u)=>(...f)=>{let c=i(...f);return`[${38+u};5;${c}m`},jE=(i,u)=>(...f)=>{let c=i(...f);return`[${38+u};2;${c[0]};${c[1]};${c[2]}m`},Lh=i=>i,UE=(i,u,f)=>[i,u,f],Ta=(i,u,f)=>{Object.defineProperty(i,u,{get:()=>{let c=f();return Object.defineProperty(i,u,{value:c,enumerable:!0,configurable:!0}),c},enumerable:!0,configurable:!0})},Wy,xa=(i,u,f,c)=>{Wy===void 0&&(Wy=LE());let g=c?10:0,t={};for(let[C,A]of Object.entries(Wy)){let x=C==="ansi16"?"ansi":C;C===u?t[x]=i(f,g):typeof A=="object"&&(t[x]=i(A[u],g))}return t};function VN(){let i=new Map,u={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};u.color.gray=u.color.blackBright,u.bgColor.bgGray=u.bgColor.bgBlackBright,u.color.grey=u.color.blackBright,u.bgColor.bgGrey=u.bgColor.bgBlackBright;for(let[f,c]of Object.entries(u)){for(let[g,t]of Object.entries(c))u[g]={open:`[${t[0]}m`,close:`[${t[1]}m`},c[g]=u[g],i.set(t[0],t[1]);Object.defineProperty(u,f,{value:c,enumerable:!1})}return Object.defineProperty(u,"codes",{value:i,enumerable:!1}),u.color.close="",u.bgColor.close="",Ta(u.color,"ansi",()=>xa(NE,"ansi16",Lh,!1)),Ta(u.color,"ansi256",()=>xa(BE,"ansi256",Lh,!1)),Ta(u.color,"ansi16m",()=>xa(jE,"rgb",UE,!1)),Ta(u.bgColor,"ansi",()=>xa(NE,"ansi16",Lh,!0)),Ta(u.bgColor,"ansi256",()=>xa(BE,"ansi256",Lh,!0)),Ta(u.bgColor,"ansi16m",()=>xa(jE,"rgb",UE,!0)),u}Object.defineProperty(RE,"exports",{enumerable:!0,get:VN})});var WE=Me((Ab,qE)=>{"use strict";var h2=Mh(),YN=Fy(),$N=Rh(),Hy=new Set(["","\x9B"]),KN=39,zE=i=>`${Hy.values().next().value}[${i}m`,XN=i=>i.split(" ").map(u=>h2(u)),by=(i,u,f)=>{let c=[...u],g=!1,t=h2(YN(i[i.length-1]));for(let[C,A]of c.entries()){let x=h2(A);if(t+x<=f?i[i.length-1]+=A:(i.push(A),t=0),Hy.has(A))g=!0;else if(g&&A==="m"){g=!1;continue}g||(t+=x,t===f&&C0&&i.length>1&&(i[i.length-2]+=i.pop())},JN=i=>{let u=i.split(" "),f=u.length;for(;f>0&&!(h2(u[f-1])>0);)f--;return f===u.length?i:u.slice(0,f).join(" ")+u.slice(f).join("")},QN=(i,u,f={})=>{if(f.trim!==!1&&i.trim()==="")return"";let c="",g="",t,C=XN(i),A=[""];for(let[x,D]of i.split(" ").entries()){f.trim!==!1&&(A[A.length-1]=A[A.length-1].trimLeft());let L=h2(A[A.length-1]);if(x!==0&&(L>=u&&(f.wordWrap===!1||f.trim===!1)&&(A.push(""),L=0),(L>0||f.trim===!1)&&(A[A.length-1]+=" ",L++)),f.hard&&C[x]>u){let N=u-L,j=1+Math.floor((C[x]-N-1)/u);Math.floor((C[x]-1)/u)u&&L>0&&C[x]>0){if(f.wordWrap===!1&&Lu&&f.wordWrap===!1){by(A,D,u);continue}A[A.length-1]+=D}f.trim!==!1&&(A=A.map(JN)),c=A.join(` -`);for(let[x,D]of[...c].entries()){if(g+=D,Hy.has(D)){let N=parseFloat(/\d[^m]*/.exec(c.slice(x,x+4)));t=N===KN?null:N}let L=$N.codes.get(Number(t));t&&L&&(c[x+1]===` -`?g+=zE(L):D===` -`&&(g+=zE(t)))}return g};qE.exports=(i,u,f)=>String(i).normalize().replace(/\r\n/g,` -`).split(` -`).map(c=>QN(c,u,f)).join(` -`)});var GE=Me((Ob,HE)=>{"use strict";var bE="[\uD800-\uDBFF][\uDC00-\uDFFF]",ZN=i=>i&&i.exact?new RegExp(`^${bE}$`):new RegExp(bE,"g");HE.exports=ZN});var Gy=Me((Ib,VE)=>{"use strict";var eB=Ry(),tB=GE(),YE=Rh(),$E=["","\x9B"],Nh=i=>`${$E[0]}[${i}m`,KE=(i,u,f)=>{let c=[];i=[...i];for(let g of i){let t=g;g.match(";")&&(g=g.split(";")[0][0]+"0");let C=YE.codes.get(parseInt(g,10));if(C){let A=i.indexOf(C.toString());A>=0?i.splice(A,1):c.push(Nh(u?C:t))}else if(u){c.push(Nh(0));break}else c.push(Nh(t))}if(u&&(c=c.filter((g,t)=>c.indexOf(g)===t),f!==void 0)){let g=Nh(YE.codes.get(parseInt(f,10)));c=c.reduce((t,C)=>C===g?[C,...t]:[...t,C],[])}return c.join("")};VE.exports=(i,u,f)=>{let c=[...i.normalize()],g=[];f=typeof f=="number"?f:c.length;let t=!1,C,A=0,x="";for(let[D,L]of c.entries()){let N=!1;if($E.includes(L)){let j=/\d[^m]*/.exec(i.slice(D,D+18));C=j&&j.length>0?j[0]:void 0,Au&&A<=f)x+=L;else if(A===u&&!t&&C!==void 0)x=KE(g);else if(A>=f){x+=KE(g,!0,C);break}}return x}});var JE=Me((Pb,XE)=>{"use strict";var Bf=Gy(),nB=Mh();function Bh(i,u,f){if(i.charAt(u)===" ")return u;for(let c=1;c<=3;c++)if(f){if(i.charAt(u+c)===" ")return u+c}else if(i.charAt(u-c)===" ")return u-c;return u}XE.exports=(i,u,f)=>{f=dt({position:"end",preferTruncationOnSpace:!1},f);let{position:c,space:g,preferTruncationOnSpace:t}=f,C="\u2026",A=1;if(typeof i!="string")throw new TypeError(`Expected \`input\` to be a string, got ${typeof i}`);if(typeof u!="number")throw new TypeError(`Expected \`columns\` to be a number, got ${typeof u}`);if(u<1)return"";if(u===1)return C;let x=nB(i);if(x<=u)return i;if(c==="start"){if(t){let D=Bh(i,x-u+1,!0);return C+Bf(i,D,x).trim()}return g===!0&&(C+=" ",A=2),C+Bf(i,x-u+A,x)}if(c==="middle"){g===!0&&(C=" "+C+" ",A=3);let D=Math.floor(u/2);if(t){let L=Bh(i,D),N=Bh(i,x-(u-D)+1,!0);return Bf(i,0,L)+C+Bf(i,N,x).trim()}return Bf(i,0,D)+C+Bf(i,x-(u-D)+A,x)}if(c==="end"){if(t){let D=Bh(i,u-1);return Bf(i,0,D)+C}return g===!0&&(C=" "+C,A=2),Bf(i,0,u-A)+C}throw new Error(`Expected \`options.position\` to be either \`start\`, \`middle\` or \`end\`, got ${c}`)}});var Yy=Me(m2=>{"use strict";var QE=m2&&m2.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(m2,"__esModule",{value:!0});var rB=QE(WE()),iB=QE(JE()),Vy={};m2.default=(i,u,f)=>{let c=i+String(u)+String(f);if(Vy[c])return Vy[c];let g=i;if(f==="wrap"&&(g=rB.default(i,u,{trim:!1,hard:!0})),f.startsWith("truncate")){let t="end";f==="truncate-middle"&&(t="middle"),f==="truncate-start"&&(t="start"),g=iB.default(i,u,{position:t})}return Vy[c]=g,g}});var Ky=Me($y=>{"use strict";Object.defineProperty($y,"__esModule",{value:!0});var ZE=i=>{let u="";if(i.childNodes.length>0)for(let f of i.childNodes){let c="";f.nodeName==="#text"?c=f.nodeValue:((f.nodeName==="ink-text"||f.nodeName==="ink-virtual-text")&&(c=ZE(f)),c.length>0&&typeof f.internal_transform=="function"&&(c=f.internal_transform(c))),u+=c}return u};$y.default=ZE});var Xy=Me(Zr=>{"use strict";var v2=Zr&&Zr.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Zr,"__esModule",{value:!0});Zr.setTextNodeValue=Zr.createTextNode=Zr.setStyle=Zr.setAttribute=Zr.removeChildNode=Zr.insertBeforeNode=Zr.appendChildNode=Zr.createNode=Zr.TEXT_NAME=void 0;var oB=v2(hc()),e6=v2(TE()),uB=v2(xE()),sB=v2(Yy()),lB=v2(Ky());Zr.TEXT_NAME="#text";Zr.createNode=i=>{var u;let f={nodeName:i,style:{},attributes:{},childNodes:[],parentNode:null,yogaNode:i==="ink-virtual-text"?void 0:oB.default.Node.create()};return i==="ink-text"&&((u=f.yogaNode)===null||u===void 0||u.setMeasureFunc(fB.bind(null,f))),f};Zr.appendChildNode=(i,u)=>{var f;u.parentNode&&Zr.removeChildNode(u.parentNode,u),u.parentNode=i,i.childNodes.push(u),u.yogaNode&&((f=i.yogaNode)===null||f===void 0||f.insertChild(u.yogaNode,i.yogaNode.getChildCount())),(i.nodeName==="ink-text"||i.nodeName==="ink-virtual-text")&&jh(i)};Zr.insertBeforeNode=(i,u,f)=>{var c,g;u.parentNode&&Zr.removeChildNode(u.parentNode,u),u.parentNode=i;let t=i.childNodes.indexOf(f);if(t>=0){i.childNodes.splice(t,0,u),u.yogaNode&&((c=i.yogaNode)===null||c===void 0||c.insertChild(u.yogaNode,t));return}i.childNodes.push(u),u.yogaNode&&((g=i.yogaNode)===null||g===void 0||g.insertChild(u.yogaNode,i.yogaNode.getChildCount())),(i.nodeName==="ink-text"||i.nodeName==="ink-virtual-text")&&jh(i)};Zr.removeChildNode=(i,u)=>{var f,c;u.yogaNode&&((c=(f=u.parentNode)===null||f===void 0?void 0:f.yogaNode)===null||c===void 0||c.removeChild(u.yogaNode)),u.parentNode=null;let g=i.childNodes.indexOf(u);g>=0&&i.childNodes.splice(g,1),(i.nodeName==="ink-text"||i.nodeName==="ink-virtual-text")&&jh(i)};Zr.setAttribute=(i,u,f)=>{i.attributes[u]=f};Zr.setStyle=(i,u)=>{i.style=u,i.yogaNode&&uB.default(i.yogaNode,u)};Zr.createTextNode=i=>{let u={nodeName:"#text",nodeValue:i,yogaNode:void 0,parentNode:null,style:{}};return Zr.setTextNodeValue(u,i),u};var fB=function(i,u){var f,c;let g=i.nodeName==="#text"?i.nodeValue:lB.default(i),t=e6.default(g);if(t.width<=u||t.width>=1&&u>0&&u<1)return t;let C=(c=(f=i.style)===null||f===void 0?void 0:f.textWrap)!==null&&c!==void 0?c:"wrap",A=sB.default(g,u,C);return e6.default(A)},t6=i=>{var u;if(!(!i||!i.parentNode))return(u=i.yogaNode)!==null&&u!==void 0?u:t6(i.parentNode)},jh=i=>{let u=t6(i);u==null||u.markDirty()};Zr.setTextNodeValue=(i,u)=>{typeof u!="string"&&(u=String(u)),i.nodeValue=u,jh(i)}});var mc=Me((Rb,n6)=>{"use strict";n6.exports={BINARY_TYPES:["nodebuffer","arraybuffer","fragments"],GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),EMPTY_BUFFER:Buffer.alloc(0),NOOP:()=>{}}});var g2=Me((Nb,Jy)=>{"use strict";var{EMPTY_BUFFER:cB}=mc();function r6(i,u){if(i.length===0)return cB;if(i.length===1)return i[0];let f=Buffer.allocUnsafe(u),c=0;for(let g=0;g{"use strict";var l6=Symbol("kDone"),Qy=Symbol("kRun"),f6=class{constructor(u){this[l6]=()=>{this.pending--,this[Qy]()},this.concurrency=u||Infinity,this.jobs=[],this.pending=0}add(u){this.jobs.push(u),this[Qy]()}[Qy](){if(this.pending!==this.concurrency&&this.jobs.length){let u=this.jobs.shift();this.pending++,u(this[l6])}}};s6.exports=f6});var w2=Me((jb,a6)=>{"use strict";var _2=require("zlib"),d6=g2(),aB=c6(),{kStatusCode:p6,NOOP:dB}=mc(),pB=Buffer.from([0,0,255,255]),qh=Symbol("permessage-deflate"),Xl=Symbol("total-length"),y2=Symbol("callback"),jf=Symbol("buffers"),Zy=Symbol("error"),zh,h6=class{constructor(u,f,c){if(this._maxPayload=c|0,this._options=u||{},this._threshold=this._options.threshold!==void 0?this._options.threshold:1024,this._isServer=!!f,this._deflate=null,this._inflate=null,this.params=null,!zh){let g=this._options.concurrencyLimit!==void 0?this._options.concurrencyLimit:10;zh=new aB(g)}}static get extensionName(){return"permessage-deflate"}offer(){let u={};return this._options.serverNoContextTakeover&&(u.server_no_context_takeover=!0),this._options.clientNoContextTakeover&&(u.client_no_context_takeover=!0),this._options.serverMaxWindowBits&&(u.server_max_window_bits=this._options.serverMaxWindowBits),this._options.clientMaxWindowBits?u.client_max_window_bits=this._options.clientMaxWindowBits:this._options.clientMaxWindowBits==null&&(u.client_max_window_bits=!0),u}accept(u){return u=this.normalizeParams(u),this.params=this._isServer?this.acceptAsServer(u):this.acceptAsClient(u),this.params}cleanup(){if(this._inflate&&(this._inflate.close(),this._inflate=null),this._deflate){let u=this._deflate[y2];this._deflate.close(),this._deflate=null,u&&u(new Error("The deflate stream was closed while data was being processed"))}}acceptAsServer(u){let f=this._options,c=u.find(g=>!(f.serverNoContextTakeover===!1&&g.server_no_context_takeover||g.server_max_window_bits&&(f.serverMaxWindowBits===!1||typeof f.serverMaxWindowBits=="number"&&f.serverMaxWindowBits>g.server_max_window_bits)||typeof f.clientMaxWindowBits=="number"&&!g.client_max_window_bits));if(!c)throw new Error("None of the extension offers can be accepted");return f.serverNoContextTakeover&&(c.server_no_context_takeover=!0),f.clientNoContextTakeover&&(c.client_no_context_takeover=!0),typeof f.serverMaxWindowBits=="number"&&(c.server_max_window_bits=f.serverMaxWindowBits),typeof f.clientMaxWindowBits=="number"?c.client_max_window_bits=f.clientMaxWindowBits:(c.client_max_window_bits===!0||f.clientMaxWindowBits===!1)&&delete c.client_max_window_bits,c}acceptAsClient(u){let f=u[0];if(this._options.clientNoContextTakeover===!1&&f.client_no_context_takeover)throw new Error('Unexpected parameter "client_no_context_takeover"');if(!f.client_max_window_bits)typeof this._options.clientMaxWindowBits=="number"&&(f.client_max_window_bits=this._options.clientMaxWindowBits);else if(this._options.clientMaxWindowBits===!1||typeof this._options.clientMaxWindowBits=="number"&&f.client_max_window_bits>this._options.clientMaxWindowBits)throw new Error('Unexpected or invalid parameter "client_max_window_bits"');return f}normalizeParams(u){return u.forEach(f=>{Object.keys(f).forEach(c=>{let g=f[c];if(g.length>1)throw new Error(`Parameter "${c}" must have only a single value`);if(g=g[0],c==="client_max_window_bits"){if(g!==!0){let t=+g;if(!Number.isInteger(t)||t<8||t>15)throw new TypeError(`Invalid value for parameter "${c}": ${g}`);g=t}else if(!this._isServer)throw new TypeError(`Invalid value for parameter "${c}": ${g}`)}else if(c==="server_max_window_bits"){let t=+g;if(!Number.isInteger(t)||t<8||t>15)throw new TypeError(`Invalid value for parameter "${c}": ${g}`);g=t}else if(c==="client_no_context_takeover"||c==="server_no_context_takeover"){if(g!==!0)throw new TypeError(`Invalid value for parameter "${c}": ${g}`)}else throw new Error(`Unknown parameter "${c}"`);f[c]=g})}),u}decompress(u,f,c){zh.add(g=>{this._decompress(u,f,(t,C)=>{g(),c(t,C)})})}compress(u,f,c){zh.add(g=>{this._compress(u,f,(t,C)=>{g(),c(t,C)})})}_decompress(u,f,c){let g=this._isServer?"client":"server";if(!this._inflate){let t=`${g}_max_window_bits`,C=typeof this.params[t]!="number"?_2.Z_DEFAULT_WINDOWBITS:this.params[t];this._inflate=_2.createInflateRaw(zn(dt({},this._options.zlibInflateOptions),{windowBits:C})),this._inflate[qh]=this,this._inflate[Xl]=0,this._inflate[jf]=[],this._inflate.on("error",mB),this._inflate.on("data",m6)}this._inflate[y2]=c,this._inflate.write(u),f&&this._inflate.write(pB),this._inflate.flush(()=>{let t=this._inflate[Zy];if(t){this._inflate.close(),this._inflate=null,c(t);return}let C=d6.concat(this._inflate[jf],this._inflate[Xl]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[Xl]=0,this._inflate[jf]=[],f&&this.params[`${g}_no_context_takeover`]&&this._inflate.reset()),c(null,C)})}_compress(u,f,c){let g=this._isServer?"server":"client";if(!this._deflate){let t=`${g}_max_window_bits`,C=typeof this.params[t]!="number"?_2.Z_DEFAULT_WINDOWBITS:this.params[t];this._deflate=_2.createDeflateRaw(zn(dt({},this._options.zlibDeflateOptions),{windowBits:C})),this._deflate[Xl]=0,this._deflate[jf]=[],this._deflate.on("error",dB),this._deflate.on("data",hB)}this._deflate[y2]=c,this._deflate.write(u),this._deflate.flush(_2.Z_SYNC_FLUSH,()=>{if(!this._deflate)return;let t=d6.concat(this._deflate[jf],this._deflate[Xl]);f&&(t=t.slice(0,t.length-4)),this._deflate[y2]=null,this._deflate[Xl]=0,this._deflate[jf]=[],f&&this.params[`${g}_no_context_takeover`]&&this._deflate.reset(),c(null,t)})}};a6.exports=h6;function hB(i){this[jf].push(i),this[Xl]+=i.length}function m6(i){if(this[Xl]+=i.length,this[qh]._maxPayload<1||this[Xl]<=this[qh]._maxPayload){this[jf].push(i);return}this[Zy]=new RangeError("Max payload size exceeded"),this[Zy][p6]=1009,this.removeListener("data",m6),this.reset()}function mB(i){this[qh]._inflate=null,i[p6]=1007,this[y2](i)}});var t3=Me((Ub,e3)=>{"use strict";function v6(i){return i>=1e3&&i<=1014&&i!==1004&&i!==1005&&i!==1006||i>=3e3&&i<=4999}function g6(i){let u=i.length,f=0;for(;f=u||(i[f+1]&192)!=128||(i[f+2]&192)!=128||i[f]===224&&(i[f+1]&224)==128||i[f]===237&&(i[f+1]&224)==160)return!1;f+=3}else if((i[f]&248)==240){if(f+3>=u||(i[f+1]&192)!=128||(i[f+2]&192)!=128||(i[f+3]&192)!=128||i[f]===240&&(i[f+1]&240)==128||i[f]===244&&i[f+1]>143||i[f]>244)return!1;f+=4}else return!1;return!0}try{let i=require("utf-8-validate");typeof i=="object"&&(i=i.Validation.isValidUTF8),e3.exports={isValidStatusCode:v6,isValidUTF8(u){return u.length<150?g6(u):i(u)}}}catch(i){e3.exports={isValidStatusCode:v6,isValidUTF8:g6}}});var i3=Me((qb,_6)=>{"use strict";var{Writable:vB}=require("stream"),y6=w2(),{BINARY_TYPES:gB,EMPTY_BUFFER:_B,kStatusCode:yB,kWebSocket:wB}=mc(),{concat:n3,toArrayBuffer:DB,unmask:EB}=g2(),{isValidStatusCode:SB,isValidUTF8:w6}=t3(),D2=0,D6=1,E6=2,S6=3,r3=4,CB=5,C6=class extends vB{constructor(u,f,c,g){super();this._binaryType=u||gB[0],this[wB]=void 0,this._extensions=f||{},this._isServer=!!c,this._maxPayload=g|0,this._bufferedBytes=0,this._buffers=[],this._compressed=!1,this._payloadLength=0,this._mask=void 0,this._fragmented=0,this._masked=!1,this._fin=!1,this._opcode=0,this._totalPayloadLength=0,this._messageLength=0,this._fragments=[],this._state=D2,this._loop=!1}_write(u,f,c){if(this._opcode===8&&this._state==D2)return c();this._bufferedBytes+=u.length,this._buffers.push(u),this.startLoop(c)}consume(u){if(this._bufferedBytes-=u,u===this._buffers[0].length)return this._buffers.shift();if(u=c.length?f.set(this._buffers.shift(),g):(f.set(new Uint8Array(c.buffer,c.byteOffset,u),g),this._buffers[0]=c.slice(u)),u-=c.length}while(u>0);return f}startLoop(u){let f;this._loop=!0;do switch(this._state){case D2:f=this.getInfo();break;case D6:f=this.getPayloadLength16();break;case E6:f=this.getPayloadLength64();break;case S6:this.getMask();break;case r3:f=this.getData(u);break;default:this._loop=!1;return}while(this._loop);u(f)}getInfo(){if(this._bufferedBytes<2){this._loop=!1;return}let u=this.consume(2);if((u[0]&48)!=0)return this._loop=!1,ii(RangeError,"RSV2 and RSV3 must be clear",!0,1002);let f=(u[0]&64)==64;if(f&&!this._extensions[y6.extensionName])return this._loop=!1,ii(RangeError,"RSV1 must be clear",!0,1002);if(this._fin=(u[0]&128)==128,this._opcode=u[0]&15,this._payloadLength=u[1]&127,this._opcode===0){if(f)return this._loop=!1,ii(RangeError,"RSV1 must be clear",!0,1002);if(!this._fragmented)return this._loop=!1,ii(RangeError,"invalid opcode 0",!0,1002);this._opcode=this._fragmented}else if(this._opcode===1||this._opcode===2){if(this._fragmented)return this._loop=!1,ii(RangeError,`invalid opcode ${this._opcode}`,!0,1002);this._compressed=f}else if(this._opcode>7&&this._opcode<11){if(!this._fin)return this._loop=!1,ii(RangeError,"FIN must be set",!0,1002);if(f)return this._loop=!1,ii(RangeError,"RSV1 must be clear",!0,1002);if(this._payloadLength>125)return this._loop=!1,ii(RangeError,`invalid payload length ${this._payloadLength}`,!0,1002)}else return this._loop=!1,ii(RangeError,`invalid opcode ${this._opcode}`,!0,1002);if(!this._fin&&!this._fragmented&&(this._fragmented=this._opcode),this._masked=(u[1]&128)==128,this._isServer){if(!this._masked)return this._loop=!1,ii(RangeError,"MASK must be set",!0,1002)}else if(this._masked)return this._loop=!1,ii(RangeError,"MASK must be clear",!0,1002);if(this._payloadLength===126)this._state=D6;else if(this._payloadLength===127)this._state=E6;else return this.haveLength()}getPayloadLength16(){if(this._bufferedBytes<2){this._loop=!1;return}return this._payloadLength=this.consume(2).readUInt16BE(0),this.haveLength()}getPayloadLength64(){if(this._bufferedBytes<8){this._loop=!1;return}let u=this.consume(8),f=u.readUInt32BE(0);return f>Math.pow(2,53-32)-1?(this._loop=!1,ii(RangeError,"Unsupported WebSocket frame: payload length > 2^53 - 1",!1,1009)):(this._payloadLength=f*Math.pow(2,32)+u.readUInt32BE(4),this.haveLength())}haveLength(){if(this._payloadLength&&this._opcode<8&&(this._totalPayloadLength+=this._payloadLength,this._totalPayloadLength>this._maxPayload&&this._maxPayload>0))return this._loop=!1,ii(RangeError,"Max payload size exceeded",!1,1009);this._masked?this._state=S6:this._state=r3}getMask(){if(this._bufferedBytes<4){this._loop=!1;return}this._mask=this.consume(4),this._state=r3}getData(u){let f=_B;if(this._payloadLength){if(this._bufferedBytes7)return this.controlMessage(f);if(this._compressed){this._state=CB,this.decompress(f,u);return}return f.length&&(this._messageLength=this._totalPayloadLength,this._fragments.push(f)),this.dataMessage()}decompress(u,f){this._extensions[y6.extensionName].decompress(u,this._fin,(g,t)=>{if(g)return f(g);if(t.length){if(this._messageLength+=t.length,this._messageLength>this._maxPayload&&this._maxPayload>0)return f(ii(RangeError,"Max payload size exceeded",!1,1009));this._fragments.push(t)}let C=this.dataMessage();if(C)return f(C);this.startLoop(f)})}dataMessage(){if(this._fin){let u=this._messageLength,f=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._fragments=[],this._opcode===2){let c;this._binaryType==="nodebuffer"?c=n3(f,u):this._binaryType==="arraybuffer"?c=DB(n3(f,u)):c=f,this.emit("message",c)}else{let c=n3(f,u);if(!w6(c))return this._loop=!1,ii(Error,"invalid UTF-8 sequence",!0,1007);this.emit("message",c.toString())}}this._state=D2}controlMessage(u){if(this._opcode===8)if(this._loop=!1,u.length===0)this.emit("conclude",1005,""),this.end();else{if(u.length===1)return ii(RangeError,"invalid payload length 1",!0,1002);{let f=u.readUInt16BE(0);if(!SB(f))return ii(RangeError,`invalid status code ${f}`,!0,1002);let c=u.slice(2);if(!w6(c))return ii(Error,"invalid UTF-8 sequence",!0,1007);this.emit("conclude",f,c.toString()),this.end()}}else this._opcode===9?this.emit("ping",u):this.emit("pong",u);this._state=D2}};_6.exports=C6;function ii(i,u,f,c){let g=new i(f?`Invalid WebSocket frame: ${u}`:u);return Error.captureStackTrace(g,ii),g[yB]=c,g}});var o3=Me((zb,T6)=>{"use strict";var{randomFillSync:TB}=require("crypto"),x6=w2(),{EMPTY_BUFFER:xB}=mc(),{isValidStatusCode:kB}=t3(),{mask:k6,toBuffer:Jl}=g2(),vc=Buffer.alloc(4),Ql=class{constructor(u,f){this._extensions=f||{},this._socket=u,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._deflating=!1,this._queue=[]}static frame(u,f){let c=f.mask&&f.readOnly,g=f.mask?6:2,t=u.length;u.length>=65536?(g+=8,t=127):u.length>125&&(g+=2,t=126);let C=Buffer.allocUnsafe(c?u.length+g:g);return C[0]=f.fin?f.opcode|128:f.opcode,f.rsv1&&(C[0]|=64),C[1]=t,t===126?C.writeUInt16BE(u.length,2):t===127&&(C.writeUInt32BE(0,2),C.writeUInt32BE(u.length,6)),f.mask?(TB(vc,0,4),C[1]|=128,C[g-4]=vc[0],C[g-3]=vc[1],C[g-2]=vc[2],C[g-1]=vc[3],c?(k6(u,vc,C,g,u.length),[C]):(k6(u,vc,u,0,u.length),[C,u])):[C,u]}close(u,f,c,g){let t;if(u===void 0)t=xB;else{if(typeof u!="number"||!kB(u))throw new TypeError("First argument must be a valid error code number");if(f===void 0||f==="")t=Buffer.allocUnsafe(2),t.writeUInt16BE(u,0);else{let C=Buffer.byteLength(f);if(C>123)throw new RangeError("The message must not be greater than 123 bytes");t=Buffer.allocUnsafe(2+C),t.writeUInt16BE(u,0),t.write(f,2)}}this._deflating?this.enqueue([this.doClose,t,c,g]):this.doClose(t,c,g)}doClose(u,f,c){this.sendFrame(Ql.frame(u,{fin:!0,rsv1:!1,opcode:8,mask:f,readOnly:!1}),c)}ping(u,f,c){let g=Jl(u);if(g.length>125)throw new RangeError("The data size must not be greater than 125 bytes");this._deflating?this.enqueue([this.doPing,g,f,Jl.readOnly,c]):this.doPing(g,f,Jl.readOnly,c)}doPing(u,f,c,g){this.sendFrame(Ql.frame(u,{fin:!0,rsv1:!1,opcode:9,mask:f,readOnly:c}),g)}pong(u,f,c){let g=Jl(u);if(g.length>125)throw new RangeError("The data size must not be greater than 125 bytes");this._deflating?this.enqueue([this.doPong,g,f,Jl.readOnly,c]):this.doPong(g,f,Jl.readOnly,c)}doPong(u,f,c,g){this.sendFrame(Ql.frame(u,{fin:!0,rsv1:!1,opcode:10,mask:f,readOnly:c}),g)}send(u,f,c){let g=Jl(u),t=this._extensions[x6.extensionName],C=f.binary?2:1,A=f.compress;if(this._firstFragment?(this._firstFragment=!1,A&&t&&(A=g.length>=t._threshold),this._compress=A):(A=!1,C=0),f.fin&&(this._firstFragment=!0),t){let x={fin:f.fin,rsv1:A,opcode:C,mask:f.mask,readOnly:Jl.readOnly};this._deflating?this.enqueue([this.dispatch,g,this._compress,x,c]):this.dispatch(g,this._compress,x,c)}else this.sendFrame(Ql.frame(g,{fin:f.fin,rsv1:!1,opcode:C,mask:f.mask,readOnly:Jl.readOnly}),c)}dispatch(u,f,c,g){if(!f){this.sendFrame(Ql.frame(u,c),g);return}let t=this._extensions[x6.extensionName];this._bufferedBytes+=u.length,this._deflating=!0,t.compress(u,c.fin,(C,A)=>{if(this._socket.destroyed){let x=new Error("The socket was closed while data was being compressed");typeof g=="function"&&g(x);for(let D=0;D{"use strict";var E2=class{constructor(u,f){this.target=f,this.type=u}},O6=class extends E2{constructor(u,f){super("message",f);this.data=u}},I6=class extends E2{constructor(u,f,c){super("close",c);this.wasClean=c._closeFrameReceived&&c._closeFrameSent,this.reason=f,this.code=u}},P6=class extends E2{constructor(u){super("open",u)}},M6=class extends E2{constructor(u,f){super("error",f);this.message=u.message,this.error=u}},AB={addEventListener(i,u,f){if(typeof u!="function")return;function c(x){u.call(this,new O6(x,this))}function g(x,D){u.call(this,new I6(x,D,this))}function t(x){u.call(this,new M6(x,this))}function C(){u.call(this,new P6(this))}let A=f&&f.once?"once":"on";i==="message"?(c._listener=u,this[A](i,c)):i==="close"?(g._listener=u,this[A](i,g)):i==="error"?(t._listener=u,this[A](i,t)):i==="open"?(C._listener=u,this[A](i,C)):this[A](i,u)},removeEventListener(i,u){let f=this.listeners(i);for(let c=0;c{"use strict";var S2=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0];function rl(i,u,f){i[u]===void 0?i[u]=[f]:i[u].push(f)}function OB(i){let u=Object.create(null);if(i===void 0||i==="")return u;let f=Object.create(null),c=!1,g=!1,t=!1,C,A,x=-1,D=-1,L=0;for(;L{let f=i[u];return Array.isArray(f)||(f=[f]),f.map(c=>[u].concat(Object.keys(c).map(g=>{let t=c[g];return Array.isArray(t)||(t=[t]),t.map(C=>C===!0?g:`${g}=${C}`).join("; ")})).join("; ")).join(", ")}).join(", ")}L6.exports={format:IB,parse:OB}});var a3=Me((bb,R6)=>{"use strict";var PB=require("events"),MB=require("https"),FB=require("http"),N6=require("net"),LB=require("tls"),{randomBytes:RB,createHash:NB}=require("crypto"),{URL:s3}=require("url"),Uf=w2(),BB=i3(),jB=o3(),{BINARY_TYPES:B6,EMPTY_BUFFER:l3,GUID:UB,kStatusCode:qB,kWebSocket:No,NOOP:j6}=mc(),{addEventListener:zB,removeEventListener:WB}=F6(),{format:HB,parse:bB}=u3(),{toBuffer:GB}=g2(),U6=["CONNECTING","OPEN","CLOSING","CLOSED"],f3=[8,13],VB=30*1e3,mr=class extends PB{constructor(u,f,c){super();this._binaryType=B6[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage="",this._closeTimer=null,this._extensions={},this._protocol="",this._readyState=mr.CONNECTING,this._receiver=null,this._sender=null,this._socket=null,u!==null?(this._bufferedAmount=0,this._isServer=!1,this._redirects=0,Array.isArray(f)?f=f.join(", "):typeof f=="object"&&f!==null&&(c=f,f=void 0),q6(this,u,f,c)):this._isServer=!0}get binaryType(){return this._binaryType}set binaryType(u){!B6.includes(u)||(this._binaryType=u,this._receiver&&(this._receiver._binaryType=u))}get bufferedAmount(){return this._socket?this._socket._writableState.length+this._sender._bufferedBytes:this._bufferedAmount}get extensions(){return Object.keys(this._extensions).join()}get protocol(){return this._protocol}get readyState(){return this._readyState}get url(){return this._url}setSocket(u,f,c){let g=new BB(this.binaryType,this._extensions,this._isServer,c);this._sender=new jB(u,this._extensions),this._receiver=g,this._socket=u,g[No]=this,u[No]=this,g.on("conclude",YB),g.on("drain",$B),g.on("error",KB),g.on("message",XB),g.on("ping",JB),g.on("pong",QB),u.setTimeout(0),u.setNoDelay(),f.length>0&&u.unshift(f),u.on("close",z6),u.on("data",Wh),u.on("end",W6),u.on("error",H6),this._readyState=mr.OPEN,this.emit("open")}emitClose(){if(!this._socket){this._readyState=mr.CLOSED,this.emit("close",this._closeCode,this._closeMessage);return}this._extensions[Uf.extensionName]&&this._extensions[Uf.extensionName].cleanup(),this._receiver.removeAllListeners(),this._readyState=mr.CLOSED,this.emit("close",this._closeCode,this._closeMessage)}close(u,f){if(this.readyState!==mr.CLOSED){if(this.readyState===mr.CONNECTING){let c="WebSocket was closed before the connection was established";return Zl(this,this._req,c)}if(this.readyState===mr.CLOSING){this._closeFrameSent&&this._closeFrameReceived&&this._socket.end();return}this._readyState=mr.CLOSING,this._sender.close(u,f,!this._isServer,c=>{c||(this._closeFrameSent=!0,this._closeFrameReceived&&this._socket.end())}),this._closeTimer=setTimeout(this._socket.destroy.bind(this._socket),VB)}}ping(u,f,c){if(this.readyState===mr.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof u=="function"?(c=u,u=f=void 0):typeof f=="function"&&(c=f,f=void 0),typeof u=="number"&&(u=u.toString()),this.readyState!==mr.OPEN){c3(this,u,c);return}f===void 0&&(f=!this._isServer),this._sender.ping(u||l3,f,c)}pong(u,f,c){if(this.readyState===mr.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof u=="function"?(c=u,u=f=void 0):typeof f=="function"&&(c=f,f=void 0),typeof u=="number"&&(u=u.toString()),this.readyState!==mr.OPEN){c3(this,u,c);return}f===void 0&&(f=!this._isServer),this._sender.pong(u||l3,f,c)}send(u,f,c){if(this.readyState===mr.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof f=="function"&&(c=f,f={}),typeof u=="number"&&(u=u.toString()),this.readyState!==mr.OPEN){c3(this,u,c);return}let g=dt({binary:typeof u!="string",mask:!this._isServer,compress:!0,fin:!0},f);this._extensions[Uf.extensionName]||(g.compress=!1),this._sender.send(u||l3,g,c)}terminate(){if(this.readyState!==mr.CLOSED){if(this.readyState===mr.CONNECTING){let u="WebSocket was closed before the connection was established";return Zl(this,this._req,u)}this._socket&&(this._readyState=mr.CLOSING,this._socket.destroy())}}};U6.forEach((i,u)=>{let f={enumerable:!0,value:u};Object.defineProperty(mr.prototype,i,f),Object.defineProperty(mr,i,f)});["binaryType","bufferedAmount","extensions","protocol","readyState","url"].forEach(i=>{Object.defineProperty(mr.prototype,i,{enumerable:!0})});["open","error","close","message"].forEach(i=>{Object.defineProperty(mr.prototype,`on${i}`,{configurable:!0,enumerable:!0,get(){let u=this.listeners(i);for(let f=0;f{Zl(i,j,"Opening handshake has timed out")}),j.on("error",$=>{j===null||j.aborted||(j=i._req=null,i._readyState=mr.CLOSING,i.emit("error",$),i.emitClose())}),j.on("response",$=>{let h=$.headers.location,re=$.statusCode;if(h&&g.followRedirects&&re>=300&&re<400){if(++i._redirects>g.maxRedirects){Zl(i,j,"Maximum redirects exceeded");return}j.abort();let ce=new s3(h,u);q6(i,ce,f,c)}else i.emit("unexpected-response",j,$)||Zl(i,j,`Unexpected server response: ${$.statusCode}`)}),j.on("upgrade",($,h,re)=>{if(i.emit("upgrade",$),i.readyState!==mr.CONNECTING)return;j=i._req=null;let ce=NB("sha1").update(D+UB).digest("base64");if($.headers["sec-websocket-accept"]!==ce){Zl(i,h,"Invalid Sec-WebSocket-Accept header");return}let Q=$.headers["sec-websocket-protocol"],oe=(f||"").split(/, */),Se;if(!f&&Q?Se="Server sent a subprotocol but none was requested":f&&!Q?Se="Server sent no subprotocol":Q&&!oe.includes(Q)&&(Se="Server sent an invalid subprotocol"),Se){Zl(i,h,Se);return}if(Q&&(i._protocol=Q),N)try{let me=bB($.headers["sec-websocket-extensions"]);me[Uf.extensionName]&&(N.accept(me[Uf.extensionName]),i._extensions[Uf.extensionName]=N)}catch(me){Zl(i,h,"Invalid Sec-WebSocket-Extensions header");return}i.setSocket(h,re,g.maxPayload)})}function ZB(i){return i.path=i.socketPath,N6.connect(i)}function ej(i){return i.path=void 0,!i.servername&&i.servername!==""&&(i.servername=N6.isIP(i.host)?"":i.host),LB.connect(i)}function Zl(i,u,f){i._readyState=mr.CLOSING;let c=new Error(f);Error.captureStackTrace(c,Zl),u.setHeader?(u.abort(),u.socket&&!u.socket.destroyed&&u.socket.destroy(),u.once("abort",i.emitClose.bind(i)),i.emit("error",c)):(u.destroy(c),u.once("error",i.emit.bind(i,"error")),u.once("close",i.emitClose.bind(i)))}function c3(i,u,f){if(u){let c=GB(u).length;i._socket?i._sender._bufferedBytes+=c:i._bufferedAmount+=c}if(f){let c=new Error(`WebSocket is not open: readyState ${i.readyState} (${U6[i.readyState]})`);f(c)}}function YB(i,u){let f=this[No];f._socket.removeListener("data",Wh),f._socket.resume(),f._closeFrameReceived=!0,f._closeMessage=u,f._closeCode=i,i===1005?f.close():f.close(i,u)}function $B(){this[No]._socket.resume()}function KB(i){let u=this[No];u._socket.removeListener("data",Wh),u._readyState=mr.CLOSING,u._closeCode=i[qB],u.emit("error",i),u._socket.destroy()}function b6(){this[No].emitClose()}function XB(i){this[No].emit("message",i)}function JB(i){let u=this[No];u.pong(i,!u._isServer,j6),u.emit("ping",i)}function QB(i){this[No].emit("pong",i)}function z6(){let i=this[No];this.removeListener("close",z6),this.removeListener("end",W6),i._readyState=mr.CLOSING,i._socket.read(),i._receiver.end(),this.removeListener("data",Wh),this[No]=void 0,clearTimeout(i._closeTimer),i._receiver._writableState.finished||i._receiver._writableState.errorEmitted?i.emitClose():(i._receiver.on("error",b6),i._receiver.on("finish",b6))}function Wh(i){this[No]._receiver.write(i)||this.pause()}function W6(){let i=this[No];i._readyState=mr.CLOSING,i._receiver.end(),this.end()}function H6(){let i=this[No];this.removeListener("error",H6),this.on("error",j6),i&&(i._readyState=mr.CLOSING,this.destroy())}});var $6=Me((Gb,G6)=>{"use strict";var{Duplex:tj}=require("stream");function V6(i){i.emit("close")}function nj(){!this.destroyed&&this._writableState.finished&&this.destroy()}function Y6(i){this.removeListener("error",Y6),this.destroy(),this.listenerCount("error")===0&&this.emit("error",i)}function rj(i,u){let f=!0;function c(){f&&i._socket.resume()}i.readyState===i.CONNECTING?i.once("open",function(){i._receiver.removeAllListeners("drain"),i._receiver.on("drain",c)}):(i._receiver.removeAllListeners("drain"),i._receiver.on("drain",c));let g=new tj(zn(dt({},u),{autoDestroy:!1,emitClose:!1,objectMode:!1,writableObjectMode:!1}));return i.on("message",function(C){g.push(C)||(f=!1,i._socket.pause())}),i.once("error",function(C){g.destroyed||g.destroy(C)}),i.once("close",function(){g.destroyed||g.push(null)}),g._destroy=function(t,C){if(i.readyState===i.CLOSED){C(t),process.nextTick(V6,g);return}let A=!1;i.once("error",function(D){A=!0,C(D)}),i.once("close",function(){A||C(t),process.nextTick(V6,g)}),i.terminate()},g._final=function(t){if(i.readyState===i.CONNECTING){i.once("open",function(){g._final(t)});return}i._socket!==null&&(i._socket._writableState.finished?(t(),g._readableState.endEmitted&&g.destroy()):(i._socket.once("finish",function(){t()}),i.close()))},g._read=function(){i.readyState===i.OPEN&&!f&&(f=!0,i._receiver._writableState.needDrain||i._socket.resume())},g._write=function(t,C,A){if(i.readyState===i.CONNECTING){i.once("open",function(){g._write(t,C,A)});return}i.send(t,A)},g.on("end",nj),g.on("error",Y6),g}G6.exports=rj});var J6=Me((Vb,K6)=>{"use strict";var ij=require("events"),{createHash:oj}=require("crypto"),{createServer:uj,STATUS_CODES:d3}=require("http"),gc=w2(),sj=a3(),{format:lj,parse:fj}=u3(),{GUID:cj,kWebSocket:aj}=mc(),dj=/^[+/0-9A-Za-z]{22}==$/,X6=class extends ij{constructor(u,f){super();if(u=dt({maxPayload:100*1024*1024,perMessageDeflate:!1,handleProtocols:null,clientTracking:!0,verifyClient:null,noServer:!1,backlog:null,server:null,host:null,path:null,port:null},u),u.port==null&&!u.server&&!u.noServer)throw new TypeError('One of the "port", "server", or "noServer" options must be specified');if(u.port!=null?(this._server=uj((c,g)=>{let t=d3[426];g.writeHead(426,{"Content-Length":t.length,"Content-Type":"text/plain"}),g.end(t)}),this._server.listen(u.port,u.host,u.backlog,f)):u.server&&(this._server=u.server),this._server){let c=this.emit.bind(this,"connection");this._removeListeners=pj(this._server,{listening:this.emit.bind(this,"listening"),error:this.emit.bind(this,"error"),upgrade:(g,t,C)=>{this.handleUpgrade(g,t,C,c)}})}u.perMessageDeflate===!0&&(u.perMessageDeflate={}),u.clientTracking&&(this.clients=new Set),this.options=u}address(){if(this.options.noServer)throw new Error('The server is operating in "noServer" mode');return this._server?this._server.address():null}close(u){if(u&&this.once("close",u),this.clients)for(let c of this.clients)c.terminate();let f=this._server;if(f&&(this._removeListeners(),this._removeListeners=this._server=null,this.options.port!=null)){f.close(()=>this.emit("close"));return}process.nextTick(hj,this)}shouldHandle(u){if(this.options.path){let f=u.url.indexOf("?");if((f!==-1?u.url.slice(0,f):u.url)!==this.options.path)return!1}return!0}handleUpgrade(u,f,c,g){f.on("error",p3);let t=u.headers["sec-websocket-key"]!==void 0?u.headers["sec-websocket-key"].trim():!1,C=+u.headers["sec-websocket-version"],A={};if(u.method!=="GET"||u.headers.upgrade.toLowerCase()!=="websocket"||!t||!dj.test(t)||C!==8&&C!==13||!this.shouldHandle(u))return Hh(f,400);if(this.options.perMessageDeflate){let x=new gc(this.options.perMessageDeflate,!0,this.options.maxPayload);try{let D=fj(u.headers["sec-websocket-extensions"]);D[gc.extensionName]&&(x.accept(D[gc.extensionName]),A[gc.extensionName]=x)}catch(D){return Hh(f,400)}}if(this.options.verifyClient){let x={origin:u.headers[`${C===8?"sec-websocket-origin":"origin"}`],secure:!!(u.socket.authorized||u.socket.encrypted),req:u};if(this.options.verifyClient.length===2){this.options.verifyClient(x,(D,L,N,j)=>{if(!D)return Hh(f,L||401,N,j);this.completeUpgrade(t,A,u,f,c,g)});return}if(!this.options.verifyClient(x))return Hh(f,401)}this.completeUpgrade(t,A,u,f,c,g)}completeUpgrade(u,f,c,g,t,C){if(!g.readable||!g.writable)return g.destroy();if(g[aj])throw new Error("server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration");let A=oj("sha1").update(u+cj).digest("base64"),x=["HTTP/1.1 101 Switching Protocols","Upgrade: websocket","Connection: Upgrade",`Sec-WebSocket-Accept: ${A}`],D=new sj(null),L=c.headers["sec-websocket-protocol"];if(L&&(L=L.split(",").map(mj),this.options.handleProtocols?L=this.options.handleProtocols(L,c):L=L[0],L&&(x.push(`Sec-WebSocket-Protocol: ${L}`),D._protocol=L)),f[gc.extensionName]){let N=f[gc.extensionName].params,j=lj({[gc.extensionName]:[N]});x.push(`Sec-WebSocket-Extensions: ${j}`),D._extensions=f}this.emit("headers",x,c),g.write(x.concat(`\r -`).join(`\r -`)),g.removeListener("error",p3),D.setSocket(g,t,this.options.maxPayload),this.clients&&(this.clients.add(D),D.on("close",()=>this.clients.delete(D))),C(D,c)}};K6.exports=X6;function pj(i,u){for(let f of Object.keys(u))i.on(f,u[f]);return function(){for(let c of Object.keys(u))i.removeListener(c,u[c])}}function hj(i){i.emit("close")}function p3(){this.destroy()}function Hh(i,u,f,c){i.writable&&(f=f||d3[u],c=dt({Connection:"close","Content-Type":"text/html","Content-Length":Buffer.byteLength(f)},c),i.write(`HTTP/1.1 ${u} ${d3[u]}\r -`+Object.keys(c).map(g=>`${g}: ${c[g]}`).join(`\r -`)+`\r -\r -`+f)),i.removeListener("error",p3),i.destroy()}function mj(i){return i.trim()}});var Z6=Me((Yb,Q6)=>{"use strict";var C2=a3();C2.createWebSocketStream=$6();C2.Server=J6();C2.Receiver=i3();C2.Sender=o3();Q6.exports=C2});var eS=Me(bh=>{"use strict";var vj=bh&&bh.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(bh,"__esModule",{value:!0});var gj=vj(Z6()),T2=global;T2.WebSocket||(T2.WebSocket=gj.default);T2.window||(T2.window=global);T2.window.__REACT_DEVTOOLS_COMPONENT_FILTERS__=[{type:1,value:7,isEnabled:!0},{type:2,value:"InternalApp",isEnabled:!0,isValid:!0},{type:2,value:"InternalAppContext",isEnabled:!0,isValid:!0},{type:2,value:"InternalStdoutContext",isEnabled:!0,isValid:!0},{type:2,value:"InternalStderrContext",isEnabled:!0,isValid:!0},{type:2,value:"InternalStdinContext",isEnabled:!0,isValid:!0},{type:2,value:"InternalFocusContext",isEnabled:!0,isValid:!0}]});var tS=Me((Gh,h3)=>{(function(i,u){typeof Gh=="object"&&typeof h3=="object"?h3.exports=u():typeof define=="function"&&define.amd?define([],u):typeof Gh=="object"?Gh.ReactDevToolsBackend=u():i.ReactDevToolsBackend=u()})(window,function(){return function(i){var u={};function f(c){if(u[c])return u[c].exports;var g=u[c]={i:c,l:!1,exports:{}};return i[c].call(g.exports,g,g.exports,f),g.l=!0,g.exports}return f.m=i,f.c=u,f.d=function(c,g,t){f.o(c,g)||Object.defineProperty(c,g,{enumerable:!0,get:t})},f.r=function(c){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(c,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(c,"__esModule",{value:!0})},f.t=function(c,g){if(1&g&&(c=f(c)),8&g||4&g&&typeof c=="object"&&c&&c.__esModule)return c;var t=Object.create(null);if(f.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:c}),2&g&&typeof c!="string")for(var C in c)f.d(t,C,function(A){return c[A]}.bind(null,C));return t},f.n=function(c){var g=c&&c.__esModule?function(){return c.default}:function(){return c};return f.d(g,"a",g),g},f.o=function(c,g){return Object.prototype.hasOwnProperty.call(c,g)},f.p="",f(f.s=20)}([function(i,u,f){"use strict";i.exports=f(12)},function(i,u,f){"use strict";var c=Object.getOwnPropertySymbols,g=Object.prototype.hasOwnProperty,t=Object.prototype.propertyIsEnumerable;function C(A){if(A==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(A)}i.exports=function(){try{if(!Object.assign)return!1;var A=new String("abc");if(A[5]="de",Object.getOwnPropertyNames(A)[0]==="5")return!1;for(var x={},D=0;D<10;D++)x["_"+String.fromCharCode(D)]=D;if(Object.getOwnPropertyNames(x).map(function(N){return x[N]}).join("")!=="0123456789")return!1;var L={};return"abcdefghijklmnopqrst".split("").forEach(function(N){L[N]=N}),Object.keys(Object.assign({},L)).join("")==="abcdefghijklmnopqrst"}catch(N){return!1}}()?Object.assign:function(A,x){for(var D,L,N=C(A),j=1;j=J||Ft<0||Nt&&it-At>=ot}function Z(){var it=ce();if(ge(it))return Ae(it);Ue=setTimeout(Z,function(Ft){var jt=J-(Ft-be);return Nt?re(jt,ot-(Ft-At)):jt}(it))}function Ae(it){return Ue=void 0,Je&&Oe?V(it):(Oe=Le=void 0,ct)}function at(){var it=ce(),Ft=ge(it);if(Oe=arguments,Le=this,be=it,Ft){if(Ue===void 0)return ne(be);if(Nt)return Ue=setTimeout(Z,J),V(be)}return Ue===void 0&&(Ue=setTimeout(Z,J)),ct}return J=me(J)||0,oe(Te)&&(Ot=!!Te.leading,ot=(Nt="maxWait"in Te)?h(me(Te.maxWait)||0,J):ot,Je="trailing"in Te?!!Te.trailing:Je),at.cancel=function(){Ue!==void 0&&clearTimeout(Ue),At=0,Oe=be=Le=Ue=void 0},at.flush=function(){return Ue===void 0?ct:Ae(ce())},at}function oe(De){var J=g(De);return!!De&&(J=="object"||J=="function")}function Se(De){return g(De)=="symbol"||function(J){return!!J&&g(J)=="object"}(De)&&$.call(De)=="[object Symbol]"}function me(De){if(typeof De=="number")return De;if(Se(De))return NaN;if(oe(De)){var J=typeof De.valueOf=="function"?De.valueOf():De;De=oe(J)?J+"":J}if(typeof De!="string")return De===0?De:+De;De=De.replace(t,"");var Te=A.test(De);return Te||x.test(De)?D(De.slice(2),Te?2:8):C.test(De)?NaN:+De}i.exports=function(De,J,Te){var Oe=!0,Le=!0;if(typeof De!="function")throw new TypeError("Expected a function");return oe(Te)&&(Oe="leading"in Te?!!Te.leading:Oe,Le="trailing"in Te?!!Te.trailing:Le),Q(De,J,{leading:Oe,maxWait:J,trailing:Le})}}).call(this,f(4))},function(i,u,f){(function(c){function g(V){return(g=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(ne){return typeof ne}:function(ne){return ne&&typeof Symbol=="function"&&ne.constructor===Symbol&&ne!==Symbol.prototype?"symbol":typeof ne})(V)}var t;u=i.exports=h,t=(c===void 0?"undefined":g(c))==="object"&&c.env&&c.env.NODE_DEBUG&&/\bsemver\b/i.test(c.env.NODE_DEBUG)?function(){var V=Array.prototype.slice.call(arguments,0);V.unshift("SEMVER"),console.log.apply(console,V)}:function(){},u.SEMVER_SPEC_VERSION="2.0.0";var C=Number.MAX_SAFE_INTEGER||9007199254740991,A=u.re=[],x=u.src=[],D=u.tokens={},L=0;function N(V){D[V]=L++}N("NUMERICIDENTIFIER"),x[D.NUMERICIDENTIFIER]="0|[1-9]\\d*",N("NUMERICIDENTIFIERLOOSE"),x[D.NUMERICIDENTIFIERLOOSE]="[0-9]+",N("NONNUMERICIDENTIFIER"),x[D.NONNUMERICIDENTIFIER]="\\d*[a-zA-Z-][a-zA-Z0-9-]*",N("MAINVERSION"),x[D.MAINVERSION]="("+x[D.NUMERICIDENTIFIER]+")\\.("+x[D.NUMERICIDENTIFIER]+")\\.("+x[D.NUMERICIDENTIFIER]+")",N("MAINVERSIONLOOSE"),x[D.MAINVERSIONLOOSE]="("+x[D.NUMERICIDENTIFIERLOOSE]+")\\.("+x[D.NUMERICIDENTIFIERLOOSE]+")\\.("+x[D.NUMERICIDENTIFIERLOOSE]+")",N("PRERELEASEIDENTIFIER"),x[D.PRERELEASEIDENTIFIER]="(?:"+x[D.NUMERICIDENTIFIER]+"|"+x[D.NONNUMERICIDENTIFIER]+")",N("PRERELEASEIDENTIFIERLOOSE"),x[D.PRERELEASEIDENTIFIERLOOSE]="(?:"+x[D.NUMERICIDENTIFIERLOOSE]+"|"+x[D.NONNUMERICIDENTIFIER]+")",N("PRERELEASE"),x[D.PRERELEASE]="(?:-("+x[D.PRERELEASEIDENTIFIER]+"(?:\\."+x[D.PRERELEASEIDENTIFIER]+")*))",N("PRERELEASELOOSE"),x[D.PRERELEASELOOSE]="(?:-?("+x[D.PRERELEASEIDENTIFIERLOOSE]+"(?:\\."+x[D.PRERELEASEIDENTIFIERLOOSE]+")*))",N("BUILDIDENTIFIER"),x[D.BUILDIDENTIFIER]="[0-9A-Za-z-]+",N("BUILD"),x[D.BUILD]="(?:\\+("+x[D.BUILDIDENTIFIER]+"(?:\\."+x[D.BUILDIDENTIFIER]+")*))",N("FULL"),N("FULLPLAIN"),x[D.FULLPLAIN]="v?"+x[D.MAINVERSION]+x[D.PRERELEASE]+"?"+x[D.BUILD]+"?",x[D.FULL]="^"+x[D.FULLPLAIN]+"$",N("LOOSEPLAIN"),x[D.LOOSEPLAIN]="[v=\\s]*"+x[D.MAINVERSIONLOOSE]+x[D.PRERELEASELOOSE]+"?"+x[D.BUILD]+"?",N("LOOSE"),x[D.LOOSE]="^"+x[D.LOOSEPLAIN]+"$",N("GTLT"),x[D.GTLT]="((?:<|>)?=?)",N("XRANGEIDENTIFIERLOOSE"),x[D.XRANGEIDENTIFIERLOOSE]=x[D.NUMERICIDENTIFIERLOOSE]+"|x|X|\\*",N("XRANGEIDENTIFIER"),x[D.XRANGEIDENTIFIER]=x[D.NUMERICIDENTIFIER]+"|x|X|\\*",N("XRANGEPLAIN"),x[D.XRANGEPLAIN]="[v=\\s]*("+x[D.XRANGEIDENTIFIER]+")(?:\\.("+x[D.XRANGEIDENTIFIER]+")(?:\\.("+x[D.XRANGEIDENTIFIER]+")(?:"+x[D.PRERELEASE]+")?"+x[D.BUILD]+"?)?)?",N("XRANGEPLAINLOOSE"),x[D.XRANGEPLAINLOOSE]="[v=\\s]*("+x[D.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+x[D.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+x[D.XRANGEIDENTIFIERLOOSE]+")(?:"+x[D.PRERELEASELOOSE]+")?"+x[D.BUILD]+"?)?)?",N("XRANGE"),x[D.XRANGE]="^"+x[D.GTLT]+"\\s*"+x[D.XRANGEPLAIN]+"$",N("XRANGELOOSE"),x[D.XRANGELOOSE]="^"+x[D.GTLT]+"\\s*"+x[D.XRANGEPLAINLOOSE]+"$",N("COERCE"),x[D.COERCE]="(^|[^\\d])(\\d{1,16})(?:\\.(\\d{1,16}))?(?:\\.(\\d{1,16}))?(?:$|[^\\d])",N("COERCERTL"),A[D.COERCERTL]=new RegExp(x[D.COERCE],"g"),N("LONETILDE"),x[D.LONETILDE]="(?:~>?)",N("TILDETRIM"),x[D.TILDETRIM]="(\\s*)"+x[D.LONETILDE]+"\\s+",A[D.TILDETRIM]=new RegExp(x[D.TILDETRIM],"g"),N("TILDE"),x[D.TILDE]="^"+x[D.LONETILDE]+x[D.XRANGEPLAIN]+"$",N("TILDELOOSE"),x[D.TILDELOOSE]="^"+x[D.LONETILDE]+x[D.XRANGEPLAINLOOSE]+"$",N("LONECARET"),x[D.LONECARET]="(?:\\^)",N("CARETTRIM"),x[D.CARETTRIM]="(\\s*)"+x[D.LONECARET]+"\\s+",A[D.CARETTRIM]=new RegExp(x[D.CARETTRIM],"g"),N("CARET"),x[D.CARET]="^"+x[D.LONECARET]+x[D.XRANGEPLAIN]+"$",N("CARETLOOSE"),x[D.CARETLOOSE]="^"+x[D.LONECARET]+x[D.XRANGEPLAINLOOSE]+"$",N("COMPARATORLOOSE"),x[D.COMPARATORLOOSE]="^"+x[D.GTLT]+"\\s*("+x[D.LOOSEPLAIN]+")$|^$",N("COMPARATOR"),x[D.COMPARATOR]="^"+x[D.GTLT]+"\\s*("+x[D.FULLPLAIN]+")$|^$",N("COMPARATORTRIM"),x[D.COMPARATORTRIM]="(\\s*)"+x[D.GTLT]+"\\s*("+x[D.LOOSEPLAIN]+"|"+x[D.XRANGEPLAIN]+")",A[D.COMPARATORTRIM]=new RegExp(x[D.COMPARATORTRIM],"g"),N("HYPHENRANGE"),x[D.HYPHENRANGE]="^\\s*("+x[D.XRANGEPLAIN]+")\\s+-\\s+("+x[D.XRANGEPLAIN]+")\\s*$",N("HYPHENRANGELOOSE"),x[D.HYPHENRANGELOOSE]="^\\s*("+x[D.XRANGEPLAINLOOSE]+")\\s+-\\s+("+x[D.XRANGEPLAINLOOSE]+")\\s*$",N("STAR"),x[D.STAR]="(<|>)?=?\\s*\\*";for(var j=0;j256||!(ne.loose?A[D.LOOSE]:A[D.FULL]).test(V))return null;try{return new h(V,ne)}catch(ge){return null}}function h(V,ne){if(ne&&g(ne)==="object"||(ne={loose:!!ne,includePrerelease:!1}),V instanceof h){if(V.loose===ne.loose)return V;V=V.version}else if(typeof V!="string")throw new TypeError("Invalid Version: "+V);if(V.length>256)throw new TypeError("version is longer than 256 characters");if(!(this instanceof h))return new h(V,ne);t("SemVer",V,ne),this.options=ne,this.loose=!!ne.loose;var ge=V.trim().match(ne.loose?A[D.LOOSE]:A[D.FULL]);if(!ge)throw new TypeError("Invalid Version: "+V);if(this.raw=V,this.major=+ge[1],this.minor=+ge[2],this.patch=+ge[3],this.major>C||this.major<0)throw new TypeError("Invalid major version");if(this.minor>C||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>C||this.patch<0)throw new TypeError("Invalid patch version");ge[4]?this.prerelease=ge[4].split(".").map(function(Z){if(/^[0-9]+$/.test(Z)){var Ae=+Z;if(Ae>=0&&Ae=0;)typeof this.prerelease[ge]=="number"&&(this.prerelease[ge]++,ge=-2);ge===-1&&this.prerelease.push(0)}ne&&(this.prerelease[0]===ne?isNaN(this.prerelease[1])&&(this.prerelease=[ne,0]):this.prerelease=[ne,0]);break;default:throw new Error("invalid increment argument: "+V)}return this.format(),this.raw=this.version,this},u.inc=function(V,ne,ge,Z){typeof ge=="string"&&(Z=ge,ge=void 0);try{return new h(V,ge).inc(ne,Z).version}catch(Ae){return null}},u.diff=function(V,ne){if(me(V,ne))return null;var ge=$(V),Z=$(ne),Ae="";if(ge.prerelease.length||Z.prerelease.length){Ae="pre";var at="prerelease"}for(var it in ge)if((it==="major"||it==="minor"||it==="patch")&&ge[it]!==Z[it])return Ae+it;return at},u.compareIdentifiers=ce;var re=/^[0-9]+$/;function ce(V,ne){var ge=re.test(V),Z=re.test(ne);return ge&&Z&&(V=+V,ne=+ne),V===ne?0:ge&&!Z?-1:Z&&!ge?1:V0}function Se(V,ne,ge){return Q(V,ne,ge)<0}function me(V,ne,ge){return Q(V,ne,ge)===0}function De(V,ne,ge){return Q(V,ne,ge)!==0}function J(V,ne,ge){return Q(V,ne,ge)>=0}function Te(V,ne,ge){return Q(V,ne,ge)<=0}function Oe(V,ne,ge,Z){switch(ne){case"===":return g(V)==="object"&&(V=V.version),g(ge)==="object"&&(ge=ge.version),V===ge;case"!==":return g(V)==="object"&&(V=V.version),g(ge)==="object"&&(ge=ge.version),V!==ge;case"":case"=":case"==":return me(V,ge,Z);case"!=":return De(V,ge,Z);case">":return oe(V,ge,Z);case">=":return J(V,ge,Z);case"<":return Se(V,ge,Z);case"<=":return Te(V,ge,Z);default:throw new TypeError("Invalid operator: "+ne)}}function Le(V,ne){if(ne&&g(ne)==="object"||(ne={loose:!!ne,includePrerelease:!1}),V instanceof Le){if(V.loose===!!ne.loose)return V;V=V.value}if(!(this instanceof Le))return new Le(V,ne);t("comparator",V,ne),this.options=ne,this.loose=!!ne.loose,this.parse(V),this.semver===ot?this.value="":this.value=this.operator+this.semver.version,t("comp",this)}u.rcompareIdentifiers=function(V,ne){return ce(ne,V)},u.major=function(V,ne){return new h(V,ne).major},u.minor=function(V,ne){return new h(V,ne).minor},u.patch=function(V,ne){return new h(V,ne).patch},u.compare=Q,u.compareLoose=function(V,ne){return Q(V,ne,!0)},u.compareBuild=function(V,ne,ge){var Z=new h(V,ge),Ae=new h(ne,ge);return Z.compare(Ae)||Z.compareBuild(Ae)},u.rcompare=function(V,ne,ge){return Q(ne,V,ge)},u.sort=function(V,ne){return V.sort(function(ge,Z){return u.compareBuild(ge,Z,ne)})},u.rsort=function(V,ne){return V.sort(function(ge,Z){return u.compareBuild(Z,ge,ne)})},u.gt=oe,u.lt=Se,u.eq=me,u.neq=De,u.gte=J,u.lte=Te,u.cmp=Oe,u.Comparator=Le;var ot={};function ct(V,ne){if(ne&&g(ne)==="object"||(ne={loose:!!ne,includePrerelease:!1}),V instanceof ct)return V.loose===!!ne.loose&&V.includePrerelease===!!ne.includePrerelease?V:new ct(V.raw,ne);if(V instanceof Le)return new ct(V.value,ne);if(!(this instanceof ct))return new ct(V,ne);if(this.options=ne,this.loose=!!ne.loose,this.includePrerelease=!!ne.includePrerelease,this.raw=V,this.set=V.split(/\s*\|\|\s*/).map(function(ge){return this.parseRange(ge.trim())},this).filter(function(ge){return ge.length}),!this.set.length)throw new TypeError("Invalid SemVer Range: "+V);this.format()}function Ue(V,ne){for(var ge=!0,Z=V.slice(),Ae=Z.pop();ge&&Z.length;)ge=Z.every(function(at){return Ae.intersects(at,ne)}),Ae=Z.pop();return ge}function be(V){return!V||V.toLowerCase()==="x"||V==="*"}function At(V,ne,ge,Z,Ae,at,it,Ft,jt,hn,Un,Jt,Yt){return((ne=be(ge)?"":be(Z)?">="+ge+".0.0":be(Ae)?">="+ge+"."+Z+".0":">="+ne)+" "+(Ft=be(jt)?"":be(hn)?"<"+(+jt+1)+".0.0":be(Un)?"<"+jt+"."+(+hn+1)+".0":Jt?"<="+jt+"."+hn+"."+Un+"-"+Jt:"<="+Ft)).trim()}function Ot(V,ne,ge){for(var Z=0;Z0){var Ae=V[Z].semver;if(Ae.major===ne.major&&Ae.minor===ne.minor&&Ae.patch===ne.patch)return!0}return!1}return!0}function Nt(V,ne,ge){try{ne=new ct(ne,ge)}catch(Z){return!1}return ne.test(V)}function Je(V,ne,ge,Z){var Ae,at,it,Ft,jt;switch(V=new h(V,Z),ne=new ct(ne,Z),ge){case">":Ae=oe,at=Te,it=Se,Ft=">",jt=">=";break;case"<":Ae=Se,at=J,it=oe,Ft="<",jt="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(Nt(V,ne,Z))return!1;for(var hn=0;hn=0.0.0")),Jt=Jt||cr,Yt=Yt||cr,Ae(cr.semver,Jt.semver,Z)?Jt=cr:it(cr.semver,Yt.semver,Z)&&(Yt=cr)}),Jt.operator===Ft||Jt.operator===jt||(!Yt.operator||Yt.operator===Ft)&&at(V,Yt.semver)||Yt.operator===jt&&it(V,Yt.semver))return!1}return!0}Le.prototype.parse=function(V){var ne=this.options.loose?A[D.COMPARATORLOOSE]:A[D.COMPARATOR],ge=V.match(ne);if(!ge)throw new TypeError("Invalid comparator: "+V);this.operator=ge[1]!==void 0?ge[1]:"",this.operator==="="&&(this.operator=""),ge[2]?this.semver=new h(ge[2],this.options.loose):this.semver=ot},Le.prototype.toString=function(){return this.value},Le.prototype.test=function(V){if(t("Comparator.test",V,this.options.loose),this.semver===ot||V===ot)return!0;if(typeof V=="string")try{V=new h(V,this.options)}catch(ne){return!1}return Oe(V,this.operator,this.semver,this.options)},Le.prototype.intersects=function(V,ne){if(!(V instanceof Le))throw new TypeError("a Comparator is required");var ge;if(ne&&g(ne)==="object"||(ne={loose:!!ne,includePrerelease:!1}),this.operator==="")return this.value===""||(ge=new ct(V.value,ne),Nt(this.value,ge,ne));if(V.operator==="")return V.value===""||(ge=new ct(this.value,ne),Nt(V.semver,ge,ne));var Z=!(this.operator!==">="&&this.operator!==">"||V.operator!==">="&&V.operator!==">"),Ae=!(this.operator!=="<="&&this.operator!=="<"||V.operator!=="<="&&V.operator!=="<"),at=this.semver.version===V.semver.version,it=!(this.operator!==">="&&this.operator!=="<="||V.operator!==">="&&V.operator!=="<="),Ft=Oe(this.semver,"<",V.semver,ne)&&(this.operator===">="||this.operator===">")&&(V.operator==="<="||V.operator==="<"),jt=Oe(this.semver,">",V.semver,ne)&&(this.operator==="<="||this.operator==="<")&&(V.operator===">="||V.operator===">");return Z||Ae||at&&it||Ft||jt},u.Range=ct,ct.prototype.format=function(){return this.range=this.set.map(function(V){return V.join(" ").trim()}).join("||").trim(),this.range},ct.prototype.toString=function(){return this.range},ct.prototype.parseRange=function(V){var ne=this.options.loose;V=V.trim();var ge=ne?A[D.HYPHENRANGELOOSE]:A[D.HYPHENRANGE];V=V.replace(ge,At),t("hyphen replace",V),V=V.replace(A[D.COMPARATORTRIM],"$1$2$3"),t("comparator trim",V,A[D.COMPARATORTRIM]),V=(V=(V=V.replace(A[D.TILDETRIM],"$1~")).replace(A[D.CARETTRIM],"$1^")).split(/\s+/).join(" ");var Z=ne?A[D.COMPARATORLOOSE]:A[D.COMPARATOR],Ae=V.split(" ").map(function(at){return function(it,Ft){return t("comp",it,Ft),it=function(jt,hn){return jt.trim().split(/\s+/).map(function(Un){return function(Jt,Yt){t("caret",Jt,Yt);var cr=Yt.loose?A[D.CARETLOOSE]:A[D.CARET];return Jt.replace(cr,function(w,pt,Mn,Bn,Xn){var vr;return t("caret",Jt,w,pt,Mn,Bn,Xn),be(pt)?vr="":be(Mn)?vr=">="+pt+".0.0 <"+(+pt+1)+".0.0":be(Bn)?vr=pt==="0"?">="+pt+"."+Mn+".0 <"+pt+"."+(+Mn+1)+".0":">="+pt+"."+Mn+".0 <"+(+pt+1)+".0.0":Xn?(t("replaceCaret pr",Xn),vr=pt==="0"?Mn==="0"?">="+pt+"."+Mn+"."+Bn+"-"+Xn+" <"+pt+"."+Mn+"."+(+Bn+1):">="+pt+"."+Mn+"."+Bn+"-"+Xn+" <"+pt+"."+(+Mn+1)+".0":">="+pt+"."+Mn+"."+Bn+"-"+Xn+" <"+(+pt+1)+".0.0"):(t("no pr"),vr=pt==="0"?Mn==="0"?">="+pt+"."+Mn+"."+Bn+" <"+pt+"."+Mn+"."+(+Bn+1):">="+pt+"."+Mn+"."+Bn+" <"+pt+"."+(+Mn+1)+".0":">="+pt+"."+Mn+"."+Bn+" <"+(+pt+1)+".0.0"),t("caret return",vr),vr})}(Un,hn)}).join(" ")}(it,Ft),t("caret",it),it=function(jt,hn){return jt.trim().split(/\s+/).map(function(Un){return function(Jt,Yt){var cr=Yt.loose?A[D.TILDELOOSE]:A[D.TILDE];return Jt.replace(cr,function(w,pt,Mn,Bn,Xn){var vr;return t("tilde",Jt,w,pt,Mn,Bn,Xn),be(pt)?vr="":be(Mn)?vr=">="+pt+".0.0 <"+(+pt+1)+".0.0":be(Bn)?vr=">="+pt+"."+Mn+".0 <"+pt+"."+(+Mn+1)+".0":Xn?(t("replaceTilde pr",Xn),vr=">="+pt+"."+Mn+"."+Bn+"-"+Xn+" <"+pt+"."+(+Mn+1)+".0"):vr=">="+pt+"."+Mn+"."+Bn+" <"+pt+"."+(+Mn+1)+".0",t("tilde return",vr),vr})}(Un,hn)}).join(" ")}(it,Ft),t("tildes",it),it=function(jt,hn){return t("replaceXRanges",jt,hn),jt.split(/\s+/).map(function(Un){return function(Jt,Yt){Jt=Jt.trim();var cr=Yt.loose?A[D.XRANGELOOSE]:A[D.XRANGE];return Jt.replace(cr,function(w,pt,Mn,Bn,Xn,vr){t("xRange",Jt,w,pt,Mn,Bn,Xn,vr);var gr=be(Mn),r0=gr||be(Bn),Ci=r0||be(Xn),yo=Ci;return pt==="="&&yo&&(pt=""),vr=Yt.includePrerelease?"-0":"",gr?w=pt===">"||pt==="<"?"<0.0.0-0":"*":pt&&yo?(r0&&(Bn=0),Xn=0,pt===">"?(pt=">=",r0?(Mn=+Mn+1,Bn=0,Xn=0):(Bn=+Bn+1,Xn=0)):pt==="<="&&(pt="<",r0?Mn=+Mn+1:Bn=+Bn+1),w=pt+Mn+"."+Bn+"."+Xn+vr):r0?w=">="+Mn+".0.0"+vr+" <"+(+Mn+1)+".0.0"+vr:Ci&&(w=">="+Mn+"."+Bn+".0"+vr+" <"+Mn+"."+(+Bn+1)+".0"+vr),t("xRange return",w),w})}(Un,hn)}).join(" ")}(it,Ft),t("xrange",it),it=function(jt,hn){return t("replaceStars",jt,hn),jt.trim().replace(A[D.STAR],"")}(it,Ft),t("stars",it),it}(at,this.options)},this).join(" ").split(/\s+/);return this.options.loose&&(Ae=Ae.filter(function(at){return!!at.match(Z)})),Ae=Ae.map(function(at){return new Le(at,this.options)},this)},ct.prototype.intersects=function(V,ne){if(!(V instanceof ct))throw new TypeError("a Range is required");return this.set.some(function(ge){return Ue(ge,ne)&&V.set.some(function(Z){return Ue(Z,ne)&&ge.every(function(Ae){return Z.every(function(at){return Ae.intersects(at,ne)})})})})},u.toComparators=function(V,ne){return new ct(V,ne).set.map(function(ge){return ge.map(function(Z){return Z.value}).join(" ").trim().split(" ")})},ct.prototype.test=function(V){if(!V)return!1;if(typeof V=="string")try{V=new h(V,this.options)}catch(ge){return!1}for(var ne=0;ne":at.prerelease.length===0?at.patch++:at.prerelease.push(0),at.raw=at.format();case"":case">=":ge&&!oe(ge,at)||(ge=at);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+Ae.operator)}});return ge&&V.test(ge)?ge:null},u.validRange=function(V,ne){try{return new ct(V,ne).range||"*"}catch(ge){return null}},u.ltr=function(V,ne,ge){return Je(V,ne,"<",ge)},u.gtr=function(V,ne,ge){return Je(V,ne,">",ge)},u.outside=Je,u.prerelease=function(V,ne){var ge=$(V,ne);return ge&&ge.prerelease.length?ge.prerelease:null},u.intersects=function(V,ne,ge){return V=new ct(V,ge),ne=new ct(ne,ge),V.intersects(ne)},u.coerce=function(V,ne){if(V instanceof h)return V;if(typeof V=="number"&&(V=String(V)),typeof V!="string")return null;var ge=null;if((ne=ne||{}).rtl){for(var Z;(Z=A[D.COERCERTL].exec(V))&&(!ge||ge.index+ge[0].length!==V.length);)ge&&Z.index+Z[0].length===ge.index+ge[0].length||(ge=Z),A[D.COERCERTL].lastIndex=Z.index+Z[1].length+Z[2].length;A[D.COERCERTL].lastIndex=-1}else ge=V.match(A[D.COERCE]);return ge===null?null:$(ge[2]+"."+(ge[3]||"0")+"."+(ge[4]||"0"),ne)}}).call(this,f(5))},function(i,u){function f(g){return(f=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(g)}var c;c=function(){return this}();try{c=c||new Function("return this")()}catch(g){(typeof window=="undefined"?"undefined":f(window))==="object"&&(c=window)}i.exports=c},function(i,u){var f,c,g=i.exports={};function t(){throw new Error("setTimeout has not been defined")}function C(){throw new Error("clearTimeout has not been defined")}function A(ce){if(f===setTimeout)return setTimeout(ce,0);if((f===t||!f)&&setTimeout)return f=setTimeout,setTimeout(ce,0);try{return f(ce,0)}catch(Q){try{return f.call(null,ce,0)}catch(oe){return f.call(this,ce,0)}}}(function(){try{f=typeof setTimeout=="function"?setTimeout:t}catch(ce){f=t}try{c=typeof clearTimeout=="function"?clearTimeout:C}catch(ce){c=C}})();var x,D=[],L=!1,N=-1;function j(){L&&x&&(L=!1,x.length?D=x.concat(D):N=-1,D.length&&$())}function $(){if(!L){var ce=A(j);L=!0;for(var Q=D.length;Q;){for(x=D,D=[];++N1)for(var oe=1;oethis[C])return De(this,this[h].get(Ue)),!1;var Je=this[h].get(Ue).value;return this[N]&&(this[j]||this[N](Ue,Je.value)),Je.now=Ot,Je.maxAge=At,Je.value=be,this[A]+=Nt-Je.length,Je.length=Nt,this.get(Ue),me(this),!0}var V=new J(Ue,be,Nt,Ot,At);return V.length>this[C]?(this[N]&&this[N](Ue,be),!1):(this[A]+=V.length,this[$].unshift(V),this[h].set(Ue,this[$].head),me(this),!0)}},{key:"has",value:function(Ue){if(!this[h].has(Ue))return!1;var be=this[h].get(Ue).value;return!Se(this,be)}},{key:"get",value:function(Ue){return oe(this,Ue,!0)}},{key:"peek",value:function(Ue){return oe(this,Ue,!1)}},{key:"pop",value:function(){var Ue=this[$].tail;return Ue?(De(this,Ue),Ue.value):null}},{key:"del",value:function(Ue){De(this,this[h].get(Ue))}},{key:"load",value:function(Ue){this.reset();for(var be=Date.now(),At=Ue.length-1;At>=0;At--){var Ot=Ue[At],Nt=Ot.e||0;if(Nt===0)this.set(Ot.k,Ot.v);else{var Je=Nt-be;Je>0&&this.set(Ot.k,Ot.v,Je)}}}},{key:"prune",value:function(){var Ue=this;this[h].forEach(function(be,At){return oe(Ue,At,!1)})}},{key:"max",set:function(Ue){if(typeof Ue!="number"||Ue<0)throw new TypeError("max must be a non-negative number");this[C]=Ue||1/0,me(this)},get:function(){return this[C]}},{key:"allowStale",set:function(Ue){this[D]=!!Ue},get:function(){return this[D]}},{key:"maxAge",set:function(Ue){if(typeof Ue!="number")throw new TypeError("maxAge must be a non-negative number");this[L]=Ue,me(this)},get:function(){return this[L]}},{key:"lengthCalculator",set:function(Ue){var be=this;typeof Ue!="function"&&(Ue=ce),Ue!==this[x]&&(this[x]=Ue,this[A]=0,this[$].forEach(function(At){At.length=be[x](At.value,At.key),be[A]+=At.length})),me(this)},get:function(){return this[x]}},{key:"length",get:function(){return this[A]}},{key:"itemCount",get:function(){return this[$].length}}])&&g(Le.prototype,ot),ct&&g(Le,ct),Oe}(),oe=function(Oe,Le,ot){var ct=Oe[h].get(Le);if(ct){var Ue=ct.value;if(Se(Oe,Ue)){if(De(Oe,ct),!Oe[D])return}else ot&&(Oe[re]&&(ct.value.now=Date.now()),Oe[$].unshiftNode(ct));return Ue.value}},Se=function(Oe,Le){if(!Le||!Le.maxAge&&!Oe[L])return!1;var ot=Date.now()-Le.now;return Le.maxAge?ot>Le.maxAge:Oe[L]&&ot>Oe[L]},me=function(Oe){if(Oe[A]>Oe[C])for(var Le=Oe[$].tail;Oe[A]>Oe[C]&&Le!==null;){var ot=Le.prev;De(Oe,Le),Le=ot}},De=function(Oe,Le){if(Le){var ot=Le.value;Oe[N]&&Oe[N](ot.key,ot.value),Oe[A]-=ot.length,Oe[h].delete(ot.key),Oe[$].removeNode(Le)}},J=function Oe(Le,ot,ct,Ue,be){c(this,Oe),this.key=Le,this.value=ot,this.length=ct,this.now=Ue,this.maxAge=be||0},Te=function(Oe,Le,ot,ct){var Ue=ot.value;Se(Oe,Ue)&&(De(Oe,ot),Oe[D]||(Ue=void 0)),Ue&&Le.call(ct,Ue.value,Ue.key,Oe)};i.exports=Q},function(i,u,f){(function(c){function g(t){return(g=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(C){return typeof C}:function(C){return C&&typeof Symbol=="function"&&C.constructor===Symbol&&C!==Symbol.prototype?"symbol":typeof C})(t)}i.exports=function(){if(typeof document=="undefined"||!document.addEventListener)return null;var t,C,A,x={};return x.copy=function(){var D=!1,L=null,N=!1;function j(){D=!1,L=null,N&&window.getSelection().removeAllRanges(),N=!1}return document.addEventListener("copy",function($){if(D){for(var h in L)$.clipboardData.setData(h,L[h]);$.preventDefault()}}),function($){return new Promise(function(h,re){D=!0,typeof $=="string"?L={"text/plain":$}:$ instanceof Node?L={"text/html":new XMLSerializer().serializeToString($)}:$ instanceof Object?L=$:re("Invalid data type. Must be string, DOM node, or an object mapping MIME types to strings."),function ce(Q){try{if(document.execCommand("copy"))j(),h();else{if(Q)throw j(),new Error("Unable to copy. Perhaps it's not available in your browser?");(function(){var oe=document.getSelection();if(!document.queryCommandEnabled("copy")&&oe.isCollapsed){var Se=document.createRange();Se.selectNodeContents(document.body),oe.removeAllRanges(),oe.addRange(Se),N=!0}})(),ce(!0)}}catch(oe){j(),re(oe)}}(!1)})}}(),x.paste=(A=!1,document.addEventListener("paste",function(D){if(A){A=!1,D.preventDefault();var L=t;t=null,L(D.clipboardData.getData(C))}}),function(D){return new Promise(function(L,N){A=!0,t=L,C=D||"text/plain";try{document.execCommand("paste")||(A=!1,N(new Error("Unable to paste. Pasting only works in Internet Explorer at the moment.")))}catch(j){A=!1,N(new Error(j))}})}),typeof ClipboardEvent=="undefined"&&window.clipboardData!==void 0&&window.clipboardData.setData!==void 0&&(function(D){function L(me,De){return function(){me.apply(De,arguments)}}function N(me){if(g(this)!="object")throw new TypeError("Promises must be constructed via new");if(typeof me!="function")throw new TypeError("not a function");this._state=null,this._value=null,this._deferreds=[],Q(me,L($,this),L(h,this))}function j(me){var De=this;return this._state===null?void this._deferreds.push(me):void oe(function(){var J=De._state?me.onFulfilled:me.onRejected;if(J!==null){var Te;try{Te=J(De._value)}catch(Oe){return void me.reject(Oe)}me.resolve(Te)}else(De._state?me.resolve:me.reject)(De._value)})}function $(me){try{if(me===this)throw new TypeError("A promise cannot be resolved with itself.");if(me&&(g(me)=="object"||typeof me=="function")){var De=me.then;if(typeof De=="function")return void Q(L(De,me),L($,this),L(h,this))}this._state=!0,this._value=me,re.call(this)}catch(J){h.call(this,J)}}function h(me){this._state=!1,this._value=me,re.call(this)}function re(){for(var me=0,De=this._deferreds.length;De>me;me++)j.call(this,this._deferreds[me]);this._deferreds=null}function ce(me,De,J,Te){this.onFulfilled=typeof me=="function"?me:null,this.onRejected=typeof De=="function"?De:null,this.resolve=J,this.reject=Te}function Q(me,De,J){var Te=!1;try{me(function(Oe){Te||(Te=!0,De(Oe))},function(Oe){Te||(Te=!0,J(Oe))})}catch(Oe){if(Te)return;Te=!0,J(Oe)}}var oe=N.immediateFn||typeof c=="function"&&c||function(me){setTimeout(me,1)},Se=Array.isArray||function(me){return Object.prototype.toString.call(me)==="[object Array]"};N.prototype.catch=function(me){return this.then(null,me)},N.prototype.then=function(me,De){var J=this;return new N(function(Te,Oe){j.call(J,new ce(me,De,Te,Oe))})},N.all=function(){var me=Array.prototype.slice.call(arguments.length===1&&Se(arguments[0])?arguments[0]:arguments);return new N(function(De,J){function Te(ot,ct){try{if(ct&&(g(ct)=="object"||typeof ct=="function")){var Ue=ct.then;if(typeof Ue=="function")return void Ue.call(ct,function(be){Te(ot,be)},J)}me[ot]=ct,--Oe==0&&De(me)}catch(be){J(be)}}if(me.length===0)return De([]);for(var Oe=me.length,Le=0;LeTe;Te++)me[Te].then(De,J)})},i.exports?i.exports=N:D.Promise||(D.Promise=N)}(this),x.copy=function(D){return new Promise(function(L,N){if(typeof D!="string"&&!("text/plain"in D))throw new Error("You must provide a text/plain type.");var j=typeof D=="string"?D:D["text/plain"];window.clipboardData.setData("Text",j)?L():N(new Error("Copying was rejected."))})},x.paste=function(){return new Promise(function(D,L){var N=window.clipboardData.getData("Text");N?D(N):L(new Error("Pasting was rejected."))})}),x}()}).call(this,f(13).setImmediate)},function(i,u,f){"use strict";i.exports=f(15)},function(i,u,f){"use strict";f.r(u),u.default=`:root { - /** - * IMPORTANT: When new theme variables are added below\u2013 also add them to SettingsContext updateThemeVariables() - */ - - /* Light theme */ - --light-color-attribute-name: #ef6632; - --light-color-attribute-name-not-editable: #23272f; - --light-color-attribute-name-inverted: rgba(255, 255, 255, 0.7); - --light-color-attribute-value: #1a1aa6; - --light-color-attribute-value-inverted: #ffffff; - --light-color-attribute-editable-value: #1a1aa6; - --light-color-background: #ffffff; - --light-color-background-hover: rgba(0, 136, 250, 0.1); - --light-color-background-inactive: #e5e5e5; - --light-color-background-invalid: #fff0f0; - --light-color-background-selected: #0088fa; - --light-color-button-background: #ffffff; - --light-color-button-background-focus: #ededed; - --light-color-button: #5f6673; - --light-color-button-disabled: #cfd1d5; - --light-color-button-active: #0088fa; - --light-color-button-focus: #23272f; - --light-color-button-hover: #23272f; - --light-color-border: #eeeeee; - --light-color-commit-did-not-render-fill: #cfd1d5; - --light-color-commit-did-not-render-fill-text: #000000; - --light-color-commit-did-not-render-pattern: #cfd1d5; - --light-color-commit-did-not-render-pattern-text: #333333; - --light-color-commit-gradient-0: #37afa9; - --light-color-commit-gradient-1: #63b19e; - --light-color-commit-gradient-2: #80b393; - --light-color-commit-gradient-3: #97b488; - --light-color-commit-gradient-4: #abb67d; - --light-color-commit-gradient-5: #beb771; - --light-color-commit-gradient-6: #cfb965; - --light-color-commit-gradient-7: #dfba57; - --light-color-commit-gradient-8: #efbb49; - --light-color-commit-gradient-9: #febc38; - --light-color-commit-gradient-text: #000000; - --light-color-component-name: #6a51b2; - --light-color-component-name-inverted: #ffffff; - --light-color-component-badge-background: rgba(0, 0, 0, 0.1); - --light-color-component-badge-background-inverted: rgba(255, 255, 255, 0.25); - --light-color-component-badge-count: #777d88; - --light-color-component-badge-count-inverted: rgba(255, 255, 255, 0.7); - --light-color-context-background: rgba(0,0,0,.9); - --light-color-context-background-hover: rgba(255, 255, 255, 0.1); - --light-color-context-background-selected: #178fb9; - --light-color-context-border: #3d424a; - --light-color-context-text: #ffffff; - --light-color-context-text-selected: #ffffff; - --light-color-dim: #777d88; - --light-color-dimmer: #cfd1d5; - --light-color-dimmest: #eff0f1; - --light-color-error-background: hsl(0, 100%, 97%); - --light-color-error-border: hsl(0, 100%, 92%); - --light-color-error-text: #ff0000; - --light-color-expand-collapse-toggle: #777d88; - --light-color-link: #0000ff; - --light-color-modal-background: rgba(255, 255, 255, 0.75); - --light-color-record-active: #fc3a4b; - --light-color-record-hover: #3578e5; - --light-color-record-inactive: #0088fa; - --light-color-scroll-thumb: #c2c2c2; - --light-color-scroll-track: #fafafa; - --light-color-search-match: yellow; - --light-color-search-match-current: #f7923b; - --light-color-selected-tree-highlight-active: rgba(0, 136, 250, 0.1); - --light-color-selected-tree-highlight-inactive: rgba(0, 0, 0, 0.05); - --light-color-shadow: rgba(0, 0, 0, 0.25); - --light-color-tab-selected-border: #0088fa; - --light-color-text: #000000; - --light-color-text-invalid: #ff0000; - --light-color-text-selected: #ffffff; - --light-color-toggle-background-invalid: #fc3a4b; - --light-color-toggle-background-on: #0088fa; - --light-color-toggle-background-off: #cfd1d5; - --light-color-toggle-text: #ffffff; - --light-color-tooltip-background: rgba(0, 0, 0, 0.9); - --light-color-tooltip-text: #ffffff; - - /* Dark theme */ - --dark-color-attribute-name: #9d87d2; - --dark-color-attribute-name-not-editable: #ededed; - --dark-color-attribute-name-inverted: #282828; - --dark-color-attribute-value: #cedae0; - --dark-color-attribute-value-inverted: #ffffff; - --dark-color-attribute-editable-value: yellow; - --dark-color-background: #282c34; - --dark-color-background-hover: rgba(255, 255, 255, 0.1); - --dark-color-background-inactive: #3d424a; - --dark-color-background-invalid: #5c0000; - --dark-color-background-selected: #178fb9; - --dark-color-button-background: #282c34; - --dark-color-button-background-focus: #3d424a; - --dark-color-button: #afb3b9; - --dark-color-button-active: #61dafb; - --dark-color-button-disabled: #4f5766; - --dark-color-button-focus: #a2e9fc; - --dark-color-button-hover: #ededed; - --dark-color-border: #3d424a; - --dark-color-commit-did-not-render-fill: #777d88; - --dark-color-commit-did-not-render-fill-text: #000000; - --dark-color-commit-did-not-render-pattern: #666c77; - --dark-color-commit-did-not-render-pattern-text: #ffffff; - --dark-color-commit-gradient-0: #37afa9; - --dark-color-commit-gradient-1: #63b19e; - --dark-color-commit-gradient-2: #80b393; - --dark-color-commit-gradient-3: #97b488; - --dark-color-commit-gradient-4: #abb67d; - --dark-color-commit-gradient-5: #beb771; - --dark-color-commit-gradient-6: #cfb965; - --dark-color-commit-gradient-7: #dfba57; - --dark-color-commit-gradient-8: #efbb49; - --dark-color-commit-gradient-9: #febc38; - --dark-color-commit-gradient-text: #000000; - --dark-color-component-name: #61dafb; - --dark-color-component-name-inverted: #282828; - --dark-color-component-badge-background: rgba(255, 255, 255, 0.25); - --dark-color-component-badge-background-inverted: rgba(0, 0, 0, 0.25); - --dark-color-component-badge-count: #8f949d; - --dark-color-component-badge-count-inverted: rgba(255, 255, 255, 0.7); - --dark-color-context-background: rgba(255,255,255,.9); - --dark-color-context-background-hover: rgba(0, 136, 250, 0.1); - --dark-color-context-background-selected: #0088fa; - --dark-color-context-border: #eeeeee; - --dark-color-context-text: #000000; - --dark-color-context-text-selected: #ffffff; - --dark-color-dim: #8f949d; - --dark-color-dimmer: #777d88; - --dark-color-dimmest: #4f5766; - --dark-color-error-background: #200; - --dark-color-error-border: #900; - --dark-color-error-text: #f55; - --dark-color-expand-collapse-toggle: #8f949d; - --dark-color-link: #61dafb; - --dark-color-modal-background: rgba(0, 0, 0, 0.75); - --dark-color-record-active: #fc3a4b; - --dark-color-record-hover: #a2e9fc; - --dark-color-record-inactive: #61dafb; - --dark-color-scroll-thumb: #afb3b9; - --dark-color-scroll-track: #313640; - --dark-color-search-match: yellow; - --dark-color-search-match-current: #f7923b; - --dark-color-selected-tree-highlight-active: rgba(23, 143, 185, 0.15); - --dark-color-selected-tree-highlight-inactive: rgba(255, 255, 255, 0.05); - --dark-color-shadow: rgba(0, 0, 0, 0.5); - --dark-color-tab-selected-border: #178fb9; - --dark-color-text: #ffffff; - --dark-color-text-invalid: #ff8080; - --dark-color-text-selected: #ffffff; - --dark-color-toggle-background-invalid: #fc3a4b; - --dark-color-toggle-background-on: #178fb9; - --dark-color-toggle-background-off: #777d88; - --dark-color-toggle-text: #ffffff; - --dark-color-tooltip-background: rgba(255, 255, 255, 0.9); - --dark-color-tooltip-text: #000000; - - /* Font smoothing */ - --light-font-smoothing: auto; - --dark-font-smoothing: antialiased; - --font-smoothing: auto; - - /* Compact density */ - --compact-font-size-monospace-small: 9px; - --compact-font-size-monospace-normal: 11px; - --compact-font-size-monospace-large: 15px; - --compact-font-size-sans-small: 10px; - --compact-font-size-sans-normal: 12px; - --compact-font-size-sans-large: 14px; - --compact-line-height-data: 18px; - --compact-root-font-size: 16px; - - /* Comfortable density */ - --comfortable-font-size-monospace-small: 10px; - --comfortable-font-size-monospace-normal: 13px; - --comfortable-font-size-monospace-large: 17px; - --comfortable-font-size-sans-small: 12px; - --comfortable-font-size-sans-normal: 14px; - --comfortable-font-size-sans-large: 16px; - --comfortable-line-height-data: 22px; - --comfortable-root-font-size: 20px; - - /* GitHub.com system fonts */ - --font-family-monospace: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, - Courier, monospace; - --font-family-sans: -apple-system, BlinkMacSystemFont, Segoe UI, Helvetica, - Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol; - - /* Constant values shared between JS and CSS */ - --interaction-commit-size: 10px; - --interaction-label-width: 200px; -} -`},function(i,u,f){"use strict";function c(x){var D=this;if(D instanceof c||(D=new c),D.tail=null,D.head=null,D.length=0,x&&typeof x.forEach=="function")x.forEach(function(j){D.push(j)});else if(arguments.length>0)for(var L=0,N=arguments.length;L1)L=D;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");N=this.head.next,L=this.head.value}for(var j=0;N!==null;j++)L=x(L,N.value,j),N=N.next;return L},c.prototype.reduceReverse=function(x,D){var L,N=this.tail;if(arguments.length>1)L=D;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");N=this.tail.prev,L=this.tail.value}for(var j=this.length-1;N!==null;j--)L=x(L,N.value,j),N=N.prev;return L},c.prototype.toArray=function(){for(var x=new Array(this.length),D=0,L=this.head;L!==null;D++)x[D]=L.value,L=L.next;return x},c.prototype.toArrayReverse=function(){for(var x=new Array(this.length),D=0,L=this.tail;L!==null;D++)x[D]=L.value,L=L.prev;return x},c.prototype.slice=function(x,D){(D=D||this.length)<0&&(D+=this.length),(x=x||0)<0&&(x+=this.length);var L=new c;if(Dthis.length&&(D=this.length);for(var N=0,j=this.head;j!==null&&Nthis.length&&(D=this.length);for(var N=this.length,j=this.tail;j!==null&&N>D;N--)j=j.prev;for(;j!==null&&N>x;N--,j=j.prev)L.push(j.value);return L},c.prototype.splice=function(x,D){x>this.length&&(x=this.length-1),x<0&&(x=this.length+x);for(var L=0,N=this.head;N!==null&&L=0&&(A._idleTimeoutId=setTimeout(function(){A._onTimeout&&A._onTimeout()},x))},f(14),u.setImmediate=typeof self!="undefined"&&self.setImmediate||c!==void 0&&c.setImmediate||this&&this.setImmediate,u.clearImmediate=typeof self!="undefined"&&self.clearImmediate||c!==void 0&&c.clearImmediate||this&&this.clearImmediate}).call(this,f(4))},function(i,u,f){(function(c,g){(function(t,C){"use strict";if(!t.setImmediate){var A,x,D,L,N,j=1,$={},h=!1,re=t.document,ce=Object.getPrototypeOf&&Object.getPrototypeOf(t);ce=ce&&ce.setTimeout?ce:t,{}.toString.call(t.process)==="[object process]"?A=function(Se){g.nextTick(function(){oe(Se)})}:function(){if(t.postMessage&&!t.importScripts){var Se=!0,me=t.onmessage;return t.onmessage=function(){Se=!1},t.postMessage("","*"),t.onmessage=me,Se}}()?(L="setImmediate$"+Math.random()+"$",N=function(Se){Se.source===t&&typeof Se.data=="string"&&Se.data.indexOf(L)===0&&oe(+Se.data.slice(L.length))},t.addEventListener?t.addEventListener("message",N,!1):t.attachEvent("onmessage",N),A=function(Se){t.postMessage(L+Se,"*")}):t.MessageChannel?((D=new MessageChannel).port1.onmessage=function(Se){oe(Se.data)},A=function(Se){D.port2.postMessage(Se)}):re&&"onreadystatechange"in re.createElement("script")?(x=re.documentElement,A=function(Se){var me=re.createElement("script");me.onreadystatechange=function(){oe(Se),me.onreadystatechange=null,x.removeChild(me),me=null},x.appendChild(me)}):A=function(Se){setTimeout(oe,0,Se)},ce.setImmediate=function(Se){typeof Se!="function"&&(Se=new Function(""+Se));for(var me=new Array(arguments.length-1),De=0;Dene;ne++)if((V=Q(Je,Ot,ne))!==-1){ce=ne,Ot=V;break e}Ot=-1}}e:{if(Je=Nt,(V=j().get(At.primitive))!==void 0){for(ne=0;neOt-Je?null:Nt.slice(Je,Ot-1))!==null){if(Ot=0,Le!==null){for(;OtOt;Le--)ot=Ue.pop()}for(Le=Nt.length-Ot-1;1<=Le;Le--)Ot=[],ot.push({id:null,isStateEditable:!1,name:Se(Nt[Le-1].functionName),value:void 0,subHooks:Ot}),Ue.push(ot),ot=Ot;Le=Nt}Ot=(Nt=At.primitive)==="Context"||Nt==="DebugValue"?null:ct++,ot.push({id:Ot,isStateEditable:Nt==="Reducer"||Nt==="State",name:Nt,value:At.value,subHooks:[]})}return function ge(Z,Ae){for(var at=[],it=0;it-1&&($=$.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""));var h=$.replace(/^\s+/,"").replace(/\(eval code/g,"("),re=h.match(/ (\((.+):(\d+):(\d+)\)$)/),ce=(h=re?h.replace(re[0],""):h).split(/\s+/).slice(1),Q=this.extractLocation(re?re[1]:ce.pop()),oe=ce.join(" ")||void 0,Se=["eval",""].indexOf(Q[0])>-1?void 0:Q[0];return new x({functionName:oe,fileName:Se,lineNumber:Q[1],columnNumber:Q[2],source:$})},this)},parseFFOrSafari:function(j){return j.stack.split(` -`).filter(function($){return!$.match(N)},this).map(function($){if($.indexOf(" > eval")>-1&&($=$.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),$.indexOf("@")===-1&&$.indexOf(":")===-1)return new x({functionName:$});var h=/((.*".+"[^@]*)?[^@]*)(?:@)/,re=$.match(h),ce=re&&re[1]?re[1]:void 0,Q=this.extractLocation($.replace(h,""));return new x({functionName:ce,fileName:Q[0],lineNumber:Q[1],columnNumber:Q[2],source:$})},this)},parseOpera:function(j){return!j.stacktrace||j.message.indexOf(` -`)>-1&&j.message.split(` -`).length>j.stacktrace.split(` -`).length?this.parseOpera9(j):j.stack?this.parseOpera11(j):this.parseOpera10(j)},parseOpera9:function(j){for(var $=/Line (\d+).*script (?:in )?(\S+)/i,h=j.message.split(` -`),re=[],ce=2,Q=h.length;ce/,"$2").replace(/\([^)]*\)/g,"")||void 0;Q.match(/\(([^)]*)\)/)&&(h=Q.replace(/^[^(]+\(([^)]*)\)$/,"$1"));var Se=h===void 0||h==="[arguments not available]"?void 0:h.split(",");return new x({functionName:oe,args:Se,fileName:ce[0],lineNumber:ce[1],columnNumber:ce[2],source:$})},this)}}})=="function"?c.apply(u,g):c)===void 0||(i.exports=t)})()},function(i,u,f){var c,g,t;(function(C,A){"use strict";g=[],(t=typeof(c=function(){function x(oe){return oe.charAt(0).toUpperCase()+oe.substring(1)}function D(oe){return function(){return this[oe]}}var L=["isConstructor","isEval","isNative","isToplevel"],N=["columnNumber","lineNumber"],j=["fileName","functionName","source"],$=L.concat(N,j,["args"]);function h(oe){if(oe)for(var Se=0;Se<$.length;Se++)oe[$[Se]]!==void 0&&this["set"+x($[Se])](oe[$[Se]])}h.prototype={getArgs:function(){return this.args},setArgs:function(oe){if(Object.prototype.toString.call(oe)!=="[object Array]")throw new TypeError("Args must be an Array");this.args=oe},getEvalOrigin:function(){return this.evalOrigin},setEvalOrigin:function(oe){if(oe instanceof h)this.evalOrigin=oe;else{if(!(oe instanceof Object))throw new TypeError("Eval Origin must be an Object or StackFrame");this.evalOrigin=new h(oe)}},toString:function(){var oe=this.getFileName()||"",Se=this.getLineNumber()||"",me=this.getColumnNumber()||"",De=this.getFunctionName()||"";return this.getIsEval()?oe?"[eval] ("+oe+":"+Se+":"+me+")":"[eval]:"+Se+":"+me:De?De+" ("+oe+":"+Se+":"+me+")":oe+":"+Se+":"+me}},h.fromString=function(oe){var Se=oe.indexOf("("),me=oe.lastIndexOf(")"),De=oe.substring(0,Se),J=oe.substring(Se+1,me).split(","),Te=oe.substring(me+1);if(Te.indexOf("@")===0)var Oe=/@(.+?)(?::(\d+))?(?::(\d+))?$/.exec(Te,""),Le=Oe[1],ot=Oe[2],ct=Oe[3];return new h({functionName:De,args:J||void 0,fileName:Le,lineNumber:ot||void 0,columnNumber:ct||void 0})};for(var re=0;re1?de-1:0),ve=1;ve=0&&de.splice(W,1)}}}])&&c(R.prototype,U),H&&c(R,H),F}(),t=f(2),C=f.n(t);try{var A=f(9).default,x=function(F){var R=new RegExp("".concat(F,": ([0-9]+)")),U=A.match(R);return parseInt(U[1],10)};x("comfortable-line-height-data"),x("compact-line-height-data")}catch(F){}function D(F){try{return sessionStorage.getItem(F)}catch(R){return null}}function L(F){try{sessionStorage.removeItem(F)}catch(R){}}function N(F,R){try{return sessionStorage.setItem(F,R)}catch(U){}}var j=function(F,R){return F===R},$=f(1),h=f.n($);function re(F){return F.ownerDocument?F.ownerDocument.defaultView:null}function ce(F){var R=re(F);return R?R.frameElement:null}function Q(F){var R=me(F);return oe([F.getBoundingClientRect(),{top:R.borderTop,left:R.borderLeft,bottom:R.borderBottom,right:R.borderRight,width:0,height:0}])}function oe(F){return F.reduce(function(R,U){return R==null?U:{top:R.top+U.top,left:R.left+U.left,width:R.width,height:R.height,bottom:R.bottom+U.bottom,right:R.right+U.right}})}function Se(F,R){var U=ce(F);if(U&&U!==R){for(var H=[F.getBoundingClientRect()],fe=U,ue=!1;fe;){var de=Q(fe);if(H.push(de),fe=ce(fe),ue)break;fe&&re(fe)===R&&(ue=!0)}return oe(H)}return F.getBoundingClientRect()}function me(F){var R=window.getComputedStyle(F);return{borderLeft:parseInt(R.borderLeftWidth,10),borderRight:parseInt(R.borderRightWidth,10),borderTop:parseInt(R.borderTopWidth,10),borderBottom:parseInt(R.borderBottomWidth,10),marginLeft:parseInt(R.marginLeft,10),marginRight:parseInt(R.marginRight,10),marginTop:parseInt(R.marginTop,10),marginBottom:parseInt(R.marginBottom,10),paddingLeft:parseInt(R.paddingLeft,10),paddingRight:parseInt(R.paddingRight,10),paddingTop:parseInt(R.paddingTop,10),paddingBottom:parseInt(R.paddingBottom,10)}}function De(F,R){var U;if(typeof Symbol=="undefined"||F[Symbol.iterator]==null){if(Array.isArray(F)||(U=function(ve,Fe){if(!!ve){if(typeof ve=="string")return J(ve,Fe);var Ge=Object.prototype.toString.call(ve).slice(8,-1);if(Ge==="Object"&&ve.constructor&&(Ge=ve.constructor.name),Ge==="Map"||Ge==="Set")return Array.from(ve);if(Ge==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Ge))return J(ve,Fe)}}(F))||R&&F&&typeof F.length=="number"){U&&(F=U);var H=0,fe=function(){};return{s:fe,n:function(){return H>=F.length?{done:!0}:{done:!1,value:F[H++]}},e:function(ve){throw ve},f:fe}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var ue,de=!0,W=!1;return{s:function(){U=F[Symbol.iterator]()},n:function(){var ve=U.next();return de=ve.done,ve},e:function(ve){W=!0,ue=ve},f:function(){try{de||U.return==null||U.return()}finally{if(W)throw ue}}}}function J(F,R){(R==null||R>F.length)&&(R=F.length);for(var U=0,H=new Array(R);Ude.left+de.width&&(K=de.left+de.width-Ge-5),{style:{top:ve+="px",left:K+="px"}}}(R,U,{width:H.width,height:H.height});h()(this.tip.style,fe.style)}}]),F}(),Ue=function(){function F(){Te(this,F);var R=window.__REACT_DEVTOOLS_TARGET_WINDOW__||window;this.window=R;var U=window.__REACT_DEVTOOLS_TARGET_WINDOW__||window;this.tipBoundsWindow=U;var H=R.document;this.container=H.createElement("div"),this.container.style.zIndex="10000000",this.tip=new ct(H,this.container),this.rects=[],H.body.appendChild(this.container)}return Le(F,[{key:"remove",value:function(){this.tip.remove(),this.rects.forEach(function(R){R.remove()}),this.rects.length=0,this.container.parentNode&&this.container.parentNode.removeChild(this.container)}},{key:"inspect",value:function(R,U){for(var H=this,fe=R.filter(function(Xe){return Xe.nodeType===Node.ELEMENT_NODE});this.rects.length>fe.length;)this.rects.pop().remove();if(fe.length!==0){for(;this.rects.length1&&arguments[1]!==void 0?arguments[1]:j,je=void 0,Xe=[],rt=void 0,st=!1,xt=function(lt,Rt){return xe(lt,Xe[Rt])},wt=function(){for(var lt=arguments.length,Rt=Array(lt),yn=0;yn5&&arguments[5]!==void 0?arguments[5]:0,W=cl(F);switch(W){case"html_element":return R.push(H),{inspectable:!1,preview_short:Mr(F,!1),preview_long:Mr(F,!0),name:F.tagName,type:W};case"function":return R.push(H),{inspectable:!1,preview_short:Mr(F,!1),preview_long:Mr(F,!0),name:typeof F.name!="function"&&F.name?F.name:"function",type:W};case"string":return F.length<=500?F:F.slice(0,500)+"...";case"bigint":case"symbol":return R.push(H),{inspectable:!1,preview_short:Mr(F,!1),preview_long:Mr(F,!0),name:F.toString(),type:W};case"react_element":return R.push(H),{inspectable:!1,preview_short:Mr(F,!1),preview_long:Mr(F,!0),name:al(F)||"Unknown",type:W};case"array_buffer":case"data_view":return R.push(H),{inspectable:!1,preview_short:Mr(F,!1),preview_long:Mr(F,!0),name:W==="data_view"?"DataView":"ArrayBuffer",size:F.byteLength,type:W};case"array":return ue=fe(H),de>=2&&!ue?yo(W,!0,F,R,H):F.map(function(Ge,K){return Ds(Ge,R,U,H.concat([K]),fe,ue?1:de+1)});case"html_all_collection":case"typed_array":case"iterator":if(ue=fe(H),de>=2&&!ue)return yo(W,!0,F,R,H);var ve={unserializable:!0,type:W,readonly:!0,size:W==="typed_array"?F.length:void 0,preview_short:Mr(F,!1),preview_long:Mr(F,!0),name:F.constructor&&F.constructor.name!=="Object"?F.constructor.name:""};return r0(F[Symbol.iterator])&&Array.from(F).forEach(function(Ge,K){return ve[K]=Ds(Ge,R,U,H.concat([K]),fe,ue?1:de+1)}),U.push(H),ve;case"opaque_iterator":return R.push(H),{inspectable:!1,preview_short:Mr(F,!1),preview_long:Mr(F,!0),name:F[Symbol.toStringTag],type:W};case"date":case"regexp":return R.push(H),{inspectable:!1,preview_short:Mr(F,!1),preview_long:Mr(F,!0),name:F.toString(),type:W};case"object":if(ue=fe(H),de>=2&&!ue)return yo(W,!0,F,R,H);var Fe={};return Es(F).forEach(function(Ge){var K=Ge.toString();Fe[K]=Ds(F[Ge],R,U,H.concat([K]),fe,ue?1:de+1)}),Fe;case"infinity":case"nan":case"undefined":return R.push(H),{type:W};default:return F}}function Mu(F){return(Mu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(R){return typeof R}:function(R){return R&&typeof Symbol=="function"&&R.constructor===Symbol&&R!==Symbol.prototype?"symbol":typeof R})(F)}function Gf(F){return function(R){if(Array.isArray(R))return iu(R)}(F)||function(R){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(R))return Array.from(R)}(F)||function(R,U){if(!!R){if(typeof R=="string")return iu(R,U);var H=Object.prototype.toString.call(R).slice(8,-1);if(H==="Object"&&R.constructor&&(H=R.constructor.name),H==="Map"||H==="Set")return Array.from(R);if(H==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(H))return iu(R,U)}}(F)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function iu(F,R){(R==null||R>F.length)&&(R=F.length);for(var U=0,H=new Array(R);UR.toString()?1:R.toString()>F.toString()?-1:0}function Es(F){for(var R=[],U=F,H=function(){var fe=[].concat(Gf(Object.keys(U)),Gf(Object.getOwnPropertySymbols(U))),ue=Object.getOwnPropertyDescriptors(U);fe.forEach(function(de){ue[de].enumerable&&R.push(de)}),U=Object.getPrototypeOf(U)};U!=null;)H();return R}function Uo(F){var R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"Anonymous",U=ou.get(F);if(U!=null)return U;var H=R;return typeof F.displayName=="string"?H=F.displayName:typeof F.name=="string"&&F.name!==""&&(H=F.name),ou.set(F,H),H}var sl=0;function Ss(){return++sl}function Cs(F){var R=ol.get(F);if(R!==void 0)return R;for(var U=new Array(F.length),H=0;H1&&arguments[1]!==void 0?arguments[1]:50;return F.length>R?F.substr(0,R)+"\u2026":F}function Mr(F,R){if(F!=null&&hasOwnProperty.call(F,Ci.type))return R?F[Ci.preview_long]:F[Ci.preview_short];switch(cl(F)){case"html_element":return"<".concat(Ui(F.tagName.toLowerCase())," />");case"function":return Ui("\u0192 ".concat(typeof F.name=="function"?"":F.name,"() {}"));case"string":return'"'.concat(F,'"');case"bigint":return Ui(F.toString()+"n");case"regexp":case"symbol":return Ui(F.toString());case"react_element":return"<".concat(Ui(al(F)||"Unknown")," />");case"array_buffer":return"ArrayBuffer(".concat(F.byteLength,")");case"data_view":return"DataView(".concat(F.buffer.byteLength,")");case"array":if(R){for(var U="",H=0;H0&&(U+=", "),!((U+=Mr(F[H],!1)).length>50));H++);return"[".concat(Ui(U),"]")}var fe=hasOwnProperty.call(F,Ci.size)?F[Ci.size]:F.length;return"Array(".concat(fe,")");case"typed_array":var ue="".concat(F.constructor.name,"(").concat(F.length,")");if(R){for(var de="",W=0;W0&&(de+=", "),!((de+=F[W]).length>50));W++);return"".concat(ue," [").concat(Ui(de),"]")}return ue;case"iterator":var ve=F.constructor.name;if(R){for(var Fe=Array.from(F),Ge="",K=0;K0&&(Ge+=", "),Array.isArray(xe)){var je=Mr(xe[0],!0),Xe=Mr(xe[1],!1);Ge+="".concat(je," => ").concat(Xe)}else Ge+=Mr(xe,!1);if(Ge.length>50)break}return"".concat(ve,"(").concat(F.size,") {").concat(Ui(Ge),"}")}return"".concat(ve,"(").concat(F.size,")");case"opaque_iterator":return F[Symbol.toStringTag];case"date":return F.toString();case"object":if(R){for(var rt=Es(F).sort(ul),st="",xt=0;xt0&&(st+=", "),(st+="".concat(wt.toString(),": ").concat(Mr(F[wt],!1))).length>50)break}return"{".concat(Ui(st),"}")}return"{\u2026}";case"boolean":case"number":case"infinity":case"nan":case"null":case"undefined":return F;default:try{return Ui(""+F)}catch(lt){return"unserializable"}}}var Ac=f(7);function of(F){return(of=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(R){return typeof R}:function(R){return R&&typeof Symbol=="function"&&R.constructor===Symbol&&R!==Symbol.prototype?"symbol":typeof R})(F)}function Ts(F,R){var U=Object.keys(F);if(Object.getOwnPropertySymbols){var H=Object.getOwnPropertySymbols(F);R&&(H=H.filter(function(fe){return Object.getOwnPropertyDescriptor(F,fe).enumerable})),U.push.apply(U,H)}return U}function xs(F){for(var R=1;R2&&arguments[2]!==void 0?arguments[2]:[];if(F!==null){var H=[],fe=[],ue=Ds(F,H,fe,U,R);return{data:ue,cleaned:H,unserializable:fe}}return null}function qo(F){var R,U,H=(R=F,U=new Set,JSON.stringify(R,function(de,W){if(of(W)==="object"&&W!==null){if(U.has(W))return;U.add(W)}return typeof W=="bigint"?W.toString()+"n":W})),fe=H===void 0?"undefined":H,ue=window.__REACT_DEVTOOLS_GLOBAL_HOOK__.clipboardCopyText;typeof ue=="function"?ue(fe).catch(function(de){}):Object(Ac.copy)(fe)}function kr(F,R){var U=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,H=R[U],fe=Array.isArray(F)?F.slice():xs({},F);return U+1===R.length?Array.isArray(fe)?fe.splice(H,1):delete fe[H]:fe[H]=kr(F[H],R,U+1),fe}function Fr(F,R,U){var H=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,fe=R[H],ue=Array.isArray(F)?F.slice():xs({},F);if(H+1===R.length){var de=U[H];ue[de]=ue[fe],Array.isArray(ue)?ue.splice(fe,1):delete ue[fe]}else ue[fe]=Fr(F[fe],R,U,H+1);return ue}function si(F,R,U){var H=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;if(H>=R.length)return U;var fe=R[H],ue=Array.isArray(F)?F.slice():xs({},F);return ue[fe]=si(F[fe],R,U,H+1),ue}var H0=f(8);function b0(F,R){var U=Object.keys(F);if(Object.getOwnPropertySymbols){var H=Object.getOwnPropertySymbols(F);R&&(H=H.filter(function(fe){return Object.getOwnPropertyDescriptor(F,fe).enumerable})),U.push.apply(U,H)}return U}function Bt(F){for(var R=1;R=F.length?{done:!0}:{done:!1,value:F[H++]}},e:function(ve){throw ve},f:fe}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var ue,de=!0,W=!1;return{s:function(){U=F[Symbol.iterator]()},n:function(){var ve=U.next();return de=ve.done,ve},e:function(ve){W=!0,ue=ve},f:function(){try{de||U.return==null||U.return()}finally{if(W)throw ue}}}}function As(F,R){if(F){if(typeof F=="string")return uu(F,R);var U=Object.prototype.toString.call(F).slice(8,-1);return U==="Object"&&F.constructor&&(U=F.constructor.name),U==="Map"||U==="Set"?Array.from(F):U==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(U)?uu(F,R):void 0}}function uu(F,R){(R==null||R>F.length)&&(R=F.length);for(var U=0,H=new Array(R);U0){var et=ue(X);if(et!=null){var Dt,bt=ks(du);try{for(bt.s();!(Dt=bt.n()).done;)if(Dt.value.test(et))return!0}catch(fn){bt.e(fn)}finally{bt.f()}}}if(Y!=null&&Yu.size>0){var Zt,qt=Y.fileName,Ut=ks(Yu);try{for(Ut.s();!(Zt=Ut.n()).done;)if(Zt.value.test(qt))return!0}catch(fn){Ut.e(fn)}finally{Ut.f()}}return!1}function Gr(X){var Y=X.type;switch(X.tag){case Xe:case ar:return 1;case je:case rn:return 5;case wt:return 6;case lt:return 11;case yn:return 7;case Rt:case sn:case xt:return 9;case Hn:case Cr:return 8;case He:return 12;case Qe:return 13;default:switch(de(Y)){case 60111:case"Symbol(react.concurrent_mode)":case"Symbol(react.async_mode)":return 9;case 60109:case"Symbol(react.provider)":return 2;case 60110:case"Symbol(react.context)":return 2;case 60108:case"Symbol(react.strict_mode)":return 9;case 60114:case"Symbol(react.profiler)":return 10;default:return 9}}}function ir(X){if(Co.has(X))return X;var Y=X.alternate;return Y!=null&&Co.has(Y)?Y:(Co.add(X),X)}window.__REACT_DEVTOOLS_COMPONENT_FILTERS__!=null?qs(window.__REACT_DEVTOOLS_COMPONENT_FILTERS__):qs([{type:1,value:7,isEnabled:!0}]);var L0=new Map,Y0=new Map,Co=new Set,$u=new Map,Vo=new Map,Rr=-1;function Jn(X){if(!L0.has(X)){var Y=Ss();L0.set(X,Y),Y0.set(Y,X)}return L0.get(X)}function ai(X){switch(Gr(X)){case 1:if(N0!==null){var Y=Jn(ir(X)),ye=Vr(X);ye!==null&&N0.set(Y,ye)}}}var o0={};function Vr(X){switch(Gr(X)){case 1:var Y=X.stateNode,ye=o0,he=o0;return Y!=null&&(Y.constructor&&Y.constructor.contextType!=null?he=Y.context:(ye=Y.context)&&Object.keys(ye).length===0&&(ye=o0)),[ye,he];default:return null}}function ff(X){switch(Gr(X)){case 1:if(N0!==null){var Y=Jn(ir(X)),ye=N0.has(Y)?N0.get(Y):null,he=Vr(X);if(ye==null||he==null)return null;var We=Ru(ye,2),et=We[0],Dt=We[1],bt=Ru(he,2),Zt=bt[0],qt=bt[1];if(Zt!==o0)return $0(et,Zt);if(qt!==o0)return Dt!==qt}}return null}function cf(X,Y){if(X==null||Y==null)return!1;if(Y.hasOwnProperty("baseState")&&Y.hasOwnProperty("memoizedState")&&Y.hasOwnProperty("next")&&Y.hasOwnProperty("queue"))for(;Y!==null;){if(Y.memoizedState!==X.memoizedState)return!0;Y=Y.next,X=X.next}return!1}function $0(X,Y){if(X==null||Y==null||Y.hasOwnProperty("baseState")&&Y.hasOwnProperty("memoizedState")&&Y.hasOwnProperty("next")&&Y.hasOwnProperty("queue"))return null;var ye,he=[],We=ks(new Set([].concat(c0(Object.keys(X)),c0(Object.keys(Y)))));try{for(We.s();!(ye=We.n()).done;){var et=ye.value;X[et]!==Y[et]&&he.push(et)}}catch(Dt){We.e(Dt)}finally{We.f()}return he}function K0(X,Y){switch(Y.tag){case Xe:case je:case rt:case Hn:case Cr:return(zo(Y)&K)===K;default:return X.memoizedProps!==Y.memoizedProps||X.memoizedState!==Y.memoizedState||X.ref!==Y.ref}}var ae=[],Be=[],Ie=[],ht=[],mt=new Map,wn=0,Gn=null;function $t(X){ae.push(X)}function X0(X){if(ae.length!==0||Be.length!==0||Ie.length!==0||Gn!==null||u0){var Y=Be.length+Ie.length+(Gn===null?0:1),ye=new Array(3+wn+(Y>0?2+Y:0)+ae.length),he=0;if(ye[he++]=R,ye[he++]=Rr,ye[he++]=wn,mt.forEach(function(bt,Zt){ye[he++]=Zt.length;for(var qt=Cs(Zt),Ut=0;Ut0){ye[he++]=2,ye[he++]=Y;for(var We=Be.length-1;We>=0;We--)ye[he++]=Be[We];for(var et=0;et0?X.forEach(function(Y){F.emit("operations",Y)}):(Fn!==null&&(zr=!0),F.getFiberRoots(R).forEach(function(Y){T0(Rr=Jn(ir(Y.current)),Y.current),u0&&Y.memoizedInteractions!=null&&(uo={changeDescriptions:To?new Map:null,durations:[],commitTime:Os()-v0,interactions:Array.from(Y.memoizedInteractions).map(function(ye){return Bt(Bt({},ye),{},{timestamp:ye.timestamp-v0})}),maxActualDuration:0,priorityLevel:null}),$r(Y.current,null,!1,!1),X0(),Rr=-1}))},getBestMatchForTrackedPath:function(){if(Fn===null||pi===null)return null;for(var X=pi;X!==null&&F0(X);)X=X.return;return X===null?null:{id:Jn(ir(X)),isFullMatch:Br===Fn.length-1}},getDisplayNameForFiberID:function(X){var Y=Y0.get(X);return Y!=null?ue(Y):null},getFiberIDForNative:function(X){var Y=arguments.length>1&&arguments[1]!==void 0&&arguments[1],ye=U.findFiberByHostInstance(X);if(ye!=null){if(Y)for(;ye!==null&&F0(ye);)ye=ye.return;return Jn(ir(ye))}return null},getInstanceAndStyle:function(X){var Y=null,ye=null,he=J0(X);return he!==null&&(Y=he.stateNode,he.memoizedProps!==null&&(ye=he.memoizedProps.style)),{instance:Y,style:ye}},getOwnersList:function(X){var Y=J0(X);if(Y==null)return null;var ye=Y._debugOwner,he=[{displayName:ue(Y)||"Anonymous",id:X,type:Gr(Y)}];if(ye)for(var We=ye;We!==null;)he.unshift({displayName:ue(We)||"Anonymous",id:Jn(ir(We)),type:Gr(We)}),We=We._debugOwner||null;return he},getPathForElement:function(X){var Y=Y0.get(X);if(Y==null)return null;for(var ye=[];Y!==null;)ye.push(Ai(Y)),Y=Y.return;return ye.reverse(),ye},getProfilingData:function(){var X=[];if(pu===null)throw Error("getProfilingData() called before any profiling data was recorded");return pu.forEach(function(Y,ye){var he=[],We=[],et=new Map,Dt=new Map,bt=so!==null&&so.get(ye)||"Unknown";C0!=null&&C0.forEach(function(Zt,qt){di!=null&&di.get(qt)===ye&&We.push([qt,Zt])}),Y.forEach(function(Zt,qt){var Ut=Zt.changeDescriptions,fn=Zt.durations,_t=Zt.interactions,_r=Zt.maxActualDuration,Wr=Zt.priorityLevel,Ar=Zt.commitTime,z=[];_t.forEach(function(s0){et.has(s0.id)||et.set(s0.id,s0),z.push(s0.id);var t0=Dt.get(s0.id);t0!=null?t0.push(qt):Dt.set(s0.id,[qt])});for(var dr=[],Or=[],Qn=0;Qn1?kn.set(Ut,fn-1):kn.delete(Ut),wr.delete(Zt)}(Rr),Yr(ye,!1))}else T0(Rr,ye),$r(ye,null,!1,!1);if(u0&&We){var bt=pu.get(Rr);bt!=null?bt.push(uo):pu.set(Rr,[uo])}X0(),oo&&F.emit("traceUpdates",Hi),Rr=-1},handleCommitFiberUnmount:function(X){Yr(X,!1)},inspectElement:function(X,Y){if(Tr(X)){if(Y!=null){R0(Y);var ye=null;return Y[0]==="hooks"&&(ye="hooks"),{id:X,type:"hydrated-path",path:Y,value:qi(Ti(S0,Y),Nr(null,ye),Y)}}return{id:X,type:"no-change"}}if(El=!1,S0!==null&&S0.id===X||(Q0={}),(S0=af(X))===null)return{id:X,type:"not-found"};Y!=null&&R0(Y),function(We){var et=We.hooks,Dt=We.id,bt=We.props,Zt=Y0.get(Dt);if(Zt!=null){var qt=Zt.elementType,Ut=Zt.stateNode,fn=Zt.tag,_t=Zt.type;switch(fn){case Xe:case ar:case rn:H.$r=Ut;break;case je:H.$r={hooks:et,props:bt,type:_t};break;case wt:H.$r={props:bt,type:_t.render};break;case Hn:case Cr:H.$r={props:bt,type:qt!=null&&qt.type!=null?qt.type:_t};break;default:H.$r=null}}else console.warn('Could not find Fiber with id "'.concat(Dt,'"'))}(S0);var he=Bt({},S0);return he.context=qi(he.context,Nr("context",null)),he.hooks=qi(he.hooks,Nr("hooks","hooks")),he.props=qi(he.props,Nr("props",null)),he.state=qi(he.state,Nr("state",null)),{id:X,type:"full-data",value:he}},logElementToConsole:function(X){var Y=Tr(X)?S0:af(X);if(Y!==null){var ye=typeof console.groupCollapsed=="function";ye&&console.groupCollapsed("[Click to expand] %c<".concat(Y.displayName||"Component"," />"),"color: var(--dom-tag-name-color); font-weight: normal;"),Y.props!==null&&console.log("Props:",Y.props),Y.state!==null&&console.log("State:",Y.state),Y.hooks!==null&&console.log("Hooks:",Y.hooks);var he=zs(X);he!==null&&console.log("Nodes:",he),Y.source!==null&&console.log("Location:",Y.source),(window.chrome||/firefox/i.test(navigator.userAgent))&&console.log("Right-click any value to save it as a global variable for further inspection."),ye&&console.groupEnd()}else console.warn('Could not find Fiber with id "'.concat(X,'"'))},prepareViewAttributeSource:function(X,Y){Tr(X)&&(window.$attribute=Ti(S0,Y))},prepareViewElementSource:function(X){var Y=Y0.get(X);if(Y!=null){var ye=Y.elementType,he=Y.tag,We=Y.type;switch(he){case Xe:case ar:case rn:case je:H.$type=We;break;case wt:H.$type=We.render;break;case Hn:case Cr:H.$type=ye!=null&&ye.type!=null?ye.type:We;break;default:H.$type=null}}else console.warn('Could not find Fiber with id "'.concat(X,'"'))},overrideSuspense:function(X,Y){if(typeof Eo!="function"||typeof So!="function")throw new Error("Expected overrideSuspense() to not get called for earlier React versions.");Y?(B0.add(X),B0.size===1&&Eo(hu)):(B0.delete(X),B0.size===0&&Eo(Cl));var ye=Y0.get(X);ye!=null&&So(ye)},overrideValueAtPath:function(X,Y,ye,he,We){var et=J0(Y);if(et!==null){var Dt=et.stateNode;switch(X){case"context":switch(he=he.slice(1),et.tag){case Xe:he.length===0?Dt.context=We:fl(Dt.context,he,We),Dt.forceUpdate()}break;case"hooks":typeof p0=="function"&&p0(et,ye,he,We);break;case"props":switch(et.tag){case Xe:et.pendingProps=si(Dt.props,he,We),Dt.forceUpdate();break;default:typeof xi=="function"&&xi(et,he,We)}break;case"state":switch(et.tag){case Xe:fl(Dt.state,he,We),Dt.forceUpdate()}}}},renamePath:function(X,Y,ye,he,We){var et=J0(Y);if(et!==null){var Dt=et.stateNode;switch(X){case"context":switch(he=he.slice(1),We=We.slice(1),et.tag){case Xe:he.length===0||ll(Dt.context,he,We),Dt.forceUpdate()}break;case"hooks":typeof ci=="function"&&ci(et,ye,he,We);break;case"props":Dt===null?typeof qr=="function"&&qr(et,he,We):(et.pendingProps=Fr(Dt.props,he,We),Dt.forceUpdate());break;case"state":ll(Dt.state,he,We),Dt.forceUpdate()}}},renderer:U,setTraceUpdatesEnabled:function(X){oo=X},setTrackedPath:lo,startProfiling:Sl,stopProfiling:function(){u0=!1,To=!1},storeAsGlobal:function(X,Y,ye){if(Tr(X)){var he=Ti(S0,Y),We="$reactTemp".concat(ye);window[We]=he,console.log(We),console.log(he)}},updateComponentFilters:function(X){if(u0)throw Error("Cannot modify filter preferences while profiling");F.getFiberRoots(R).forEach(function(Y){Rr=Jn(ir(Y.current)),m0(Y.current),Yr(Y.current,!1),Rr=-1}),qs(X),kn.clear(),F.getFiberRoots(R).forEach(function(Y){T0(Rr=Jn(ir(Y.current)),Y.current),$r(Y.current,null,!1,!1),X0(Y),Rr=-1})}}}var _n;function Nu(F){return(Nu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(R){return typeof R}:function(R){return R&&typeof Symbol=="function"&&R.constructor===Symbol&&R!==Symbol.prototype?"symbol":typeof R})(F)}function Wo(F,R,U){if(_n===void 0)try{throw Error()}catch(fe){var H=fe.stack.trim().match(/\n( *(at )?)/);_n=H&&H[1]||""}return` -`+_n+F}var su=!1;function Ps(F,R,U){if(!F||su)return"";var H,fe=Error.prepareStackTrace;Error.prepareStackTrace=void 0,su=!0;var ue=U.current;U.current=null;try{if(R){var de=function(){throw Error()};if(Object.defineProperty(de.prototype,"props",{set:function(){throw Error()}}),(typeof Reflect=="undefined"?"undefined":Nu(Reflect))==="object"&&Reflect.construct){try{Reflect.construct(de,[])}catch(xe){H=xe}Reflect.construct(F,[],de)}else{try{de.call()}catch(xe){H=xe}F.call(de.prototype)}}else{try{throw Error()}catch(xe){H=xe}F()}}catch(xe){if(xe&&H&&typeof xe.stack=="string"){for(var W=xe.stack.split(` -`),ve=H.stack.split(` -`),Fe=W.length-1,Ge=ve.length-1;Fe>=1&&Ge>=0&&W[Fe]!==ve[Ge];)Ge--;for(;Fe>=1&&Ge>=0;Fe--,Ge--)if(W[Fe]!==ve[Ge]){if(Fe!==1||Ge!==1)do if(Fe--,--Ge<0||W[Fe]!==ve[Ge])return` -`+W[Fe].replace(" at new "," at ");while(Fe>=1&&Ge>=0);break}}}finally{su=!1,Error.prepareStackTrace=fe,U.current=ue}var K=F?F.displayName||F.name:"";return K?Wo(K):""}function pl(F,R,U,H){return Ps(F,!1,H)}function Vf(F,R,U){var H=F.HostComponent,fe=F.LazyComponent,ue=F.SuspenseComponent,de=F.SuspenseListComponent,W=F.FunctionComponent,ve=F.IndeterminateComponent,Fe=F.SimpleMemoComponent,Ge=F.ForwardRef,K=F.Block,xe=F.ClassComponent;switch(R.tag){case H:return Wo(R.type);case fe:return Wo("Lazy");case ue:return Wo("Suspense");case de:return Wo("SuspenseList");case W:case ve:case Fe:return pl(R.type,0,0,U);case Ge:return pl(R.type.render,0,0,U);case K:return pl(R.type._render,0,0,U);case xe:return function(je,Xe,rt,st){return Ps(je,!0,st)}(R.type,0,0,U);default:return""}}function hl(F,R,U){try{var H="",fe=R;do H+=Vf(F,fe,U),fe=fe.return;while(fe);return H}catch(ue){return` -Error generating stack: `+ue.message+` -`+ue.stack}}function Bu(F,R){var U;if(typeof Symbol=="undefined"||F[Symbol.iterator]==null){if(Array.isArray(F)||(U=function(ve,Fe){if(!!ve){if(typeof ve=="string")return ju(ve,Fe);var Ge=Object.prototype.toString.call(ve).slice(8,-1);if(Ge==="Object"&&ve.constructor&&(Ge=ve.constructor.name),Ge==="Map"||Ge==="Set")return Array.from(ve);if(Ge==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Ge))return ju(ve,Fe)}}(F))||R&&F&&typeof F.length=="number"){U&&(F=U);var H=0,fe=function(){};return{s:fe,n:function(){return H>=F.length?{done:!0}:{done:!1,value:F[H++]}},e:function(ve){throw ve},f:fe}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var ue,de=!0,W=!1;return{s:function(){U=F[Symbol.iterator]()},n:function(){var ve=U.next();return de=ve.done,ve},e:function(ve){W=!0,ue=ve},f:function(){try{de||U.return==null||U.return()}finally{if(W)throw ue}}}}function ju(F,R){(R==null||R>F.length)&&(R=F.length);for(var U=0,H=new Array(R);U0?Fe[Fe.length-1]:null,xe=K!==null&&(ro.test(K)||Ms.test(K));if(!xe){var je,Xe=Bu(ml.values());try{for(Xe.s();!(je=Xe.n()).done;){var rt=je.value,st=rt.currentDispatcherRef,xt=rt.getCurrentFiber,wt=rt.workTagMap,lt=xt();if(lt!=null){var Rt=hl(wt,lt,st);Rt!==""&&Fe.push(Rt);break}}}catch(yn){Xe.e(yn)}finally{Xe.f()}}}catch(yn){}ue.apply(void 0,Fe)};de.__REACT_DEVTOOLS_ORIGINAL_METHOD__=ue,Uu[fe]=de}catch(W){}})}}function O0(F){return(O0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(R){return typeof R}:function(R){return R&&typeof Symbol=="function"&&R.constructor===Symbol&&R!==Symbol.prototype?"symbol":typeof R})(F)}function vl(F,R){for(var U=0;UF.length)&&(R=F.length);for(var U=0,H=new Array(R);U1?W-1:0),Fe=1;Fe0?K[K.length-1]:0),K.push(St),W.set(Ne,Fe(ft._topLevelWrapper));try{var Qt=He.apply(this,Qe);return K.pop(),Qt}catch(bn){throw K=[],bn}finally{if(K.length===0){var Cn=W.get(Ne);if(Cn===void 0)throw new Error("Expected to find root ID.");yn(Cn)}}},performUpdateIfNecessary:function(He,Qe){var Ne=Qe[0];if(P0(Ne)===9)return He.apply(this,Qe);var ft=Fe(Ne);K.push(ft);var St=ln(Ne);try{var Qt=He.apply(this,Qe),Cn=ln(Ne);return Ge(St,Cn)||Xe(Ne,ft,Cn),K.pop(),Qt}catch(p0){throw K=[],p0}finally{if(K.length===0){var bn=W.get(Ne);if(bn===void 0)throw new Error("Expected to find root ID.");yn(bn)}}},receiveComponent:function(He,Qe){var Ne=Qe[0];if(P0(Ne)===9)return He.apply(this,Qe);var ft=Fe(Ne);K.push(ft);var St=ln(Ne);try{var Qt=He.apply(this,Qe),Cn=ln(Ne);return Ge(St,Cn)||Xe(Ne,ft,Cn),K.pop(),Qt}catch(p0){throw K=[],p0}finally{if(K.length===0){var bn=W.get(Ne);if(bn===void 0)throw new Error("Expected to find root ID.");yn(bn)}}},unmountComponent:function(He,Qe){var Ne=Qe[0];if(P0(Ne)===9)return He.apply(this,Qe);var ft=Fe(Ne);K.push(ft);try{var St=He.apply(this,Qe);return K.pop(),function(Cn,bn){wt.push(bn),ue.delete(bn)}(0,ft),St}catch(Cn){throw K=[],Cn}finally{if(K.length===0){var Qt=W.get(Ne);if(Qt===void 0)throw new Error("Expected to find root ID.");yn(Qt)}}}}));var st=[],xt=new Map,wt=[],lt=0,Rt=null;function yn(He){if(st.length!==0||wt.length!==0||Rt!==null){var Qe=wt.length+(Rt===null?0:1),Ne=new Array(3+lt+(Qe>0?2+Qe:0)+st.length),ft=0;if(Ne[ft++]=R,Ne[ft++]=He,Ne[ft++]=lt,xt.forEach(function(Cn,bn){Ne[ft++]=bn.length;for(var p0=Cs(bn),h0=0;h00){Ne[ft++]=2,Ne[ft++]=Qe;for(var St=0;St"),"color: var(--dom-tag-name-color); font-weight: normal;"),Qe.props!==null&&console.log("Props:",Qe.props),Qe.state!==null&&console.log("State:",Qe.state),Qe.context!==null&&console.log("Context:",Qe.context);var ft=fe(He);ft!==null&&console.log("Node:",ft),(window.chrome||/firefox/i.test(navigator.userAgent))&&console.log("Right-click any value to save it as a global variable for further inspection."),Ne&&console.groupEnd()}else console.warn('Could not find element with id "'.concat(He,'"'))},overrideSuspense:function(){throw new Error("overrideSuspense not supported by this renderer")},overrideValueAtPath:function(He,Qe,Ne,ft,St){var Qt=ue.get(Qe);if(Qt!=null){var Cn=Qt._instance;if(Cn!=null)switch(He){case"context":fl(Cn.context,ft,St),a0(Cn);break;case"hooks":throw new Error("Hooks not supported by this renderer");case"props":var bn=Qt._currentElement;Qt._currentElement=V0(V0({},bn),{},{props:si(bn.props,ft,St)}),a0(Cn);break;case"state":fl(Cn.state,ft,St),a0(Cn)}}},renamePath:function(He,Qe,Ne,ft,St){var Qt=ue.get(Qe);if(Qt!=null){var Cn=Qt._instance;if(Cn!=null)switch(He){case"context":ll(Cn.context,ft,St),a0(Cn);break;case"hooks":throw new Error("Hooks not supported by this renderer");case"props":var bn=Qt._currentElement;Qt._currentElement=V0(V0({},bn),{},{props:Fr(bn.props,ft,St)}),a0(Cn);break;case"state":ll(Cn.state,ft,St),a0(Cn)}}},prepareViewAttributeSource:function(He,Qe){var Ne=Cr(He);Ne!==null&&(window.$attribute=Ti(Ne,Qe))},prepareViewElementSource:function(He){var Qe=ue.get(He);if(Qe!=null){var Ne=Qe._currentElement;Ne!=null?H.$type=Ne.type:console.warn('Could not find element with id "'.concat(He,'"'))}else console.warn('Could not find instance with id "'.concat(He,'"'))},renderer:U,setTraceUpdatesEnabled:function(He){},setTrackedPath:function(He){},startProfiling:function(){},stopProfiling:function(){},storeAsGlobal:function(He,Qe,Ne){var ft=Cr(He);if(ft!==null){var St=Ti(ft,Qe),Qt="$reactTemp".concat(Ne);window[Qt]=St,console.log(Qt),console.log(St)}},updateComponentFilters:function(He){}}}function nr(F,R){var U=!1,H={bottom:0,left:0,right:0,top:0},fe=R[F];if(fe!=null){for(var ue=0,de=Object.keys(H);ue0?"development":"production";var st=Function.prototype.toString;if(rt.Mount&&rt.Mount._renderNewRootComponent){var xt=st.call(rt.Mount._renderNewRootComponent);return xt.indexOf("function")!==0?"production":xt.indexOf("storedMeasure")!==-1?"development":xt.indexOf("should be a pure function")!==-1?xt.indexOf("NODE_ENV")!==-1||xt.indexOf("development")!==-1||xt.indexOf("true")!==-1?"development":xt.indexOf("nextElement")!==-1||xt.indexOf("nextComponent")!==-1?"unminified":"development":xt.indexOf("nextElement")!==-1||xt.indexOf("nextComponent")!==-1?"unminified":"outdated"}}catch(wt){}return"production"}(ve);try{var K=window.__REACT_DEVTOOLS_APPEND_COMPONENT_STACK__!==!1,xe=window.__REACT_DEVTOOLS_BREAK_ON_CONSOLE_ERRORS__===!0;(K||xe)&&(zi(ve),Ho({appendComponentStack:K,breakOnConsoleErrors:xe}))}catch(rt){}var je=F.__REACT_DEVTOOLS_ATTACH__;if(typeof je=="function"){var Xe=je(W,Fe,ve,F);W.rendererInterfaces.set(Fe,Xe)}return W.emit("renderer",{id:Fe,renderer:ve,reactBuildType:Ge}),Fe},on:function(ve,Fe){ue[ve]||(ue[ve]=[]),ue[ve].push(Fe)},off:function(ve,Fe){if(ue[ve]){var Ge=ue[ve].indexOf(Fe);Ge!==-1&&ue[ve].splice(Ge,1),ue[ve].length||delete ue[ve]}},sub:function(ve,Fe){return W.on(ve,Fe),function(){return W.off(ve,Fe)}},supportsFiber:!0,checkDCE:function(ve){try{Function.prototype.toString.call(ve).indexOf("^_^")>-1&&(U=!0,setTimeout(function(){throw new Error("React is running in production mode, but dead code elimination has not been applied. Read how to correctly configure React for production: https://reactjs.org/link/perf-use-production-build")}))}catch(Fe){}},onCommitFiberUnmount:function(ve,Fe){var Ge=fe.get(ve);Ge!=null&&Ge.handleCommitFiberUnmount(Fe)},onCommitFiberRoot:function(ve,Fe,Ge){var K=W.getFiberRoots(ve),xe=Fe.current,je=K.has(Fe),Xe=xe.memoizedState==null||xe.memoizedState.element==null;je||Xe?je&&Xe&&K.delete(Fe):K.add(Fe);var rt=fe.get(ve);rt!=null&&rt.handleCommitFiberRoot(Fe,Ge)}};Object.defineProperty(F,"__REACT_DEVTOOLS_GLOBAL_HOOK__",{configurable:!1,enumerable:!1,get:function(){return W}})})(window);var M0=window.__REACT_DEVTOOLS_GLOBAL_HOOK__,au=[{type:1,value:7,isEnabled:!0}];function Lr(F){if(M0!=null){var R=F||{},U=R.host,H=U===void 0?"localhost":U,fe=R.nativeStyleEditorValidAttributes,ue=R.useHttps,de=ue!==void 0&&ue,W=R.port,ve=W===void 0?8097:W,Fe=R.websocket,Ge=R.resolveRNStyle,K=Ge===void 0?null:Ge,xe=R.isAppActive,je=de?"wss":"ws",Xe=null;if((xe===void 0?function(){return!0}:xe)()){var rt=null,st=[],xt=je+"://"+H+":"+ve,wt=Fe||new window.WebSocket(xt);wt.onclose=function(){rt!==null&&rt.emit("shutdown"),lt()},wt.onerror=function(){lt()},wt.onmessage=function(Rt){var yn;try{if(typeof Rt.data!="string")throw Error();yn=JSON.parse(Rt.data)}catch(sn){return void console.error("[React DevTools] Failed to parse JSON: "+Rt.data)}st.forEach(function(sn){try{sn(yn)}catch(ar){throw console.log("[React DevTools] Error calling listener",yn),console.log("error:",ar),ar}})},wt.onopen=function(){(rt=new Do({listen:function(rn){return st.push(rn),function(){var Hn=st.indexOf(rn);Hn>=0&&st.splice(Hn,1)}},send:function(rn,Hn,d0){wt.readyState===wt.OPEN?wt.send(JSON.stringify({event:rn,payload:Hn})):(rt!==null&&rt.shutdown(),lt())}})).addListener("inspectElement",function(rn){var Hn=rn.id,d0=rn.rendererID,Cr=Rt.rendererInterfaces[d0];if(Cr!=null){var He=Cr.findNativeNodesForFiberID(Hn);He!=null&&He[0]!=null&&Rt.emit("showNativeHighlight",He[0])}}),rt.addListener("updateComponentFilters",function(rn){au=rn}),window.__REACT_DEVTOOLS_COMPONENT_FILTERS__==null&&rt.send("overrideComponentFilters",au);var Rt=new I0(rt);if(Rt.addListener("shutdown",function(){M0.emit("shutdown")}),function(rn,Hn,d0){if(rn==null)return function(){};var Cr=[rn.sub("renderer-attached",function(Ne){var ft=Ne.id,St=(Ne.renderer,Ne.rendererInterface);Hn.setRendererInterface(ft,St),St.flushInitialOperations()}),rn.sub("unsupported-renderer-version",function(Ne){Hn.onUnsupportedRenderer(Ne)}),rn.sub("operations",Hn.onHookOperations),rn.sub("traceUpdates",Hn.onTraceUpdates)],He=function(Ne,ft){var St=rn.rendererInterfaces.get(Ne);St==null&&(typeof ft.findFiberByHostInstance=="function"?St=uf(rn,Ne,ft,d0):ft.ComponentTree&&(St=lf(rn,Ne,ft,d0)),St!=null&&rn.rendererInterfaces.set(Ne,St)),St!=null?rn.emit("renderer-attached",{id:Ne,renderer:ft,rendererInterface:St}):rn.emit("unsupported-renderer-version",Ne)};rn.renderers.forEach(function(Ne,ft){He(ft,Ne)}),Cr.push(rn.sub("renderer",function(Ne){var ft=Ne.id,St=Ne.renderer;He(ft,St)})),rn.emit("react-devtools",Hn),rn.reactDevtoolsAgent=Hn;var Qe=function(){Cr.forEach(function(Ne){return Ne()}),rn.rendererInterfaces.forEach(function(Ne){Ne.cleanup()}),rn.reactDevtoolsAgent=null};Hn.addListener("shutdown",Qe),Cr.push(function(){Hn.removeListener("shutdown",Qe)})}(M0,Rt,window),K!=null||M0.resolveRNStyle!=null)Gu(rt,Rt,K||M0.resolveRNStyle,fe||M0.nativeStyleEditorValidAttributes||null);else{var yn,sn,ar=function(){rt!==null&&Gu(rt,Rt,yn,sn)};M0.hasOwnProperty("resolveRNStyle")||Object.defineProperty(M0,"resolveRNStyle",{enumerable:!1,get:function(){return yn},set:function(rn){yn=rn,ar()}}),M0.hasOwnProperty("nativeStyleEditorValidAttributes")||Object.defineProperty(M0,"nativeStyleEditorValidAttributes",{enumerable:!1,get:function(){return sn},set:function(rn){sn=rn,ar()}})}}}else lt()}function lt(){Xe===null&&(Xe=setTimeout(function(){return Lr(F)},2e3))}}}])})});var rS=Me(nS=>{"use strict";Object.defineProperty(nS,"__esModule",{value:!0});eS();var _j=tS();_j.connectToDevTools()});var lS=Me(x2=>{"use strict";var iS=x2&&x2.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(x2,"__esModule",{value:!0});var oS=Ay(),yj=iS(lE()),uS=iS(hc()),no=Xy();process.env.DEV==="true"&&rS();var sS=i=>{i==null||i.unsetMeasureFunc(),i==null||i.freeRecursive()};x2.default=yj.default({schedulePassiveEffects:oS.unstable_scheduleCallback,cancelPassiveEffects:oS.unstable_cancelCallback,now:Date.now,getRootHostContext:()=>({isInsideText:!1}),prepareForCommit:()=>{},resetAfterCommit:i=>{if(i.isStaticDirty){i.isStaticDirty=!1,typeof i.onImmediateRender=="function"&&i.onImmediateRender();return}typeof i.onRender=="function"&&i.onRender()},getChildHostContext:(i,u)=>{let f=i.isInsideText,c=u==="ink-text"||u==="ink-virtual-text";return f===c?i:{isInsideText:c}},shouldSetTextContent:()=>!1,createInstance:(i,u,f,c)=>{if(c.isInsideText&&i==="ink-box")throw new Error(" can\u2019t be nested inside component");let g=i==="ink-text"&&c.isInsideText?"ink-virtual-text":i,t=no.createNode(g);for(let[C,A]of Object.entries(u))C!=="children"&&(C==="style"?no.setStyle(t,A):C==="internal_transform"?t.internal_transform=A:C==="internal_static"?t.internal_static=!0:no.setAttribute(t,C,A));return t},createTextInstance:(i,u,f)=>{if(!f.isInsideText)throw new Error(`Text string "${i}" must be rendered inside component`);return no.createTextNode(i)},resetTextContent:()=>{},hideTextInstance:i=>{no.setTextNodeValue(i,"")},unhideTextInstance:(i,u)=>{no.setTextNodeValue(i,u)},getPublicInstance:i=>i,hideInstance:i=>{var u;(u=i.yogaNode)===null||u===void 0||u.setDisplay(uS.default.DISPLAY_NONE)},unhideInstance:i=>{var u;(u=i.yogaNode)===null||u===void 0||u.setDisplay(uS.default.DISPLAY_FLEX)},appendInitialChild:no.appendChildNode,appendChild:no.appendChildNode,insertBefore:no.insertBeforeNode,finalizeInitialChildren:(i,u,f,c)=>(i.internal_static&&(c.isStaticDirty=!0,c.staticNode=i),!1),supportsMutation:!0,appendChildToContainer:no.appendChildNode,insertInContainerBefore:no.insertBeforeNode,removeChildFromContainer:(i,u)=>{no.removeChildNode(i,u),sS(u.yogaNode)},prepareUpdate:(i,u,f,c,g)=>{i.internal_static&&(g.isStaticDirty=!0);let t={},C=Object.keys(c);for(let A of C)if(c[A]!==f[A]){if(A==="style"&&typeof c.style=="object"&&typeof f.style=="object"){let D=c.style,L=f.style,N=Object.keys(D);for(let j of N){if(j==="borderStyle"||j==="borderColor"){if(typeof t.style!="object"){let $={};t.style=$}t.style.borderStyle=D.borderStyle,t.style.borderColor=D.borderColor}if(D[j]!==L[j]){if(typeof t.style!="object"){let $={};t.style=$}t.style[j]=D[j]}}continue}t[A]=c[A]}return t},commitUpdate:(i,u)=>{for(let[f,c]of Object.entries(u))f!=="children"&&(f==="style"?no.setStyle(i,c):f==="internal_transform"?i.internal_transform=c:f==="internal_static"?i.internal_static=!0:no.setAttribute(i,f,c))},commitTextUpdate:(i,u,f)=>{no.setTextNodeValue(i,f)},removeChild:(i,u)=>{no.removeChildNode(i,u),sS(u.yogaNode)}})});var cS=Me((Jb,fS)=>{"use strict";fS.exports=(i,u=1,f)=>{if(f=dt({indent:" ",includeEmptyLines:!1},f),typeof i!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof i}\``);if(typeof u!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof u}\``);if(typeof f.indent!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof f.indent}\``);if(u===0)return i;let c=f.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return i.replace(c,f.indent.repeat(u))}});var aS=Me(k2=>{"use strict";var wj=k2&&k2.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(k2,"__esModule",{value:!0});var Vh=wj(hc());k2.default=i=>i.getComputedWidth()-i.getComputedPadding(Vh.default.EDGE_LEFT)-i.getComputedPadding(Vh.default.EDGE_RIGHT)-i.getComputedBorder(Vh.default.EDGE_LEFT)-i.getComputedBorder(Vh.default.EDGE_RIGHT)});var pS=Me((Zb,dS)=>{dS.exports={single:{topLeft:"\u250C",topRight:"\u2510",bottomRight:"\u2518",bottomLeft:"\u2514",vertical:"\u2502",horizontal:"\u2500"},double:{topLeft:"\u2554",topRight:"\u2557",bottomRight:"\u255D",bottomLeft:"\u255A",vertical:"\u2551",horizontal:"\u2550"},round:{topLeft:"\u256D",topRight:"\u256E",bottomRight:"\u256F",bottomLeft:"\u2570",vertical:"\u2502",horizontal:"\u2500"},bold:{topLeft:"\u250F",topRight:"\u2513",bottomRight:"\u251B",bottomLeft:"\u2517",vertical:"\u2503",horizontal:"\u2501"},singleDouble:{topLeft:"\u2553",topRight:"\u2556",bottomRight:"\u255C",bottomLeft:"\u2559",vertical:"\u2551",horizontal:"\u2500"},doubleSingle:{topLeft:"\u2552",topRight:"\u2555",bottomRight:"\u255B",bottomLeft:"\u2558",vertical:"\u2502",horizontal:"\u2550"},classic:{topLeft:"+",topRight:"+",bottomRight:"+",bottomLeft:"+",vertical:"|",horizontal:"-"}}});var mS=Me((eG,m3)=>{"use strict";var hS=pS();m3.exports=hS;m3.exports.default=hS});var gS=Me((tG,vS)=>{"use strict";vS.exports=(i,u=process.argv)=>{let f=i.startsWith("-")?"":i.length===1?"-":"--",c=u.indexOf(f+i),g=u.indexOf("--");return c!==-1&&(g===-1||c{"use strict";var Dj=require("os"),yS=require("tty"),Pu=gS(),{env:oi}=process,qf;Pu("no-color")||Pu("no-colors")||Pu("color=false")||Pu("color=never")?qf=0:(Pu("color")||Pu("colors")||Pu("color=true")||Pu("color=always"))&&(qf=1);"FORCE_COLOR"in oi&&(oi.FORCE_COLOR==="true"?qf=1:oi.FORCE_COLOR==="false"?qf=0:qf=oi.FORCE_COLOR.length===0?1:Math.min(parseInt(oi.FORCE_COLOR,10),3));function v3(i){return i===0?!1:{level:i,hasBasic:!0,has256:i>=2,has16m:i>=3}}function g3(i,u){if(qf===0)return 0;if(Pu("color=16m")||Pu("color=full")||Pu("color=truecolor"))return 3;if(Pu("color=256"))return 2;if(i&&!u&&qf===void 0)return 0;let f=qf||0;if(oi.TERM==="dumb")return f;if(process.platform==="win32"){let c=Dj.release().split(".");return Number(c[0])>=10&&Number(c[2])>=10586?Number(c[2])>=14931?3:2:1}if("CI"in oi)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(c=>c in oi)||oi.CI_NAME==="codeship"?1:f;if("TEAMCITY_VERSION"in oi)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(oi.TEAMCITY_VERSION)?1:0;if("GITHUB_ACTIONS"in oi)return 1;if(oi.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in oi){let c=parseInt((oi.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(oi.TERM_PROGRAM){case"iTerm.app":return c>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(oi.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(oi.TERM)||"COLORTERM"in oi?1:f}function Ej(i){let u=g3(i,i&&i.isTTY);return v3(u)}_S.exports={supportsColor:Ej,stdout:v3(g3(!0,yS.isatty(1))),stderr:v3(g3(!0,yS.isatty(2)))}});var ES=Me((rG,DS)=>{"use strict";var Sj=(i,u,f)=>{let c=i.indexOf(u);if(c===-1)return i;let g=u.length,t=0,C="";do C+=i.substr(t,c-t)+u+f,t=c+g,c=i.indexOf(u,t);while(c!==-1);return C+=i.substr(t),C},Cj=(i,u,f,c)=>{let g=0,t="";do{let C=i[c-1]==="\r";t+=i.substr(g,(C?c-1:c)-g)+u+(C?`\r -`:` -`)+f,g=c+1,c=i.indexOf(` -`,g)}while(c!==-1);return t+=i.substr(g),t};DS.exports={stringReplaceAll:Sj,stringEncaseCRLFWithFirstIndex:Cj}});var kS=Me((iG,SS)=>{"use strict";var Tj=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,CS=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,xj=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,kj=/\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi,Aj=new Map([["n",` -`],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e",""],["a","\x07"]]);function TS(i){let u=i[0]==="u",f=i[1]==="{";return u&&!f&&i.length===5||i[0]==="x"&&i.length===3?String.fromCharCode(parseInt(i.slice(1),16)):u&&f?String.fromCodePoint(parseInt(i.slice(2,-1),16)):Aj.get(i)||i}function Oj(i,u){let f=[],c=u.trim().split(/\s*,\s*/g),g;for(let t of c){let C=Number(t);if(!Number.isNaN(C))f.push(C);else if(g=t.match(xj))f.push(g[2].replace(kj,(A,x,D)=>x?TS(x):D));else throw new Error(`Invalid Chalk template style argument: ${t} (in style '${i}')`)}return f}function Ij(i){CS.lastIndex=0;let u=[],f;for(;(f=CS.exec(i))!==null;){let c=f[1];if(f[2]){let g=Oj(c,f[2]);u.push([c].concat(g))}else u.push([c])}return u}function xS(i,u){let f={};for(let g of u)for(let t of g.styles)f[t[0]]=g.inverse?null:t.slice(1);let c=i;for(let[g,t]of Object.entries(f))if(!!Array.isArray(t)){if(!(g in c))throw new Error(`Unknown Chalk style: ${g}`);c=t.length>0?c[g](...t):c[g]}return c}SS.exports=(i,u)=>{let f=[],c=[],g=[];if(u.replace(Tj,(t,C,A,x,D,L)=>{if(C)g.push(TS(C));else if(x){let N=g.join("");g=[],c.push(f.length===0?N:xS(i,f)(N)),f.push({inverse:A,styles:Ij(x)})}else if(D){if(f.length===0)throw new Error("Found extraneous } in Chalk template literal");c.push(xS(i,f)(g.join(""))),g=[],f.pop()}else g.push(L)}),c.push(g.join("")),f.length>0){let t=`Chalk template literal is missing ${f.length} closing bracket${f.length===1?"":"s"} (\`}\`)`;throw new Error(t)}return c.join("")}});var Jh=Me((oG,AS)=>{"use strict";var A2=Rh(),{stdout:_3,stderr:y3}=wS(),{stringReplaceAll:Pj,stringEncaseCRLFWithFirstIndex:Mj}=ES(),{isArray:Yh}=Array,OS=["ansi","ansi","ansi256","ansi16m"],ka=Object.create(null),Fj=(i,u={})=>{if(u.level&&!(Number.isInteger(u.level)&&u.level>=0&&u.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let f=_3?_3.level:0;i.level=u.level===void 0?f:u.level},IS=class{constructor(u){return PS(u)}},PS=i=>{let u={};return Fj(u,i),u.template=(...f)=>MS(u.template,...f),Object.setPrototypeOf(u,$h.prototype),Object.setPrototypeOf(u.template,u),u.template.constructor=()=>{throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")},u.template.Instance=IS,u.template};function $h(i){return PS(i)}for(let[i,u]of Object.entries(A2))ka[i]={get(){let f=Kh(this,w3(u.open,u.close,this._styler),this._isEmpty);return Object.defineProperty(this,i,{value:f}),f}};ka.visible={get(){let i=Kh(this,this._styler,!0);return Object.defineProperty(this,"visible",{value:i}),i}};var LS=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(let i of LS)ka[i]={get(){let{level:u}=this;return function(...f){let c=w3(A2.color[OS[u]][i](...f),A2.color.close,this._styler);return Kh(this,c,this._isEmpty)}}};for(let i of LS){let u="bg"+i[0].toUpperCase()+i.slice(1);ka[u]={get(){let{level:f}=this;return function(...c){let g=w3(A2.bgColor[OS[f]][i](...c),A2.bgColor.close,this._styler);return Kh(this,g,this._isEmpty)}}}}var Lj=Object.defineProperties(()=>{},zn(dt({},ka),{level:{enumerable:!0,get(){return this._generator.level},set(i){this._generator.level=i}}})),w3=(i,u,f)=>{let c,g;return f===void 0?(c=i,g=u):(c=f.openAll+i,g=u+f.closeAll),{open:i,close:u,openAll:c,closeAll:g,parent:f}},Kh=(i,u,f)=>{let c=(...g)=>Yh(g[0])&&Yh(g[0].raw)?RS(c,MS(c,...g)):RS(c,g.length===1?""+g[0]:g.join(" "));return Object.setPrototypeOf(c,Lj),c._generator=i,c._styler=u,c._isEmpty=f,c},RS=(i,u)=>{if(i.level<=0||!u)return i._isEmpty?"":u;let f=i._styler;if(f===void 0)return u;let{openAll:c,closeAll:g}=f;if(u.indexOf("")!==-1)for(;f!==void 0;)u=Pj(u,f.close,f.open),f=f.parent;let t=u.indexOf(` -`);return t!==-1&&(u=Mj(u,g,c,t)),c+u+g},D3,MS=(i,...u)=>{let[f]=u;if(!Yh(f)||!Yh(f.raw))return u.join(" ");let c=u.slice(1),g=[f.raw[0]];for(let t=1;t{"use strict";var Rj=O2&&O2.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(O2,"__esModule",{value:!0});var I2=Rj(Jh()),Nj=/^(rgb|hsl|hsv|hwb)\(\s?(\d+),\s?(\d+),\s?(\d+)\s?\)$/,Bj=/^(ansi|ansi256)\(\s?(\d+)\s?\)$/,Qh=(i,u)=>u==="foreground"?i:"bg"+i[0].toUpperCase()+i.slice(1);O2.default=(i,u,f)=>{if(!u)return i;if(u in I2.default){let g=Qh(u,f);return I2.default[g](i)}if(u.startsWith("#")){let g=Qh("hex",f);return I2.default[g](u)(i)}if(u.startsWith("ansi")){let g=Bj.exec(u);if(!g)return i;let t=Qh(g[1],f),C=Number(g[2]);return I2.default[t](C)(i)}if(u.startsWith("rgb")||u.startsWith("hsl")||u.startsWith("hsv")||u.startsWith("hwb")){let g=Nj.exec(u);if(!g)return i;let t=Qh(g[1],f),C=Number(g[2]),A=Number(g[3]),x=Number(g[4]);return I2.default[t](C,A,x)(i)}return i}});var BS=Me(P2=>{"use strict";var NS=P2&&P2.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(P2,"__esModule",{value:!0});var jj=NS(mS()),S3=NS(E3());P2.default=(i,u,f,c)=>{if(typeof f.style.borderStyle=="string"){let g=f.yogaNode.getComputedWidth(),t=f.yogaNode.getComputedHeight(),C=f.style.borderColor,A=jj.default[f.style.borderStyle],x=S3.default(A.topLeft+A.horizontal.repeat(g-2)+A.topRight,C,"foreground"),D=(S3.default(A.vertical,C,"foreground")+` -`).repeat(t-2),L=S3.default(A.bottomLeft+A.horizontal.repeat(g-2)+A.bottomRight,C,"foreground");c.write(i,u,x,{transformers:[]}),c.write(i,u+1,D,{transformers:[]}),c.write(i+g-1,u+1,D,{transformers:[]}),c.write(i,u+t-1,L,{transformers:[]})}}});var US=Me(M2=>{"use strict";var _c=M2&&M2.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(M2,"__esModule",{value:!0});var Uj=_c(hc()),qj=_c(jy()),zj=_c(cS()),Wj=_c(Yy()),Hj=_c(aS()),bj=_c(Ky()),Gj=_c(BS()),Vj=(i,u)=>{var f;let c=(f=i.childNodes[0])===null||f===void 0?void 0:f.yogaNode;if(c){let g=c.getComputedLeft(),t=c.getComputedTop();u=` -`.repeat(t)+zj.default(u,g)}return u},jS=(i,u,f)=>{var c;let{offsetX:g=0,offsetY:t=0,transformers:C=[],skipStaticElements:A}=f;if(A&&i.internal_static)return;let{yogaNode:x}=i;if(x){if(x.getDisplay()===Uj.default.DISPLAY_NONE)return;let D=g+x.getComputedLeft(),L=t+x.getComputedTop(),N=C;if(typeof i.internal_transform=="function"&&(N=[i.internal_transform,...C]),i.nodeName==="ink-text"){let j=bj.default(i);if(j.length>0){let $=qj.default(j),h=Hj.default(x);if($>h){let re=(c=i.style.textWrap)!==null&&c!==void 0?c:"wrap";j=Wj.default(j,h,re)}j=Vj(i,j),u.write(D,L,j,{transformers:N})}return}if(i.nodeName==="ink-box"&&Gj.default(D,L,i,u),i.nodeName==="ink-root"||i.nodeName==="ink-box")for(let j of i.childNodes)jS(j,u,{offsetX:D,offsetY:L,transformers:N,skipStaticElements:A})}};M2.default=jS});var zS=Me((fG,qS)=>{"use strict";qS.exports=i=>{i=Object.assign({onlyFirst:!1},i);let u=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(u,i.onlyFirst?void 0:"g")}});var HS=Me((cG,C3)=>{"use strict";var Yj=zS(),WS=i=>typeof i=="string"?i.replace(Yj(),""):i;C3.exports=WS;C3.exports.default=WS});var VS=Me((aG,bS)=>{"use strict";var GS="[\uD800-\uDBFF][\uDC00-\uDFFF]";bS.exports=i=>i&&i.exact?new RegExp(`^${GS}$`):new RegExp(GS,"g")});var $S=Me((dG,T3)=>{"use strict";var $j=HS(),Kj=VS(),YS=i=>$j(i).replace(Kj()," ").length;T3.exports=YS;T3.exports.default=YS});var QS=Me(F2=>{"use strict";var KS=F2&&F2.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(F2,"__esModule",{value:!0});var XS=KS(Gy()),Xj=KS($S()),JS=class{constructor(u){this.writes=[];let{width:f,height:c}=u;this.width=f,this.height=c}write(u,f,c,g){let{transformers:t}=g;!c||this.writes.push({x:u,y:f,text:c,transformers:t})}get(){let u=[];for(let c=0;cc.trimRight()).join(` -`),height:u.length}}};F2.default=JS});var t5=Me(L2=>{"use strict";var x3=L2&&L2.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(L2,"__esModule",{value:!0});var Jj=x3(hc()),ZS=x3(US()),e5=x3(QS());L2.default=(i,u)=>{var f;if(i.yogaNode.setWidth(u),i.yogaNode){i.yogaNode.calculateLayout(void 0,void 0,Jj.default.DIRECTION_LTR);let c=new e5.default({width:i.yogaNode.getComputedWidth(),height:i.yogaNode.getComputedHeight()});ZS.default(i,c,{skipStaticElements:!0});let g;((f=i.staticNode)===null||f===void 0?void 0:f.yogaNode)&&(g=new e5.default({width:i.staticNode.yogaNode.getComputedWidth(),height:i.staticNode.yogaNode.getComputedHeight()}),ZS.default(i.staticNode,g,{skipStaticElements:!1}));let{output:t,height:C}=c.get();return{output:t,outputHeight:C,staticOutput:g?`${g.get().output} -`:""}}return{output:"",outputHeight:0,staticOutput:""}}});var o5=Me((mG,n5)=>{"use strict";var r5=require("stream"),i5=["assert","count","countReset","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","table","time","timeEnd","timeLog","trace","warn"],k3={},Qj=i=>{let u=new r5.PassThrough,f=new r5.PassThrough;u.write=g=>i("stdout",g),f.write=g=>i("stderr",g);let c=new console.Console(u,f);for(let g of i5)k3[g]=console[g],console[g]=c[g];return()=>{for(let g of i5)console[g]=k3[g];k3={}}};n5.exports=Qj});var O3=Me(A3=>{"use strict";Object.defineProperty(A3,"__esModule",{value:!0});A3.default=new WeakMap});var P3=Me(I3=>{"use strict";Object.defineProperty(I3,"__esModule",{value:!0});var Zj=lr(),u5=Zj.createContext({exit:()=>{}});u5.displayName="InternalAppContext";I3.default=u5});var F3=Me(M3=>{"use strict";Object.defineProperty(M3,"__esModule",{value:!0});var eU=lr(),s5=eU.createContext({stdin:void 0,setRawMode:()=>{},isRawModeSupported:!1,internal_exitOnCtrlC:!0});s5.displayName="InternalStdinContext";M3.default=s5});var R3=Me(L3=>{"use strict";Object.defineProperty(L3,"__esModule",{value:!0});var tU=lr(),l5=tU.createContext({stdout:void 0,write:()=>{}});l5.displayName="InternalStdoutContext";L3.default=l5});var B3=Me(N3=>{"use strict";Object.defineProperty(N3,"__esModule",{value:!0});var nU=lr(),f5=nU.createContext({stderr:void 0,write:()=>{}});f5.displayName="InternalStderrContext";N3.default=f5});var Zh=Me(j3=>{"use strict";Object.defineProperty(j3,"__esModule",{value:!0});var rU=lr(),c5=rU.createContext({activeId:void 0,add:()=>{},remove:()=>{},activate:()=>{},deactivate:()=>{},enableFocus:()=>{},disableFocus:()=>{},focusNext:()=>{},focusPrevious:()=>{}});c5.displayName="InternalFocusContext";j3.default=c5});var d5=Me((EG,a5)=>{"use strict";var iU=/[|\\{}()[\]^$+*?.-]/g;a5.exports=i=>{if(typeof i!="string")throw new TypeError("Expected a string");return i.replace(iU,"\\$&")}});var v5=Me((SG,p5)=>{"use strict";var oU=d5(),h5=[].concat(require("module").builtinModules,"bootstrap_node","node").map(i=>new RegExp(`(?:\\(${i}\\.js:\\d+:\\d+\\)$|^\\s*at ${i}\\.js:\\d+:\\d+$)`));h5.push(/\(internal\/[^:]+:\d+:\d+\)$/,/\s*at internal\/[^:]+:\d+:\d+$/,/\/\.node-spawn-wrap-\w+-\w+\/node:\d+:\d+\)?$/);var em=class{constructor(u){u=dt({ignoredPackages:[]},u),"internals"in u||(u.internals=em.nodeInternals()),"cwd"in u||(u.cwd=process.cwd()),this._cwd=u.cwd.replace(/\\/g,"/"),this._internals=[].concat(u.internals,uU(u.ignoredPackages)),this._wrapCallSite=u.wrapCallSite||!1}static nodeInternals(){return[...h5]}clean(u,f=0){f=" ".repeat(f),Array.isArray(u)||(u=u.split(` -`)),!/^\s*at /.test(u[0])&&/^\s*at /.test(u[1])&&(u=u.slice(1));let c=!1,g=null,t=[];return u.forEach(C=>{if(C=C.replace(/\\/g,"/"),this._internals.some(x=>x.test(C)))return;let A=/^\s*at /.test(C);c?C=C.trimEnd().replace(/^(\s+)at /,"$1"):(C=C.trim(),A&&(C=C.slice(3))),C=C.replace(`${this._cwd}/`,""),C&&(A?(g&&(t.push(g),g=null),t.push(C)):(c=!0,g=C))}),t.map(C=>`${f}${C} -`).join("")}captureString(u,f=this.captureString){typeof u=="function"&&(f=u,u=Infinity);let{stackTraceLimit:c}=Error;u&&(Error.stackTraceLimit=u);let g={};Error.captureStackTrace(g,f);let{stack:t}=g;return Error.stackTraceLimit=c,this.clean(t)}capture(u,f=this.capture){typeof u=="function"&&(f=u,u=Infinity);let{prepareStackTrace:c,stackTraceLimit:g}=Error;Error.prepareStackTrace=(A,x)=>this._wrapCallSite?x.map(this._wrapCallSite):x,u&&(Error.stackTraceLimit=u);let t={};Error.captureStackTrace(t,f);let{stack:C}=t;return Object.assign(Error,{prepareStackTrace:c,stackTraceLimit:g}),C}at(u=this.at){let[f]=this.capture(1,u);if(!f)return{};let c={line:f.getLineNumber(),column:f.getColumnNumber()};m5(c,f.getFileName(),this._cwd),f.isConstructor()&&(c.constructor=!0),f.isEval()&&(c.evalOrigin=f.getEvalOrigin()),f.isNative()&&(c.native=!0);let g;try{g=f.getTypeName()}catch(A){}g&&g!=="Object"&&g!=="[object Object]"&&(c.type=g);let t=f.getFunctionName();t&&(c.function=t);let C=f.getMethodName();return C&&t!==C&&(c.method=C),c}parseLine(u){let f=u&&u.match(sU);if(!f)return null;let c=f[1]==="new",g=f[2],t=f[3],C=f[4],A=Number(f[5]),x=Number(f[6]),D=f[7],L=f[8],N=f[9],j=f[10]==="native",$=f[11]===")",h,re={};if(L&&(re.line=Number(L)),N&&(re.column=Number(N)),$&&D){let ce=0;for(let Q=D.length-1;Q>0;Q--)if(D.charAt(Q)===")")ce++;else if(D.charAt(Q)==="("&&D.charAt(Q-1)===" "&&(ce--,ce===-1&&D.charAt(Q-1)===" ")){let oe=D.slice(0,Q-1);D=D.slice(Q+1),g+=` (${oe}`;break}}if(g){let ce=g.match(lU);ce&&(g=ce[1],h=ce[2])}return m5(re,D,this._cwd),c&&(re.constructor=!0),t&&(re.evalOrigin=t,re.evalLine=A,re.evalColumn=x,re.evalFile=C&&C.replace(/\\/g,"/")),j&&(re.native=!0),g&&(re.function=g),h&&g!==h&&(re.method=h),re}};function m5(i,u,f){u&&(u=u.replace(/\\/g,"/"),u.startsWith(`${f}/`)&&(u=u.slice(f.length+1)),i.file=u)}function uU(i){if(i.length===0)return[];let u=i.map(f=>oU(f));return new RegExp(`[/\\\\]node_modules[/\\\\](?:${u.join("|")})[/\\\\][^:]+:\\d+:\\d+`)}var sU=new RegExp("^(?:\\s*at )?(?:(new) )?(?:(.*?) \\()?(?:eval at ([^ ]+) \\((.+?):(\\d+):(\\d+)\\), )?(?:(.+?):(\\d+):(\\d+)|(native))(\\)?)$"),lU=/^(.*?) \[as (.*?)\]$/;p5.exports=em});var _5=Me((CG,g5)=>{"use strict";g5.exports=(i,u)=>i.replace(/^\t+/gm,f=>" ".repeat(f.length*(u||2)))});var w5=Me((TG,y5)=>{"use strict";var fU=_5(),cU=(i,u)=>{let f=[],c=i-u,g=i+u;for(let t=c;t<=g;t++)f.push(t);return f};y5.exports=(i,u,f)=>{if(typeof i!="string")throw new TypeError("Source code is missing.");if(!u||u<1)throw new TypeError("Line number must start from `1`.");if(i=fU(i).split(/\r?\n/),!(u>i.length))return f=dt({around:3},f),cU(u,f.around).filter(c=>i[c-1]!==void 0).map(c=>({line:c,value:i[c-1]}))}});var tm=Me(hs=>{"use strict";var aU=hs&&hs.__createBinding||(Object.create?function(i,u,f,c){c===void 0&&(c=f),Object.defineProperty(i,c,{enumerable:!0,get:function(){return u[f]}})}:function(i,u,f,c){c===void 0&&(c=f),i[c]=u[f]}),dU=hs&&hs.__setModuleDefault||(Object.create?function(i,u){Object.defineProperty(i,"default",{enumerable:!0,value:u})}:function(i,u){i.default=u}),pU=hs&&hs.__importStar||function(i){if(i&&i.__esModule)return i;var u={};if(i!=null)for(var f in i)f!=="default"&&Object.hasOwnProperty.call(i,f)&&aU(u,i,f);return dU(u,i),u},hU=hs&&hs.__rest||function(i,u){var f={};for(var c in i)Object.prototype.hasOwnProperty.call(i,c)&&u.indexOf(c)<0&&(f[c]=i[c]);if(i!=null&&typeof Object.getOwnPropertySymbols=="function")for(var g=0,c=Object.getOwnPropertySymbols(i);g{var{children:f}=i,c=hU(i,["children"]);let g=Object.assign(Object.assign({},c),{marginLeft:c.marginLeft||c.marginX||c.margin||0,marginRight:c.marginRight||c.marginX||c.margin||0,marginTop:c.marginTop||c.marginY||c.margin||0,marginBottom:c.marginBottom||c.marginY||c.margin||0,paddingLeft:c.paddingLeft||c.paddingX||c.padding||0,paddingRight:c.paddingRight||c.paddingX||c.padding||0,paddingTop:c.paddingTop||c.paddingY||c.padding||0,paddingBottom:c.paddingBottom||c.paddingY||c.padding||0});return D5.default.createElement("ink-box",{ref:u,style:g},f)});U3.displayName="Box";U3.defaultProps={flexDirection:"row",flexGrow:0,flexShrink:1};hs.default=U3});var W3=Me(R2=>{"use strict";var q3=R2&&R2.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(R2,"__esModule",{value:!0});var mU=q3(lr()),Aa=q3(Jh()),E5=q3(E3()),z3=({color:i,backgroundColor:u,dimColor:f,bold:c,italic:g,underline:t,strikethrough:C,inverse:A,wrap:x,children:D})=>{if(D==null)return null;let L=N=>(f&&(N=Aa.default.dim(N)),i&&(N=E5.default(N,i,"foreground")),u&&(N=E5.default(N,u,"background")),c&&(N=Aa.default.bold(N)),g&&(N=Aa.default.italic(N)),t&&(N=Aa.default.underline(N)),C&&(N=Aa.default.strikethrough(N)),A&&(N=Aa.default.inverse(N)),N);return mU.default.createElement("ink-text",{style:{flexGrow:0,flexShrink:1,flexDirection:"row",textWrap:x},internal_transform:L},D)};z3.displayName="Text";z3.defaultProps={dimColor:!1,bold:!1,italic:!1,underline:!1,strikethrough:!1,wrap:"wrap"};R2.default=z3});var x5=Me(ms=>{"use strict";var vU=ms&&ms.__createBinding||(Object.create?function(i,u,f,c){c===void 0&&(c=f),Object.defineProperty(i,c,{enumerable:!0,get:function(){return u[f]}})}:function(i,u,f,c){c===void 0&&(c=f),i[c]=u[f]}),gU=ms&&ms.__setModuleDefault||(Object.create?function(i,u){Object.defineProperty(i,"default",{enumerable:!0,value:u})}:function(i,u){i.default=u}),_U=ms&&ms.__importStar||function(i){if(i&&i.__esModule)return i;var u={};if(i!=null)for(var f in i)f!=="default"&&Object.hasOwnProperty.call(i,f)&&vU(u,i,f);return gU(u,i),u},N2=ms&&ms.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(ms,"__esModule",{value:!0});var S5=_U(require("fs")),ui=N2(lr()),C5=N2(v5()),yU=N2(w5()),ef=N2(tm()),il=N2(W3()),T5=new C5.default({cwd:process.cwd(),internals:C5.default.nodeInternals()}),wU=({error:i})=>{let u=i.stack?i.stack.split(` -`).slice(1):void 0,f=u?T5.parseLine(u[0]):void 0,c,g=0;if((f==null?void 0:f.file)&&(f==null?void 0:f.line)&&S5.existsSync(f.file)){let t=S5.readFileSync(f.file,"utf8");if(c=yU.default(t,f.line),c)for(let{line:C}of c)g=Math.max(g,String(C).length)}return ui.default.createElement(ef.default,{flexDirection:"column",padding:1},ui.default.createElement(ef.default,null,ui.default.createElement(il.default,{backgroundColor:"red",color:"white"}," ","ERROR"," "),ui.default.createElement(il.default,null," ",i.message)),f&&ui.default.createElement(ef.default,{marginTop:1},ui.default.createElement(il.default,{dimColor:!0},f.file,":",f.line,":",f.column)),f&&c&&ui.default.createElement(ef.default,{marginTop:1,flexDirection:"column"},c.map(({line:t,value:C})=>ui.default.createElement(ef.default,{key:t},ui.default.createElement(ef.default,{width:g+1},ui.default.createElement(il.default,{dimColor:t!==f.line,backgroundColor:t===f.line?"red":void 0,color:t===f.line?"white":void 0},String(t).padStart(g," "),":")),ui.default.createElement(il.default,{key:t,backgroundColor:t===f.line?"red":void 0,color:t===f.line?"white":void 0}," "+C)))),i.stack&&ui.default.createElement(ef.default,{marginTop:1,flexDirection:"column"},i.stack.split(` -`).slice(1).map(t=>{let C=T5.parseLine(t);return C?ui.default.createElement(ef.default,{key:t},ui.default.createElement(il.default,{dimColor:!0},"- "),ui.default.createElement(il.default,{dimColor:!0,bold:!0},C.function),ui.default.createElement(il.default,{dimColor:!0,color:"gray"}," ","(",C.file,":",C.line,":",C.column,")")):ui.default.createElement(ef.default,{key:t},ui.default.createElement(il.default,{dimColor:!0},"- "),ui.default.createElement(il.default,{dimColor:!0,bold:!0},t))})))};ms.default=wU});var A5=Me(vs=>{"use strict";var DU=vs&&vs.__createBinding||(Object.create?function(i,u,f,c){c===void 0&&(c=f),Object.defineProperty(i,c,{enumerable:!0,get:function(){return u[f]}})}:function(i,u,f,c){c===void 0&&(c=f),i[c]=u[f]}),EU=vs&&vs.__setModuleDefault||(Object.create?function(i,u){Object.defineProperty(i,"default",{enumerable:!0,value:u})}:function(i,u){i.default=u}),SU=vs&&vs.__importStar||function(i){if(i&&i.__esModule)return i;var u={};if(i!=null)for(var f in i)f!=="default"&&Object.hasOwnProperty.call(i,f)&&DU(u,i,f);return EU(u,i),u},yc=vs&&vs.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(vs,"__esModule",{value:!0});var wc=SU(lr()),k5=yc(gy()),CU=yc(P3()),TU=yc(F3()),xU=yc(R3()),kU=yc(B3()),AU=yc(Zh()),OU=yc(x5()),IU=" ",PU="",MU="",H3=class extends wc.PureComponent{constructor(){super(...arguments);this.state={isFocusEnabled:!0,activeFocusId:void 0,focusables:[],error:void 0},this.rawModeEnabledCount=0,this.handleSetRawMode=u=>{let{stdin:f}=this.props;if(!this.isRawModeSupported())throw f===process.stdin?new Error(`Raw mode is not supported on the current process.stdin, which Ink uses as input stream by default. -Read about how to prevent this error on https://github.com/vadimdemedes/ink/#israwmodesupported`):new Error(`Raw mode is not supported on the stdin provided to Ink. -Read about how to prevent this error on https://github.com/vadimdemedes/ink/#israwmodesupported`);if(f.setEncoding("utf8"),u){this.rawModeEnabledCount===0&&(f.addListener("data",this.handleInput),f.resume(),f.setRawMode(!0)),this.rawModeEnabledCount++;return}--this.rawModeEnabledCount==0&&(f.setRawMode(!1),f.removeListener("data",this.handleInput),f.pause())},this.handleInput=u=>{u===""&&this.props.exitOnCtrlC&&this.handleExit(),u===MU&&this.state.activeFocusId&&this.setState({activeFocusId:void 0}),this.state.isFocusEnabled&&this.state.focusables.length>0&&(u===IU&&this.focusNext(),u===PU&&this.focusPrevious())},this.handleExit=u=>{this.isRawModeSupported()&&this.handleSetRawMode(!1),this.props.onExit(u)},this.enableFocus=()=>{this.setState({isFocusEnabled:!0})},this.disableFocus=()=>{this.setState({isFocusEnabled:!1})},this.focusNext=()=>{this.setState(u=>{let f=u.focusables[0].id;return{activeFocusId:this.findNextFocusable(u)||f}})},this.focusPrevious=()=>{this.setState(u=>{let f=u.focusables[u.focusables.length-1].id;return{activeFocusId:this.findPreviousFocusable(u)||f}})},this.addFocusable=(u,{autoFocus:f})=>{this.setState(c=>{let g=c.activeFocusId;return!g&&f&&(g=u),{activeFocusId:g,focusables:[...c.focusables,{id:u,isActive:!0}]}})},this.removeFocusable=u=>{this.setState(f=>({activeFocusId:f.activeFocusId===u?void 0:f.activeFocusId,focusables:f.focusables.filter(c=>c.id!==u)}))},this.activateFocusable=u=>{this.setState(f=>({focusables:f.focusables.map(c=>c.id!==u?c:{id:u,isActive:!0})}))},this.deactivateFocusable=u=>{this.setState(f=>({activeFocusId:f.activeFocusId===u?void 0:f.activeFocusId,focusables:f.focusables.map(c=>c.id!==u?c:{id:u,isActive:!1})}))},this.findNextFocusable=u=>{let f=u.focusables.findIndex(c=>c.id===u.activeFocusId);for(let c=f+1;c{let f=u.focusables.findIndex(c=>c.id===u.activeFocusId);for(let c=f-1;c>=0;c--)if(u.focusables[c].isActive)return u.focusables[c].id}}static getDerivedStateFromError(u){return{error:u}}isRawModeSupported(){return this.props.stdin.isTTY}render(){return wc.default.createElement(CU.default.Provider,{value:{exit:this.handleExit}},wc.default.createElement(TU.default.Provider,{value:{stdin:this.props.stdin,setRawMode:this.handleSetRawMode,isRawModeSupported:this.isRawModeSupported(),internal_exitOnCtrlC:this.props.exitOnCtrlC}},wc.default.createElement(xU.default.Provider,{value:{stdout:this.props.stdout,write:this.props.writeToStdout}},wc.default.createElement(kU.default.Provider,{value:{stderr:this.props.stderr,write:this.props.writeToStderr}},wc.default.createElement(AU.default.Provider,{value:{activeId:this.state.activeFocusId,add:this.addFocusable,remove:this.removeFocusable,activate:this.activateFocusable,deactivate:this.deactivateFocusable,enableFocus:this.enableFocus,disableFocus:this.disableFocus,focusNext:this.focusNext,focusPrevious:this.focusPrevious}},this.state.error?wc.default.createElement(OU.default,{error:this.state.error}):this.props.children)))))}componentDidMount(){k5.default.hide(this.props.stdout)}componentWillUnmount(){k5.default.show(this.props.stdout),this.isRawModeSupported()&&this.handleSetRawMode(!1)}componentDidCatch(u){this.handleExit(u)}};vs.default=H3;H3.displayName="InternalApp"});var M5=Me(gs=>{"use strict";var FU=gs&&gs.__createBinding||(Object.create?function(i,u,f,c){c===void 0&&(c=f),Object.defineProperty(i,c,{enumerable:!0,get:function(){return u[f]}})}:function(i,u,f,c){c===void 0&&(c=f),i[c]=u[f]}),LU=gs&&gs.__setModuleDefault||(Object.create?function(i,u){Object.defineProperty(i,"default",{enumerable:!0,value:u})}:function(i,u){i.default=u}),RU=gs&&gs.__importStar||function(i){if(i&&i.__esModule)return i;var u={};if(i!=null)for(var f in i)f!=="default"&&Object.hasOwnProperty.call(i,f)&&FU(u,i,f);return LU(u,i),u},_s=gs&&gs.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(gs,"__esModule",{value:!0});var NU=_s(lr()),O5=AD(),BU=_s(WD()),jU=_s(ay()),UU=_s(KD()),qU=_s(JD()),nm=_s(lS()),zU=_s(t5()),WU=_s(vy()),HU=_s(o5()),bU=RU(Xy()),GU=_s(O3()),VU=_s(A5()),Oa=process.env.CI==="false"?!1:UU.default,I5=()=>{},P5=class{constructor(u){this.resolveExitPromise=()=>{},this.rejectExitPromise=()=>{},this.unsubscribeExit=()=>{},this.onRender=()=>{if(this.isUnmounted)return;let{output:f,outputHeight:c,staticOutput:g}=zU.default(this.rootNode,this.options.stdout.columns||80),t=g&&g!==` -`;if(this.options.debug){t&&(this.fullStaticOutput+=g),this.options.stdout.write(this.fullStaticOutput+f);return}if(Oa){t&&this.options.stdout.write(g),this.lastOutput=f;return}if(t&&(this.fullStaticOutput+=g),c>=this.options.stdout.rows){this.options.stdout.write(jU.default.clearTerminal+this.fullStaticOutput+f),this.lastOutput=f;return}t&&(this.log.clear(),this.options.stdout.write(g),this.log(f)),!t&&f!==this.lastOutput&&this.throttledLog(f),this.lastOutput=f},qU.default(this),this.options=u,this.rootNode=bU.createNode("ink-root"),this.rootNode.onRender=u.debug?this.onRender:O5.throttle(this.onRender,32,{leading:!0,trailing:!0}),this.rootNode.onImmediateRender=this.onRender,this.log=BU.default.create(u.stdout),this.throttledLog=u.debug?this.log:O5.throttle(this.log,void 0,{leading:!0,trailing:!0}),this.isUnmounted=!1,this.lastOutput="",this.fullStaticOutput="",this.container=nm.default.createContainer(this.rootNode,!1,!1),this.unsubscribeExit=WU.default(this.unmount,{alwaysLast:!1}),process.env.DEV==="true"&&nm.default.injectIntoDevTools({bundleType:0,version:"16.13.1",rendererPackageName:"ink"}),u.patchConsole&&this.patchConsole(),Oa||(u.stdout.on("resize",this.onRender),this.unsubscribeResize=()=>{u.stdout.off("resize",this.onRender)})}render(u){let f=NU.default.createElement(VU.default,{stdin:this.options.stdin,stdout:this.options.stdout,stderr:this.options.stderr,writeToStdout:this.writeToStdout,writeToStderr:this.writeToStderr,exitOnCtrlC:this.options.exitOnCtrlC,onExit:this.unmount},u);nm.default.updateContainer(f,this.container,null,I5)}writeToStdout(u){if(!this.isUnmounted){if(this.options.debug){this.options.stdout.write(u+this.fullStaticOutput+this.lastOutput);return}if(Oa){this.options.stdout.write(u);return}this.log.clear(),this.options.stdout.write(u),this.log(this.lastOutput)}}writeToStderr(u){if(!this.isUnmounted){if(this.options.debug){this.options.stderr.write(u),this.options.stdout.write(this.fullStaticOutput+this.lastOutput);return}if(Oa){this.options.stderr.write(u);return}this.log.clear(),this.options.stderr.write(u),this.log(this.lastOutput)}}unmount(u){this.isUnmounted||(this.onRender(),this.unsubscribeExit(),typeof this.restoreConsole=="function"&&this.restoreConsole(),typeof this.unsubscribeResize=="function"&&this.unsubscribeResize(),Oa?this.options.stdout.write(this.lastOutput+` -`):this.options.debug||this.log.done(),this.isUnmounted=!0,nm.default.updateContainer(null,this.container,null,I5),GU.default.delete(this.options.stdout),u instanceof Error?this.rejectExitPromise(u):this.resolveExitPromise())}waitUntilExit(){return this.exitPromise||(this.exitPromise=new Promise((u,f)=>{this.resolveExitPromise=u,this.rejectExitPromise=f})),this.exitPromise}clear(){!Oa&&!this.options.debug&&this.log.clear()}patchConsole(){this.options.debug||(this.restoreConsole=HU.default((u,f)=>{u==="stdout"&&this.writeToStdout(f),u==="stderr"&&(f.startsWith("The above error occurred")||this.writeToStderr(f))}))}};gs.default=P5});var L5=Me(B2=>{"use strict";var F5=B2&&B2.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(B2,"__esModule",{value:!0});var YU=F5(M5()),rm=F5(O3()),$U=require("stream"),JU=(i,u)=>{let f=Object.assign({stdout:process.stdout,stdin:process.stdin,stderr:process.stderr,debug:!1,exitOnCtrlC:!0,patchConsole:!0},KU(u)),c=XU(f.stdout,()=>new YU.default(f));return c.render(i),{rerender:c.render,unmount:()=>c.unmount(),waitUntilExit:c.waitUntilExit,cleanup:()=>rm.default.delete(f.stdout),clear:c.clear}};B2.default=JU;var KU=(i={})=>i instanceof $U.Stream?{stdout:i,stdin:process.stdin}:i,XU=(i,u)=>{let f;return rm.default.has(i)?f=rm.default.get(i):(f=u(),rm.default.set(i,f)),f}});var N5=Me(tf=>{"use strict";var QU=tf&&tf.__createBinding||(Object.create?function(i,u,f,c){c===void 0&&(c=f),Object.defineProperty(i,c,{enumerable:!0,get:function(){return u[f]}})}:function(i,u,f,c){c===void 0&&(c=f),i[c]=u[f]}),ZU=tf&&tf.__setModuleDefault||(Object.create?function(i,u){Object.defineProperty(i,"default",{enumerable:!0,value:u})}:function(i,u){i.default=u}),eq=tf&&tf.__importStar||function(i){if(i&&i.__esModule)return i;var u={};if(i!=null)for(var f in i)f!=="default"&&Object.hasOwnProperty.call(i,f)&&QU(u,i,f);return ZU(u,i),u};Object.defineProperty(tf,"__esModule",{value:!0});var j2=eq(lr()),R5=i=>{let{items:u,children:f,style:c}=i,[g,t]=j2.useState(0),C=j2.useMemo(()=>u.slice(g),[u,g]);j2.useLayoutEffect(()=>{t(u.length)},[u.length]);let A=C.map((D,L)=>f(D,g+L)),x=j2.useMemo(()=>Object.assign({position:"absolute",flexDirection:"column"},c),[c]);return j2.default.createElement("ink-box",{internal_static:!0,style:x},A)};R5.displayName="Static";tf.default=R5});var j5=Me(U2=>{"use strict";var tq=U2&&U2.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(U2,"__esModule",{value:!0});var nq=tq(lr()),B5=({children:i,transform:u})=>i==null?null:nq.default.createElement("ink-text",{style:{flexGrow:0,flexShrink:1,flexDirection:"row"},internal_transform:u},i);B5.displayName="Transform";U2.default=B5});var q5=Me(q2=>{"use strict";var rq=q2&&q2.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(q2,"__esModule",{value:!0});var iq=rq(lr()),U5=({count:i=1})=>iq.default.createElement("ink-text",null,` -`.repeat(i));U5.displayName="Newline";q2.default=U5});var H5=Me(z2=>{"use strict";var z5=z2&&z2.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(z2,"__esModule",{value:!0});var oq=z5(lr()),uq=z5(tm()),W5=()=>oq.default.createElement(uq.default,{flexGrow:1});W5.displayName="Spacer";z2.default=W5});var im=Me(W2=>{"use strict";var sq=W2&&W2.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(W2,"__esModule",{value:!0});var lq=lr(),fq=sq(F3()),cq=()=>lq.useContext(fq.default);W2.default=cq});var G5=Me(H2=>{"use strict";var aq=H2&&H2.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(H2,"__esModule",{value:!0});var b5=lr(),dq=aq(im()),pq=(i,u={})=>{let{stdin:f,setRawMode:c,internal_exitOnCtrlC:g}=dq.default();b5.useEffect(()=>{if(u.isActive!==!1)return c(!0),()=>{c(!1)}},[u.isActive,c]),b5.useEffect(()=>{if(u.isActive===!1)return;let t=C=>{let A=String(C),x={upArrow:A==="",downArrow:A==="",leftArrow:A==="",rightArrow:A==="",pageDown:A==="[6~",pageUp:A==="[5~",return:A==="\r",escape:A==="",ctrl:!1,shift:!1,tab:A===" "||A==="",backspace:A==="\b",delete:A==="\x7F"||A==="[3~",meta:!1};A<=""&&!x.return&&(A=String.fromCharCode(A.charCodeAt(0)+"a".charCodeAt(0)-1),x.ctrl=!0),A.startsWith("")&&(A=A.slice(1),x.meta=!0);let D=A>="A"&&A<="Z",L=A>="\u0410"&&A<="\u042F";A.length===1&&(D||L)&&(x.shift=!0),x.tab&&A==="[Z"&&(x.shift=!0),(x.tab||x.backspace||x.delete)&&(A=""),(!(A==="c"&&x.ctrl)||!g)&&i(A,x)};return f==null||f.on("data",t),()=>{f==null||f.off("data",t)}},[u.isActive,f,g,i])};H2.default=pq});var V5=Me(b2=>{"use strict";var hq=b2&&b2.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(b2,"__esModule",{value:!0});var mq=lr(),vq=hq(P3()),gq=()=>mq.useContext(vq.default);b2.default=gq});var Y5=Me(G2=>{"use strict";var _q=G2&&G2.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(G2,"__esModule",{value:!0});var yq=lr(),wq=_q(R3()),Dq=()=>yq.useContext(wq.default);G2.default=Dq});var $5=Me(V2=>{"use strict";var Eq=V2&&V2.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(V2,"__esModule",{value:!0});var Sq=lr(),Cq=Eq(B3()),Tq=()=>Sq.useContext(Cq.default);V2.default=Tq});var X5=Me(Y2=>{"use strict";var K5=Y2&&Y2.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Y2,"__esModule",{value:!0});var $2=lr(),xq=K5(Zh()),kq=K5(im()),Aq=({isActive:i=!0,autoFocus:u=!1}={})=>{let{isRawModeSupported:f,setRawMode:c}=kq.default(),{activeId:g,add:t,remove:C,activate:A,deactivate:x}=$2.useContext(xq.default),D=$2.useMemo(()=>Math.random().toString().slice(2,7),[]);return $2.useEffect(()=>(t(D,{autoFocus:u}),()=>{C(D)}),[D,u]),$2.useEffect(()=>{i?A(D):x(D)},[i,D]),$2.useEffect(()=>{if(!(!f||!i))return c(!0),()=>{c(!1)}},[i]),{isFocused:Boolean(D)&&g===D}};Y2.default=Aq});var J5=Me(K2=>{"use strict";var Oq=K2&&K2.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(K2,"__esModule",{value:!0});var Iq=lr(),Pq=Oq(Zh()),Mq=()=>{let i=Iq.useContext(Pq.default);return{enableFocus:i.enableFocus,disableFocus:i.disableFocus,focusNext:i.focusNext,focusPrevious:i.focusPrevious}};K2.default=Mq});var Q5=Me(b3=>{"use strict";Object.defineProperty(b3,"__esModule",{value:!0});b3.default=i=>{var u,f,c,g;return{width:(f=(u=i.yogaNode)===null||u===void 0?void 0:u.getComputedWidth())!==null&&f!==void 0?f:0,height:(g=(c=i.yogaNode)===null||c===void 0?void 0:c.getComputedHeight())!==null&&g!==void 0?g:0}}});var ys=Me(ji=>{"use strict";Object.defineProperty(ji,"__esModule",{value:!0});var Fq=L5();Object.defineProperty(ji,"render",{enumerable:!0,get:function(){return Fq.default}});var Lq=tm();Object.defineProperty(ji,"Box",{enumerable:!0,get:function(){return Lq.default}});var Rq=W3();Object.defineProperty(ji,"Text",{enumerable:!0,get:function(){return Rq.default}});var Nq=N5();Object.defineProperty(ji,"Static",{enumerable:!0,get:function(){return Nq.default}});var Bq=j5();Object.defineProperty(ji,"Transform",{enumerable:!0,get:function(){return Bq.default}});var jq=q5();Object.defineProperty(ji,"Newline",{enumerable:!0,get:function(){return jq.default}});var Uq=H5();Object.defineProperty(ji,"Spacer",{enumerable:!0,get:function(){return Uq.default}});var qq=G5();Object.defineProperty(ji,"useInput",{enumerable:!0,get:function(){return qq.default}});var zq=V5();Object.defineProperty(ji,"useApp",{enumerable:!0,get:function(){return zq.default}});var Wq=im();Object.defineProperty(ji,"useStdin",{enumerable:!0,get:function(){return Wq.default}});var Hq=Y5();Object.defineProperty(ji,"useStdout",{enumerable:!0,get:function(){return Hq.default}});var bq=$5();Object.defineProperty(ji,"useStderr",{enumerable:!0,get:function(){return bq.default}});var Gq=X5();Object.defineProperty(ji,"useFocus",{enumerable:!0,get:function(){return Gq.default}});var Vq=J5();Object.defineProperty(ji,"useFocusManager",{enumerable:!0,get:function(){return Vq.default}});var Yq=Q5();Object.defineProperty(ji,"measureElement",{enumerable:!0,get:function(){return Yq.default}})});var lC=Me(X2=>{"use strict";Object.defineProperty(X2,"__esModule",{value:!0});X2.UncontrolledTextInput=void 0;var oC=lr(),Y3=lr(),uC=ys(),Sc=Jh(),sC=({value:i,placeholder:u="",focus:f=!0,mask:c,highlightPastedText:g=!1,showCursor:t=!0,onChange:C,onSubmit:A})=>{let[{cursorOffset:x,cursorWidth:D},L]=Y3.useState({cursorOffset:(i||"").length,cursorWidth:0});Y3.useEffect(()=>{L(re=>{if(!f||!t)return re;let ce=i||"";return re.cursorOffset>ce.length-1?{cursorOffset:ce.length,cursorWidth:0}:re})},[i,f,t]);let N=g?D:0,j=c?c.repeat(i.length):i,$=j,h=u?Sc.grey(u):void 0;if(t&&f){h=u.length>0?Sc.inverse(u[0])+Sc.grey(u.slice(1)):Sc.inverse(" "),$=j.length>0?"":Sc.inverse(" ");let re=0;for(let ce of j)re>=x-N&&re<=x?$+=Sc.inverse(ce):$+=ce,re++;j.length>0&&x===j.length&&($+=Sc.inverse(" "))}return uC.useInput((re,ce)=>{if(ce.upArrow||ce.downArrow||ce.ctrl&&re==="c"||ce.tab||ce.shift&&ce.tab)return;if(ce.return){A&&A(i);return}let Q=x,oe=i,Se=0;ce.leftArrow?t&&Q--:ce.rightArrow?t&&Q++:ce.backspace||ce.delete?x>0&&(oe=i.slice(0,x-1)+i.slice(x,i.length),Q--):(oe=i.slice(0,x)+re+i.slice(x,i.length),Q+=re.length,re.length>1&&(Se=re.length)),x<0&&(Q=0),x>i.length&&(Q=i.length),L({cursorOffset:Q,cursorWidth:Se}),oe!==i&&C(oe)},{isActive:f}),oC.createElement(uC.Text,null,u?j.length>0?$:h:$)};X2.default=sC;X2.UncontrolledTextInput=i=>{let[u,f]=Y3.useState("");return oC.createElement(sC,Object.assign({},i,{value:u,onChange:f}))}});var cC=Me(pm=>{"use strict";Object.defineProperty(pm,"__esModule",{value:!0});function J2(i){let u=[...i.caches],f=u.shift();return f===void 0?fC():{get(c,g,t={miss:()=>Promise.resolve()}){return f.get(c,g,t).catch(()=>J2({caches:u}).get(c,g,t))},set(c,g){return f.set(c,g).catch(()=>J2({caches:u}).set(c,g))},delete(c){return f.delete(c).catch(()=>J2({caches:u}).delete(c))},clear(){return f.clear().catch(()=>J2({caches:u}).clear())}}}function fC(){return{get(i,u,f={miss:()=>Promise.resolve()}){return u().then(g=>Promise.all([g,f.miss(g)])).then(([g])=>g)},set(i,u){return Promise.resolve(u)},delete(i){return Promise.resolve()},clear(){return Promise.resolve()}}}pm.createFallbackableCache=J2;pm.createNullCache=fC});var dC=Me((fV,aC)=>{aC.exports=cC()});var pC=Me($3=>{"use strict";Object.defineProperty($3,"__esModule",{value:!0});function $q(i={serializable:!0}){let u={};return{get(f,c,g={miss:()=>Promise.resolve()}){let t=JSON.stringify(f);if(t in u)return Promise.resolve(i.serializable?JSON.parse(u[t]):u[t]);let C=c(),A=g&&g.miss||(()=>Promise.resolve());return C.then(x=>A(x)).then(()=>C)},set(f,c){return u[JSON.stringify(f)]=i.serializable?JSON.stringify(c):c,Promise.resolve(c)},delete(f){return delete u[JSON.stringify(f)],Promise.resolve()},clear(){return u={},Promise.resolve()}}}$3.createInMemoryCache=$q});var mC=Me((aV,hC)=>{hC.exports=pC()});var gC=Me(ws=>{"use strict";Object.defineProperty(ws,"__esModule",{value:!0});function Kq(i,u,f){let c={"x-algolia-api-key":f,"x-algolia-application-id":u};return{headers(){return i===K3.WithinHeaders?c:{}},queryParameters(){return i===K3.WithinQueryParameters?c:{}}}}function Xq(i){let u=0,f=()=>(u++,new Promise(c=>{setTimeout(()=>{c(i(f))},Math.min(100*u,1e3))}));return i(f)}function vC(i,u=(f,c)=>Promise.resolve()){return Object.assign(i,{wait(f){return vC(i.then(c=>Promise.all([u(c,f),c])).then(c=>c[1]))}})}function Jq(i){let u=i.length-1;for(u;u>0;u--){let f=Math.floor(Math.random()*(u+1)),c=i[u];i[u]=i[f],i[f]=c}return i}function Qq(i,u){return Object.keys(u!==void 0?u:{}).forEach(f=>{i[f]=u[f](i)}),i}function Zq(i,...u){let f=0;return i.replace(/%s/g,()=>encodeURIComponent(u[f++]))}var ez="4.2.0",tz=i=>()=>i.transporter.requester.destroy(),K3={WithinQueryParameters:0,WithinHeaders:1};ws.AuthMode=K3;ws.addMethods=Qq;ws.createAuth=Kq;ws.createRetryablePromise=Xq;ws.createWaitablePromise=vC;ws.destroy=tz;ws.encode=Zq;ws.shuffle=Jq;ws.version=ez});var Q2=Me((pV,_C)=>{_C.exports=gC()});var yC=Me(X3=>{"use strict";Object.defineProperty(X3,"__esModule",{value:!0});var nz={Delete:"DELETE",Get:"GET",Post:"POST",Put:"PUT"};X3.MethodEnum=nz});var Z2=Me((mV,wC)=>{wC.exports=yC()});var RC=Me(y0=>{"use strict";Object.defineProperty(y0,"__esModule",{value:!0});var DC=Z2();function J3(i,u){let f=i||{},c=f.data||{};return Object.keys(f).forEach(g=>{["timeout","headers","queryParameters","data","cacheable"].indexOf(g)===-1&&(c[g]=f[g])}),{data:Object.entries(c).length>0?c:void 0,timeout:f.timeout||u,headers:f.headers||{},queryParameters:f.queryParameters||{},cacheable:f.cacheable}}var hm={Read:1,Write:2,Any:3},Ia={Up:1,Down:2,Timeouted:3},EC=2*60*1e3;function Q3(i,u=Ia.Up){return zn(dt({},i),{status:u,lastUpdate:Date.now()})}function SC(i){return i.status===Ia.Up||Date.now()-i.lastUpdate>EC}function CC(i){return i.status===Ia.Timeouted&&Date.now()-i.lastUpdate<=EC}function Z3(i){return{protocol:i.protocol||"https",url:i.url,accept:i.accept||hm.Any}}function rz(i,u){return Promise.all(u.map(f=>i.get(f,()=>Promise.resolve(Q3(f))))).then(f=>{let c=f.filter(A=>SC(A)),g=f.filter(A=>CC(A)),t=[...c,...g],C=t.length>0?t.map(A=>Z3(A)):u;return{getTimeout(A,x){return(g.length===0&&A===0?1:g.length+3+A)*x},statelessHosts:C}})}var iz=({isTimedOut:i,status:u})=>!i&&~~u==0,oz=i=>{let u=i.status;return i.isTimedOut||iz(i)||~~(u/100)!=2&&~~(u/100)!=4},uz=({status:i})=>~~(i/100)==2,sz=(i,u)=>oz(i)?u.onRetry(i):uz(i)?u.onSucess(i):u.onFail(i);function PC(i,u,f,c){let g=[],t=AC(f,c),C=OC(i,c),A=f.method,x=f.method!==DC.MethodEnum.Get?{}:dt(dt({},f.data),c.data),D=dt(dt(dt({"x-algolia-agent":i.userAgent.value},i.queryParameters),x),c.queryParameters),L=0,N=(j,$)=>{let h=j.pop();if(h===void 0)throw IC(ew(g));let re={data:t,headers:C,method:A,url:kC(h,f.path,D),connectTimeout:$(L,i.timeouts.connect),responseTimeout:$(L,c.timeout)},ce=oe=>{let Se={request:re,response:oe,host:h,triesLeft:j.length};return g.push(Se),Se},Q={onSucess:oe=>TC(oe),onRetry(oe){let Se=ce(oe);return oe.isTimedOut&&L++,Promise.all([i.logger.info("Retryable failure",tw(Se)),i.hostsCache.set(h,Q3(h,oe.isTimedOut?Ia.Timeouted:Ia.Down))]).then(()=>N(j,$))},onFail(oe){throw ce(oe),xC(oe,ew(g))}};return i.requester.send(re).then(oe=>sz(oe,Q))};return rz(i.hostsCache,u).then(j=>N([...j.statelessHosts].reverse(),j.getTimeout))}function lz(i){let{hostsCache:u,logger:f,requester:c,requestsCache:g,responsesCache:t,timeouts:C,userAgent:A,hosts:x,queryParameters:D,headers:L}=i,N={hostsCache:u,logger:f,requester:c,requestsCache:g,responsesCache:t,timeouts:C,userAgent:A,headers:L,queryParameters:D,hosts:x.map(j=>Z3(j)),read(j,$){let h=J3($,N.timeouts.read),re=()=>PC(N,N.hosts.filter(oe=>(oe.accept&hm.Read)!=0),j,h);if((h.cacheable!==void 0?h.cacheable:j.cacheable)!==!0)return re();let Q={request:j,mappedRequestOptions:h,transporter:{queryParameters:N.queryParameters,headers:N.headers}};return N.responsesCache.get(Q,()=>N.requestsCache.get(Q,()=>N.requestsCache.set(Q,re()).then(oe=>Promise.all([N.requestsCache.delete(Q),oe]),oe=>Promise.all([N.requestsCache.delete(Q),Promise.reject(oe)])).then(([oe,Se])=>Se)),{miss:oe=>N.responsesCache.set(Q,oe)})},write(j,$){return PC(N,N.hosts.filter(h=>(h.accept&hm.Write)!=0),j,J3($,N.timeouts.write))}};return N}function fz(i){let u={value:`Algolia for JavaScript (${i})`,add(f){let c=`; ${f.segment}${f.version!==void 0?` (${f.version})`:""}`;return u.value.indexOf(c)===-1&&(u.value=`${u.value}${c}`),u}};return u}function TC(i){try{return JSON.parse(i.content)}catch(u){throw MC(u.message,i)}}function xC({content:i,status:u},f){let c=i;try{c=JSON.parse(i).message}catch(g){}return FC(c,u,f)}function cz(i,...u){let f=0;return i.replace(/%s/g,()=>encodeURIComponent(u[f++]))}function kC(i,u,f){let c=LC(f),g=`${i.protocol}://${i.url}/${u.charAt(0)==="/"?u.substr(1):u}`;return c.length&&(g+=`?${c}`),g}function LC(i){let u=f=>Object.prototype.toString.call(f)==="[object Object]"||Object.prototype.toString.call(f)==="[object Array]";return Object.keys(i).map(f=>cz("%s=%s",f,u(i[f])?JSON.stringify(i[f]):i[f])).join("&")}function AC(i,u){if(i.method===DC.MethodEnum.Get||i.data===void 0&&u.data===void 0)return;let f=Array.isArray(i.data)?i.data:dt(dt({},i.data),u.data);return JSON.stringify(f)}function OC(i,u){let f=dt(dt({},i.headers),u.headers),c={};return Object.keys(f).forEach(g=>{let t=f[g];c[g.toLowerCase()]=t}),c}function ew(i){return i.map(u=>tw(u))}function tw(i){let u=i.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return zn(dt({},i),{request:zn(dt({},i.request),{headers:dt(dt({},i.request.headers),u)})})}function FC(i,u,f){return{name:"ApiError",message:i,status:u,transporterStackTrace:f}}function MC(i,u){return{name:"DeserializationError",message:i,response:u}}function IC(i){return{name:"RetryError",message:"Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.",transporterStackTrace:i}}y0.CallEnum=hm;y0.HostStatusEnum=Ia;y0.createApiError=FC;y0.createDeserializationError=MC;y0.createMappedRequestOptions=J3;y0.createRetryError=IC;y0.createStatefulHost=Q3;y0.createStatelessHost=Z3;y0.createTransporter=lz;y0.createUserAgent=fz;y0.deserializeFailure=xC;y0.deserializeSuccess=TC;y0.isStatefulHostTimeouted=CC;y0.isStatefulHostUp=SC;y0.serializeData=AC;y0.serializeHeaders=OC;y0.serializeQueryParameters=LC;y0.serializeUrl=kC;y0.stackFrameWithoutCredentials=tw;y0.stackTraceWithoutCredentials=ew});var ed=Me((gV,NC)=>{NC.exports=RC()});var BC=Me(Hf=>{"use strict";Object.defineProperty(Hf,"__esModule",{value:!0});var Pa=Q2(),az=ed(),td=Z2(),dz=i=>{let u=i.region||"us",f=Pa.createAuth(Pa.AuthMode.WithinHeaders,i.appId,i.apiKey),c=az.createTransporter(zn(dt({hosts:[{url:`analytics.${u}.algolia.com`}]},i),{headers:dt(zn(dt({},f.headers()),{"content-type":"application/json"}),i.headers),queryParameters:dt(dt({},f.queryParameters()),i.queryParameters)})),g=i.appId;return Pa.addMethods({appId:g,transporter:c},i.methods)},pz=i=>(u,f)=>i.transporter.write({method:td.MethodEnum.Post,path:"2/abtests",data:u},f),hz=i=>(u,f)=>i.transporter.write({method:td.MethodEnum.Delete,path:Pa.encode("2/abtests/%s",u)},f),mz=i=>(u,f)=>i.transporter.read({method:td.MethodEnum.Get,path:Pa.encode("2/abtests/%s",u)},f),vz=i=>u=>i.transporter.read({method:td.MethodEnum.Get,path:"2/abtests"},u),gz=i=>(u,f)=>i.transporter.write({method:td.MethodEnum.Post,path:Pa.encode("2/abtests/%s/stop",u)},f);Hf.addABTest=pz;Hf.createAnalyticsClient=dz;Hf.deleteABTest=hz;Hf.getABTest=mz;Hf.getABTests=vz;Hf.stopABTest=gz});var UC=Me((yV,jC)=>{jC.exports=BC()});var zC=Me(nd=>{"use strict";Object.defineProperty(nd,"__esModule",{value:!0});var nw=Q2(),_z=ed(),qC=Z2(),yz=i=>{let u=i.region||"us",f=nw.createAuth(nw.AuthMode.WithinHeaders,i.appId,i.apiKey),c=_z.createTransporter(zn(dt({hosts:[{url:`recommendation.${u}.algolia.com`}]},i),{headers:dt(zn(dt({},f.headers()),{"content-type":"application/json"}),i.headers),queryParameters:dt(dt({},f.queryParameters()),i.queryParameters)}));return nw.addMethods({appId:i.appId,transporter:c},i.methods)},wz=i=>u=>i.transporter.read({method:qC.MethodEnum.Get,path:"1/strategies/personalization"},u),Dz=i=>(u,f)=>i.transporter.write({method:qC.MethodEnum.Post,path:"1/strategies/personalization",data:u},f);nd.createRecommendationClient=yz;nd.getPersonalizationStrategy=wz;nd.setPersonalizationStrategy=Dz});var HC=Me((DV,WC)=>{WC.exports=zC()});var nT=Me(yt=>{"use strict";Object.defineProperty(yt,"__esModule",{value:!0});var Wt=Q2(),jo=ed(),Rn=Z2(),Ez=require("crypto");function mm(i){let u=f=>i.request(f).then(c=>{if(i.batch!==void 0&&i.batch(c.hits),!i.shouldStop(c))return c.cursor?u({cursor:c.cursor}):u({page:(f.page||0)+1})});return u({})}var Sz=i=>{let u=i.appId,f=Wt.createAuth(i.authMode!==void 0?i.authMode:Wt.AuthMode.WithinHeaders,u,i.apiKey),c=jo.createTransporter(zn(dt({hosts:[{url:`${u}-dsn.algolia.net`,accept:jo.CallEnum.Read},{url:`${u}.algolia.net`,accept:jo.CallEnum.Write}].concat(Wt.shuffle([{url:`${u}-1.algolianet.com`},{url:`${u}-2.algolianet.com`},{url:`${u}-3.algolianet.com`}]))},i),{headers:dt(zn(dt({},f.headers()),{"content-type":"application/x-www-form-urlencoded"}),i.headers),queryParameters:dt(dt({},f.queryParameters()),i.queryParameters)})),g={transporter:c,appId:u,addAlgoliaAgent(t,C){c.userAgent.add({segment:t,version:C})},clearCache(){return Promise.all([c.requestsCache.clear(),c.responsesCache.clear()]).then(()=>{})}};return Wt.addMethods(g,i.methods)};function bC(){return{name:"MissingObjectIDError",message:"All objects must have an unique objectID (like a primary key) to be valid. Algolia is also able to generate objectIDs automatically but *it's not recommended*. To do it, use the `{'autoGenerateObjectIDIfNotExist': true}` option."}}function GC(){return{name:"ObjectNotFoundError",message:"Object not found."}}function VC(){return{name:"ValidUntilNotFoundError",message:"ValidUntil not found in given secured api key."}}var Cz=i=>(u,f)=>{let A=f||{},{queryParameters:c}=A,g=Si(A,["queryParameters"]),t=dt({acl:u},c!==void 0?{queryParameters:c}:{}),C=(x,D)=>Wt.createRetryablePromise(L=>rd(i)(x.key,D).catch(N=>{if(N.status!==404)throw N;return L()}));return Wt.createWaitablePromise(i.transporter.write({method:Rn.MethodEnum.Post,path:"1/keys",data:t},g),C)},Tz=i=>(u,f,c)=>{let g=jo.createMappedRequestOptions(c);return g.queryParameters["X-Algolia-User-ID"]=u,i.transporter.write({method:Rn.MethodEnum.Post,path:"1/clusters/mapping",data:{cluster:f}},g)},xz=i=>(u,f,c)=>i.transporter.write({method:Rn.MethodEnum.Post,path:"1/clusters/mapping/batch",data:{users:u,cluster:f}},c),vm=i=>(u,f,c)=>{let g=(t,C)=>id(i)(u,{methods:{waitTask:z0}}).waitTask(t.taskID,C);return Wt.createWaitablePromise(i.transporter.write({method:Rn.MethodEnum.Post,path:Wt.encode("1/indexes/%s/operation",u),data:{operation:"copy",destination:f}},c),g)},kz=i=>(u,f,c)=>vm(i)(u,f,zn(dt({},c),{scope:[gm.Rules]})),Az=i=>(u,f,c)=>vm(i)(u,f,zn(dt({},c),{scope:[gm.Settings]})),Oz=i=>(u,f,c)=>vm(i)(u,f,zn(dt({},c),{scope:[gm.Synonyms]})),Iz=i=>(u,f)=>{let c=(g,t)=>Wt.createRetryablePromise(C=>rd(i)(u,t).then(C).catch(A=>{if(A.status!==404)throw A}));return Wt.createWaitablePromise(i.transporter.write({method:Rn.MethodEnum.Delete,path:Wt.encode("1/keys/%s",u)},f),c)},Pz=()=>(i,u)=>{let f=jo.serializeQueryParameters(u),c=Ez.createHmac("sha256",i).update(f).digest("hex");return Buffer.from(c+f).toString("base64")},rd=i=>(u,f)=>i.transporter.read({method:Rn.MethodEnum.Get,path:Wt.encode("1/keys/%s",u)},f),Mz=i=>u=>i.transporter.read({method:Rn.MethodEnum.Get,path:"1/logs"},u),Fz=()=>i=>{let u=Buffer.from(i,"base64").toString("ascii"),f=/validUntil=(\d+)/,c=u.match(f);if(c===null)throw VC();return parseInt(c[1],10)-Math.round(new Date().getTime()/1e3)},Lz=i=>u=>i.transporter.read({method:Rn.MethodEnum.Get,path:"1/clusters/mapping/top"},u),Rz=i=>(u,f)=>i.transporter.read({method:Rn.MethodEnum.Get,path:Wt.encode("1/clusters/mapping/%s",u)},f),Nz=i=>u=>{let g=u||{},{retrieveMappings:f}=g,c=Si(g,["retrieveMappings"]);return f===!0&&(c.getClusters=!0),i.transporter.read({method:Rn.MethodEnum.Get,path:"1/clusters/mapping/pending"},c)},id=i=>(u,f={})=>{let c={transporter:i.transporter,appId:i.appId,indexName:u};return Wt.addMethods(c,f.methods)},Bz=i=>u=>i.transporter.read({method:Rn.MethodEnum.Get,path:"1/keys"},u),jz=i=>u=>i.transporter.read({method:Rn.MethodEnum.Get,path:"1/clusters"},u),Uz=i=>u=>i.transporter.read({method:Rn.MethodEnum.Get,path:"1/indexes"},u),qz=i=>u=>i.transporter.read({method:Rn.MethodEnum.Get,path:"1/clusters/mapping"},u),zz=i=>(u,f,c)=>{let g=(t,C)=>id(i)(u,{methods:{waitTask:z0}}).waitTask(t.taskID,C);return Wt.createWaitablePromise(i.transporter.write({method:Rn.MethodEnum.Post,path:Wt.encode("1/indexes/%s/operation",u),data:{operation:"move",destination:f}},c),g)},Wz=i=>(u,f)=>{let c=(g,t)=>Promise.all(Object.keys(g.taskID).map(C=>id(i)(C,{methods:{waitTask:z0}}).waitTask(g.taskID[C],t)));return Wt.createWaitablePromise(i.transporter.write({method:Rn.MethodEnum.Post,path:"1/indexes/*/batch",data:{requests:u}},f),c)},Hz=i=>(u,f)=>i.transporter.read({method:Rn.MethodEnum.Post,path:"1/indexes/*/objects",data:{requests:u}},f),bz=i=>(u,f)=>{let c=u.map(g=>zn(dt({},g),{params:jo.serializeQueryParameters(g.params||{})}));return i.transporter.read({method:Rn.MethodEnum.Post,path:"1/indexes/*/queries",data:{requests:c},cacheable:!0},f)},Gz=i=>(u,f)=>Promise.all(u.map(c=>{let A=c.params,{facetName:g,facetQuery:t}=A,C=Si(A,["facetName","facetQuery"]);return id(i)(c.indexName,{methods:{searchForFacetValues:YC}}).searchForFacetValues(g,t,dt(dt({},f),C))})),Vz=i=>(u,f)=>{let c=jo.createMappedRequestOptions(f);return c.queryParameters["X-Algolia-User-ID"]=u,i.transporter.write({method:Rn.MethodEnum.Delete,path:"1/clusters/mapping"},c)},Yz=i=>(u,f)=>{let c=(g,t)=>Wt.createRetryablePromise(C=>rd(i)(u,t).catch(A=>{if(A.status!==404)throw A;return C()}));return Wt.createWaitablePromise(i.transporter.write({method:Rn.MethodEnum.Post,path:Wt.encode("1/keys/%s/restore",u)},f),c)},$z=i=>(u,f)=>i.transporter.read({method:Rn.MethodEnum.Post,path:"1/clusters/mapping/search",data:{query:u}},f),Kz=i=>(u,f)=>{let c=Object.assign({},f),L=f||{},{queryParameters:g}=L,t=Si(L,["queryParameters"]),C=g?{queryParameters:g}:{},A=["acl","indexes","referers","restrictSources","queryParameters","description","maxQueriesPerIPPerHour","maxHitsPerQuery"],x=N=>Object.keys(c).filter(j=>A.indexOf(j)!==-1).every(j=>N[j]===c[j]),D=(N,j)=>Wt.createRetryablePromise($=>rd(i)(u,j).then(h=>x(h)?Promise.resolve():$()));return Wt.createWaitablePromise(i.transporter.write({method:Rn.MethodEnum.Put,path:Wt.encode("1/keys/%s",u),data:C},t),D)},$C=i=>(u,f)=>{let c=(g,t)=>z0(i)(g.taskID,t);return Wt.createWaitablePromise(i.transporter.write({method:Rn.MethodEnum.Post,path:Wt.encode("1/indexes/%s/batch",i.indexName),data:{requests:u}},f),c)},Xz=i=>u=>mm(zn(dt({},u),{shouldStop:f=>f.cursor===void 0,request:f=>i.transporter.read({method:Rn.MethodEnum.Post,path:Wt.encode("1/indexes/%s/browse",i.indexName),data:f},u)})),Jz=i=>u=>{let f=dt({hitsPerPage:1e3},u);return mm(zn(dt({},f),{shouldStop:c=>c.hits.lengthzn(dt({},g),{hits:g.hits.map(t=>(delete t._highlightResult,t))}))}}))},Qz=i=>u=>{let f=dt({hitsPerPage:1e3},u);return mm(zn(dt({},f),{shouldStop:c=>c.hits.lengthzn(dt({},g),{hits:g.hits.map(t=>(delete t._highlightResult,t))}))}}))},_m=i=>(u,f,c)=>{let x=c||{},{batchSize:g}=x,t=Si(x,["batchSize"]),C={taskIDs:[],objectIDs:[]},A=(D=0)=>{let L=[],N;for(N=D;N({action:f,body:j})),t).then(j=>(C.objectIDs=C.objectIDs.concat(j.objectIDs),C.taskIDs.push(j.taskID),N++,A(N)))};return Wt.createWaitablePromise(A(),(D,L)=>Promise.all(D.taskIDs.map(N=>z0(i)(N,L))))},Zz=i=>u=>Wt.createWaitablePromise(i.transporter.write({method:Rn.MethodEnum.Post,path:Wt.encode("1/indexes/%s/clear",i.indexName)},u),(f,c)=>z0(i)(f.taskID,c)),eW=i=>u=>{let t=u||{},{forwardToReplicas:f}=t,c=Si(t,["forwardToReplicas"]),g=jo.createMappedRequestOptions(c);return f&&(g.queryParameters.forwardToReplicas=1),Wt.createWaitablePromise(i.transporter.write({method:Rn.MethodEnum.Post,path:Wt.encode("1/indexes/%s/rules/clear",i.indexName)},g),(C,A)=>z0(i)(C.taskID,A))},tW=i=>u=>{let t=u||{},{forwardToReplicas:f}=t,c=Si(t,["forwardToReplicas"]),g=jo.createMappedRequestOptions(c);return f&&(g.queryParameters.forwardToReplicas=1),Wt.createWaitablePromise(i.transporter.write({method:Rn.MethodEnum.Post,path:Wt.encode("1/indexes/%s/synonyms/clear",i.indexName)},g),(C,A)=>z0(i)(C.taskID,A))},nW=i=>(u,f)=>Wt.createWaitablePromise(i.transporter.write({method:Rn.MethodEnum.Post,path:Wt.encode("1/indexes/%s/deleteByQuery",i.indexName),data:u},f),(c,g)=>z0(i)(c.taskID,g)),rW=i=>u=>Wt.createWaitablePromise(i.transporter.write({method:Rn.MethodEnum.Delete,path:Wt.encode("1/indexes/%s",i.indexName)},u),(f,c)=>z0(i)(f.taskID,c)),iW=i=>(u,f)=>Wt.createWaitablePromise(JC(i)([u],f).then(c=>({taskID:c.taskIDs[0]})),(c,g)=>z0(i)(c.taskID,g)),JC=i=>(u,f)=>{let c=u.map(g=>({objectID:g}));return _m(i)(c,Cc.DeleteObject,f)},oW=i=>(u,f)=>{let C=f||{},{forwardToReplicas:c}=C,g=Si(C,["forwardToReplicas"]),t=jo.createMappedRequestOptions(g);return c&&(t.queryParameters.forwardToReplicas=1),Wt.createWaitablePromise(i.transporter.write({method:Rn.MethodEnum.Delete,path:Wt.encode("1/indexes/%s/rules/%s",i.indexName,u)},t),(A,x)=>z0(i)(A.taskID,x))},uW=i=>(u,f)=>{let C=f||{},{forwardToReplicas:c}=C,g=Si(C,["forwardToReplicas"]),t=jo.createMappedRequestOptions(g);return c&&(t.queryParameters.forwardToReplicas=1),Wt.createWaitablePromise(i.transporter.write({method:Rn.MethodEnum.Delete,path:Wt.encode("1/indexes/%s/synonyms/%s",i.indexName,u)},t),(A,x)=>z0(i)(A.taskID,x))},sW=i=>u=>QC(i)(u).then(()=>!0).catch(f=>{if(f.status!==404)throw f;return!1}),lW=i=>(u,f)=>{let x=f||{},{query:c,paginate:g}=x,t=Si(x,["query","paginate"]),C=0,A=()=>ZC(i)(c||"",zn(dt({},t),{page:C})).then(D=>{for(let[L,N]of Object.entries(D.hits))if(u(N))return{object:N,position:parseInt(L,10),page:C};if(C++,g===!1||C>=D.nbPages)throw GC();return A()});return A()},fW=i=>(u,f)=>i.transporter.read({method:Rn.MethodEnum.Get,path:Wt.encode("1/indexes/%s/%s",i.indexName,u)},f),cW=()=>(i,u)=>{for(let[f,c]of Object.entries(i.hits))if(c.objectID===u)return parseInt(f,10);return-1},aW=i=>(u,f)=>{let C=f||{},{attributesToRetrieve:c}=C,g=Si(C,["attributesToRetrieve"]),t=u.map(A=>dt({indexName:i.indexName,objectID:A},c?{attributesToRetrieve:c}:{}));return i.transporter.read({method:Rn.MethodEnum.Post,path:"1/indexes/*/objects",data:{requests:t}},g)},dW=i=>(u,f)=>i.transporter.read({method:Rn.MethodEnum.Get,path:Wt.encode("1/indexes/%s/rules/%s",i.indexName,u)},f),QC=i=>u=>i.transporter.read({method:Rn.MethodEnum.Get,path:Wt.encode("1/indexes/%s/settings",i.indexName),data:{getVersion:2}},u),pW=i=>(u,f)=>i.transporter.read({method:Rn.MethodEnum.Get,path:Wt.encode("1/indexes/%s/synonyms/%s",i.indexName,u)},f),eT=i=>(u,f)=>i.transporter.read({method:Rn.MethodEnum.Get,path:Wt.encode("1/indexes/%s/task/%s",i.indexName,u.toString())},f),hW=i=>(u,f)=>Wt.createWaitablePromise(tT(i)([u],f).then(c=>({objectID:c.objectIDs[0],taskID:c.taskIDs[0]})),(c,g)=>z0(i)(c.taskID,g)),tT=i=>(u,f)=>{let C=f||{},{createIfNotExists:c}=C,g=Si(C,["createIfNotExists"]),t=c?Cc.PartialUpdateObject:Cc.PartialUpdateObjectNoCreate;return _m(i)(u,t,g)},mW=i=>(u,f)=>{let h=f||{},{safe:c,autoGenerateObjectIDIfNotExist:g,batchSize:t}=h,C=Si(h,["safe","autoGenerateObjectIDIfNotExist","batchSize"]),A=(re,ce,Q,oe)=>Wt.createWaitablePromise(i.transporter.write({method:Rn.MethodEnum.Post,path:Wt.encode("1/indexes/%s/operation",re),data:{operation:Q,destination:ce}},oe),(Se,me)=>z0(i)(Se.taskID,me)),x=Math.random().toString(36).substring(7),D=`${i.indexName}_tmp_${x}`,L=rw({appId:i.appId,transporter:i.transporter,indexName:D}),N=[],j=A(i.indexName,D,"copy",zn(dt({},C),{scope:["settings","synonyms","rules"]}));N.push(j);let $=(c?j.wait(C):j).then(()=>{let re=L(u,zn(dt({},C),{autoGenerateObjectIDIfNotExist:g,batchSize:t}));return N.push(re),c?re.wait(C):re}).then(()=>{let re=A(D,i.indexName,"move",C);return N.push(re),c?re.wait(C):re}).then(()=>Promise.all(N)).then(([re,ce,Q])=>({objectIDs:ce.objectIDs,taskIDs:[re.taskID,...ce.taskIDs,Q.taskID]}));return Wt.createWaitablePromise($,(re,ce)=>Promise.all(N.map(Q=>Q.wait(ce))))},vW=i=>(u,f)=>iw(i)(u,zn(dt({},f),{clearExistingRules:!0})),gW=i=>(u,f)=>ow(i)(u,zn(dt({},f),{replaceExistingSynonyms:!0})),_W=i=>(u,f)=>Wt.createWaitablePromise(rw(i)([u],f).then(c=>({objectID:c.objectIDs[0],taskID:c.taskIDs[0]})),(c,g)=>z0(i)(c.taskID,g)),rw=i=>(u,f)=>{let C=f||{},{autoGenerateObjectIDIfNotExist:c}=C,g=Si(C,["autoGenerateObjectIDIfNotExist"]),t=c?Cc.AddObject:Cc.UpdateObject;if(t===Cc.UpdateObject){for(let A of u)if(A.objectID===void 0)return Wt.createWaitablePromise(Promise.reject(bC()))}return _m(i)(u,t,g)},yW=i=>(u,f)=>iw(i)([u],f),iw=i=>(u,f)=>{let A=f||{},{forwardToReplicas:c,clearExistingRules:g}=A,t=Si(A,["forwardToReplicas","clearExistingRules"]),C=jo.createMappedRequestOptions(t);return c&&(C.queryParameters.forwardToReplicas=1),g&&(C.queryParameters.clearExistingRules=1),Wt.createWaitablePromise(i.transporter.write({method:Rn.MethodEnum.Post,path:Wt.encode("1/indexes/%s/rules/batch",i.indexName),data:u},C),(x,D)=>z0(i)(x.taskID,D))},wW=i=>(u,f)=>ow(i)([u],f),ow=i=>(u,f)=>{let A=f||{},{forwardToReplicas:c,replaceExistingSynonyms:g}=A,t=Si(A,["forwardToReplicas","replaceExistingSynonyms"]),C=jo.createMappedRequestOptions(t);return c&&(C.queryParameters.forwardToReplicas=1),g&&(C.queryParameters.replaceExistingSynonyms=1),Wt.createWaitablePromise(i.transporter.write({method:Rn.MethodEnum.Post,path:Wt.encode("1/indexes/%s/synonyms/batch",i.indexName),data:u},C),(x,D)=>z0(i)(x.taskID,D))},ZC=i=>(u,f)=>i.transporter.read({method:Rn.MethodEnum.Post,path:Wt.encode("1/indexes/%s/query",i.indexName),data:{query:u},cacheable:!0},f),YC=i=>(u,f,c)=>i.transporter.read({method:Rn.MethodEnum.Post,path:Wt.encode("1/indexes/%s/facets/%s/query",i.indexName,u),data:{facetQuery:f},cacheable:!0},c),KC=i=>(u,f)=>i.transporter.read({method:Rn.MethodEnum.Post,path:Wt.encode("1/indexes/%s/rules/search",i.indexName),data:{query:u}},f),XC=i=>(u,f)=>i.transporter.read({method:Rn.MethodEnum.Post,path:Wt.encode("1/indexes/%s/synonyms/search",i.indexName),data:{query:u}},f),DW=i=>(u,f)=>{let C=f||{},{forwardToReplicas:c}=C,g=Si(C,["forwardToReplicas"]),t=jo.createMappedRequestOptions(g);return c&&(t.queryParameters.forwardToReplicas=1),Wt.createWaitablePromise(i.transporter.write({method:Rn.MethodEnum.Put,path:Wt.encode("1/indexes/%s/settings",i.indexName),data:u},t),(A,x)=>z0(i)(A.taskID,x))},z0=i=>(u,f)=>Wt.createRetryablePromise(c=>eT(i)(u,f).then(g=>g.status!=="published"?c():void 0)),EW={AddObject:"addObject",Analytics:"analytics",Browser:"browse",DeleteIndex:"deleteIndex",DeleteObject:"deleteObject",EditSettings:"editSettings",ListIndexes:"listIndexes",Logs:"logs",Recommendation:"recommendation",Search:"search",SeeUnretrievableAttributes:"seeUnretrievableAttributes",Settings:"settings",Usage:"usage"},Cc={AddObject:"addObject",UpdateObject:"updateObject",PartialUpdateObject:"partialUpdateObject",PartialUpdateObjectNoCreate:"partialUpdateObjectNoCreate",DeleteObject:"deleteObject"},gm={Settings:"settings",Synonyms:"synonyms",Rules:"rules"},SW={None:"none",StopIfEnoughMatches:"stopIfEnoughMatches"},CW={Synonym:"synonym",OneWaySynonym:"oneWaySynonym",AltCorrection1:"altCorrection1",AltCorrection2:"altCorrection2",Placeholder:"placeholder"};yt.ApiKeyACLEnum=EW;yt.BatchActionEnum=Cc;yt.ScopeEnum=gm;yt.StrategyEnum=SW;yt.SynonymEnum=CW;yt.addApiKey=Cz;yt.assignUserID=Tz;yt.assignUserIDs=xz;yt.batch=$C;yt.browseObjects=Xz;yt.browseRules=Jz;yt.browseSynonyms=Qz;yt.chunkedBatch=_m;yt.clearObjects=Zz;yt.clearRules=eW;yt.clearSynonyms=tW;yt.copyIndex=vm;yt.copyRules=kz;yt.copySettings=Az;yt.copySynonyms=Oz;yt.createBrowsablePromise=mm;yt.createMissingObjectIDError=bC;yt.createObjectNotFoundError=GC;yt.createSearchClient=Sz;yt.createValidUntilNotFoundError=VC;yt.deleteApiKey=Iz;yt.deleteBy=nW;yt.deleteIndex=rW;yt.deleteObject=iW;yt.deleteObjects=JC;yt.deleteRule=oW;yt.deleteSynonym=uW;yt.exists=sW;yt.findObject=lW;yt.generateSecuredApiKey=Pz;yt.getApiKey=rd;yt.getLogs=Mz;yt.getObject=fW;yt.getObjectPosition=cW;yt.getObjects=aW;yt.getRule=dW;yt.getSecuredApiKeyRemainingValidity=Fz;yt.getSettings=QC;yt.getSynonym=pW;yt.getTask=eT;yt.getTopUserIDs=Lz;yt.getUserID=Rz;yt.hasPendingMappings=Nz;yt.initIndex=id;yt.listApiKeys=Bz;yt.listClusters=jz;yt.listIndices=Uz;yt.listUserIDs=qz;yt.moveIndex=zz;yt.multipleBatch=Wz;yt.multipleGetObjects=Hz;yt.multipleQueries=bz;yt.multipleSearchForFacetValues=Gz;yt.partialUpdateObject=hW;yt.partialUpdateObjects=tT;yt.removeUserID=Vz;yt.replaceAllObjects=mW;yt.replaceAllRules=vW;yt.replaceAllSynonyms=gW;yt.restoreApiKey=Yz;yt.saveObject=_W;yt.saveObjects=rw;yt.saveRule=yW;yt.saveRules=iw;yt.saveSynonym=wW;yt.saveSynonyms=ow;yt.search=ZC;yt.searchForFacetValues=YC;yt.searchRules=KC;yt.searchSynonyms=XC;yt.searchUserIDs=$z;yt.setSettings=DW;yt.updateApiKey=Kz;yt.waitTask=z0});var iT=Me((SV,rT)=>{rT.exports=nT()});var oT=Me(ym=>{"use strict";Object.defineProperty(ym,"__esModule",{value:!0});function TW(){return{debug(i,u){return Promise.resolve()},info(i,u){return Promise.resolve()},error(i,u){return Promise.resolve()}}}var xW={Debug:1,Info:2,Error:3};ym.LogLevelEnum=xW;ym.createNullLogger=TW});var sT=Me((TV,uT)=>{uT.exports=oT()});var cT=Me(uw=>{"use strict";Object.defineProperty(uw,"__esModule",{value:!0});var lT=require("http"),fT=require("https"),kW=require("url");function AW(){let i={keepAlive:!0},u=new lT.Agent(i),f=new fT.Agent(i);return{send(c){return new Promise(g=>{let t=kW.parse(c.url),C=t.query===null?t.pathname:`${t.pathname}?${t.query}`,A=dt({agent:t.protocol==="https:"?f:u,hostname:t.hostname,path:C,method:c.method,headers:c.headers},t.port!==void 0?{port:t.port||""}:{}),x=(t.protocol==="https:"?fT:lT).request(A,j=>{let $="";j.on("data",h=>$+=h),j.on("end",()=>{clearTimeout(L),clearTimeout(N),g({status:j.statusCode||0,content:$,isTimedOut:!1})})}),D=(j,$)=>setTimeout(()=>{x.abort(),g({status:0,content:$,isTimedOut:!0})},j*1e3),L=D(c.connectTimeout,"Connection timeout"),N;x.on("error",j=>{clearTimeout(L),clearTimeout(N),g({status:0,content:j.message,isTimedOut:!1})}),x.once("response",()=>{clearTimeout(L),N=D(c.responseTimeout,"Socket timeout")}),c.data!==void 0&&x.write(c.data),x.end()})},destroy(){return u.destroy(),f.destroy(),Promise.resolve()}}}uw.createNodeHttpRequester=AW});var dT=Me((kV,aT)=>{aT.exports=cT()});var vT=Me((AV,pT)=>{"use strict";var hT=dC(),OW=mC(),Ma=UC(),sw=Q2(),lw=HC(),Mt=iT(),IW=sT(),PW=dT(),MW=ed();function mT(i,u,f){let c={appId:i,apiKey:u,timeouts:{connect:2,read:5,write:30},requester:PW.createNodeHttpRequester(),logger:IW.createNullLogger(),responsesCache:hT.createNullCache(),requestsCache:hT.createNullCache(),hostsCache:OW.createInMemoryCache(),userAgent:MW.createUserAgent(sw.version).add({segment:"Node.js",version:process.versions.node})};return Mt.createSearchClient(zn(dt(dt({},c),f),{methods:{search:Mt.multipleQueries,searchForFacetValues:Mt.multipleSearchForFacetValues,multipleBatch:Mt.multipleBatch,multipleGetObjects:Mt.multipleGetObjects,multipleQueries:Mt.multipleQueries,copyIndex:Mt.copyIndex,copySettings:Mt.copySettings,copyRules:Mt.copyRules,copySynonyms:Mt.copySynonyms,moveIndex:Mt.moveIndex,listIndices:Mt.listIndices,getLogs:Mt.getLogs,listClusters:Mt.listClusters,multipleSearchForFacetValues:Mt.multipleSearchForFacetValues,getApiKey:Mt.getApiKey,addApiKey:Mt.addApiKey,listApiKeys:Mt.listApiKeys,updateApiKey:Mt.updateApiKey,deleteApiKey:Mt.deleteApiKey,restoreApiKey:Mt.restoreApiKey,assignUserID:Mt.assignUserID,assignUserIDs:Mt.assignUserIDs,getUserID:Mt.getUserID,searchUserIDs:Mt.searchUserIDs,listUserIDs:Mt.listUserIDs,getTopUserIDs:Mt.getTopUserIDs,removeUserID:Mt.removeUserID,hasPendingMappings:Mt.hasPendingMappings,generateSecuredApiKey:Mt.generateSecuredApiKey,getSecuredApiKeyRemainingValidity:Mt.getSecuredApiKeyRemainingValidity,destroy:sw.destroy,initIndex:g=>t=>Mt.initIndex(g)(t,{methods:{batch:Mt.batch,delete:Mt.deleteIndex,getObject:Mt.getObject,getObjects:Mt.getObjects,saveObject:Mt.saveObject,saveObjects:Mt.saveObjects,search:Mt.search,searchForFacetValues:Mt.searchForFacetValues,waitTask:Mt.waitTask,setSettings:Mt.setSettings,getSettings:Mt.getSettings,partialUpdateObject:Mt.partialUpdateObject,partialUpdateObjects:Mt.partialUpdateObjects,deleteObject:Mt.deleteObject,deleteObjects:Mt.deleteObjects,deleteBy:Mt.deleteBy,clearObjects:Mt.clearObjects,browseObjects:Mt.browseObjects,getObjectPosition:Mt.getObjectPosition,findObject:Mt.findObject,exists:Mt.exists,saveSynonym:Mt.saveSynonym,saveSynonyms:Mt.saveSynonyms,getSynonym:Mt.getSynonym,searchSynonyms:Mt.searchSynonyms,browseSynonyms:Mt.browseSynonyms,deleteSynonym:Mt.deleteSynonym,clearSynonyms:Mt.clearSynonyms,replaceAllObjects:Mt.replaceAllObjects,replaceAllSynonyms:Mt.replaceAllSynonyms,searchRules:Mt.searchRules,getRule:Mt.getRule,deleteRule:Mt.deleteRule,saveRule:Mt.saveRule,saveRules:Mt.saveRules,replaceAllRules:Mt.replaceAllRules,browseRules:Mt.browseRules,clearRules:Mt.clearRules}}),initAnalytics:()=>g=>Ma.createAnalyticsClient(zn(dt(dt({},c),g),{methods:{addABTest:Ma.addABTest,getABTest:Ma.getABTest,getABTests:Ma.getABTests,stopABTest:Ma.stopABTest,deleteABTest:Ma.deleteABTest}})),initRecommendation:()=>g=>lw.createRecommendationClient(zn(dt(dt({},c),g),{methods:{getPersonalizationStrategy:lw.getPersonalizationStrategy,setPersonalizationStrategy:lw.setPersonalizationStrategy}}))}}))}mT.version=sw.version;pT.exports=mT});var _T=Me((OV,fw)=>{var gT=vT();fw.exports=gT;fw.exports.default=gT});var rf=Me(dw=>{"use strict";Object.defineProperty(dw,"__esModule",{value:!0});dw.default=kT;function kT(){}kT.prototype={diff:function(u,f){var c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},g=c.callback;typeof c=="function"&&(g=c,c={}),this.options=c;var t=this;function C(re){return g?(setTimeout(function(){g(void 0,re)},0),!0):re}u=this.castInput(u),f=this.castInput(f),u=this.removeEmpty(this.tokenize(u)),f=this.removeEmpty(this.tokenize(f));var A=f.length,x=u.length,D=1,L=A+x,N=[{newPos:-1,components:[]}],j=this.extractCommon(N[0],f,u,0);if(N[0].newPos+1>=A&&j+1>=x)return C([{value:this.join(f),count:f.length}]);function $(){for(var re=-1*D;re<=D;re+=2){var ce=void 0,Q=N[re-1],oe=N[re+1],Se=(oe?oe.newPos:0)-re;Q&&(N[re-1]=void 0);var me=Q&&Q.newPos+1=A&&Se+1>=x)return C(LW(t,ce.components,f,u,t.useLongestToken));N[re]=ce}D++}if(g)(function re(){setTimeout(function(){if(D>L)return g();$()||re()},0)})();else for(;D<=L;){var h=$();if(h)return h}},pushComponent:function(u,f,c){var g=u[u.length-1];g&&g.added===f&&g.removed===c?u[u.length-1]={count:g.count+1,added:f,removed:c}:u.push({count:1,added:f,removed:c})},extractCommon:function(u,f,c,g){for(var t=f.length,C=c.length,A=u.newPos,x=A-g,D=0;A+1$.length?re:$}),D.value=i.join(L)}else D.value=i.join(f.slice(A,A+D.count));A+=D.count,D.added||(x+=D.count)}}var j=u[C-1];return C>1&&typeof j.value=="string"&&(j.added||j.removed)&&i.equals("",j.value)&&(u[C-2].value+=j.value,u.pop()),u}function RW(i){return{newPos:i.newPos,components:i.components.slice(0)}}});var OT=Me(ld=>{"use strict";Object.defineProperty(ld,"__esModule",{value:!0});ld.diffChars=NW;ld.characterDiff=void 0;var jW=BW(rf());function BW(i){return i&&i.__esModule?i:{default:i}}var AT=new jW.default;ld.characterDiff=AT;function NW(i,u,f){return AT.diff(i,u,f)}});var hw=Me(pw=>{"use strict";Object.defineProperty(pw,"__esModule",{value:!0});pw.generateOptions=UW;function UW(i,u){if(typeof i=="function")u.callback=i;else if(i)for(var f in i)i.hasOwnProperty(f)&&(u[f]=i[f]);return u}});var MT=Me(Fa=>{"use strict";Object.defineProperty(Fa,"__esModule",{value:!0});Fa.diffWords=qW;Fa.diffWordsWithSpace=zW;Fa.wordDiff=void 0;var HW=WW(rf()),bW=hw();function WW(i){return i&&i.__esModule?i:{default:i}}var IT=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,PT=/\S/,fd=new HW.default;Fa.wordDiff=fd;fd.equals=function(i,u){return this.options.ignoreCase&&(i=i.toLowerCase(),u=u.toLowerCase()),i===u||this.options.ignoreWhitespace&&!PT.test(i)&&!PT.test(u)};fd.tokenize=function(i){for(var u=i.split(/(\s+|[()[\]{}'"]|\b)/),f=0;f{"use strict";Object.defineProperty(La,"__esModule",{value:!0});La.diffLines=GW;La.diffTrimmedLines=VW;La.lineDiff=void 0;var $W=YW(rf()),KW=hw();function YW(i){return i&&i.__esModule?i:{default:i}}var Dm=new $W.default;La.lineDiff=Dm;Dm.tokenize=function(i){var u=[],f=i.split(/(\n|\r\n)/);f[f.length-1]||f.pop();for(var c=0;c{"use strict";Object.defineProperty(cd,"__esModule",{value:!0});cd.diffSentences=XW;cd.sentenceDiff=void 0;var QW=JW(rf());function JW(i){return i&&i.__esModule?i:{default:i}}var mw=new QW.default;cd.sentenceDiff=mw;mw.tokenize=function(i){return i.split(/(\S.+?[.!?])(?=\s+|$)/)};function XW(i,u,f){return mw.diff(i,u,f)}});var LT=Me(ad=>{"use strict";Object.defineProperty(ad,"__esModule",{value:!0});ad.diffCss=ZW;ad.cssDiff=void 0;var tH=eH(rf());function eH(i){return i&&i.__esModule?i:{default:i}}var vw=new tH.default;ad.cssDiff=vw;vw.tokenize=function(i){return i.split(/([{}:;,]|\s+)/)};function ZW(i,u,f){return vw.diff(i,u,f)}});var NT=Me(Ra=>{"use strict";Object.defineProperty(Ra,"__esModule",{value:!0});Ra.diffJson=nH;Ra.canonicalize=Sm;Ra.jsonDiff=void 0;var RT=rH(rf()),iH=Em();function rH(i){return i&&i.__esModule?i:{default:i}}function Cm(i){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Cm=function(f){return typeof f}:Cm=function(f){return f&&typeof Symbol=="function"&&f.constructor===Symbol&&f!==Symbol.prototype?"symbol":typeof f},Cm(i)}var oH=Object.prototype.toString,xc=new RT.default;Ra.jsonDiff=xc;xc.useLongestToken=!0;xc.tokenize=iH.lineDiff.tokenize;xc.castInput=function(i){var u=this.options,f=u.undefinedReplacement,c=u.stringifyReplacer,g=c===void 0?function(t,C){return typeof C=="undefined"?f:C}:c;return typeof i=="string"?i:JSON.stringify(Sm(i,null,null,g),g," ")};xc.equals=function(i,u){return RT.default.prototype.equals.call(xc,i.replace(/,([\r\n])/g,"$1"),u.replace(/,([\r\n])/g,"$1"))};function nH(i,u,f){return xc.diff(i,u,f)}function Sm(i,u,f,c,g){u=u||[],f=f||[],c&&(i=c(g,i));var t;for(t=0;t{"use strict";Object.defineProperty(dd,"__esModule",{value:!0});dd.diffArrays=uH;dd.arrayDiff=void 0;var lH=sH(rf());function sH(i){return i&&i.__esModule?i:{default:i}}var pd=new lH.default;dd.arrayDiff=pd;pd.tokenize=function(i){return i.slice()};pd.join=pd.removeEmpty=function(i){return i};function uH(i,u,f){return pd.diff(i,u,f)}});var Tm=Me(gw=>{"use strict";Object.defineProperty(gw,"__esModule",{value:!0});gw.parsePatch=fH;function fH(i){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},f=i.split(/\r\n|[\n\v\f\r\x85]/),c=i.match(/\r\n|[\n\v\f\r\x85]/g)||[],g=[],t=0;function C(){var D={};for(g.push(D);t{"use strict";Object.defineProperty(_w,"__esModule",{value:!0});_w.default=cH;function cH(i,u,f){var c=!0,g=!1,t=!1,C=1;return function A(){if(c&&!t){if(g?C++:c=!1,i+C<=f)return C;t=!0}if(!g)return t||(c=!0),u<=i-C?-C++:(g=!0,A())}}});var zT=Me(xm=>{"use strict";Object.defineProperty(xm,"__esModule",{value:!0});xm.applyPatch=UT;xm.applyPatches=aH;var qT=Tm(),pH=dH(jT());function dH(i){return i&&i.__esModule?i:{default:i}}function UT(i,u){var f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(typeof u=="string"&&(u=(0,qT.parsePatch)(u)),Array.isArray(u)){if(u.length>1)throw new Error("applyPatch only works with a single input.");u=u[0]}var c=i.split(/\r\n|[\n\v\f\r\x85]/),g=i.match(/\r\n|[\n\v\f\r\x85]/g)||[],t=u.hunks,C=f.compareLine||function(Ot,Nt,Je,V){return Nt===V},A=0,x=f.fuzzFactor||0,D=0,L=0,N,j;function $(Ot,Nt){for(var Je=0;Je0?V[0]:" ",ge=V.length>0?V.substr(1):V;if(ne===" "||ne==="-"){if(!C(Nt+1,c[Nt],ne,ge)&&(A++,A>x))return!1;Nt++}}return!0}for(var h=0;h0?Le[0]:" ",ct=Le.length>0?Le.substr(1):Le,Ue=J.linedelimiters[Oe];if(ot===" ")Te++;else if(ot==="-")c.splice(Te,1),g.splice(Te,1);else if(ot==="+")c.splice(Te,0,ct),g.splice(Te,0,Ue),Te++;else if(ot==="\\"){var be=J.lines[Oe-1]?J.lines[Oe-1][0]:null;be==="+"?N=!0:be==="-"&&(j=!0)}}}if(N)for(;!c[c.length-1];)c.pop(),g.pop();else j&&(c.push(""),g.push(` -`));for(var At=0;At{"use strict";Object.defineProperty(hd,"__esModule",{value:!0});hd.structuredPatch=WT;hd.createTwoFilesPatch=HT;hd.createPatch=hH;var mH=Em();function yw(i){return _H(i)||gH(i)||vH()}function vH(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function gH(i){if(Symbol.iterator in Object(i)||Object.prototype.toString.call(i)==="[object Arguments]")return Array.from(i)}function _H(i){if(Array.isArray(i)){for(var u=0,f=new Array(i.length);u0?x(J.lines.slice(-C.context)):[],L-=j.length,N-=j.length)}(De=j).push.apply(De,yw(me.map(function(At){return(Se.added?"+":"-")+At}))),Se.added?h+=me.length:$+=me.length}else{if(L)if(me.length<=C.context*2&&oe=A.length-2&&me.length<=C.context){var ct=/\n$/.test(f),Ue=/\n$/.test(c),be=me.length==0&&j.length>ot.oldLines;!ct&&be&&j.splice(ot.oldLines,0,"\\ No newline at end of file"),(!ct&&!be||!Ue)&&j.push("\\ No newline at end of file")}D.push(ot),L=0,N=0,j=[]}$+=me.length,h+=me.length}},ce=0;ce{"use strict";Object.defineProperty(km,"__esModule",{value:!0});km.arrayEqual=yH;km.arrayStartsWith=bT;function yH(i,u){return i.length!==u.length?!1:bT(i,u)}function bT(i,u){if(u.length>i.length)return!1;for(var f=0;f{"use strict";Object.defineProperty(Am,"__esModule",{value:!0});Am.calcLineCount=VT;Am.merge=wH;var DH=ww(),EH=Tm(),Dw=GT();function Na(i){return TH(i)||CH(i)||SH()}function SH(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function CH(i){if(Symbol.iterator in Object(i)||Object.prototype.toString.call(i)==="[object Arguments]")return Array.from(i)}function TH(i){if(Array.isArray(i)){for(var u=0,f=new Array(i.length);u{"use strict";Object.defineProperty(Cw,"__esModule",{value:!0});Cw.convertChangesToDMP=OH;function OH(i){for(var u=[],f,c,g=0;g{"use strict";Object.defineProperty(Tw,"__esModule",{value:!0});Tw.convertChangesToXML=IH;function IH(i){for(var u=[],f=0;f"):c.removed&&u.push(""),u.push(PH(c.value)),c.added?u.push(""):c.removed&&u.push("")}return u.join("")}function PH(i){var u=i;return u=u.replace(/&/g,"&"),u=u.replace(//g,">"),u=u.replace(/"/g,"""),u}});var f9=Me(w0=>{"use strict";Object.defineProperty(w0,"__esModule",{value:!0});Object.defineProperty(w0,"Diff",{enumerable:!0,get:function(){return MH.default}});Object.defineProperty(w0,"diffChars",{enumerable:!0,get:function(){return FH.diffChars}});Object.defineProperty(w0,"diffWords",{enumerable:!0,get:function(){return o9.diffWords}});Object.defineProperty(w0,"diffWordsWithSpace",{enumerable:!0,get:function(){return o9.diffWordsWithSpace}});Object.defineProperty(w0,"diffLines",{enumerable:!0,get:function(){return u9.diffLines}});Object.defineProperty(w0,"diffTrimmedLines",{enumerable:!0,get:function(){return u9.diffTrimmedLines}});Object.defineProperty(w0,"diffSentences",{enumerable:!0,get:function(){return LH.diffSentences}});Object.defineProperty(w0,"diffCss",{enumerable:!0,get:function(){return RH.diffCss}});Object.defineProperty(w0,"diffJson",{enumerable:!0,get:function(){return s9.diffJson}});Object.defineProperty(w0,"canonicalize",{enumerable:!0,get:function(){return s9.canonicalize}});Object.defineProperty(w0,"diffArrays",{enumerable:!0,get:function(){return NH.diffArrays}});Object.defineProperty(w0,"applyPatch",{enumerable:!0,get:function(){return l9.applyPatch}});Object.defineProperty(w0,"applyPatches",{enumerable:!0,get:function(){return l9.applyPatches}});Object.defineProperty(w0,"parsePatch",{enumerable:!0,get:function(){return BH.parsePatch}});Object.defineProperty(w0,"merge",{enumerable:!0,get:function(){return jH.merge}});Object.defineProperty(w0,"structuredPatch",{enumerable:!0,get:function(){return xw.structuredPatch}});Object.defineProperty(w0,"createTwoFilesPatch",{enumerable:!0,get:function(){return xw.createTwoFilesPatch}});Object.defineProperty(w0,"createPatch",{enumerable:!0,get:function(){return xw.createPatch}});Object.defineProperty(w0,"convertChangesToDMP",{enumerable:!0,get:function(){return UH.convertChangesToDMP}});Object.defineProperty(w0,"convertChangesToXML",{enumerable:!0,get:function(){return qH.convertChangesToXML}});var MH=zH(rf()),FH=OT(),o9=MT(),u9=Em(),LH=FT(),RH=LT(),s9=NT(),NH=BT(),l9=zT(),BH=Tm(),jH=n9(),xw=ww(),UH=r9(),qH=i9();function zH(i){return i&&i.__esModule?i:{default:i}}});var HH={};jR(HH,{default:()=>GH});var wT=Er(require("@yarnpkg/cli")),Tc=Er(require("@yarnpkg/core"));var Z5=Er(ys()),Dc=Er(lr()),om=(0,Dc.memo)(({active:i})=>{let u=(0,Dc.useMemo)(()=>i?"\u25C9":"\u25EF",[i]),f=(0,Dc.useMemo)(()=>i?"green":"yellow",[i]);return Dc.default.createElement(Z5.Text,{color:f},u)});var Wf=Er(ys()),Bo=Er(lr());var eC=Er(ys()),um=Er(lr());function zf({active:i},u,f){let{stdin:c}=(0,eC.useStdin)(),g=(0,um.useCallback)((t,C)=>u(t,C),f);(0,um.useEffect)(()=>{if(!(!i||!c))return c.on("keypress",g),()=>{c.off("keypress",g)}},[i,g,c])}var sm;(function(f){f.BEFORE="before",f.AFTER="after"})(sm||(sm={}));var tC=function({active:i},u,f){zf({active:i},(c,g)=>{g.name==="tab"&&(g.shift?u(sm.BEFORE):u(sm.AFTER))},f)};var lm=function(i,u,{active:f,minus:c,plus:g,set:t,loop:C=!0}){zf({active:f},(A,x)=>{let D=u.indexOf(i);switch(x.name){case c:{let L=D-1;if(C){t(u[(u.length+L)%u.length]);return}if(L<0)return;t(u[L])}break;case g:{let L=D+1;if(C){t(u[L%u.length]);return}if(L>=u.length)return;t(u[L])}break}},[u,i,g,t,C])};var fm=({active:i=!0,children:u=[],radius:f=10,size:c=1,loop:g=!0,onFocusRequest:t,willReachEnd:C})=>{let A=ce=>{if(ce.key===null)throw new Error("Expected all children to have a key");return ce.key},x=Bo.default.Children.map(u,ce=>A(ce)),D=x[0],[L,N]=(0,Bo.useState)(D),j=x.indexOf(L);(0,Bo.useEffect)(()=>{x.includes(L)||N(D)},[u]),(0,Bo.useEffect)(()=>{C&&j>=x.length-2&&C()},[j]),tC({active:i&&!!t},ce=>{t==null||t(ce)},[t]),lm(L,x,{active:i,minus:"up",plus:"down",set:N,loop:g});let $=j-f,h=j+f;h>x.length&&($-=h-x.length,h=x.length),$<0&&(h+=-$,$=0),h>=x.length&&(h=x.length-1);let re=[];for(let ce=$;ce<=h;++ce){let Q=x[ce],oe=i&&Q===L;re.push(Bo.default.createElement(Wf.Box,{key:Q,height:c},Bo.default.createElement(Wf.Box,{marginLeft:1,marginRight:1},Bo.default.createElement(Wf.Text,null,oe?Bo.default.createElement(Wf.Text,{color:"cyan",bold:!0},">"):" ")),Bo.default.createElement(Wf.Box,null,Bo.default.cloneElement(u[ce],{active:oe}))))}return Bo.default.createElement(Wf.Box,{flexDirection:"column",width:"100%"},re)};var cm=Er(lr());var nC=Er(ys()),nf=Er(lr()),rC=Er(require("readline")),G3=nf.default.createContext(null),iC=({children:i})=>{let{stdin:u,setRawMode:f}=(0,nC.useStdin)();(0,nf.useEffect)(()=>{f&&f(!0),u&&(0,rC.emitKeypressEvents)(u)},[u,f]);let[c,g]=(0,nf.useState)(new Map),t=(0,nf.useMemo)(()=>({getAll:()=>c,get:C=>c.get(C),set:(C,A)=>g(new Map([...c,[C,A]]))}),[c,g]);return nf.default.createElement(G3.Provider,{value:t,children:i})};function Ec(i,u){let f=(0,cm.useContext)(G3);if(f===null)throw new Error("Expected this hook to run with a ministore context attached");if(typeof i=="undefined")return f.getAll();let c=(0,cm.useCallback)(t=>{f.set(i,t)},[i,f.set]),g=f.get(i);return typeof g=="undefined"&&(g=u),[g,c]}var am=Er(ys()),V3=Er(lr());async function dm(i,u){let f,c=t=>{let{exit:C}=(0,am.useApp)();zf({active:!0},(A,x)=>{x.name==="return"&&(f=t,C())},[C,t])},{waitUntilExit:g}=(0,am.render)(V3.default.createElement(iC,null,V3.default.createElement(i,zn(dt({},u),{useSubmit:c}))));return await g(),f}var DT=Er(require("clipanion")),ET=Er(lC()),un=Er(ys()),Pt=Er(lr());var yT=Er(_T()),cw={appId:"OFCNCOG2CU",apiKey:"6fe4476ee5a1832882e326b506d14126",indexName:"npm-search"},FW=(0,yT.default)(cw.appId,cw.apiKey).initIndex(cw.indexName),aw=async(i,u=0)=>await FW.search(i,{analyticsTags:["yarn-plugin-interactive-tools"],attributesToRetrieve:["name","version","owner","repository","humanDownloadsLast30Days"],page:u,hitsPerPage:10});var od=["regular","dev","peer"],ud=class extends wT.BaseCommand{async execute(){let u=await Tc.Configuration.find(this.context.cwd,this.context.plugins),f=()=>Pt.default.createElement(un.Box,{flexDirection:"row"},Pt.default.createElement(un.Box,{flexDirection:"column",width:48},Pt.default.createElement(un.Box,null,Pt.default.createElement(un.Text,null,"Press ",Pt.default.createElement(un.Text,{bold:!0,color:"cyanBright"},""),"/",Pt.default.createElement(un.Text,{bold:!0,color:"cyanBright"},"")," to move between packages.")),Pt.default.createElement(un.Box,null,Pt.default.createElement(un.Text,null,"Press ",Pt.default.createElement(un.Text,{bold:!0,color:"cyanBright"},"")," to select a package.")),Pt.default.createElement(un.Box,null,Pt.default.createElement(un.Text,null,"Press ",Pt.default.createElement(un.Text,{bold:!0,color:"cyanBright"},"")," again to change the target."))),Pt.default.createElement(un.Box,{flexDirection:"column"},Pt.default.createElement(un.Box,{marginLeft:1},Pt.default.createElement(un.Text,null,"Press ",Pt.default.createElement(un.Text,{bold:!0,color:"cyanBright"},"")," to install the selected packages.")),Pt.default.createElement(un.Box,{marginLeft:1},Pt.default.createElement(un.Text,null,"Press ",Pt.default.createElement(un.Text,{bold:!0,color:"cyanBright"},"")," to abort.")))),c=()=>Pt.default.createElement(Pt.default.Fragment,null,Pt.default.createElement(un.Box,{width:15},Pt.default.createElement(un.Text,{bold:!0,underline:!0,color:"gray"},"Owner")),Pt.default.createElement(un.Box,{width:11},Pt.default.createElement(un.Text,{bold:!0,underline:!0,color:"gray"},"Version")),Pt.default.createElement(un.Box,{width:10},Pt.default.createElement(un.Text,{bold:!0,underline:!0,color:"gray"},"Downloads"))),g=()=>Pt.default.createElement(un.Box,{width:17},Pt.default.createElement(un.Text,{bold:!0,underline:!0,color:"gray"},"Target")),t=({hit:$,active:h})=>{let[re,ce]=Ec($.name,null);zf({active:h},(Se,me)=>{if(me.name!=="space")return;if(!re){ce(od[0]);return}let De=od.indexOf(re)+1;De===od.length?ce(null):ce(od[De])},[re,ce]);let Q=Tc.structUtils.parseIdent($.name),oe=Tc.structUtils.prettyIdent(u,Q);return Pt.default.createElement(un.Box,null,Pt.default.createElement(un.Box,{width:45},Pt.default.createElement(un.Text,{bold:!0,wrap:"wrap"},oe)),Pt.default.createElement(un.Box,{width:14,marginLeft:1},Pt.default.createElement(un.Text,{bold:!0,wrap:"truncate"},$.owner.name)),Pt.default.createElement(un.Box,{width:10,marginLeft:1},Pt.default.createElement(un.Text,{italic:!0,wrap:"truncate"},$.version)),Pt.default.createElement(un.Box,{width:16,marginLeft:1},Pt.default.createElement(un.Text,null,$.humanDownloadsLast30Days)))},C=({name:$,active:h})=>{let[re]=Ec($,null),ce=Tc.structUtils.parseIdent($);return Pt.default.createElement(un.Box,null,Pt.default.createElement(un.Box,{width:47},Pt.default.createElement(un.Text,{bold:!0}," - ",Tc.structUtils.prettyIdent(u,ce))),od.map(Q=>Pt.default.createElement(un.Box,{key:Q,width:14,marginLeft:1},Pt.default.createElement(un.Text,null," ",Pt.default.createElement(om,{active:re===Q})," ",Pt.default.createElement(un.Text,{bold:!0},Q)))))},A=()=>Pt.default.createElement(un.Box,{marginTop:1},Pt.default.createElement(un.Text,null,"Powered by Algolia.")),D=await dm(({useSubmit:$})=>{let h=Ec();$(h);let re=Array.from(h.keys()).filter(Le=>h.get(Le)!==null),[ce,Q]=(0,Pt.useState)(""),[oe,Se]=(0,Pt.useState)(0),[me,De]=(0,Pt.useState)([]),J=Le=>{Le.match(/\t| /)||Q(Le)},Te=async()=>{Se(0);let Le=await aw(ce);Le.query===ce&&De(Le.hits)},Oe=async()=>{let Le=await aw(ce,oe+1);Le.query===ce&&Le.page-1===oe&&(Se(Le.page),De([...me,...Le.hits]))};return(0,Pt.useEffect)(()=>{ce?Te():De([])},[ce]),Pt.default.createElement(un.Box,{flexDirection:"column"},Pt.default.createElement(f,null),Pt.default.createElement(un.Box,{flexDirection:"row",marginTop:1},Pt.default.createElement(un.Text,{bold:!0},"Search: "),Pt.default.createElement(un.Box,{width:41},Pt.default.createElement(ET.default,{value:ce,onChange:J,placeholder:"i.e. babel, webpack, react...",showCursor:!1})),Pt.default.createElement(c,null)),me.length?Pt.default.createElement(fm,{radius:2,loop:!1,children:me.map(Le=>Pt.default.createElement(t,{key:Le.name,hit:Le,active:!1})),willReachEnd:Oe}):Pt.default.createElement(un.Text,{color:"gray"},"Start typing..."),Pt.default.createElement(un.Box,{flexDirection:"row",marginTop:1},Pt.default.createElement(un.Box,{width:49},Pt.default.createElement(un.Text,{bold:!0},"Selected:")),Pt.default.createElement(g,null)),re.length?re.map(Le=>Pt.default.createElement(C,{key:Le,name:Le,active:!1})):Pt.default.createElement(un.Text,{color:"gray"},"No selected packages..."),Pt.default.createElement(A,null))},{});if(typeof D=="undefined")return 1;let L=Array.from(D.keys()).filter($=>D.get($)==="regular"),N=Array.from(D.keys()).filter($=>D.get($)==="dev"),j=Array.from(D.keys()).filter($=>D.get($)==="peer");return L.length&&await this.cli.run(["add",...L]),N.length&&await this.cli.run(["add","--dev",...N]),j&&await this.cli.run(["add","--peer",...j]),0}};ud.paths=[["search"]],ud.usage=DT.Command.Usage({category:"Interactive commands",description:"open the search interface",details:` - This command opens a fullscreen terminal interface where you can search for and install packages from the npm registry. - `,examples:[["Open the search window","yarn search"]]});var ST=ud;var Im=Er(require("@yarnpkg/cli")),W0=Er(require("@yarnpkg/core"));var sd=Er(ys()),bf=Er(lr());var CT=Er(ys()),TT=Er(lr()),wm=({length:i,active:u})=>{if(i===0)return null;let f=i>1?` ${"-".repeat(i-1)}`:" ";return TT.default.createElement(CT.Text,{dimColor:!u},f)};var xT=function({active:i,skewer:u,options:f,value:c,onChange:g,sizes:t=[]}){let C=f.filter(({label:x})=>!!x).map(({value:x})=>x),A=f.findIndex(x=>x.value===c&&x.label!="");return lm(c,C,{active:i,minus:"left",plus:"right",set:g}),bf.default.createElement(bf.default.Fragment,null,f.map(({label:x},D)=>{let L=D===A,N=t[D]-1||0,j=x.replace(/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g,""),$=Math.max(0,N-j.length-2);return x?bf.default.createElement(sd.Box,{key:x,width:N,marginLeft:1},bf.default.createElement(sd.Text,{wrap:"truncate"},bf.default.createElement(om,{active:L})," ",x),u?bf.default.createElement(wm,{active:i,length:$}):null):bf.default.createElement(sd.Box,{key:`spacer-${D}`,width:N,marginLeft:1})}))};var c9=Er(require("@yarnpkg/plugin-essentials")),a9=Er(require("clipanion")),d9=Er(f9()),tr=Er(ys()),pn=Er(lr()),p9=Er(require("semver")),h9=/^((?:[\^~]|>=?)?)([0-9]+)(\.[0-9]+)(\.[0-9]+)((?:-\S+)?)$/,WH=10,md=class extends Im.BaseCommand{async execute(){let u=await W0.Configuration.find(this.context.cwd,this.context.plugins),{project:f,workspace:c}=await W0.Project.find(u,this.context.cwd),g=await W0.Cache.find(u);if(!c)throw new Im.WorkspaceRequiredError(f.cwd,this.context.cwd);await f.restoreInstallState({restoreResolutions:!1});let t=(Q,oe)=>{let Se=(0,d9.diffWords)(Q,oe),me="";for(let De of Se)De.added?me+=W0.formatUtils.pretty(u,De.value,"green"):De.removed||(me+=De.value);return me},C=(Q,oe)=>{if(Q===oe)return oe;let Se=W0.structUtils.parseRange(Q),me=W0.structUtils.parseRange(oe),De=Se.selector.match(h9),J=me.selector.match(h9);if(!De||!J)return t(Q,oe);let Te=["gray","red","yellow","green","magenta"],Oe=null,Le="";for(let ot=1;ot{let me=await c9.suggestUtils.fetchDescriptorFrom(Q,Se,{project:f,cache:g,preserveModifier:oe,workspace:c});return me!==null?me.range:Q.range},x=async Q=>{let oe=p9.default.valid(Q.range)?`^${Q.range}`:Q.range,[Se,me]=await Promise.all([A(Q,Q.range,oe).catch(()=>null),A(Q,Q.range,"latest").catch(()=>null)]),De=[{value:null,label:Q.range}];return Se&&Se!==Q.range?De.push({value:Se,label:C(Q.range,Se)}):De.push({value:null,label:""}),me&&me!==Se&&me!==Q.range?De.push({value:me,label:C(Q.range,me)}):De.push({value:null,label:""}),De},D=()=>pn.default.createElement(tr.Box,{flexDirection:"row"},pn.default.createElement(tr.Box,{flexDirection:"column",width:49},pn.default.createElement(tr.Box,{marginLeft:1},pn.default.createElement(tr.Text,null,"Press ",pn.default.createElement(tr.Text,{bold:!0,color:"cyanBright"},""),"/",pn.default.createElement(tr.Text,{bold:!0,color:"cyanBright"},"")," to select packages.")),pn.default.createElement(tr.Box,{marginLeft:1},pn.default.createElement(tr.Text,null,"Press ",pn.default.createElement(tr.Text,{bold:!0,color:"cyanBright"},""),"/",pn.default.createElement(tr.Text,{bold:!0,color:"cyanBright"},"")," to select versions."))),pn.default.createElement(tr.Box,{flexDirection:"column"},pn.default.createElement(tr.Box,{marginLeft:1},pn.default.createElement(tr.Text,null,"Press ",pn.default.createElement(tr.Text,{bold:!0,color:"cyanBright"},"")," to install.")),pn.default.createElement(tr.Box,{marginLeft:1},pn.default.createElement(tr.Text,null,"Press ",pn.default.createElement(tr.Text,{bold:!0,color:"cyanBright"},"")," to abort.")))),L=()=>pn.default.createElement(tr.Box,{flexDirection:"row",paddingTop:1,paddingBottom:1},pn.default.createElement(tr.Box,{width:50},pn.default.createElement(tr.Text,{bold:!0},pn.default.createElement(tr.Text,{color:"greenBright"},"?")," Pick the packages you want to upgrade.")),pn.default.createElement(tr.Box,{width:17},pn.default.createElement(tr.Text,{bold:!0,underline:!0,color:"gray"},"Current")),pn.default.createElement(tr.Box,{width:17},pn.default.createElement(tr.Text,{bold:!0,underline:!0,color:"gray"},"Range")),pn.default.createElement(tr.Box,{width:17},pn.default.createElement(tr.Text,{bold:!0,underline:!0,color:"gray"},"Latest"))),N=({active:Q,descriptor:oe,suggestions:Se})=>{let[me,De]=Ec(oe.descriptorHash,null),J=W0.structUtils.stringifyIdent(oe),Te=Math.max(0,45-J.length);return pn.default.createElement(pn.default.Fragment,null,pn.default.createElement(tr.Box,null,pn.default.createElement(tr.Box,{width:45},pn.default.createElement(tr.Text,{bold:!0},W0.structUtils.prettyIdent(u,oe)),pn.default.createElement(wm,{active:Q,length:Te})),Se!==null?pn.default.createElement(xT,{active:Q,options:Se,value:me,skewer:!0,onChange:De,sizes:[17,17,17]}):pn.default.createElement(tr.Box,{marginLeft:2},pn.default.createElement(tr.Text,{color:"gray"},"Fetching suggestions..."))))},j=({dependencies:Q})=>{let[oe,Se]=(0,pn.useState)(null),me=(0,pn.useRef)(!0);return(0,pn.useEffect)(()=>()=>{me.current=!1}),(0,pn.useEffect)(()=>{Promise.all(Q.map(De=>x(De))).then(De=>{let J=Q.map((Te,Oe)=>{let Le=De[Oe];return[Te,Le]}).filter(([Te,Oe])=>Oe.filter(Le=>Le.label!=="").length>1);me.current&&Se(J)})},[]),oe?oe.length?pn.default.createElement(fm,{radius:WH,children:oe.map(([De,J])=>pn.default.createElement(N,{key:De.descriptorHash,active:!1,descriptor:De,suggestions:J}))}):pn.default.createElement(tr.Text,null,"No upgrades found"):pn.default.createElement(tr.Text,null,"Fetching suggestions...")},h=await dm(({useSubmit:Q})=>{Q(Ec());let oe=new Map;for(let me of f.workspaces)for(let De of["dependencies","devDependencies"])for(let J of me.manifest[De].values())f.tryWorkspaceByDescriptor(J)===null&&oe.set(J.descriptorHash,J);let Se=W0.miscUtils.sortMap(oe.values(),me=>W0.structUtils.stringifyDescriptor(me));return pn.default.createElement(tr.Box,{flexDirection:"column"},pn.default.createElement(D,null),pn.default.createElement(L,null),pn.default.createElement(j,{dependencies:Se}))},{});if(typeof h=="undefined")return 1;let re=!1;for(let Q of f.workspaces)for(let oe of["dependencies","devDependencies"]){let Se=Q.manifest[oe];for(let me of Se.values()){let De=h.get(me.descriptorHash);typeof De!="undefined"&&De!==null&&(Se.set(me.identHash,W0.structUtils.makeDescriptor(me,De)),re=!0)}}return re?(await W0.StreamReport.start({configuration:u,stdout:this.context.stdout,includeLogs:!this.context.quiet},async Q=>{await f.install({cache:g,report:Q})})).exitCode():0}};md.paths=[["upgrade-interactive"]],md.usage=a9.Command.Usage({category:"Interactive commands",description:"open the upgrade interface",details:` - This command opens a fullscreen terminal interface where you can see any out of date packages used by your application, their status compared to the latest versions available on the remote registry, and select packages to upgrade. - `,examples:[["Open the upgrade window","yarn upgrade-interactive"]]});var m9=md;var bH={commands:[ST,m9]},GH=bH;return HH;})(); -/* -object-assign -(c) Sindre Sorhus -@license MIT -*/ -/** - * @license - * Lodash - * Copyright OpenJS Foundation and other contributors - * Released under MIT license - * Based on Underscore.js 1.8.3 - * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */ -/** @license React v0.0.0-experimental-51a3aa6af - * react-debug-tools.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/** @license React v0.0.0-experimental-51a3aa6af - * react-is.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/** @license React v0.0.0-experimental-51a3aa6af - * react.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/** @license React v0.18.0 - * scheduler.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/** @license React v0.24.0 - * react-reconciler.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/** @license React v16.13.1 - * react.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -return plugin; -} -}; diff --git a/tgui/.yarn/releases/yarn-3.3.1.cjs b/tgui/.yarn/releases/yarn-3.3.1.cjs deleted file mode 100644 index 53a282e439a3..000000000000 --- a/tgui/.yarn/releases/yarn-3.3.1.cjs +++ /dev/null @@ -1,823 +0,0 @@ -#!/usr/bin/env node -/* eslint-disable */ -//prettier-ignore -(()=>{var dfe=Object.create;var jS=Object.defineProperty;var Cfe=Object.getOwnPropertyDescriptor;var mfe=Object.getOwnPropertyNames;var Efe=Object.getPrototypeOf,Ife=Object.prototype.hasOwnProperty;var J=(r=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(r,{get:(e,t)=>(typeof require<"u"?require:e)[t]}):r)(function(r){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+r+'" is not supported')});var y=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),ht=(r,e)=>{for(var t in e)jS(r,t,{get:e[t],enumerable:!0})},yfe=(r,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of mfe(e))!Ife.call(r,n)&&n!==t&&jS(r,n,{get:()=>e[n],enumerable:!(i=Cfe(e,n))||i.enumerable});return r};var ne=(r,e,t)=>(t=r!=null?dfe(Efe(r)):{},yfe(e||!r||!r.__esModule?jS(t,"default",{value:r,enumerable:!0}):t,r));var aK=y((uZe,oK)=>{oK.exports=sK;sK.sync=Gfe;var iK=J("fs");function Hfe(r,e){var t=e.pathExt!==void 0?e.pathExt:process.env.PATHEXT;if(!t||(t=t.split(";"),t.indexOf("")!==-1))return!0;for(var i=0;i{uK.exports=lK;lK.sync=Yfe;var AK=J("fs");function lK(r,e,t){AK.stat(r,function(i,n){t(i,i?!1:cK(n,e))})}function Yfe(r,e){return cK(AK.statSync(r),e)}function cK(r,e){return r.isFile()&&jfe(r,e)}function jfe(r,e){var t=r.mode,i=r.uid,n=r.gid,s=e.uid!==void 0?e.uid:process.getuid&&process.getuid(),o=e.gid!==void 0?e.gid:process.getgid&&process.getgid(),a=parseInt("100",8),l=parseInt("010",8),c=parseInt("001",8),u=a|l,g=t&c||t&l&&n===o||t&a&&i===s||t&u&&s===0;return g}});var hK=y((hZe,fK)=>{var fZe=J("fs"),OI;process.platform==="win32"||global.TESTING_WINDOWS?OI=aK():OI=gK();fK.exports=av;av.sync=qfe;function av(r,e,t){if(typeof e=="function"&&(t=e,e={}),!t){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(i,n){av(r,e||{},function(s,o){s?n(s):i(o)})})}OI(r,e||{},function(i,n){i&&(i.code==="EACCES"||e&&e.ignoreErrors)&&(i=null,n=!1),t(i,n)})}function qfe(r,e){try{return OI.sync(r,e||{})}catch(t){if(e&&e.ignoreErrors||t.code==="EACCES")return!1;throw t}}});var yK=y((pZe,IK)=>{var _g=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",pK=J("path"),Jfe=_g?";":":",dK=hK(),CK=r=>Object.assign(new Error(`not found: ${r}`),{code:"ENOENT"}),mK=(r,e)=>{let t=e.colon||Jfe,i=r.match(/\//)||_g&&r.match(/\\/)?[""]:[..._g?[process.cwd()]:[],...(e.path||process.env.PATH||"").split(t)],n=_g?e.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",s=_g?n.split(t):[""];return _g&&r.indexOf(".")!==-1&&s[0]!==""&&s.unshift(""),{pathEnv:i,pathExt:s,pathExtExe:n}},EK=(r,e,t)=>{typeof e=="function"&&(t=e,e={}),e||(e={});let{pathEnv:i,pathExt:n,pathExtExe:s}=mK(r,e),o=[],a=c=>new Promise((u,g)=>{if(c===i.length)return e.all&&o.length?u(o):g(CK(r));let f=i[c],h=/^".*"$/.test(f)?f.slice(1,-1):f,p=pK.join(h,r),C=!h&&/^\.[\\\/]/.test(r)?r.slice(0,2)+p:p;u(l(C,c,0))}),l=(c,u,g)=>new Promise((f,h)=>{if(g===n.length)return f(a(u+1));let p=n[g];dK(c+p,{pathExt:s},(C,w)=>{if(!C&&w)if(e.all)o.push(c+p);else return f(c+p);return f(l(c,u,g+1))})});return t?a(0).then(c=>t(null,c),t):a(0)},Wfe=(r,e)=>{e=e||{};let{pathEnv:t,pathExt:i,pathExtExe:n}=mK(r,e),s=[];for(let o=0;o{"use strict";var wK=(r={})=>{let e=r.env||process.env;return(r.platform||process.platform)!=="win32"?"PATH":Object.keys(e).reverse().find(i=>i.toUpperCase()==="PATH")||"Path"};Av.exports=wK;Av.exports.default=wK});var vK=y((CZe,SK)=>{"use strict";var bK=J("path"),zfe=yK(),Vfe=BK();function QK(r,e){let t=r.options.env||process.env,i=process.cwd(),n=r.options.cwd!=null,s=n&&process.chdir!==void 0&&!process.chdir.disabled;if(s)try{process.chdir(r.options.cwd)}catch{}let o;try{o=zfe.sync(r.command,{path:t[Vfe({env:t})],pathExt:e?bK.delimiter:void 0})}catch{}finally{s&&process.chdir(i)}return o&&(o=bK.resolve(n?r.options.cwd:"",o)),o}function Xfe(r){return QK(r)||QK(r,!0)}SK.exports=Xfe});var xK=y((mZe,cv)=>{"use strict";var lv=/([()\][%!^"`<>&|;, *?])/g;function _fe(r){return r=r.replace(lv,"^$1"),r}function Zfe(r,e){return r=`${r}`,r=r.replace(/(\\*)"/g,'$1$1\\"'),r=r.replace(/(\\*)$/,"$1$1"),r=`"${r}"`,r=r.replace(lv,"^$1"),e&&(r=r.replace(lv,"^$1")),r}cv.exports.command=_fe;cv.exports.argument=Zfe});var DK=y((EZe,PK)=>{"use strict";PK.exports=/^#!(.*)/});var RK=y((IZe,kK)=>{"use strict";var $fe=DK();kK.exports=(r="")=>{let e=r.match($fe);if(!e)return null;let[t,i]=e[0].replace(/#! ?/,"").split(" "),n=t.split("/").pop();return n==="env"?i:i?`${n} ${i}`:n}});var NK=y((yZe,FK)=>{"use strict";var uv=J("fs"),ehe=RK();function the(r){let t=Buffer.alloc(150),i;try{i=uv.openSync(r,"r"),uv.readSync(i,t,0,150,0),uv.closeSync(i)}catch{}return ehe(t.toString())}FK.exports=the});var MK=y((wZe,OK)=>{"use strict";var rhe=J("path"),TK=vK(),LK=xK(),ihe=NK(),nhe=process.platform==="win32",she=/\.(?:com|exe)$/i,ohe=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function ahe(r){r.file=TK(r);let e=r.file&&ihe(r.file);return e?(r.args.unshift(r.file),r.command=e,TK(r)):r.file}function Ahe(r){if(!nhe)return r;let e=ahe(r),t=!she.test(e);if(r.options.forceShell||t){let i=ohe.test(e);r.command=rhe.normalize(r.command),r.command=LK.command(r.command),r.args=r.args.map(s=>LK.argument(s,i));let n=[r.command].concat(r.args).join(" ");r.args=["/d","/s","/c",`"${n}"`],r.command=process.env.comspec||"cmd.exe",r.options.windowsVerbatimArguments=!0}return r}function lhe(r,e,t){e&&!Array.isArray(e)&&(t=e,e=null),e=e?e.slice(0):[],t=Object.assign({},t);let i={command:r,args:e,options:t,file:void 0,original:{command:r,args:e}};return t.shell?i:Ahe(i)}OK.exports=lhe});var HK=y((BZe,KK)=>{"use strict";var gv=process.platform==="win32";function fv(r,e){return Object.assign(new Error(`${e} ${r.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${e} ${r.command}`,path:r.command,spawnargs:r.args})}function che(r,e){if(!gv)return;let t=r.emit;r.emit=function(i,n){if(i==="exit"){let s=UK(n,e,"spawn");if(s)return t.call(r,"error",s)}return t.apply(r,arguments)}}function UK(r,e){return gv&&r===1&&!e.file?fv(e.original,"spawn"):null}function uhe(r,e){return gv&&r===1&&!e.file?fv(e.original,"spawnSync"):null}KK.exports={hookChildProcess:che,verifyENOENT:UK,verifyENOENTSync:uhe,notFoundError:fv}});var dv=y((bZe,Zg)=>{"use strict";var GK=J("child_process"),hv=MK(),pv=HK();function YK(r,e,t){let i=hv(r,e,t),n=GK.spawn(i.command,i.args,i.options);return pv.hookChildProcess(n,i),n}function ghe(r,e,t){let i=hv(r,e,t),n=GK.spawnSync(i.command,i.args,i.options);return n.error=n.error||pv.verifyENOENTSync(n.status,i),n}Zg.exports=YK;Zg.exports.spawn=YK;Zg.exports.sync=ghe;Zg.exports._parse=hv;Zg.exports._enoent=pv});var qK=y((QZe,jK)=>{"use strict";function fhe(r,e){function t(){this.constructor=r}t.prototype=e.prototype,r.prototype=new t}function uc(r,e,t,i){this.message=r,this.expected=e,this.found=t,this.location=i,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,uc)}fhe(uc,Error);uc.buildMessage=function(r,e){var t={literal:function(c){return'"'+n(c.text)+'"'},class:function(c){var u="",g;for(g=0;g0){for(g=1,f=1;g>",re=de(">>",!1),me=">&",tt=de(">&",!1),Rt=">",It=de(">",!1),Ur="<<<",oi=de("<<<",!1),pi="<&",pr=de("<&",!1),di="<",ai=de("<",!1),Os=function(m){return{type:"argument",segments:[].concat(...m)}},dr=function(m){return m},Bi="$'",_n=de("$'",!1),pa="'",EA=de("'",!1),kg=function(m){return[{type:"text",text:m}]},Zn='""',IA=de('""',!1),da=function(){return{type:"text",text:""}},Jp='"',yA=de('"',!1),wA=function(m){return m},Br=function(m){return{type:"arithmetic",arithmetic:m,quoted:!0}},Vl=function(m){return{type:"shell",shell:m,quoted:!0}},Rg=function(m){return{type:"variable",...m,quoted:!0}},Eo=function(m){return{type:"text",text:m}},Fg=function(m){return{type:"arithmetic",arithmetic:m,quoted:!1}},Wp=function(m){return{type:"shell",shell:m,quoted:!1}},zp=function(m){return{type:"variable",...m,quoted:!1}},Pr=function(m){return{type:"glob",pattern:m}},oe=/^[^']/,Io=Ye(["'"],!0,!1),kn=function(m){return m.join("")},Ng=/^[^$"]/,bt=Ye(["$",'"'],!0,!1),Xl=`\\ -`,Rn=de(`\\ -`,!1),$n=function(){return""},es="\\",ut=de("\\",!1),yo=/^[\\$"`]/,at=Ye(["\\","$",'"',"`"],!1,!1),ln=function(m){return m},S="\\a",Lt=de("\\a",!1),Tg=function(){return"a"},_l="\\b",Vp=de("\\b",!1),Xp=function(){return"\b"},_p=/^[Ee]/,Zp=Ye(["E","e"],!1,!1),$p=function(){return"\x1B"},G="\\f",yt=de("\\f",!1),BA=function(){return"\f"},Wi="\\n",Zl=de("\\n",!1),We=function(){return` -`},Ca="\\r",Lg=de("\\r",!1),uI=function(){return"\r"},ed="\\t",gI=de("\\t",!1),ar=function(){return" "},Fn="\\v",$l=de("\\v",!1),td=function(){return"\v"},Ms=/^[\\'"?]/,ma=Ye(["\\","'",'"',"?"],!1,!1),cn=function(m){return String.fromCharCode(parseInt(m,16))},ke="\\x",Og=de("\\x",!1),ec="\\u",Us=de("\\u",!1),tc="\\U",bA=de("\\U",!1),Mg=function(m){return String.fromCodePoint(parseInt(m,16))},Ug=/^[0-7]/,Ea=Ye([["0","7"]],!1,!1),Ia=/^[0-9a-fA-f]/,$e=Ye([["0","9"],["a","f"],["A","f"]],!1,!1),wo=rt(),QA="-",rc=de("-",!1),Ks="+",ic=de("+",!1),fI=".",rd=de(".",!1),Kg=function(m,Q,F){return{type:"number",value:(m==="-"?-1:1)*parseFloat(Q.join("")+"."+F.join(""))}},id=function(m,Q){return{type:"number",value:(m==="-"?-1:1)*parseInt(Q.join(""))}},hI=function(m){return{type:"variable",...m}},nc=function(m){return{type:"variable",name:m}},pI=function(m){return m},Hg="*",SA=de("*",!1),Nr="/",dI=de("/",!1),Hs=function(m,Q,F){return{type:Q==="*"?"multiplication":"division",right:F}},Gs=function(m,Q){return Q.reduce((F,K)=>({left:F,...K}),m)},Gg=function(m,Q,F){return{type:Q==="+"?"addition":"subtraction",right:F}},vA="$((",R=de("$((",!1),q="))",pe=de("))",!1),Ne=function(m){return m},xe="$(",qe=de("$(",!1),dt=function(m){return m},Ft="${",Nn=de("${",!1),vS=":-",AU=de(":-",!1),lU=function(m,Q){return{name:m,defaultValue:Q}},xS=":-}",cU=de(":-}",!1),uU=function(m){return{name:m,defaultValue:[]}},PS=":+",gU=de(":+",!1),fU=function(m,Q){return{name:m,alternativeValue:Q}},DS=":+}",hU=de(":+}",!1),pU=function(m){return{name:m,alternativeValue:[]}},kS=function(m){return{name:m}},dU="$",CU=de("$",!1),mU=function(m){return e.isGlobPattern(m)},EU=function(m){return m},RS=/^[a-zA-Z0-9_]/,FS=Ye([["a","z"],["A","Z"],["0","9"],"_"],!1,!1),NS=function(){return O()},TS=/^[$@*?#a-zA-Z0-9_\-]/,LS=Ye(["$","@","*","?","#",["a","z"],["A","Z"],["0","9"],"_","-"],!1,!1),IU=/^[(){}<>$|&; \t"']/,Yg=Ye(["(",")","{","}","<",">","$","|","&",";"," "," ",'"',"'"],!1,!1),OS=/^[<>&; \t"']/,MS=Ye(["<",">","&",";"," "," ",'"',"'"],!1,!1),CI=/^[ \t]/,mI=Ye([" "," "],!1,!1),b=0,Fe=0,xA=[{line:1,column:1}],d=0,E=[],I=0,k;if("startRule"in e){if(!(e.startRule in i))throw new Error(`Can't start parsing from rule "`+e.startRule+'".');n=i[e.startRule]}function O(){return r.substring(Fe,b)}function X(){return Et(Fe,b)}function te(m,Q){throw Q=Q!==void 0?Q:Et(Fe,b),Fi([At(m)],r.substring(Fe,b),Q)}function ye(m,Q){throw Q=Q!==void 0?Q:Et(Fe,b),Tn(m,Q)}function de(m,Q){return{type:"literal",text:m,ignoreCase:Q}}function Ye(m,Q,F){return{type:"class",parts:m,inverted:Q,ignoreCase:F}}function rt(){return{type:"any"}}function wt(){return{type:"end"}}function At(m){return{type:"other",description:m}}function et(m){var Q=xA[m],F;if(Q)return Q;for(F=m-1;!xA[F];)F--;for(Q=xA[F],Q={line:Q.line,column:Q.column};Fd&&(d=b,E=[]),E.push(m))}function Tn(m,Q){return new uc(m,null,null,Q)}function Fi(m,Q,F){return new uc(uc.buildMessage(m,Q),m,Q,F)}function PA(){var m,Q;return m=b,Q=Kr(),Q===t&&(Q=null),Q!==t&&(Fe=m,Q=s(Q)),m=Q,m}function Kr(){var m,Q,F,K,ce;if(m=b,Q=Hr(),Q!==t){for(F=[],K=Me();K!==t;)F.push(K),K=Me();F!==t?(K=ya(),K!==t?(ce=ts(),ce===t&&(ce=null),ce!==t?(Fe=m,Q=o(Q,K,ce),m=Q):(b=m,m=t)):(b=m,m=t)):(b=m,m=t)}else b=m,m=t;if(m===t)if(m=b,Q=Hr(),Q!==t){for(F=[],K=Me();K!==t;)F.push(K),K=Me();F!==t?(K=ya(),K===t&&(K=null),K!==t?(Fe=m,Q=a(Q,K),m=Q):(b=m,m=t)):(b=m,m=t)}else b=m,m=t;return m}function ts(){var m,Q,F,K,ce;for(m=b,Q=[],F=Me();F!==t;)Q.push(F),F=Me();if(Q!==t)if(F=Kr(),F!==t){for(K=[],ce=Me();ce!==t;)K.push(ce),ce=Me();K!==t?(Fe=m,Q=l(F),m=Q):(b=m,m=t)}else b=m,m=t;else b=m,m=t;return m}function ya(){var m;return r.charCodeAt(b)===59?(m=c,b++):(m=t,I===0&&Be(u)),m===t&&(r.charCodeAt(b)===38?(m=g,b++):(m=t,I===0&&Be(f))),m}function Hr(){var m,Q,F;return m=b,Q=yU(),Q!==t?(F=$ge(),F===t&&(F=null),F!==t?(Fe=m,Q=h(Q,F),m=Q):(b=m,m=t)):(b=m,m=t),m}function $ge(){var m,Q,F,K,ce,Qe,ft;for(m=b,Q=[],F=Me();F!==t;)Q.push(F),F=Me();if(Q!==t)if(F=efe(),F!==t){for(K=[],ce=Me();ce!==t;)K.push(ce),ce=Me();if(K!==t)if(ce=Hr(),ce!==t){for(Qe=[],ft=Me();ft!==t;)Qe.push(ft),ft=Me();Qe!==t?(Fe=m,Q=p(F,ce),m=Q):(b=m,m=t)}else b=m,m=t;else b=m,m=t}else b=m,m=t;else b=m,m=t;return m}function efe(){var m;return r.substr(b,2)===C?(m=C,b+=2):(m=t,I===0&&Be(w)),m===t&&(r.substr(b,2)===B?(m=B,b+=2):(m=t,I===0&&Be(v))),m}function yU(){var m,Q,F;return m=b,Q=ife(),Q!==t?(F=tfe(),F===t&&(F=null),F!==t?(Fe=m,Q=D(Q,F),m=Q):(b=m,m=t)):(b=m,m=t),m}function tfe(){var m,Q,F,K,ce,Qe,ft;for(m=b,Q=[],F=Me();F!==t;)Q.push(F),F=Me();if(Q!==t)if(F=rfe(),F!==t){for(K=[],ce=Me();ce!==t;)K.push(ce),ce=Me();if(K!==t)if(ce=yU(),ce!==t){for(Qe=[],ft=Me();ft!==t;)Qe.push(ft),ft=Me();Qe!==t?(Fe=m,Q=T(F,ce),m=Q):(b=m,m=t)}else b=m,m=t;else b=m,m=t}else b=m,m=t;else b=m,m=t;return m}function rfe(){var m;return r.substr(b,2)===H?(m=H,b+=2):(m=t,I===0&&Be(j)),m===t&&(r.charCodeAt(b)===124?(m=$,b++):(m=t,I===0&&Be(V))),m}function EI(){var m,Q,F,K,ce,Qe;if(m=b,Q=FU(),Q!==t)if(r.charCodeAt(b)===61?(F=W,b++):(F=t,I===0&&Be(Z)),F!==t)if(K=bU(),K!==t){for(ce=[],Qe=Me();Qe!==t;)ce.push(Qe),Qe=Me();ce!==t?(Fe=m,Q=A(Q,K),m=Q):(b=m,m=t)}else b=m,m=t;else b=m,m=t;else b=m,m=t;if(m===t)if(m=b,Q=FU(),Q!==t)if(r.charCodeAt(b)===61?(F=W,b++):(F=t,I===0&&Be(Z)),F!==t){for(K=[],ce=Me();ce!==t;)K.push(ce),ce=Me();K!==t?(Fe=m,Q=ae(Q),m=Q):(b=m,m=t)}else b=m,m=t;else b=m,m=t;return m}function ife(){var m,Q,F,K,ce,Qe,ft,Bt,Vr,Ci,rs;for(m=b,Q=[],F=Me();F!==t;)Q.push(F),F=Me();if(Q!==t)if(r.charCodeAt(b)===40?(F=ge,b++):(F=t,I===0&&Be(_)),F!==t){for(K=[],ce=Me();ce!==t;)K.push(ce),ce=Me();if(K!==t)if(ce=Kr(),ce!==t){for(Qe=[],ft=Me();ft!==t;)Qe.push(ft),ft=Me();if(Qe!==t)if(r.charCodeAt(b)===41?(ft=L,b++):(ft=t,I===0&&Be(N)),ft!==t){for(Bt=[],Vr=Me();Vr!==t;)Bt.push(Vr),Vr=Me();if(Bt!==t){for(Vr=[],Ci=nd();Ci!==t;)Vr.push(Ci),Ci=nd();if(Vr!==t){for(Ci=[],rs=Me();rs!==t;)Ci.push(rs),rs=Me();Ci!==t?(Fe=m,Q=ue(ce,Vr),m=Q):(b=m,m=t)}else b=m,m=t}else b=m,m=t}else b=m,m=t;else b=m,m=t}else b=m,m=t;else b=m,m=t}else b=m,m=t;else b=m,m=t;if(m===t){for(m=b,Q=[],F=Me();F!==t;)Q.push(F),F=Me();if(Q!==t)if(r.charCodeAt(b)===123?(F=we,b++):(F=t,I===0&&Be(Te)),F!==t){for(K=[],ce=Me();ce!==t;)K.push(ce),ce=Me();if(K!==t)if(ce=Kr(),ce!==t){for(Qe=[],ft=Me();ft!==t;)Qe.push(ft),ft=Me();if(Qe!==t)if(r.charCodeAt(b)===125?(ft=Pe,b++):(ft=t,I===0&&Be(Le)),ft!==t){for(Bt=[],Vr=Me();Vr!==t;)Bt.push(Vr),Vr=Me();if(Bt!==t){for(Vr=[],Ci=nd();Ci!==t;)Vr.push(Ci),Ci=nd();if(Vr!==t){for(Ci=[],rs=Me();rs!==t;)Ci.push(rs),rs=Me();Ci!==t?(Fe=m,Q=se(ce,Vr),m=Q):(b=m,m=t)}else b=m,m=t}else b=m,m=t}else b=m,m=t;else b=m,m=t}else b=m,m=t;else b=m,m=t}else b=m,m=t;else b=m,m=t;if(m===t){for(m=b,Q=[],F=Me();F!==t;)Q.push(F),F=Me();if(Q!==t){for(F=[],K=EI();K!==t;)F.push(K),K=EI();if(F!==t){for(K=[],ce=Me();ce!==t;)K.push(ce),ce=Me();if(K!==t){if(ce=[],Qe=BU(),Qe!==t)for(;Qe!==t;)ce.push(Qe),Qe=BU();else ce=t;if(ce!==t){for(Qe=[],ft=Me();ft!==t;)Qe.push(ft),ft=Me();Qe!==t?(Fe=m,Q=Ae(F,ce),m=Q):(b=m,m=t)}else b=m,m=t}else b=m,m=t}else b=m,m=t}else b=m,m=t;if(m===t){for(m=b,Q=[],F=Me();F!==t;)Q.push(F),F=Me();if(Q!==t){if(F=[],K=EI(),K!==t)for(;K!==t;)F.push(K),K=EI();else F=t;if(F!==t){for(K=[],ce=Me();ce!==t;)K.push(ce),ce=Me();K!==t?(Fe=m,Q=be(F),m=Q):(b=m,m=t)}else b=m,m=t}else b=m,m=t}}}return m}function wU(){var m,Q,F,K,ce;for(m=b,Q=[],F=Me();F!==t;)Q.push(F),F=Me();if(Q!==t){if(F=[],K=II(),K!==t)for(;K!==t;)F.push(K),K=II();else F=t;if(F!==t){for(K=[],ce=Me();ce!==t;)K.push(ce),ce=Me();K!==t?(Fe=m,Q=fe(F),m=Q):(b=m,m=t)}else b=m,m=t}else b=m,m=t;return m}function BU(){var m,Q,F;for(m=b,Q=[],F=Me();F!==t;)Q.push(F),F=Me();if(Q!==t?(F=nd(),F!==t?(Fe=m,Q=le(F),m=Q):(b=m,m=t)):(b=m,m=t),m===t){for(m=b,Q=[],F=Me();F!==t;)Q.push(F),F=Me();Q!==t?(F=II(),F!==t?(Fe=m,Q=le(F),m=Q):(b=m,m=t)):(b=m,m=t)}return m}function nd(){var m,Q,F,K,ce;for(m=b,Q=[],F=Me();F!==t;)Q.push(F),F=Me();return Q!==t?(Ge.test(r.charAt(b))?(F=r.charAt(b),b++):(F=t,I===0&&Be(ie)),F===t&&(F=null),F!==t?(K=nfe(),K!==t?(ce=II(),ce!==t?(Fe=m,Q=Y(F,K,ce),m=Q):(b=m,m=t)):(b=m,m=t)):(b=m,m=t)):(b=m,m=t),m}function nfe(){var m;return r.substr(b,2)===he?(m=he,b+=2):(m=t,I===0&&Be(re)),m===t&&(r.substr(b,2)===me?(m=me,b+=2):(m=t,I===0&&Be(tt)),m===t&&(r.charCodeAt(b)===62?(m=Rt,b++):(m=t,I===0&&Be(It)),m===t&&(r.substr(b,3)===Ur?(m=Ur,b+=3):(m=t,I===0&&Be(oi)),m===t&&(r.substr(b,2)===pi?(m=pi,b+=2):(m=t,I===0&&Be(pr)),m===t&&(r.charCodeAt(b)===60?(m=di,b++):(m=t,I===0&&Be(ai))))))),m}function II(){var m,Q,F;for(m=b,Q=[],F=Me();F!==t;)Q.push(F),F=Me();return Q!==t?(F=bU(),F!==t?(Fe=m,Q=le(F),m=Q):(b=m,m=t)):(b=m,m=t),m}function bU(){var m,Q,F;if(m=b,Q=[],F=QU(),F!==t)for(;F!==t;)Q.push(F),F=QU();else Q=t;return Q!==t&&(Fe=m,Q=Os(Q)),m=Q,m}function QU(){var m,Q;return m=b,Q=sfe(),Q!==t&&(Fe=m,Q=dr(Q)),m=Q,m===t&&(m=b,Q=ofe(),Q!==t&&(Fe=m,Q=dr(Q)),m=Q,m===t&&(m=b,Q=afe(),Q!==t&&(Fe=m,Q=dr(Q)),m=Q,m===t&&(m=b,Q=Afe(),Q!==t&&(Fe=m,Q=dr(Q)),m=Q))),m}function sfe(){var m,Q,F,K;return m=b,r.substr(b,2)===Bi?(Q=Bi,b+=2):(Q=t,I===0&&Be(_n)),Q!==t?(F=ufe(),F!==t?(r.charCodeAt(b)===39?(K=pa,b++):(K=t,I===0&&Be(EA)),K!==t?(Fe=m,Q=kg(F),m=Q):(b=m,m=t)):(b=m,m=t)):(b=m,m=t),m}function ofe(){var m,Q,F,K;return m=b,r.charCodeAt(b)===39?(Q=pa,b++):(Q=t,I===0&&Be(EA)),Q!==t?(F=lfe(),F!==t?(r.charCodeAt(b)===39?(K=pa,b++):(K=t,I===0&&Be(EA)),K!==t?(Fe=m,Q=kg(F),m=Q):(b=m,m=t)):(b=m,m=t)):(b=m,m=t),m}function afe(){var m,Q,F,K;if(m=b,r.substr(b,2)===Zn?(Q=Zn,b+=2):(Q=t,I===0&&Be(IA)),Q!==t&&(Fe=m,Q=da()),m=Q,m===t)if(m=b,r.charCodeAt(b)===34?(Q=Jp,b++):(Q=t,I===0&&Be(yA)),Q!==t){for(F=[],K=SU();K!==t;)F.push(K),K=SU();F!==t?(r.charCodeAt(b)===34?(K=Jp,b++):(K=t,I===0&&Be(yA)),K!==t?(Fe=m,Q=wA(F),m=Q):(b=m,m=t)):(b=m,m=t)}else b=m,m=t;return m}function Afe(){var m,Q,F;if(m=b,Q=[],F=vU(),F!==t)for(;F!==t;)Q.push(F),F=vU();else Q=t;return Q!==t&&(Fe=m,Q=wA(Q)),m=Q,m}function SU(){var m,Q;return m=b,Q=kU(),Q!==t&&(Fe=m,Q=Br(Q)),m=Q,m===t&&(m=b,Q=RU(),Q!==t&&(Fe=m,Q=Vl(Q)),m=Q,m===t&&(m=b,Q=GS(),Q!==t&&(Fe=m,Q=Rg(Q)),m=Q,m===t&&(m=b,Q=cfe(),Q!==t&&(Fe=m,Q=Eo(Q)),m=Q))),m}function vU(){var m,Q;return m=b,Q=kU(),Q!==t&&(Fe=m,Q=Fg(Q)),m=Q,m===t&&(m=b,Q=RU(),Q!==t&&(Fe=m,Q=Wp(Q)),m=Q,m===t&&(m=b,Q=GS(),Q!==t&&(Fe=m,Q=zp(Q)),m=Q,m===t&&(m=b,Q=hfe(),Q!==t&&(Fe=m,Q=Pr(Q)),m=Q,m===t&&(m=b,Q=ffe(),Q!==t&&(Fe=m,Q=Eo(Q)),m=Q)))),m}function lfe(){var m,Q,F;for(m=b,Q=[],oe.test(r.charAt(b))?(F=r.charAt(b),b++):(F=t,I===0&&Be(Io));F!==t;)Q.push(F),oe.test(r.charAt(b))?(F=r.charAt(b),b++):(F=t,I===0&&Be(Io));return Q!==t&&(Fe=m,Q=kn(Q)),m=Q,m}function cfe(){var m,Q,F;if(m=b,Q=[],F=xU(),F===t&&(Ng.test(r.charAt(b))?(F=r.charAt(b),b++):(F=t,I===0&&Be(bt))),F!==t)for(;F!==t;)Q.push(F),F=xU(),F===t&&(Ng.test(r.charAt(b))?(F=r.charAt(b),b++):(F=t,I===0&&Be(bt)));else Q=t;return Q!==t&&(Fe=m,Q=kn(Q)),m=Q,m}function xU(){var m,Q,F;return m=b,r.substr(b,2)===Xl?(Q=Xl,b+=2):(Q=t,I===0&&Be(Rn)),Q!==t&&(Fe=m,Q=$n()),m=Q,m===t&&(m=b,r.charCodeAt(b)===92?(Q=es,b++):(Q=t,I===0&&Be(ut)),Q!==t?(yo.test(r.charAt(b))?(F=r.charAt(b),b++):(F=t,I===0&&Be(at)),F!==t?(Fe=m,Q=ln(F),m=Q):(b=m,m=t)):(b=m,m=t)),m}function ufe(){var m,Q,F;for(m=b,Q=[],F=PU(),F===t&&(oe.test(r.charAt(b))?(F=r.charAt(b),b++):(F=t,I===0&&Be(Io)));F!==t;)Q.push(F),F=PU(),F===t&&(oe.test(r.charAt(b))?(F=r.charAt(b),b++):(F=t,I===0&&Be(Io)));return Q!==t&&(Fe=m,Q=kn(Q)),m=Q,m}function PU(){var m,Q,F;return m=b,r.substr(b,2)===S?(Q=S,b+=2):(Q=t,I===0&&Be(Lt)),Q!==t&&(Fe=m,Q=Tg()),m=Q,m===t&&(m=b,r.substr(b,2)===_l?(Q=_l,b+=2):(Q=t,I===0&&Be(Vp)),Q!==t&&(Fe=m,Q=Xp()),m=Q,m===t&&(m=b,r.charCodeAt(b)===92?(Q=es,b++):(Q=t,I===0&&Be(ut)),Q!==t?(_p.test(r.charAt(b))?(F=r.charAt(b),b++):(F=t,I===0&&Be(Zp)),F!==t?(Fe=m,Q=$p(),m=Q):(b=m,m=t)):(b=m,m=t),m===t&&(m=b,r.substr(b,2)===G?(Q=G,b+=2):(Q=t,I===0&&Be(yt)),Q!==t&&(Fe=m,Q=BA()),m=Q,m===t&&(m=b,r.substr(b,2)===Wi?(Q=Wi,b+=2):(Q=t,I===0&&Be(Zl)),Q!==t&&(Fe=m,Q=We()),m=Q,m===t&&(m=b,r.substr(b,2)===Ca?(Q=Ca,b+=2):(Q=t,I===0&&Be(Lg)),Q!==t&&(Fe=m,Q=uI()),m=Q,m===t&&(m=b,r.substr(b,2)===ed?(Q=ed,b+=2):(Q=t,I===0&&Be(gI)),Q!==t&&(Fe=m,Q=ar()),m=Q,m===t&&(m=b,r.substr(b,2)===Fn?(Q=Fn,b+=2):(Q=t,I===0&&Be($l)),Q!==t&&(Fe=m,Q=td()),m=Q,m===t&&(m=b,r.charCodeAt(b)===92?(Q=es,b++):(Q=t,I===0&&Be(ut)),Q!==t?(Ms.test(r.charAt(b))?(F=r.charAt(b),b++):(F=t,I===0&&Be(ma)),F!==t?(Fe=m,Q=ln(F),m=Q):(b=m,m=t)):(b=m,m=t),m===t&&(m=gfe()))))))))),m}function gfe(){var m,Q,F,K,ce,Qe,ft,Bt,Vr,Ci,rs,YS;return m=b,r.charCodeAt(b)===92?(Q=es,b++):(Q=t,I===0&&Be(ut)),Q!==t?(F=US(),F!==t?(Fe=m,Q=cn(F),m=Q):(b=m,m=t)):(b=m,m=t),m===t&&(m=b,r.substr(b,2)===ke?(Q=ke,b+=2):(Q=t,I===0&&Be(Og)),Q!==t?(F=b,K=b,ce=US(),ce!==t?(Qe=Ln(),Qe!==t?(ce=[ce,Qe],K=ce):(b=K,K=t)):(b=K,K=t),K===t&&(K=US()),K!==t?F=r.substring(F,b):F=K,F!==t?(Fe=m,Q=cn(F),m=Q):(b=m,m=t)):(b=m,m=t),m===t&&(m=b,r.substr(b,2)===ec?(Q=ec,b+=2):(Q=t,I===0&&Be(Us)),Q!==t?(F=b,K=b,ce=Ln(),ce!==t?(Qe=Ln(),Qe!==t?(ft=Ln(),ft!==t?(Bt=Ln(),Bt!==t?(ce=[ce,Qe,ft,Bt],K=ce):(b=K,K=t)):(b=K,K=t)):(b=K,K=t)):(b=K,K=t),K!==t?F=r.substring(F,b):F=K,F!==t?(Fe=m,Q=cn(F),m=Q):(b=m,m=t)):(b=m,m=t),m===t&&(m=b,r.substr(b,2)===tc?(Q=tc,b+=2):(Q=t,I===0&&Be(bA)),Q!==t?(F=b,K=b,ce=Ln(),ce!==t?(Qe=Ln(),Qe!==t?(ft=Ln(),ft!==t?(Bt=Ln(),Bt!==t?(Vr=Ln(),Vr!==t?(Ci=Ln(),Ci!==t?(rs=Ln(),rs!==t?(YS=Ln(),YS!==t?(ce=[ce,Qe,ft,Bt,Vr,Ci,rs,YS],K=ce):(b=K,K=t)):(b=K,K=t)):(b=K,K=t)):(b=K,K=t)):(b=K,K=t)):(b=K,K=t)):(b=K,K=t)):(b=K,K=t),K!==t?F=r.substring(F,b):F=K,F!==t?(Fe=m,Q=Mg(F),m=Q):(b=m,m=t)):(b=m,m=t)))),m}function US(){var m;return Ug.test(r.charAt(b))?(m=r.charAt(b),b++):(m=t,I===0&&Be(Ea)),m}function Ln(){var m;return Ia.test(r.charAt(b))?(m=r.charAt(b),b++):(m=t,I===0&&Be($e)),m}function ffe(){var m,Q,F,K,ce;if(m=b,Q=[],F=b,r.charCodeAt(b)===92?(K=es,b++):(K=t,I===0&&Be(ut)),K!==t?(r.length>b?(ce=r.charAt(b),b++):(ce=t,I===0&&Be(wo)),ce!==t?(Fe=F,K=ln(ce),F=K):(b=F,F=t)):(b=F,F=t),F===t&&(F=b,K=b,I++,ce=NU(),I--,ce===t?K=void 0:(b=K,K=t),K!==t?(r.length>b?(ce=r.charAt(b),b++):(ce=t,I===0&&Be(wo)),ce!==t?(Fe=F,K=ln(ce),F=K):(b=F,F=t)):(b=F,F=t)),F!==t)for(;F!==t;)Q.push(F),F=b,r.charCodeAt(b)===92?(K=es,b++):(K=t,I===0&&Be(ut)),K!==t?(r.length>b?(ce=r.charAt(b),b++):(ce=t,I===0&&Be(wo)),ce!==t?(Fe=F,K=ln(ce),F=K):(b=F,F=t)):(b=F,F=t),F===t&&(F=b,K=b,I++,ce=NU(),I--,ce===t?K=void 0:(b=K,K=t),K!==t?(r.length>b?(ce=r.charAt(b),b++):(ce=t,I===0&&Be(wo)),ce!==t?(Fe=F,K=ln(ce),F=K):(b=F,F=t)):(b=F,F=t));else Q=t;return Q!==t&&(Fe=m,Q=kn(Q)),m=Q,m}function KS(){var m,Q,F,K,ce,Qe;if(m=b,r.charCodeAt(b)===45?(Q=QA,b++):(Q=t,I===0&&Be(rc)),Q===t&&(r.charCodeAt(b)===43?(Q=Ks,b++):(Q=t,I===0&&Be(ic))),Q===t&&(Q=null),Q!==t){if(F=[],Ge.test(r.charAt(b))?(K=r.charAt(b),b++):(K=t,I===0&&Be(ie)),K!==t)for(;K!==t;)F.push(K),Ge.test(r.charAt(b))?(K=r.charAt(b),b++):(K=t,I===0&&Be(ie));else F=t;if(F!==t)if(r.charCodeAt(b)===46?(K=fI,b++):(K=t,I===0&&Be(rd)),K!==t){if(ce=[],Ge.test(r.charAt(b))?(Qe=r.charAt(b),b++):(Qe=t,I===0&&Be(ie)),Qe!==t)for(;Qe!==t;)ce.push(Qe),Ge.test(r.charAt(b))?(Qe=r.charAt(b),b++):(Qe=t,I===0&&Be(ie));else ce=t;ce!==t?(Fe=m,Q=Kg(Q,F,ce),m=Q):(b=m,m=t)}else b=m,m=t;else b=m,m=t}else b=m,m=t;if(m===t){if(m=b,r.charCodeAt(b)===45?(Q=QA,b++):(Q=t,I===0&&Be(rc)),Q===t&&(r.charCodeAt(b)===43?(Q=Ks,b++):(Q=t,I===0&&Be(ic))),Q===t&&(Q=null),Q!==t){if(F=[],Ge.test(r.charAt(b))?(K=r.charAt(b),b++):(K=t,I===0&&Be(ie)),K!==t)for(;K!==t;)F.push(K),Ge.test(r.charAt(b))?(K=r.charAt(b),b++):(K=t,I===0&&Be(ie));else F=t;F!==t?(Fe=m,Q=id(Q,F),m=Q):(b=m,m=t)}else b=m,m=t;if(m===t&&(m=b,Q=GS(),Q!==t&&(Fe=m,Q=hI(Q)),m=Q,m===t&&(m=b,Q=sc(),Q!==t&&(Fe=m,Q=nc(Q)),m=Q,m===t)))if(m=b,r.charCodeAt(b)===40?(Q=ge,b++):(Q=t,I===0&&Be(_)),Q!==t){for(F=[],K=Me();K!==t;)F.push(K),K=Me();if(F!==t)if(K=DU(),K!==t){for(ce=[],Qe=Me();Qe!==t;)ce.push(Qe),Qe=Me();ce!==t?(r.charCodeAt(b)===41?(Qe=L,b++):(Qe=t,I===0&&Be(N)),Qe!==t?(Fe=m,Q=pI(K),m=Q):(b=m,m=t)):(b=m,m=t)}else b=m,m=t;else b=m,m=t}else b=m,m=t}return m}function HS(){var m,Q,F,K,ce,Qe,ft,Bt;if(m=b,Q=KS(),Q!==t){for(F=[],K=b,ce=[],Qe=Me();Qe!==t;)ce.push(Qe),Qe=Me();if(ce!==t)if(r.charCodeAt(b)===42?(Qe=Hg,b++):(Qe=t,I===0&&Be(SA)),Qe===t&&(r.charCodeAt(b)===47?(Qe=Nr,b++):(Qe=t,I===0&&Be(dI))),Qe!==t){for(ft=[],Bt=Me();Bt!==t;)ft.push(Bt),Bt=Me();ft!==t?(Bt=KS(),Bt!==t?(Fe=K,ce=Hs(Q,Qe,Bt),K=ce):(b=K,K=t)):(b=K,K=t)}else b=K,K=t;else b=K,K=t;for(;K!==t;){for(F.push(K),K=b,ce=[],Qe=Me();Qe!==t;)ce.push(Qe),Qe=Me();if(ce!==t)if(r.charCodeAt(b)===42?(Qe=Hg,b++):(Qe=t,I===0&&Be(SA)),Qe===t&&(r.charCodeAt(b)===47?(Qe=Nr,b++):(Qe=t,I===0&&Be(dI))),Qe!==t){for(ft=[],Bt=Me();Bt!==t;)ft.push(Bt),Bt=Me();ft!==t?(Bt=KS(),Bt!==t?(Fe=K,ce=Hs(Q,Qe,Bt),K=ce):(b=K,K=t)):(b=K,K=t)}else b=K,K=t;else b=K,K=t}F!==t?(Fe=m,Q=Gs(Q,F),m=Q):(b=m,m=t)}else b=m,m=t;return m}function DU(){var m,Q,F,K,ce,Qe,ft,Bt;if(m=b,Q=HS(),Q!==t){for(F=[],K=b,ce=[],Qe=Me();Qe!==t;)ce.push(Qe),Qe=Me();if(ce!==t)if(r.charCodeAt(b)===43?(Qe=Ks,b++):(Qe=t,I===0&&Be(ic)),Qe===t&&(r.charCodeAt(b)===45?(Qe=QA,b++):(Qe=t,I===0&&Be(rc))),Qe!==t){for(ft=[],Bt=Me();Bt!==t;)ft.push(Bt),Bt=Me();ft!==t?(Bt=HS(),Bt!==t?(Fe=K,ce=Gg(Q,Qe,Bt),K=ce):(b=K,K=t)):(b=K,K=t)}else b=K,K=t;else b=K,K=t;for(;K!==t;){for(F.push(K),K=b,ce=[],Qe=Me();Qe!==t;)ce.push(Qe),Qe=Me();if(ce!==t)if(r.charCodeAt(b)===43?(Qe=Ks,b++):(Qe=t,I===0&&Be(ic)),Qe===t&&(r.charCodeAt(b)===45?(Qe=QA,b++):(Qe=t,I===0&&Be(rc))),Qe!==t){for(ft=[],Bt=Me();Bt!==t;)ft.push(Bt),Bt=Me();ft!==t?(Bt=HS(),Bt!==t?(Fe=K,ce=Gg(Q,Qe,Bt),K=ce):(b=K,K=t)):(b=K,K=t)}else b=K,K=t;else b=K,K=t}F!==t?(Fe=m,Q=Gs(Q,F),m=Q):(b=m,m=t)}else b=m,m=t;return m}function kU(){var m,Q,F,K,ce,Qe;if(m=b,r.substr(b,3)===vA?(Q=vA,b+=3):(Q=t,I===0&&Be(R)),Q!==t){for(F=[],K=Me();K!==t;)F.push(K),K=Me();if(F!==t)if(K=DU(),K!==t){for(ce=[],Qe=Me();Qe!==t;)ce.push(Qe),Qe=Me();ce!==t?(r.substr(b,2)===q?(Qe=q,b+=2):(Qe=t,I===0&&Be(pe)),Qe!==t?(Fe=m,Q=Ne(K),m=Q):(b=m,m=t)):(b=m,m=t)}else b=m,m=t;else b=m,m=t}else b=m,m=t;return m}function RU(){var m,Q,F,K;return m=b,r.substr(b,2)===xe?(Q=xe,b+=2):(Q=t,I===0&&Be(qe)),Q!==t?(F=Kr(),F!==t?(r.charCodeAt(b)===41?(K=L,b++):(K=t,I===0&&Be(N)),K!==t?(Fe=m,Q=dt(F),m=Q):(b=m,m=t)):(b=m,m=t)):(b=m,m=t),m}function GS(){var m,Q,F,K,ce,Qe;return m=b,r.substr(b,2)===Ft?(Q=Ft,b+=2):(Q=t,I===0&&Be(Nn)),Q!==t?(F=sc(),F!==t?(r.substr(b,2)===vS?(K=vS,b+=2):(K=t,I===0&&Be(AU)),K!==t?(ce=wU(),ce!==t?(r.charCodeAt(b)===125?(Qe=Pe,b++):(Qe=t,I===0&&Be(Le)),Qe!==t?(Fe=m,Q=lU(F,ce),m=Q):(b=m,m=t)):(b=m,m=t)):(b=m,m=t)):(b=m,m=t)):(b=m,m=t),m===t&&(m=b,r.substr(b,2)===Ft?(Q=Ft,b+=2):(Q=t,I===0&&Be(Nn)),Q!==t?(F=sc(),F!==t?(r.substr(b,3)===xS?(K=xS,b+=3):(K=t,I===0&&Be(cU)),K!==t?(Fe=m,Q=uU(F),m=Q):(b=m,m=t)):(b=m,m=t)):(b=m,m=t),m===t&&(m=b,r.substr(b,2)===Ft?(Q=Ft,b+=2):(Q=t,I===0&&Be(Nn)),Q!==t?(F=sc(),F!==t?(r.substr(b,2)===PS?(K=PS,b+=2):(K=t,I===0&&Be(gU)),K!==t?(ce=wU(),ce!==t?(r.charCodeAt(b)===125?(Qe=Pe,b++):(Qe=t,I===0&&Be(Le)),Qe!==t?(Fe=m,Q=fU(F,ce),m=Q):(b=m,m=t)):(b=m,m=t)):(b=m,m=t)):(b=m,m=t)):(b=m,m=t),m===t&&(m=b,r.substr(b,2)===Ft?(Q=Ft,b+=2):(Q=t,I===0&&Be(Nn)),Q!==t?(F=sc(),F!==t?(r.substr(b,3)===DS?(K=DS,b+=3):(K=t,I===0&&Be(hU)),K!==t?(Fe=m,Q=pU(F),m=Q):(b=m,m=t)):(b=m,m=t)):(b=m,m=t),m===t&&(m=b,r.substr(b,2)===Ft?(Q=Ft,b+=2):(Q=t,I===0&&Be(Nn)),Q!==t?(F=sc(),F!==t?(r.charCodeAt(b)===125?(K=Pe,b++):(K=t,I===0&&Be(Le)),K!==t?(Fe=m,Q=kS(F),m=Q):(b=m,m=t)):(b=m,m=t)):(b=m,m=t),m===t&&(m=b,r.charCodeAt(b)===36?(Q=dU,b++):(Q=t,I===0&&Be(CU)),Q!==t?(F=sc(),F!==t?(Fe=m,Q=kS(F),m=Q):(b=m,m=t)):(b=m,m=t)))))),m}function hfe(){var m,Q,F;return m=b,Q=pfe(),Q!==t?(Fe=b,F=mU(Q),F?F=void 0:F=t,F!==t?(Fe=m,Q=EU(Q),m=Q):(b=m,m=t)):(b=m,m=t),m}function pfe(){var m,Q,F,K,ce;if(m=b,Q=[],F=b,K=b,I++,ce=TU(),I--,ce===t?K=void 0:(b=K,K=t),K!==t?(r.length>b?(ce=r.charAt(b),b++):(ce=t,I===0&&Be(wo)),ce!==t?(Fe=F,K=ln(ce),F=K):(b=F,F=t)):(b=F,F=t),F!==t)for(;F!==t;)Q.push(F),F=b,K=b,I++,ce=TU(),I--,ce===t?K=void 0:(b=K,K=t),K!==t?(r.length>b?(ce=r.charAt(b),b++):(ce=t,I===0&&Be(wo)),ce!==t?(Fe=F,K=ln(ce),F=K):(b=F,F=t)):(b=F,F=t);else Q=t;return Q!==t&&(Fe=m,Q=kn(Q)),m=Q,m}function FU(){var m,Q,F;if(m=b,Q=[],RS.test(r.charAt(b))?(F=r.charAt(b),b++):(F=t,I===0&&Be(FS)),F!==t)for(;F!==t;)Q.push(F),RS.test(r.charAt(b))?(F=r.charAt(b),b++):(F=t,I===0&&Be(FS));else Q=t;return Q!==t&&(Fe=m,Q=NS()),m=Q,m}function sc(){var m,Q,F;if(m=b,Q=[],TS.test(r.charAt(b))?(F=r.charAt(b),b++):(F=t,I===0&&Be(LS)),F!==t)for(;F!==t;)Q.push(F),TS.test(r.charAt(b))?(F=r.charAt(b),b++):(F=t,I===0&&Be(LS));else Q=t;return Q!==t&&(Fe=m,Q=NS()),m=Q,m}function NU(){var m;return IU.test(r.charAt(b))?(m=r.charAt(b),b++):(m=t,I===0&&Be(Yg)),m}function TU(){var m;return OS.test(r.charAt(b))?(m=r.charAt(b),b++):(m=t,I===0&&Be(MS)),m}function Me(){var m,Q;if(m=[],CI.test(r.charAt(b))?(Q=r.charAt(b),b++):(Q=t,I===0&&Be(mI)),Q!==t)for(;Q!==t;)m.push(Q),CI.test(r.charAt(b))?(Q=r.charAt(b),b++):(Q=t,I===0&&Be(mI));else m=t;return m}if(k=n(),k!==t&&b===r.length)return k;throw k!==t&&b{"use strict";function phe(r,e){function t(){this.constructor=r}t.prototype=e.prototype,r.prototype=new t}function fc(r,e,t,i){this.message=r,this.expected=e,this.found=t,this.location=i,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,fc)}phe(fc,Error);fc.buildMessage=function(r,e){var t={literal:function(c){return'"'+n(c.text)+'"'},class:function(c){var u="",g;for(g=0;g0){for(g=1,f=1;gH&&(H=v,j=[]),j.push(ie))}function Le(ie,Y){return new fc(ie,null,null,Y)}function se(ie,Y,he){return new fc(fc.buildMessage(ie,Y),ie,Y,he)}function Ae(){var ie,Y,he,re;return ie=v,Y=be(),Y!==t?(r.charCodeAt(v)===47?(he=s,v++):(he=t,$===0&&Pe(o)),he!==t?(re=be(),re!==t?(D=ie,Y=a(Y,re),ie=Y):(v=ie,ie=t)):(v=ie,ie=t)):(v=ie,ie=t),ie===t&&(ie=v,Y=be(),Y!==t&&(D=ie,Y=l(Y)),ie=Y),ie}function be(){var ie,Y,he,re;return ie=v,Y=fe(),Y!==t?(r.charCodeAt(v)===64?(he=c,v++):(he=t,$===0&&Pe(u)),he!==t?(re=Ge(),re!==t?(D=ie,Y=g(Y,re),ie=Y):(v=ie,ie=t)):(v=ie,ie=t)):(v=ie,ie=t),ie===t&&(ie=v,Y=fe(),Y!==t&&(D=ie,Y=f(Y)),ie=Y),ie}function fe(){var ie,Y,he,re,me;return ie=v,r.charCodeAt(v)===64?(Y=c,v++):(Y=t,$===0&&Pe(u)),Y!==t?(he=le(),he!==t?(r.charCodeAt(v)===47?(re=s,v++):(re=t,$===0&&Pe(o)),re!==t?(me=le(),me!==t?(D=ie,Y=h(),ie=Y):(v=ie,ie=t)):(v=ie,ie=t)):(v=ie,ie=t)):(v=ie,ie=t),ie===t&&(ie=v,Y=le(),Y!==t&&(D=ie,Y=h()),ie=Y),ie}function le(){var ie,Y,he;if(ie=v,Y=[],p.test(r.charAt(v))?(he=r.charAt(v),v++):(he=t,$===0&&Pe(C)),he!==t)for(;he!==t;)Y.push(he),p.test(r.charAt(v))?(he=r.charAt(v),v++):(he=t,$===0&&Pe(C));else Y=t;return Y!==t&&(D=ie,Y=h()),ie=Y,ie}function Ge(){var ie,Y,he;if(ie=v,Y=[],w.test(r.charAt(v))?(he=r.charAt(v),v++):(he=t,$===0&&Pe(B)),he!==t)for(;he!==t;)Y.push(he),w.test(r.charAt(v))?(he=r.charAt(v),v++):(he=t,$===0&&Pe(B));else Y=t;return Y!==t&&(D=ie,Y=h()),ie=Y,ie}if(V=n(),V!==t&&v===r.length)return V;throw V!==t&&v{"use strict";function XK(r){return typeof r>"u"||r===null}function Che(r){return typeof r=="object"&&r!==null}function mhe(r){return Array.isArray(r)?r:XK(r)?[]:[r]}function Ehe(r,e){var t,i,n,s;if(e)for(s=Object.keys(e),t=0,i=s.length;t{"use strict";function md(r,e){Error.call(this),this.name="YAMLException",this.reason=r,this.mark=e,this.message=(this.reason||"(unknown reason)")+(this.mark?" "+this.mark.toString():""),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}md.prototype=Object.create(Error.prototype);md.prototype.constructor=md;md.prototype.toString=function(e){var t=this.name+": ";return t+=this.reason||"(unknown reason)",!e&&this.mark&&(t+=" "+this.mark.toString()),t};_K.exports=md});var e2=y((YZe,$K)=>{"use strict";var ZK=pc();function wv(r,e,t,i,n){this.name=r,this.buffer=e,this.position=t,this.line=i,this.column=n}wv.prototype.getSnippet=function(e,t){var i,n,s,o,a;if(!this.buffer)return null;for(e=e||4,t=t||75,i="",n=this.position;n>0&&`\0\r -\x85\u2028\u2029`.indexOf(this.buffer.charAt(n-1))===-1;)if(n-=1,this.position-n>t/2-1){i=" ... ",n+=5;break}for(s="",o=this.position;ot/2-1){s=" ... ",o-=5;break}return a=this.buffer.slice(n,o),ZK.repeat(" ",e)+i+a+s+` -`+ZK.repeat(" ",e+this.position-n+i.length)+"^"};wv.prototype.toString=function(e){var t,i="";return this.name&&(i+='in "'+this.name+'" '),i+="at line "+(this.line+1)+", column "+(this.column+1),e||(t=this.getSnippet(),t&&(i+=`: -`+t)),i};$K.exports=wv});var Ai=y((jZe,r2)=>{"use strict";var t2=tf(),whe=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],Bhe=["scalar","sequence","mapping"];function bhe(r){var e={};return r!==null&&Object.keys(r).forEach(function(t){r[t].forEach(function(i){e[String(i)]=t})}),e}function Qhe(r,e){if(e=e||{},Object.keys(e).forEach(function(t){if(whe.indexOf(t)===-1)throw new t2('Unknown option "'+t+'" is met in definition of "'+r+'" YAML type.')}),this.tag=r,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(t){return t},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.defaultStyle=e.defaultStyle||null,this.styleAliases=bhe(e.styleAliases||null),Bhe.indexOf(this.kind)===-1)throw new t2('Unknown kind "'+this.kind+'" is specified for "'+r+'" YAML type.')}r2.exports=Qhe});var dc=y((qZe,n2)=>{"use strict";var i2=pc(),jI=tf(),She=Ai();function Bv(r,e,t){var i=[];return r.include.forEach(function(n){t=Bv(n,e,t)}),r[e].forEach(function(n){t.forEach(function(s,o){s.tag===n.tag&&s.kind===n.kind&&i.push(o)}),t.push(n)}),t.filter(function(n,s){return i.indexOf(s)===-1})}function vhe(){var r={scalar:{},sequence:{},mapping:{},fallback:{}},e,t;function i(n){r[n.kind][n.tag]=r.fallback[n.tag]=n}for(e=0,t=arguments.length;e{"use strict";var xhe=Ai();s2.exports=new xhe("tag:yaml.org,2002:str",{kind:"scalar",construct:function(r){return r!==null?r:""}})});var A2=y((WZe,a2)=>{"use strict";var Phe=Ai();a2.exports=new Phe("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(r){return r!==null?r:[]}})});var c2=y((zZe,l2)=>{"use strict";var Dhe=Ai();l2.exports=new Dhe("tag:yaml.org,2002:map",{kind:"mapping",construct:function(r){return r!==null?r:{}}})});var qI=y((VZe,u2)=>{"use strict";var khe=dc();u2.exports=new khe({explicit:[o2(),A2(),c2()]})});var f2=y((XZe,g2)=>{"use strict";var Rhe=Ai();function Fhe(r){if(r===null)return!0;var e=r.length;return e===1&&r==="~"||e===4&&(r==="null"||r==="Null"||r==="NULL")}function Nhe(){return null}function The(r){return r===null}g2.exports=new Rhe("tag:yaml.org,2002:null",{kind:"scalar",resolve:Fhe,construct:Nhe,predicate:The,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})});var p2=y((_Ze,h2)=>{"use strict";var Lhe=Ai();function Ohe(r){if(r===null)return!1;var e=r.length;return e===4&&(r==="true"||r==="True"||r==="TRUE")||e===5&&(r==="false"||r==="False"||r==="FALSE")}function Mhe(r){return r==="true"||r==="True"||r==="TRUE"}function Uhe(r){return Object.prototype.toString.call(r)==="[object Boolean]"}h2.exports=new Lhe("tag:yaml.org,2002:bool",{kind:"scalar",resolve:Ohe,construct:Mhe,predicate:Uhe,represent:{lowercase:function(r){return r?"true":"false"},uppercase:function(r){return r?"TRUE":"FALSE"},camelcase:function(r){return r?"True":"False"}},defaultStyle:"lowercase"})});var C2=y((ZZe,d2)=>{"use strict";var Khe=pc(),Hhe=Ai();function Ghe(r){return 48<=r&&r<=57||65<=r&&r<=70||97<=r&&r<=102}function Yhe(r){return 48<=r&&r<=55}function jhe(r){return 48<=r&&r<=57}function qhe(r){if(r===null)return!1;var e=r.length,t=0,i=!1,n;if(!e)return!1;if(n=r[t],(n==="-"||n==="+")&&(n=r[++t]),n==="0"){if(t+1===e)return!0;if(n=r[++t],n==="b"){for(t++;t=0?"0b"+r.toString(2):"-0b"+r.toString(2).slice(1)},octal:function(r){return r>=0?"0"+r.toString(8):"-0"+r.toString(8).slice(1)},decimal:function(r){return r.toString(10)},hexadecimal:function(r){return r>=0?"0x"+r.toString(16).toUpperCase():"-0x"+r.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})});var I2=y(($Ze,E2)=>{"use strict";var m2=pc(),zhe=Ai(),Vhe=new RegExp("^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function Xhe(r){return!(r===null||!Vhe.test(r)||r[r.length-1]==="_")}function _he(r){var e,t,i,n;return e=r.replace(/_/g,"").toLowerCase(),t=e[0]==="-"?-1:1,n=[],"+-".indexOf(e[0])>=0&&(e=e.slice(1)),e===".inf"?t===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:e===".nan"?NaN:e.indexOf(":")>=0?(e.split(":").forEach(function(s){n.unshift(parseFloat(s,10))}),e=0,i=1,n.forEach(function(s){e+=s*i,i*=60}),t*e):t*parseFloat(e,10)}var Zhe=/^[-+]?[0-9]+e/;function $he(r,e){var t;if(isNaN(r))switch(e){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===r)switch(e){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===r)switch(e){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(m2.isNegativeZero(r))return"-0.0";return t=r.toString(10),Zhe.test(t)?t.replace("e",".e"):t}function epe(r){return Object.prototype.toString.call(r)==="[object Number]"&&(r%1!==0||m2.isNegativeZero(r))}E2.exports=new zhe("tag:yaml.org,2002:float",{kind:"scalar",resolve:Xhe,construct:_he,predicate:epe,represent:$he,defaultStyle:"lowercase"})});var bv=y((e$e,y2)=>{"use strict";var tpe=dc();y2.exports=new tpe({include:[qI()],implicit:[f2(),p2(),C2(),I2()]})});var Qv=y((t$e,w2)=>{"use strict";var rpe=dc();w2.exports=new rpe({include:[bv()]})});var S2=y((r$e,Q2)=>{"use strict";var ipe=Ai(),B2=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),b2=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function npe(r){return r===null?!1:B2.exec(r)!==null||b2.exec(r)!==null}function spe(r){var e,t,i,n,s,o,a,l=0,c=null,u,g,f;if(e=B2.exec(r),e===null&&(e=b2.exec(r)),e===null)throw new Error("Date resolve error");if(t=+e[1],i=+e[2]-1,n=+e[3],!e[4])return new Date(Date.UTC(t,i,n));if(s=+e[4],o=+e[5],a=+e[6],e[7]){for(l=e[7].slice(0,3);l.length<3;)l+="0";l=+l}return e[9]&&(u=+e[10],g=+(e[11]||0),c=(u*60+g)*6e4,e[9]==="-"&&(c=-c)),f=new Date(Date.UTC(t,i,n,s,o,a,l)),c&&f.setTime(f.getTime()-c),f}function ope(r){return r.toISOString()}Q2.exports=new ipe("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:npe,construct:spe,instanceOf:Date,represent:ope})});var x2=y((i$e,v2)=>{"use strict";var ape=Ai();function Ape(r){return r==="<<"||r===null}v2.exports=new ape("tag:yaml.org,2002:merge",{kind:"scalar",resolve:Ape})});var k2=y((n$e,D2)=>{"use strict";var Cc;try{P2=J,Cc=P2("buffer").Buffer}catch{}var P2,lpe=Ai(),Sv=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/= -\r`;function cpe(r){if(r===null)return!1;var e,t,i=0,n=r.length,s=Sv;for(t=0;t64)){if(e<0)return!1;i+=6}return i%8===0}function upe(r){var e,t,i=r.replace(/[\r\n=]/g,""),n=i.length,s=Sv,o=0,a=[];for(e=0;e>16&255),a.push(o>>8&255),a.push(o&255)),o=o<<6|s.indexOf(i.charAt(e));return t=n%4*6,t===0?(a.push(o>>16&255),a.push(o>>8&255),a.push(o&255)):t===18?(a.push(o>>10&255),a.push(o>>2&255)):t===12&&a.push(o>>4&255),Cc?Cc.from?Cc.from(a):new Cc(a):a}function gpe(r){var e="",t=0,i,n,s=r.length,o=Sv;for(i=0;i>18&63],e+=o[t>>12&63],e+=o[t>>6&63],e+=o[t&63]),t=(t<<8)+r[i];return n=s%3,n===0?(e+=o[t>>18&63],e+=o[t>>12&63],e+=o[t>>6&63],e+=o[t&63]):n===2?(e+=o[t>>10&63],e+=o[t>>4&63],e+=o[t<<2&63],e+=o[64]):n===1&&(e+=o[t>>2&63],e+=o[t<<4&63],e+=o[64],e+=o[64]),e}function fpe(r){return Cc&&Cc.isBuffer(r)}D2.exports=new lpe("tag:yaml.org,2002:binary",{kind:"scalar",resolve:cpe,construct:upe,predicate:fpe,represent:gpe})});var F2=y((s$e,R2)=>{"use strict";var hpe=Ai(),ppe=Object.prototype.hasOwnProperty,dpe=Object.prototype.toString;function Cpe(r){if(r===null)return!0;var e=[],t,i,n,s,o,a=r;for(t=0,i=a.length;t{"use strict";var Epe=Ai(),Ipe=Object.prototype.toString;function ype(r){if(r===null)return!0;var e,t,i,n,s,o=r;for(s=new Array(o.length),e=0,t=o.length;e{"use strict";var Bpe=Ai(),bpe=Object.prototype.hasOwnProperty;function Qpe(r){if(r===null)return!0;var e,t=r;for(e in t)if(bpe.call(t,e)&&t[e]!==null)return!1;return!0}function Spe(r){return r!==null?r:{}}L2.exports=new Bpe("tag:yaml.org,2002:set",{kind:"mapping",resolve:Qpe,construct:Spe})});var nf=y((A$e,M2)=>{"use strict";var vpe=dc();M2.exports=new vpe({include:[Qv()],implicit:[S2(),x2()],explicit:[k2(),F2(),T2(),O2()]})});var K2=y((l$e,U2)=>{"use strict";var xpe=Ai();function Ppe(){return!0}function Dpe(){}function kpe(){return""}function Rpe(r){return typeof r>"u"}U2.exports=new xpe("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:Ppe,construct:Dpe,predicate:Rpe,represent:kpe})});var G2=y((c$e,H2)=>{"use strict";var Fpe=Ai();function Npe(r){if(r===null||r.length===0)return!1;var e=r,t=/\/([gim]*)$/.exec(r),i="";return!(e[0]==="/"&&(t&&(i=t[1]),i.length>3||e[e.length-i.length-1]!=="/"))}function Tpe(r){var e=r,t=/\/([gim]*)$/.exec(r),i="";return e[0]==="/"&&(t&&(i=t[1]),e=e.slice(1,e.length-i.length-1)),new RegExp(e,i)}function Lpe(r){var e="/"+r.source+"/";return r.global&&(e+="g"),r.multiline&&(e+="m"),r.ignoreCase&&(e+="i"),e}function Ope(r){return Object.prototype.toString.call(r)==="[object RegExp]"}H2.exports=new Fpe("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:Npe,construct:Tpe,predicate:Ope,represent:Lpe})});var q2=y((u$e,j2)=>{"use strict";var JI;try{Y2=J,JI=Y2("esprima")}catch{typeof window<"u"&&(JI=window.esprima)}var Y2,Mpe=Ai();function Upe(r){if(r===null)return!1;try{var e="("+r+")",t=JI.parse(e,{range:!0});return!(t.type!=="Program"||t.body.length!==1||t.body[0].type!=="ExpressionStatement"||t.body[0].expression.type!=="ArrowFunctionExpression"&&t.body[0].expression.type!=="FunctionExpression")}catch{return!1}}function Kpe(r){var e="("+r+")",t=JI.parse(e,{range:!0}),i=[],n;if(t.type!=="Program"||t.body.length!==1||t.body[0].type!=="ExpressionStatement"||t.body[0].expression.type!=="ArrowFunctionExpression"&&t.body[0].expression.type!=="FunctionExpression")throw new Error("Failed to resolve function");return t.body[0].expression.params.forEach(function(s){i.push(s.name)}),n=t.body[0].expression.body.range,t.body[0].expression.body.type==="BlockStatement"?new Function(i,e.slice(n[0]+1,n[1]-1)):new Function(i,"return "+e.slice(n[0],n[1]))}function Hpe(r){return r.toString()}function Gpe(r){return Object.prototype.toString.call(r)==="[object Function]"}j2.exports=new Mpe("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:Upe,construct:Kpe,predicate:Gpe,represent:Hpe})});var Ed=y((g$e,W2)=>{"use strict";var J2=dc();W2.exports=J2.DEFAULT=new J2({include:[nf()],explicit:[K2(),G2(),q2()]})});var gH=y((f$e,Id)=>{"use strict";var Qa=pc(),eH=tf(),Ype=e2(),tH=nf(),jpe=Ed(),NA=Object.prototype.hasOwnProperty,WI=1,rH=2,iH=3,zI=4,vv=1,qpe=2,z2=3,Jpe=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Wpe=/[\x85\u2028\u2029]/,zpe=/[,\[\]\{\}]/,nH=/^(?:!|!!|![a-z\-]+!)$/i,sH=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function V2(r){return Object.prototype.toString.call(r)}function So(r){return r===10||r===13}function Ec(r){return r===9||r===32}function fn(r){return r===9||r===32||r===10||r===13}function sf(r){return r===44||r===91||r===93||r===123||r===125}function Vpe(r){var e;return 48<=r&&r<=57?r-48:(e=r|32,97<=e&&e<=102?e-97+10:-1)}function Xpe(r){return r===120?2:r===117?4:r===85?8:0}function _pe(r){return 48<=r&&r<=57?r-48:-1}function X2(r){return r===48?"\0":r===97?"\x07":r===98?"\b":r===116||r===9?" ":r===110?` -`:r===118?"\v":r===102?"\f":r===114?"\r":r===101?"\x1B":r===32?" ":r===34?'"':r===47?"/":r===92?"\\":r===78?"\x85":r===95?"\xA0":r===76?"\u2028":r===80?"\u2029":""}function Zpe(r){return r<=65535?String.fromCharCode(r):String.fromCharCode((r-65536>>10)+55296,(r-65536&1023)+56320)}var oH=new Array(256),aH=new Array(256);for(mc=0;mc<256;mc++)oH[mc]=X2(mc)?1:0,aH[mc]=X2(mc);var mc;function $pe(r,e){this.input=r,this.filename=e.filename||null,this.schema=e.schema||jpe,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=r.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function AH(r,e){return new eH(e,new Ype(r.filename,r.input,r.position,r.line,r.position-r.lineStart))}function gt(r,e){throw AH(r,e)}function VI(r,e){r.onWarning&&r.onWarning.call(null,AH(r,e))}var _2={YAML:function(e,t,i){var n,s,o;e.version!==null&>(e,"duplication of %YAML directive"),i.length!==1&>(e,"YAML directive accepts exactly one argument"),n=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),n===null&>(e,"ill-formed argument of the YAML directive"),s=parseInt(n[1],10),o=parseInt(n[2],10),s!==1&>(e,"unacceptable YAML version of the document"),e.version=i[0],e.checkLineBreaks=o<2,o!==1&&o!==2&&VI(e,"unsupported YAML version of the document")},TAG:function(e,t,i){var n,s;i.length!==2&>(e,"TAG directive accepts exactly two arguments"),n=i[0],s=i[1],nH.test(n)||gt(e,"ill-formed tag handle (first argument) of the TAG directive"),NA.call(e.tagMap,n)&>(e,'there is a previously declared suffix for "'+n+'" tag handle'),sH.test(s)||gt(e,"ill-formed tag prefix (second argument) of the TAG directive"),e.tagMap[n]=s}};function FA(r,e,t,i){var n,s,o,a;if(e1&&(r.result+=Qa.repeat(` -`,e-1))}function ede(r,e,t){var i,n,s,o,a,l,c,u,g=r.kind,f=r.result,h;if(h=r.input.charCodeAt(r.position),fn(h)||sf(h)||h===35||h===38||h===42||h===33||h===124||h===62||h===39||h===34||h===37||h===64||h===96||(h===63||h===45)&&(n=r.input.charCodeAt(r.position+1),fn(n)||t&&sf(n)))return!1;for(r.kind="scalar",r.result="",s=o=r.position,a=!1;h!==0;){if(h===58){if(n=r.input.charCodeAt(r.position+1),fn(n)||t&&sf(n))break}else if(h===35){if(i=r.input.charCodeAt(r.position-1),fn(i))break}else{if(r.position===r.lineStart&&XI(r)||t&&sf(h))break;if(So(h))if(l=r.line,c=r.lineStart,u=r.lineIndent,_r(r,!1,-1),r.lineIndent>=e){a=!0,h=r.input.charCodeAt(r.position);continue}else{r.position=o,r.line=l,r.lineStart=c,r.lineIndent=u;break}}a&&(FA(r,s,o,!1),Pv(r,r.line-l),s=o=r.position,a=!1),Ec(h)||(o=r.position+1),h=r.input.charCodeAt(++r.position)}return FA(r,s,o,!1),r.result?!0:(r.kind=g,r.result=f,!1)}function tde(r,e){var t,i,n;if(t=r.input.charCodeAt(r.position),t!==39)return!1;for(r.kind="scalar",r.result="",r.position++,i=n=r.position;(t=r.input.charCodeAt(r.position))!==0;)if(t===39)if(FA(r,i,r.position,!0),t=r.input.charCodeAt(++r.position),t===39)i=r.position,r.position++,n=r.position;else return!0;else So(t)?(FA(r,i,n,!0),Pv(r,_r(r,!1,e)),i=n=r.position):r.position===r.lineStart&&XI(r)?gt(r,"unexpected end of the document within a single quoted scalar"):(r.position++,n=r.position);gt(r,"unexpected end of the stream within a single quoted scalar")}function rde(r,e){var t,i,n,s,o,a;if(a=r.input.charCodeAt(r.position),a!==34)return!1;for(r.kind="scalar",r.result="",r.position++,t=i=r.position;(a=r.input.charCodeAt(r.position))!==0;){if(a===34)return FA(r,t,r.position,!0),r.position++,!0;if(a===92){if(FA(r,t,r.position,!0),a=r.input.charCodeAt(++r.position),So(a))_r(r,!1,e);else if(a<256&&oH[a])r.result+=aH[a],r.position++;else if((o=Xpe(a))>0){for(n=o,s=0;n>0;n--)a=r.input.charCodeAt(++r.position),(o=Vpe(a))>=0?s=(s<<4)+o:gt(r,"expected hexadecimal character");r.result+=Zpe(s),r.position++}else gt(r,"unknown escape sequence");t=i=r.position}else So(a)?(FA(r,t,i,!0),Pv(r,_r(r,!1,e)),t=i=r.position):r.position===r.lineStart&&XI(r)?gt(r,"unexpected end of the document within a double quoted scalar"):(r.position++,i=r.position)}gt(r,"unexpected end of the stream within a double quoted scalar")}function ide(r,e){var t=!0,i,n=r.tag,s,o=r.anchor,a,l,c,u,g,f={},h,p,C,w;if(w=r.input.charCodeAt(r.position),w===91)l=93,g=!1,s=[];else if(w===123)l=125,g=!0,s={};else return!1;for(r.anchor!==null&&(r.anchorMap[r.anchor]=s),w=r.input.charCodeAt(++r.position);w!==0;){if(_r(r,!0,e),w=r.input.charCodeAt(r.position),w===l)return r.position++,r.tag=n,r.anchor=o,r.kind=g?"mapping":"sequence",r.result=s,!0;t||gt(r,"missed comma between flow collection entries"),p=h=C=null,c=u=!1,w===63&&(a=r.input.charCodeAt(r.position+1),fn(a)&&(c=u=!0,r.position++,_r(r,!0,e))),i=r.line,af(r,e,WI,!1,!0),p=r.tag,h=r.result,_r(r,!0,e),w=r.input.charCodeAt(r.position),(u||r.line===i)&&w===58&&(c=!0,w=r.input.charCodeAt(++r.position),_r(r,!0,e),af(r,e,WI,!1,!0),C=r.result),g?of(r,s,f,p,h,C):c?s.push(of(r,null,f,p,h,C)):s.push(h),_r(r,!0,e),w=r.input.charCodeAt(r.position),w===44?(t=!0,w=r.input.charCodeAt(++r.position)):t=!1}gt(r,"unexpected end of the stream within a flow collection")}function nde(r,e){var t,i,n=vv,s=!1,o=!1,a=e,l=0,c=!1,u,g;if(g=r.input.charCodeAt(r.position),g===124)i=!1;else if(g===62)i=!0;else return!1;for(r.kind="scalar",r.result="";g!==0;)if(g=r.input.charCodeAt(++r.position),g===43||g===45)vv===n?n=g===43?z2:qpe:gt(r,"repeat of a chomping mode identifier");else if((u=_pe(g))>=0)u===0?gt(r,"bad explicit indentation width of a block scalar; it cannot be less than one"):o?gt(r,"repeat of an indentation width identifier"):(a=e+u-1,o=!0);else break;if(Ec(g)){do g=r.input.charCodeAt(++r.position);while(Ec(g));if(g===35)do g=r.input.charCodeAt(++r.position);while(!So(g)&&g!==0)}for(;g!==0;){for(xv(r),r.lineIndent=0,g=r.input.charCodeAt(r.position);(!o||r.lineIndenta&&(a=r.lineIndent),So(g)){l++;continue}if(r.lineIndente)&&l!==0)gt(r,"bad indentation of a sequence entry");else if(r.lineIndente)&&(af(r,e,zI,!0,n)&&(p?f=r.result:h=r.result),p||(of(r,c,u,g,f,h,s,o),g=f=h=null),_r(r,!0,-1),w=r.input.charCodeAt(r.position)),r.lineIndent>e&&w!==0)gt(r,"bad indentation of a mapping entry");else if(r.lineIndente?l=1:r.lineIndent===e?l=0:r.lineIndente?l=1:r.lineIndent===e?l=0:r.lineIndent tag; it should be "scalar", not "'+r.kind+'"'),g=0,f=r.implicitTypes.length;g tag; it should be "'+h.kind+'", not "'+r.kind+'"'),h.resolve(r.result)?(r.result=h.construct(r.result),r.anchor!==null&&(r.anchorMap[r.anchor]=r.result)):gt(r,"cannot resolve a node with !<"+r.tag+"> explicit tag")):gt(r,"unknown tag !<"+r.tag+">");return r.listener!==null&&r.listener("close",r),r.tag!==null||r.anchor!==null||u}function lde(r){var e=r.position,t,i,n,s=!1,o;for(r.version=null,r.checkLineBreaks=r.legacy,r.tagMap={},r.anchorMap={};(o=r.input.charCodeAt(r.position))!==0&&(_r(r,!0,-1),o=r.input.charCodeAt(r.position),!(r.lineIndent>0||o!==37));){for(s=!0,o=r.input.charCodeAt(++r.position),t=r.position;o!==0&&!fn(o);)o=r.input.charCodeAt(++r.position);for(i=r.input.slice(t,r.position),n=[],i.length<1&>(r,"directive name must not be less than one character in length");o!==0;){for(;Ec(o);)o=r.input.charCodeAt(++r.position);if(o===35){do o=r.input.charCodeAt(++r.position);while(o!==0&&!So(o));break}if(So(o))break;for(t=r.position;o!==0&&!fn(o);)o=r.input.charCodeAt(++r.position);n.push(r.input.slice(t,r.position))}o!==0&&xv(r),NA.call(_2,i)?_2[i](r,i,n):VI(r,'unknown document directive "'+i+'"')}if(_r(r,!0,-1),r.lineIndent===0&&r.input.charCodeAt(r.position)===45&&r.input.charCodeAt(r.position+1)===45&&r.input.charCodeAt(r.position+2)===45?(r.position+=3,_r(r,!0,-1)):s&>(r,"directives end mark is expected"),af(r,r.lineIndent-1,zI,!1,!0),_r(r,!0,-1),r.checkLineBreaks&&Wpe.test(r.input.slice(e,r.position))&&VI(r,"non-ASCII line breaks are interpreted as content"),r.documents.push(r.result),r.position===r.lineStart&&XI(r)){r.input.charCodeAt(r.position)===46&&(r.position+=3,_r(r,!0,-1));return}if(r.position"u"&&(t=e,e=null);var i=lH(r,t);if(typeof e!="function")return i;for(var n=0,s=i.length;n"u"&&(t=e,e=null),cH(r,e,Qa.extend({schema:tH},t))}function ude(r,e){return uH(r,Qa.extend({schema:tH},e))}Id.exports.loadAll=cH;Id.exports.load=uH;Id.exports.safeLoadAll=cde;Id.exports.safeLoad=ude});var TH=y((h$e,Fv)=>{"use strict";var wd=pc(),Bd=tf(),gde=Ed(),fde=nf(),IH=Object.prototype.toString,yH=Object.prototype.hasOwnProperty,hde=9,yd=10,pde=13,dde=32,Cde=33,mde=34,wH=35,Ede=37,Ide=38,yde=39,wde=42,BH=44,Bde=45,bH=58,bde=61,Qde=62,Sde=63,vde=64,QH=91,SH=93,xde=96,vH=123,Pde=124,xH=125,Ti={};Ti[0]="\\0";Ti[7]="\\a";Ti[8]="\\b";Ti[9]="\\t";Ti[10]="\\n";Ti[11]="\\v";Ti[12]="\\f";Ti[13]="\\r";Ti[27]="\\e";Ti[34]='\\"';Ti[92]="\\\\";Ti[133]="\\N";Ti[160]="\\_";Ti[8232]="\\L";Ti[8233]="\\P";var Dde=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function kde(r,e){var t,i,n,s,o,a,l;if(e===null)return{};for(t={},i=Object.keys(e),n=0,s=i.length;n0?r.charCodeAt(s-1):null,f=f&&pH(o,a)}else{for(s=0;si&&r[g+1]!==" ",g=s);else if(!Af(o))return _I;a=s>0?r.charCodeAt(s-1):null,f=f&&pH(o,a)}c=c||u&&s-g-1>i&&r[g+1]!==" "}return!l&&!c?f&&!n(r)?DH:kH:t>9&&PH(r)?_I:c?FH:RH}function Ode(r,e,t,i){r.dump=function(){if(e.length===0)return"''";if(!r.noCompatMode&&Dde.indexOf(e)!==-1)return"'"+e+"'";var n=r.indent*Math.max(1,t),s=r.lineWidth===-1?-1:Math.max(Math.min(r.lineWidth,40),r.lineWidth-n),o=i||r.flowLevel>-1&&t>=r.flowLevel;function a(l){return Fde(r,l)}switch(Lde(e,o,r.indent,s,a)){case DH:return e;case kH:return"'"+e.replace(/'/g,"''")+"'";case RH:return"|"+dH(e,r.indent)+CH(hH(e,n));case FH:return">"+dH(e,r.indent)+CH(hH(Mde(e,s),n));case _I:return'"'+Ude(e,s)+'"';default:throw new Bd("impossible error: invalid scalar style")}}()}function dH(r,e){var t=PH(r)?String(e):"",i=r[r.length-1]===` -`,n=i&&(r[r.length-2]===` -`||r===` -`),s=n?"+":i?"":"-";return t+s+` -`}function CH(r){return r[r.length-1]===` -`?r.slice(0,-1):r}function Mde(r,e){for(var t=/(\n+)([^\n]*)/g,i=function(){var c=r.indexOf(` -`);return c=c!==-1?c:r.length,t.lastIndex=c,mH(r.slice(0,c),e)}(),n=r[0]===` -`||r[0]===" ",s,o;o=t.exec(r);){var a=o[1],l=o[2];s=l[0]===" ",i+=a+(!n&&!s&&l!==""?` -`:"")+mH(l,e),n=s}return i}function mH(r,e){if(r===""||r[0]===" ")return r;for(var t=/ [^ ]/g,i,n=0,s,o=0,a=0,l="";i=t.exec(r);)a=i.index,a-n>e&&(s=o>n?o:a,l+=` -`+r.slice(n,s),n=s+1),o=a;return l+=` -`,r.length-n>e&&o>n?l+=r.slice(n,o)+` -`+r.slice(o+1):l+=r.slice(n),l.slice(1)}function Ude(r){for(var e="",t,i,n,s=0;s=55296&&t<=56319&&(i=r.charCodeAt(s+1),i>=56320&&i<=57343)){e+=fH((t-55296)*1024+i-56320+65536),s++;continue}n=Ti[t],e+=!n&&Af(t)?r[s]:n||fH(t)}return e}function Kde(r,e,t){var i="",n=r.tag,s,o;for(s=0,o=t.length;s1024&&(u+="? "),u+=r.dump+(r.condenseFlow?'"':"")+":"+(r.condenseFlow?"":" "),Ic(r,e,c,!1,!1)&&(u+=r.dump,i+=u));r.tag=n,r.dump="{"+i+"}"}function Yde(r,e,t,i){var n="",s=r.tag,o=Object.keys(t),a,l,c,u,g,f;if(r.sortKeys===!0)o.sort();else if(typeof r.sortKeys=="function")o.sort(r.sortKeys);else if(r.sortKeys)throw new Bd("sortKeys must be a boolean or a function");for(a=0,l=o.length;a1024,g&&(r.dump&&yd===r.dump.charCodeAt(0)?f+="?":f+="? "),f+=r.dump,g&&(f+=Dv(r,e)),Ic(r,e+1,u,!0,g)&&(r.dump&&yd===r.dump.charCodeAt(0)?f+=":":f+=": ",f+=r.dump,n+=f));r.tag=s,r.dump=n||"{}"}function EH(r,e,t){var i,n,s,o,a,l;for(n=t?r.explicitTypes:r.implicitTypes,s=0,o=n.length;s tag resolver accepts not "'+l+'" style');r.dump=i}return!0}return!1}function Ic(r,e,t,i,n,s){r.tag=null,r.dump=t,EH(r,t,!1)||EH(r,t,!0);var o=IH.call(r.dump);i&&(i=r.flowLevel<0||r.flowLevel>e);var a=o==="[object Object]"||o==="[object Array]",l,c;if(a&&(l=r.duplicates.indexOf(t),c=l!==-1),(r.tag!==null&&r.tag!=="?"||c||r.indent!==2&&e>0)&&(n=!1),c&&r.usedDuplicates[l])r.dump="*ref_"+l;else{if(a&&c&&!r.usedDuplicates[l]&&(r.usedDuplicates[l]=!0),o==="[object Object]")i&&Object.keys(r.dump).length!==0?(Yde(r,e,r.dump,n),c&&(r.dump="&ref_"+l+r.dump)):(Gde(r,e,r.dump),c&&(r.dump="&ref_"+l+" "+r.dump));else if(o==="[object Array]"){var u=r.noArrayIndent&&e>0?e-1:e;i&&r.dump.length!==0?(Hde(r,u,r.dump,n),c&&(r.dump="&ref_"+l+r.dump)):(Kde(r,u,r.dump),c&&(r.dump="&ref_"+l+" "+r.dump))}else if(o==="[object String]")r.tag!=="?"&&Ode(r,r.dump,e,s);else{if(r.skipInvalid)return!1;throw new Bd("unacceptable kind of an object to dump "+o)}r.tag!==null&&r.tag!=="?"&&(r.dump="!<"+r.tag+"> "+r.dump)}return!0}function jde(r,e){var t=[],i=[],n,s;for(kv(r,t,i),n=0,s=i.length;n{"use strict";var ZI=gH(),LH=TH();function $I(r){return function(){throw new Error("Function "+r+" is deprecated and cannot be used.")}}Tr.exports.Type=Ai();Tr.exports.Schema=dc();Tr.exports.FAILSAFE_SCHEMA=qI();Tr.exports.JSON_SCHEMA=bv();Tr.exports.CORE_SCHEMA=Qv();Tr.exports.DEFAULT_SAFE_SCHEMA=nf();Tr.exports.DEFAULT_FULL_SCHEMA=Ed();Tr.exports.load=ZI.load;Tr.exports.loadAll=ZI.loadAll;Tr.exports.safeLoad=ZI.safeLoad;Tr.exports.safeLoadAll=ZI.safeLoadAll;Tr.exports.dump=LH.dump;Tr.exports.safeDump=LH.safeDump;Tr.exports.YAMLException=tf();Tr.exports.MINIMAL_SCHEMA=qI();Tr.exports.SAFE_SCHEMA=nf();Tr.exports.DEFAULT_SCHEMA=Ed();Tr.exports.scan=$I("scan");Tr.exports.parse=$I("parse");Tr.exports.compose=$I("compose");Tr.exports.addConstructor=$I("addConstructor")});var UH=y((d$e,MH)=>{"use strict";var Jde=OH();MH.exports=Jde});var HH=y((C$e,KH)=>{"use strict";function Wde(r,e){function t(){this.constructor=r}t.prototype=e.prototype,r.prototype=new t}function yc(r,e,t,i){this.message=r,this.expected=e,this.found=t,this.location=i,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,yc)}Wde(yc,Error);yc.buildMessage=function(r,e){var t={literal:function(c){return'"'+n(c.text)+'"'},class:function(c){var u="",g;for(g=0;g0){for(g=1,f=1;g({[Ne]:pe})))},H=function(R){return R},j=function(R){return R},$=Ms("correct indentation"),V=" ",W=ar(" ",!1),Z=function(R){return R.length===vA*Gg},A=function(R){return R.length===(vA+1)*Gg},ae=function(){return vA++,!0},ge=function(){return vA--,!0},_=function(){return Lg()},L=Ms("pseudostring"),N=/^[^\r\n\t ?:,\][{}#&*!|>'"%@`\-]/,ue=Fn(["\r",` -`," "," ","?",":",",","]","[","{","}","#","&","*","!","|",">","'",'"',"%","@","`","-"],!0,!1),we=/^[^\r\n\t ,\][{}:#"']/,Te=Fn(["\r",` -`," "," ",",","]","[","{","}",":","#",'"',"'"],!0,!1),Pe=function(){return Lg().replace(/^ *| *$/g,"")},Le="--",se=ar("--",!1),Ae=/^[a-zA-Z\/0-9]/,be=Fn([["a","z"],["A","Z"],"/",["0","9"]],!1,!1),fe=/^[^\r\n\t :,]/,le=Fn(["\r",` -`," "," ",":",","],!0,!1),Ge="null",ie=ar("null",!1),Y=function(){return null},he="true",re=ar("true",!1),me=function(){return!0},tt="false",Rt=ar("false",!1),It=function(){return!1},Ur=Ms("string"),oi='"',pi=ar('"',!1),pr=function(){return""},di=function(R){return R},ai=function(R){return R.join("")},Os=/^[^"\\\0-\x1F\x7F]/,dr=Fn(['"',"\\",["\0",""],"\x7F"],!0,!1),Bi='\\"',_n=ar('\\"',!1),pa=function(){return'"'},EA="\\\\",kg=ar("\\\\",!1),Zn=function(){return"\\"},IA="\\/",da=ar("\\/",!1),Jp=function(){return"/"},yA="\\b",wA=ar("\\b",!1),Br=function(){return"\b"},Vl="\\f",Rg=ar("\\f",!1),Eo=function(){return"\f"},Fg="\\n",Wp=ar("\\n",!1),zp=function(){return` -`},Pr="\\r",oe=ar("\\r",!1),Io=function(){return"\r"},kn="\\t",Ng=ar("\\t",!1),bt=function(){return" "},Xl="\\u",Rn=ar("\\u",!1),$n=function(R,q,pe,Ne){return String.fromCharCode(parseInt(`0x${R}${q}${pe}${Ne}`))},es=/^[0-9a-fA-F]/,ut=Fn([["0","9"],["a","f"],["A","F"]],!1,!1),yo=Ms("blank space"),at=/^[ \t]/,ln=Fn([" "," "],!1,!1),S=Ms("white space"),Lt=/^[ \t\n\r]/,Tg=Fn([" "," ",` -`,"\r"],!1,!1),_l=`\r -`,Vp=ar(`\r -`,!1),Xp=` -`,_p=ar(` -`,!1),Zp="\r",$p=ar("\r",!1),G=0,yt=0,BA=[{line:1,column:1}],Wi=0,Zl=[],We=0,Ca;if("startRule"in e){if(!(e.startRule in i))throw new Error(`Can't start parsing from rule "`+e.startRule+'".');n=i[e.startRule]}function Lg(){return r.substring(yt,G)}function uI(){return cn(yt,G)}function ed(R,q){throw q=q!==void 0?q:cn(yt,G),ec([Ms(R)],r.substring(yt,G),q)}function gI(R,q){throw q=q!==void 0?q:cn(yt,G),Og(R,q)}function ar(R,q){return{type:"literal",text:R,ignoreCase:q}}function Fn(R,q,pe){return{type:"class",parts:R,inverted:q,ignoreCase:pe}}function $l(){return{type:"any"}}function td(){return{type:"end"}}function Ms(R){return{type:"other",description:R}}function ma(R){var q=BA[R],pe;if(q)return q;for(pe=R-1;!BA[pe];)pe--;for(q=BA[pe],q={line:q.line,column:q.column};peWi&&(Wi=G,Zl=[]),Zl.push(R))}function Og(R,q){return new yc(R,null,null,q)}function ec(R,q,pe){return new yc(yc.buildMessage(R,q),R,q,pe)}function Us(){var R;return R=Mg(),R}function tc(){var R,q,pe;for(R=G,q=[],pe=bA();pe!==t;)q.push(pe),pe=bA();return q!==t&&(yt=R,q=s(q)),R=q,R}function bA(){var R,q,pe,Ne,xe;return R=G,q=Ia(),q!==t?(r.charCodeAt(G)===45?(pe=o,G++):(pe=t,We===0&&ke(a)),pe!==t?(Ne=Nr(),Ne!==t?(xe=Ea(),xe!==t?(yt=R,q=l(xe),R=q):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t),R}function Mg(){var R,q,pe;for(R=G,q=[],pe=Ug();pe!==t;)q.push(pe),pe=Ug();return q!==t&&(yt=R,q=c(q)),R=q,R}function Ug(){var R,q,pe,Ne,xe,qe,dt,Ft,Nn;if(R=G,q=Nr(),q===t&&(q=null),q!==t){if(pe=G,r.charCodeAt(G)===35?(Ne=u,G++):(Ne=t,We===0&&ke(g)),Ne!==t){if(xe=[],qe=G,dt=G,We++,Ft=Gs(),We--,Ft===t?dt=void 0:(G=dt,dt=t),dt!==t?(r.length>G?(Ft=r.charAt(G),G++):(Ft=t,We===0&&ke(f)),Ft!==t?(dt=[dt,Ft],qe=dt):(G=qe,qe=t)):(G=qe,qe=t),qe!==t)for(;qe!==t;)xe.push(qe),qe=G,dt=G,We++,Ft=Gs(),We--,Ft===t?dt=void 0:(G=dt,dt=t),dt!==t?(r.length>G?(Ft=r.charAt(G),G++):(Ft=t,We===0&&ke(f)),Ft!==t?(dt=[dt,Ft],qe=dt):(G=qe,qe=t)):(G=qe,qe=t);else xe=t;xe!==t?(Ne=[Ne,xe],pe=Ne):(G=pe,pe=t)}else G=pe,pe=t;if(pe===t&&(pe=null),pe!==t){if(Ne=[],xe=Hs(),xe!==t)for(;xe!==t;)Ne.push(xe),xe=Hs();else Ne=t;Ne!==t?(yt=R,q=h(),R=q):(G=R,R=t)}else G=R,R=t}else G=R,R=t;if(R===t&&(R=G,q=Ia(),q!==t?(pe=rc(),pe!==t?(Ne=Nr(),Ne===t&&(Ne=null),Ne!==t?(r.charCodeAt(G)===58?(xe=p,G++):(xe=t,We===0&&ke(C)),xe!==t?(qe=Nr(),qe===t&&(qe=null),qe!==t?(dt=Ea(),dt!==t?(yt=R,q=w(pe,dt),R=q):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t),R===t&&(R=G,q=Ia(),q!==t?(pe=Ks(),pe!==t?(Ne=Nr(),Ne===t&&(Ne=null),Ne!==t?(r.charCodeAt(G)===58?(xe=p,G++):(xe=t,We===0&&ke(C)),xe!==t?(qe=Nr(),qe===t&&(qe=null),qe!==t?(dt=Ea(),dt!==t?(yt=R,q=w(pe,dt),R=q):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t),R===t))){if(R=G,q=Ia(),q!==t)if(pe=Ks(),pe!==t)if(Ne=Nr(),Ne!==t)if(xe=fI(),xe!==t){if(qe=[],dt=Hs(),dt!==t)for(;dt!==t;)qe.push(dt),dt=Hs();else qe=t;qe!==t?(yt=R,q=w(pe,xe),R=q):(G=R,R=t)}else G=R,R=t;else G=R,R=t;else G=R,R=t;else G=R,R=t;if(R===t)if(R=G,q=Ia(),q!==t)if(pe=Ks(),pe!==t){if(Ne=[],xe=G,qe=Nr(),qe===t&&(qe=null),qe!==t?(r.charCodeAt(G)===44?(dt=B,G++):(dt=t,We===0&&ke(v)),dt!==t?(Ft=Nr(),Ft===t&&(Ft=null),Ft!==t?(Nn=Ks(),Nn!==t?(yt=xe,qe=D(pe,Nn),xe=qe):(G=xe,xe=t)):(G=xe,xe=t)):(G=xe,xe=t)):(G=xe,xe=t),xe!==t)for(;xe!==t;)Ne.push(xe),xe=G,qe=Nr(),qe===t&&(qe=null),qe!==t?(r.charCodeAt(G)===44?(dt=B,G++):(dt=t,We===0&&ke(v)),dt!==t?(Ft=Nr(),Ft===t&&(Ft=null),Ft!==t?(Nn=Ks(),Nn!==t?(yt=xe,qe=D(pe,Nn),xe=qe):(G=xe,xe=t)):(G=xe,xe=t)):(G=xe,xe=t)):(G=xe,xe=t);else Ne=t;Ne!==t?(xe=Nr(),xe===t&&(xe=null),xe!==t?(r.charCodeAt(G)===58?(qe=p,G++):(qe=t,We===0&&ke(C)),qe!==t?(dt=Nr(),dt===t&&(dt=null),dt!==t?(Ft=Ea(),Ft!==t?(yt=R,q=T(pe,Ne,Ft),R=q):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)}else G=R,R=t;else G=R,R=t}return R}function Ea(){var R,q,pe,Ne,xe,qe,dt;if(R=G,q=G,We++,pe=G,Ne=Gs(),Ne!==t?(xe=$e(),xe!==t?(r.charCodeAt(G)===45?(qe=o,G++):(qe=t,We===0&&ke(a)),qe!==t?(dt=Nr(),dt!==t?(Ne=[Ne,xe,qe,dt],pe=Ne):(G=pe,pe=t)):(G=pe,pe=t)):(G=pe,pe=t)):(G=pe,pe=t),We--,pe!==t?(G=q,q=void 0):q=t,q!==t?(pe=Hs(),pe!==t?(Ne=wo(),Ne!==t?(xe=tc(),xe!==t?(qe=QA(),qe!==t?(yt=R,q=H(xe),R=q):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t),R===t&&(R=G,q=Gs(),q!==t?(pe=wo(),pe!==t?(Ne=Mg(),Ne!==t?(xe=QA(),xe!==t?(yt=R,q=H(Ne),R=q):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t),R===t))if(R=G,q=ic(),q!==t){if(pe=[],Ne=Hs(),Ne!==t)for(;Ne!==t;)pe.push(Ne),Ne=Hs();else pe=t;pe!==t?(yt=R,q=j(q),R=q):(G=R,R=t)}else G=R,R=t;return R}function Ia(){var R,q,pe;for(We++,R=G,q=[],r.charCodeAt(G)===32?(pe=V,G++):(pe=t,We===0&&ke(W));pe!==t;)q.push(pe),r.charCodeAt(G)===32?(pe=V,G++):(pe=t,We===0&&ke(W));return q!==t?(yt=G,pe=Z(q),pe?pe=void 0:pe=t,pe!==t?(q=[q,pe],R=q):(G=R,R=t)):(G=R,R=t),We--,R===t&&(q=t,We===0&&ke($)),R}function $e(){var R,q,pe;for(R=G,q=[],r.charCodeAt(G)===32?(pe=V,G++):(pe=t,We===0&&ke(W));pe!==t;)q.push(pe),r.charCodeAt(G)===32?(pe=V,G++):(pe=t,We===0&&ke(W));return q!==t?(yt=G,pe=A(q),pe?pe=void 0:pe=t,pe!==t?(q=[q,pe],R=q):(G=R,R=t)):(G=R,R=t),R}function wo(){var R;return yt=G,R=ae(),R?R=void 0:R=t,R}function QA(){var R;return yt=G,R=ge(),R?R=void 0:R=t,R}function rc(){var R;return R=nc(),R===t&&(R=rd()),R}function Ks(){var R,q,pe;if(R=nc(),R===t){if(R=G,q=[],pe=Kg(),pe!==t)for(;pe!==t;)q.push(pe),pe=Kg();else q=t;q!==t&&(yt=R,q=_()),R=q}return R}function ic(){var R;return R=id(),R===t&&(R=hI(),R===t&&(R=nc(),R===t&&(R=rd()))),R}function fI(){var R;return R=id(),R===t&&(R=nc(),R===t&&(R=Kg())),R}function rd(){var R,q,pe,Ne,xe,qe;if(We++,R=G,N.test(r.charAt(G))?(q=r.charAt(G),G++):(q=t,We===0&&ke(ue)),q!==t){for(pe=[],Ne=G,xe=Nr(),xe===t&&(xe=null),xe!==t?(we.test(r.charAt(G))?(qe=r.charAt(G),G++):(qe=t,We===0&&ke(Te)),qe!==t?(xe=[xe,qe],Ne=xe):(G=Ne,Ne=t)):(G=Ne,Ne=t);Ne!==t;)pe.push(Ne),Ne=G,xe=Nr(),xe===t&&(xe=null),xe!==t?(we.test(r.charAt(G))?(qe=r.charAt(G),G++):(qe=t,We===0&&ke(Te)),qe!==t?(xe=[xe,qe],Ne=xe):(G=Ne,Ne=t)):(G=Ne,Ne=t);pe!==t?(yt=R,q=Pe(),R=q):(G=R,R=t)}else G=R,R=t;return We--,R===t&&(q=t,We===0&&ke(L)),R}function Kg(){var R,q,pe,Ne,xe;if(R=G,r.substr(G,2)===Le?(q=Le,G+=2):(q=t,We===0&&ke(se)),q===t&&(q=null),q!==t)if(Ae.test(r.charAt(G))?(pe=r.charAt(G),G++):(pe=t,We===0&&ke(be)),pe!==t){for(Ne=[],fe.test(r.charAt(G))?(xe=r.charAt(G),G++):(xe=t,We===0&&ke(le));xe!==t;)Ne.push(xe),fe.test(r.charAt(G))?(xe=r.charAt(G),G++):(xe=t,We===0&&ke(le));Ne!==t?(yt=R,q=Pe(),R=q):(G=R,R=t)}else G=R,R=t;else G=R,R=t;return R}function id(){var R,q;return R=G,r.substr(G,4)===Ge?(q=Ge,G+=4):(q=t,We===0&&ke(ie)),q!==t&&(yt=R,q=Y()),R=q,R}function hI(){var R,q;return R=G,r.substr(G,4)===he?(q=he,G+=4):(q=t,We===0&&ke(re)),q!==t&&(yt=R,q=me()),R=q,R===t&&(R=G,r.substr(G,5)===tt?(q=tt,G+=5):(q=t,We===0&&ke(Rt)),q!==t&&(yt=R,q=It()),R=q),R}function nc(){var R,q,pe,Ne;return We++,R=G,r.charCodeAt(G)===34?(q=oi,G++):(q=t,We===0&&ke(pi)),q!==t?(r.charCodeAt(G)===34?(pe=oi,G++):(pe=t,We===0&&ke(pi)),pe!==t?(yt=R,q=pr(),R=q):(G=R,R=t)):(G=R,R=t),R===t&&(R=G,r.charCodeAt(G)===34?(q=oi,G++):(q=t,We===0&&ke(pi)),q!==t?(pe=pI(),pe!==t?(r.charCodeAt(G)===34?(Ne=oi,G++):(Ne=t,We===0&&ke(pi)),Ne!==t?(yt=R,q=di(pe),R=q):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)),We--,R===t&&(q=t,We===0&&ke(Ur)),R}function pI(){var R,q,pe;if(R=G,q=[],pe=Hg(),pe!==t)for(;pe!==t;)q.push(pe),pe=Hg();else q=t;return q!==t&&(yt=R,q=ai(q)),R=q,R}function Hg(){var R,q,pe,Ne,xe,qe;return Os.test(r.charAt(G))?(R=r.charAt(G),G++):(R=t,We===0&&ke(dr)),R===t&&(R=G,r.substr(G,2)===Bi?(q=Bi,G+=2):(q=t,We===0&&ke(_n)),q!==t&&(yt=R,q=pa()),R=q,R===t&&(R=G,r.substr(G,2)===EA?(q=EA,G+=2):(q=t,We===0&&ke(kg)),q!==t&&(yt=R,q=Zn()),R=q,R===t&&(R=G,r.substr(G,2)===IA?(q=IA,G+=2):(q=t,We===0&&ke(da)),q!==t&&(yt=R,q=Jp()),R=q,R===t&&(R=G,r.substr(G,2)===yA?(q=yA,G+=2):(q=t,We===0&&ke(wA)),q!==t&&(yt=R,q=Br()),R=q,R===t&&(R=G,r.substr(G,2)===Vl?(q=Vl,G+=2):(q=t,We===0&&ke(Rg)),q!==t&&(yt=R,q=Eo()),R=q,R===t&&(R=G,r.substr(G,2)===Fg?(q=Fg,G+=2):(q=t,We===0&&ke(Wp)),q!==t&&(yt=R,q=zp()),R=q,R===t&&(R=G,r.substr(G,2)===Pr?(q=Pr,G+=2):(q=t,We===0&&ke(oe)),q!==t&&(yt=R,q=Io()),R=q,R===t&&(R=G,r.substr(G,2)===kn?(q=kn,G+=2):(q=t,We===0&&ke(Ng)),q!==t&&(yt=R,q=bt()),R=q,R===t&&(R=G,r.substr(G,2)===Xl?(q=Xl,G+=2):(q=t,We===0&&ke(Rn)),q!==t?(pe=SA(),pe!==t?(Ne=SA(),Ne!==t?(xe=SA(),xe!==t?(qe=SA(),qe!==t?(yt=R,q=$n(pe,Ne,xe,qe),R=q):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)))))))))),R}function SA(){var R;return es.test(r.charAt(G))?(R=r.charAt(G),G++):(R=t,We===0&&ke(ut)),R}function Nr(){var R,q;if(We++,R=[],at.test(r.charAt(G))?(q=r.charAt(G),G++):(q=t,We===0&&ke(ln)),q!==t)for(;q!==t;)R.push(q),at.test(r.charAt(G))?(q=r.charAt(G),G++):(q=t,We===0&&ke(ln));else R=t;return We--,R===t&&(q=t,We===0&&ke(yo)),R}function dI(){var R,q;if(We++,R=[],Lt.test(r.charAt(G))?(q=r.charAt(G),G++):(q=t,We===0&&ke(Tg)),q!==t)for(;q!==t;)R.push(q),Lt.test(r.charAt(G))?(q=r.charAt(G),G++):(q=t,We===0&&ke(Tg));else R=t;return We--,R===t&&(q=t,We===0&&ke(S)),R}function Hs(){var R,q,pe,Ne,xe,qe;if(R=G,q=Gs(),q!==t){for(pe=[],Ne=G,xe=Nr(),xe===t&&(xe=null),xe!==t?(qe=Gs(),qe!==t?(xe=[xe,qe],Ne=xe):(G=Ne,Ne=t)):(G=Ne,Ne=t);Ne!==t;)pe.push(Ne),Ne=G,xe=Nr(),xe===t&&(xe=null),xe!==t?(qe=Gs(),qe!==t?(xe=[xe,qe],Ne=xe):(G=Ne,Ne=t)):(G=Ne,Ne=t);pe!==t?(q=[q,pe],R=q):(G=R,R=t)}else G=R,R=t;return R}function Gs(){var R;return r.substr(G,2)===_l?(R=_l,G+=2):(R=t,We===0&&ke(Vp)),R===t&&(r.charCodeAt(G)===10?(R=Xp,G++):(R=t,We===0&&ke(_p)),R===t&&(r.charCodeAt(G)===13?(R=Zp,G++):(R=t,We===0&&ke($p)))),R}let Gg=2,vA=0;if(Ca=n(),Ca!==t&&G===r.length)return Ca;throw Ca!==t&&G{"use strict";var $de=r=>{let e=!1,t=!1,i=!1;for(let n=0;n{if(!(typeof r=="string"||Array.isArray(r)))throw new TypeError("Expected the input to be `string | string[]`");e=Object.assign({pascalCase:!1},e);let t=n=>e.pascalCase?n.charAt(0).toUpperCase()+n.slice(1):n;return Array.isArray(r)?r=r.map(n=>n.trim()).filter(n=>n.length).join("-"):r=r.trim(),r.length===0?"":r.length===1?e.pascalCase?r.toUpperCase():r.toLowerCase():(r!==r.toLowerCase()&&(r=$de(r)),r=r.replace(/^[_.\- ]+/,"").toLowerCase().replace(/[_.\- ]+(\w|$)/g,(n,s)=>s.toUpperCase()).replace(/\d+(\w|$)/g,n=>n.toUpperCase()),t(r))};Tv.exports=JH;Tv.exports.default=JH});var zH=y((B$e,eCe)=>{eCe.exports=[{name:"AppVeyor",constant:"APPVEYOR",env:"APPVEYOR",pr:"APPVEYOR_PULL_REQUEST_NUMBER"},{name:"Azure Pipelines",constant:"AZURE_PIPELINES",env:"SYSTEM_TEAMFOUNDATIONCOLLECTIONURI",pr:"SYSTEM_PULLREQUEST_PULLREQUESTID"},{name:"Appcircle",constant:"APPCIRCLE",env:"AC_APPCIRCLE"},{name:"Bamboo",constant:"BAMBOO",env:"bamboo_planKey"},{name:"Bitbucket Pipelines",constant:"BITBUCKET",env:"BITBUCKET_COMMIT",pr:"BITBUCKET_PR_ID"},{name:"Bitrise",constant:"BITRISE",env:"BITRISE_IO",pr:"BITRISE_PULL_REQUEST"},{name:"Buddy",constant:"BUDDY",env:"BUDDY_WORKSPACE_ID",pr:"BUDDY_EXECUTION_PULL_REQUEST_ID"},{name:"Buildkite",constant:"BUILDKITE",env:"BUILDKITE",pr:{env:"BUILDKITE_PULL_REQUEST",ne:"false"}},{name:"CircleCI",constant:"CIRCLE",env:"CIRCLECI",pr:"CIRCLE_PULL_REQUEST"},{name:"Cirrus CI",constant:"CIRRUS",env:"CIRRUS_CI",pr:"CIRRUS_PR"},{name:"AWS CodeBuild",constant:"CODEBUILD",env:"CODEBUILD_BUILD_ARN"},{name:"Codefresh",constant:"CODEFRESH",env:"CF_BUILD_ID",pr:{any:["CF_PULL_REQUEST_NUMBER","CF_PULL_REQUEST_ID"]}},{name:"Codeship",constant:"CODESHIP",env:{CI_NAME:"codeship"}},{name:"Drone",constant:"DRONE",env:"DRONE",pr:{DRONE_BUILD_EVENT:"pull_request"}},{name:"dsari",constant:"DSARI",env:"DSARI"},{name:"GitHub Actions",constant:"GITHUB_ACTIONS",env:"GITHUB_ACTIONS",pr:{GITHUB_EVENT_NAME:"pull_request"}},{name:"GitLab CI",constant:"GITLAB",env:"GITLAB_CI",pr:"CI_MERGE_REQUEST_ID"},{name:"GoCD",constant:"GOCD",env:"GO_PIPELINE_LABEL"},{name:"LayerCI",constant:"LAYERCI",env:"LAYERCI",pr:"LAYERCI_PULL_REQUEST"},{name:"Hudson",constant:"HUDSON",env:"HUDSON_URL"},{name:"Jenkins",constant:"JENKINS",env:["JENKINS_URL","BUILD_ID"],pr:{any:["ghprbPullId","CHANGE_ID"]}},{name:"Magnum CI",constant:"MAGNUM",env:"MAGNUM"},{name:"Netlify CI",constant:"NETLIFY",env:"NETLIFY",pr:{env:"PULL_REQUEST",ne:"false"}},{name:"Nevercode",constant:"NEVERCODE",env:"NEVERCODE",pr:{env:"NEVERCODE_PULL_REQUEST",ne:"false"}},{name:"Render",constant:"RENDER",env:"RENDER",pr:{IS_PULL_REQUEST:"true"}},{name:"Sail CI",constant:"SAIL",env:"SAILCI",pr:"SAIL_PULL_REQUEST_NUMBER"},{name:"Semaphore",constant:"SEMAPHORE",env:"SEMAPHORE",pr:"PULL_REQUEST_NUMBER"},{name:"Screwdriver",constant:"SCREWDRIVER",env:"SCREWDRIVER",pr:{env:"SD_PULL_REQUEST",ne:"false"}},{name:"Shippable",constant:"SHIPPABLE",env:"SHIPPABLE",pr:{IS_PULL_REQUEST:"true"}},{name:"Solano CI",constant:"SOLANO",env:"TDDIUM",pr:"TDDIUM_PR_ID"},{name:"Strider CD",constant:"STRIDER",env:"STRIDER"},{name:"TaskCluster",constant:"TASKCLUSTER",env:["TASK_ID","RUN_ID"]},{name:"TeamCity",constant:"TEAMCITY",env:"TEAMCITY_VERSION"},{name:"Travis CI",constant:"TRAVIS",env:"TRAVIS",pr:{env:"TRAVIS_PULL_REQUEST",ne:"false"}},{name:"Vercel",constant:"VERCEL",env:"NOW_BUILDER"},{name:"Visual Studio App Center",constant:"APPCENTER",env:"APPCENTER_BUILD_ID"}]});var wc=y(Mn=>{"use strict";var XH=zH(),vo=process.env;Object.defineProperty(Mn,"_vendors",{value:XH.map(function(r){return r.constant})});Mn.name=null;Mn.isPR=null;XH.forEach(function(r){let t=(Array.isArray(r.env)?r.env:[r.env]).every(function(i){return VH(i)});if(Mn[r.constant]=t,t)switch(Mn.name=r.name,typeof r.pr){case"string":Mn.isPR=!!vo[r.pr];break;case"object":"env"in r.pr?Mn.isPR=r.pr.env in vo&&vo[r.pr.env]!==r.pr.ne:"any"in r.pr?Mn.isPR=r.pr.any.some(function(i){return!!vo[i]}):Mn.isPR=VH(r.pr);break;default:Mn.isPR=null}});Mn.isCI=!!(vo.CI||vo.CONTINUOUS_INTEGRATION||vo.BUILD_NUMBER||vo.RUN_ID||Mn.name);function VH(r){return typeof r=="string"?!!vo[r]:Object.keys(r).every(function(e){return vo[e]===r[e]})}});var ry=y(Un=>{"use strict";Object.defineProperty(Un,"__esModule",{value:!0});var tCe=0,rCe=1,iCe=2,nCe="",sCe="\0",oCe=-1,aCe=/^(-h|--help)(?:=([0-9]+))?$/,ACe=/^(--[a-z]+(?:-[a-z]+)*|-[a-zA-Z]+)$/,lCe=/^-[a-zA-Z]{2,}$/,cCe=/^([^=]+)=([\s\S]*)$/,uCe=process.env.DEBUG_CLI==="1";Un.BATCH_REGEX=lCe;Un.BINDING_REGEX=cCe;Un.DEBUG=uCe;Un.END_OF_INPUT=sCe;Un.HELP_COMMAND_INDEX=oCe;Un.HELP_REGEX=aCe;Un.NODE_ERRORED=iCe;Un.NODE_INITIAL=tCe;Un.NODE_SUCCESS=rCe;Un.OPTION_REGEX=ACe;Un.START_OF_INPUT=nCe});var iy=y(Qd=>{"use strict";Object.defineProperty(Qd,"__esModule",{value:!0});var gCe=ry(),Lv=class extends Error{constructor(e){super(e),this.clipanion={type:"usage"},this.name="UsageError"}},Ov=class extends Error{constructor(e,t){if(super(),this.input=e,this.candidates=t,this.clipanion={type:"none"},this.name="UnknownSyntaxError",this.candidates.length===0)this.message="Command not found, but we're not sure what's the alternative.";else if(this.candidates.every(i=>i.reason!==null&&i.reason===t[0].reason)){let[{reason:i}]=this.candidates;this.message=`${i} - -${this.candidates.map(({usage:n})=>`$ ${n}`).join(` -`)}`}else if(this.candidates.length===1){let[{usage:i}]=this.candidates;this.message=`Command not found; did you mean: - -$ ${i} -${Uv(e)}`}else this.message=`Command not found; did you mean one of: - -${this.candidates.map(({usage:i},n)=>`${`${n}.`.padStart(4)} ${i}`).join(` -`)} - -${Uv(e)}`}},Mv=class extends Error{constructor(e,t){super(),this.input=e,this.usages=t,this.clipanion={type:"none"},this.name="AmbiguousSyntaxError",this.message=`Cannot find which to pick amongst the following alternatives: - -${this.usages.map((i,n)=>`${`${n}.`.padStart(4)} ${i}`).join(` -`)} - -${Uv(e)}`}},Uv=r=>`While running ${r.filter(e=>e!==gCe.END_OF_INPUT).map(e=>{let t=JSON.stringify(e);return e.match(/\s/)||e.length===0||t!==`"${e}"`?t:e}).join(" ")}`;Qd.AmbiguousSyntaxError=Mv;Qd.UnknownSyntaxError=Ov;Qd.UsageError=Lv});var va=y(TA=>{"use strict";Object.defineProperty(TA,"__esModule",{value:!0});var _H=iy(),ZH=Symbol("clipanion/isOption");function fCe(r){return{...r,[ZH]:!0}}function hCe(r,e){return typeof r>"u"?[r,e]:typeof r=="object"&&r!==null&&!Array.isArray(r)?[void 0,r]:[r,e]}function Kv(r,e=!1){let t=r.replace(/^\.: /,"");return e&&(t=t[0].toLowerCase()+t.slice(1)),t}function $H(r,e){return e.length===1?new _H.UsageError(`${r}: ${Kv(e[0],!0)}`):new _H.UsageError(`${r}: -${e.map(t=>` -- ${Kv(t)}`).join("")}`)}function pCe(r,e,t){if(typeof t>"u")return e;let i=[],n=[],s=a=>{let l=e;return e=a,s.bind(null,l)};if(!t(e,{errors:i,coercions:n,coercion:s}))throw $H(`Invalid value for ${r}`,i);for(let[,a]of n)a();return e}TA.applyValidator=pCe;TA.cleanValidationError=Kv;TA.formatError=$H;TA.isOptionSymbol=ZH;TA.makeCommandOption=fCe;TA.rerouteArguments=hCe});var ns=y(st=>{"use strict";Object.defineProperty(st,"__esModule",{value:!0});var eG=/^[a-zA-Z_][a-zA-Z0-9_]*$/,tG=/^#[0-9a-f]{6}$/i,rG=/^#[0-9a-f]{6}([0-9a-f]{2})?$/i,iG=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/,nG=/^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12}$/i,Hv=/^(?:[1-9]\d{3}(-?)(?:(?:0[1-9]|1[0-2])\1(?:0[1-9]|1\d|2[0-8])|(?:0[13-9]|1[0-2])\1(?:29|30)|(?:0[13578]|1[02])(?:\1)31|00[1-9]|0[1-9]\d|[12]\d{2}|3(?:[0-5]\d|6[0-5]))|(?:[1-9]\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)(?:(-?)02(?:\2)29|-?366))T(?:[01]\d|2[0-3])(:?)[0-5]\d(?:\3[0-5]\d)?(?:Z|[+-][01]\d(?:\3[0-5]\d)?)$/,sG=r=>()=>r;function Qt({test:r}){return sG(r)()}function Zr(r){return r===null?"null":r===void 0?"undefined":r===""?"an empty string":JSON.stringify(r)}function LA(r,e){var t,i,n;return typeof e=="number"?`${(t=r==null?void 0:r.p)!==null&&t!==void 0?t:"."}[${e}]`:eG.test(e)?`${(i=r==null?void 0:r.p)!==null&&i!==void 0?i:""}.${e}`:`${(n=r==null?void 0:r.p)!==null&&n!==void 0?n:"."}[${JSON.stringify(e)}]`}function Bc(r,e){return t=>{let i=r[e];return r[e]=t,Bc(r,e).bind(null,i)}}function oG(r,e){return t=>{r[e]=t}}function ny(r,e,t){return r===1?e:t}function pt({errors:r,p:e}={},t){return r==null||r.push(`${e!=null?e:"."}: ${t}`),!1}var aG=()=>Qt({test:(r,e)=>!0});function dCe(r){return Qt({test:(e,t)=>e!==r?pt(t,`Expected a literal (got ${Zr(r)})`):!0})}var CCe=()=>Qt({test:(r,e)=>typeof r!="string"?pt(e,`Expected a string (got ${Zr(r)})`):!0});function mCe(r){let e=Array.isArray(r)?r:Object.values(r),t=new Set(e);return Qt({test:(i,n)=>t.has(i)?!0:pt(n,`Expected a valid enumeration value (got ${Zr(i)})`)})}var ECe=new Map([["true",!0],["True",!0],["1",!0],[1,!0],["false",!1],["False",!1],["0",!1],[0,!1]]),ICe=()=>Qt({test:(r,e)=>{var t;if(typeof r!="boolean"){if(typeof(e==null?void 0:e.coercions)<"u"){if(typeof(e==null?void 0:e.coercion)>"u")return pt(e,"Unbound coercion result");let i=ECe.get(r);if(typeof i<"u")return e.coercions.push([(t=e.p)!==null&&t!==void 0?t:".",e.coercion.bind(null,i)]),!0}return pt(e,`Expected a boolean (got ${Zr(r)})`)}return!0}}),yCe=()=>Qt({test:(r,e)=>{var t;if(typeof r!="number"){if(typeof(e==null?void 0:e.coercions)<"u"){if(typeof(e==null?void 0:e.coercion)>"u")return pt(e,"Unbound coercion result");let i;if(typeof r=="string"){let n;try{n=JSON.parse(r)}catch{}if(typeof n=="number")if(JSON.stringify(n)===r)i=n;else return pt(e,`Received a number that can't be safely represented by the runtime (${r})`)}if(typeof i<"u")return e.coercions.push([(t=e.p)!==null&&t!==void 0?t:".",e.coercion.bind(null,i)]),!0}return pt(e,`Expected a number (got ${Zr(r)})`)}return!0}}),wCe=()=>Qt({test:(r,e)=>{var t;if(!(r instanceof Date)){if(typeof(e==null?void 0:e.coercions)<"u"){if(typeof(e==null?void 0:e.coercion)>"u")return pt(e,"Unbound coercion result");let i;if(typeof r=="string"&&Hv.test(r))i=new Date(r);else{let n;if(typeof r=="string"){let s;try{s=JSON.parse(r)}catch{}typeof s=="number"&&(n=s)}else typeof r=="number"&&(n=r);if(typeof n<"u")if(Number.isSafeInteger(n)||!Number.isSafeInteger(n*1e3))i=new Date(n*1e3);else return pt(e,`Received a timestamp that can't be safely represented by the runtime (${r})`)}if(typeof i<"u")return e.coercions.push([(t=e.p)!==null&&t!==void 0?t:".",e.coercion.bind(null,i)]),!0}return pt(e,`Expected a date (got ${Zr(r)})`)}return!0}}),BCe=(r,{delimiter:e}={})=>Qt({test:(t,i)=>{var n;if(typeof t=="string"&&typeof e<"u"&&typeof(i==null?void 0:i.coercions)<"u"){if(typeof(i==null?void 0:i.coercion)>"u")return pt(i,"Unbound coercion result");t=t.split(e),i.coercions.push([(n=i.p)!==null&&n!==void 0?n:".",i.coercion.bind(null,t)])}if(!Array.isArray(t))return pt(i,`Expected an array (got ${Zr(t)})`);let s=!0;for(let o=0,a=t.length;o{let t=AG(r.length);return Qt({test:(i,n)=>{var s;if(typeof i=="string"&&typeof e<"u"&&typeof(n==null?void 0:n.coercions)<"u"){if(typeof(n==null?void 0:n.coercion)>"u")return pt(n,"Unbound coercion result");i=i.split(e),n.coercions.push([(s=n.p)!==null&&s!==void 0?s:".",n.coercion.bind(null,i)])}if(!Array.isArray(i))return pt(n,`Expected a tuple (got ${Zr(i)})`);let o=t(i,Object.assign({},n));for(let a=0,l=i.length;aQt({test:(t,i)=>{if(typeof t!="object"||t===null)return pt(i,`Expected an object (got ${Zr(t)})`);let n=Object.keys(t),s=!0;for(let o=0,a=n.length;o{let t=Object.keys(r);return Qt({test:(i,n)=>{if(typeof i!="object"||i===null)return pt(n,`Expected an object (got ${Zr(i)})`);let s=new Set([...t,...Object.keys(i)]),o={},a=!0;for(let l of s){if(l==="constructor"||l==="__proto__")a=pt(Object.assign(Object.assign({},n),{p:LA(n,l)}),"Unsafe property name");else{let c=Object.prototype.hasOwnProperty.call(r,l)?r[l]:void 0,u=Object.prototype.hasOwnProperty.call(i,l)?i[l]:void 0;typeof c<"u"?a=c(u,Object.assign(Object.assign({},n),{p:LA(n,l),coercion:Bc(i,l)}))&&a:e===null?a=pt(Object.assign(Object.assign({},n),{p:LA(n,l)}),`Extraneous property (got ${Zr(u)})`):Object.defineProperty(o,l,{enumerable:!0,get:()=>u,set:oG(i,l)})}if(!a&&(n==null?void 0:n.errors)==null)break}return e!==null&&(a||(n==null?void 0:n.errors)!=null)&&(a=e(o,n)&&a),a}})},vCe=r=>Qt({test:(e,t)=>e instanceof r?!0:pt(t,`Expected an instance of ${r.name} (got ${Zr(e)})`)}),xCe=(r,{exclusive:e=!1}={})=>Qt({test:(t,i)=>{var n,s,o;let a=[],l=typeof(i==null?void 0:i.errors)<"u"?[]:void 0;for(let c=0,u=r.length;c1?pt(i,`Expected to match exactly a single predicate (matched ${a.join(", ")})`):(o=i==null?void 0:i.errors)===null||o===void 0||o.push(...l),!1}}),PCe=(r,e)=>Qt({test:(t,i)=>{var n,s;let o={value:t},a=typeof(i==null?void 0:i.coercions)<"u"?Bc(o,"value"):void 0,l=typeof(i==null?void 0:i.coercions)<"u"?[]:void 0;if(!r(t,Object.assign(Object.assign({},i),{coercion:a,coercions:l})))return!1;let c=[];if(typeof l<"u")for(let[,u]of l)c.push(u());try{if(typeof(i==null?void 0:i.coercions)<"u"){if(o.value!==t){if(typeof(i==null?void 0:i.coercion)>"u")return pt(i,"Unbound coercion result");i.coercions.push([(n=i.p)!==null&&n!==void 0?n:".",i.coercion.bind(null,o.value)])}(s=i==null?void 0:i.coercions)===null||s===void 0||s.push(...l)}return e.every(u=>u(o.value,i))}finally{for(let u of c)u()}}}),DCe=r=>Qt({test:(e,t)=>typeof e>"u"?!0:r(e,t)}),kCe=r=>Qt({test:(e,t)=>e===null?!0:r(e,t)}),RCe=r=>Qt({test:(e,t)=>e.length>=r?!0:pt(t,`Expected to have a length of at least ${r} elements (got ${e.length})`)}),FCe=r=>Qt({test:(e,t)=>e.length<=r?!0:pt(t,`Expected to have a length of at most ${r} elements (got ${e.length})`)}),AG=r=>Qt({test:(e,t)=>e.length!==r?pt(t,`Expected to have a length of exactly ${r} elements (got ${e.length})`):!0}),NCe=({map:r}={})=>Qt({test:(e,t)=>{let i=new Set,n=new Set;for(let s=0,o=e.length;sQt({test:(r,e)=>r<=0?!0:pt(e,`Expected to be negative (got ${r})`)}),LCe=()=>Qt({test:(r,e)=>r>=0?!0:pt(e,`Expected to be positive (got ${r})`)}),OCe=r=>Qt({test:(e,t)=>e>=r?!0:pt(t,`Expected to be at least ${r} (got ${e})`)}),MCe=r=>Qt({test:(e,t)=>e<=r?!0:pt(t,`Expected to be at most ${r} (got ${e})`)}),UCe=(r,e)=>Qt({test:(t,i)=>t>=r&&t<=e?!0:pt(i,`Expected to be in the [${r}; ${e}] range (got ${t})`)}),KCe=(r,e)=>Qt({test:(t,i)=>t>=r&&tQt({test:(e,t)=>e!==Math.round(e)?pt(t,`Expected to be an integer (got ${e})`):Number.isSafeInteger(e)?!0:pt(t,`Expected to be a safe integer (got ${e})`)}),GCe=r=>Qt({test:(e,t)=>r.test(e)?!0:pt(t,`Expected to match the pattern ${r.toString()} (got ${Zr(e)})`)}),YCe=()=>Qt({test:(r,e)=>r!==r.toLowerCase()?pt(e,`Expected to be all-lowercase (got ${r})`):!0}),jCe=()=>Qt({test:(r,e)=>r!==r.toUpperCase()?pt(e,`Expected to be all-uppercase (got ${r})`):!0}),qCe=()=>Qt({test:(r,e)=>nG.test(r)?!0:pt(e,`Expected to be a valid UUID v4 (got ${Zr(r)})`)}),JCe=()=>Qt({test:(r,e)=>Hv.test(r)?!1:pt(e,`Expected to be a valid ISO 8601 date string (got ${Zr(r)})`)}),WCe=({alpha:r=!1})=>Qt({test:(e,t)=>(r?tG.test(e):rG.test(e))?!0:pt(t,`Expected to be a valid hexadecimal color string (got ${Zr(e)})`)}),zCe=()=>Qt({test:(r,e)=>iG.test(r)?!0:pt(e,`Expected to be a valid base 64 string (got ${Zr(r)})`)}),VCe=(r=aG())=>Qt({test:(e,t)=>{let i;try{i=JSON.parse(e)}catch{return pt(t,`Expected to be a valid JSON string (got ${Zr(e)})`)}return r(i,t)}}),XCe=r=>{let e=new Set(r);return Qt({test:(t,i)=>{let n=new Set(Object.keys(t)),s=[];for(let o of e)n.has(o)||s.push(o);return s.length>0?pt(i,`Missing required ${ny(s.length,"property","properties")} ${s.map(o=>`"${o}"`).join(", ")}`):!0}})},_Ce=r=>{let e=new Set(r);return Qt({test:(t,i)=>{let n=new Set(Object.keys(t)),s=[];for(let o of e)n.has(o)&&s.push(o);return s.length>0?pt(i,`Forbidden ${ny(s.length,"property","properties")} ${s.map(o=>`"${o}"`).join(", ")}`):!0}})},ZCe=r=>{let e=new Set(r);return Qt({test:(t,i)=>{let n=new Set(Object.keys(t)),s=[];for(let o of e)n.has(o)&&s.push(o);return s.length>1?pt(i,`Mutually exclusive properties ${s.map(o=>`"${o}"`).join(", ")}`):!0}})};(function(r){r.Forbids="Forbids",r.Requires="Requires"})(st.KeyRelationship||(st.KeyRelationship={}));var $Ce={[st.KeyRelationship.Forbids]:{expect:!1,message:"forbids using"},[st.KeyRelationship.Requires]:{expect:!0,message:"requires using"}},eme=(r,e,t,{ignore:i=[]}={})=>{let n=new Set(i),s=new Set(t),o=$Ce[e];return Qt({test:(a,l)=>{let c=new Set(Object.keys(a));if(!c.has(r)||n.has(a[r]))return!0;let u=[];for(let g of s)(c.has(g)&&!n.has(a[g]))!==o.expect&&u.push(g);return u.length>=1?pt(l,`Property "${r}" ${o.message} ${ny(u.length,"property","properties")} ${u.map(g=>`"${g}"`).join(", ")}`):!0}})};st.applyCascade=PCe;st.base64RegExp=iG;st.colorStringAlphaRegExp=rG;st.colorStringRegExp=tG;st.computeKey=LA;st.getPrintable=Zr;st.hasExactLength=AG;st.hasForbiddenKeys=_Ce;st.hasKeyRelationship=eme;st.hasMaxLength=FCe;st.hasMinLength=RCe;st.hasMutuallyExclusiveKeys=ZCe;st.hasRequiredKeys=XCe;st.hasUniqueItems=NCe;st.isArray=BCe;st.isAtLeast=OCe;st.isAtMost=MCe;st.isBase64=zCe;st.isBoolean=ICe;st.isDate=wCe;st.isDict=QCe;st.isEnum=mCe;st.isHexColor=WCe;st.isISO8601=JCe;st.isInExclusiveRange=KCe;st.isInInclusiveRange=UCe;st.isInstanceOf=vCe;st.isInteger=HCe;st.isJSON=VCe;st.isLiteral=dCe;st.isLowerCase=YCe;st.isNegative=TCe;st.isNullable=kCe;st.isNumber=yCe;st.isObject=SCe;st.isOneOf=xCe;st.isOptional=DCe;st.isPositive=LCe;st.isString=CCe;st.isTuple=bCe;st.isUUID4=qCe;st.isUnknown=aG;st.isUpperCase=jCe;st.iso8601RegExp=Hv;st.makeCoercionFn=Bc;st.makeSetter=oG;st.makeTrait=sG;st.makeValidator=Qt;st.matchesRegExp=GCe;st.plural=ny;st.pushError=pt;st.simpleKeyRegExp=eG;st.uuid4RegExp=nG});var bc=y(Gv=>{"use strict";Object.defineProperty(Gv,"__esModule",{value:!0});var lG=va();function tme(r){if(r&&r.__esModule)return r;var e=Object.create(null);return r&&Object.keys(r).forEach(function(t){if(t!=="default"){var i=Object.getOwnPropertyDescriptor(r,t);Object.defineProperty(e,t,i.get?i:{enumerable:!0,get:function(){return r[t]}})}}),e.default=r,Object.freeze(e)}var Sd=class{constructor(){this.help=!1}static Usage(e){return e}async catch(e){throw e}async validateAndExecute(){let t=this.constructor.schema;if(Array.isArray(t)){let{isDict:n,isUnknown:s,applyCascade:o}=await Promise.resolve().then(function(){return tme(ns())}),a=o(n(s()),t),l=[],c=[];if(!a(this,{errors:l,coercions:c}))throw lG.formatError("Invalid option schema",l);for(let[,g]of c)g()}else if(t!=null)throw new Error("Invalid command schema");let i=await this.execute();return typeof i<"u"?i:0}};Sd.isOption=lG.isOptionSymbol;Sd.Default=[];Gv.Command=Sd});var jv=y(vd=>{"use strict";Object.defineProperty(vd,"__esModule",{value:!0});var cG=80,Yv=Array(cG).fill("\u2501");for(let r=0;r<=24;++r)Yv[Yv.length-r]=`\x1B[38;5;${232+r}m\u2501`;var rme={header:r=>`\x1B[1m\u2501\u2501\u2501 ${r}${r.length`\x1B[1m${r}\x1B[22m`,error:r=>`\x1B[31m\x1B[1m${r}\x1B[22m\x1B[39m`,code:r=>`\x1B[36m${r}\x1B[39m`},ime={header:r=>r,bold:r=>r,error:r=>r,code:r=>r};function nme(r){let e=r.split(` -`),t=e.filter(n=>n.match(/\S/)),i=t.length>0?t.reduce((n,s)=>Math.min(n,s.length-s.trimStart().length),Number.MAX_VALUE):0;return e.map(n=>n.slice(i).trimRight()).join(` -`)}function sme(r,{format:e,paragraphs:t}){return r=r.replace(/\r\n?/g,` -`),r=nme(r),r=r.replace(/^\n+|\n+$/g,""),r=r.replace(/^(\s*)-([^\n]*?)\n+/gm,`$1-$2 - -`),r=r.replace(/\n(\n)?\n*/g,"$1"),t&&(r=r.split(/\n/).map(i=>{let n=i.match(/^\s*[*-][\t ]+(.*)/);if(!n)return i.match(/(.{1,80})(?: |$)/g).join(` -`);let s=i.length-i.trimStart().length;return n[1].match(new RegExp(`(.{1,${78-s}})(?: |$)`,"g")).map((o,a)=>" ".repeat(s)+(a===0?"- ":" ")+o).join(` -`)}).join(` - -`)),r=r.replace(/(`+)((?:.|[\n])*?)\1/g,(i,n,s)=>e.code(n+s+n)),r=r.replace(/(\*\*)((?:.|[\n])*?)\1/g,(i,n,s)=>e.bold(n+s+n)),r?`${r} -`:""}vd.formatMarkdownish=sme;vd.richFormat=rme;vd.textFormat=ime});var ly=y(Ar=>{"use strict";Object.defineProperty(Ar,"__esModule",{value:!0});var lt=ry(),ay=iy();function Vi(r){lt.DEBUG&&console.log(r)}var uG={candidateUsage:null,requiredOptions:[],errorMessage:null,ignoreOptions:!1,path:[],positionals:[],options:[],remainder:null,selectedIndex:lt.HELP_COMMAND_INDEX};function qv(){return{nodes:[Li(),Li(),Li()]}}function gG(r){let e=qv(),t=[],i=e.nodes.length;for(let n of r){t.push(i);for(let s=0;s{if(e.has(i))return;e.add(i);let n=r.nodes[i];for(let o of Object.values(n.statics))for(let{to:a}of o)t(a);for(let[,{to:o}]of n.dynamics)t(o);for(let{to:o}of n.shortcuts)t(o);let s=new Set(n.shortcuts.map(({to:o})=>o));for(;n.shortcuts.length>0;){let{to:o}=n.shortcuts.shift(),a=r.nodes[o];for(let[l,c]of Object.entries(a.statics)){let u=Object.prototype.hasOwnProperty.call(n.statics,l)?n.statics[l]:n.statics[l]=[];for(let g of c)u.some(({to:f})=>g.to===f)||u.push(g)}for(let[l,c]of a.dynamics)n.dynamics.some(([u,{to:g}])=>l===u&&c.to===g)||n.dynamics.push([l,c]);for(let l of a.shortcuts)s.has(l.to)||(n.shortcuts.push(l),s.add(l.to))}};t(lt.NODE_INITIAL)}function hG(r,{prefix:e=""}={}){if(lt.DEBUG){Vi(`${e}Nodes are:`);for(let t=0;tl!==lt.NODE_ERRORED).map(({state:l})=>({usage:l.candidateUsage,reason:null})));if(a.every(({node:l})=>l===lt.NODE_ERRORED))throw new ay.UnknownSyntaxError(e,a.map(({state:l})=>({usage:l.candidateUsage,reason:l.errorMessage})));i=pG(a)}if(i.length>0){Vi(" Results:");for(let s of i)Vi(` - ${s.node} -> ${JSON.stringify(s.state)}`)}else Vi(" No results");return i}function ome(r,e){if(e.selectedIndex!==null)return!0;if(Object.prototype.hasOwnProperty.call(r.statics,lt.END_OF_INPUT)){for(let{to:t}of r.statics[lt.END_OF_INPUT])if(t===lt.NODE_SUCCESS)return!0}return!1}function ame(r,e,t){let i=t&&e.length>0?[""]:[],n=Jv(r,e,t),s=[],o=new Set,a=(l,c,u=!0)=>{let g=[c];for(;g.length>0;){let h=g;g=[];for(let p of h){let C=r.nodes[p],w=Object.keys(C.statics);for(let B of Object.keys(C.statics)){let v=w[0];for(let{to:D,reducer:T}of C.statics[v])T==="pushPath"&&(u||l.push(v),g.push(D))}}u=!1}let f=JSON.stringify(l);o.has(f)||(s.push(l),o.add(f))};for(let{node:l,state:c}of n){if(c.remainder!==null){a([c.remainder],l);continue}let u=r.nodes[l],g=ome(u,c);for(let[f,h]of Object.entries(u.statics))(g&&f!==lt.END_OF_INPUT||!f.startsWith("-")&&h.some(({reducer:p})=>p==="pushPath"))&&a([...i,f],l);if(!!g)for(let[f,{to:h}]of u.dynamics){if(h===lt.NODE_ERRORED)continue;let p=IG(f,c);if(p!==null)for(let C of p)a([...i,C],l)}}return[...s].sort()}function Ame(r,e){let t=Jv(r,[...e,lt.END_OF_INPUT]);return dG(e,t.map(({state:i})=>i))}function pG(r){let e=0;for(let{state:t}of r)t.path.length>e&&(e=t.path.length);return r.filter(({state:t})=>t.path.length===e)}function dG(r,e){let t=e.filter(g=>g.selectedIndex!==null);if(t.length===0)throw new Error;let i=t.filter(g=>g.requiredOptions.every(f=>f.some(h=>g.options.find(p=>p.name===h))));if(i.length===0)throw new ay.UnknownSyntaxError(r,t.map(g=>({usage:g.candidateUsage,reason:null})));let n=0;for(let g of i)g.path.length>n&&(n=g.path.length);let s=i.filter(g=>g.path.length===n),o=g=>g.positionals.filter(({extra:f})=>!f).length+g.options.length,a=s.map(g=>({state:g,positionalCount:o(g)})),l=0;for(let{positionalCount:g}of a)g>l&&(l=g);let c=a.filter(({positionalCount:g})=>g===l).map(({state:g})=>g),u=CG(c);if(u.length>1)throw new ay.AmbiguousSyntaxError(r,u.map(g=>g.candidateUsage));return u[0]}function CG(r){let e=[],t=[];for(let i of r)i.selectedIndex===lt.HELP_COMMAND_INDEX?t.push(i):e.push(i);return t.length>0&&e.push({...uG,path:mG(...t.map(i=>i.path)),options:t.reduce((i,n)=>i.concat(n.options),[])}),e}function mG(r,e,...t){return e===void 0?Array.from(r):mG(r.filter((i,n)=>i===e[n]),...t)}function Li(){return{dynamics:[],shortcuts:[],statics:{}}}function Wv(r){return r===lt.NODE_SUCCESS||r===lt.NODE_ERRORED}function sy(r,e=0){return{to:Wv(r.to)?r.to:r.to>2?r.to+e-2:r.to+e,reducer:r.reducer}}function EG(r,e=0){let t=Li();for(let[i,n]of r.dynamics)t.dynamics.push([i,sy(n,e)]);for(let i of r.shortcuts)t.shortcuts.push(sy(i,e));for(let[i,n]of Object.entries(r.statics))t.statics[i]=n.map(s=>sy(s,e));return t}function Ei(r,e,t,i,n){r.nodes[e].dynamics.push([t,{to:i,reducer:n}])}function Qc(r,e,t,i){r.nodes[e].shortcuts.push({to:t,reducer:i})}function xo(r,e,t,i,n){(Object.prototype.hasOwnProperty.call(r.nodes[e].statics,t)?r.nodes[e].statics[t]:r.nodes[e].statics[t]=[]).push({to:i,reducer:n})}function xd(r,e,t,i){if(Array.isArray(e)){let[n,...s]=e;return r[n](t,i,...s)}else return r[e](t,i)}function IG(r,e){let t=Array.isArray(r)?Pd[r[0]]:Pd[r];if(typeof t.suggest>"u")return null;let i=Array.isArray(r)?r.slice(1):[];return t.suggest(e,...i)}var Pd={always:()=>!0,isOptionLike:(r,e)=>!r.ignoreOptions&&e!=="-"&&e.startsWith("-"),isNotOptionLike:(r,e)=>r.ignoreOptions||e==="-"||!e.startsWith("-"),isOption:(r,e,t,i)=>!r.ignoreOptions&&e===t,isBatchOption:(r,e,t)=>!r.ignoreOptions&<.BATCH_REGEX.test(e)&&[...e.slice(1)].every(i=>t.includes(`-${i}`)),isBoundOption:(r,e,t,i)=>{let n=e.match(lt.BINDING_REGEX);return!r.ignoreOptions&&!!n&<.OPTION_REGEX.test(n[1])&&t.includes(n[1])&&i.filter(s=>s.names.includes(n[1])).every(s=>s.allowBinding)},isNegatedOption:(r,e,t)=>!r.ignoreOptions&&e===`--no-${t.slice(2)}`,isHelp:(r,e)=>!r.ignoreOptions&<.HELP_REGEX.test(e),isUnsupportedOption:(r,e,t)=>!r.ignoreOptions&&e.startsWith("-")&<.OPTION_REGEX.test(e)&&!t.includes(e),isInvalidOption:(r,e)=>!r.ignoreOptions&&e.startsWith("-")&&!lt.OPTION_REGEX.test(e)};Pd.isOption.suggest=(r,e,t=!0)=>t?null:[e];var oy={setCandidateState:(r,e,t)=>({...r,...t}),setSelectedIndex:(r,e,t)=>({...r,selectedIndex:t}),pushBatch:(r,e)=>({...r,options:r.options.concat([...e.slice(1)].map(t=>({name:`-${t}`,value:!0})))}),pushBound:(r,e)=>{let[,t,i]=e.match(lt.BINDING_REGEX);return{...r,options:r.options.concat({name:t,value:i})}},pushPath:(r,e)=>({...r,path:r.path.concat(e)}),pushPositional:(r,e)=>({...r,positionals:r.positionals.concat({value:e,extra:!1})}),pushExtra:(r,e)=>({...r,positionals:r.positionals.concat({value:e,extra:!0})}),pushExtraNoLimits:(r,e)=>({...r,positionals:r.positionals.concat({value:e,extra:Po})}),pushTrue:(r,e,t=e)=>({...r,options:r.options.concat({name:e,value:!0})}),pushFalse:(r,e,t=e)=>({...r,options:r.options.concat({name:t,value:!1})}),pushUndefined:(r,e)=>({...r,options:r.options.concat({name:e,value:void 0})}),pushStringValue:(r,e)=>{var t;let i={...r,options:[...r.options]},n=r.options[r.options.length-1];return n.value=((t=n.value)!==null&&t!==void 0?t:[]).concat([e]),i},setStringValue:(r,e)=>{let t={...r,options:[...r.options]},i=r.options[r.options.length-1];return i.value=e,t},inhibateOptions:r=>({...r,ignoreOptions:!0}),useHelp:(r,e,t)=>{let[,,i]=e.match(lt.HELP_REGEX);return typeof i<"u"?{...r,options:[{name:"-c",value:String(t)},{name:"-i",value:i}]}:{...r,options:[{name:"-c",value:String(t)}]}},setError:(r,e,t)=>e===lt.END_OF_INPUT?{...r,errorMessage:`${t}.`}:{...r,errorMessage:`${t} ("${e}").`},setOptionArityError:(r,e)=>{let t=r.options[r.options.length-1];return{...r,errorMessage:`Not enough arguments to option ${t.name}.`}}},Po=Symbol(),Ay=class{constructor(e,t){this.allOptionNames=[],this.arity={leading:[],trailing:[],extra:[],proxy:!1},this.options=[],this.paths=[],this.cliIndex=e,this.cliOpts=t}addPath(e){this.paths.push(e)}setArity({leading:e=this.arity.leading,trailing:t=this.arity.trailing,extra:i=this.arity.extra,proxy:n=this.arity.proxy}){Object.assign(this.arity,{leading:e,trailing:t,extra:i,proxy:n})}addPositional({name:e="arg",required:t=!0}={}){if(!t&&this.arity.extra===Po)throw new Error("Optional parameters cannot be declared when using .rest() or .proxy()");if(!t&&this.arity.trailing.length>0)throw new Error("Optional parameters cannot be declared after the required trailing positional arguments");!t&&this.arity.extra!==Po?this.arity.extra.push(e):this.arity.extra!==Po&&this.arity.extra.length===0?this.arity.leading.push(e):this.arity.trailing.push(e)}addRest({name:e="arg",required:t=0}={}){if(this.arity.extra===Po)throw new Error("Infinite lists cannot be declared multiple times in the same command");if(this.arity.trailing.length>0)throw new Error("Infinite lists cannot be declared after the required trailing positional arguments");for(let i=0;i1)throw new Error("The arity cannot be higher than 1 when the option only supports the --arg=value syntax");if(!Number.isInteger(i))throw new Error(`The arity must be an integer, got ${i}`);if(i<0)throw new Error(`The arity must be positive, got ${i}`);this.allOptionNames.push(...e),this.options.push({names:e,description:t,arity:i,hidden:n,required:s,allowBinding:o})}setContext(e){this.context=e}usage({detailed:e=!0,inlineOptions:t=!0}={}){let i=[this.cliOpts.binaryName],n=[];if(this.paths.length>0&&i.push(...this.paths[0]),e){for(let{names:o,arity:a,hidden:l,description:c,required:u}of this.options){if(l)continue;let g=[];for(let h=0;h`:`[${f}]`)}i.push(...this.arity.leading.map(o=>`<${o}>`)),this.arity.extra===Po?i.push("..."):i.push(...this.arity.extra.map(o=>`[${o}]`)),i.push(...this.arity.trailing.map(o=>`<${o}>`))}return{usage:i.join(" "),options:n}}compile(){if(typeof this.context>"u")throw new Error("Assertion failed: No context attached");let e=qv(),t=lt.NODE_INITIAL,i=this.usage().usage,n=this.options.filter(a=>a.required).map(a=>a.names);t=ss(e,Li()),xo(e,lt.NODE_INITIAL,lt.START_OF_INPUT,t,["setCandidateState",{candidateUsage:i,requiredOptions:n}]);let s=this.arity.proxy?"always":"isNotOptionLike",o=this.paths.length>0?this.paths:[[]];for(let a of o){let l=t;if(a.length>0){let f=ss(e,Li());Qc(e,l,f),this.registerOptions(e,f),l=f}for(let f=0;f0||!this.arity.proxy){let f=ss(e,Li());Ei(e,l,"isHelp",f,["useHelp",this.cliIndex]),xo(e,f,lt.END_OF_INPUT,lt.NODE_SUCCESS,["setSelectedIndex",lt.HELP_COMMAND_INDEX]),this.registerOptions(e,l)}this.arity.leading.length>0&&xo(e,l,lt.END_OF_INPUT,lt.NODE_ERRORED,["setError","Not enough positional arguments"]);let c=l;for(let f=0;f0||f+1!==this.arity.leading.length)&&xo(e,h,lt.END_OF_INPUT,lt.NODE_ERRORED,["setError","Not enough positional arguments"]),Ei(e,c,"isNotOptionLike",h,"pushPositional"),c=h}let u=c;if(this.arity.extra===Po||this.arity.extra.length>0){let f=ss(e,Li());if(Qc(e,c,f),this.arity.extra===Po){let h=ss(e,Li());this.arity.proxy||this.registerOptions(e,h),Ei(e,c,s,h,"pushExtraNoLimits"),Ei(e,h,s,h,"pushExtraNoLimits"),Qc(e,h,f)}else for(let h=0;h0&&xo(e,u,lt.END_OF_INPUT,lt.NODE_ERRORED,["setError","Not enough positional arguments"]);let g=u;for(let f=0;fo.length>s.length?o:s,"");if(i.arity===0)for(let s of i.names)Ei(e,t,["isOption",s,i.hidden||s!==n],t,"pushTrue"),s.startsWith("--")&&!s.startsWith("--no-")&&Ei(e,t,["isNegatedOption",s],t,["pushFalse",s]);else{let s=ss(e,Li());for(let o of i.names)Ei(e,t,["isOption",o,i.hidden||o!==n],s,"pushUndefined");for(let o=0;o=0&&eAme(i,n),suggest:(n,s)=>ame(i,n,s)}}};Ar.CliBuilder=Dd;Ar.CommandBuilder=Ay;Ar.NoLimits=Po;Ar.aggregateHelpStates=CG;Ar.cloneNode=EG;Ar.cloneTransition=sy;Ar.debug=Vi;Ar.debugMachine=hG;Ar.execute=xd;Ar.injectNode=ss;Ar.isTerminalNode=Wv;Ar.makeAnyOfMachine=gG;Ar.makeNode=Li;Ar.makeStateMachine=qv;Ar.reducers=oy;Ar.registerDynamic=Ei;Ar.registerShortcut=Qc;Ar.registerStatic=xo;Ar.runMachineInternal=Jv;Ar.selectBestState=dG;Ar.simplifyMachine=fG;Ar.suggest=IG;Ar.tests=Pd;Ar.trimSmallerBranches=pG});var yG=y(zv=>{"use strict";Object.defineProperty(zv,"__esModule",{value:!0});var lme=bc(),kd=class extends lme.Command{constructor(e){super(),this.contexts=e,this.commands=[]}static from(e,t){let i=new kd(t);i.path=e.path;for(let n of e.options)switch(n.name){case"-c":i.commands.push(Number(n.value));break;case"-i":i.index=Number(n.value);break}return i}async execute(){let e=this.commands;if(typeof this.index<"u"&&this.index>=0&&this.index1){this.context.stdout.write(`Multiple commands match your selection: -`),this.context.stdout.write(` -`);let t=0;for(let i of this.commands)this.context.stdout.write(this.cli.usage(this.contexts[i].commandClass,{prefix:`${t++}. `.padStart(5)}));this.context.stdout.write(` -`),this.context.stdout.write(`Run again with -h= to see the longer details of any of those commands. -`)}}};zv.HelpCommand=kd});var vG=y(Vv=>{"use strict";Object.defineProperty(Vv,"__esModule",{value:!0});var cme=ry(),wG=bc(),ume=J("tty"),gme=ly(),hn=jv(),fme=yG();function hme(r){return r&&typeof r=="object"&&"default"in r?r:{default:r}}var BG=hme(ume),bG=Symbol("clipanion/errorCommand");function pme(){return process.env.FORCE_COLOR==="0"?1:process.env.FORCE_COLOR==="1"||typeof process.stdout<"u"&&process.stdout.isTTY?8:1}var OA=class{constructor({binaryLabel:e,binaryName:t="...",binaryVersion:i,enableCapture:n=!1,enableColors:s}={}){this.registrations=new Map,this.builder=new gme.CliBuilder({binaryName:t}),this.binaryLabel=e,this.binaryName=t,this.binaryVersion=i,this.enableCapture=n,this.enableColors=s}static from(e,t={}){let i=new OA(t);for(let n of e)i.register(n);return i}register(e){var t;let i=new Map,n=new e;for(let l in n){let c=n[l];typeof c=="object"&&c!==null&&c[wG.Command.isOption]&&i.set(l,c)}let s=this.builder.command(),o=s.cliIndex,a=(t=e.paths)!==null&&t!==void 0?t:n.paths;if(typeof a<"u")for(let l of a)s.addPath(l);this.registrations.set(e,{specs:i,builder:s,index:o});for(let[l,{definition:c}]of i.entries())c(s,l);s.setContext({commandClass:e})}process(e){let{contexts:t,process:i}=this.builder.compile(),n=i(e);switch(n.selectedIndex){case cme.HELP_COMMAND_INDEX:return fme.HelpCommand.from(n,t);default:{let{commandClass:s}=t[n.selectedIndex],o=this.registrations.get(s);if(typeof o>"u")throw new Error("Assertion failed: Expected the command class to have been registered.");let a=new s;a.path=n.path;try{for(let[l,{transformer:c}]of o.specs.entries())a[l]=c(o.builder,l,n);return a}catch(l){throw l[bG]=a,l}}break}}async run(e,t){var i;let n,s={...OA.defaultContext,...t},o=(i=this.enableColors)!==null&&i!==void 0?i:s.colorDepth>1;if(!Array.isArray(e))n=e;else try{n=this.process(e)}catch(c){return s.stdout.write(this.error(c,{colored:o})),1}if(n.help)return s.stdout.write(this.usage(n,{colored:o,detailed:!0})),0;n.context=s,n.cli={binaryLabel:this.binaryLabel,binaryName:this.binaryName,binaryVersion:this.binaryVersion,enableCapture:this.enableCapture,enableColors:this.enableColors,definitions:()=>this.definitions(),error:(c,u)=>this.error(c,u),format:c=>this.format(c),process:c=>this.process(c),run:(c,u)=>this.run(c,{...s,...u}),usage:(c,u)=>this.usage(c,u)};let a=this.enableCapture?dme(s):SG,l;try{l=await a(()=>n.validateAndExecute().catch(c=>n.catch(c).then(()=>0)))}catch(c){return s.stdout.write(this.error(c,{colored:o,command:n})),1}return l}async runExit(e,t){process.exitCode=await this.run(e,t)}suggest(e,t){let{suggest:i}=this.builder.compile();return i(e,t)}definitions({colored:e=!1}={}){let t=[];for(let[i,{index:n}]of this.registrations){if(typeof i.usage>"u")continue;let{usage:s}=this.getUsageByIndex(n,{detailed:!1}),{usage:o,options:a}=this.getUsageByIndex(n,{detailed:!0,inlineOptions:!1}),l=typeof i.usage.category<"u"?hn.formatMarkdownish(i.usage.category,{format:this.format(e),paragraphs:!1}):void 0,c=typeof i.usage.description<"u"?hn.formatMarkdownish(i.usage.description,{format:this.format(e),paragraphs:!1}):void 0,u=typeof i.usage.details<"u"?hn.formatMarkdownish(i.usage.details,{format:this.format(e),paragraphs:!0}):void 0,g=typeof i.usage.examples<"u"?i.usage.examples.map(([f,h])=>[hn.formatMarkdownish(f,{format:this.format(e),paragraphs:!1}),h.replace(/\$0/g,this.binaryName)]):void 0;t.push({path:s,usage:o,category:l,description:c,details:u,examples:g,options:a})}return t}usage(e=null,{colored:t,detailed:i=!1,prefix:n="$ "}={}){var s;if(e===null){for(let l of this.registrations.keys()){let c=l.paths,u=typeof l.usage<"u";if(!c||c.length===0||c.length===1&&c[0].length===0||((s=c==null?void 0:c.some(h=>h.length===0))!==null&&s!==void 0?s:!1))if(e){e=null;break}else e=l;else if(u){e=null;continue}}e&&(i=!0)}let o=e!==null&&e instanceof wG.Command?e.constructor:e,a="";if(o)if(i){let{description:l="",details:c="",examples:u=[]}=o.usage||{};l!==""&&(a+=hn.formatMarkdownish(l,{format:this.format(t),paragraphs:!1}).replace(/^./,h=>h.toUpperCase()),a+=` -`),(c!==""||u.length>0)&&(a+=`${this.format(t).header("Usage")} -`,a+=` -`);let{usage:g,options:f}=this.getUsageByRegistration(o,{inlineOptions:!1});if(a+=`${this.format(t).bold(n)}${g} -`,f.length>0){a+=` -`,a+=`${hn.richFormat.header("Options")} -`;let h=f.reduce((p,C)=>Math.max(p,C.definition.length),0);a+=` -`;for(let{definition:p,description:C}of f)a+=` ${this.format(t).bold(p.padEnd(h))} ${hn.formatMarkdownish(C,{format:this.format(t),paragraphs:!1})}`}if(c!==""&&(a+=` -`,a+=`${this.format(t).header("Details")} -`,a+=` -`,a+=hn.formatMarkdownish(c,{format:this.format(t),paragraphs:!0})),u.length>0){a+=` -`,a+=`${this.format(t).header("Examples")} -`;for(let[h,p]of u)a+=` -`,a+=hn.formatMarkdownish(h,{format:this.format(t),paragraphs:!1}),a+=`${p.replace(/^/m,` ${this.format(t).bold(n)}`).replace(/\$0/g,this.binaryName)} -`}}else{let{usage:l}=this.getUsageByRegistration(o);a+=`${this.format(t).bold(n)}${l} -`}else{let l=new Map;for(let[f,{index:h}]of this.registrations.entries()){if(typeof f.usage>"u")continue;let p=typeof f.usage.category<"u"?hn.formatMarkdownish(f.usage.category,{format:this.format(t),paragraphs:!1}):null,C=l.get(p);typeof C>"u"&&l.set(p,C=[]);let{usage:w}=this.getUsageByIndex(h);C.push({commandClass:f,usage:w})}let c=Array.from(l.keys()).sort((f,h)=>f===null?-1:h===null?1:f.localeCompare(h,"en",{usage:"sort",caseFirst:"upper"})),u=typeof this.binaryLabel<"u",g=typeof this.binaryVersion<"u";u||g?(u&&g?a+=`${this.format(t).header(`${this.binaryLabel} - ${this.binaryVersion}`)} - -`:u?a+=`${this.format(t).header(`${this.binaryLabel}`)} -`:a+=`${this.format(t).header(`${this.binaryVersion}`)} -`,a+=` ${this.format(t).bold(n)}${this.binaryName} -`):a+=`${this.format(t).bold(n)}${this.binaryName} -`;for(let f of c){let h=l.get(f).slice().sort((C,w)=>C.usage.localeCompare(w.usage,"en",{usage:"sort",caseFirst:"upper"})),p=f!==null?f.trim():"General commands";a+=` -`,a+=`${this.format(t).header(`${p}`)} -`;for(let{commandClass:C,usage:w}of h){let B=C.usage.description||"undocumented";a+=` -`,a+=` ${this.format(t).bold(w)} -`,a+=` ${hn.formatMarkdownish(B,{format:this.format(t),paragraphs:!1})}`}}a+=` -`,a+=hn.formatMarkdownish("You can also print more details about any of these commands by calling them with the `-h,--help` flag right after the command name.",{format:this.format(t),paragraphs:!0})}return a}error(e,t){var i,{colored:n,command:s=(i=e[bG])!==null&&i!==void 0?i:null}=t===void 0?{}:t;e instanceof Error||(e=new Error(`Execution failed with a non-error rejection (rejected value: ${JSON.stringify(e)})`));let o="",a=e.name.replace(/([a-z])([A-Z])/g,"$1 $2");a==="Error"&&(a="Internal Error"),o+=`${this.format(n).error(a)}: ${e.message} -`;let l=e.clipanion;return typeof l<"u"?l.type==="usage"&&(o+=` -`,o+=this.usage(s)):e.stack&&(o+=`${e.stack.replace(/^.*\n/,"")} -`),o}format(e){var t;return((t=e!=null?e:this.enableColors)!==null&&t!==void 0?t:OA.defaultContext.colorDepth>1)?hn.richFormat:hn.textFormat}getUsageByRegistration(e,t){let i=this.registrations.get(e);if(typeof i>"u")throw new Error("Assertion failed: Unregistered command");return this.getUsageByIndex(i.index,t)}getUsageByIndex(e,t){return this.builder.getBuilderByIndex(e).usage(t)}};OA.defaultContext={stdin:process.stdin,stdout:process.stdout,stderr:process.stderr,colorDepth:"getColorDepth"in BG.default.WriteStream.prototype?BG.default.WriteStream.prototype.getColorDepth():pme()};var QG;function dme(r){let e=QG;if(typeof e>"u"){if(r.stdout===process.stdout&&r.stderr===process.stderr)return SG;let{AsyncLocalStorage:t}=J("async_hooks");e=QG=new t;let i=process.stdout._write;process.stdout._write=function(s,o,a){let l=e.getStore();return typeof l>"u"?i.call(this,s,o,a):l.stdout.write(s,o,a)};let n=process.stderr._write;process.stderr._write=function(s,o,a){let l=e.getStore();return typeof l>"u"?n.call(this,s,o,a):l.stderr.write(s,o,a)}}return t=>e.run(r,t)}function SG(r){return r()}Vv.Cli=OA});var xG=y(Xv=>{"use strict";Object.defineProperty(Xv,"__esModule",{value:!0});var Cme=bc(),cy=class extends Cme.Command{async execute(){this.context.stdout.write(`${JSON.stringify(this.cli.definitions(),null,2)} -`)}};cy.paths=[["--clipanion=definitions"]];Xv.DefinitionsCommand=cy});var PG=y(_v=>{"use strict";Object.defineProperty(_v,"__esModule",{value:!0});var mme=bc(),uy=class extends mme.Command{async execute(){this.context.stdout.write(this.cli.usage())}};uy.paths=[["-h"],["--help"]];_v.HelpCommand=uy});var DG=y(Zv=>{"use strict";Object.defineProperty(Zv,"__esModule",{value:!0});var Eme=bc(),gy=class extends Eme.Command{async execute(){var e;this.context.stdout.write(`${(e=this.cli.binaryVersion)!==null&&e!==void 0?e:""} -`)}};gy.paths=[["-v"],["--version"]];Zv.VersionCommand=gy});var kG=y(Rd=>{"use strict";Object.defineProperty(Rd,"__esModule",{value:!0});var Ime=xG(),yme=PG(),wme=DG();Rd.DefinitionsCommand=Ime.DefinitionsCommand;Rd.HelpCommand=yme.HelpCommand;Rd.VersionCommand=wme.VersionCommand});var FG=y($v=>{"use strict";Object.defineProperty($v,"__esModule",{value:!0});var RG=va();function Bme(r,e,t){let[i,n]=RG.rerouteArguments(e,t!=null?t:{}),{arity:s=1}=n,o=r.split(","),a=new Set(o);return RG.makeCommandOption({definition(l){l.addOption({names:o,arity:s,hidden:n==null?void 0:n.hidden,description:n==null?void 0:n.description,required:n.required})},transformer(l,c,u){let g=typeof i<"u"?[...i]:void 0;for(let{name:f,value:h}of u.options)!a.has(f)||(g=g!=null?g:[],g.push(h));return g}})}$v.Array=Bme});var TG=y(ex=>{"use strict";Object.defineProperty(ex,"__esModule",{value:!0});var NG=va();function bme(r,e,t){let[i,n]=NG.rerouteArguments(e,t!=null?t:{}),s=r.split(","),o=new Set(s);return NG.makeCommandOption({definition(a){a.addOption({names:s,allowBinding:!1,arity:0,hidden:n.hidden,description:n.description,required:n.required})},transformer(a,l,c){let u=i;for(let{name:g,value:f}of c.options)!o.has(g)||(u=f);return u}})}ex.Boolean=bme});var OG=y(tx=>{"use strict";Object.defineProperty(tx,"__esModule",{value:!0});var LG=va();function Qme(r,e,t){let[i,n]=LG.rerouteArguments(e,t!=null?t:{}),s=r.split(","),o=new Set(s);return LG.makeCommandOption({definition(a){a.addOption({names:s,allowBinding:!1,arity:0,hidden:n.hidden,description:n.description,required:n.required})},transformer(a,l,c){let u=i;for(let{name:g,value:f}of c.options)!o.has(g)||(u!=null||(u=0),f?u+=1:u=0);return u}})}tx.Counter=Qme});var MG=y(rx=>{"use strict";Object.defineProperty(rx,"__esModule",{value:!0});var Sme=va();function vme(r={}){return Sme.makeCommandOption({definition(e,t){var i;e.addProxy({name:(i=r.name)!==null&&i!==void 0?i:t,required:r.required})},transformer(e,t,i){return i.positionals.map(({value:n})=>n)}})}rx.Proxy=vme});var UG=y(ix=>{"use strict";Object.defineProperty(ix,"__esModule",{value:!0});var xme=va(),Pme=ly();function Dme(r={}){return xme.makeCommandOption({definition(e,t){var i;e.addRest({name:(i=r.name)!==null&&i!==void 0?i:t,required:r.required})},transformer(e,t,i){let n=o=>{let a=i.positionals[o];return a.extra===Pme.NoLimits||a.extra===!1&&oo)}})}ix.Rest=Dme});var KG=y(nx=>{"use strict";Object.defineProperty(nx,"__esModule",{value:!0});var Fd=va(),kme=ly();function Rme(r,e,t){let[i,n]=Fd.rerouteArguments(e,t!=null?t:{}),{arity:s=1}=n,o=r.split(","),a=new Set(o);return Fd.makeCommandOption({definition(l){l.addOption({names:o,arity:n.tolerateBoolean?0:s,hidden:n.hidden,description:n.description,required:n.required})},transformer(l,c,u){let g,f=i;for(let{name:h,value:p}of u.options)!a.has(h)||(g=h,f=p);return typeof f=="string"?Fd.applyValidator(g!=null?g:c,f,n.validator):f}})}function Fme(r={}){let{required:e=!0}=r;return Fd.makeCommandOption({definition(t,i){var n;t.addPositional({name:(n=r.name)!==null&&n!==void 0?n:i,required:r.required})},transformer(t,i,n){var s;for(let o=0;o{"use strict";Object.defineProperty(pn,"__esModule",{value:!0});var lf=va(),Tme=FG(),Lme=TG(),Ome=OG(),Mme=MG(),Ume=UG(),Kme=KG();pn.applyValidator=lf.applyValidator;pn.cleanValidationError=lf.cleanValidationError;pn.formatError=lf.formatError;pn.isOptionSymbol=lf.isOptionSymbol;pn.makeCommandOption=lf.makeCommandOption;pn.rerouteArguments=lf.rerouteArguments;pn.Array=Tme.Array;pn.Boolean=Lme.Boolean;pn.Counter=Ome.Counter;pn.Proxy=Mme.Proxy;pn.Rest=Ume.Rest;pn.String=Kme.String});var Xe=y(MA=>{"use strict";Object.defineProperty(MA,"__esModule",{value:!0});var Hme=iy(),Gme=bc(),Yme=jv(),jme=vG(),qme=kG(),Jme=HG();MA.UsageError=Hme.UsageError;MA.Command=Gme.Command;MA.formatMarkdownish=Yme.formatMarkdownish;MA.Cli=jme.Cli;MA.Builtins=qme;MA.Option=Jme});var YG=y((J$e,GG)=>{"use strict";GG.exports=(r,...e)=>new Promise(t=>{t(r(...e))})});var cf=y((W$e,sx)=>{"use strict";var Wme=YG(),jG=r=>{if(r<1)throw new TypeError("Expected `concurrency` to be a number from 1 and up");let e=[],t=0,i=()=>{t--,e.length>0&&e.shift()()},n=(a,l,...c)=>{t++;let u=Wme(a,...c);l(u),u.then(i,i)},s=(a,l,...c)=>{tnew Promise(c=>s(a,c,...l));return Object.defineProperties(o,{activeCount:{get:()=>t},pendingCount:{get:()=>e.length}}),o};sx.exports=jG;sx.exports.default=jG});var Nd=y((V$e,qG)=>{var zme="2.0.0",Vme=Number.MAX_SAFE_INTEGER||9007199254740991,Xme=16;qG.exports={SEMVER_SPEC_VERSION:zme,MAX_LENGTH:256,MAX_SAFE_INTEGER:Vme,MAX_SAFE_COMPONENT_LENGTH:Xme}});var Td=y((X$e,JG)=>{var _me=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...r)=>console.error("SEMVER",...r):()=>{};JG.exports=_me});var Sc=y((KA,WG)=>{var{MAX_SAFE_COMPONENT_LENGTH:ox}=Nd(),Zme=Td();KA=WG.exports={};var $me=KA.re=[],_e=KA.src=[],Ze=KA.t={},eEe=0,St=(r,e,t)=>{let i=eEe++;Zme(i,e),Ze[r]=i,_e[i]=e,$me[i]=new RegExp(e,t?"g":void 0)};St("NUMERICIDENTIFIER","0|[1-9]\\d*");St("NUMERICIDENTIFIERLOOSE","[0-9]+");St("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*");St("MAINVERSION",`(${_e[Ze.NUMERICIDENTIFIER]})\\.(${_e[Ze.NUMERICIDENTIFIER]})\\.(${_e[Ze.NUMERICIDENTIFIER]})`);St("MAINVERSIONLOOSE",`(${_e[Ze.NUMERICIDENTIFIERLOOSE]})\\.(${_e[Ze.NUMERICIDENTIFIERLOOSE]})\\.(${_e[Ze.NUMERICIDENTIFIERLOOSE]})`);St("PRERELEASEIDENTIFIER",`(?:${_e[Ze.NUMERICIDENTIFIER]}|${_e[Ze.NONNUMERICIDENTIFIER]})`);St("PRERELEASEIDENTIFIERLOOSE",`(?:${_e[Ze.NUMERICIDENTIFIERLOOSE]}|${_e[Ze.NONNUMERICIDENTIFIER]})`);St("PRERELEASE",`(?:-(${_e[Ze.PRERELEASEIDENTIFIER]}(?:\\.${_e[Ze.PRERELEASEIDENTIFIER]})*))`);St("PRERELEASELOOSE",`(?:-?(${_e[Ze.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${_e[Ze.PRERELEASEIDENTIFIERLOOSE]})*))`);St("BUILDIDENTIFIER","[0-9A-Za-z-]+");St("BUILD",`(?:\\+(${_e[Ze.BUILDIDENTIFIER]}(?:\\.${_e[Ze.BUILDIDENTIFIER]})*))`);St("FULLPLAIN",`v?${_e[Ze.MAINVERSION]}${_e[Ze.PRERELEASE]}?${_e[Ze.BUILD]}?`);St("FULL",`^${_e[Ze.FULLPLAIN]}$`);St("LOOSEPLAIN",`[v=\\s]*${_e[Ze.MAINVERSIONLOOSE]}${_e[Ze.PRERELEASELOOSE]}?${_e[Ze.BUILD]}?`);St("LOOSE",`^${_e[Ze.LOOSEPLAIN]}$`);St("GTLT","((?:<|>)?=?)");St("XRANGEIDENTIFIERLOOSE",`${_e[Ze.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);St("XRANGEIDENTIFIER",`${_e[Ze.NUMERICIDENTIFIER]}|x|X|\\*`);St("XRANGEPLAIN",`[v=\\s]*(${_e[Ze.XRANGEIDENTIFIER]})(?:\\.(${_e[Ze.XRANGEIDENTIFIER]})(?:\\.(${_e[Ze.XRANGEIDENTIFIER]})(?:${_e[Ze.PRERELEASE]})?${_e[Ze.BUILD]}?)?)?`);St("XRANGEPLAINLOOSE",`[v=\\s]*(${_e[Ze.XRANGEIDENTIFIERLOOSE]})(?:\\.(${_e[Ze.XRANGEIDENTIFIERLOOSE]})(?:\\.(${_e[Ze.XRANGEIDENTIFIERLOOSE]})(?:${_e[Ze.PRERELEASELOOSE]})?${_e[Ze.BUILD]}?)?)?`);St("XRANGE",`^${_e[Ze.GTLT]}\\s*${_e[Ze.XRANGEPLAIN]}$`);St("XRANGELOOSE",`^${_e[Ze.GTLT]}\\s*${_e[Ze.XRANGEPLAINLOOSE]}$`);St("COERCE",`(^|[^\\d])(\\d{1,${ox}})(?:\\.(\\d{1,${ox}}))?(?:\\.(\\d{1,${ox}}))?(?:$|[^\\d])`);St("COERCERTL",_e[Ze.COERCE],!0);St("LONETILDE","(?:~>?)");St("TILDETRIM",`(\\s*)${_e[Ze.LONETILDE]}\\s+`,!0);KA.tildeTrimReplace="$1~";St("TILDE",`^${_e[Ze.LONETILDE]}${_e[Ze.XRANGEPLAIN]}$`);St("TILDELOOSE",`^${_e[Ze.LONETILDE]}${_e[Ze.XRANGEPLAINLOOSE]}$`);St("LONECARET","(?:\\^)");St("CARETTRIM",`(\\s*)${_e[Ze.LONECARET]}\\s+`,!0);KA.caretTrimReplace="$1^";St("CARET",`^${_e[Ze.LONECARET]}${_e[Ze.XRANGEPLAIN]}$`);St("CARETLOOSE",`^${_e[Ze.LONECARET]}${_e[Ze.XRANGEPLAINLOOSE]}$`);St("COMPARATORLOOSE",`^${_e[Ze.GTLT]}\\s*(${_e[Ze.LOOSEPLAIN]})$|^$`);St("COMPARATOR",`^${_e[Ze.GTLT]}\\s*(${_e[Ze.FULLPLAIN]})$|^$`);St("COMPARATORTRIM",`(\\s*)${_e[Ze.GTLT]}\\s*(${_e[Ze.LOOSEPLAIN]}|${_e[Ze.XRANGEPLAIN]})`,!0);KA.comparatorTrimReplace="$1$2$3";St("HYPHENRANGE",`^\\s*(${_e[Ze.XRANGEPLAIN]})\\s+-\\s+(${_e[Ze.XRANGEPLAIN]})\\s*$`);St("HYPHENRANGELOOSE",`^\\s*(${_e[Ze.XRANGEPLAINLOOSE]})\\s+-\\s+(${_e[Ze.XRANGEPLAINLOOSE]})\\s*$`);St("STAR","(<|>)?=?\\s*\\*");St("GTE0","^\\s*>=\\s*0.0.0\\s*$");St("GTE0PRE","^\\s*>=\\s*0.0.0-0\\s*$")});var Ld=y((_$e,zG)=>{var tEe=["includePrerelease","loose","rtl"],rEe=r=>r?typeof r!="object"?{loose:!0}:tEe.filter(e=>r[e]).reduce((e,t)=>(e[t]=!0,e),{}):{};zG.exports=rEe});var hy=y((Z$e,_G)=>{var VG=/^[0-9]+$/,XG=(r,e)=>{let t=VG.test(r),i=VG.test(e);return t&&i&&(r=+r,e=+e),r===e?0:t&&!i?-1:i&&!t?1:rXG(e,r);_G.exports={compareIdentifiers:XG,rcompareIdentifiers:iEe}});var Oi=y(($$e,tY)=>{var py=Td(),{MAX_LENGTH:ZG,MAX_SAFE_INTEGER:dy}=Nd(),{re:$G,t:eY}=Sc(),nEe=Ld(),{compareIdentifiers:Od}=hy(),Kn=class{constructor(e,t){if(t=nEe(t),e instanceof Kn){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid Version: ${e}`);if(e.length>ZG)throw new TypeError(`version is longer than ${ZG} characters`);py("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;let i=e.trim().match(t.loose?$G[eY.LOOSE]:$G[eY.FULL]);if(!i)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+i[1],this.minor=+i[2],this.patch=+i[3],this.major>dy||this.major<0)throw new TypeError("Invalid major version");if(this.minor>dy||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>dy||this.patch<0)throw new TypeError("Invalid patch version");i[4]?this.prerelease=i[4].split(".").map(n=>{if(/^[0-9]+$/.test(n)){let s=+n;if(s>=0&&s=0;)typeof this.prerelease[i]=="number"&&(this.prerelease[i]++,i=-2);i===-1&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error(`invalid increment argument: ${e}`)}return this.format(),this.raw=this.version,this}};tY.exports=Kn});var vc=y((eet,sY)=>{var{MAX_LENGTH:sEe}=Nd(),{re:rY,t:iY}=Sc(),nY=Oi(),oEe=Ld(),aEe=(r,e)=>{if(e=oEe(e),r instanceof nY)return r;if(typeof r!="string"||r.length>sEe||!(e.loose?rY[iY.LOOSE]:rY[iY.FULL]).test(r))return null;try{return new nY(r,e)}catch{return null}};sY.exports=aEe});var aY=y((tet,oY)=>{var AEe=vc(),lEe=(r,e)=>{let t=AEe(r,e);return t?t.version:null};oY.exports=lEe});var lY=y((ret,AY)=>{var cEe=vc(),uEe=(r,e)=>{let t=cEe(r.trim().replace(/^[=v]+/,""),e);return t?t.version:null};AY.exports=uEe});var uY=y((iet,cY)=>{var gEe=Oi(),fEe=(r,e,t,i)=>{typeof t=="string"&&(i=t,t=void 0);try{return new gEe(r,t).inc(e,i).version}catch{return null}};cY.exports=fEe});var os=y((net,fY)=>{var gY=Oi(),hEe=(r,e,t)=>new gY(r,t).compare(new gY(e,t));fY.exports=hEe});var Cy=y((set,hY)=>{var pEe=os(),dEe=(r,e,t)=>pEe(r,e,t)===0;hY.exports=dEe});var CY=y((oet,dY)=>{var pY=vc(),CEe=Cy(),mEe=(r,e)=>{if(CEe(r,e))return null;{let t=pY(r),i=pY(e),n=t.prerelease.length||i.prerelease.length,s=n?"pre":"",o=n?"prerelease":"";for(let a in t)if((a==="major"||a==="minor"||a==="patch")&&t[a]!==i[a])return s+a;return o}};dY.exports=mEe});var EY=y((aet,mY)=>{var EEe=Oi(),IEe=(r,e)=>new EEe(r,e).major;mY.exports=IEe});var yY=y((Aet,IY)=>{var yEe=Oi(),wEe=(r,e)=>new yEe(r,e).minor;IY.exports=wEe});var BY=y((cet,wY)=>{var BEe=Oi(),bEe=(r,e)=>new BEe(r,e).patch;wY.exports=bEe});var QY=y((uet,bY)=>{var QEe=vc(),SEe=(r,e)=>{let t=QEe(r,e);return t&&t.prerelease.length?t.prerelease:null};bY.exports=SEe});var vY=y((get,SY)=>{var vEe=os(),xEe=(r,e,t)=>vEe(e,r,t);SY.exports=xEe});var PY=y((fet,xY)=>{var PEe=os(),DEe=(r,e)=>PEe(r,e,!0);xY.exports=DEe});var my=y((het,kY)=>{var DY=Oi(),kEe=(r,e,t)=>{let i=new DY(r,t),n=new DY(e,t);return i.compare(n)||i.compareBuild(n)};kY.exports=kEe});var FY=y((pet,RY)=>{var REe=my(),FEe=(r,e)=>r.sort((t,i)=>REe(t,i,e));RY.exports=FEe});var TY=y((det,NY)=>{var NEe=my(),TEe=(r,e)=>r.sort((t,i)=>NEe(i,t,e));NY.exports=TEe});var Md=y((Cet,LY)=>{var LEe=os(),OEe=(r,e,t)=>LEe(r,e,t)>0;LY.exports=OEe});var Ey=y((met,OY)=>{var MEe=os(),UEe=(r,e,t)=>MEe(r,e,t)<0;OY.exports=UEe});var ax=y((Eet,MY)=>{var KEe=os(),HEe=(r,e,t)=>KEe(r,e,t)!==0;MY.exports=HEe});var Iy=y((Iet,UY)=>{var GEe=os(),YEe=(r,e,t)=>GEe(r,e,t)>=0;UY.exports=YEe});var yy=y((yet,KY)=>{var jEe=os(),qEe=(r,e,t)=>jEe(r,e,t)<=0;KY.exports=qEe});var Ax=y((wet,HY)=>{var JEe=Cy(),WEe=ax(),zEe=Md(),VEe=Iy(),XEe=Ey(),_Ee=yy(),ZEe=(r,e,t,i)=>{switch(e){case"===":return typeof r=="object"&&(r=r.version),typeof t=="object"&&(t=t.version),r===t;case"!==":return typeof r=="object"&&(r=r.version),typeof t=="object"&&(t=t.version),r!==t;case"":case"=":case"==":return JEe(r,t,i);case"!=":return WEe(r,t,i);case">":return zEe(r,t,i);case">=":return VEe(r,t,i);case"<":return XEe(r,t,i);case"<=":return _Ee(r,t,i);default:throw new TypeError(`Invalid operator: ${e}`)}};HY.exports=ZEe});var YY=y((Bet,GY)=>{var $Ee=Oi(),eIe=vc(),{re:wy,t:By}=Sc(),tIe=(r,e)=>{if(r instanceof $Ee)return r;if(typeof r=="number"&&(r=String(r)),typeof r!="string")return null;e=e||{};let t=null;if(!e.rtl)t=r.match(wy[By.COERCE]);else{let i;for(;(i=wy[By.COERCERTL].exec(r))&&(!t||t.index+t[0].length!==r.length);)(!t||i.index+i[0].length!==t.index+t[0].length)&&(t=i),wy[By.COERCERTL].lastIndex=i.index+i[1].length+i[2].length;wy[By.COERCERTL].lastIndex=-1}return t===null?null:eIe(`${t[2]}.${t[3]||"0"}.${t[4]||"0"}`,e)};GY.exports=tIe});var qY=y((bet,jY)=>{"use strict";jY.exports=function(r){r.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}});var Ud=y((Qet,JY)=>{"use strict";JY.exports=Ht;Ht.Node=xc;Ht.create=Ht;function Ht(r){var e=this;if(e instanceof Ht||(e=new Ht),e.tail=null,e.head=null,e.length=0,r&&typeof r.forEach=="function")r.forEach(function(n){e.push(n)});else if(arguments.length>0)for(var t=0,i=arguments.length;t1)t=e;else if(this.head)i=this.head.next,t=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var n=0;i!==null;n++)t=r(t,i.value,n),i=i.next;return t};Ht.prototype.reduceReverse=function(r,e){var t,i=this.tail;if(arguments.length>1)t=e;else if(this.tail)i=this.tail.prev,t=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var n=this.length-1;i!==null;n--)t=r(t,i.value,n),i=i.prev;return t};Ht.prototype.toArray=function(){for(var r=new Array(this.length),e=0,t=this.head;t!==null;e++)r[e]=t.value,t=t.next;return r};Ht.prototype.toArrayReverse=function(){for(var r=new Array(this.length),e=0,t=this.tail;t!==null;e++)r[e]=t.value,t=t.prev;return r};Ht.prototype.slice=function(r,e){e=e||this.length,e<0&&(e+=this.length),r=r||0,r<0&&(r+=this.length);var t=new Ht;if(ethis.length&&(e=this.length);for(var i=0,n=this.head;n!==null&&ithis.length&&(e=this.length);for(var i=this.length,n=this.tail;n!==null&&i>e;i--)n=n.prev;for(;n!==null&&i>r;i--,n=n.prev)t.push(n.value);return t};Ht.prototype.splice=function(r,e,...t){r>this.length&&(r=this.length-1),r<0&&(r=this.length+r);for(var i=0,n=this.head;n!==null&&i{"use strict";var sIe=Ud(),Pc=Symbol("max"),Pa=Symbol("length"),uf=Symbol("lengthCalculator"),Hd=Symbol("allowStale"),Dc=Symbol("maxAge"),xa=Symbol("dispose"),WY=Symbol("noDisposeOnSet"),Ii=Symbol("lruList"),zs=Symbol("cache"),VY=Symbol("updateAgeOnGet"),lx=()=>1,ux=class{constructor(e){if(typeof e=="number"&&(e={max:e}),e||(e={}),e.max&&(typeof e.max!="number"||e.max<0))throw new TypeError("max must be a non-negative number");let t=this[Pc]=e.max||1/0,i=e.length||lx;if(this[uf]=typeof i!="function"?lx:i,this[Hd]=e.stale||!1,e.maxAge&&typeof e.maxAge!="number")throw new TypeError("maxAge must be a number");this[Dc]=e.maxAge||0,this[xa]=e.dispose,this[WY]=e.noDisposeOnSet||!1,this[VY]=e.updateAgeOnGet||!1,this.reset()}set max(e){if(typeof e!="number"||e<0)throw new TypeError("max must be a non-negative number");this[Pc]=e||1/0,Kd(this)}get max(){return this[Pc]}set allowStale(e){this[Hd]=!!e}get allowStale(){return this[Hd]}set maxAge(e){if(typeof e!="number")throw new TypeError("maxAge must be a non-negative number");this[Dc]=e,Kd(this)}get maxAge(){return this[Dc]}set lengthCalculator(e){typeof e!="function"&&(e=lx),e!==this[uf]&&(this[uf]=e,this[Pa]=0,this[Ii].forEach(t=>{t.length=this[uf](t.value,t.key),this[Pa]+=t.length})),Kd(this)}get lengthCalculator(){return this[uf]}get length(){return this[Pa]}get itemCount(){return this[Ii].length}rforEach(e,t){t=t||this;for(let i=this[Ii].tail;i!==null;){let n=i.prev;zY(this,e,i,t),i=n}}forEach(e,t){t=t||this;for(let i=this[Ii].head;i!==null;){let n=i.next;zY(this,e,i,t),i=n}}keys(){return this[Ii].toArray().map(e=>e.key)}values(){return this[Ii].toArray().map(e=>e.value)}reset(){this[xa]&&this[Ii]&&this[Ii].length&&this[Ii].forEach(e=>this[xa](e.key,e.value)),this[zs]=new Map,this[Ii]=new sIe,this[Pa]=0}dump(){return this[Ii].map(e=>by(this,e)?!1:{k:e.key,v:e.value,e:e.now+(e.maxAge||0)}).toArray().filter(e=>e)}dumpLru(){return this[Ii]}set(e,t,i){if(i=i||this[Dc],i&&typeof i!="number")throw new TypeError("maxAge must be a number");let n=i?Date.now():0,s=this[uf](t,e);if(this[zs].has(e)){if(s>this[Pc])return gf(this,this[zs].get(e)),!1;let l=this[zs].get(e).value;return this[xa]&&(this[WY]||this[xa](e,l.value)),l.now=n,l.maxAge=i,l.value=t,this[Pa]+=s-l.length,l.length=s,this.get(e),Kd(this),!0}let o=new gx(e,t,s,n,i);return o.length>this[Pc]?(this[xa]&&this[xa](e,t),!1):(this[Pa]+=o.length,this[Ii].unshift(o),this[zs].set(e,this[Ii].head),Kd(this),!0)}has(e){if(!this[zs].has(e))return!1;let t=this[zs].get(e).value;return!by(this,t)}get(e){return cx(this,e,!0)}peek(e){return cx(this,e,!1)}pop(){let e=this[Ii].tail;return e?(gf(this,e),e.value):null}del(e){gf(this,this[zs].get(e))}load(e){this.reset();let t=Date.now();for(let i=e.length-1;i>=0;i--){let n=e[i],s=n.e||0;if(s===0)this.set(n.k,n.v);else{let o=s-t;o>0&&this.set(n.k,n.v,o)}}}prune(){this[zs].forEach((e,t)=>cx(this,t,!1))}},cx=(r,e,t)=>{let i=r[zs].get(e);if(i){let n=i.value;if(by(r,n)){if(gf(r,i),!r[Hd])return}else t&&(r[VY]&&(i.value.now=Date.now()),r[Ii].unshiftNode(i));return n.value}},by=(r,e)=>{if(!e||!e.maxAge&&!r[Dc])return!1;let t=Date.now()-e.now;return e.maxAge?t>e.maxAge:r[Dc]&&t>r[Dc]},Kd=r=>{if(r[Pa]>r[Pc])for(let e=r[Ii].tail;r[Pa]>r[Pc]&&e!==null;){let t=e.prev;gf(r,e),e=t}},gf=(r,e)=>{if(e){let t=e.value;r[xa]&&r[xa](t.key,t.value),r[Pa]-=t.length,r[zs].delete(t.key),r[Ii].removeNode(e)}},gx=class{constructor(e,t,i,n,s){this.key=e,this.value=t,this.length=i,this.now=n,this.maxAge=s||0}},zY=(r,e,t,i)=>{let n=t.value;by(r,n)&&(gf(r,t),r[Hd]||(n=void 0)),n&&e.call(i,n.value,n.key,r)};XY.exports=ux});var as=y((xet,tj)=>{var kc=class{constructor(e,t){if(t=aIe(t),e instanceof kc)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new kc(e.raw,t);if(e instanceof fx)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map(i=>this.parseRange(i.trim())).filter(i=>i.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${e}`);if(this.set.length>1){let i=this.set[0];if(this.set=this.set.filter(n=>!$Y(n[0])),this.set.length===0)this.set=[i];else if(this.set.length>1){for(let n of this.set)if(n.length===1&&gIe(n[0])){this.set=[n];break}}}this.format()}format(){return this.range=this.set.map(e=>e.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(e){e=e.trim();let i=`parseRange:${Object.keys(this.options).join(",")}:${e}`,n=ZY.get(i);if(n)return n;let s=this.options.loose,o=s?Mi[Qi.HYPHENRANGELOOSE]:Mi[Qi.HYPHENRANGE];e=e.replace(o,wIe(this.options.includePrerelease)),jr("hyphen replace",e),e=e.replace(Mi[Qi.COMPARATORTRIM],lIe),jr("comparator trim",e,Mi[Qi.COMPARATORTRIM]),e=e.replace(Mi[Qi.TILDETRIM],cIe),e=e.replace(Mi[Qi.CARETTRIM],uIe),e=e.split(/\s+/).join(" ");let a=s?Mi[Qi.COMPARATORLOOSE]:Mi[Qi.COMPARATOR],l=e.split(" ").map(f=>fIe(f,this.options)).join(" ").split(/\s+/).map(f=>yIe(f,this.options)).filter(this.options.loose?f=>!!f.match(a):()=>!0).map(f=>new fx(f,this.options)),c=l.length,u=new Map;for(let f of l){if($Y(f))return[f];u.set(f.value,f)}u.size>1&&u.has("")&&u.delete("");let g=[...u.values()];return ZY.set(i,g),g}intersects(e,t){if(!(e instanceof kc))throw new TypeError("a Range is required");return this.set.some(i=>ej(i,t)&&e.set.some(n=>ej(n,t)&&i.every(s=>n.every(o=>s.intersects(o,t)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new AIe(e,this.options)}catch{return!1}for(let t=0;tr.value==="<0.0.0-0",gIe=r=>r.value==="",ej=(r,e)=>{let t=!0,i=r.slice(),n=i.pop();for(;t&&i.length;)t=i.every(s=>n.intersects(s,e)),n=i.pop();return t},fIe=(r,e)=>(jr("comp",r,e),r=dIe(r,e),jr("caret",r),r=hIe(r,e),jr("tildes",r),r=mIe(r,e),jr("xrange",r),r=IIe(r,e),jr("stars",r),r),Xi=r=>!r||r.toLowerCase()==="x"||r==="*",hIe=(r,e)=>r.trim().split(/\s+/).map(t=>pIe(t,e)).join(" "),pIe=(r,e)=>{let t=e.loose?Mi[Qi.TILDELOOSE]:Mi[Qi.TILDE];return r.replace(t,(i,n,s,o,a)=>{jr("tilde",r,i,n,s,o,a);let l;return Xi(n)?l="":Xi(s)?l=`>=${n}.0.0 <${+n+1}.0.0-0`:Xi(o)?l=`>=${n}.${s}.0 <${n}.${+s+1}.0-0`:a?(jr("replaceTilde pr",a),l=`>=${n}.${s}.${o}-${a} <${n}.${+s+1}.0-0`):l=`>=${n}.${s}.${o} <${n}.${+s+1}.0-0`,jr("tilde return",l),l})},dIe=(r,e)=>r.trim().split(/\s+/).map(t=>CIe(t,e)).join(" "),CIe=(r,e)=>{jr("caret",r,e);let t=e.loose?Mi[Qi.CARETLOOSE]:Mi[Qi.CARET],i=e.includePrerelease?"-0":"";return r.replace(t,(n,s,o,a,l)=>{jr("caret",r,n,s,o,a,l);let c;return Xi(s)?c="":Xi(o)?c=`>=${s}.0.0${i} <${+s+1}.0.0-0`:Xi(a)?s==="0"?c=`>=${s}.${o}.0${i} <${s}.${+o+1}.0-0`:c=`>=${s}.${o}.0${i} <${+s+1}.0.0-0`:l?(jr("replaceCaret pr",l),s==="0"?o==="0"?c=`>=${s}.${o}.${a}-${l} <${s}.${o}.${+a+1}-0`:c=`>=${s}.${o}.${a}-${l} <${s}.${+o+1}.0-0`:c=`>=${s}.${o}.${a}-${l} <${+s+1}.0.0-0`):(jr("no pr"),s==="0"?o==="0"?c=`>=${s}.${o}.${a}${i} <${s}.${o}.${+a+1}-0`:c=`>=${s}.${o}.${a}${i} <${s}.${+o+1}.0-0`:c=`>=${s}.${o}.${a} <${+s+1}.0.0-0`),jr("caret return",c),c})},mIe=(r,e)=>(jr("replaceXRanges",r,e),r.split(/\s+/).map(t=>EIe(t,e)).join(" ")),EIe=(r,e)=>{r=r.trim();let t=e.loose?Mi[Qi.XRANGELOOSE]:Mi[Qi.XRANGE];return r.replace(t,(i,n,s,o,a,l)=>{jr("xRange",r,i,n,s,o,a,l);let c=Xi(s),u=c||Xi(o),g=u||Xi(a),f=g;return n==="="&&f&&(n=""),l=e.includePrerelease?"-0":"",c?n===">"||n==="<"?i="<0.0.0-0":i="*":n&&f?(u&&(o=0),a=0,n===">"?(n=">=",u?(s=+s+1,o=0,a=0):(o=+o+1,a=0)):n==="<="&&(n="<",u?s=+s+1:o=+o+1),n==="<"&&(l="-0"),i=`${n+s}.${o}.${a}${l}`):u?i=`>=${s}.0.0${l} <${+s+1}.0.0-0`:g&&(i=`>=${s}.${o}.0${l} <${s}.${+o+1}.0-0`),jr("xRange return",i),i})},IIe=(r,e)=>(jr("replaceStars",r,e),r.trim().replace(Mi[Qi.STAR],"")),yIe=(r,e)=>(jr("replaceGTE0",r,e),r.trim().replace(Mi[e.includePrerelease?Qi.GTE0PRE:Qi.GTE0],"")),wIe=r=>(e,t,i,n,s,o,a,l,c,u,g,f,h)=>(Xi(i)?t="":Xi(n)?t=`>=${i}.0.0${r?"-0":""}`:Xi(s)?t=`>=${i}.${n}.0${r?"-0":""}`:o?t=`>=${t}`:t=`>=${t}${r?"-0":""}`,Xi(c)?l="":Xi(u)?l=`<${+c+1}.0.0-0`:Xi(g)?l=`<${c}.${+u+1}.0-0`:f?l=`<=${c}.${u}.${g}-${f}`:r?l=`<${c}.${u}.${+g+1}-0`:l=`<=${l}`,`${t} ${l}`.trim()),BIe=(r,e,t)=>{for(let i=0;i0){let n=r[i].semver;if(n.major===e.major&&n.minor===e.minor&&n.patch===e.patch)return!0}return!1}return!0}});var Gd=y((Pet,oj)=>{var Yd=Symbol("SemVer ANY"),ff=class{static get ANY(){return Yd}constructor(e,t){if(t=bIe(t),e instanceof ff){if(e.loose===!!t.loose)return e;e=e.value}px("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===Yd?this.value="":this.value=this.operator+this.semver.version,px("comp",this)}parse(e){let t=this.options.loose?rj[ij.COMPARATORLOOSE]:rj[ij.COMPARATOR],i=e.match(t);if(!i)throw new TypeError(`Invalid comparator: ${e}`);this.operator=i[1]!==void 0?i[1]:"",this.operator==="="&&(this.operator=""),i[2]?this.semver=new nj(i[2],this.options.loose):this.semver=Yd}toString(){return this.value}test(e){if(px("Comparator.test",e,this.options.loose),this.semver===Yd||e===Yd)return!0;if(typeof e=="string")try{e=new nj(e,this.options)}catch{return!1}return hx(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof ff))throw new TypeError("a Comparator is required");if((!t||typeof t!="object")&&(t={loose:!!t,includePrerelease:!1}),this.operator==="")return this.value===""?!0:new sj(e.value,t).test(this.value);if(e.operator==="")return e.value===""?!0:new sj(this.value,t).test(e.semver);let i=(this.operator===">="||this.operator===">")&&(e.operator===">="||e.operator===">"),n=(this.operator==="<="||this.operator==="<")&&(e.operator==="<="||e.operator==="<"),s=this.semver.version===e.semver.version,o=(this.operator===">="||this.operator==="<=")&&(e.operator===">="||e.operator==="<="),a=hx(this.semver,"<",e.semver,t)&&(this.operator===">="||this.operator===">")&&(e.operator==="<="||e.operator==="<"),l=hx(this.semver,">",e.semver,t)&&(this.operator==="<="||this.operator==="<")&&(e.operator===">="||e.operator===">");return i||n||s&&o||a||l}};oj.exports=ff;var bIe=Ld(),{re:rj,t:ij}=Sc(),hx=Ax(),px=Td(),nj=Oi(),sj=as()});var jd=y((Det,aj)=>{var QIe=as(),SIe=(r,e,t)=>{try{e=new QIe(e,t)}catch{return!1}return e.test(r)};aj.exports=SIe});var lj=y((ket,Aj)=>{var vIe=as(),xIe=(r,e)=>new vIe(r,e).set.map(t=>t.map(i=>i.value).join(" ").trim().split(" "));Aj.exports=xIe});var uj=y((Ret,cj)=>{var PIe=Oi(),DIe=as(),kIe=(r,e,t)=>{let i=null,n=null,s=null;try{s=new DIe(e,t)}catch{return null}return r.forEach(o=>{s.test(o)&&(!i||n.compare(o)===-1)&&(i=o,n=new PIe(i,t))}),i};cj.exports=kIe});var fj=y((Fet,gj)=>{var RIe=Oi(),FIe=as(),NIe=(r,e,t)=>{let i=null,n=null,s=null;try{s=new FIe(e,t)}catch{return null}return r.forEach(o=>{s.test(o)&&(!i||n.compare(o)===1)&&(i=o,n=new RIe(i,t))}),i};gj.exports=NIe});var dj=y((Net,pj)=>{var dx=Oi(),TIe=as(),hj=Md(),LIe=(r,e)=>{r=new TIe(r,e);let t=new dx("0.0.0");if(r.test(t)||(t=new dx("0.0.0-0"),r.test(t)))return t;t=null;for(let i=0;i{let a=new dx(o.semver.version);switch(o.operator){case">":a.prerelease.length===0?a.patch++:a.prerelease.push(0),a.raw=a.format();case"":case">=":(!s||hj(a,s))&&(s=a);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${o.operator}`)}}),s&&(!t||hj(t,s))&&(t=s)}return t&&r.test(t)?t:null};pj.exports=LIe});var mj=y((Tet,Cj)=>{var OIe=as(),MIe=(r,e)=>{try{return new OIe(r,e).range||"*"}catch{return null}};Cj.exports=MIe});var Qy=y((Let,wj)=>{var UIe=Oi(),yj=Gd(),{ANY:KIe}=yj,HIe=as(),GIe=jd(),Ej=Md(),Ij=Ey(),YIe=yy(),jIe=Iy(),qIe=(r,e,t,i)=>{r=new UIe(r,i),e=new HIe(e,i);let n,s,o,a,l;switch(t){case">":n=Ej,s=YIe,o=Ij,a=">",l=">=";break;case"<":n=Ij,s=jIe,o=Ej,a="<",l="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(GIe(r,e,i))return!1;for(let c=0;c{h.semver===KIe&&(h=new yj(">=0.0.0")),g=g||h,f=f||h,n(h.semver,g.semver,i)?g=h:o(h.semver,f.semver,i)&&(f=h)}),g.operator===a||g.operator===l||(!f.operator||f.operator===a)&&s(r,f.semver))return!1;if(f.operator===l&&o(r,f.semver))return!1}return!0};wj.exports=qIe});var bj=y((Oet,Bj)=>{var JIe=Qy(),WIe=(r,e,t)=>JIe(r,e,">",t);Bj.exports=WIe});var Sj=y((Met,Qj)=>{var zIe=Qy(),VIe=(r,e,t)=>zIe(r,e,"<",t);Qj.exports=VIe});var Pj=y((Uet,xj)=>{var vj=as(),XIe=(r,e,t)=>(r=new vj(r,t),e=new vj(e,t),r.intersects(e));xj.exports=XIe});var kj=y((Ket,Dj)=>{var _Ie=jd(),ZIe=os();Dj.exports=(r,e,t)=>{let i=[],n=null,s=null,o=r.sort((u,g)=>ZIe(u,g,t));for(let u of o)_Ie(u,e,t)?(s=u,n||(n=u)):(s&&i.push([n,s]),s=null,n=null);n&&i.push([n,null]);let a=[];for(let[u,g]of i)u===g?a.push(u):!g&&u===o[0]?a.push("*"):g?u===o[0]?a.push(`<=${g}`):a.push(`${u} - ${g}`):a.push(`>=${u}`);let l=a.join(" || "),c=typeof e.raw=="string"?e.raw:String(e);return l.length{var Rj=as(),Sy=Gd(),{ANY:Cx}=Sy,qd=jd(),mx=os(),$Ie=(r,e,t={})=>{if(r===e)return!0;r=new Rj(r,t),e=new Rj(e,t);let i=!1;e:for(let n of r.set){for(let s of e.set){let o=eye(n,s,t);if(i=i||o!==null,o)continue e}if(i)return!1}return!0},eye=(r,e,t)=>{if(r===e)return!0;if(r.length===1&&r[0].semver===Cx){if(e.length===1&&e[0].semver===Cx)return!0;t.includePrerelease?r=[new Sy(">=0.0.0-0")]:r=[new Sy(">=0.0.0")]}if(e.length===1&&e[0].semver===Cx){if(t.includePrerelease)return!0;e=[new Sy(">=0.0.0")]}let i=new Set,n,s;for(let h of r)h.operator===">"||h.operator===">="?n=Fj(n,h,t):h.operator==="<"||h.operator==="<="?s=Nj(s,h,t):i.add(h.semver);if(i.size>1)return null;let o;if(n&&s){if(o=mx(n.semver,s.semver,t),o>0)return null;if(o===0&&(n.operator!==">="||s.operator!=="<="))return null}for(let h of i){if(n&&!qd(h,String(n),t)||s&&!qd(h,String(s),t))return null;for(let p of e)if(!qd(h,String(p),t))return!1;return!0}let a,l,c,u,g=s&&!t.includePrerelease&&s.semver.prerelease.length?s.semver:!1,f=n&&!t.includePrerelease&&n.semver.prerelease.length?n.semver:!1;g&&g.prerelease.length===1&&s.operator==="<"&&g.prerelease[0]===0&&(g=!1);for(let h of e){if(u=u||h.operator===">"||h.operator===">=",c=c||h.operator==="<"||h.operator==="<=",n){if(f&&h.semver.prerelease&&h.semver.prerelease.length&&h.semver.major===f.major&&h.semver.minor===f.minor&&h.semver.patch===f.patch&&(f=!1),h.operator===">"||h.operator===">="){if(a=Fj(n,h,t),a===h&&a!==n)return!1}else if(n.operator===">="&&!qd(n.semver,String(h),t))return!1}if(s){if(g&&h.semver.prerelease&&h.semver.prerelease.length&&h.semver.major===g.major&&h.semver.minor===g.minor&&h.semver.patch===g.patch&&(g=!1),h.operator==="<"||h.operator==="<="){if(l=Nj(s,h,t),l===h&&l!==s)return!1}else if(s.operator==="<="&&!qd(s.semver,String(h),t))return!1}if(!h.operator&&(s||n)&&o!==0)return!1}return!(n&&c&&!s&&o!==0||s&&u&&!n&&o!==0||f||g)},Fj=(r,e,t)=>{if(!r)return e;let i=mx(r.semver,e.semver,t);return i>0?r:i<0||e.operator===">"&&r.operator===">="?e:r},Nj=(r,e,t)=>{if(!r)return e;let i=mx(r.semver,e.semver,t);return i<0?r:i>0||e.operator==="<"&&r.operator==="<="?e:r};Tj.exports=$Ie});var $r=y((Get,Oj)=>{var Ex=Sc();Oj.exports={re:Ex.re,src:Ex.src,tokens:Ex.t,SEMVER_SPEC_VERSION:Nd().SEMVER_SPEC_VERSION,SemVer:Oi(),compareIdentifiers:hy().compareIdentifiers,rcompareIdentifiers:hy().rcompareIdentifiers,parse:vc(),valid:aY(),clean:lY(),inc:uY(),diff:CY(),major:EY(),minor:yY(),patch:BY(),prerelease:QY(),compare:os(),rcompare:vY(),compareLoose:PY(),compareBuild:my(),sort:FY(),rsort:TY(),gt:Md(),lt:Ey(),eq:Cy(),neq:ax(),gte:Iy(),lte:yy(),cmp:Ax(),coerce:YY(),Comparator:Gd(),Range:as(),satisfies:jd(),toComparators:lj(),maxSatisfying:uj(),minSatisfying:fj(),minVersion:dj(),validRange:mj(),outside:Qy(),gtr:bj(),ltr:Sj(),intersects:Pj(),simplifyRange:kj(),subset:Lj()}});var Ix=y(vy=>{"use strict";Object.defineProperty(vy,"__esModule",{value:!0});vy.VERSION=void 0;vy.VERSION="9.1.0"});var Gt=y((exports,module)=>{"use strict";var __spreadArray=exports&&exports.__spreadArray||function(r,e,t){if(t||arguments.length===2)for(var i=0,n=e.length,s;i{(function(r,e){typeof define=="function"&&define.amd?define([],e):typeof xy=="object"&&xy.exports?xy.exports=e():r.regexpToAst=e()})(typeof self<"u"?self:Mj,function(){function r(){}r.prototype.saveState=function(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}},r.prototype.restoreState=function(p){this.idx=p.idx,this.input=p.input,this.groupIdx=p.groupIdx},r.prototype.pattern=function(p){this.idx=0,this.input=p,this.groupIdx=0,this.consumeChar("/");var C=this.disjunction();this.consumeChar("/");for(var w={type:"Flags",loc:{begin:this.idx,end:p.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};this.isRegExpFlag();)switch(this.popChar()){case"g":o(w,"global");break;case"i":o(w,"ignoreCase");break;case"m":o(w,"multiLine");break;case"u":o(w,"unicode");break;case"y":o(w,"sticky");break}if(this.idx!==this.input.length)throw Error("Redundant input: "+this.input.substring(this.idx));return{type:"Pattern",flags:w,value:C,loc:this.loc(0)}},r.prototype.disjunction=function(){var p=[],C=this.idx;for(p.push(this.alternative());this.peekChar()==="|";)this.consumeChar("|"),p.push(this.alternative());return{type:"Disjunction",value:p,loc:this.loc(C)}},r.prototype.alternative=function(){for(var p=[],C=this.idx;this.isTerm();)p.push(this.term());return{type:"Alternative",value:p,loc:this.loc(C)}},r.prototype.term=function(){return this.isAssertion()?this.assertion():this.atom()},r.prototype.assertion=function(){var p=this.idx;switch(this.popChar()){case"^":return{type:"StartAnchor",loc:this.loc(p)};case"$":return{type:"EndAnchor",loc:this.loc(p)};case"\\":switch(this.popChar()){case"b":return{type:"WordBoundary",loc:this.loc(p)};case"B":return{type:"NonWordBoundary",loc:this.loc(p)}}throw Error("Invalid Assertion Escape");case"(":this.consumeChar("?");var C;switch(this.popChar()){case"=":C="Lookahead";break;case"!":C="NegativeLookahead";break}a(C);var w=this.disjunction();return this.consumeChar(")"),{type:C,value:w,loc:this.loc(p)}}l()},r.prototype.quantifier=function(p){var C,w=this.idx;switch(this.popChar()){case"*":C={atLeast:0,atMost:1/0};break;case"+":C={atLeast:1,atMost:1/0};break;case"?":C={atLeast:0,atMost:1};break;case"{":var B=this.integerIncludingZero();switch(this.popChar()){case"}":C={atLeast:B,atMost:B};break;case",":var v;this.isDigit()?(v=this.integerIncludingZero(),C={atLeast:B,atMost:v}):C={atLeast:B,atMost:1/0},this.consumeChar("}");break}if(p===!0&&C===void 0)return;a(C);break}if(!(p===!0&&C===void 0))return a(C),this.peekChar(0)==="?"?(this.consumeChar("?"),C.greedy=!1):C.greedy=!0,C.type="Quantifier",C.loc=this.loc(w),C},r.prototype.atom=function(){var p,C=this.idx;switch(this.peekChar()){case".":p=this.dotAll();break;case"\\":p=this.atomEscape();break;case"[":p=this.characterClass();break;case"(":p=this.group();break}return p===void 0&&this.isPatternCharacter()&&(p=this.patternCharacter()),a(p),p.loc=this.loc(C),this.isQuantifier()&&(p.quantifier=this.quantifier()),p},r.prototype.dotAll=function(){return this.consumeChar("."),{type:"Set",complement:!0,value:[n(` -`),n("\r"),n("\u2028"),n("\u2029")]}},r.prototype.atomEscape=function(){switch(this.consumeChar("\\"),this.peekChar()){case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return this.decimalEscapeAtom();case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}},r.prototype.decimalEscapeAtom=function(){var p=this.positiveInteger();return{type:"GroupBackReference",value:p}},r.prototype.characterClassEscape=function(){var p,C=!1;switch(this.popChar()){case"d":p=u;break;case"D":p=u,C=!0;break;case"s":p=f;break;case"S":p=f,C=!0;break;case"w":p=g;break;case"W":p=g,C=!0;break}return a(p),{type:"Set",value:p,complement:C}},r.prototype.controlEscapeAtom=function(){var p;switch(this.popChar()){case"f":p=n("\f");break;case"n":p=n(` -`);break;case"r":p=n("\r");break;case"t":p=n(" ");break;case"v":p=n("\v");break}return a(p),{type:"Character",value:p}},r.prototype.controlLetterEscapeAtom=function(){this.consumeChar("c");var p=this.popChar();if(/[a-zA-Z]/.test(p)===!1)throw Error("Invalid ");var C=p.toUpperCase().charCodeAt(0)-64;return{type:"Character",value:C}},r.prototype.nulCharacterAtom=function(){return this.consumeChar("0"),{type:"Character",value:n("\0")}},r.prototype.hexEscapeSequenceAtom=function(){return this.consumeChar("x"),this.parseHexDigits(2)},r.prototype.regExpUnicodeEscapeSequenceAtom=function(){return this.consumeChar("u"),this.parseHexDigits(4)},r.prototype.identityEscapeAtom=function(){var p=this.popChar();return{type:"Character",value:n(p)}},r.prototype.classPatternCharacterAtom=function(){switch(this.peekChar()){case` -`:case"\r":case"\u2028":case"\u2029":case"\\":case"]":throw Error("TBD");default:var p=this.popChar();return{type:"Character",value:n(p)}}},r.prototype.characterClass=function(){var p=[],C=!1;for(this.consumeChar("["),this.peekChar(0)==="^"&&(this.consumeChar("^"),C=!0);this.isClassAtom();){var w=this.classAtom(),B=w.type==="Character";if(B&&this.isRangeDash()){this.consumeChar("-");var v=this.classAtom(),D=v.type==="Character";if(D){if(v.value=this.input.length)throw Error("Unexpected end of input");this.idx++},r.prototype.loc=function(p){return{begin:p,end:this.idx}};var e=/[0-9a-fA-F]/,t=/[0-9]/,i=/[1-9]/;function n(p){return p.charCodeAt(0)}function s(p,C){p.length!==void 0?p.forEach(function(w){C.push(w)}):C.push(p)}function o(p,C){if(p[C]===!0)throw"duplicate flag "+C;p[C]=!0}function a(p){if(p===void 0)throw Error("Internal Error - Should never get here!")}function l(){throw Error("Internal Error - Should never get here!")}var c,u=[];for(c=n("0");c<=n("9");c++)u.push(c);var g=[n("_")].concat(u);for(c=n("a");c<=n("z");c++)g.push(c);for(c=n("A");c<=n("Z");c++)g.push(c);var f=[n(" "),n("\f"),n(` -`),n("\r"),n(" "),n("\v"),n(" "),n("\xA0"),n("\u1680"),n("\u2000"),n("\u2001"),n("\u2002"),n("\u2003"),n("\u2004"),n("\u2005"),n("\u2006"),n("\u2007"),n("\u2008"),n("\u2009"),n("\u200A"),n("\u2028"),n("\u2029"),n("\u202F"),n("\u205F"),n("\u3000"),n("\uFEFF")];function h(){}return h.prototype.visitChildren=function(p){for(var C in p){var w=p[C];p.hasOwnProperty(C)&&(w.type!==void 0?this.visit(w):Array.isArray(w)&&w.forEach(function(B){this.visit(B)},this))}},h.prototype.visit=function(p){switch(p.type){case"Pattern":this.visitPattern(p);break;case"Flags":this.visitFlags(p);break;case"Disjunction":this.visitDisjunction(p);break;case"Alternative":this.visitAlternative(p);break;case"StartAnchor":this.visitStartAnchor(p);break;case"EndAnchor":this.visitEndAnchor(p);break;case"WordBoundary":this.visitWordBoundary(p);break;case"NonWordBoundary":this.visitNonWordBoundary(p);break;case"Lookahead":this.visitLookahead(p);break;case"NegativeLookahead":this.visitNegativeLookahead(p);break;case"Character":this.visitCharacter(p);break;case"Set":this.visitSet(p);break;case"Group":this.visitGroup(p);break;case"GroupBackReference":this.visitGroupBackReference(p);break;case"Quantifier":this.visitQuantifier(p);break}this.visitChildren(p)},h.prototype.visitPattern=function(p){},h.prototype.visitFlags=function(p){},h.prototype.visitDisjunction=function(p){},h.prototype.visitAlternative=function(p){},h.prototype.visitStartAnchor=function(p){},h.prototype.visitEndAnchor=function(p){},h.prototype.visitWordBoundary=function(p){},h.prototype.visitNonWordBoundary=function(p){},h.prototype.visitLookahead=function(p){},h.prototype.visitNegativeLookahead=function(p){},h.prototype.visitCharacter=function(p){},h.prototype.visitSet=function(p){},h.prototype.visitGroup=function(p){},h.prototype.visitGroupBackReference=function(p){},h.prototype.visitQuantifier=function(p){},{RegExpParser:r,BaseRegExpVisitor:h,VERSION:"0.5.0"}})});var ky=y(hf=>{"use strict";Object.defineProperty(hf,"__esModule",{value:!0});hf.clearRegExpParserCache=hf.getRegExpAst=void 0;var tye=Py(),Dy={},rye=new tye.RegExpParser;function iye(r){var e=r.toString();if(Dy.hasOwnProperty(e))return Dy[e];var t=rye.pattern(e);return Dy[e]=t,t}hf.getRegExpAst=iye;function nye(){Dy={}}hf.clearRegExpParserCache=nye});var Yj=y(dn=>{"use strict";var sye=dn&&dn.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();Object.defineProperty(dn,"__esModule",{value:!0});dn.canMatchCharCode=dn.firstCharOptimizedIndices=dn.getOptimizedStartCodesIndices=dn.failedOptimizationPrefixMsg=void 0;var Kj=Py(),As=Gt(),Hj=ky(),Da=wx(),Gj="Complement Sets are not supported for first char optimization";dn.failedOptimizationPrefixMsg=`Unable to use "first char" lexer optimizations: -`;function oye(r,e){e===void 0&&(e=!1);try{var t=(0,Hj.getRegExpAst)(r),i=Fy(t.value,{},t.flags.ignoreCase);return i}catch(s){if(s.message===Gj)e&&(0,As.PRINT_WARNING)(""+dn.failedOptimizationPrefixMsg+(" Unable to optimize: < "+r.toString()+` > -`)+` Complement Sets cannot be automatically optimized. - This will disable the lexer's first char optimizations. - See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#COMPLEMENT for details.`);else{var n="";e&&(n=` - This will disable the lexer's first char optimizations. - See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details.`),(0,As.PRINT_ERROR)(dn.failedOptimizationPrefixMsg+` -`+(" Failed parsing: < "+r.toString()+` > -`)+(" Using the regexp-to-ast library version: "+Kj.VERSION+` -`)+" Please open an issue at: https://github.com/bd82/regexp-to-ast/issues"+n)}}return[]}dn.getOptimizedStartCodesIndices=oye;function Fy(r,e,t){switch(r.type){case"Disjunction":for(var i=0;i=Da.minOptimizationVal)for(var f=u.from>=Da.minOptimizationVal?u.from:Da.minOptimizationVal,h=u.to,p=(0,Da.charCodeToOptimizedIndex)(f),C=(0,Da.charCodeToOptimizedIndex)(h),w=p;w<=C;w++)e[w]=w}}});break;case"Group":Fy(o.value,e,t);break;default:throw Error("Non Exhaustive Match")}var a=o.quantifier!==void 0&&o.quantifier.atLeast===0;if(o.type==="Group"&&yx(o)===!1||o.type!=="Group"&&a===!1)break}break;default:throw Error("non exhaustive match!")}return(0,As.values)(e)}dn.firstCharOptimizedIndices=Fy;function Ry(r,e,t){var i=(0,Da.charCodeToOptimizedIndex)(r);e[i]=i,t===!0&&aye(r,e)}function aye(r,e){var t=String.fromCharCode(r),i=t.toUpperCase();if(i!==t){var n=(0,Da.charCodeToOptimizedIndex)(i.charCodeAt(0));e[n]=n}else{var s=t.toLowerCase();if(s!==t){var n=(0,Da.charCodeToOptimizedIndex)(s.charCodeAt(0));e[n]=n}}}function Uj(r,e){return(0,As.find)(r.value,function(t){if(typeof t=="number")return(0,As.contains)(e,t);var i=t;return(0,As.find)(e,function(n){return i.from<=n&&n<=i.to})!==void 0})}function yx(r){return r.quantifier&&r.quantifier.atLeast===0?!0:r.value?(0,As.isArray)(r.value)?(0,As.every)(r.value,yx):yx(r.value):!1}var Aye=function(r){sye(e,r);function e(t){var i=r.call(this)||this;return i.targetCharCodes=t,i.found=!1,i}return e.prototype.visitChildren=function(t){if(this.found!==!0){switch(t.type){case"Lookahead":this.visitLookahead(t);return;case"NegativeLookahead":this.visitNegativeLookahead(t);return}r.prototype.visitChildren.call(this,t)}},e.prototype.visitCharacter=function(t){(0,As.contains)(this.targetCharCodes,t.value)&&(this.found=!0)},e.prototype.visitSet=function(t){t.complement?Uj(t,this.targetCharCodes)===void 0&&(this.found=!0):Uj(t,this.targetCharCodes)!==void 0&&(this.found=!0)},e}(Kj.BaseRegExpVisitor);function lye(r,e){if(e instanceof RegExp){var t=(0,Hj.getRegExpAst)(e),i=new Aye(r);return i.visit(t),i.found}else return(0,As.find)(e,function(n){return(0,As.contains)(r,n.charCodeAt(0))})!==void 0}dn.canMatchCharCode=lye});var wx=y(Je=>{"use strict";var jj=Je&&Je.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();Object.defineProperty(Je,"__esModule",{value:!0});Je.charCodeToOptimizedIndex=Je.minOptimizationVal=Je.buildLineBreakIssueMessage=Je.LineTerminatorOptimizedTester=Je.isShortPattern=Je.isCustomPattern=Je.cloneEmptyGroups=Je.performWarningRuntimeChecks=Je.performRuntimeChecks=Je.addStickyFlag=Je.addStartOfInput=Je.findUnreachablePatterns=Je.findModesThatDoNotExist=Je.findInvalidGroupType=Je.findDuplicatePatterns=Je.findUnsupportedFlags=Je.findStartOfInputAnchor=Je.findEmptyMatchRegExps=Je.findEndOfInputAnchor=Je.findInvalidPatterns=Je.findMissingPatterns=Je.validatePatterns=Je.analyzeTokenTypes=Je.enableSticky=Je.disableSticky=Je.SUPPORT_STICKY=Je.MODES=Je.DEFAULT_MODE=void 0;var qj=Py(),ir=Jd(),Se=Gt(),pf=Yj(),Jj=ky(),Do="PATTERN";Je.DEFAULT_MODE="defaultMode";Je.MODES="modes";Je.SUPPORT_STICKY=typeof new RegExp("(?:)").sticky=="boolean";function cye(){Je.SUPPORT_STICKY=!1}Je.disableSticky=cye;function uye(){Je.SUPPORT_STICKY=!0}Je.enableSticky=uye;function gye(r,e){e=(0,Se.defaults)(e,{useSticky:Je.SUPPORT_STICKY,debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r",` -`],tracer:function(v,D){return D()}});var t=e.tracer;t("initCharCodeToOptimizedIndexMap",function(){wye()});var i;t("Reject Lexer.NA",function(){i=(0,Se.reject)(r,function(v){return v[Do]===ir.Lexer.NA})});var n=!1,s;t("Transform Patterns",function(){n=!1,s=(0,Se.map)(i,function(v){var D=v[Do];if((0,Se.isRegExp)(D)){var T=D.source;return T.length===1&&T!=="^"&&T!=="$"&&T!=="."&&!D.ignoreCase?T:T.length===2&&T[0]==="\\"&&!(0,Se.contains)(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],T[1])?T[1]:e.useSticky?Qx(D):bx(D)}else{if((0,Se.isFunction)(D))return n=!0,{exec:D};if((0,Se.has)(D,"exec"))return n=!0,D;if(typeof D=="string"){if(D.length===1)return D;var H=D.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),j=new RegExp(H);return e.useSticky?Qx(j):bx(j)}else throw Error("non exhaustive match")}})});var o,a,l,c,u;t("misc mapping",function(){o=(0,Se.map)(i,function(v){return v.tokenTypeIdx}),a=(0,Se.map)(i,function(v){var D=v.GROUP;if(D!==ir.Lexer.SKIPPED){if((0,Se.isString)(D))return D;if((0,Se.isUndefined)(D))return!1;throw Error("non exhaustive match")}}),l=(0,Se.map)(i,function(v){var D=v.LONGER_ALT;if(D){var T=(0,Se.isArray)(D)?(0,Se.map)(D,function(H){return(0,Se.indexOf)(i,H)}):[(0,Se.indexOf)(i,D)];return T}}),c=(0,Se.map)(i,function(v){return v.PUSH_MODE}),u=(0,Se.map)(i,function(v){return(0,Se.has)(v,"POP_MODE")})});var g;t("Line Terminator Handling",function(){var v=oq(e.lineTerminatorCharacters);g=(0,Se.map)(i,function(D){return!1}),e.positionTracking!=="onlyOffset"&&(g=(0,Se.map)(i,function(D){if((0,Se.has)(D,"LINE_BREAKS"))return D.LINE_BREAKS;if(nq(D,v)===!1)return(0,pf.canMatchCharCode)(v,D.PATTERN)}))});var f,h,p,C;t("Misc Mapping #2",function(){f=(0,Se.map)(i,vx),h=(0,Se.map)(s,iq),p=(0,Se.reduce)(i,function(v,D){var T=D.GROUP;return(0,Se.isString)(T)&&T!==ir.Lexer.SKIPPED&&(v[T]=[]),v},{}),C=(0,Se.map)(s,function(v,D){return{pattern:s[D],longerAlt:l[D],canLineTerminator:g[D],isCustom:f[D],short:h[D],group:a[D],push:c[D],pop:u[D],tokenTypeIdx:o[D],tokenType:i[D]}})});var w=!0,B=[];return e.safeMode||t("First Char Optimization",function(){B=(0,Se.reduce)(i,function(v,D,T){if(typeof D.PATTERN=="string"){var H=D.PATTERN.charCodeAt(0),j=Sx(H);Bx(v,j,C[T])}else if((0,Se.isArray)(D.START_CHARS_HINT)){var $;(0,Se.forEach)(D.START_CHARS_HINT,function(W){var Z=typeof W=="string"?W.charCodeAt(0):W,A=Sx(Z);$!==A&&($=A,Bx(v,A,C[T]))})}else if((0,Se.isRegExp)(D.PATTERN))if(D.PATTERN.unicode)w=!1,e.ensureOptimizations&&(0,Se.PRINT_ERROR)(""+pf.failedOptimizationPrefixMsg+(" Unable to analyze < "+D.PATTERN.toString()+` > pattern. -`)+` The regexp unicode flag is not currently supported by the regexp-to-ast library. - This will disable the lexer's first char optimizations. - For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE`);else{var V=(0,pf.getOptimizedStartCodesIndices)(D.PATTERN,e.ensureOptimizations);(0,Se.isEmpty)(V)&&(w=!1),(0,Se.forEach)(V,function(W){Bx(v,W,C[T])})}else e.ensureOptimizations&&(0,Se.PRINT_ERROR)(""+pf.failedOptimizationPrefixMsg+(" TokenType: <"+D.name+`> is using a custom token pattern without providing parameter. -`)+` This will disable the lexer's first char optimizations. - For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE`),w=!1;return v},[])}),t("ArrayPacking",function(){B=(0,Se.packArray)(B)}),{emptyGroups:p,patternIdxToConfig:C,charCodeToPatternIdxToConfig:B,hasCustom:n,canBeOptimized:w}}Je.analyzeTokenTypes=gye;function fye(r,e){var t=[],i=Wj(r);t=t.concat(i.errors);var n=zj(i.valid),s=n.valid;return t=t.concat(n.errors),t=t.concat(hye(s)),t=t.concat(eq(s)),t=t.concat(tq(s,e)),t=t.concat(rq(s)),t}Je.validatePatterns=fye;function hye(r){var e=[],t=(0,Se.filter)(r,function(i){return(0,Se.isRegExp)(i[Do])});return e=e.concat(Vj(t)),e=e.concat(_j(t)),e=e.concat(Zj(t)),e=e.concat($j(t)),e=e.concat(Xj(t)),e}function Wj(r){var e=(0,Se.filter)(r,function(n){return!(0,Se.has)(n,Do)}),t=(0,Se.map)(e,function(n){return{message:"Token Type: ->"+n.name+"<- missing static 'PATTERN' property",type:ir.LexerDefinitionErrorType.MISSING_PATTERN,tokenTypes:[n]}}),i=(0,Se.difference)(r,e);return{errors:t,valid:i}}Je.findMissingPatterns=Wj;function zj(r){var e=(0,Se.filter)(r,function(n){var s=n[Do];return!(0,Se.isRegExp)(s)&&!(0,Se.isFunction)(s)&&!(0,Se.has)(s,"exec")&&!(0,Se.isString)(s)}),t=(0,Se.map)(e,function(n){return{message:"Token Type: ->"+n.name+"<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.",type:ir.LexerDefinitionErrorType.INVALID_PATTERN,tokenTypes:[n]}}),i=(0,Se.difference)(r,e);return{errors:t,valid:i}}Je.findInvalidPatterns=zj;var pye=/[^\\][\$]/;function Vj(r){var e=function(n){jj(s,n);function s(){var o=n!==null&&n.apply(this,arguments)||this;return o.found=!1,o}return s.prototype.visitEndAnchor=function(o){this.found=!0},s}(qj.BaseRegExpVisitor),t=(0,Se.filter)(r,function(n){var s=n[Do];try{var o=(0,Jj.getRegExpAst)(s),a=new e;return a.visit(o),a.found}catch{return pye.test(s.source)}}),i=(0,Se.map)(t,function(n){return{message:`Unexpected RegExp Anchor Error: - Token Type: ->`+n.name+`<- static 'PATTERN' cannot contain end of input anchor '$' - See chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:ir.LexerDefinitionErrorType.EOI_ANCHOR_FOUND,tokenTypes:[n]}});return i}Je.findEndOfInputAnchor=Vj;function Xj(r){var e=(0,Se.filter)(r,function(i){var n=i[Do];return n.test("")}),t=(0,Se.map)(e,function(i){return{message:"Token Type: ->"+i.name+"<- static 'PATTERN' must not match an empty string",type:ir.LexerDefinitionErrorType.EMPTY_MATCH_PATTERN,tokenTypes:[i]}});return t}Je.findEmptyMatchRegExps=Xj;var dye=/[^\\[][\^]|^\^/;function _j(r){var e=function(n){jj(s,n);function s(){var o=n!==null&&n.apply(this,arguments)||this;return o.found=!1,o}return s.prototype.visitStartAnchor=function(o){this.found=!0},s}(qj.BaseRegExpVisitor),t=(0,Se.filter)(r,function(n){var s=n[Do];try{var o=(0,Jj.getRegExpAst)(s),a=new e;return a.visit(o),a.found}catch{return dye.test(s.source)}}),i=(0,Se.map)(t,function(n){return{message:`Unexpected RegExp Anchor Error: - Token Type: ->`+n.name+`<- static 'PATTERN' cannot contain start of input anchor '^' - See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:ir.LexerDefinitionErrorType.SOI_ANCHOR_FOUND,tokenTypes:[n]}});return i}Je.findStartOfInputAnchor=_j;function Zj(r){var e=(0,Se.filter)(r,function(i){var n=i[Do];return n instanceof RegExp&&(n.multiline||n.global)}),t=(0,Se.map)(e,function(i){return{message:"Token Type: ->"+i.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:ir.LexerDefinitionErrorType.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[i]}});return t}Je.findUnsupportedFlags=Zj;function $j(r){var e=[],t=(0,Se.map)(r,function(s){return(0,Se.reduce)(r,function(o,a){return s.PATTERN.source===a.PATTERN.source&&!(0,Se.contains)(e,a)&&a.PATTERN!==ir.Lexer.NA&&(e.push(a),o.push(a)),o},[])});t=(0,Se.compact)(t);var i=(0,Se.filter)(t,function(s){return s.length>1}),n=(0,Se.map)(i,function(s){var o=(0,Se.map)(s,function(l){return l.name}),a=(0,Se.first)(s).PATTERN;return{message:"The same RegExp pattern ->"+a+"<-"+("has been used in all of the following Token Types: "+o.join(", ")+" <-"),type:ir.LexerDefinitionErrorType.DUPLICATE_PATTERNS_FOUND,tokenTypes:s}});return n}Je.findDuplicatePatterns=$j;function eq(r){var e=(0,Se.filter)(r,function(i){if(!(0,Se.has)(i,"GROUP"))return!1;var n=i.GROUP;return n!==ir.Lexer.SKIPPED&&n!==ir.Lexer.NA&&!(0,Se.isString)(n)}),t=(0,Se.map)(e,function(i){return{message:"Token Type: ->"+i.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:ir.LexerDefinitionErrorType.INVALID_GROUP_TYPE_FOUND,tokenTypes:[i]}});return t}Je.findInvalidGroupType=eq;function tq(r,e){var t=(0,Se.filter)(r,function(n){return n.PUSH_MODE!==void 0&&!(0,Se.contains)(e,n.PUSH_MODE)}),i=(0,Se.map)(t,function(n){var s="Token Type: ->"+n.name+"<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->"+n.PUSH_MODE+"<-which does not exist";return{message:s,type:ir.LexerDefinitionErrorType.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[n]}});return i}Je.findModesThatDoNotExist=tq;function rq(r){var e=[],t=(0,Se.reduce)(r,function(i,n,s){var o=n.PATTERN;return o===ir.Lexer.NA||((0,Se.isString)(o)?i.push({str:o,idx:s,tokenType:n}):(0,Se.isRegExp)(o)&&mye(o)&&i.push({str:o.source,idx:s,tokenType:n})),i},[]);return(0,Se.forEach)(r,function(i,n){(0,Se.forEach)(t,function(s){var o=s.str,a=s.idx,l=s.tokenType;if(n"+i.name+"<-")+`in the lexer's definition. -See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`;e.push({message:c,type:ir.LexerDefinitionErrorType.UNREACHABLE_PATTERN,tokenTypes:[i,l]})}})}),e}Je.findUnreachablePatterns=rq;function Cye(r,e){if((0,Se.isRegExp)(e)){var t=e.exec(r);return t!==null&&t.index===0}else{if((0,Se.isFunction)(e))return e(r,0,[],{});if((0,Se.has)(e,"exec"))return e.exec(r,0,[],{});if(typeof e=="string")return e===r;throw Error("non exhaustive match")}}function mye(r){var e=[".","\\","[","]","|","^","$","(",")","?","*","+","{"];return(0,Se.find)(e,function(t){return r.source.indexOf(t)!==-1})===void 0}function bx(r){var e=r.ignoreCase?"i":"";return new RegExp("^(?:"+r.source+")",e)}Je.addStartOfInput=bx;function Qx(r){var e=r.ignoreCase?"iy":"y";return new RegExp(""+r.source,e)}Je.addStickyFlag=Qx;function Eye(r,e,t){var i=[];return(0,Se.has)(r,Je.DEFAULT_MODE)||i.push({message:"A MultiMode Lexer cannot be initialized without a <"+Je.DEFAULT_MODE+`> property in its definition -`,type:ir.LexerDefinitionErrorType.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),(0,Se.has)(r,Je.MODES)||i.push({message:"A MultiMode Lexer cannot be initialized without a <"+Je.MODES+`> property in its definition -`,type:ir.LexerDefinitionErrorType.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),(0,Se.has)(r,Je.MODES)&&(0,Se.has)(r,Je.DEFAULT_MODE)&&!(0,Se.has)(r.modes,r.defaultMode)&&i.push({message:"A MultiMode Lexer cannot be initialized with a "+Je.DEFAULT_MODE+": <"+r.defaultMode+`>which does not exist -`,type:ir.LexerDefinitionErrorType.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),(0,Se.has)(r,Je.MODES)&&(0,Se.forEach)(r.modes,function(n,s){(0,Se.forEach)(n,function(o,a){(0,Se.isUndefined)(o)&&i.push({message:"A Lexer cannot be initialized using an undefined Token Type. Mode:"+("<"+s+"> at index: <"+a+`> -`),type:ir.LexerDefinitionErrorType.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED})})}),i}Je.performRuntimeChecks=Eye;function Iye(r,e,t){var i=[],n=!1,s=(0,Se.compact)((0,Se.flatten)((0,Se.mapValues)(r.modes,function(l){return l}))),o=(0,Se.reject)(s,function(l){return l[Do]===ir.Lexer.NA}),a=oq(t);return e&&(0,Se.forEach)(o,function(l){var c=nq(l,a);if(c!==!1){var u=sq(l,c),g={message:u,type:c.issue,tokenType:l};i.push(g)}else(0,Se.has)(l,"LINE_BREAKS")?l.LINE_BREAKS===!0&&(n=!0):(0,pf.canMatchCharCode)(a,l.PATTERN)&&(n=!0)}),e&&!n&&i.push({message:`Warning: No LINE_BREAKS Found. - This Lexer has been defined to track line and column information, - But none of the Token Types can be identified as matching a line terminator. - See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#LINE_BREAKS - for details.`,type:ir.LexerDefinitionErrorType.NO_LINE_BREAKS_FLAGS}),i}Je.performWarningRuntimeChecks=Iye;function yye(r){var e={},t=(0,Se.keys)(r);return(0,Se.forEach)(t,function(i){var n=r[i];if((0,Se.isArray)(n))e[i]=[];else throw Error("non exhaustive match")}),e}Je.cloneEmptyGroups=yye;function vx(r){var e=r.PATTERN;if((0,Se.isRegExp)(e))return!1;if((0,Se.isFunction)(e))return!0;if((0,Se.has)(e,"exec"))return!0;if((0,Se.isString)(e))return!1;throw Error("non exhaustive match")}Je.isCustomPattern=vx;function iq(r){return(0,Se.isString)(r)&&r.length===1?r.charCodeAt(0):!1}Je.isShortPattern=iq;Je.LineTerminatorOptimizedTester={test:function(r){for(var e=r.length,t=this.lastIndex;t Token Type -`)+(" Root cause: "+e.errMsg+`. -`)+" For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR";if(e.issue===ir.LexerDefinitionErrorType.CUSTOM_LINE_BREAK)return`Warning: A Custom Token Pattern should specify the option. -`+(" The problem is in the <"+r.name+`> Token Type -`)+" For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK";throw Error("non exhaustive match")}Je.buildLineBreakIssueMessage=sq;function oq(r){var e=(0,Se.map)(r,function(t){return(0,Se.isString)(t)&&t.length>0?t.charCodeAt(0):t});return e}function Bx(r,e,t){r[e]===void 0?r[e]=[t]:r[e].push(t)}Je.minOptimizationVal=256;var Ny=[];function Sx(r){return r255?255+~~(r/255):r}}});var df=y(Nt=>{"use strict";Object.defineProperty(Nt,"__esModule",{value:!0});Nt.isTokenType=Nt.hasExtendingTokensTypesMapProperty=Nt.hasExtendingTokensTypesProperty=Nt.hasCategoriesProperty=Nt.hasShortKeyProperty=Nt.singleAssignCategoriesToksMap=Nt.assignCategoriesMapProp=Nt.assignCategoriesTokensProp=Nt.assignTokenDefaultProps=Nt.expandCategories=Nt.augmentTokenTypes=Nt.tokenIdxToClass=Nt.tokenShortNameIdx=Nt.tokenStructuredMatcherNoCategories=Nt.tokenStructuredMatcher=void 0;var ei=Gt();function Bye(r,e){var t=r.tokenTypeIdx;return t===e.tokenTypeIdx?!0:e.isParent===!0&&e.categoryMatchesMap[t]===!0}Nt.tokenStructuredMatcher=Bye;function bye(r,e){return r.tokenTypeIdx===e.tokenTypeIdx}Nt.tokenStructuredMatcherNoCategories=bye;Nt.tokenShortNameIdx=1;Nt.tokenIdxToClass={};function Qye(r){var e=aq(r);Aq(e),cq(e),lq(e),(0,ei.forEach)(e,function(t){t.isParent=t.categoryMatches.length>0})}Nt.augmentTokenTypes=Qye;function aq(r){for(var e=(0,ei.cloneArr)(r),t=r,i=!0;i;){t=(0,ei.compact)((0,ei.flatten)((0,ei.map)(t,function(s){return s.CATEGORIES})));var n=(0,ei.difference)(t,e);e=e.concat(n),(0,ei.isEmpty)(n)?i=!1:t=n}return e}Nt.expandCategories=aq;function Aq(r){(0,ei.forEach)(r,function(e){uq(e)||(Nt.tokenIdxToClass[Nt.tokenShortNameIdx]=e,e.tokenTypeIdx=Nt.tokenShortNameIdx++),xx(e)&&!(0,ei.isArray)(e.CATEGORIES)&&(e.CATEGORIES=[e.CATEGORIES]),xx(e)||(e.CATEGORIES=[]),gq(e)||(e.categoryMatches=[]),fq(e)||(e.categoryMatchesMap={})})}Nt.assignTokenDefaultProps=Aq;function lq(r){(0,ei.forEach)(r,function(e){e.categoryMatches=[],(0,ei.forEach)(e.categoryMatchesMap,function(t,i){e.categoryMatches.push(Nt.tokenIdxToClass[i].tokenTypeIdx)})})}Nt.assignCategoriesTokensProp=lq;function cq(r){(0,ei.forEach)(r,function(e){Px([],e)})}Nt.assignCategoriesMapProp=cq;function Px(r,e){(0,ei.forEach)(r,function(t){e.categoryMatchesMap[t.tokenTypeIdx]=!0}),(0,ei.forEach)(e.CATEGORIES,function(t){var i=r.concat(e);(0,ei.contains)(i,t)||Px(i,t)})}Nt.singleAssignCategoriesToksMap=Px;function uq(r){return(0,ei.has)(r,"tokenTypeIdx")}Nt.hasShortKeyProperty=uq;function xx(r){return(0,ei.has)(r,"CATEGORIES")}Nt.hasCategoriesProperty=xx;function gq(r){return(0,ei.has)(r,"categoryMatches")}Nt.hasExtendingTokensTypesProperty=gq;function fq(r){return(0,ei.has)(r,"categoryMatchesMap")}Nt.hasExtendingTokensTypesMapProperty=fq;function Sye(r){return(0,ei.has)(r,"tokenTypeIdx")}Nt.isTokenType=Sye});var Dx=y(Ty=>{"use strict";Object.defineProperty(Ty,"__esModule",{value:!0});Ty.defaultLexerErrorProvider=void 0;Ty.defaultLexerErrorProvider={buildUnableToPopLexerModeMessage:function(r){return"Unable to pop Lexer Mode after encountering Token ->"+r.image+"<- The Mode Stack is empty"},buildUnexpectedCharactersMessage:function(r,e,t,i,n){return"unexpected character: ->"+r.charAt(e)+"<- at offset: "+e+","+(" skipped "+t+" characters.")}}});var Jd=y(Rc=>{"use strict";Object.defineProperty(Rc,"__esModule",{value:!0});Rc.Lexer=Rc.LexerDefinitionErrorType=void 0;var Vs=wx(),nr=Gt(),vye=df(),xye=Dx(),Pye=ky(),Dye;(function(r){r[r.MISSING_PATTERN=0]="MISSING_PATTERN",r[r.INVALID_PATTERN=1]="INVALID_PATTERN",r[r.EOI_ANCHOR_FOUND=2]="EOI_ANCHOR_FOUND",r[r.UNSUPPORTED_FLAGS_FOUND=3]="UNSUPPORTED_FLAGS_FOUND",r[r.DUPLICATE_PATTERNS_FOUND=4]="DUPLICATE_PATTERNS_FOUND",r[r.INVALID_GROUP_TYPE_FOUND=5]="INVALID_GROUP_TYPE_FOUND",r[r.PUSH_MODE_DOES_NOT_EXIST=6]="PUSH_MODE_DOES_NOT_EXIST",r[r.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE=7]="MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE",r[r.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY=8]="MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY",r[r.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST=9]="MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST",r[r.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED=10]="LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED",r[r.SOI_ANCHOR_FOUND=11]="SOI_ANCHOR_FOUND",r[r.EMPTY_MATCH_PATTERN=12]="EMPTY_MATCH_PATTERN",r[r.NO_LINE_BREAKS_FLAGS=13]="NO_LINE_BREAKS_FLAGS",r[r.UNREACHABLE_PATTERN=14]="UNREACHABLE_PATTERN",r[r.IDENTIFY_TERMINATOR=15]="IDENTIFY_TERMINATOR",r[r.CUSTOM_LINE_BREAK=16]="CUSTOM_LINE_BREAK"})(Dye=Rc.LexerDefinitionErrorType||(Rc.LexerDefinitionErrorType={}));var Wd={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:[` -`,"\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:xye.defaultLexerErrorProvider,traceInitPerf:!1,skipValidations:!1};Object.freeze(Wd);var kye=function(){function r(e,t){var i=this;if(t===void 0&&(t=Wd),this.lexerDefinition=e,this.lexerDefinitionErrors=[],this.lexerDefinitionWarning=[],this.patternIdxToConfig={},this.charCodeToPatternIdxToConfig={},this.modes=[],this.emptyGroups={},this.config=void 0,this.trackStartLines=!0,this.trackEndLines=!0,this.hasCustom=!1,this.canModeBeOptimized={},typeof t=="boolean")throw Error(`The second argument to the Lexer constructor is now an ILexerConfig Object. -a boolean 2nd argument is no longer supported`);this.config=(0,nr.merge)(Wd,t);var n=this.config.traceInitPerf;n===!0?(this.traceInitMaxIdent=1/0,this.traceInitPerf=!0):typeof n=="number"&&(this.traceInitMaxIdent=n,this.traceInitPerf=!0),this.traceInitIndent=-1,this.TRACE_INIT("Lexer Constructor",function(){var s,o=!0;i.TRACE_INIT("Lexer Config handling",function(){if(i.config.lineTerminatorsPattern===Wd.lineTerminatorsPattern)i.config.lineTerminatorsPattern=Vs.LineTerminatorOptimizedTester;else if(i.config.lineTerminatorCharacters===Wd.lineTerminatorCharacters)throw Error(`Error: Missing property on the Lexer config. - For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS`);if(t.safeMode&&t.ensureOptimizations)throw Error('"safeMode" and "ensureOptimizations" flags are mutually exclusive.');i.trackStartLines=/full|onlyStart/i.test(i.config.positionTracking),i.trackEndLines=/full/i.test(i.config.positionTracking),(0,nr.isArray)(e)?(s={modes:{}},s.modes[Vs.DEFAULT_MODE]=(0,nr.cloneArr)(e),s[Vs.DEFAULT_MODE]=Vs.DEFAULT_MODE):(o=!1,s=(0,nr.cloneObj)(e))}),i.config.skipValidations===!1&&(i.TRACE_INIT("performRuntimeChecks",function(){i.lexerDefinitionErrors=i.lexerDefinitionErrors.concat((0,Vs.performRuntimeChecks)(s,i.trackStartLines,i.config.lineTerminatorCharacters))}),i.TRACE_INIT("performWarningRuntimeChecks",function(){i.lexerDefinitionWarning=i.lexerDefinitionWarning.concat((0,Vs.performWarningRuntimeChecks)(s,i.trackStartLines,i.config.lineTerminatorCharacters))})),s.modes=s.modes?s.modes:{},(0,nr.forEach)(s.modes,function(u,g){s.modes[g]=(0,nr.reject)(u,function(f){return(0,nr.isUndefined)(f)})});var a=(0,nr.keys)(s.modes);if((0,nr.forEach)(s.modes,function(u,g){i.TRACE_INIT("Mode: <"+g+"> processing",function(){if(i.modes.push(g),i.config.skipValidations===!1&&i.TRACE_INIT("validatePatterns",function(){i.lexerDefinitionErrors=i.lexerDefinitionErrors.concat((0,Vs.validatePatterns)(u,a))}),(0,nr.isEmpty)(i.lexerDefinitionErrors)){(0,vye.augmentTokenTypes)(u);var f;i.TRACE_INIT("analyzeTokenTypes",function(){f=(0,Vs.analyzeTokenTypes)(u,{lineTerminatorCharacters:i.config.lineTerminatorCharacters,positionTracking:t.positionTracking,ensureOptimizations:t.ensureOptimizations,safeMode:t.safeMode,tracer:i.TRACE_INIT.bind(i)})}),i.patternIdxToConfig[g]=f.patternIdxToConfig,i.charCodeToPatternIdxToConfig[g]=f.charCodeToPatternIdxToConfig,i.emptyGroups=(0,nr.merge)(i.emptyGroups,f.emptyGroups),i.hasCustom=f.hasCustom||i.hasCustom,i.canModeBeOptimized[g]=f.canBeOptimized}})}),i.defaultMode=s.defaultMode,!(0,nr.isEmpty)(i.lexerDefinitionErrors)&&!i.config.deferDefinitionErrorsHandling){var l=(0,nr.map)(i.lexerDefinitionErrors,function(u){return u.message}),c=l.join(`----------------------- -`);throw new Error(`Errors detected in definition of Lexer: -`+c)}(0,nr.forEach)(i.lexerDefinitionWarning,function(u){(0,nr.PRINT_WARNING)(u.message)}),i.TRACE_INIT("Choosing sub-methods implementations",function(){if(Vs.SUPPORT_STICKY?(i.chopInput=nr.IDENTITY,i.match=i.matchWithTest):(i.updateLastIndex=nr.NOOP,i.match=i.matchWithExec),o&&(i.handleModes=nr.NOOP),i.trackStartLines===!1&&(i.computeNewColumn=nr.IDENTITY),i.trackEndLines===!1&&(i.updateTokenEndLineColumnLocation=nr.NOOP),/full/i.test(i.config.positionTracking))i.createTokenInstance=i.createFullToken;else if(/onlyStart/i.test(i.config.positionTracking))i.createTokenInstance=i.createStartOnlyToken;else if(/onlyOffset/i.test(i.config.positionTracking))i.createTokenInstance=i.createOffsetOnlyToken;else throw Error('Invalid config option: "'+i.config.positionTracking+'"');i.hasCustom?(i.addToken=i.addTokenUsingPush,i.handlePayload=i.handlePayloadWithCustom):(i.addToken=i.addTokenUsingMemberAccess,i.handlePayload=i.handlePayloadNoCustom)}),i.TRACE_INIT("Failed Optimization Warnings",function(){var u=(0,nr.reduce)(i.canModeBeOptimized,function(g,f,h){return f===!1&&g.push(h),g},[]);if(t.ensureOptimizations&&!(0,nr.isEmpty)(u))throw Error("Lexer Modes: < "+u.join(", ")+` > cannot be optimized. - Disable the "ensureOptimizations" lexer config flag to silently ignore this and run the lexer in an un-optimized mode. - Or inspect the console log for details on how to resolve these issues.`)}),i.TRACE_INIT("clearRegExpParserCache",function(){(0,Pye.clearRegExpParserCache)()}),i.TRACE_INIT("toFastProperties",function(){(0,nr.toFastProperties)(i)})})}return r.prototype.tokenize=function(e,t){if(t===void 0&&(t=this.defaultMode),!(0,nr.isEmpty)(this.lexerDefinitionErrors)){var i=(0,nr.map)(this.lexerDefinitionErrors,function(o){return o.message}),n=i.join(`----------------------- -`);throw new Error(`Unable to Tokenize because Errors detected in definition of Lexer: -`+n)}var s=this.tokenizeInternal(e,t);return s},r.prototype.tokenizeInternal=function(e,t){var i=this,n,s,o,a,l,c,u,g,f,h,p,C,w,B,v,D,T=e,H=T.length,j=0,$=0,V=this.hasCustom?0:Math.floor(e.length/10),W=new Array(V),Z=[],A=this.trackStartLines?1:void 0,ae=this.trackStartLines?1:void 0,ge=(0,Vs.cloneEmptyGroups)(this.emptyGroups),_=this.trackStartLines,L=this.config.lineTerminatorsPattern,N=0,ue=[],we=[],Te=[],Pe=[];Object.freeze(Pe);var Le=void 0;function se(){return ue}function Ae(dr){var Bi=(0,Vs.charCodeToOptimizedIndex)(dr),_n=we[Bi];return _n===void 0?Pe:_n}var be=function(dr){if(Te.length===1&&dr.tokenType.PUSH_MODE===void 0){var Bi=i.config.errorMessageProvider.buildUnableToPopLexerModeMessage(dr);Z.push({offset:dr.startOffset,line:dr.startLine!==void 0?dr.startLine:void 0,column:dr.startColumn!==void 0?dr.startColumn:void 0,length:dr.image.length,message:Bi})}else{Te.pop();var _n=(0,nr.last)(Te);ue=i.patternIdxToConfig[_n],we=i.charCodeToPatternIdxToConfig[_n],N=ue.length;var pa=i.canModeBeOptimized[_n]&&i.config.safeMode===!1;we&&pa?Le=Ae:Le=se}};function fe(dr){Te.push(dr),we=this.charCodeToPatternIdxToConfig[dr],ue=this.patternIdxToConfig[dr],N=ue.length,N=ue.length;var Bi=this.canModeBeOptimized[dr]&&this.config.safeMode===!1;we&&Bi?Le=Ae:Le=se}fe.call(this,t);for(var le;jc.length){c=a,u=g,le=tt;break}}}break}}if(c!==null){if(f=c.length,h=le.group,h!==void 0&&(p=le.tokenTypeIdx,C=this.createTokenInstance(c,j,p,le.tokenType,A,ae,f),this.handlePayload(C,u),h===!1?$=this.addToken(W,$,C):ge[h].push(C)),e=this.chopInput(e,f),j=j+f,ae=this.computeNewColumn(ae,f),_===!0&&le.canLineTerminator===!0){var It=0,Ur=void 0,oi=void 0;L.lastIndex=0;do Ur=L.test(c),Ur===!0&&(oi=L.lastIndex-1,It++);while(Ur===!0);It!==0&&(A=A+It,ae=f-oi,this.updateTokenEndLineColumnLocation(C,h,oi,It,A,ae,f))}this.handleModes(le,be,fe,C)}else{for(var pi=j,pr=A,di=ae,ai=!1;!ai&&j <"+e+">");var n=(0,nr.timer)(t),s=n.time,o=n.value,a=s>10?console.warn:console.log;return this.traceInitIndent time: "+s+"ms"),this.traceInitIndent--,o}else return t()},r.SKIPPED="This marks a skipped Token pattern, this means each token identified by it willbe consumed and then thrown into oblivion, this can be used to for example to completely ignore whitespace.",r.NA=/NOT_APPLICABLE/,r}();Rc.Lexer=kye});var HA=y(Si=>{"use strict";Object.defineProperty(Si,"__esModule",{value:!0});Si.tokenMatcher=Si.createTokenInstance=Si.EOF=Si.createToken=Si.hasTokenLabel=Si.tokenName=Si.tokenLabel=void 0;var Xs=Gt(),Rye=Jd(),kx=df();function Fye(r){return wq(r)?r.LABEL:r.name}Si.tokenLabel=Fye;function Nye(r){return r.name}Si.tokenName=Nye;function wq(r){return(0,Xs.isString)(r.LABEL)&&r.LABEL!==""}Si.hasTokenLabel=wq;var Tye="parent",hq="categories",pq="label",dq="group",Cq="push_mode",mq="pop_mode",Eq="longer_alt",Iq="line_breaks",yq="start_chars_hint";function Bq(r){return Lye(r)}Si.createToken=Bq;function Lye(r){var e=r.pattern,t={};if(t.name=r.name,(0,Xs.isUndefined)(e)||(t.PATTERN=e),(0,Xs.has)(r,Tye))throw`The parent property is no longer supported. -See: https://github.com/chevrotain/chevrotain/issues/564#issuecomment-349062346 for details.`;return(0,Xs.has)(r,hq)&&(t.CATEGORIES=r[hq]),(0,kx.augmentTokenTypes)([t]),(0,Xs.has)(r,pq)&&(t.LABEL=r[pq]),(0,Xs.has)(r,dq)&&(t.GROUP=r[dq]),(0,Xs.has)(r,mq)&&(t.POP_MODE=r[mq]),(0,Xs.has)(r,Cq)&&(t.PUSH_MODE=r[Cq]),(0,Xs.has)(r,Eq)&&(t.LONGER_ALT=r[Eq]),(0,Xs.has)(r,Iq)&&(t.LINE_BREAKS=r[Iq]),(0,Xs.has)(r,yq)&&(t.START_CHARS_HINT=r[yq]),t}Si.EOF=Bq({name:"EOF",pattern:Rye.Lexer.NA});(0,kx.augmentTokenTypes)([Si.EOF]);function Oye(r,e,t,i,n,s,o,a){return{image:e,startOffset:t,endOffset:i,startLine:n,endLine:s,startColumn:o,endColumn:a,tokenTypeIdx:r.tokenTypeIdx,tokenType:r}}Si.createTokenInstance=Oye;function Mye(r,e){return(0,kx.tokenStructuredMatcher)(r,e)}Si.tokenMatcher=Mye});var Cn=y(Wt=>{"use strict";var ka=Wt&&Wt.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();Object.defineProperty(Wt,"__esModule",{value:!0});Wt.serializeProduction=Wt.serializeGrammar=Wt.Terminal=Wt.Alternation=Wt.RepetitionWithSeparator=Wt.Repetition=Wt.RepetitionMandatoryWithSeparator=Wt.RepetitionMandatory=Wt.Option=Wt.Alternative=Wt.Rule=Wt.NonTerminal=Wt.AbstractProduction=void 0;var lr=Gt(),Uye=HA(),ko=function(){function r(e){this._definition=e}return Object.defineProperty(r.prototype,"definition",{get:function(){return this._definition},set:function(e){this._definition=e},enumerable:!1,configurable:!0}),r.prototype.accept=function(e){e.visit(this),(0,lr.forEach)(this.definition,function(t){t.accept(e)})},r}();Wt.AbstractProduction=ko;var bq=function(r){ka(e,r);function e(t){var i=r.call(this,[])||this;return i.idx=1,(0,lr.assign)(i,(0,lr.pick)(t,function(n){return n!==void 0})),i}return Object.defineProperty(e.prototype,"definition",{get:function(){return this.referencedRule!==void 0?this.referencedRule.definition:[]},set:function(t){},enumerable:!1,configurable:!0}),e.prototype.accept=function(t){t.visit(this)},e}(ko);Wt.NonTerminal=bq;var Qq=function(r){ka(e,r);function e(t){var i=r.call(this,t.definition)||this;return i.orgText="",(0,lr.assign)(i,(0,lr.pick)(t,function(n){return n!==void 0})),i}return e}(ko);Wt.Rule=Qq;var Sq=function(r){ka(e,r);function e(t){var i=r.call(this,t.definition)||this;return i.ignoreAmbiguities=!1,(0,lr.assign)(i,(0,lr.pick)(t,function(n){return n!==void 0})),i}return e}(ko);Wt.Alternative=Sq;var vq=function(r){ka(e,r);function e(t){var i=r.call(this,t.definition)||this;return i.idx=1,(0,lr.assign)(i,(0,lr.pick)(t,function(n){return n!==void 0})),i}return e}(ko);Wt.Option=vq;var xq=function(r){ka(e,r);function e(t){var i=r.call(this,t.definition)||this;return i.idx=1,(0,lr.assign)(i,(0,lr.pick)(t,function(n){return n!==void 0})),i}return e}(ko);Wt.RepetitionMandatory=xq;var Pq=function(r){ka(e,r);function e(t){var i=r.call(this,t.definition)||this;return i.idx=1,(0,lr.assign)(i,(0,lr.pick)(t,function(n){return n!==void 0})),i}return e}(ko);Wt.RepetitionMandatoryWithSeparator=Pq;var Dq=function(r){ka(e,r);function e(t){var i=r.call(this,t.definition)||this;return i.idx=1,(0,lr.assign)(i,(0,lr.pick)(t,function(n){return n!==void 0})),i}return e}(ko);Wt.Repetition=Dq;var kq=function(r){ka(e,r);function e(t){var i=r.call(this,t.definition)||this;return i.idx=1,(0,lr.assign)(i,(0,lr.pick)(t,function(n){return n!==void 0})),i}return e}(ko);Wt.RepetitionWithSeparator=kq;var Rq=function(r){ka(e,r);function e(t){var i=r.call(this,t.definition)||this;return i.idx=1,i.ignoreAmbiguities=!1,i.hasPredicates=!1,(0,lr.assign)(i,(0,lr.pick)(t,function(n){return n!==void 0})),i}return Object.defineProperty(e.prototype,"definition",{get:function(){return this._definition},set:function(t){this._definition=t},enumerable:!1,configurable:!0}),e}(ko);Wt.Alternation=Rq;var Ly=function(){function r(e){this.idx=1,(0,lr.assign)(this,(0,lr.pick)(e,function(t){return t!==void 0}))}return r.prototype.accept=function(e){e.visit(this)},r}();Wt.Terminal=Ly;function Kye(r){return(0,lr.map)(r,zd)}Wt.serializeGrammar=Kye;function zd(r){function e(s){return(0,lr.map)(s,zd)}if(r instanceof bq){var t={type:"NonTerminal",name:r.nonTerminalName,idx:r.idx};return(0,lr.isString)(r.label)&&(t.label=r.label),t}else{if(r instanceof Sq)return{type:"Alternative",definition:e(r.definition)};if(r instanceof vq)return{type:"Option",idx:r.idx,definition:e(r.definition)};if(r instanceof xq)return{type:"RepetitionMandatory",idx:r.idx,definition:e(r.definition)};if(r instanceof Pq)return{type:"RepetitionMandatoryWithSeparator",idx:r.idx,separator:zd(new Ly({terminalType:r.separator})),definition:e(r.definition)};if(r instanceof kq)return{type:"RepetitionWithSeparator",idx:r.idx,separator:zd(new Ly({terminalType:r.separator})),definition:e(r.definition)};if(r instanceof Dq)return{type:"Repetition",idx:r.idx,definition:e(r.definition)};if(r instanceof Rq)return{type:"Alternation",idx:r.idx,definition:e(r.definition)};if(r instanceof Ly){var i={type:"Terminal",name:r.terminalType.name,label:(0,Uye.tokenLabel)(r.terminalType),idx:r.idx};(0,lr.isString)(r.label)&&(i.terminalLabel=r.label);var n=r.terminalType.PATTERN;return r.terminalType.PATTERN&&(i.pattern=(0,lr.isRegExp)(n)?n.source:n),i}else{if(r instanceof Qq)return{type:"Rule",name:r.name,orgText:r.orgText,definition:e(r.definition)};throw Error("non exhaustive match")}}}Wt.serializeProduction=zd});var My=y(Oy=>{"use strict";Object.defineProperty(Oy,"__esModule",{value:!0});Oy.RestWalker=void 0;var Rx=Gt(),mn=Cn(),Hye=function(){function r(){}return r.prototype.walk=function(e,t){var i=this;t===void 0&&(t=[]),(0,Rx.forEach)(e.definition,function(n,s){var o=(0,Rx.drop)(e.definition,s+1);if(n instanceof mn.NonTerminal)i.walkProdRef(n,o,t);else if(n instanceof mn.Terminal)i.walkTerminal(n,o,t);else if(n instanceof mn.Alternative)i.walkFlat(n,o,t);else if(n instanceof mn.Option)i.walkOption(n,o,t);else if(n instanceof mn.RepetitionMandatory)i.walkAtLeastOne(n,o,t);else if(n instanceof mn.RepetitionMandatoryWithSeparator)i.walkAtLeastOneSep(n,o,t);else if(n instanceof mn.RepetitionWithSeparator)i.walkManySep(n,o,t);else if(n instanceof mn.Repetition)i.walkMany(n,o,t);else if(n instanceof mn.Alternation)i.walkOr(n,o,t);else throw Error("non exhaustive match")})},r.prototype.walkTerminal=function(e,t,i){},r.prototype.walkProdRef=function(e,t,i){},r.prototype.walkFlat=function(e,t,i){var n=t.concat(i);this.walk(e,n)},r.prototype.walkOption=function(e,t,i){var n=t.concat(i);this.walk(e,n)},r.prototype.walkAtLeastOne=function(e,t,i){var n=[new mn.Option({definition:e.definition})].concat(t,i);this.walk(e,n)},r.prototype.walkAtLeastOneSep=function(e,t,i){var n=Fq(e,t,i);this.walk(e,n)},r.prototype.walkMany=function(e,t,i){var n=[new mn.Option({definition:e.definition})].concat(t,i);this.walk(e,n)},r.prototype.walkManySep=function(e,t,i){var n=Fq(e,t,i);this.walk(e,n)},r.prototype.walkOr=function(e,t,i){var n=this,s=t.concat(i);(0,Rx.forEach)(e.definition,function(o){var a=new mn.Alternative({definition:[o]});n.walk(a,s)})},r}();Oy.RestWalker=Hye;function Fq(r,e,t){var i=[new mn.Option({definition:[new mn.Terminal({terminalType:r.separator})].concat(r.definition)})],n=i.concat(e,t);return n}});var Cf=y(Uy=>{"use strict";Object.defineProperty(Uy,"__esModule",{value:!0});Uy.GAstVisitor=void 0;var Ro=Cn(),Gye=function(){function r(){}return r.prototype.visit=function(e){var t=e;switch(t.constructor){case Ro.NonTerminal:return this.visitNonTerminal(t);case Ro.Alternative:return this.visitAlternative(t);case Ro.Option:return this.visitOption(t);case Ro.RepetitionMandatory:return this.visitRepetitionMandatory(t);case Ro.RepetitionMandatoryWithSeparator:return this.visitRepetitionMandatoryWithSeparator(t);case Ro.RepetitionWithSeparator:return this.visitRepetitionWithSeparator(t);case Ro.Repetition:return this.visitRepetition(t);case Ro.Alternation:return this.visitAlternation(t);case Ro.Terminal:return this.visitTerminal(t);case Ro.Rule:return this.visitRule(t);default:throw Error("non exhaustive match")}},r.prototype.visitNonTerminal=function(e){},r.prototype.visitAlternative=function(e){},r.prototype.visitOption=function(e){},r.prototype.visitRepetition=function(e){},r.prototype.visitRepetitionMandatory=function(e){},r.prototype.visitRepetitionMandatoryWithSeparator=function(e){},r.prototype.visitRepetitionWithSeparator=function(e){},r.prototype.visitAlternation=function(e){},r.prototype.visitTerminal=function(e){},r.prototype.visitRule=function(e){},r}();Uy.GAstVisitor=Gye});var Xd=y(Ui=>{"use strict";var Yye=Ui&&Ui.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();Object.defineProperty(Ui,"__esModule",{value:!0});Ui.collectMethods=Ui.DslMethodsCollectorVisitor=Ui.getProductionDslName=Ui.isBranchingProd=Ui.isOptionalProd=Ui.isSequenceProd=void 0;var Vd=Gt(),Qr=Cn(),jye=Cf();function qye(r){return r instanceof Qr.Alternative||r instanceof Qr.Option||r instanceof Qr.Repetition||r instanceof Qr.RepetitionMandatory||r instanceof Qr.RepetitionMandatoryWithSeparator||r instanceof Qr.RepetitionWithSeparator||r instanceof Qr.Terminal||r instanceof Qr.Rule}Ui.isSequenceProd=qye;function Fx(r,e){e===void 0&&(e=[]);var t=r instanceof Qr.Option||r instanceof Qr.Repetition||r instanceof Qr.RepetitionWithSeparator;return t?!0:r instanceof Qr.Alternation?(0,Vd.some)(r.definition,function(i){return Fx(i,e)}):r instanceof Qr.NonTerminal&&(0,Vd.contains)(e,r)?!1:r instanceof Qr.AbstractProduction?(r instanceof Qr.NonTerminal&&e.push(r),(0,Vd.every)(r.definition,function(i){return Fx(i,e)})):!1}Ui.isOptionalProd=Fx;function Jye(r){return r instanceof Qr.Alternation}Ui.isBranchingProd=Jye;function Wye(r){if(r instanceof Qr.NonTerminal)return"SUBRULE";if(r instanceof Qr.Option)return"OPTION";if(r instanceof Qr.Alternation)return"OR";if(r instanceof Qr.RepetitionMandatory)return"AT_LEAST_ONE";if(r instanceof Qr.RepetitionMandatoryWithSeparator)return"AT_LEAST_ONE_SEP";if(r instanceof Qr.RepetitionWithSeparator)return"MANY_SEP";if(r instanceof Qr.Repetition)return"MANY";if(r instanceof Qr.Terminal)return"CONSUME";throw Error("non exhaustive match")}Ui.getProductionDslName=Wye;var Nq=function(r){Yye(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.separator="-",t.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]},t}return e.prototype.reset=function(){this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}},e.prototype.visitTerminal=function(t){var i=t.terminalType.name+this.separator+"Terminal";(0,Vd.has)(this.dslMethods,i)||(this.dslMethods[i]=[]),this.dslMethods[i].push(t)},e.prototype.visitNonTerminal=function(t){var i=t.nonTerminalName+this.separator+"Terminal";(0,Vd.has)(this.dslMethods,i)||(this.dslMethods[i]=[]),this.dslMethods[i].push(t)},e.prototype.visitOption=function(t){this.dslMethods.option.push(t)},e.prototype.visitRepetitionWithSeparator=function(t){this.dslMethods.repetitionWithSeparator.push(t)},e.prototype.visitRepetitionMandatory=function(t){this.dslMethods.repetitionMandatory.push(t)},e.prototype.visitRepetitionMandatoryWithSeparator=function(t){this.dslMethods.repetitionMandatoryWithSeparator.push(t)},e.prototype.visitRepetition=function(t){this.dslMethods.repetition.push(t)},e.prototype.visitAlternation=function(t){this.dslMethods.alternation.push(t)},e}(jye.GAstVisitor);Ui.DslMethodsCollectorVisitor=Nq;var Ky=new Nq;function zye(r){Ky.reset(),r.accept(Ky);var e=Ky.dslMethods;return Ky.reset(),e}Ui.collectMethods=zye});var Tx=y(Fo=>{"use strict";Object.defineProperty(Fo,"__esModule",{value:!0});Fo.firstForTerminal=Fo.firstForBranching=Fo.firstForSequence=Fo.first=void 0;var Hy=Gt(),Tq=Cn(),Nx=Xd();function Gy(r){if(r instanceof Tq.NonTerminal)return Gy(r.referencedRule);if(r instanceof Tq.Terminal)return Mq(r);if((0,Nx.isSequenceProd)(r))return Lq(r);if((0,Nx.isBranchingProd)(r))return Oq(r);throw Error("non exhaustive match")}Fo.first=Gy;function Lq(r){for(var e=[],t=r.definition,i=0,n=t.length>i,s,o=!0;n&&o;)s=t[i],o=(0,Nx.isOptionalProd)(s),e=e.concat(Gy(s)),i=i+1,n=t.length>i;return(0,Hy.uniq)(e)}Fo.firstForSequence=Lq;function Oq(r){var e=(0,Hy.map)(r.definition,function(t){return Gy(t)});return(0,Hy.uniq)((0,Hy.flatten)(e))}Fo.firstForBranching=Oq;function Mq(r){return[r.terminalType]}Fo.firstForTerminal=Mq});var Lx=y(Yy=>{"use strict";Object.defineProperty(Yy,"__esModule",{value:!0});Yy.IN=void 0;Yy.IN="_~IN~_"});var Yq=y(ls=>{"use strict";var Vye=ls&&ls.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();Object.defineProperty(ls,"__esModule",{value:!0});ls.buildInProdFollowPrefix=ls.buildBetweenProdsFollowPrefix=ls.computeAllProdsFollows=ls.ResyncFollowsWalker=void 0;var Xye=My(),_ye=Tx(),Uq=Gt(),Kq=Lx(),Zye=Cn(),Hq=function(r){Vye(e,r);function e(t){var i=r.call(this)||this;return i.topProd=t,i.follows={},i}return e.prototype.startWalking=function(){return this.walk(this.topProd),this.follows},e.prototype.walkTerminal=function(t,i,n){},e.prototype.walkProdRef=function(t,i,n){var s=Gq(t.referencedRule,t.idx)+this.topProd.name,o=i.concat(n),a=new Zye.Alternative({definition:o}),l=(0,_ye.first)(a);this.follows[s]=l},e}(Xye.RestWalker);ls.ResyncFollowsWalker=Hq;function $ye(r){var e={};return(0,Uq.forEach)(r,function(t){var i=new Hq(t).startWalking();(0,Uq.assign)(e,i)}),e}ls.computeAllProdsFollows=$ye;function Gq(r,e){return r.name+e+Kq.IN}ls.buildBetweenProdsFollowPrefix=Gq;function ewe(r){var e=r.terminalType.name;return e+r.idx+Kq.IN}ls.buildInProdFollowPrefix=ewe});var _d=y(Ra=>{"use strict";Object.defineProperty(Ra,"__esModule",{value:!0});Ra.defaultGrammarValidatorErrorProvider=Ra.defaultGrammarResolverErrorProvider=Ra.defaultParserErrorProvider=void 0;var mf=HA(),twe=Gt(),_s=Gt(),Ox=Cn(),jq=Xd();Ra.defaultParserErrorProvider={buildMismatchTokenMessage:function(r){var e=r.expected,t=r.actual,i=r.previous,n=r.ruleName,s=(0,mf.hasTokenLabel)(e),o=s?"--> "+(0,mf.tokenLabel)(e)+" <--":"token of type --> "+e.name+" <--",a="Expecting "+o+" but found --> '"+t.image+"' <--";return a},buildNotAllInputParsedMessage:function(r){var e=r.firstRedundant,t=r.ruleName;return"Redundant input, expecting EOF but found: "+e.image},buildNoViableAltMessage:function(r){var e=r.expectedPathsPerAlt,t=r.actual,i=r.previous,n=r.customUserDescription,s=r.ruleName,o="Expecting: ",a=(0,_s.first)(t).image,l=` -but found: '`+a+"'";if(n)return o+n+l;var c=(0,_s.reduce)(e,function(h,p){return h.concat(p)},[]),u=(0,_s.map)(c,function(h){return"["+(0,_s.map)(h,function(p){return(0,mf.tokenLabel)(p)}).join(", ")+"]"}),g=(0,_s.map)(u,function(h,p){return" "+(p+1)+". "+h}),f=`one of these possible Token sequences: -`+g.join(` -`);return o+f+l},buildEarlyExitMessage:function(r){var e=r.expectedIterationPaths,t=r.actual,i=r.customUserDescription,n=r.ruleName,s="Expecting: ",o=(0,_s.first)(t).image,a=` -but found: '`+o+"'";if(i)return s+i+a;var l=(0,_s.map)(e,function(u){return"["+(0,_s.map)(u,function(g){return(0,mf.tokenLabel)(g)}).join(",")+"]"}),c=`expecting at least one iteration which starts with one of these possible Token sequences:: - `+("<"+l.join(" ,")+">");return s+c+a}};Object.freeze(Ra.defaultParserErrorProvider);Ra.defaultGrammarResolverErrorProvider={buildRuleNotFoundError:function(r,e){var t="Invalid grammar, reference to a rule which is not defined: ->"+e.nonTerminalName+`<- -inside top level rule: ->`+r.name+"<-";return t}};Ra.defaultGrammarValidatorErrorProvider={buildDuplicateFoundError:function(r,e){function t(u){return u instanceof Ox.Terminal?u.terminalType.name:u instanceof Ox.NonTerminal?u.nonTerminalName:""}var i=r.name,n=(0,_s.first)(e),s=n.idx,o=(0,jq.getProductionDslName)(n),a=t(n),l=s>0,c="->"+o+(l?s:"")+"<- "+(a?"with argument: ->"+a+"<-":"")+` - appears more than once (`+e.length+" times) in the top level rule: ->"+i+`<-. - For further details see: https://chevrotain.io/docs/FAQ.html#NUMERICAL_SUFFIXES - `;return c=c.replace(/[ \t]+/g," "),c=c.replace(/\s\s+/g,` -`),c},buildNamespaceConflictError:function(r){var e=`Namespace conflict found in grammar. -`+("The grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: <"+r.name+`>. -`)+`To resolve this make sure each Terminal and Non-Terminal names are unique -This is easy to accomplish by using the convention that Terminal names start with an uppercase letter -and Non-Terminal names start with a lower case letter.`;return e},buildAlternationPrefixAmbiguityError:function(r){var e=(0,_s.map)(r.prefixPath,function(n){return(0,mf.tokenLabel)(n)}).join(", "),t=r.alternation.idx===0?"":r.alternation.idx,i="Ambiguous alternatives: <"+r.ambiguityIndices.join(" ,")+`> due to common lookahead prefix -`+("in inside <"+r.topLevelRule.name+`> Rule, -`)+("<"+e+`> may appears as a prefix path in all these alternatives. -`)+`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#COMMON_PREFIX -For Further details.`;return i},buildAlternationAmbiguityError:function(r){var e=(0,_s.map)(r.prefixPath,function(n){return(0,mf.tokenLabel)(n)}).join(", "),t=r.alternation.idx===0?"":r.alternation.idx,i="Ambiguous Alternatives Detected: <"+r.ambiguityIndices.join(" ,")+"> in "+(" inside <"+r.topLevelRule.name+`> Rule, -`)+("<"+e+`> may appears as a prefix path in all these alternatives. -`);return i=i+`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES -For Further details.`,i},buildEmptyRepetitionError:function(r){var e=(0,jq.getProductionDslName)(r.repetition);r.repetition.idx!==0&&(e+=r.repetition.idx);var t="The repetition <"+e+"> within Rule <"+r.topLevelRule.name+`> can never consume any tokens. -This could lead to an infinite loop.`;return t},buildTokenNameError:function(r){return"deprecated"},buildEmptyAlternationError:function(r){var e="Ambiguous empty alternative: <"+(r.emptyChoiceIdx+1)+">"+(" in inside <"+r.topLevelRule.name+`> Rule. -`)+"Only the last alternative may be an empty alternative.";return e},buildTooManyAlternativesError:function(r){var e=`An Alternation cannot have more than 256 alternatives: -`+(" inside <"+r.topLevelRule.name+`> Rule. - has `+(r.alternation.definition.length+1)+" alternatives.");return e},buildLeftRecursionError:function(r){var e=r.topLevelRule.name,t=twe.map(r.leftRecursionPath,function(s){return s.name}),i=e+" --> "+t.concat([e]).join(" --> "),n=`Left Recursion found in grammar. -`+("rule: <"+e+`> can be invoked from itself (directly or indirectly) -`)+(`without consuming any Tokens. The grammar path that causes this is: - `+i+` -`)+` To fix this refactor your grammar to remove the left recursion. -see: https://en.wikipedia.org/wiki/LL_parser#Left_Factoring.`;return n},buildInvalidRuleNameError:function(r){return"deprecated"},buildDuplicateRuleNameError:function(r){var e;r.topLevelRule instanceof Ox.Rule?e=r.topLevelRule.name:e=r.topLevelRule;var t="Duplicate definition, rule: ->"+e+"<- is already defined in the grammar: ->"+r.grammarName+"<-";return t}}});var Wq=y(GA=>{"use strict";var rwe=GA&&GA.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();Object.defineProperty(GA,"__esModule",{value:!0});GA.GastRefResolverVisitor=GA.resolveGrammar=void 0;var iwe=Hn(),qq=Gt(),nwe=Cf();function swe(r,e){var t=new Jq(r,e);return t.resolveRefs(),t.errors}GA.resolveGrammar=swe;var Jq=function(r){rwe(e,r);function e(t,i){var n=r.call(this)||this;return n.nameToTopRule=t,n.errMsgProvider=i,n.errors=[],n}return e.prototype.resolveRefs=function(){var t=this;(0,qq.forEach)((0,qq.values)(this.nameToTopRule),function(i){t.currTopLevel=i,i.accept(t)})},e.prototype.visitNonTerminal=function(t){var i=this.nameToTopRule[t.nonTerminalName];if(i)t.referencedRule=i;else{var n=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,t);this.errors.push({message:n,type:iwe.ParserDefinitionErrorType.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:t.nonTerminalName})}},e}(nwe.GAstVisitor);GA.GastRefResolverVisitor=Jq});var $d=y(Lr=>{"use strict";var Fc=Lr&&Lr.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();Object.defineProperty(Lr,"__esModule",{value:!0});Lr.nextPossibleTokensAfter=Lr.possiblePathsFrom=Lr.NextTerminalAfterAtLeastOneSepWalker=Lr.NextTerminalAfterAtLeastOneWalker=Lr.NextTerminalAfterManySepWalker=Lr.NextTerminalAfterManyWalker=Lr.AbstractNextTerminalAfterProductionWalker=Lr.NextAfterTokenWalker=Lr.AbstractNextPossibleTokensWalker=void 0;var zq=My(),Ut=Gt(),owe=Tx(),Dt=Cn(),Vq=function(r){Fc(e,r);function e(t,i){var n=r.call(this)||this;return n.topProd=t,n.path=i,n.possibleTokTypes=[],n.nextProductionName="",n.nextProductionOccurrence=0,n.found=!1,n.isAtEndOfPath=!1,n}return e.prototype.startWalking=function(){if(this.found=!1,this.path.ruleStack[0]!==this.topProd.name)throw Error("The path does not start with the walker's top Rule!");return this.ruleStack=(0,Ut.cloneArr)(this.path.ruleStack).reverse(),this.occurrenceStack=(0,Ut.cloneArr)(this.path.occurrenceStack).reverse(),this.ruleStack.pop(),this.occurrenceStack.pop(),this.updateExpectedNext(),this.walk(this.topProd),this.possibleTokTypes},e.prototype.walk=function(t,i){i===void 0&&(i=[]),this.found||r.prototype.walk.call(this,t,i)},e.prototype.walkProdRef=function(t,i,n){if(t.referencedRule.name===this.nextProductionName&&t.idx===this.nextProductionOccurrence){var s=i.concat(n);this.updateExpectedNext(),this.walk(t.referencedRule,s)}},e.prototype.updateExpectedNext=function(){(0,Ut.isEmpty)(this.ruleStack)?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())},e}(zq.RestWalker);Lr.AbstractNextPossibleTokensWalker=Vq;var awe=function(r){Fc(e,r);function e(t,i){var n=r.call(this,t,i)||this;return n.path=i,n.nextTerminalName="",n.nextTerminalOccurrence=0,n.nextTerminalName=n.path.lastTok.name,n.nextTerminalOccurrence=n.path.lastTokOccurrence,n}return e.prototype.walkTerminal=function(t,i,n){if(this.isAtEndOfPath&&t.terminalType.name===this.nextTerminalName&&t.idx===this.nextTerminalOccurrence&&!this.found){var s=i.concat(n),o=new Dt.Alternative({definition:s});this.possibleTokTypes=(0,owe.first)(o),this.found=!0}},e}(Vq);Lr.NextAfterTokenWalker=awe;var Zd=function(r){Fc(e,r);function e(t,i){var n=r.call(this)||this;return n.topRule=t,n.occurrence=i,n.result={token:void 0,occurrence:void 0,isEndOfRule:void 0},n}return e.prototype.startWalking=function(){return this.walk(this.topRule),this.result},e}(zq.RestWalker);Lr.AbstractNextTerminalAfterProductionWalker=Zd;var Awe=function(r){Fc(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.walkMany=function(t,i,n){if(t.idx===this.occurrence){var s=(0,Ut.first)(i.concat(n));this.result.isEndOfRule=s===void 0,s instanceof Dt.Terminal&&(this.result.token=s.terminalType,this.result.occurrence=s.idx)}else r.prototype.walkMany.call(this,t,i,n)},e}(Zd);Lr.NextTerminalAfterManyWalker=Awe;var lwe=function(r){Fc(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.walkManySep=function(t,i,n){if(t.idx===this.occurrence){var s=(0,Ut.first)(i.concat(n));this.result.isEndOfRule=s===void 0,s instanceof Dt.Terminal&&(this.result.token=s.terminalType,this.result.occurrence=s.idx)}else r.prototype.walkManySep.call(this,t,i,n)},e}(Zd);Lr.NextTerminalAfterManySepWalker=lwe;var cwe=function(r){Fc(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.walkAtLeastOne=function(t,i,n){if(t.idx===this.occurrence){var s=(0,Ut.first)(i.concat(n));this.result.isEndOfRule=s===void 0,s instanceof Dt.Terminal&&(this.result.token=s.terminalType,this.result.occurrence=s.idx)}else r.prototype.walkAtLeastOne.call(this,t,i,n)},e}(Zd);Lr.NextTerminalAfterAtLeastOneWalker=cwe;var uwe=function(r){Fc(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.walkAtLeastOneSep=function(t,i,n){if(t.idx===this.occurrence){var s=(0,Ut.first)(i.concat(n));this.result.isEndOfRule=s===void 0,s instanceof Dt.Terminal&&(this.result.token=s.terminalType,this.result.occurrence=s.idx)}else r.prototype.walkAtLeastOneSep.call(this,t,i,n)},e}(Zd);Lr.NextTerminalAfterAtLeastOneSepWalker=uwe;function Xq(r,e,t){t===void 0&&(t=[]),t=(0,Ut.cloneArr)(t);var i=[],n=0;function s(c){return c.concat((0,Ut.drop)(r,n+1))}function o(c){var u=Xq(s(c),e,t);return i.concat(u)}for(;t.length=0;ge--){var _=B.definition[ge],L={idx:p,def:_.definition.concat((0,Ut.drop)(h)),ruleStack:C,occurrenceStack:w};g.push(L),g.push(o)}else if(B instanceof Dt.Alternative)g.push({idx:p,def:B.definition.concat((0,Ut.drop)(h)),ruleStack:C,occurrenceStack:w});else if(B instanceof Dt.Rule)g.push(fwe(B,p,C,w));else throw Error("non exhaustive match")}}return u}Lr.nextPossibleTokensAfter=gwe;function fwe(r,e,t,i){var n=(0,Ut.cloneArr)(t);n.push(r.name);var s=(0,Ut.cloneArr)(i);return s.push(1),{idx:e,def:r.definition,ruleStack:n,occurrenceStack:s}}});var eC=y(_t=>{"use strict";var $q=_t&&_t.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();Object.defineProperty(_t,"__esModule",{value:!0});_t.areTokenCategoriesNotUsed=_t.isStrictPrefixOfPath=_t.containsPath=_t.getLookaheadPathsForOptionalProd=_t.getLookaheadPathsForOr=_t.lookAheadSequenceFromAlternatives=_t.buildSingleAlternativeLookaheadFunction=_t.buildAlternativesLookAheadFunc=_t.buildLookaheadFuncForOptionalProd=_t.buildLookaheadFuncForOr=_t.getProdType=_t.PROD_TYPE=void 0;var sr=Gt(),_q=$d(),hwe=My(),jy=df(),YA=Cn(),pwe=Cf(),li;(function(r){r[r.OPTION=0]="OPTION",r[r.REPETITION=1]="REPETITION",r[r.REPETITION_MANDATORY=2]="REPETITION_MANDATORY",r[r.REPETITION_MANDATORY_WITH_SEPARATOR=3]="REPETITION_MANDATORY_WITH_SEPARATOR",r[r.REPETITION_WITH_SEPARATOR=4]="REPETITION_WITH_SEPARATOR",r[r.ALTERNATION=5]="ALTERNATION"})(li=_t.PROD_TYPE||(_t.PROD_TYPE={}));function dwe(r){if(r instanceof YA.Option)return li.OPTION;if(r instanceof YA.Repetition)return li.REPETITION;if(r instanceof YA.RepetitionMandatory)return li.REPETITION_MANDATORY;if(r instanceof YA.RepetitionMandatoryWithSeparator)return li.REPETITION_MANDATORY_WITH_SEPARATOR;if(r instanceof YA.RepetitionWithSeparator)return li.REPETITION_WITH_SEPARATOR;if(r instanceof YA.Alternation)return li.ALTERNATION;throw Error("non exhaustive match")}_t.getProdType=dwe;function Cwe(r,e,t,i,n,s){var o=tJ(r,e,t),a=Kx(o)?jy.tokenStructuredMatcherNoCategories:jy.tokenStructuredMatcher;return s(o,i,a,n)}_t.buildLookaheadFuncForOr=Cwe;function mwe(r,e,t,i,n,s){var o=rJ(r,e,n,t),a=Kx(o)?jy.tokenStructuredMatcherNoCategories:jy.tokenStructuredMatcher;return s(o[0],a,i)}_t.buildLookaheadFuncForOptionalProd=mwe;function Ewe(r,e,t,i){var n=r.length,s=(0,sr.every)(r,function(l){return(0,sr.every)(l,function(c){return c.length===1})});if(e)return function(l){for(var c=(0,sr.map)(l,function(D){return D.GATE}),u=0;u{"use strict";var Hx=zt&&zt.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();Object.defineProperty(zt,"__esModule",{value:!0});zt.checkPrefixAlternativesAmbiguities=zt.validateSomeNonEmptyLookaheadPath=zt.validateTooManyAlts=zt.RepetionCollector=zt.validateAmbiguousAlternationAlternatives=zt.validateEmptyOrAlternative=zt.getFirstNoneTerminal=zt.validateNoLeftRecursion=zt.validateRuleIsOverridden=zt.validateRuleDoesNotAlreadyExist=zt.OccurrenceValidationCollector=zt.identifyProductionForDuplicates=zt.validateGrammar=void 0;var er=Gt(),Sr=Gt(),No=Hn(),Gx=Xd(),Ef=eC(),bwe=$d(),Zs=Cn(),Yx=Cf();function Qwe(r,e,t,i,n){var s=er.map(r,function(h){return Swe(h,i)}),o=er.map(r,function(h){return jx(h,h,i)}),a=[],l=[],c=[];(0,Sr.every)(o,Sr.isEmpty)&&(a=(0,Sr.map)(r,function(h){return AJ(h,i)}),l=(0,Sr.map)(r,function(h){return lJ(h,e,i)}),c=gJ(r,e,i));var u=Pwe(r,t,i),g=(0,Sr.map)(r,function(h){return uJ(h,i)}),f=(0,Sr.map)(r,function(h){return aJ(h,r,n,i)});return er.flatten(s.concat(c,o,a,l,u,g,f))}zt.validateGrammar=Qwe;function Swe(r,e){var t=new oJ;r.accept(t);var i=t.allProductions,n=er.groupBy(i,nJ),s=er.pick(n,function(a){return a.length>1}),o=er.map(er.values(s),function(a){var l=er.first(a),c=e.buildDuplicateFoundError(r,a),u=(0,Gx.getProductionDslName)(l),g={message:c,type:No.ParserDefinitionErrorType.DUPLICATE_PRODUCTIONS,ruleName:r.name,dslName:u,occurrence:l.idx},f=sJ(l);return f&&(g.parameter=f),g});return o}function nJ(r){return(0,Gx.getProductionDslName)(r)+"_#_"+r.idx+"_#_"+sJ(r)}zt.identifyProductionForDuplicates=nJ;function sJ(r){return r instanceof Zs.Terminal?r.terminalType.name:r instanceof Zs.NonTerminal?r.nonTerminalName:""}var oJ=function(r){Hx(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.allProductions=[],t}return e.prototype.visitNonTerminal=function(t){this.allProductions.push(t)},e.prototype.visitOption=function(t){this.allProductions.push(t)},e.prototype.visitRepetitionWithSeparator=function(t){this.allProductions.push(t)},e.prototype.visitRepetitionMandatory=function(t){this.allProductions.push(t)},e.prototype.visitRepetitionMandatoryWithSeparator=function(t){this.allProductions.push(t)},e.prototype.visitRepetition=function(t){this.allProductions.push(t)},e.prototype.visitAlternation=function(t){this.allProductions.push(t)},e.prototype.visitTerminal=function(t){this.allProductions.push(t)},e}(Yx.GAstVisitor);zt.OccurrenceValidationCollector=oJ;function aJ(r,e,t,i){var n=[],s=(0,Sr.reduce)(e,function(a,l){return l.name===r.name?a+1:a},0);if(s>1){var o=i.buildDuplicateRuleNameError({topLevelRule:r,grammarName:t});n.push({message:o,type:No.ParserDefinitionErrorType.DUPLICATE_RULE_NAME,ruleName:r.name})}return n}zt.validateRuleDoesNotAlreadyExist=aJ;function vwe(r,e,t){var i=[],n;return er.contains(e,r)||(n="Invalid rule override, rule: ->"+r+"<- cannot be overridden in the grammar: ->"+t+"<-as it is not defined in any of the super grammars ",i.push({message:n,type:No.ParserDefinitionErrorType.INVALID_RULE_OVERRIDE,ruleName:r})),i}zt.validateRuleIsOverridden=vwe;function jx(r,e,t,i){i===void 0&&(i=[]);var n=[],s=tC(e.definition);if(er.isEmpty(s))return[];var o=r.name,a=er.contains(s,r);a&&n.push({message:t.buildLeftRecursionError({topLevelRule:r,leftRecursionPath:i}),type:No.ParserDefinitionErrorType.LEFT_RECURSION,ruleName:o});var l=er.difference(s,i.concat([r])),c=er.map(l,function(u){var g=er.cloneArr(i);return g.push(u),jx(r,u,t,g)});return n.concat(er.flatten(c))}zt.validateNoLeftRecursion=jx;function tC(r){var e=[];if(er.isEmpty(r))return e;var t=er.first(r);if(t instanceof Zs.NonTerminal)e.push(t.referencedRule);else if(t instanceof Zs.Alternative||t instanceof Zs.Option||t instanceof Zs.RepetitionMandatory||t instanceof Zs.RepetitionMandatoryWithSeparator||t instanceof Zs.RepetitionWithSeparator||t instanceof Zs.Repetition)e=e.concat(tC(t.definition));else if(t instanceof Zs.Alternation)e=er.flatten(er.map(t.definition,function(o){return tC(o.definition)}));else if(!(t instanceof Zs.Terminal))throw Error("non exhaustive match");var i=(0,Gx.isOptionalProd)(t),n=r.length>1;if(i&&n){var s=er.drop(r);return e.concat(tC(s))}else return e}zt.getFirstNoneTerminal=tC;var qx=function(r){Hx(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.alternations=[],t}return e.prototype.visitAlternation=function(t){this.alternations.push(t)},e}(Yx.GAstVisitor);function AJ(r,e){var t=new qx;r.accept(t);var i=t.alternations,n=er.reduce(i,function(s,o){var a=er.dropRight(o.definition),l=er.map(a,function(c,u){var g=(0,bwe.nextPossibleTokensAfter)([c],[],null,1);return er.isEmpty(g)?{message:e.buildEmptyAlternationError({topLevelRule:r,alternation:o,emptyChoiceIdx:u}),type:No.ParserDefinitionErrorType.NONE_LAST_EMPTY_ALT,ruleName:r.name,occurrence:o.idx,alternative:u+1}:null});return s.concat(er.compact(l))},[]);return n}zt.validateEmptyOrAlternative=AJ;function lJ(r,e,t){var i=new qx;r.accept(i);var n=i.alternations;n=(0,Sr.reject)(n,function(o){return o.ignoreAmbiguities===!0});var s=er.reduce(n,function(o,a){var l=a.idx,c=a.maxLookahead||e,u=(0,Ef.getLookaheadPathsForOr)(l,r,c,a),g=xwe(u,a,r,t),f=fJ(u,a,r,t);return o.concat(g,f)},[]);return s}zt.validateAmbiguousAlternationAlternatives=lJ;var cJ=function(r){Hx(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.allProductions=[],t}return e.prototype.visitRepetitionWithSeparator=function(t){this.allProductions.push(t)},e.prototype.visitRepetitionMandatory=function(t){this.allProductions.push(t)},e.prototype.visitRepetitionMandatoryWithSeparator=function(t){this.allProductions.push(t)},e.prototype.visitRepetition=function(t){this.allProductions.push(t)},e}(Yx.GAstVisitor);zt.RepetionCollector=cJ;function uJ(r,e){var t=new qx;r.accept(t);var i=t.alternations,n=er.reduce(i,function(s,o){return o.definition.length>255&&s.push({message:e.buildTooManyAlternativesError({topLevelRule:r,alternation:o}),type:No.ParserDefinitionErrorType.TOO_MANY_ALTS,ruleName:r.name,occurrence:o.idx}),s},[]);return n}zt.validateTooManyAlts=uJ;function gJ(r,e,t){var i=[];return(0,Sr.forEach)(r,function(n){var s=new cJ;n.accept(s);var o=s.allProductions;(0,Sr.forEach)(o,function(a){var l=(0,Ef.getProdType)(a),c=a.maxLookahead||e,u=a.idx,g=(0,Ef.getLookaheadPathsForOptionalProd)(u,n,l,c),f=g[0];if((0,Sr.isEmpty)((0,Sr.flatten)(f))){var h=t.buildEmptyRepetitionError({topLevelRule:n,repetition:a});i.push({message:h,type:No.ParserDefinitionErrorType.NO_NON_EMPTY_LOOKAHEAD,ruleName:n.name})}})}),i}zt.validateSomeNonEmptyLookaheadPath=gJ;function xwe(r,e,t,i){var n=[],s=(0,Sr.reduce)(r,function(a,l,c){return e.definition[c].ignoreAmbiguities===!0||(0,Sr.forEach)(l,function(u){var g=[c];(0,Sr.forEach)(r,function(f,h){c!==h&&(0,Ef.containsPath)(f,u)&&e.definition[h].ignoreAmbiguities!==!0&&g.push(h)}),g.length>1&&!(0,Ef.containsPath)(n,u)&&(n.push(u),a.push({alts:g,path:u}))}),a},[]),o=er.map(s,function(a){var l=(0,Sr.map)(a.alts,function(u){return u+1}),c=i.buildAlternationAmbiguityError({topLevelRule:t,alternation:e,ambiguityIndices:l,prefixPath:a.path});return{message:c,type:No.ParserDefinitionErrorType.AMBIGUOUS_ALTS,ruleName:t.name,occurrence:e.idx,alternatives:[a.alts]}});return o}function fJ(r,e,t,i){var n=[],s=(0,Sr.reduce)(r,function(o,a,l){var c=(0,Sr.map)(a,function(u){return{idx:l,path:u}});return o.concat(c)},[]);return(0,Sr.forEach)(s,function(o){var a=e.definition[o.idx];if(a.ignoreAmbiguities!==!0){var l=o.idx,c=o.path,u=(0,Sr.findAll)(s,function(f){return e.definition[f.idx].ignoreAmbiguities!==!0&&f.idx{"use strict";Object.defineProperty(If,"__esModule",{value:!0});If.validateGrammar=If.resolveGrammar=void 0;var Wx=Gt(),Dwe=Wq(),kwe=Jx(),hJ=_d();function Rwe(r){r=(0,Wx.defaults)(r,{errMsgProvider:hJ.defaultGrammarResolverErrorProvider});var e={};return(0,Wx.forEach)(r.rules,function(t){e[t.name]=t}),(0,Dwe.resolveGrammar)(e,r.errMsgProvider)}If.resolveGrammar=Rwe;function Fwe(r){return r=(0,Wx.defaults)(r,{errMsgProvider:hJ.defaultGrammarValidatorErrorProvider}),(0,kwe.validateGrammar)(r.rules,r.maxLookahead,r.tokenTypes,r.errMsgProvider,r.grammarName)}If.validateGrammar=Fwe});var yf=y(En=>{"use strict";var rC=En&&En.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();Object.defineProperty(En,"__esModule",{value:!0});En.EarlyExitException=En.NotAllInputParsedException=En.NoViableAltException=En.MismatchedTokenException=En.isRecognitionException=void 0;var Nwe=Gt(),dJ="MismatchedTokenException",CJ="NoViableAltException",mJ="EarlyExitException",EJ="NotAllInputParsedException",IJ=[dJ,CJ,mJ,EJ];Object.freeze(IJ);function Twe(r){return(0,Nwe.contains)(IJ,r.name)}En.isRecognitionException=Twe;var qy=function(r){rC(e,r);function e(t,i){var n=this.constructor,s=r.call(this,t)||this;return s.token=i,s.resyncedTokens=[],Object.setPrototypeOf(s,n.prototype),Error.captureStackTrace&&Error.captureStackTrace(s,s.constructor),s}return e}(Error),Lwe=function(r){rC(e,r);function e(t,i,n){var s=r.call(this,t,i)||this;return s.previousToken=n,s.name=dJ,s}return e}(qy);En.MismatchedTokenException=Lwe;var Owe=function(r){rC(e,r);function e(t,i,n){var s=r.call(this,t,i)||this;return s.previousToken=n,s.name=CJ,s}return e}(qy);En.NoViableAltException=Owe;var Mwe=function(r){rC(e,r);function e(t,i){var n=r.call(this,t,i)||this;return n.name=EJ,n}return e}(qy);En.NotAllInputParsedException=Mwe;var Uwe=function(r){rC(e,r);function e(t,i,n){var s=r.call(this,t,i)||this;return s.previousToken=n,s.name=mJ,s}return e}(qy);En.EarlyExitException=Uwe});var Vx=y(Ki=>{"use strict";Object.defineProperty(Ki,"__esModule",{value:!0});Ki.attemptInRepetitionRecovery=Ki.Recoverable=Ki.InRuleRecoveryException=Ki.IN_RULE_RECOVERY_EXCEPTION=Ki.EOF_FOLLOW_KEY=void 0;var Jy=HA(),cs=Gt(),Kwe=yf(),Hwe=Lx(),Gwe=Hn();Ki.EOF_FOLLOW_KEY={};Ki.IN_RULE_RECOVERY_EXCEPTION="InRuleRecoveryException";function zx(r){this.name=Ki.IN_RULE_RECOVERY_EXCEPTION,this.message=r}Ki.InRuleRecoveryException=zx;zx.prototype=Error.prototype;var Ywe=function(){function r(){}return r.prototype.initRecoverable=function(e){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=(0,cs.has)(e,"recoveryEnabled")?e.recoveryEnabled:Gwe.DEFAULT_PARSER_CONFIG.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=yJ)},r.prototype.getTokenToInsert=function(e){var t=(0,Jy.createTokenInstance)(e,"",NaN,NaN,NaN,NaN,NaN,NaN);return t.isInsertedInRecovery=!0,t},r.prototype.canTokenTypeBeInsertedInRecovery=function(e){return!0},r.prototype.tryInRepetitionRecovery=function(e,t,i,n){for(var s=this,o=this.findReSyncTokenType(),a=this.exportLexerState(),l=[],c=!1,u=this.LA(1),g=this.LA(1),f=function(){var h=s.LA(0),p=s.errorMessageProvider.buildMismatchTokenMessage({expected:n,actual:u,previous:h,ruleName:s.getCurrRuleFullName()}),C=new Kwe.MismatchedTokenException(p,u,s.LA(0));C.resyncedTokens=(0,cs.dropRight)(l),s.SAVE_ERROR(C)};!c;)if(this.tokenMatcher(g,n)){f();return}else if(i.call(this)){f(),e.apply(this,t);return}else this.tokenMatcher(g,o)?c=!0:(g=this.SKIP_TOKEN(),this.addToResyncTokens(g,l));this.importLexerState(a)},r.prototype.shouldInRepetitionRecoveryBeTried=function(e,t,i){return!(i===!1||e===void 0||t===void 0||this.tokenMatcher(this.LA(1),e)||this.isBackTracking()||this.canPerformInRuleRecovery(e,this.getFollowsForInRuleRecovery(e,t)))},r.prototype.getFollowsForInRuleRecovery=function(e,t){var i=this.getCurrentGrammarPath(e,t),n=this.getNextPossibleTokenTypes(i);return n},r.prototype.tryInRuleRecovery=function(e,t){if(this.canRecoverWithSingleTokenInsertion(e,t)){var i=this.getTokenToInsert(e);return i}if(this.canRecoverWithSingleTokenDeletion(e)){var n=this.SKIP_TOKEN();return this.consumeToken(),n}throw new zx("sad sad panda")},r.prototype.canPerformInRuleRecovery=function(e,t){return this.canRecoverWithSingleTokenInsertion(e,t)||this.canRecoverWithSingleTokenDeletion(e)},r.prototype.canRecoverWithSingleTokenInsertion=function(e,t){var i=this;if(!this.canTokenTypeBeInsertedInRecovery(e)||(0,cs.isEmpty)(t))return!1;var n=this.LA(1),s=(0,cs.find)(t,function(o){return i.tokenMatcher(n,o)})!==void 0;return s},r.prototype.canRecoverWithSingleTokenDeletion=function(e){var t=this.tokenMatcher(this.LA(2),e);return t},r.prototype.isInCurrentRuleReSyncSet=function(e){var t=this.getCurrFollowKey(),i=this.getFollowSetFromFollowKey(t);return(0,cs.contains)(i,e)},r.prototype.findReSyncTokenType=function(){for(var e=this.flattenFollowSet(),t=this.LA(1),i=2;;){var n=t.tokenType;if((0,cs.contains)(e,n))return n;t=this.LA(i),i++}},r.prototype.getCurrFollowKey=function(){if(this.RULE_STACK.length===1)return Ki.EOF_FOLLOW_KEY;var e=this.getLastExplicitRuleShortName(),t=this.getLastExplicitRuleOccurrenceIndex(),i=this.getPreviousExplicitRuleShortName();return{ruleName:this.shortRuleNameToFullName(e),idxInCallingRule:t,inRule:this.shortRuleNameToFullName(i)}},r.prototype.buildFullFollowKeyStack=function(){var e=this,t=this.RULE_STACK,i=this.RULE_OCCURRENCE_STACK;return(0,cs.map)(t,function(n,s){return s===0?Ki.EOF_FOLLOW_KEY:{ruleName:e.shortRuleNameToFullName(n),idxInCallingRule:i[s],inRule:e.shortRuleNameToFullName(t[s-1])}})},r.prototype.flattenFollowSet=function(){var e=this,t=(0,cs.map)(this.buildFullFollowKeyStack(),function(i){return e.getFollowSetFromFollowKey(i)});return(0,cs.flatten)(t)},r.prototype.getFollowSetFromFollowKey=function(e){if(e===Ki.EOF_FOLLOW_KEY)return[Jy.EOF];var t=e.ruleName+e.idxInCallingRule+Hwe.IN+e.inRule;return this.resyncFollows[t]},r.prototype.addToResyncTokens=function(e,t){return this.tokenMatcher(e,Jy.EOF)||t.push(e),t},r.prototype.reSyncTo=function(e){for(var t=[],i=this.LA(1);this.tokenMatcher(i,e)===!1;)i=this.SKIP_TOKEN(),this.addToResyncTokens(i,t);return(0,cs.dropRight)(t)},r.prototype.attemptInRepetitionRecovery=function(e,t,i,n,s,o,a){},r.prototype.getCurrentGrammarPath=function(e,t){var i=this.getHumanReadableRuleStack(),n=(0,cs.cloneArr)(this.RULE_OCCURRENCE_STACK),s={ruleStack:i,occurrenceStack:n,lastTok:e,lastTokOccurrence:t};return s},r.prototype.getHumanReadableRuleStack=function(){var e=this;return(0,cs.map)(this.RULE_STACK,function(t){return e.shortRuleNameToFullName(t)})},r}();Ki.Recoverable=Ywe;function yJ(r,e,t,i,n,s,o){var a=this.getKeyForAutomaticLookahead(i,n),l=this.firstAfterRepMap[a];if(l===void 0){var c=this.getCurrRuleFullName(),u=this.getGAstProductions()[c],g=new s(u,n);l=g.startWalking(),this.firstAfterRepMap[a]=l}var f=l.token,h=l.occurrence,p=l.isEndOfRule;this.RULE_STACK.length===1&&p&&f===void 0&&(f=Jy.EOF,h=1),this.shouldInRepetitionRecoveryBeTried(f,h,o)&&this.tryInRepetitionRecovery(r,e,t,f)}Ki.attemptInRepetitionRecovery=yJ});var Wy=y(qt=>{"use strict";Object.defineProperty(qt,"__esModule",{value:!0});qt.getKeyForAutomaticLookahead=qt.AT_LEAST_ONE_SEP_IDX=qt.MANY_SEP_IDX=qt.AT_LEAST_ONE_IDX=qt.MANY_IDX=qt.OPTION_IDX=qt.OR_IDX=qt.BITS_FOR_ALT_IDX=qt.BITS_FOR_RULE_IDX=qt.BITS_FOR_OCCURRENCE_IDX=qt.BITS_FOR_METHOD_TYPE=void 0;qt.BITS_FOR_METHOD_TYPE=4;qt.BITS_FOR_OCCURRENCE_IDX=8;qt.BITS_FOR_RULE_IDX=12;qt.BITS_FOR_ALT_IDX=8;qt.OR_IDX=1<{"use strict";Object.defineProperty(zy,"__esModule",{value:!0});zy.LooksAhead=void 0;var Fa=eC(),$s=Gt(),wJ=Hn(),Na=Wy(),Nc=Xd(),qwe=function(){function r(){}return r.prototype.initLooksAhead=function(e){this.dynamicTokensEnabled=(0,$s.has)(e,"dynamicTokensEnabled")?e.dynamicTokensEnabled:wJ.DEFAULT_PARSER_CONFIG.dynamicTokensEnabled,this.maxLookahead=(0,$s.has)(e,"maxLookahead")?e.maxLookahead:wJ.DEFAULT_PARSER_CONFIG.maxLookahead,this.lookAheadFuncsCache=(0,$s.isES2015MapSupported)()?new Map:[],(0,$s.isES2015MapSupported)()?(this.getLaFuncFromCache=this.getLaFuncFromMap,this.setLaFuncCache=this.setLaFuncCacheUsingMap):(this.getLaFuncFromCache=this.getLaFuncFromObj,this.setLaFuncCache=this.setLaFuncUsingObj)},r.prototype.preComputeLookaheadFunctions=function(e){var t=this;(0,$s.forEach)(e,function(i){t.TRACE_INIT(i.name+" Rule Lookahead",function(){var n=(0,Nc.collectMethods)(i),s=n.alternation,o=n.repetition,a=n.option,l=n.repetitionMandatory,c=n.repetitionMandatoryWithSeparator,u=n.repetitionWithSeparator;(0,$s.forEach)(s,function(g){var f=g.idx===0?"":g.idx;t.TRACE_INIT(""+(0,Nc.getProductionDslName)(g)+f,function(){var h=(0,Fa.buildLookaheadFuncForOr)(g.idx,i,g.maxLookahead||t.maxLookahead,g.hasPredicates,t.dynamicTokensEnabled,t.lookAheadBuilderForAlternatives),p=(0,Na.getKeyForAutomaticLookahead)(t.fullRuleNameToShort[i.name],Na.OR_IDX,g.idx);t.setLaFuncCache(p,h)})}),(0,$s.forEach)(o,function(g){t.computeLookaheadFunc(i,g.idx,Na.MANY_IDX,Fa.PROD_TYPE.REPETITION,g.maxLookahead,(0,Nc.getProductionDslName)(g))}),(0,$s.forEach)(a,function(g){t.computeLookaheadFunc(i,g.idx,Na.OPTION_IDX,Fa.PROD_TYPE.OPTION,g.maxLookahead,(0,Nc.getProductionDslName)(g))}),(0,$s.forEach)(l,function(g){t.computeLookaheadFunc(i,g.idx,Na.AT_LEAST_ONE_IDX,Fa.PROD_TYPE.REPETITION_MANDATORY,g.maxLookahead,(0,Nc.getProductionDslName)(g))}),(0,$s.forEach)(c,function(g){t.computeLookaheadFunc(i,g.idx,Na.AT_LEAST_ONE_SEP_IDX,Fa.PROD_TYPE.REPETITION_MANDATORY_WITH_SEPARATOR,g.maxLookahead,(0,Nc.getProductionDslName)(g))}),(0,$s.forEach)(u,function(g){t.computeLookaheadFunc(i,g.idx,Na.MANY_SEP_IDX,Fa.PROD_TYPE.REPETITION_WITH_SEPARATOR,g.maxLookahead,(0,Nc.getProductionDslName)(g))})})})},r.prototype.computeLookaheadFunc=function(e,t,i,n,s,o){var a=this;this.TRACE_INIT(""+o+(t===0?"":t),function(){var l=(0,Fa.buildLookaheadFuncForOptionalProd)(t,e,s||a.maxLookahead,a.dynamicTokensEnabled,n,a.lookAheadBuilderForOptional),c=(0,Na.getKeyForAutomaticLookahead)(a.fullRuleNameToShort[e.name],i,t);a.setLaFuncCache(c,l)})},r.prototype.lookAheadBuilderForOptional=function(e,t,i){return(0,Fa.buildSingleAlternativeLookaheadFunction)(e,t,i)},r.prototype.lookAheadBuilderForAlternatives=function(e,t,i,n){return(0,Fa.buildAlternativesLookAheadFunc)(e,t,i,n)},r.prototype.getKeyForAutomaticLookahead=function(e,t){var i=this.getLastExplicitRuleShortName();return(0,Na.getKeyForAutomaticLookahead)(i,e,t)},r.prototype.getLaFuncFromCache=function(e){},r.prototype.getLaFuncFromMap=function(e){return this.lookAheadFuncsCache.get(e)},r.prototype.getLaFuncFromObj=function(e){return this.lookAheadFuncsCache[e]},r.prototype.setLaFuncCache=function(e,t){},r.prototype.setLaFuncCacheUsingMap=function(e,t){this.lookAheadFuncsCache.set(e,t)},r.prototype.setLaFuncUsingObj=function(e,t){this.lookAheadFuncsCache[e]=t},r}();zy.LooksAhead=qwe});var bJ=y(To=>{"use strict";Object.defineProperty(To,"__esModule",{value:!0});To.addNoneTerminalToCst=To.addTerminalToCst=To.setNodeLocationFull=To.setNodeLocationOnlyOffset=void 0;function Jwe(r,e){isNaN(r.startOffset)===!0?(r.startOffset=e.startOffset,r.endOffset=e.endOffset):r.endOffset{"use strict";Object.defineProperty(jA,"__esModule",{value:!0});jA.defineNameProp=jA.functionName=jA.classNameFromInstance=void 0;var Xwe=Gt();function _we(r){return SJ(r.constructor)}jA.classNameFromInstance=_we;var QJ="name";function SJ(r){var e=r.name;return e||"anonymous"}jA.functionName=SJ;function Zwe(r,e){var t=Object.getOwnPropertyDescriptor(r,QJ);return(0,Xwe.isUndefined)(t)||t.configurable?(Object.defineProperty(r,QJ,{enumerable:!1,configurable:!0,writable:!1,value:e}),!0):!1}jA.defineNameProp=Zwe});var kJ=y(vi=>{"use strict";Object.defineProperty(vi,"__esModule",{value:!0});vi.validateRedundantMethods=vi.validateMissingCstMethods=vi.validateVisitor=vi.CstVisitorDefinitionError=vi.createBaseVisitorConstructorWithDefaults=vi.createBaseSemanticVisitorConstructor=vi.defaultVisit=void 0;var us=Gt(),iC=Xx();function vJ(r,e){for(var t=(0,us.keys)(r),i=t.length,n=0;n: - `+(""+s.join(` - -`).replace(/\n/g,` - `)))}}};return t.prototype=i,t.prototype.constructor=t,t._RULE_NAMES=e,t}vi.createBaseSemanticVisitorConstructor=$we;function eBe(r,e,t){var i=function(){};(0,iC.defineNameProp)(i,r+"BaseSemanticsWithDefaults");var n=Object.create(t.prototype);return(0,us.forEach)(e,function(s){n[s]=vJ}),i.prototype=n,i.prototype.constructor=i,i}vi.createBaseVisitorConstructorWithDefaults=eBe;var _x;(function(r){r[r.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",r[r.MISSING_METHOD=1]="MISSING_METHOD"})(_x=vi.CstVisitorDefinitionError||(vi.CstVisitorDefinitionError={}));function xJ(r,e){var t=PJ(r,e),i=DJ(r,e);return t.concat(i)}vi.validateVisitor=xJ;function PJ(r,e){var t=(0,us.map)(e,function(i){if(!(0,us.isFunction)(r[i]))return{msg:"Missing visitor method: <"+i+"> on "+(0,iC.functionName)(r.constructor)+" CST Visitor.",type:_x.MISSING_METHOD,methodName:i}});return(0,us.compact)(t)}vi.validateMissingCstMethods=PJ;var tBe=["constructor","visit","validateVisitor"];function DJ(r,e){var t=[];for(var i in r)(0,us.isFunction)(r[i])&&!(0,us.contains)(tBe,i)&&!(0,us.contains)(e,i)&&t.push({msg:"Redundant visitor method: <"+i+"> on "+(0,iC.functionName)(r.constructor)+` CST Visitor -There is no Grammar Rule corresponding to this method's name. -`,type:_x.REDUNDANT_METHOD,methodName:i});return t}vi.validateRedundantMethods=DJ});var FJ=y(Vy=>{"use strict";Object.defineProperty(Vy,"__esModule",{value:!0});Vy.TreeBuilder=void 0;var wf=bJ(),ti=Gt(),RJ=kJ(),rBe=Hn(),iBe=function(){function r(){}return r.prototype.initTreeBuilder=function(e){if(this.CST_STACK=[],this.outputCst=e.outputCst,this.nodeLocationTracking=(0,ti.has)(e,"nodeLocationTracking")?e.nodeLocationTracking:rBe.DEFAULT_PARSER_CONFIG.nodeLocationTracking,!this.outputCst)this.cstInvocationStateUpdate=ti.NOOP,this.cstFinallyStateUpdate=ti.NOOP,this.cstPostTerminal=ti.NOOP,this.cstPostNonTerminal=ti.NOOP,this.cstPostRule=ti.NOOP;else if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=wf.setNodeLocationFull,this.setNodeLocationFromNode=wf.setNodeLocationFull,this.cstPostRule=ti.NOOP,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=ti.NOOP,this.setNodeLocationFromNode=ti.NOOP,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=wf.setNodeLocationOnlyOffset,this.setNodeLocationFromNode=wf.setNodeLocationOnlyOffset,this.cstPostRule=ti.NOOP,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=ti.NOOP,this.setNodeLocationFromNode=ti.NOOP,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else if(/none/i.test(this.nodeLocationTracking))this.setNodeLocationFromToken=ti.NOOP,this.setNodeLocationFromNode=ti.NOOP,this.cstPostRule=ti.NOOP,this.setInitialNodeLocation=ti.NOOP;else throw Error('Invalid config option: "'+e.nodeLocationTracking+'"')},r.prototype.setInitialNodeLocationOnlyOffsetRecovery=function(e){e.location={startOffset:NaN,endOffset:NaN}},r.prototype.setInitialNodeLocationOnlyOffsetRegular=function(e){e.location={startOffset:this.LA(1).startOffset,endOffset:NaN}},r.prototype.setInitialNodeLocationFullRecovery=function(e){e.location={startOffset:NaN,startLine:NaN,startColumn:NaN,endOffset:NaN,endLine:NaN,endColumn:NaN}},r.prototype.setInitialNodeLocationFullRegular=function(e){var t=this.LA(1);e.location={startOffset:t.startOffset,startLine:t.startLine,startColumn:t.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}},r.prototype.cstInvocationStateUpdate=function(e,t){var i={name:e,children:{}};this.setInitialNodeLocation(i),this.CST_STACK.push(i)},r.prototype.cstFinallyStateUpdate=function(){this.CST_STACK.pop()},r.prototype.cstPostRuleFull=function(e){var t=this.LA(0),i=e.location;i.startOffset<=t.startOffset?(i.endOffset=t.endOffset,i.endLine=t.endLine,i.endColumn=t.endColumn):(i.startOffset=NaN,i.startLine=NaN,i.startColumn=NaN)},r.prototype.cstPostRuleOnlyOffset=function(e){var t=this.LA(0),i=e.location;i.startOffset<=t.startOffset?i.endOffset=t.endOffset:i.startOffset=NaN},r.prototype.cstPostTerminal=function(e,t){var i=this.CST_STACK[this.CST_STACK.length-1];(0,wf.addTerminalToCst)(i,t,e),this.setNodeLocationFromToken(i.location,t)},r.prototype.cstPostNonTerminal=function(e,t){var i=this.CST_STACK[this.CST_STACK.length-1];(0,wf.addNoneTerminalToCst)(i,t,e),this.setNodeLocationFromNode(i.location,e.location)},r.prototype.getBaseCstVisitorConstructor=function(){if((0,ti.isUndefined)(this.baseCstVisitorConstructor)){var e=(0,RJ.createBaseSemanticVisitorConstructor)(this.className,(0,ti.keys)(this.gastProductionsCache));return this.baseCstVisitorConstructor=e,e}return this.baseCstVisitorConstructor},r.prototype.getBaseCstVisitorConstructorWithDefaults=function(){if((0,ti.isUndefined)(this.baseCstVisitorWithDefaultsConstructor)){var e=(0,RJ.createBaseVisitorConstructorWithDefaults)(this.className,(0,ti.keys)(this.gastProductionsCache),this.getBaseCstVisitorConstructor());return this.baseCstVisitorWithDefaultsConstructor=e,e}return this.baseCstVisitorWithDefaultsConstructor},r.prototype.getLastExplicitRuleShortName=function(){var e=this.RULE_STACK;return e[e.length-1]},r.prototype.getPreviousExplicitRuleShortName=function(){var e=this.RULE_STACK;return e[e.length-2]},r.prototype.getLastExplicitRuleOccurrenceIndex=function(){var e=this.RULE_OCCURRENCE_STACK;return e[e.length-1]},r}();Vy.TreeBuilder=iBe});var TJ=y(Xy=>{"use strict";Object.defineProperty(Xy,"__esModule",{value:!0});Xy.LexerAdapter=void 0;var NJ=Hn(),nBe=function(){function r(){}return r.prototype.initLexerAdapter=function(){this.tokVector=[],this.tokVectorLength=0,this.currIdx=-1},Object.defineProperty(r.prototype,"input",{get:function(){return this.tokVector},set:function(e){if(this.selfAnalysisDone!==!0)throw Error("Missing invocation at the end of the Parser's constructor.");this.reset(),this.tokVector=e,this.tokVectorLength=e.length},enumerable:!1,configurable:!0}),r.prototype.SKIP_TOKEN=function(){return this.currIdx<=this.tokVector.length-2?(this.consumeToken(),this.LA(1)):NJ.END_OF_FILE},r.prototype.LA=function(e){var t=this.currIdx+e;return t<0||this.tokVectorLength<=t?NJ.END_OF_FILE:this.tokVector[t]},r.prototype.consumeToken=function(){this.currIdx++},r.prototype.exportLexerState=function(){return this.currIdx},r.prototype.importLexerState=function(e){this.currIdx=e},r.prototype.resetLexerState=function(){this.currIdx=-1},r.prototype.moveToTerminatedState=function(){this.currIdx=this.tokVector.length-1},r.prototype.getLexerPosition=function(){return this.exportLexerState()},r}();Xy.LexerAdapter=nBe});var OJ=y(_y=>{"use strict";Object.defineProperty(_y,"__esModule",{value:!0});_y.RecognizerApi=void 0;var LJ=Gt(),sBe=yf(),Zx=Hn(),oBe=_d(),aBe=Jx(),ABe=Cn(),lBe=function(){function r(){}return r.prototype.ACTION=function(e){return e.call(this)},r.prototype.consume=function(e,t,i){return this.consumeInternal(t,e,i)},r.prototype.subrule=function(e,t,i){return this.subruleInternal(t,e,i)},r.prototype.option=function(e,t){return this.optionInternal(t,e)},r.prototype.or=function(e,t){return this.orInternal(t,e)},r.prototype.many=function(e,t){return this.manyInternal(e,t)},r.prototype.atLeastOne=function(e,t){return this.atLeastOneInternal(e,t)},r.prototype.CONSUME=function(e,t){return this.consumeInternal(e,0,t)},r.prototype.CONSUME1=function(e,t){return this.consumeInternal(e,1,t)},r.prototype.CONSUME2=function(e,t){return this.consumeInternal(e,2,t)},r.prototype.CONSUME3=function(e,t){return this.consumeInternal(e,3,t)},r.prototype.CONSUME4=function(e,t){return this.consumeInternal(e,4,t)},r.prototype.CONSUME5=function(e,t){return this.consumeInternal(e,5,t)},r.prototype.CONSUME6=function(e,t){return this.consumeInternal(e,6,t)},r.prototype.CONSUME7=function(e,t){return this.consumeInternal(e,7,t)},r.prototype.CONSUME8=function(e,t){return this.consumeInternal(e,8,t)},r.prototype.CONSUME9=function(e,t){return this.consumeInternal(e,9,t)},r.prototype.SUBRULE=function(e,t){return this.subruleInternal(e,0,t)},r.prototype.SUBRULE1=function(e,t){return this.subruleInternal(e,1,t)},r.prototype.SUBRULE2=function(e,t){return this.subruleInternal(e,2,t)},r.prototype.SUBRULE3=function(e,t){return this.subruleInternal(e,3,t)},r.prototype.SUBRULE4=function(e,t){return this.subruleInternal(e,4,t)},r.prototype.SUBRULE5=function(e,t){return this.subruleInternal(e,5,t)},r.prototype.SUBRULE6=function(e,t){return this.subruleInternal(e,6,t)},r.prototype.SUBRULE7=function(e,t){return this.subruleInternal(e,7,t)},r.prototype.SUBRULE8=function(e,t){return this.subruleInternal(e,8,t)},r.prototype.SUBRULE9=function(e,t){return this.subruleInternal(e,9,t)},r.prototype.OPTION=function(e){return this.optionInternal(e,0)},r.prototype.OPTION1=function(e){return this.optionInternal(e,1)},r.prototype.OPTION2=function(e){return this.optionInternal(e,2)},r.prototype.OPTION3=function(e){return this.optionInternal(e,3)},r.prototype.OPTION4=function(e){return this.optionInternal(e,4)},r.prototype.OPTION5=function(e){return this.optionInternal(e,5)},r.prototype.OPTION6=function(e){return this.optionInternal(e,6)},r.prototype.OPTION7=function(e){return this.optionInternal(e,7)},r.prototype.OPTION8=function(e){return this.optionInternal(e,8)},r.prototype.OPTION9=function(e){return this.optionInternal(e,9)},r.prototype.OR=function(e){return this.orInternal(e,0)},r.prototype.OR1=function(e){return this.orInternal(e,1)},r.prototype.OR2=function(e){return this.orInternal(e,2)},r.prototype.OR3=function(e){return this.orInternal(e,3)},r.prototype.OR4=function(e){return this.orInternal(e,4)},r.prototype.OR5=function(e){return this.orInternal(e,5)},r.prototype.OR6=function(e){return this.orInternal(e,6)},r.prototype.OR7=function(e){return this.orInternal(e,7)},r.prototype.OR8=function(e){return this.orInternal(e,8)},r.prototype.OR9=function(e){return this.orInternal(e,9)},r.prototype.MANY=function(e){this.manyInternal(0,e)},r.prototype.MANY1=function(e){this.manyInternal(1,e)},r.prototype.MANY2=function(e){this.manyInternal(2,e)},r.prototype.MANY3=function(e){this.manyInternal(3,e)},r.prototype.MANY4=function(e){this.manyInternal(4,e)},r.prototype.MANY5=function(e){this.manyInternal(5,e)},r.prototype.MANY6=function(e){this.manyInternal(6,e)},r.prototype.MANY7=function(e){this.manyInternal(7,e)},r.prototype.MANY8=function(e){this.manyInternal(8,e)},r.prototype.MANY9=function(e){this.manyInternal(9,e)},r.prototype.MANY_SEP=function(e){this.manySepFirstInternal(0,e)},r.prototype.MANY_SEP1=function(e){this.manySepFirstInternal(1,e)},r.prototype.MANY_SEP2=function(e){this.manySepFirstInternal(2,e)},r.prototype.MANY_SEP3=function(e){this.manySepFirstInternal(3,e)},r.prototype.MANY_SEP4=function(e){this.manySepFirstInternal(4,e)},r.prototype.MANY_SEP5=function(e){this.manySepFirstInternal(5,e)},r.prototype.MANY_SEP6=function(e){this.manySepFirstInternal(6,e)},r.prototype.MANY_SEP7=function(e){this.manySepFirstInternal(7,e)},r.prototype.MANY_SEP8=function(e){this.manySepFirstInternal(8,e)},r.prototype.MANY_SEP9=function(e){this.manySepFirstInternal(9,e)},r.prototype.AT_LEAST_ONE=function(e){this.atLeastOneInternal(0,e)},r.prototype.AT_LEAST_ONE1=function(e){return this.atLeastOneInternal(1,e)},r.prototype.AT_LEAST_ONE2=function(e){this.atLeastOneInternal(2,e)},r.prototype.AT_LEAST_ONE3=function(e){this.atLeastOneInternal(3,e)},r.prototype.AT_LEAST_ONE4=function(e){this.atLeastOneInternal(4,e)},r.prototype.AT_LEAST_ONE5=function(e){this.atLeastOneInternal(5,e)},r.prototype.AT_LEAST_ONE6=function(e){this.atLeastOneInternal(6,e)},r.prototype.AT_LEAST_ONE7=function(e){this.atLeastOneInternal(7,e)},r.prototype.AT_LEAST_ONE8=function(e){this.atLeastOneInternal(8,e)},r.prototype.AT_LEAST_ONE9=function(e){this.atLeastOneInternal(9,e)},r.prototype.AT_LEAST_ONE_SEP=function(e){this.atLeastOneSepFirstInternal(0,e)},r.prototype.AT_LEAST_ONE_SEP1=function(e){this.atLeastOneSepFirstInternal(1,e)},r.prototype.AT_LEAST_ONE_SEP2=function(e){this.atLeastOneSepFirstInternal(2,e)},r.prototype.AT_LEAST_ONE_SEP3=function(e){this.atLeastOneSepFirstInternal(3,e)},r.prototype.AT_LEAST_ONE_SEP4=function(e){this.atLeastOneSepFirstInternal(4,e)},r.prototype.AT_LEAST_ONE_SEP5=function(e){this.atLeastOneSepFirstInternal(5,e)},r.prototype.AT_LEAST_ONE_SEP6=function(e){this.atLeastOneSepFirstInternal(6,e)},r.prototype.AT_LEAST_ONE_SEP7=function(e){this.atLeastOneSepFirstInternal(7,e)},r.prototype.AT_LEAST_ONE_SEP8=function(e){this.atLeastOneSepFirstInternal(8,e)},r.prototype.AT_LEAST_ONE_SEP9=function(e){this.atLeastOneSepFirstInternal(9,e)},r.prototype.RULE=function(e,t,i){if(i===void 0&&(i=Zx.DEFAULT_RULE_CONFIG),(0,LJ.contains)(this.definedRulesNames,e)){var n=oBe.defaultGrammarValidatorErrorProvider.buildDuplicateRuleNameError({topLevelRule:e,grammarName:this.className}),s={message:n,type:Zx.ParserDefinitionErrorType.DUPLICATE_RULE_NAME,ruleName:e};this.definitionErrors.push(s)}this.definedRulesNames.push(e);var o=this.defineRule(e,t,i);return this[e]=o,o},r.prototype.OVERRIDE_RULE=function(e,t,i){i===void 0&&(i=Zx.DEFAULT_RULE_CONFIG);var n=[];n=n.concat((0,aBe.validateRuleIsOverridden)(e,this.definedRulesNames,this.className)),this.definitionErrors=this.definitionErrors.concat(n);var s=this.defineRule(e,t,i);return this[e]=s,s},r.prototype.BACKTRACK=function(e,t){return function(){this.isBackTrackingStack.push(1);var i=this.saveRecogState();try{return e.apply(this,t),!0}catch(n){if((0,sBe.isRecognitionException)(n))return!1;throw n}finally{this.reloadRecogState(i),this.isBackTrackingStack.pop()}}},r.prototype.getGAstProductions=function(){return this.gastProductionsCache},r.prototype.getSerializedGastProductions=function(){return(0,ABe.serializeGrammar)((0,LJ.values)(this.gastProductionsCache))},r}();_y.RecognizerApi=lBe});var HJ=y($y=>{"use strict";Object.defineProperty($y,"__esModule",{value:!0});$y.RecognizerEngine=void 0;var kr=Gt(),Gn=Wy(),Zy=yf(),MJ=eC(),Bf=$d(),UJ=Hn(),cBe=Vx(),KJ=HA(),nC=df(),uBe=Xx(),gBe=function(){function r(){}return r.prototype.initRecognizerEngine=function(e,t){if(this.className=(0,uBe.classNameFromInstance)(this),this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=nC.tokenStructuredMatcherNoCategories,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},(0,kr.has)(t,"serializedGrammar"))throw Error(`The Parser's configuration can no longer contain a property. - See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_6-0-0 - For Further details.`);if((0,kr.isArray)(e)){if((0,kr.isEmpty)(e))throw Error(`A Token Vocabulary cannot be empty. - Note that the first argument for the parser constructor - is no longer a Token vector (since v4.0).`);if(typeof e[0].startOffset=="number")throw Error(`The Parser constructor no longer accepts a token vector as the first argument. - See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_4-0-0 - For Further details.`)}if((0,kr.isArray)(e))this.tokensMap=(0,kr.reduce)(e,function(o,a){return o[a.name]=a,o},{});else if((0,kr.has)(e,"modes")&&(0,kr.every)((0,kr.flatten)((0,kr.values)(e.modes)),nC.isTokenType)){var i=(0,kr.flatten)((0,kr.values)(e.modes)),n=(0,kr.uniq)(i);this.tokensMap=(0,kr.reduce)(n,function(o,a){return o[a.name]=a,o},{})}else if((0,kr.isObject)(e))this.tokensMap=(0,kr.cloneObj)(e);else throw new Error(" argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");this.tokensMap.EOF=KJ.EOF;var s=(0,kr.every)((0,kr.values)(e),function(o){return(0,kr.isEmpty)(o.categoryMatches)});this.tokenMatcher=s?nC.tokenStructuredMatcherNoCategories:nC.tokenStructuredMatcher,(0,nC.augmentTokenTypes)((0,kr.values)(this.tokensMap))},r.prototype.defineRule=function(e,t,i){if(this.selfAnalysisDone)throw Error("Grammar rule <"+e+`> may not be defined after the 'performSelfAnalysis' method has been called' -Make sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.`);var n=(0,kr.has)(i,"resyncEnabled")?i.resyncEnabled:UJ.DEFAULT_RULE_CONFIG.resyncEnabled,s=(0,kr.has)(i,"recoveryValueFunc")?i.recoveryValueFunc:UJ.DEFAULT_RULE_CONFIG.recoveryValueFunc,o=this.ruleShortNameIdx<t},r.prototype.orInternal=function(e,t){var i=this.getKeyForAutomaticLookahead(Gn.OR_IDX,t),n=(0,kr.isArray)(e)?e:e.DEF,s=this.getLaFuncFromCache(i),o=s.call(this,n);if(o!==void 0){var a=n[o];return a.ALT.call(this)}this.raiseNoAltException(t,e.ERR_MSG)},r.prototype.ruleFinallyStateUpdate=function(){if(this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstFinallyStateUpdate(),this.RULE_STACK.length===0&&this.isAtEndOfInput()===!1){var e=this.LA(1),t=this.errorMessageProvider.buildNotAllInputParsedMessage({firstRedundant:e,ruleName:this.getCurrRuleFullName()});this.SAVE_ERROR(new Zy.NotAllInputParsedException(t,e))}},r.prototype.subruleInternal=function(e,t,i){var n;try{var s=i!==void 0?i.ARGS:void 0;return n=e.call(this,t,s),this.cstPostNonTerminal(n,i!==void 0&&i.LABEL!==void 0?i.LABEL:e.ruleName),n}catch(o){this.subruleInternalError(o,i,e.ruleName)}},r.prototype.subruleInternalError=function(e,t,i){throw(0,Zy.isRecognitionException)(e)&&e.partialCstResult!==void 0&&(this.cstPostNonTerminal(e.partialCstResult,t!==void 0&&t.LABEL!==void 0?t.LABEL:i),delete e.partialCstResult),e},r.prototype.consumeInternal=function(e,t,i){var n;try{var s=this.LA(1);this.tokenMatcher(s,e)===!0?(this.consumeToken(),n=s):this.consumeInternalError(e,s,i)}catch(o){n=this.consumeInternalRecovery(e,t,o)}return this.cstPostTerminal(i!==void 0&&i.LABEL!==void 0?i.LABEL:e.name,n),n},r.prototype.consumeInternalError=function(e,t,i){var n,s=this.LA(0);throw i!==void 0&&i.ERR_MSG?n=i.ERR_MSG:n=this.errorMessageProvider.buildMismatchTokenMessage({expected:e,actual:t,previous:s,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new Zy.MismatchedTokenException(n,t,s))},r.prototype.consumeInternalRecovery=function(e,t,i){if(this.recoveryEnabled&&i.name==="MismatchedTokenException"&&!this.isBackTracking()){var n=this.getFollowsForInRuleRecovery(e,t);try{return this.tryInRuleRecovery(e,n)}catch(s){throw s.name===cBe.IN_RULE_RECOVERY_EXCEPTION?i:s}}else throw i},r.prototype.saveRecogState=function(){var e=this.errors,t=(0,kr.cloneArr)(this.RULE_STACK);return{errors:e,lexerState:this.exportLexerState(),RULE_STACK:t,CST_STACK:this.CST_STACK}},r.prototype.reloadRecogState=function(e){this.errors=e.errors,this.importLexerState(e.lexerState),this.RULE_STACK=e.RULE_STACK},r.prototype.ruleInvocationStateUpdate=function(e,t,i){this.RULE_OCCURRENCE_STACK.push(i),this.RULE_STACK.push(e),this.cstInvocationStateUpdate(t,e)},r.prototype.isBackTracking=function(){return this.isBackTrackingStack.length!==0},r.prototype.getCurrRuleFullName=function(){var e=this.getLastExplicitRuleShortName();return this.shortRuleNameToFull[e]},r.prototype.shortRuleNameToFullName=function(e){return this.shortRuleNameToFull[e]},r.prototype.isAtEndOfInput=function(){return this.tokenMatcher(this.LA(1),KJ.EOF)},r.prototype.reset=function(){this.resetLexerState(),this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]},r}();$y.RecognizerEngine=gBe});var YJ=y(ew=>{"use strict";Object.defineProperty(ew,"__esModule",{value:!0});ew.ErrorHandler=void 0;var $x=yf(),eP=Gt(),GJ=eC(),fBe=Hn(),hBe=function(){function r(){}return r.prototype.initErrorHandler=function(e){this._errors=[],this.errorMessageProvider=(0,eP.has)(e,"errorMessageProvider")?e.errorMessageProvider:fBe.DEFAULT_PARSER_CONFIG.errorMessageProvider},r.prototype.SAVE_ERROR=function(e){if((0,$x.isRecognitionException)(e))return e.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:(0,eP.cloneArr)(this.RULE_OCCURRENCE_STACK)},this._errors.push(e),e;throw Error("Trying to save an Error which is not a RecognitionException")},Object.defineProperty(r.prototype,"errors",{get:function(){return(0,eP.cloneArr)(this._errors)},set:function(e){this._errors=e},enumerable:!1,configurable:!0}),r.prototype.raiseEarlyExitException=function(e,t,i){for(var n=this.getCurrRuleFullName(),s=this.getGAstProductions()[n],o=(0,GJ.getLookaheadPathsForOptionalProd)(e,s,t,this.maxLookahead),a=o[0],l=[],c=1;c<=this.maxLookahead;c++)l.push(this.LA(c));var u=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:a,actual:l,previous:this.LA(0),customUserDescription:i,ruleName:n});throw this.SAVE_ERROR(new $x.EarlyExitException(u,this.LA(1),this.LA(0)))},r.prototype.raiseNoAltException=function(e,t){for(var i=this.getCurrRuleFullName(),n=this.getGAstProductions()[i],s=(0,GJ.getLookaheadPathsForOr)(e,n,this.maxLookahead),o=[],a=1;a<=this.maxLookahead;a++)o.push(this.LA(a));var l=this.LA(0),c=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:s,actual:o,previous:l,customUserDescription:t,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new $x.NoViableAltException(c,this.LA(1),l))},r}();ew.ErrorHandler=hBe});var JJ=y(tw=>{"use strict";Object.defineProperty(tw,"__esModule",{value:!0});tw.ContentAssist=void 0;var jJ=$d(),qJ=Gt(),pBe=function(){function r(){}return r.prototype.initContentAssist=function(){},r.prototype.computeContentAssist=function(e,t){var i=this.gastProductionsCache[e];if((0,qJ.isUndefined)(i))throw Error("Rule ->"+e+"<- does not exist in this grammar.");return(0,jJ.nextPossibleTokensAfter)([i],t,this.tokenMatcher,this.maxLookahead)},r.prototype.getNextPossibleTokenTypes=function(e){var t=(0,qJ.first)(e.ruleStack),i=this.getGAstProductions(),n=i[t],s=new jJ.NextAfterTokenWalker(n,e).startWalking();return s},r}();tw.ContentAssist=pBe});var e3=y(nw=>{"use strict";Object.defineProperty(nw,"__esModule",{value:!0});nw.GastRecorder=void 0;var In=Gt(),Lo=Cn(),dBe=Jd(),XJ=df(),_J=HA(),CBe=Hn(),mBe=Wy(),iw={description:"This Object indicates the Parser is during Recording Phase"};Object.freeze(iw);var WJ=!0,zJ=Math.pow(2,mBe.BITS_FOR_OCCURRENCE_IDX)-1,ZJ=(0,_J.createToken)({name:"RECORDING_PHASE_TOKEN",pattern:dBe.Lexer.NA});(0,XJ.augmentTokenTypes)([ZJ]);var $J=(0,_J.createTokenInstance)(ZJ,`This IToken indicates the Parser is in Recording Phase - See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,-1,-1,-1,-1,-1,-1);Object.freeze($J);var EBe={name:`This CSTNode indicates the Parser is in Recording Phase - See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,children:{}},IBe=function(){function r(){}return r.prototype.initGastRecorder=function(e){this.recordingProdStack=[],this.RECORDING_PHASE=!1},r.prototype.enableRecording=function(){var e=this;this.RECORDING_PHASE=!0,this.TRACE_INIT("Enable Recording",function(){for(var t=function(n){var s=n>0?n:"";e["CONSUME"+s]=function(o,a){return this.consumeInternalRecord(o,n,a)},e["SUBRULE"+s]=function(o,a){return this.subruleInternalRecord(o,n,a)},e["OPTION"+s]=function(o){return this.optionInternalRecord(o,n)},e["OR"+s]=function(o){return this.orInternalRecord(o,n)},e["MANY"+s]=function(o){this.manyInternalRecord(n,o)},e["MANY_SEP"+s]=function(o){this.manySepFirstInternalRecord(n,o)},e["AT_LEAST_ONE"+s]=function(o){this.atLeastOneInternalRecord(n,o)},e["AT_LEAST_ONE_SEP"+s]=function(o){this.atLeastOneSepFirstInternalRecord(n,o)}},i=0;i<10;i++)t(i);e.consume=function(n,s,o){return this.consumeInternalRecord(s,n,o)},e.subrule=function(n,s,o){return this.subruleInternalRecord(s,n,o)},e.option=function(n,s){return this.optionInternalRecord(s,n)},e.or=function(n,s){return this.orInternalRecord(s,n)},e.many=function(n,s){this.manyInternalRecord(n,s)},e.atLeastOne=function(n,s){this.atLeastOneInternalRecord(n,s)},e.ACTION=e.ACTION_RECORD,e.BACKTRACK=e.BACKTRACK_RECORD,e.LA=e.LA_RECORD})},r.prototype.disableRecording=function(){var e=this;this.RECORDING_PHASE=!1,this.TRACE_INIT("Deleting Recording methods",function(){for(var t=0;t<10;t++){var i=t>0?t:"";delete e["CONSUME"+i],delete e["SUBRULE"+i],delete e["OPTION"+i],delete e["OR"+i],delete e["MANY"+i],delete e["MANY_SEP"+i],delete e["AT_LEAST_ONE"+i],delete e["AT_LEAST_ONE_SEP"+i]}delete e.consume,delete e.subrule,delete e.option,delete e.or,delete e.many,delete e.atLeastOne,delete e.ACTION,delete e.BACKTRACK,delete e.LA})},r.prototype.ACTION_RECORD=function(e){},r.prototype.BACKTRACK_RECORD=function(e,t){return function(){return!0}},r.prototype.LA_RECORD=function(e){return CBe.END_OF_FILE},r.prototype.topLevelRuleRecord=function(e,t){try{var i=new Lo.Rule({definition:[],name:e});return i.name=e,this.recordingProdStack.push(i),t.call(this),this.recordingProdStack.pop(),i}catch(n){if(n.KNOWN_RECORDER_ERROR!==!0)try{n.message=n.message+` - This error was thrown during the "grammar recording phase" For more info see: - https://chevrotain.io/docs/guide/internals.html#grammar-recording`}catch{throw n}throw n}},r.prototype.optionInternalRecord=function(e,t){return sC.call(this,Lo.Option,e,t)},r.prototype.atLeastOneInternalRecord=function(e,t){sC.call(this,Lo.RepetitionMandatory,t,e)},r.prototype.atLeastOneSepFirstInternalRecord=function(e,t){sC.call(this,Lo.RepetitionMandatoryWithSeparator,t,e,WJ)},r.prototype.manyInternalRecord=function(e,t){sC.call(this,Lo.Repetition,t,e)},r.prototype.manySepFirstInternalRecord=function(e,t){sC.call(this,Lo.RepetitionWithSeparator,t,e,WJ)},r.prototype.orInternalRecord=function(e,t){return yBe.call(this,e,t)},r.prototype.subruleInternalRecord=function(e,t,i){if(rw(t),!e||(0,In.has)(e,"ruleName")===!1){var n=new Error(" argument is invalid"+(" expecting a Parser method reference but got: <"+JSON.stringify(e)+">")+(` - inside top level rule: <`+this.recordingProdStack[0].name+">"));throw n.KNOWN_RECORDER_ERROR=!0,n}var s=(0,In.peek)(this.recordingProdStack),o=e.ruleName,a=new Lo.NonTerminal({idx:t,nonTerminalName:o,label:i==null?void 0:i.LABEL,referencedRule:void 0});return s.definition.push(a),this.outputCst?EBe:iw},r.prototype.consumeInternalRecord=function(e,t,i){if(rw(t),!(0,XJ.hasShortKeyProperty)(e)){var n=new Error(" argument is invalid"+(" expecting a TokenType reference but got: <"+JSON.stringify(e)+">")+(` - inside top level rule: <`+this.recordingProdStack[0].name+">"));throw n.KNOWN_RECORDER_ERROR=!0,n}var s=(0,In.peek)(this.recordingProdStack),o=new Lo.Terminal({idx:t,terminalType:e,label:i==null?void 0:i.LABEL});return s.definition.push(o),$J},r}();nw.GastRecorder=IBe;function sC(r,e,t,i){i===void 0&&(i=!1),rw(t);var n=(0,In.peek)(this.recordingProdStack),s=(0,In.isFunction)(e)?e:e.DEF,o=new r({definition:[],idx:t});return i&&(o.separator=e.SEP),(0,In.has)(e,"MAX_LOOKAHEAD")&&(o.maxLookahead=e.MAX_LOOKAHEAD),this.recordingProdStack.push(o),s.call(this),n.definition.push(o),this.recordingProdStack.pop(),iw}function yBe(r,e){var t=this;rw(e);var i=(0,In.peek)(this.recordingProdStack),n=(0,In.isArray)(r)===!1,s=n===!1?r:r.DEF,o=new Lo.Alternation({definition:[],idx:e,ignoreAmbiguities:n&&r.IGNORE_AMBIGUITIES===!0});(0,In.has)(r,"MAX_LOOKAHEAD")&&(o.maxLookahead=r.MAX_LOOKAHEAD);var a=(0,In.some)(s,function(l){return(0,In.isFunction)(l.GATE)});return o.hasPredicates=a,i.definition.push(o),(0,In.forEach)(s,function(l){var c=new Lo.Alternative({definition:[]});o.definition.push(c),(0,In.has)(l,"IGNORE_AMBIGUITIES")?c.ignoreAmbiguities=l.IGNORE_AMBIGUITIES:(0,In.has)(l,"GATE")&&(c.ignoreAmbiguities=!0),t.recordingProdStack.push(c),l.ALT.call(t),t.recordingProdStack.pop()}),iw}function VJ(r){return r===0?"":""+r}function rw(r){if(r<0||r>zJ){var e=new Error("Invalid DSL Method idx value: <"+r+`> - `+("Idx value must be a none negative value smaller than "+(zJ+1)));throw e.KNOWN_RECORDER_ERROR=!0,e}}});var r3=y(sw=>{"use strict";Object.defineProperty(sw,"__esModule",{value:!0});sw.PerformanceTracer=void 0;var t3=Gt(),wBe=Hn(),BBe=function(){function r(){}return r.prototype.initPerformanceTracer=function(e){if((0,t3.has)(e,"traceInitPerf")){var t=e.traceInitPerf,i=typeof t=="number";this.traceInitMaxIdent=i?t:1/0,this.traceInitPerf=i?t>0:t}else this.traceInitMaxIdent=0,this.traceInitPerf=wBe.DEFAULT_PARSER_CONFIG.traceInitPerf;this.traceInitIndent=-1},r.prototype.TRACE_INIT=function(e,t){if(this.traceInitPerf===!0){this.traceInitIndent++;var i=new Array(this.traceInitIndent+1).join(" ");this.traceInitIndent <"+e+">");var n=(0,t3.timer)(t),s=n.time,o=n.value,a=s>10?console.warn:console.log;return this.traceInitIndent time: "+s+"ms"),this.traceInitIndent--,o}else return t()},r}();sw.PerformanceTracer=BBe});var i3=y(ow=>{"use strict";Object.defineProperty(ow,"__esModule",{value:!0});ow.applyMixins=void 0;function bBe(r,e){e.forEach(function(t){var i=t.prototype;Object.getOwnPropertyNames(i).forEach(function(n){if(n!=="constructor"){var s=Object.getOwnPropertyDescriptor(i,n);s&&(s.get||s.set)?Object.defineProperty(r.prototype,n,s):r.prototype[n]=t.prototype[n]}})})}ow.applyMixins=bBe});var Hn=y(Cr=>{"use strict";var o3=Cr&&Cr.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();Object.defineProperty(Cr,"__esModule",{value:!0});Cr.EmbeddedActionsParser=Cr.CstParser=Cr.Parser=Cr.EMPTY_ALT=Cr.ParserDefinitionErrorType=Cr.DEFAULT_RULE_CONFIG=Cr.DEFAULT_PARSER_CONFIG=Cr.END_OF_FILE=void 0;var _i=Gt(),QBe=Yq(),n3=HA(),a3=_d(),s3=pJ(),SBe=Vx(),vBe=BJ(),xBe=FJ(),PBe=TJ(),DBe=OJ(),kBe=HJ(),RBe=YJ(),FBe=JJ(),NBe=e3(),TBe=r3(),LBe=i3();Cr.END_OF_FILE=(0,n3.createTokenInstance)(n3.EOF,"",NaN,NaN,NaN,NaN,NaN,NaN);Object.freeze(Cr.END_OF_FILE);Cr.DEFAULT_PARSER_CONFIG=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:a3.defaultParserErrorProvider,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1});Cr.DEFAULT_RULE_CONFIG=Object.freeze({recoveryValueFunc:function(){},resyncEnabled:!0});var OBe;(function(r){r[r.INVALID_RULE_NAME=0]="INVALID_RULE_NAME",r[r.DUPLICATE_RULE_NAME=1]="DUPLICATE_RULE_NAME",r[r.INVALID_RULE_OVERRIDE=2]="INVALID_RULE_OVERRIDE",r[r.DUPLICATE_PRODUCTIONS=3]="DUPLICATE_PRODUCTIONS",r[r.UNRESOLVED_SUBRULE_REF=4]="UNRESOLVED_SUBRULE_REF",r[r.LEFT_RECURSION=5]="LEFT_RECURSION",r[r.NONE_LAST_EMPTY_ALT=6]="NONE_LAST_EMPTY_ALT",r[r.AMBIGUOUS_ALTS=7]="AMBIGUOUS_ALTS",r[r.CONFLICT_TOKENS_RULES_NAMESPACE=8]="CONFLICT_TOKENS_RULES_NAMESPACE",r[r.INVALID_TOKEN_NAME=9]="INVALID_TOKEN_NAME",r[r.NO_NON_EMPTY_LOOKAHEAD=10]="NO_NON_EMPTY_LOOKAHEAD",r[r.AMBIGUOUS_PREFIX_ALTS=11]="AMBIGUOUS_PREFIX_ALTS",r[r.TOO_MANY_ALTS=12]="TOO_MANY_ALTS"})(OBe=Cr.ParserDefinitionErrorType||(Cr.ParserDefinitionErrorType={}));function MBe(r){return r===void 0&&(r=void 0),function(){return r}}Cr.EMPTY_ALT=MBe;var aw=function(){function r(e,t){this.definitionErrors=[],this.selfAnalysisDone=!1;var i=this;if(i.initErrorHandler(t),i.initLexerAdapter(),i.initLooksAhead(t),i.initRecognizerEngine(e,t),i.initRecoverable(t),i.initTreeBuilder(t),i.initContentAssist(),i.initGastRecorder(t),i.initPerformanceTracer(t),(0,_i.has)(t,"ignoredIssues"))throw new Error(`The IParserConfig property has been deprecated. - Please use the flag on the relevant DSL method instead. - See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#IGNORING_AMBIGUITIES - For further details.`);this.skipValidations=(0,_i.has)(t,"skipValidations")?t.skipValidations:Cr.DEFAULT_PARSER_CONFIG.skipValidations}return r.performSelfAnalysis=function(e){throw Error("The **static** `performSelfAnalysis` method has been deprecated. \nUse the **instance** method with the same name instead.")},r.prototype.performSelfAnalysis=function(){var e=this;this.TRACE_INIT("performSelfAnalysis",function(){var t;e.selfAnalysisDone=!0;var i=e.className;e.TRACE_INIT("toFastProps",function(){(0,_i.toFastProperties)(e)}),e.TRACE_INIT("Grammar Recording",function(){try{e.enableRecording(),(0,_i.forEach)(e.definedRulesNames,function(s){var o=e[s],a=o.originalGrammarAction,l=void 0;e.TRACE_INIT(s+" Rule",function(){l=e.topLevelRuleRecord(s,a)}),e.gastProductionsCache[s]=l})}finally{e.disableRecording()}});var n=[];if(e.TRACE_INIT("Grammar Resolving",function(){n=(0,s3.resolveGrammar)({rules:(0,_i.values)(e.gastProductionsCache)}),e.definitionErrors=e.definitionErrors.concat(n)}),e.TRACE_INIT("Grammar Validations",function(){if((0,_i.isEmpty)(n)&&e.skipValidations===!1){var s=(0,s3.validateGrammar)({rules:(0,_i.values)(e.gastProductionsCache),maxLookahead:e.maxLookahead,tokenTypes:(0,_i.values)(e.tokensMap),errMsgProvider:a3.defaultGrammarValidatorErrorProvider,grammarName:i});e.definitionErrors=e.definitionErrors.concat(s)}}),(0,_i.isEmpty)(e.definitionErrors)&&(e.recoveryEnabled&&e.TRACE_INIT("computeAllProdsFollows",function(){var s=(0,QBe.computeAllProdsFollows)((0,_i.values)(e.gastProductionsCache));e.resyncFollows=s}),e.TRACE_INIT("ComputeLookaheadFunctions",function(){e.preComputeLookaheadFunctions((0,_i.values)(e.gastProductionsCache))})),!r.DEFER_DEFINITION_ERRORS_HANDLING&&!(0,_i.isEmpty)(e.definitionErrors))throw t=(0,_i.map)(e.definitionErrors,function(s){return s.message}),new Error(`Parser Definition Errors detected: - `+t.join(` -------------------------------- -`))})},r.DEFER_DEFINITION_ERRORS_HANDLING=!1,r}();Cr.Parser=aw;(0,LBe.applyMixins)(aw,[SBe.Recoverable,vBe.LooksAhead,xBe.TreeBuilder,PBe.LexerAdapter,kBe.RecognizerEngine,DBe.RecognizerApi,RBe.ErrorHandler,FBe.ContentAssist,NBe.GastRecorder,TBe.PerformanceTracer]);var UBe=function(r){o3(e,r);function e(t,i){i===void 0&&(i=Cr.DEFAULT_PARSER_CONFIG);var n=this,s=(0,_i.cloneObj)(i);return s.outputCst=!0,n=r.call(this,t,s)||this,n}return e}(aw);Cr.CstParser=UBe;var KBe=function(r){o3(e,r);function e(t,i){i===void 0&&(i=Cr.DEFAULT_PARSER_CONFIG);var n=this,s=(0,_i.cloneObj)(i);return s.outputCst=!1,n=r.call(this,t,s)||this,n}return e}(aw);Cr.EmbeddedActionsParser=KBe});var l3=y(Aw=>{"use strict";Object.defineProperty(Aw,"__esModule",{value:!0});Aw.createSyntaxDiagramsCode=void 0;var A3=Ix();function HBe(r,e){var t=e===void 0?{}:e,i=t.resourceBase,n=i===void 0?"https://unpkg.com/chevrotain@"+A3.VERSION+"/diagrams/":i,s=t.css,o=s===void 0?"https://unpkg.com/chevrotain@"+A3.VERSION+"/diagrams/diagrams.css":s,a=` - - - - - -`,l=` - -`,c=` -'; + const expected = 'Hello, world!'; + const result = sanitizeText(input); + expect(result).toBe(expected); + }); + + it('should sanitize advanced HTML input when advHtml flag is true', () => { + const input = + 'Hello, world!'; + const expected = 'Hello, world!'; + const result = sanitizeText(input, true); + expect(result).toBe(expected); + }); + + it('should allow specific HTML tags when tags array is provided', () => { + const input = 'Hello, world!Goodbye, world!'; + const tags = ['b']; + const expected = 'Hello, world!Goodbye, world!'; + const result = sanitizeText(input, false, tags); + expect(result).toBe(expected); + }); + + it('should allow advanced HTML tags when advTags array is provided and advHtml flag is true', () => { + const input = + 'Hello, world!'; + const advTags = ['iframe']; + const expected = + 'Hello, world!'; + const result = sanitizeText(input, true, undefined, undefined, advTags); + expect(result).toBe(expected); + }); +}); diff --git a/tgui/packages/tgui/sanitize.ts b/tgui/packages/tgui/sanitize.ts index b6e05d0f7461..8098ebbbaebb 100644 --- a/tgui/packages/tgui/sanitize.ts +++ b/tgui/packages/tgui/sanitize.ts @@ -65,7 +65,7 @@ export const sanitizeText = ( advHtml = false, tags = defTag, forbidAttr = defAttr, - advTags = advTag + advTags = advTag, ) => { // This is VERY important to think first if you NEED // the tag you put in here. We are pushing all this diff --git a/tgui/packages/tgui/store.ts b/tgui/packages/tgui/store.ts index 4b1455b90293..3628f391e3e1 100644 --- a/tgui/packages/tgui/store.ts +++ b/tgui/packages/tgui/store.ts @@ -4,13 +4,20 @@ * @license MIT */ -import { Middleware, Reducer, Store, applyMiddleware, combineReducers, createStore } from 'common/redux'; -import { backendMiddleware, backendReducer } from './backend'; -import { debugMiddleware, debugReducer, relayMiddleware } from './debug'; +import { flow } from 'common/fp'; +import { + applyMiddleware, + combineReducers, + createStore, + Middleware, + Reducer, + Store, +} from 'common/redux'; import { assetMiddleware } from './assets'; +import { backendMiddleware, backendReducer } from './backend'; +import { debugMiddleware, debugReducer, relayMiddleware } from './debug'; import { createLogger } from './logging'; -import { flow } from 'common/fp'; type ConfigureStoreOptions = { sideEffects?: boolean; @@ -37,17 +44,17 @@ export const configureStore = (options: ConfigureStoreOptions = {}): Store => { debug: debugReducer, backend: backendReducer, }), - reducer, + reducer as any, ]); const middlewares: Middleware[] = !sideEffects ? [] : [ - ...(middleware?.pre || []), - assetMiddleware, - backendMiddleware, - ...(middleware?.post || []), - ]; + ...(middleware?.pre || []), + assetMiddleware, + backendMiddleware, + ...(middleware?.post || []), + ]; if (process.env.NODE_ENV !== 'production') { // We are using two if statements because Webpack is capable of @@ -71,7 +78,7 @@ const loggingMiddleware: Middleware = (store) => (next) => (action) => { const { type } = action; logger.debug( 'action', - type === 'update' || type === 'backend/update' ? { type } : action + type === 'update' || type === 'backend/update' ? { type } : action, ); return next(action); }; diff --git a/tgui/packages/tgui/stories/Button.stories.jsx b/tgui/packages/tgui/stories/Button.stories.jsx index 4f45e0c1f0ab..09aaa8eb0cd0 100644 --- a/tgui/packages/tgui/stories/Button.stories.jsx +++ b/tgui/packages/tgui/stories/Button.stories.jsx @@ -32,29 +32,29 @@ const Story = (props) => { return (

- + + + + + + {COLORS_STATES.map((color) => ( - ))}
{COLORS_SPECTRUM.map((color) => ( - ))}
{COLORS_SPECTRUM.map((color) => ( diff --git a/tgui/packages/tgui/stories/ByondUi.stories.jsx b/tgui/packages/tgui/stories/ByondUi.stories.jsx index 284c40d01b4c..2203fef23ca2 100644 --- a/tgui/packages/tgui/stories/ByondUi.stories.jsx +++ b/tgui/packages/tgui/stories/ByondUi.stories.jsx @@ -4,7 +4,8 @@ * @license MIT */ -import { useLocalState } from '../backend'; +import { useState } from 'react'; + import { Box, Button, ByondUi, Section } from '../components'; import { logger } from '../logging'; @@ -14,9 +15,8 @@ export const meta = { }; const Story = (props) => { - const [code, setCode] = useLocalState( - 'byondUiEvalCode', - `Byond.winset('${Byond.windowId}', {\n 'is-visible': true,\n})` + const [code, setCode] = useState( + `Byond.winset('${Byond.windowId}', {\n 'is-visible': true,\n})`, ); return ( <> @@ -34,7 +34,7 @@ const Story = (props) => { - }> + } + > setCode(e.target.value)}> + onChange={(e) => setCode(e.target.value)} + > {code}
diff --git a/tgui/packages/tgui/stories/Flex.stories.jsx b/tgui/packages/tgui/stories/Flex.stories.jsx index 03e67f5a2300..ede97cdb7579 100644 --- a/tgui/packages/tgui/stories/Flex.stories.jsx +++ b/tgui/packages/tgui/stories/Flex.stories.jsx @@ -4,7 +4,8 @@ * @license MIT */ -import { useLocalState } from '../backend'; +import { useState } from 'react'; + import { Button, Flex, Section } from '../components'; export const meta = { @@ -13,10 +14,10 @@ export const meta = { }; const Story = (props) => { - const [grow, setGrow] = useLocalState('fs_grow', 1); - const [direction, setDirection] = useLocalState('fs_direction', 'column'); - const [fill, setFill] = useLocalState('fs_fill', true); - const [hasTitle, setHasTitle] = useLocalState('fs_title', true); + const [grow, setGrow] = useState(1); + const [direction, setDirection] = useState('column'); + const [fill, setFill] = useState(true); + const [hasTitle, setHasTitle] = useState(true); return ( @@ -25,7 +26,8 @@ const Story = (props) => { fluid onClick={() => setDirection(direction === 'column' ? 'row' : 'column') - }> + } + > {`Flex direction="${direction}"`} @@ -47,7 +50,8 @@ const Story = (props) => { + grow={grow} + >
Content
diff --git a/tgui/packages/tgui/stories/Input.stories.jsx b/tgui/packages/tgui/stories/Input.stories.jsx index d3d6e0d24efd..fd50a53f5cf6 100644 --- a/tgui/packages/tgui/stories/Input.stories.jsx +++ b/tgui/packages/tgui/stories/Input.stories.jsx @@ -4,8 +4,19 @@ * @license MIT */ -import { useLocalState } from '../backend'; -import { Box, DraggableControl, Icon, Input, Knob, LabeledList, NumberInput, Section, Slider } from '../components'; +import { useState } from 'react'; + +import { + Box, + DraggableControl, + Icon, + Input, + Knob, + LabeledList, + NumberInput, + Section, + Slider, +} from '../components'; export const meta = { title: 'Input', @@ -13,8 +24,8 @@ export const meta = { }; const Story = (props) => { - const [number, setNumber] = useLocalState('number', 0); - const [text, setText] = useLocalState('text', 'Sample text'); + const [number, setNumber] = useState(0); + const [text, setText] = useState('Sample text'); return (
@@ -33,7 +44,7 @@ const Story = (props) => { value={number} minValue={-100} maxValue={100} - onChange={(e, value) => setNumber(value)} + onChange={(value) => setNumber(value)} /> @@ -45,7 +56,7 @@ const Story = (props) => { value={number} minValue={-100} maxValue={100} - onDrag={(e, value) => setNumber(value)} + onDrag={(value) => setNumber(value)} /> @@ -91,7 +102,8 @@ const Story = (props) => { dragMatrix={[0, -1]} step={1} stepPixelSize={5} - onDrag={(e, value) => setNumber(value)}> + onDrag={(e, value) => setNumber(value)} + > {(control) => ( { + label="Very very very very very very very very very very very very very long label with labelWrap" + > Entry 7 + label="Very very very very very very very very very very very very very long label with labelWrap and verticalAlign" + > Entry 8 diff --git a/tgui/packages/tgui/stories/Popper.stories.jsx b/tgui/packages/tgui/stories/Popper.stories.tsx similarity index 81% rename from tgui/packages/tgui/stories/Popper.stories.jsx rename to tgui/packages/tgui/stories/Popper.stories.tsx index 08fd430fb275..cb7fd6634d71 100644 --- a/tgui/packages/tgui/stories/Popper.stories.jsx +++ b/tgui/packages/tgui/stories/Popper.stories.tsx @@ -9,18 +9,19 @@ const Story = () => { return ( <> + }} + > Loogatme! } - options={{ - placement: 'bottom', - }}> + placement="bottom" + > { + }} + > I am on the right! } - options={{ - placement: 'right', - }}> + placement="right" + > { - const [progress, setProgress] = useLocalState('progress', 0.5); - const [color, setColor] = useLocalState('color', ''); + const [progress, setProgress] = useState(0.5); + const [color, setColor] = useState(''); const color_data = color ? { color: color } : { - ranges: { - good: [0.5, Infinity], - bad: [-Infinity, 0.1], - average: [0, 0.5], - }, - }; + ranges: { + good: [0.5, Infinity], + bad: [-Infinity, 0.1], + average: [0, 0.5], + }, + }; return (
@@ -34,14 +42,8 @@ const Story = (props) => { - + setColor(value)} /> diff --git a/tgui/packages/tgui/stories/Stack.stories.jsx b/tgui/packages/tgui/stories/Stack.stories.jsx index 9ebdf16c7932..d1ac602f5b1b 100644 --- a/tgui/packages/tgui/stories/Stack.stories.jsx +++ b/tgui/packages/tgui/stories/Stack.stories.jsx @@ -35,7 +35,7 @@ const Story = (props) => { - + diff --git a/tgui/packages/tgui/stories/Storage.stories.jsx b/tgui/packages/tgui/stories/Storage.stories.jsx index 768af1245454..2fb115bf453d 100644 --- a/tgui/packages/tgui/stories/Storage.stories.jsx +++ b/tgui/packages/tgui/stories/Storage.stories.jsx @@ -5,6 +5,7 @@ */ import { storage } from 'common/storage'; + import { Button, LabeledList, NoticeBox, Section } from '../components'; import { formatSiUnit } from '../format'; @@ -26,10 +27,12 @@ const Story = (props) => { onClick={() => { localStorage.clear(); storage.clear(); - }}> + }} + > Clear - }> + } + > {localStorage.length} diff --git a/tgui/packages/tgui/stories/Tabs.stories.jsx b/tgui/packages/tgui/stories/Tabs.stories.jsx index 2d72ab7598bc..b7c1d94c3298 100644 --- a/tgui/packages/tgui/stories/Tabs.stories.jsx +++ b/tgui/packages/tgui/stories/Tabs.stories.jsx @@ -4,7 +4,8 @@ * @license MIT */ -import { useLocalState } from '../backend'; +import { useState } from 'react'; + import { Button, Section, Tabs } from '../components'; export const meta = { @@ -15,13 +16,12 @@ export const meta = { const TAB_RANGE = ['Tab #1', 'Tab #2', 'Tab #3', 'Tab #4']; const Story = (props) => { - const [tabProps, setTabProps] = useLocalState('tabProps', {}); + const [tabProps, setTabProps] = useState({}); return ( <>
setTabProps({ @@ -29,10 +29,11 @@ const Story = (props) => { vertical: !tabProps.vertical, }) } - /> + > + vertical + setTabProps({ @@ -40,10 +41,11 @@ const Story = (props) => { leftSlot: !tabProps.leftSlot, }) } - /> + > + leftSlot + setTabProps({ @@ -51,10 +53,11 @@ const Story = (props) => { rightSlot: !tabProps.rightSlot, }) } - /> + > + rightSlot + setTabProps({ @@ -62,10 +65,11 @@ const Story = (props) => { icon: !tabProps.icon, }) } - /> + > + icon + setTabProps({ @@ -73,10 +77,11 @@ const Story = (props) => { fluid: !tabProps.fluid, }) } - /> + > + fluid + setTabProps({ @@ -84,47 +89,50 @@ const Story = (props) => { centered: !tabProps.centered, }) } - /> + > + centered +
- +
- + Some text
Section-less tabs appear the same as tabs in a fitted section:
- + ); }; const TabsPrefab = (props) => { - const [tabIndex, setTabIndex] = useLocalState('tabIndex', 0); - const [tabProps] = useLocalState('tabProps', {}); + const [tabIndex, setTabIndex] = useState(0); return ( + vertical={props.tabProps.vertical} + fluid={props.tabProps.fluid} + textAlign={props.tabProps.centered && 'center'} + > {TAB_RANGE.map((text, i) => ( ) } rightSlot={ - tabProps.rightSlot && ( + props.tabProps.rightSlot && (
{positions.map((position) => ( @@ -38,8 +38,9 @@ const Story = () => { color="transparent" tooltip="Tooltip text." tooltipPosition={position} - content={position} - /> + > + {position} + ))}
diff --git a/tgui/packages/tgui/styles/components/Button.scss b/tgui/packages/tgui/styles/components/Button.scss index 70f944ad5a01..4e3dd63130d3 100644 --- a/tgui/packages/tgui/styles/components/Button.scss +++ b/tgui/packages/tgui/styles/components/Button.scss @@ -21,20 +21,19 @@ $bg-map: colors.$bg-map !default; $luminance: luminance($color); $text-color: if($luminance > 0.4, rgba(0, 0, 0, 1), rgba(255, 255, 255, 1)); - transition: color 50ms, background-color 50ms; + transition: + color 50ms, + background-color 50ms; background-color: $color; color: $text-color; - &:hover { - transition: color 0ms, background-color 0ms; - } - &:focus { - transition: color 100ms, background-color 100ms; + transition: + color 100ms, + background-color 100ms; } - &:hover, - &:focus { + &:hover { background-color: lighten($color, 30%); color: $text-color; } @@ -64,6 +63,12 @@ $bg-map: colors.$bg-map !default; } } +.Button--dropdown { + line-height: base.em(16px); + height: base.em(22px); + padding: 0.2rem 0.5rem; +} + .Button--hasContent { // Add a margin to the icon to keep it separate from the text .fa, @@ -83,8 +88,8 @@ $bg-map: colors.$bg-map !default; } .Button--ellipsis { - overflow: hidden; text-overflow: ellipsis; + overflow: hidden; } .Button--fluid { @@ -159,3 +164,7 @@ $bg-map: colors.$bg-map !default; display: block; align-self: stretch; } + +.Button__textMargin { + margin-left: 0.4rem; +} diff --git a/tgui/packages/tgui/styles/components/Dialog.scss b/tgui/packages/tgui/styles/components/Dialog.scss new file mode 100644 index 000000000000..c7b7fd13261f --- /dev/null +++ b/tgui/packages/tgui/styles/components/Dialog.scss @@ -0,0 +1,105 @@ +@use '../base'; + +$background-color: base.$color-bg !default; + +.Dialog { + position: fixed; + left: 0; + top: 0; + right: 0; + bottom: 0; + background-color: rgba(0, 0, 0, 0.5); + display: flex; + align-items: center; + justify-content: center; +} + +.Dialog__content { + background-color: $background-color; + font-family: Consolas, monospace; + font-size: base.em(14px); + display: flex; + flex-direction: column; +} + +.Dialog__header { + display: flex; + height: 2em; + line-height: 1.928em; + background-color: rgba(0, 0, 0, 0.5); + user-select: none; + -ms-user-select: none; +} + +.Dialog__title { + display: inline; + font-style: italic; + margin-left: 1rem; + margin-right: 2rem; + flex-grow: 1; + opacity: 0.33; +} + +.Dialog__body { + margin: 2rem 1rem 2rem 1rem; + flex-grow: 1; +} + +.Dialog__footer { + display: flex; + flex-direction: row; + justify-content: flex-end; + padding: 1rem; + background-color: rgba(0, 0, 0, 0.25); +} + +.Dialog__button { + margin: 0 1rem 0 1rem; + height: 2rem; + min-width: 6rem; + text-align: center; +} + +.SaveAsDialog__inputs { + display: flex; + flex-direction: row; + align-items: center; + padding-left: 3rem; + justify-content: flex-end; + margin-right: 1rem; +} + +.SaveAsDialog__input { + margin-left: 1rem; + width: 80%; +} + +.SaveAsDialog__label { + vertical-align: center; +} + +.Dialog__FileList { + position: relative; + display: flex; + flex-wrap: wrap; + flex-grow: 1; + align-content: flex-start; + max-height: 20rem; + overflow: auto; + overflow-y: scroll; +} + +.Dialog__FileEntry { + text-align: center; + margin: 1rem; +} + +.Dialog__FileIcon { + display: inline-block; + margin: 0 0 1rem 0; + position: relative; + width: 6vh; + height: auto; + text-align: center; + cursor: default; +} diff --git a/tgui/packages/tgui/styles/components/Dropdown.scss b/tgui/packages/tgui/styles/components/Dropdown.scss index 6909f8d93123..b4d74ab53224 100644 --- a/tgui/packages/tgui/styles/components/Dropdown.scss +++ b/tgui/packages/tgui/styles/components/Dropdown.scss @@ -6,51 +6,48 @@ @use '../base.scss'; .Dropdown { - position: relative; + display: flex; + align-items: flex-start; } .Dropdown__control { - position: relative; - display: inline-block; + flex: 1; font-family: Verdana, sans-serif; font-size: base.em(12px); - width: base.em(100px); - line-height: base.em(17px); + overflow: hidden; user-select: none; + width: base.em(100px); + + .Icon { + vertical-align: middle; + margin-bottom: 1rem; + } } .Dropdown__arrow-button { float: right; padding-left: 0.35em; width: 1.2em; - height: base.em(22px); - border-left: base.em(1px) solid #000; border-left: base.em(1px) solid rgba(0, 0, 0, 0.25); + + .Icon { + vertical-align: middle; + margin-bottom: 0; + } } .Dropdown__menu { - position: absolute; overflow-y: auto; - z-index: 5; - width: base.em(100px); + align-items: center; max-height: base.em(200px); - overflow-y: scroll; border-radius: 0 0 base.em(2px) base.em(2px); color: #fff; background-color: #000; background-color: rgba(0, 0, 0, 0.75); } -.Dropdown__menu-noscroll { - position: absolute; - overflow-y: auto; - z-index: 5; - width: base.em(100px); - max-height: base.em(200px); - border-radius: 0 0 base.em(2px) base.em(2px); - color: #fff; - background-color: #000; - background-color: rgba(0, 0, 0, 0.75); +.Dropdown__menu-scroll { + overflow-y: scroll; } .Dropdown__menuentry { @@ -60,6 +57,11 @@ line-height: base.em(17px); transition: background-color 100ms ease-out; + &.selected { + background-color: rgba(255, 255, 255, 0.5) !important; + transition: background-color 0ms; + } + &:hover { background-color: rgba(255, 255, 255, 0.2); transition: background-color 0ms; diff --git a/tgui/packages/tgui/styles/components/MenuBar.scss b/tgui/packages/tgui/styles/components/MenuBar.scss new file mode 100644 index 000000000000..0f5eb47380cd --- /dev/null +++ b/tgui/packages/tgui/styles/components/MenuBar.scss @@ -0,0 +1,75 @@ +/** + * Copyright (c) 2020 Aleksej Komarov + * SPDX-License-Identifier: MIT + */ + +@use '../base.scss'; + +$separator-color: base.$color-bg-section; +$background-color: base.$color-bg !default; +$dropdown-z-index: 5; + +.MenuBar { + display: flex; +} + +.MenuBar__font { + font-family: Verdana, sans-serif; + font-size: base.em(12px); + line-height: base.em(17px); +} + +.MenuBar__hover { + &:hover { + background-color: lighten($background-color, 30%); + transition: background-color 0ms; + } +} + +.MenuBar__MenuBarButton { + padding: 0.2rem 0.5rem 0.2rem 0.5rem; +} + +.MenuBar__menu { + position: absolute; + z-index: $dropdown-z-index; + background-color: $background-color; + padding: 0.3rem 0.3rem 0.3rem 0.3rem; + box-shadow: 4px 6px 5px -2px rgba(0, 0, 0, 0.55); +} + +.MenuBar__MenuItem { + z-index: $dropdown-z-index; + transition: background-color 100ms ease-out; + background-color: $background-color; + white-space: nowrap; + padding: 0.3rem 2rem 0.3rem 3rem; +} + +.MenuBar__MenuItemToggle { + padding: 0.3rem 2rem 0.3rem 0; +} + +.MenuBar__MenuItemToggle__check { + display: inline-block; + vertical-align: middle; + min-width: 3rem; + margin-left: 0.3rem; +} + +.MenuBar__over { + top: auto; + bottom: 100%; +} + +.MenuBar__MenuBarButton-text { + text-overflow: clip; + white-space: nowrap; + height: base.em(17px); +} + +.MenuBar__Separator { + display: block; + margin: 0.3rem 0.3rem 0.3rem 2.3rem; + border-top: 1px solid $separator-color; +} diff --git a/tgui/packages/tgui/styles/components/ProgressBar.scss b/tgui/packages/tgui/styles/components/ProgressBar.scss index a544ee2e930e..e13d25e83759 100644 --- a/tgui/packages/tgui/styles/components/ProgressBar.scss +++ b/tgui/packages/tgui/styles/components/ProgressBar.scss @@ -32,7 +32,9 @@ $bg-map: colors.$bg-map !default; } .ProgressBar__fill--animated { - transition: background-color 900ms ease-out, width 900ms ease-out; + transition: + background-color 900ms ease-out, + width 900ms ease-out; } .ProgressBar__content { diff --git a/tgui/packages/tgui/styles/components/SearchItem.scss b/tgui/packages/tgui/styles/components/SearchItem.scss new file mode 100644 index 000000000000..5dadcdf8d6ae --- /dev/null +++ b/tgui/packages/tgui/styles/components/SearchItem.scss @@ -0,0 +1,35 @@ +@use '../colors.scss'; + +.SearchItem { + align-items: center; + display: flex; + flex-direction: column; + justify-content: center; +} + +.SearchItem--box { + background: black; + border: thin solid #212121; + display: flex; + align-items: center; + justify-content: center; + height: 3rem; + position: relative; + width: 3rem; +} + +.SearchItem--amount { + bottom: -4px; + color: colors.$teal; + font-family: 'Roboto', sans-serif; + font-size: 1.5rem; + position: absolute; + right: -6px; +} + +.SearchItem--text { + color: colors.$label; + font-family: 'Roboto', sans-serif; + font-size: 1rem; + z-index: 1; +} diff --git a/tgui/packages/tgui/styles/components/Stack.scss b/tgui/packages/tgui/styles/components/Stack.scss index ab2c6f24931c..3529c7001839 100644 --- a/tgui/packages/tgui/styles/components/Stack.scss +++ b/tgui/packages/tgui/styles/components/Stack.scss @@ -6,6 +6,8 @@ @use '../base.scss'; @use './Divider.scss'; +$zebra-background-color: base.$color-bg-section !default; + .Stack--fill { height: 100%; } @@ -26,6 +28,28 @@ } } +.Stack--reverse > .Stack__item { + margin-left: 0; + margin-right: 0.5em; + + &:first-child { + margin-right: 0; + } +} + +.Stack--reverse--vertical > .Stack__item { + margin-top: 0; + margin-bottom: 0.5em; + + &:first-child { + margin-bottom: 0; + } +} + +.Stack--zebra > .Stack__item:nth-child(even) { + background-color: $zebra-background-color; +} + .Stack--horizontal > .Stack__divider:not(.Stack__divider--hidden) { border-left: Divider.$thickness solid Divider.$color; } diff --git a/tgui/packages/tgui/styles/components/TextArea.scss b/tgui/packages/tgui/styles/components/TextArea.scss index 4323a77f997c..fa45857ed9b2 100644 --- a/tgui/packages/tgui/styles/components/TextArea.scss +++ b/tgui/packages/tgui/styles/components/TextArea.scss @@ -76,3 +76,9 @@ $border-radius: Input.$border-radius !default; overflow: visible; white-space: pre-wrap; } + +.TextArea__nowrap { + white-space: nowrap; + overflow-wrap: normal; + overflow-x: scroll; +} diff --git a/tgui/packages/tgui/styles/components/Tooltip.scss b/tgui/packages/tgui/styles/components/Tooltip.scss index 270ea44510b6..497813a206d0 100644 --- a/tgui/packages/tgui/styles/components/Tooltip.scss +++ b/tgui/packages/tgui/styles/components/Tooltip.scss @@ -4,7 +4,7 @@ */ @use '../base.scss'; -@use '../functions.scss'as *; +@use '../functions.scss' as *; $color: #ffffff !default; $background-color: #000000 !default; diff --git a/tgui/packages/tgui/styles/interfaces/AlertModal.scss b/tgui/packages/tgui/styles/interfaces/AlertModal.scss index 546082d2dc5f..beff2b5535e6 100644 --- a/tgui/packages/tgui/styles/interfaces/AlertModal.scss +++ b/tgui/packages/tgui/styles/interfaces/AlertModal.scss @@ -22,7 +22,9 @@ .AlertModal__LoaderProgress { position: absolute; - transition: background-color 500ms ease-out, width 500ms ease-out; + transition: + background-color 500ms ease-out, + width 500ms ease-out; background-color: colors.bg(colors.$primary); height: 100%; } diff --git a/tgui/packages/tgui/styles/interfaces/CrtPanel.scss b/tgui/packages/tgui/styles/interfaces/CrtPanel.scss index e2967ec44931..6fcc7db4c524 100644 --- a/tgui/packages/tgui/styles/interfaces/CrtPanel.scss +++ b/tgui/packages/tgui/styles/interfaces/CrtPanel.scss @@ -1,5 +1,5 @@ @use 'sass:color'; -@use "sass:math"; +@use 'sass:math'; @use 'sass:meta'; .panel-container { @@ -53,7 +53,9 @@ rgba(0, 0, 255, 0.06) ); z-index: 2; - background-size: 100% 2px, 3px 100%; + background-size: + 100% 2px, + 3px 100%; pointer-events: none; } } diff --git a/tgui/packages/tgui/styles/interfaces/ListInput.scss b/tgui/packages/tgui/styles/interfaces/ListInput.scss index 2b6d94d6df47..a7c74e6252de 100644 --- a/tgui/packages/tgui/styles/interfaces/ListInput.scss +++ b/tgui/packages/tgui/styles/interfaces/ListInput.scss @@ -22,7 +22,9 @@ .ListInput__LoaderProgress { position: absolute; - transition: background-color 500ms ease-out, width 500ms ease-out; + transition: + background-color 500ms ease-out, + width 500ms ease-out; background-color: colors.bg(colors.$primary); height: 100%; } diff --git a/tgui/packages/tgui/styles/interfaces/SmartFridge.scss b/tgui/packages/tgui/styles/interfaces/SmartFridge.scss index 38a4808d2db3..159380a6a031 100644 --- a/tgui/packages/tgui/styles/interfaces/SmartFridge.scss +++ b/tgui/packages/tgui/styles/interfaces/SmartFridge.scss @@ -2,6 +2,7 @@ .ItemIconCell { width: 32px; } + .ItemIcon { min-width: 32px; max-width: 32px; @@ -10,12 +11,21 @@ margin-bottom: -6px; } + .SmallIcon { + min-width: 20px; + max-width: 20px; + } + + .CategoryTabs { + background-color: rgba(#000000, 0.4); + } + .ContentsTable { .ContentRow { margin-top: 2px; margin-bottom: 2px; &:nth-child(even) { - background-color: black; + background-color: rgba(#000000, 0.6); } } } @@ -23,6 +33,12 @@ .VendButton { width: 100%; display: block; + font-weight: bold; + display: block; + &:hover, + &:focus { + transition: background-color 0ms; + } .Button__content { align-self: flex-start; text-align: left; diff --git a/tgui/packages/tgui/styles/interfaces/SquadInfo.scss b/tgui/packages/tgui/styles/interfaces/SquadInfo.scss index 421624be9bb9..ed142989294e 100644 --- a/tgui/packages/tgui/styles/interfaces/SquadInfo.scss +++ b/tgui/packages/tgui/styles/interfaces/SquadInfo.scss @@ -98,7 +98,9 @@ $border-color: rgba(base.$color-fg, 0.6); display: block; &:hover, &:focus { - transition: colors.$primary 0ms, background-color 0ms; + transition: + colors.$primary 0ms, + background-color 0ms; background-color: colors.$primary; } diff --git a/tgui/packages/tgui/styles/interfaces/TacticalMap.scss b/tgui/packages/tgui/styles/interfaces/TacticalMap.scss index a4ab13451772..84f81d62a681 100644 --- a/tgui/packages/tgui/styles/interfaces/TacticalMap.scss +++ b/tgui/packages/tgui/styles/interfaces/TacticalMap.scss @@ -13,3 +13,11 @@ .progress-stack { margin-top: 15px; } + +.TacticalMapColorPicker { + height: 21px; + width: 13rem; + span { + color: white !important; + } +} diff --git a/tgui/packages/tgui/styles/interfaces/VendingSorted.scss b/tgui/packages/tgui/styles/interfaces/VendingSorted.scss index 780b2b22711e..34537129313a 100644 --- a/tgui/packages/tgui/styles/interfaces/VendingSorted.scss +++ b/tgui/packages/tgui/styles/interfaces/VendingSorted.scss @@ -87,7 +87,9 @@ $mandatory-color: rgb(128, 83, 0); display: block; &:hover, &:focus { - transition: colors.$primary 0ms, background-color 0ms; + transition: + colors.$primary 0ms, + background-color 0ms; background-color: colors.$primary; } @@ -102,10 +104,14 @@ $mandatory-color: rgb(128, 83, 0); .RecommendedVendButton { background-color: rgba($recommended-color, $button-bg-opacity); border: 1px solid rgba($recommended-color, 1); - transition: $recommended-color 50ms, background-color 50ms; + transition: + $recommended-color 50ms, + background-color 50ms; &:hover, &:focus { - transition: $recommended-color 0ms, background-color 0ms; + transition: + $recommended-color 0ms, + background-color 0ms; background-color: $recommended-color; } } @@ -113,12 +119,16 @@ $mandatory-color: rgb(128, 83, 0); .MandatoryVendButton { background-color: rgba($mandatory-color, $button-bg-opacity); border: 1px solid rgba($mandatory-color, 1); - transition: $mandatory-color 50ms, background-color 50ms; + transition: + $mandatory-color 50ms, + background-color 50ms; &:hover, &:focus { background-color: $mandatory-color; - transition: $mandatory-color 0ms, background-color 0ms; + transition: + $mandatory-color 0ms, + background-color 0ms; } } @@ -135,10 +145,6 @@ $mandatory-color: rgb(128, 83, 0); width: 100%; } - .ItemTable { - width: 95vw; - } - .IconCell { width: 32px; } @@ -172,6 +178,11 @@ $mandatory-color: rgb(128, 83, 0); color: white; } + .SmallIcon { + min-width: 20px; + max-width: 20px; + } + .MandatoryItemText { color: rgb(255, 200, 90); } diff --git a/tgui/packages/tgui/styles/interfaces/common/ElectricalPanel.scss b/tgui/packages/tgui/styles/interfaces/common/ElectricalPanel.scss index fd54d942bfab..b6036b6b3273 100644 --- a/tgui/packages/tgui/styles/interfaces/common/ElectricalPanel.scss +++ b/tgui/packages/tgui/styles/interfaces/common/ElectricalPanel.scss @@ -37,12 +37,16 @@ } .led-green { background-color: #abff00; - box-shadow: rgba(0, 0, 0, 0.2) 0 -1px 3px 1px, inset #304701 0 -1px 6px, + box-shadow: + rgba(0, 0, 0, 0.2) 0 -1px 3px 1px, + inset #304701 0 -1px 6px, #89ff00 0 2px 6px; } .led-red { background-color: #f00; - box-shadow: rgba(0, 0, 0, 0.2) 0 -1px 3px 1px, inset #441313 0 -1px 6px, + box-shadow: + rgba(0, 0, 0, 0.2) 0 -1px 3px 1px, + inset #441313 0 -1px 6px, rgba(255, 0, 0, 0.5) 0 2px 6px; animation: blinkRed 0.5s infinite; } @@ -52,7 +56,9 @@ } 50% { background-color: #a00; - box-shadow: rgba(0, 0, 0, 0.2) 0 -1px 7px 1px, inset #441313 0 -1px 9px, + box-shadow: + rgba(0, 0, 0, 0.2) 0 -1px 7px 1px, + inset #441313 0 -1px 9px, rgba(255, 0, 0, 0.5) 0 2px 0; } to { diff --git a/tgui/packages/tgui/styles/layouts/TitleBar.scss b/tgui/packages/tgui/styles/layouts/TitleBar.scss index 0343b81da563..1a26dd9e29eb 100644 --- a/tgui/packages/tgui/styles/layouts/TitleBar.scss +++ b/tgui/packages/tgui/styles/layouts/TitleBar.scss @@ -24,12 +24,16 @@ $shadow-color: rgba(0, 0, 0, 0.1) !default; .TitleBar__clickable { color: color.change($text-color, $alpha: 0.5); background-color: $background-color; - transition: color 250ms ease-out, background-color 250ms ease-out; + transition: + color 250ms ease-out, + background-color 250ms ease-out; &:hover { color: rgba(255, 255, 255, 1); background-color: #cc0000; - transition: color 0ms, background-color 0ms; + transition: + color 0ms, + background-color 0ms; } } diff --git a/tgui/packages/tgui/styles/main.scss b/tgui/packages/tgui/styles/main.scss index a76b1ef3d8e4..28315052b7b2 100644 --- a/tgui/packages/tgui/styles/main.scss +++ b/tgui/packages/tgui/styles/main.scss @@ -23,6 +23,7 @@ @include meta.load-css('./components/BlockQuote.scss'); @include meta.load-css('./components/Button.scss'); @include meta.load-css('./components/ColorBox.scss'); +@include meta.load-css('./components/Dialog.scss'); @include meta.load-css('./components/Dimmer.scss'); @include meta.load-css('./components/Divider.scss'); @include meta.load-css('./components/Dropdown.scss'); @@ -31,11 +32,13 @@ @include meta.load-css('./components/Input.scss'); @include meta.load-css('./components/Knob.scss'); @include meta.load-css('./components/LabeledList.scss'); +@include meta.load-css('./components/MenuBar.scss'); @include meta.load-css('./components/Modal.scss'); @include meta.load-css('./components/NoticeBox.scss'); @include meta.load-css('./components/NumberInput.scss'); @include meta.load-css('./components/ProgressBar.scss'); @include meta.load-css('./components/RoundGauge.scss'); +@include meta.load-css('./components/SearchItem.scss'); @include meta.load-css('./components/Section.scss'); @include meta.load-css('./components/Slider.scss'); @include meta.load-css('./components/Stack.scss'); diff --git a/tgui/packages/tgui/styles/themes/abductor.scss b/tgui/packages/tgui/styles/themes/abductor.scss index bf68e2f3fb41..39dac5773c06 100644 --- a/tgui/packages/tgui/styles/themes/abductor.scss +++ b/tgui/packages/tgui/styles/themes/abductor.scss @@ -9,12 +9,12 @@ @use '../colors.scss' with ( $primary: #ad2350, $fg-map-keys: (), - $bg-map-keys: (), + $bg-map-keys: () ); @use '../base.scss' with ( $color-bg: #2a314a, $color-bg-grad-spread: 6%, - $border-radius: 2px, + $border-radius: 2px ); .theme-abductor { diff --git a/tgui/packages/tgui/styles/themes/admin.scss b/tgui/packages/tgui/styles/themes/admin.scss index 937b6ef6c238..c36d5305beff 100644 --- a/tgui/packages/tgui/styles/themes/admin.scss +++ b/tgui/packages/tgui/styles/themes/admin.scss @@ -7,15 +7,15 @@ @use 'sass:meta'; @use '../colors.scss' with ( - $primary: #1596b6, - $fg-map-keys: (), - $bg-map-keys: (), - ); + $primary: #1596b6, + $fg-map-keys: (), + $bg-map-keys: () +); @use '../base.scss' with ( - $color-bg: #29333a, - $color-bg-grad-spread: 6%, - $border-radius: 2px, - ); + $color-bg: #29333a, + $color-bg-grad-spread: 6%, + $border-radius: 2px +); .theme-admin { // Atomic classes @@ -28,4 +28,11 @@ .Layout__content { background-image: url('../../assets/bg-admin.svg'); } + + .candystripe:nth-child(odd) { + background-color: rgba(12, 49, 71, 0.25); + } + .candystripe:nth-child(even) { + background-color: rgba(33, 114, 206, 0.25); + } } diff --git a/tgui/packages/tgui/styles/themes/cardtable.scss b/tgui/packages/tgui/styles/themes/cardtable.scss index 773171187ef4..e5047e2e2f0c 100644 --- a/tgui/packages/tgui/styles/themes/cardtable.scss +++ b/tgui/packages/tgui/styles/themes/cardtable.scss @@ -9,12 +9,12 @@ @use '../colors.scss' with ( $primary: #000000, $fg-map-keys: (), - $bg-map-keys: (), + $bg-map-keys: () ); @use '../base.scss' with ( $color-bg: #117039, $color-bg-grad-spread: 0%, - $border-radius: 0, + $border-radius: 0 ); //Made for the roulette table, probably requires a bunch of manual hacks to work for anything else diff --git a/tgui/packages/tgui/styles/themes/crt.scss b/tgui/packages/tgui/styles/themes/crt.scss index bffc754404e3..9f9436f275a3 100644 --- a/tgui/packages/tgui/styles/themes/crt.scss +++ b/tgui/packages/tgui/styles/themes/crt.scss @@ -1,5 +1,5 @@ @use 'sass:color'; -@use "sass:math"; +@use 'sass:math'; @use 'sass:meta'; $font-family: monospace; @@ -139,7 +139,9 @@ $background-radial-opacity: 0.2 !default; rgba(0, 0, 255, 0.06) ); z-index: 2; - background-size: 100% 2px, 3px 100%; + background-size: + 100% 2px, + 3px 100%; pointer-events: none; } @@ -182,6 +184,30 @@ $background-radial-opacity: 0.2 !default; } } + .Dropdown__control { + &:hover, + &:focus, + &:visited, + &:target { + .Dropdown__selected-text, + .Dropdown__arrow-button { + color: base.$color-bg; + } + } + } + + .Dropdown__control.Button--disabled { + &:hover, + &:focus, + &:visited, + &:target { + .Dropdown__selected-text, + .Dropdown__arrow-button { + color: base.$color-fg; + } + } + } + hr { color: base.$color-fg; border: 1px solid base.$color-fg; diff --git a/tgui/packages/tgui/styles/themes/hackerman.scss b/tgui/packages/tgui/styles/themes/hackerman.scss index fedf2ef68061..51befcf1b366 100644 --- a/tgui/packages/tgui/styles/themes/hackerman.scss +++ b/tgui/packages/tgui/styles/themes/hackerman.scss @@ -9,11 +9,11 @@ @use '../colors.scss' with ( $primary: #00ff00, $fg-map-keys: (), - $bg-map-keys: (), + $bg-map-keys: () ); @use '../base.scss' with ( $color-bg: #121b12, - $color-bg-grad-spread: 0%, + $color-bg-grad-spread: 0% ); .theme-hackerman { diff --git a/tgui/packages/tgui/styles/themes/hive_status.scss b/tgui/packages/tgui/styles/themes/hive_status.scss index 20d751d0ed57..3952eeec61d4 100644 --- a/tgui/packages/tgui/styles/themes/hive_status.scss +++ b/tgui/packages/tgui/styles/themes/hive_status.scss @@ -1,8 +1,8 @@ @use 'sass:meta'; @use '../base.scss'; @use '../colors.scss' with ( - $primary: #52375c, - ); + $primary: #52375c +); .theme-hive_status { // Components diff --git a/tgui/packages/tgui/styles/themes/malfunction.scss b/tgui/packages/tgui/styles/themes/malfunction.scss index 9af0b1cd5004..d32113ba5e66 100644 --- a/tgui/packages/tgui/styles/themes/malfunction.scss +++ b/tgui/packages/tgui/styles/themes/malfunction.scss @@ -9,11 +9,11 @@ @use '../colors.scss' with ( $primary: #910101, $fg-map-keys: (), - $bg-map-keys: (), + $bg-map-keys: () ); @use '../base.scss' with ( $color-bg: #1b3443, - $color-bg-grad-spread: 6%, + $color-bg-grad-spread: 6% ); .theme-malfunction { diff --git a/tgui/packages/tgui/styles/themes/neutral.scss b/tgui/packages/tgui/styles/themes/neutral.scss index b6893ffc854c..e8ed3ca7da98 100644 --- a/tgui/packages/tgui/styles/themes/neutral.scss +++ b/tgui/packages/tgui/styles/themes/neutral.scss @@ -9,14 +9,14 @@ $neutral: #ffb300; @use '../colors.scss' with ( - $primary: $neutral, - $fg-map-keys: (), - $bg-map-keys: (), - ); + $primary: $neutral, + $fg-map-keys: (), + $bg-map-keys: () +); @use '../base.scss' with ( - $color-bg: color.scale($neutral, $lightness: -40%), - $color-bg-grad-spread: 6%, - ); + $color-bg: color.scale($neutral, $lightness: -40%), + $color-bg-grad-spread: 6% +); .theme-neutral { // Components diff --git a/tgui/packages/tgui/styles/themes/ntOS95.scss b/tgui/packages/tgui/styles/themes/ntOS95.scss new file mode 100644 index 000000000000..df541bf18a44 --- /dev/null +++ b/tgui/packages/tgui/styles/themes/ntOS95.scss @@ -0,0 +1,166 @@ +/** + * Copyright (c) 2020 Aleksej Komarov + * SPDX-License-Identifier: MIT + */ + +@use 'sass:color'; +@use 'sass:meta'; + +$light-gray: #c3c3c3; +$dark-gray: #858585; +$scrollbar-color-multiplier: 1; + +@use '../colors.scss' with ( + $primary: #000000, + $good: #007c11, + $average: #f0ec11, + $bad: #db2828, + $label: #000000 +); +@use '../base.scss' with ( + $color-bg: #008081, + $color-bg-grad-spread: 0%, + $border-radius: 0 +); + +.theme-ntOS95 { + // Atomic classes + @include meta.load-css('../atomic/color.scss'); + + // Components + @include meta.load-css( + '../components/Button.scss', + $with: ( + 'color-default': #e8e4c9, + 'color-disabled': #707070, + 'color-selected': #007c11, + 'color-caution': #be6209, + 'color-danger': #9d0808 + ) + ); + @include meta.load-css( + '../components/ProgressBar.scss', + $with: ('background-color': rgba(0, 0, 0, 0.5)) + ); + @include meta.load-css( + '../components/Section.scss', + $with: ('background-color': rgba(0, 0, 0, 0.4)) + ); + + @include meta.load-css( + '../components/Tooltip.scss', + $with: ('background-color': #ecee9e) + ); + // Layouts + @include meta.load-css('../layouts/Layout.scss'); + @include meta.load-css('../layouts/Window.scss'); + @include meta.load-css( + '../layouts/TitleBar.scss', + $with: ('background-color': #000080) + ); + + .Button { + color: #161613; + background-color: #c2c2c2; + //border: base.em(2px) outset #E8E4C9; + outline: base.em(2px) outset #c3c3c3; + } + .Button:hover { + background-color: #002ead; + transition: 0.1s; + } + + .Section { + &__titleText { + color: black; + } + color: black; + background-color: #c0c0c0; + outline: base.em(2px) outset #c3c3c3; + } + + .Input { + background-color: white; + outline: base.em(2px) inset #c3c3c3; + color: black; + &__input:-ms-input-placeholder { + color: black; + } + } + + .TextArea { + background-color: white; + outline: base.em(2px) inset #c3c3c3; + } + + .Layout__content { + background-image: none; + } + .Layout, + .Layout * { + // Fancy scrollbar + scrollbar-base-color: color.scale( + $light-gray, + $lightness: -25% * $scrollbar-color-multiplier + ); + scrollbar-face-color: color.scale( + $light-gray, + $lightness: 10% * $scrollbar-color-multiplier + ); + + scrollbar-3dlight-color: color.scale( + $light-gray, + $lightness: 0% * $scrollbar-color-multiplier + ); + scrollbar-highlight-color: color.scale( + $light-gray, + $lightness: 0% * $scrollbar-color-multiplier + ); + scrollbar-track-color: color.scale( + $light-gray, + $lightness: -25% * $scrollbar-color-multiplier + ); + scrollbar-arrow-color: color.scale( + $light-gray, + $lightness: 50% * $scrollbar-color-multiplier + ); + scrollbar-shadow-color: color.scale( + $light-gray, + $lightness: 10% * $scrollbar-color-multiplier + ); + } + + .Tab { + color: #000000; + background-color: #ecee9e; + } + + .Tab--selected { + color: #9d0808; + background-color: #c3c3c3; + } + + body { + overflow: auto; + font-family: ui-sans-serif; + } + .ProgressBar { + color: white; + } + + .Table__cell { + display: table-cell; + padding: 0 0.25em; + background-color: #c3c3c3; + //outline: base.em(3px) outset #c0c0c0 + } + .Box { + outline: base.em(3px) outset #c0c0c0; + } + .Tooltip { + color: black; + } + .NtosWindow__header { + background-color: $dark-gray; + } +} diff --git a/tgui/packages/tgui/styles/themes/ntos.scss b/tgui/packages/tgui/styles/themes/ntos.scss index cc6514509f4c..8b102b477781 100644 --- a/tgui/packages/tgui/styles/themes/ntos.scss +++ b/tgui/packages/tgui/styles/themes/ntos.scss @@ -10,10 +10,10 @@ $nanotrasen: #384e68; @use '../colors.scss' with ( $fg-map-keys: (), - $bg-map-keys: (), + $bg-map-keys: () ); @use '../base.scss' with ( - $color-bg: color.scale($nanotrasen, $lightness: -45%), + $color-bg: color.scale($nanotrasen, $lightness: -45%) ); .theme-ntos { diff --git a/tgui/packages/tgui/styles/themes/ntos_cat.scss b/tgui/packages/tgui/styles/themes/ntos_cat.scss new file mode 100644 index 000000000000..ae6236b5aa39 --- /dev/null +++ b/tgui/packages/tgui/styles/themes/ntos_cat.scss @@ -0,0 +1,148 @@ +/** + * Copyright (c) 2020 Aleksej Komarov + * SPDX-License-Identifier: MIT + */ + +@use 'sass:color'; +@use 'sass:meta'; +//@use 'sass:map'; + +//palette +$cyan: #5edba5; +$pink: #ed12f5; +$orange: #ff9900; +$purple: #463191; + +$light-gray: #c3c3c3; +$dark-gray: #858585; +$scrollbar-color-multiplier: 0.5; + +@use '../colors.scss' with ( + $primary: black, + $label: rgb(255, 132, 153), + $good: pink, + + $bad: red, + // $fg-map-keys: (), + // $bg-map-keys: (), +); + +@use '../base.scss' with ( + $color-bg: orange, + $color-bg-grad-spread: 12%, + //$border-radius: 0, + ); + +.theme-ntos_cat { + // Atomic classes + @include meta.load-css('../atomic/color.scss', $with: ()); + + // Components + @include meta.load-css( + '../components/Button.scss', + $with: ( + 'color-default': pink, + 'color-transparent-text': rgba(227, 240, 255, 0.75), + 'color-disabled': #363636, + 'color-selected': #465899, + 'color-caution': #be6209 + ) + ); + @include meta.load-css( + '../components/ProgressBar.scss', + $with: ('color-default-fill': rgb(255, 132, 153, 0.75)) + ); + @include meta.load-css( + '../components/Section.scss', + $with: ('background-color': rgba(124, 62, 34, 0.75)) + ); + @include meta.load-css( + '../components/Tooltip.scss', + $with: ('background-color': rgba(255, 153, 0, 0.75)) + ); + + // Layouts + @include meta.load-css('../layouts/Layout.scss'); + @include meta.load-css('../layouts/Window.scss'); + @include meta.load-css( + '../layouts/TitleBar.scss', + $with: ('background-color': rgb(255, 132, 153, 0.75)) + ); + + .Section { + color: black; + outline: base.em(2px) inset rgb(255, 132, 153); + } + .Button { + color: rgb(255, 132, 153); + background-color: rgb(255, 255, 255); + } + + .ProgressBar { + color: black; + } + + .Layout__content { + background-image: url('../../assets/bg-cat.svg'); + background-size: 100%; + background-repeat: no-repeat; + } + .Layout, + .Layout * { + // Fancy scrollbar + scrollbar-base-color: color.scale( + #454255, + $lightness: -25% * $scrollbar-color-multiplier + ); + scrollbar-face-color: color.scale( + #454255, + $lightness: 10% * $scrollbar-color-multiplier + ); + + scrollbar-3dlight-color: color.scale( + orange, + $lightness: 0% * $scrollbar-color-multiplier + ); + scrollbar-highlight-color: color.scale( + orange, + $lightness: 0% * $scrollbar-color-multiplier + ); + scrollbar-track-color: color.scale( + #ba753a, + $lightness: -25% * $scrollbar-color-multiplier + ); + scrollbar-arrow-color: color.scale( + orange, + $lightness: 50% * $scrollbar-color-multiplier + ); + scrollbar-shadow-color: color.scale( + #454255, + $lightness: 10% * $scrollbar-color-multiplier + ); + } + .Tab { + color: rgb(255, 132, 153); + background-color: rgba(255, 255, 255, 0.5); + } + .Tab--selected { + color: black; + background-color: rgb(255, 132, 153); + } + .Box { + outline: base.em(3px) outset #c0c0c0; + } + .Tooltip { + color: black; + } + .Input { + background-color: white; + outline: base.em(2px) inset rgb(255, 132, 153); + } + .NtosWindow__header { + background-color: #454255; + } + .Flex { + color: white; + background-color: rgba(0, 0, 0, 0); + } +} diff --git a/tgui/packages/tgui/styles/themes/ntos_darkmode.scss b/tgui/packages/tgui/styles/themes/ntos_darkmode.scss new file mode 100644 index 000000000000..b22ad60fc3f2 --- /dev/null +++ b/tgui/packages/tgui/styles/themes/ntos_darkmode.scss @@ -0,0 +1,44 @@ +/** + * Copyright (c) 2020 Aleksej Komarov + * SPDX-License-Identifier: MIT + */ + +@use 'sass:color'; +@use 'sass:meta'; + +$nanotrasen: #2c2c2c; + +@use '../colors.scss' with ( + $fg-map-keys: (), + $bg-map-keys: () +); +@use '../base.scss' with ( + $color-bg: color.scale($nanotrasen, $lightness: -45%) +); + +.theme-ntos_darkmode { + // Components + @include meta.load-css( + '../components/Button.scss', + $with: ( + 'color-default': $nanotrasen, + 'color-transparent-text': rgba(227, 240, 255, 0.75) + ) + ); + @include meta.load-css( + '../components/ProgressBar.scss', + $with: ( + 'color-default-fill': $nanotrasen, + 'background-color': rgba(0, 0, 0, 0.5) + ) + ); + @include meta.load-css('../components/Section.scss'); + + // Layouts + @include meta.load-css('../layouts/Layout.scss'); + @include meta.load-css('../layouts/Window.scss'); + @include meta.load-css( + '../layouts/TitleBar.scss', + $with: ('background-color': color.scale($nanotrasen, $lightness: -25%)) + ); +} diff --git a/tgui/packages/tgui/styles/themes/ntos_lightmode.scss b/tgui/packages/tgui/styles/themes/ntos_lightmode.scss new file mode 100644 index 000000000000..9cf1a647b778 --- /dev/null +++ b/tgui/packages/tgui/styles/themes/ntos_lightmode.scss @@ -0,0 +1,67 @@ +/** + * Copyright (c) 2020 Aleksej Komarov + * SPDX-License-Identifier: MIT + */ + +@use 'sass:color'; +@use 'sass:meta'; + +$nanotrasen: #ffffff; + +@use '../colors.scss' with ( + $primary: #000000, + $label: #000000 +); +@use '../base.scss' with ( + $color-bg: white +); + +.theme-ntos_lightmode { + @include meta.load-css('../atomic/color.scss', $with: ()); + // Components + @include meta.load-css( + '../components/Button.scss', + $with: ('color-default': $nanotrasen) + ); + @include meta.load-css( + '../components/ProgressBar.scss', + $with: ( + 'color-default-fill': $nanotrasen, + 'background-color': rgba(0, 0, 0, 0.5) + ) + ); + @include meta.load-css( + '../components/Section.scss', + $with: ('background-color': rgba(119, 119, 119, 0.4)) + ); + @include meta.load-css( + '../components/Tooltip.scss', + $with: ('background-color': white) + ); + + // Layouts + @include meta.load-css('../layouts/Layout.scss'); + @include meta.load-css('../layouts/Window.scss'); + @include meta.load-css( + '../layouts/TitleBar.scss', + $with: ('background-color': gray) + ); + .Button { + color: #161613; + } + .Button:hover { + background-color: #777777; + transition: 0.1s; + } + + .Section { + color: black; + } + .Tab { + color: black; + } + .Tab--selected { + color: white; + background-color: darkgray; + } +} diff --git a/tgui/packages/tgui/styles/themes/ntos_spooky.scss b/tgui/packages/tgui/styles/themes/ntos_spooky.scss new file mode 100644 index 000000000000..147464218568 --- /dev/null +++ b/tgui/packages/tgui/styles/themes/ntos_spooky.scss @@ -0,0 +1,69 @@ +@use 'sass:color'; +@use 'sass:meta'; +@use 'sass:map'; + +@use '../colors.scss' with ( + $primary: #3f021a, + $good: #e62626, + $bad: #970934 +); +@use '../base.scss' with ( + $color-bg: #240101, + $color-bg-grad-spread: 12% +); + +.theme-ntos_spooky { + // Atomic classes + @include meta.load-css('../atomic/color.scss'); + + // Components + @include meta.load-css( + '../components/Button.scss', + $with: ( + 'color-default': #7e0322, + 'color-disabled': #363636, + 'color-selected': #610a0a, + 'color-caution': #1416a3, + 'color-danger': #5c1e80 + ) + ); + @include meta.load-css( + '../components/Dimmer.scss', + $with: ('background-dimness': 0.45) + ); + @include meta.load-css( + '../components/Input.scss', + $with: ('border-color': #473a37) + ); + @include meta.load-css('../components/Modal.scss'); + @include meta.load-css( + '../components/NoticeBox.scss', + $with: ('background-color': #740707) + ); + @include meta.load-css('../components/NumberInput.scss'); + @include meta.load-css('../components/Section.scss'); + @include meta.load-css('../components/Table.scss'); + @include meta.load-css( + '../components/Tooltip.scss', + $with: ('background-color': #000000) + ); + @include meta.load-css( + '../components/ProgressBar.scss', + $with: ( + 'color-default-fill': rgba(190, 0, 0, 0.75), + 'background-color': rgba(34, 1, 1, 0.5) + ) + ); + + // Layouts + @include meta.load-css('../layouts/Layout.scss'); + @include meta.load-css('../layouts/Window.scss'); + @include meta.load-css( + '../layouts/TitleBar.scss', + $with: ('background-color': #6b0808) + ); + + .Layout__content { + background-image: url('../../assets/bg-spookycomp-compressed.svg'); + } +} diff --git a/tgui/packages/tgui/styles/themes/ntos_synth.scss b/tgui/packages/tgui/styles/themes/ntos_synth.scss new file mode 100644 index 000000000000..5085308dd3bc --- /dev/null +++ b/tgui/packages/tgui/styles/themes/ntos_synth.scss @@ -0,0 +1,99 @@ +/** + * Copyright (c) 2020 Aleksej Komarov + * SPDX-License-Identifier: MIT + */ + +@use 'sass:color'; +@use 'sass:meta'; +//@use 'sass:map'; + +//palette +$cyan: #5edba5; +$pink: #ed12f5; +$orange: #ff9900; +$purple: #463191; + +@use '../colors.scss' with ( + $primary: $pink, + $label: $orange, + $good: $cyan, + // $fg-map-keys: (), + // $bg-map-keys: (), +); + +@use '../base.scss' with ( + $color-bg: $purple, + $color-bg-grad-spread: 12% +); + +.theme-ntos_synth { + // Atomic classes + @include meta.load-css('../atomic/color.scss', $with: ()); + + // Components + @include meta.load-css( + '../components/Button.scss', + $with: ( + 'color-default': $cyan, + 'color-transparent-text': rgba(227, 240, 255, 0.75), + 'color-disabled': #363636, + 'color-selected': #465899, + 'color-caution': #be6209 + ) + ); + @include meta.load-css( + '../components/ProgressBar.scss', + $with: ('color-default-fill': rgba(237, 18, 245, 0.75)) + ); + @include meta.load-css( + '../components/Section.scss', + $with: ('background-color': rgba(0, 0, 0, 0.3)) + ); + @include meta.load-css( + '../components/Tooltip.scss', + $with: ('background-color': rgba(255, 153, 0, 0.75)) + ); + + // Layouts + @include meta.load-css('../layouts/Layout.scss'); + @include meta.load-css('../layouts/Window.scss'); + @include meta.load-css( + '../layouts/TitleBar.scss', + $with: ('background-color': rgba(3, 100, 117, 0.75)) + ); + + .Section { + color: $cyan; + background-image: linear-gradient( + to right, + rgba(194, 0, 219, 0.75), + rgba(3, 100, 117, 0.75) + ); + } + .Button { + color: $cyan; + background-color: $purple; + outline: base.em(2px) outset $pink; + } + .ProgressBar { + color: $orange; + } + + .Layout__content { + background-image: url('../../assets/bg-synthsunset-c-grid.svg'); + background-size: 100%; + background-position: top; + background-repeat: no-repeat; + } + .Tab { + color: $cyan; + background-image: linear-gradient( + to right, + rgba(255, 153, 0, 0.4), + rgba(194, 0, 219, 0.75) + ); + } + .Tab--selected { + color: $pink; + } +} diff --git a/tgui/packages/tgui/styles/themes/ntos_terminal.scss b/tgui/packages/tgui/styles/themes/ntos_terminal.scss new file mode 100644 index 000000000000..234e20fce760 --- /dev/null +++ b/tgui/packages/tgui/styles/themes/ntos_terminal.scss @@ -0,0 +1,112 @@ +/** + * Copyright (c) 2020 Aleksej Komarov + * SPDX-License-Identifier: MIT + */ + +@use 'sass:color'; +@use 'sass:meta'; + +@use '../colors.scss' with ( + $primary: #24e87e, + $label: #24e87e, + $good: rgba(36, 232, 127, 0.5), + // $fg-map-keys: (), + // $bg-map-keys: (), +); +@use '../base.scss' with ( + $color-bg: #121b12, + $color-bg-grad-spread: 0% +); + +.theme-ntos_terminal { + // Atomic classes + @include meta.load-css('../atomic/color.scss'); + + // Components + @include meta.load-css( + '../components/Button.scss', + $with: ( + 'color-default': rgba(0, 0, 0, 0), + 'color-disabled': #4a6a4a, + 'color-selected': rgba(36, 232, 127, 0.25) + ) + ); + @include meta.load-css( + '../components/Input.scss', + $with: ('border-color': colors.$primary) + ); + @include meta.load-css( + '../components/ProgressBar.scss', + $with: ( + 'background-color': rgba(0, 0, 0, 0.5), + 'color-default-fill': rgba(36, 232, 127, 0.5) + ) + ); + @include meta.load-css('../components/Modal.scss'); + @include meta.load-css('../components/Section.scss'); + + // Layouts + @include meta.load-css('../layouts/Layout.scss'); + @include meta.load-css('../layouts/Window.scss'); + @include meta.load-css( + '../layouts/TitleBar.scss', + $with: ('background-color': rgba(0, 97, 0, 0.25)) + ); + + .Layout__content { + //background-image: none; + background-image: repeating-linear-gradient( + 0deg, + rgba(black, 0.15), + rgba(black, 0.15) 1px, + transparent 2.5px, + transparent 5px + ), + radial-gradient(rgba(0, 97, 0, 0.75), black 120%); + background-size: 100%, 100%; + background-position: center, center; + } + + .Button { + font: Inconsolata; + color: #24e87e; + text-shadow: 0 0 2px #24e87e; + } + .Button:hover { + background-color: rgba(36, 232, 127, 0.25); + transition: 0.1s; + } + .Button--selected { + color: #24e87e; + } + + body { + //background-color: black; + color: white; + font: 1.3rem Inconsolata; + text-shadow: 0 0 2px #24e87e; + + //font: bold 12px Arial, 'Helvetica Neue', Helvetica, sans-serif; + } + .Section { + color: rgb(36, 232, 126); + } + .Tab { + color: #24e87e; + } + .Tab--selected { + color: #24e87e; + border: 2px solid #24e87e; + background-color: rgba(36, 232, 127, 0.25); + } + ::selection { + background: #0080ff; + text-shadow: none; + } + .Table { + text-shadow: 0 0 2px #24e87e; + } + .Flex { + text-shadow: 0 0 2px #24e87e; + } +} diff --git a/tgui/packages/tgui/styles/themes/paper.scss b/tgui/packages/tgui/styles/themes/paper.scss index 4508191e3854..2f9fa6e16f2b 100644 --- a/tgui/packages/tgui/styles/themes/paper.scss +++ b/tgui/packages/tgui/styles/themes/paper.scss @@ -13,12 +13,12 @@ // Commenting out color maps will adjust all colors based on the lightness // settings above, but will add extra 10KB to the theme. $fg-map-keys: (), - $bg-map-keys: (), + $bg-map-keys: () ); @use '../base.scss' with ( $color-fg: #000000, $color-bg: #dfdfdf, - $color-bg-grad-spread: 0%, + $color-bg-grad-spread: 0% ); $font-size: 24px; diff --git a/tgui/packages/tgui/styles/themes/retro.scss b/tgui/packages/tgui/styles/themes/retro.scss index c3e5d4543438..9e08c8b9caef 100644 --- a/tgui/packages/tgui/styles/themes/retro.scss +++ b/tgui/packages/tgui/styles/themes/retro.scss @@ -9,12 +9,12 @@ @use '../colors.scss' with ( $primary: #000000, $fg-map-keys: (), - $bg-map-keys: (), + $bg-map-keys: () ); @use '../base.scss' with ( - $color-bg: #E8E4C9, + $color-bg: #e8e4c9, $color-bg-grad-spread: 0%, - $border-radius: 0, + $border-radius: 0 ); // A fat warning to anyone who wants to use this: this only half works. diff --git a/tgui/packages/tgui/styles/themes/spookyconsole.scss b/tgui/packages/tgui/styles/themes/spookyconsole.scss index b41ee2b6f141..07fd5b4dbe3d 100644 --- a/tgui/packages/tgui/styles/themes/spookyconsole.scss +++ b/tgui/packages/tgui/styles/themes/spookyconsole.scss @@ -7,11 +7,11 @@ $good: #010005, $bad: #970934, $fg-map-keys: (), - $bg-map-keys: (), + $bg-map-keys: () ); @use '../base.scss' with ( $color-bg: #240101, - $color-bg-grad-spread: 12%, + $color-bg-grad-spread: 12% ); $updated-bg-map: colors.$bg-map !default; diff --git a/tgui/packages/tgui/styles/themes/syndicate.scss b/tgui/packages/tgui/styles/themes/syndicate.scss index 57664fd65442..4a547edef9b6 100644 --- a/tgui/packages/tgui/styles/themes/syndicate.scss +++ b/tgui/packages/tgui/styles/themes/syndicate.scss @@ -9,11 +9,11 @@ @use '../colors.scss' with ( $primary: #397439, $fg-map-keys: (), - $bg-map-keys: (), + $bg-map-keys: () ); @use '../base.scss' with ( $color-bg: #550202, - $color-bg-grad-spread: 6%, + $color-bg-grad-spread: 6% ); .theme-syndicate { diff --git a/tgui/packages/tgui/styles/themes/uscm.scss b/tgui/packages/tgui/styles/themes/uscm.scss index 99fd2be0b670..7cbee7fb24c0 100644 --- a/tgui/packages/tgui/styles/themes/uscm.scss +++ b/tgui/packages/tgui/styles/themes/uscm.scss @@ -4,12 +4,12 @@ @use '../colors.scss' with ( $primary: #000000, $fg-map-keys: (), - $bg-map-keys: (), + $bg-map-keys: () ); @use '../base.scss' with ( $color-bg: #0c0e1e, $color-bg-grad-spread: 0%, - $border-radius: 0, + $border-radius: 0 ); // USMC Theme @@ -26,4 +26,9 @@ background-position: right 40px top 50%; background-repeat: no-repeat; } + .Vendor { + .VendingFlexAlt { + background-color: rgba(#0c0e1e, 1); + } + } } diff --git a/tgui/packages/tgui/styles/themes/weyland.scss b/tgui/packages/tgui/styles/themes/weyland.scss index 68d4612c8118..665a975e933d 100644 --- a/tgui/packages/tgui/styles/themes/weyland.scss +++ b/tgui/packages/tgui/styles/themes/weyland.scss @@ -11,12 +11,12 @@ $weyland: #af7f38; @use '../colors.scss' with ( $primary: #000000, $fg-map-keys: (), - $bg-map-keys: (), + $bg-map-keys: () ); @use '../base.scss' with ( $color-bg: #252832, $color-bg-grad-spread: 0%, - $border-radius: 0, + $border-radius: 0 ); .theme-weyland { diff --git a/tgui/packages/tgui/styles/themes/wizard.scss b/tgui/packages/tgui/styles/themes/wizard.scss index 8449dbcb4abf..9c4056cc1289 100644 --- a/tgui/packages/tgui/styles/themes/wizard.scss +++ b/tgui/packages/tgui/styles/themes/wizard.scss @@ -7,15 +7,15 @@ @use 'sass:meta'; @use '../colors.scss' with ( - $primary: #1596b6, - $fg-map-keys: (), - $bg-map-keys: (), - ); + $primary: #1596b6, + $fg-map-keys: (), + $bg-map-keys: () +); @use '../base.scss' with ( - $color-bg: #213e4e, - $color-bg-grad-spread: 6%, - $border-radius: 2px, - ); + $color-bg: #213e4e, + $color-bg-grad-spread: 6%, + $border-radius: 2px +); .theme-wizard { // Atomic classes diff --git a/tgui/packages/tgui/styles/themes/xeno.scss b/tgui/packages/tgui/styles/themes/xeno.scss index 30bd4faec947..62069b30f65b 100644 --- a/tgui/packages/tgui/styles/themes/xeno.scss +++ b/tgui/packages/tgui/styles/themes/xeno.scss @@ -7,15 +7,15 @@ @use 'sass:meta'; @use '../colors.scss' with ( - $primary: #43096d, - $fg-map-keys: (), - $bg-map-keys: (), - ); + $primary: #43096d, + $fg-map-keys: (), + $bg-map-keys: () +); @use '../base.scss' with ( - $color-bg: #290041, - $color-bg-grad-spread: 6%, - $border-radius: 2px, - ); + $color-bg: #290041, + $color-bg-grad-spread: 6%, + $border-radius: 2px +); .theme-xeno { // Atomic classes diff --git a/tgui/public/tgui-panel.bundle.css b/tgui/public/tgui-panel.bundle.css deleted file mode 100644 index 4d00b843f41b..000000000000 --- a/tgui/public/tgui-panel.bundle.css +++ /dev/null @@ -1 +0,0 @@ -html,body{box-sizing:border-box;height:100%;margin:0;font-size:12px}html{overflow:hidden;cursor:default}body{overflow:auto;font-family:Verdana,Geneva,sans-serif}*,*:before,*:after{box-sizing:inherit}h1,h2,h3,h4,h5,h6{display:block;margin:0;padding:6px 0;padding:.5rem 0}h1{font-size:18px;font-size:1.5rem}h2{font-size:16px;font-size:1.333rem}h3{font-size:14px;font-size:1.167rem}h4{font-size:12px;font-size:1rem}td,th{vertical-align:baseline;text-align:left}.candystripe:nth-child(odd){background-color:rgba(0,0,0,.25)}.color-black{color:#1a1a1a!important}.color-white{color:#fff!important}.color-red{color:#df3e3e!important}.color-orange{color:#f37f33!important}.color-yellow{color:#fbda21!important}.color-olive{color:#cbe41c!important}.color-green{color:#25ca4c!important}.color-teal{color:#00d6cc!important}.color-blue{color:#2e93de!important}.color-dark-blue{color:#005fa7!important}.color-violet{color:#7349cf!important}.color-purple{color:#ad45d0!important}.color-pink{color:#e34da1!important}.color-brown{color:#b97447!important}.color-grey{color:#848484!important}.color-light-grey{color:#b3b3b3!important}.color-good{color:#68c22d!important}.color-average{color:#f29a29!important}.color-bad{color:#df3e3e!important}.color-label{color:#8b9bb0!important}.color-xeno{color:#664573!important}.color-bg-black{background-color:#000!important}.color-bg-white{background-color:#d9d9d9!important}.color-bg-red{background-color:#bd2020!important}.color-bg-orange{background-color:#d95e0c!important}.color-bg-yellow{background-color:#d9b804!important}.color-bg-olive{background-color:#9aad14!important}.color-bg-green{background-color:#1b9638!important}.color-bg-teal{background-color:#009a93!important}.color-bg-blue{background-color:#1c71b1!important}.color-bg-dark-blue{background-color:#003e6e!important}.color-bg-violet{background-color:#552dab!important}.color-bg-purple{background-color:#8b2baa!important}.color-bg-pink{background-color:#cf2082!important}.color-bg-brown{background-color:#8c5836!important}.color-bg-grey{background-color:#646464!important}.color-bg-light-grey{background-color:#919191!important}.color-bg-good{background-color:#4d9121!important}.color-bg-average{background-color:#cd7a0d!important}.color-bg-bad{background-color:#bd2020!important}.color-bg-label{background-color:#657a94!important}.color-bg-xeno{background-color:#462f4e!important}.debug-layout,.debug-layout *:not(g):not(path){color:rgba(255,255,255,.9)!important;background:rgba(0,0,0,0)!important;outline:1px solid rgba(255,255,255,.5)!important;box-shadow:none!important;filter:none!important}.debug-layout:hover,.debug-layout *:not(g):not(path):hover{outline-color:rgba(255,255,255,.8)!important}.outline-dotted{outline-style:dotted!important}.outline-dashed{outline-style:dashed!important}.outline-solid{outline-style:solid!important}.outline-double{outline-style:double!important}.outline-groove{outline-style:groove!important}.outline-ridge{outline-style:ridge!important}.outline-inset{outline-style:inset!important}.outline-outset{outline-style:outset!important}.outline-color-black{outline:.167rem solid #1a1a1a!important}.outline-color-white{outline:.167rem solid #fff!important}.outline-color-red{outline:.167rem solid #df3e3e!important}.outline-color-orange{outline:.167rem solid #f37f33!important}.outline-color-yellow{outline:.167rem solid #fbda21!important}.outline-color-olive{outline:.167rem solid #cbe41c!important}.outline-color-green{outline:.167rem solid #25ca4c!important}.outline-color-teal{outline:.167rem solid #00d6cc!important}.outline-color-blue{outline:.167rem solid #2e93de!important}.outline-color-dark-blue{outline:.167rem solid #005fa7!important}.outline-color-violet{outline:.167rem solid #7349cf!important}.outline-color-purple{outline:.167rem solid #ad45d0!important}.outline-color-pink{outline:.167rem solid #e34da1!important}.outline-color-brown{outline:.167rem solid #b97447!important}.outline-color-grey{outline:.167rem solid #848484!important}.outline-color-light-grey{outline:.167rem solid #b3b3b3!important}.outline-color-good{outline:.167rem solid #68c22d!important}.outline-color-average{outline:.167rem solid #f29a29!important}.outline-color-bad{outline:.167rem solid #df3e3e!important}.outline-color-label{outline:.167rem solid #8b9bb0!important}.outline-color-xeno{outline:.167rem solid #664573!important}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.text-baseline{text-align:baseline}.text-justify{text-align:justify}.text-nowrap{white-space:nowrap}.text-pre{white-space:pre}.text-bold{font-weight:700}.text-italic{font-style:italic}.text-underline{text-decoration:underline}.BlockQuote{color:#8b9bb0;border-left:.1666666667em solid #8b9bb0;padding-left:.5em;margin-bottom:.5em}.BlockQuote:last-child{margin-bottom:0}.Button{position:relative;display:inline-block;line-height:1.667em;padding:0 .5em;margin-right:.1666666667em;white-space:nowrap;outline:0;border-radius:.16em;margin-bottom:.1666666667em;user-select:none;-ms-user-select:none}.Button .fa,.Button .fas,.Button .far{margin-left:-.25em;margin-right:-.25em;min-width:1.333em;text-align:center}.Button--hasContent .fa,.Button--hasContent .fas,.Button--hasContent .far{margin-right:.25em}.Button--hasContent.Button--iconPosition--right .fa,.Button--hasContent.Button--iconPosition--right .fas,.Button--hasContent.Button--iconPosition--right .far{margin-right:0;margin-left:3px}.Button--ellipsis{overflow:hidden;text-overflow:ellipsis}.Button--fluid{display:block;margin-left:0;margin-right:0}.Button--circular{border-radius:50%}.Button--compact{padding:0 .25em;line-height:1.333em}.Button--color--black{transition:color 50ms,background-color 50ms;background-color:#000;color:#fff}.Button--color--black:hover{transition:color 0ms,background-color 0ms}.Button--color--black:focus{transition:color .1s,background-color .1s}.Button--color--black:hover,.Button--color--black:focus{background-color:#131313;color:#fff}.Button--color--white{transition:color 50ms,background-color 50ms;background-color:#d9d9d9;color:#000}.Button--color--white:hover{transition:color 0ms,background-color 0ms}.Button--color--white:focus{transition:color .1s,background-color .1s}.Button--color--white:hover,.Button--color--white:focus{background-color:#f8f8f8;color:#000}.Button--color--red{transition:color 50ms,background-color 50ms;background-color:#bd2020;color:#fff}.Button--color--red:hover{transition:color 0ms,background-color 0ms}.Button--color--red:focus{transition:color .1s,background-color .1s}.Button--color--red:hover,.Button--color--red:focus{background-color:#dc4848;color:#fff}.Button--color--orange{transition:color 50ms,background-color 50ms;background-color:#d95e0c;color:#fff}.Button--color--orange:hover{transition:color 0ms,background-color 0ms}.Button--color--orange:focus{transition:color .1s,background-color .1s}.Button--color--orange:hover,.Button--color--orange:focus{background-color:#f0853f;color:#fff}.Button--color--yellow{transition:color 50ms,background-color 50ms;background-color:#d9b804;color:#000}.Button--color--yellow:hover{transition:color 0ms,background-color 0ms}.Button--color--yellow:focus{transition:color .1s,background-color .1s}.Button--color--yellow:hover,.Button--color--yellow:focus{background-color:#f5d72e;color:#000}.Button--color--olive{transition:color 50ms,background-color 50ms;background-color:#9aad14;color:#fff}.Button--color--olive:hover{transition:color 0ms,background-color 0ms}.Button--color--olive:focus{transition:color .1s,background-color .1s}.Button--color--olive:hover,.Button--color--olive:focus{background-color:#c4da2b;color:#fff}.Button--color--green{transition:color 50ms,background-color 50ms;background-color:#1b9638;color:#fff}.Button--color--green:hover{transition:color 0ms,background-color 0ms}.Button--color--green:focus{transition:color .1s,background-color .1s}.Button--color--green:hover,.Button--color--green:focus{background-color:#32c154;color:#fff}.Button--color--teal{transition:color 50ms,background-color 50ms;background-color:#009a93;color:#fff}.Button--color--teal:hover{transition:color 0ms,background-color 0ms}.Button--color--teal:focus{transition:color .1s,background-color .1s}.Button--color--teal:hover,.Button--color--teal:focus{background-color:#13c4bc;color:#fff}.Button--color--blue{transition:color 50ms,background-color 50ms;background-color:#1c71b1;color:#fff}.Button--color--blue:hover{transition:color 0ms,background-color 0ms}.Button--color--blue:focus{transition:color .1s,background-color .1s}.Button--color--blue:hover,.Button--color--blue:focus{background-color:#3a95d9;color:#fff}.Button--color--dark-blue{transition:color 50ms,background-color 50ms;background-color:#003e6e;color:#fff}.Button--color--dark-blue:hover{transition:color 0ms,background-color 0ms}.Button--color--dark-blue:focus{transition:color .1s,background-color .1s}.Button--color--dark-blue:hover,.Button--color--dark-blue:focus{background-color:#135b92;color:#fff}.Button--color--violet{transition:color 50ms,background-color 50ms;background-color:#552dab;color:#fff}.Button--color--violet:hover{transition:color 0ms,background-color 0ms}.Button--color--violet:focus{transition:color .1s,background-color .1s}.Button--color--violet:hover,.Button--color--violet:focus{background-color:#7953cc;color:#fff}.Button--color--purple{transition:color 50ms,background-color 50ms;background-color:#8b2baa;color:#fff}.Button--color--purple:hover{transition:color 0ms,background-color 0ms}.Button--color--purple:focus{transition:color .1s,background-color .1s}.Button--color--purple:hover,.Button--color--purple:focus{background-color:#ad4fcd;color:#fff}.Button--color--pink{transition:color 50ms,background-color 50ms;background-color:#cf2082;color:#fff}.Button--color--pink:hover{transition:color 0ms,background-color 0ms}.Button--color--pink:focus{transition:color .1s,background-color .1s}.Button--color--pink:hover,.Button--color--pink:focus{background-color:#e257a5;color:#fff}.Button--color--brown{transition:color 50ms,background-color 50ms;background-color:#8c5836;color:#fff}.Button--color--brown:hover{transition:color 0ms,background-color 0ms}.Button--color--brown:focus{transition:color .1s,background-color .1s}.Button--color--brown:hover,.Button--color--brown:focus{background-color:#b47851;color:#fff}.Button--color--grey{transition:color 50ms,background-color 50ms;background-color:#646464;color:#fff}.Button--color--grey:hover{transition:color 0ms,background-color 0ms}.Button--color--grey:focus{transition:color .1s,background-color .1s}.Button--color--grey:hover,.Button--color--grey:focus{background-color:#868686;color:#fff}.Button--color--light-grey{transition:color 50ms,background-color 50ms;background-color:#919191;color:#fff}.Button--color--light-grey:hover{transition:color 0ms,background-color 0ms}.Button--color--light-grey:focus{transition:color .1s,background-color .1s}.Button--color--light-grey:hover,.Button--color--light-grey:focus{background-color:#bababa;color:#fff}.Button--color--good{transition:color 50ms,background-color 50ms;background-color:#4d9121;color:#fff}.Button--color--good:hover{transition:color 0ms,background-color 0ms}.Button--color--good:focus{transition:color .1s,background-color .1s}.Button--color--good:hover,.Button--color--good:focus{background-color:#6cba39;color:#fff}.Button--color--average{transition:color 50ms,background-color 50ms;background-color:#cd7a0d;color:#fff}.Button--color--average:hover{transition:color 0ms,background-color 0ms}.Button--color--average:focus{transition:color .1s,background-color .1s}.Button--color--average:hover,.Button--color--average:focus{background-color:#ed9d35;color:#fff}.Button--color--bad{transition:color 50ms,background-color 50ms;background-color:#bd2020;color:#fff}.Button--color--bad:hover{transition:color 0ms,background-color 0ms}.Button--color--bad:focus{transition:color .1s,background-color .1s}.Button--color--bad:hover,.Button--color--bad:focus{background-color:#dc4848;color:#fff}.Button--color--label{transition:color 50ms,background-color 50ms;background-color:#657a94;color:#fff}.Button--color--label:hover{transition:color 0ms,background-color 0ms}.Button--color--label:focus{transition:color .1s,background-color .1s}.Button--color--label:hover,.Button--color--label:focus{background-color:#91a1b3;color:#fff}.Button--color--xeno{transition:color 50ms,background-color 50ms;background-color:#462f4e;color:#fff}.Button--color--xeno:hover{transition:color 0ms,background-color 0ms}.Button--color--xeno:focus{transition:color .1s,background-color .1s}.Button--color--xeno:hover,.Button--color--xeno:focus{background-color:#64496d;color:#fff}.Button--color--default{transition:color 50ms,background-color 50ms;background-color:#3e6189;color:#fff}.Button--color--default:hover{transition:color 0ms,background-color 0ms}.Button--color--default:focus{transition:color .1s,background-color .1s}.Button--color--default:hover,.Button--color--default:focus{background-color:#5c83b0;color:#fff}.Button--color--caution{transition:color 50ms,background-color 50ms;background-color:#d9b804;color:#000}.Button--color--caution:hover{transition:color 0ms,background-color 0ms}.Button--color--caution:focus{transition:color .1s,background-color .1s}.Button--color--caution:hover,.Button--color--caution:focus{background-color:#f5d72e;color:#000}.Button--color--danger{transition:color 50ms,background-color 50ms;background-color:#bd2020;color:#fff}.Button--color--danger:hover{transition:color 0ms,background-color 0ms}.Button--color--danger:focus{transition:color .1s,background-color .1s}.Button--color--danger:hover,.Button--color--danger:focus{background-color:#dc4848;color:#fff}.Button--color--transparent{transition:color 50ms,background-color 50ms;background-color:#202020;color:#fff;background-color:rgba(32,32,32,0);color:rgba(255,255,255,.5)}.Button--color--transparent:hover{transition:color 0ms,background-color 0ms}.Button--color--transparent:focus{transition:color .1s,background-color .1s}.Button--color--transparent:hover,.Button--color--transparent:focus{background-color:#383838;color:#fff}.Button--disabled{background-color:#999!important}.Button--selected{transition:color 50ms,background-color 50ms;background-color:#1b9638;color:#fff}.Button--selected:hover{transition:color 0ms,background-color 0ms}.Button--selected:focus{transition:color .1s,background-color .1s}.Button--selected:hover,.Button--selected:focus{background-color:#32c154;color:#fff}.Button--flex{display:inline-flex;flex-direction:column}.Button--flex--fluid{width:100%}.Button--verticalAlignContent--top{justify-content:flex-start}.Button--verticalAlignContent--middle{justify-content:center}.Button--verticalAlignContent--bottom{justify-content:flex-end}.Button__content{display:block;align-self:stretch}.ColorBox{display:inline-block;width:1em;height:1em;line-height:1em;text-align:center}.Dimmer{display:flex;justify-content:center;align-items:center;position:absolute;top:0;bottom:0;left:0;right:0;background-color:rgba(0,0,0,.75);z-index:1}.Dropdown{position:relative}.Dropdown__control{position:relative;display:inline-block;font-family:Verdana,sans-serif;font-size:1em;width:8.3333333333em;line-height:1.4166666667em;-ms-user-select:none;user-select:none}.Dropdown__arrow-button{float:right;padding-left:.35em;width:1.2em;height:1.8333333333em;border-left:.0833333333em solid #000;border-left:.0833333333em solid rgba(0,0,0,.25)}.Dropdown__menu{position:absolute;overflow-y:auto;z-index:5;width:8.3333333333em;max-height:16.6666666667em;overflow-y:scroll;border-radius:0 0 .1666666667em .1666666667em;color:#fff;background-color:#000;background-color:rgba(0,0,0,.75)}.Dropdown__menu-noscroll{position:absolute;overflow-y:auto;z-index:5;width:8.3333333333em;max-height:16.6666666667em;border-radius:0 0 .1666666667em .1666666667em;color:#fff;background-color:#000;background-color:rgba(0,0,0,.75)}.Dropdown__menuentry{padding:.1666666667em .3333333333em;font-family:Verdana,sans-serif;font-size:1em;line-height:1.4166666667em;transition:background-color .1s ease-out}.Dropdown__menuentry:hover{background-color:rgba(255,255,255,.2);transition:background-color 0ms}.Dropdown__over{top:auto;bottom:100%}.Dropdown__selected-text{display:inline-block;text-overflow:ellipsis;white-space:nowrap;height:1.4166666667em;width:calc(100% - 1.2em)}.Flex{display:-ms-flexbox;display:flex}.Flex--inline{display:inline-flex}.Flex--iefix{display:block}.Flex--iefix.Flex--inline,.Flex__item--iefix{display:inline-block}.Flex--iefix--column>.Flex__item--iefix{display:block}.Knob{position:relative;font-size:1rem;width:2.6em;height:2.6em;margin:0 auto -.2em;cursor:n-resize}.Knob:after{content:".";color:rgba(0,0,0,0);line-height:2.5em}.Knob__circle{position:absolute;top:.1em;bottom:.1em;left:.1em;right:.1em;margin:.3em;background-color:#333;background-image:linear-gradient(to bottom,rgba(255,255,255,.15),rgba(255,255,255,0));border-radius:50%;box-shadow:0 .05em .5em rgba(0,0,0,.5)}.Knob__cursorBox{position:absolute;top:0;bottom:0;left:0;right:0}.Knob__cursor{position:relative;top:.05em;margin:0 auto;width:.2em;height:.8em;background-color:rgba(255,255,255,.9)}.Knob__popupValue{position:absolute;top:-2rem;right:50%;font-size:1rem;text-align:center;padding:.25rem .5rem;color:#fff;background-color:#000;transform:translate(50%);white-space:nowrap}.Knob__ring{position:absolute;top:0;bottom:0;left:0;right:0;padding:.1em}.Knob__ringTrackPivot{transform:rotate(135deg)}.Knob__ringTrack{fill:rgba(0,0,0,0);stroke:rgba(255,255,255,.1);stroke-width:8;stroke-linecap:round;stroke-dasharray:235.62}.Knob__ringFillPivot{transform:rotate(135deg)}.Knob--bipolar .Knob__ringFillPivot{transform:rotate(270deg)}.Knob__ringFill{fill:rgba(0,0,0,0);stroke:#6a96c9;stroke-width:8;stroke-linecap:round;stroke-dasharray:314.16;transition:stroke 50ms ease-out}.Knob--color--black .Knob__ringFill{stroke:#1a1a1a}.Knob--color--white .Knob__ringFill{stroke:#fff}.Knob--color--red .Knob__ringFill{stroke:#df3e3e}.Knob--color--orange .Knob__ringFill{stroke:#f37f33}.Knob--color--yellow .Knob__ringFill{stroke:#fbda21}.Knob--color--olive .Knob__ringFill{stroke:#cbe41c}.Knob--color--green .Knob__ringFill{stroke:#25ca4c}.Knob--color--teal .Knob__ringFill{stroke:#00d6cc}.Knob--color--blue .Knob__ringFill{stroke:#2e93de}.Knob--color--dark-blue .Knob__ringFill{stroke:#005fa7}.Knob--color--violet .Knob__ringFill{stroke:#7349cf}.Knob--color--purple .Knob__ringFill{stroke:#ad45d0}.Knob--color--pink .Knob__ringFill{stroke:#e34da1}.Knob--color--brown .Knob__ringFill{stroke:#b97447}.Knob--color--grey .Knob__ringFill{stroke:#848484}.Knob--color--light-grey .Knob__ringFill{stroke:#b3b3b3}.Knob--color--good .Knob__ringFill{stroke:#68c22d}.Knob--color--average .Knob__ringFill{stroke:#f29a29}.Knob--color--bad .Knob__ringFill{stroke:#df3e3e}.Knob--color--label .Knob__ringFill{stroke:#8b9bb0}.Knob--color--xeno .Knob__ringFill{stroke:#664573}.LabeledList{display:table;width:100%;width:calc(100% + 1em);border-collapse:collapse;border-spacing:0;margin:-.25em -.5em 0;padding:0}.LabeledList__row{display:table-row}.LabeledList__row:last-child .LabeledList__cell{padding-bottom:0}.LabeledList__cell{display:table-cell;margin:0;padding:.25em .5em;border:0;text-align:left}.LabeledList__label--nowrap{width:1%;white-space:nowrap;min-width:5em}.LabeledList__buttons{width:.1%;white-space:nowrap;text-align:right;padding-top:.0833333333em;padding-bottom:0}.Modal{background-color:#202020;max-width:calc(100% - 1rem);padding:1rem}.NoticeBox{padding:.33em .5em;margin-bottom:.5em;box-shadow:none;font-weight:700;font-style:italic;color:#000;background-color:#bb9b68;background-image:repeating-linear-gradient(-45deg,transparent,transparent .8333333333em,rgba(0,0,0,.1) .8333333333em,rgba(0,0,0,.1) 1.6666666667em)}.NoticeBox--color--black{color:#fff;background-color:#000}.NoticeBox--color--white{color:#000;background-color:#b3b3b3}.NoticeBox--color--red{color:#fff;background-color:#701f1f}.NoticeBox--color--orange{color:#fff;background-color:#854114}.NoticeBox--color--yellow{color:#000;background-color:#83710d}.NoticeBox--color--olive{color:#000;background-color:#576015}.NoticeBox--color--green{color:#fff;background-color:#174e24}.NoticeBox--color--teal{color:#fff;background-color:#064845}.NoticeBox--color--blue{color:#fff;background-color:#1b4565}.NoticeBox--color--dark-blue{color:#fff;background-color:#02121f}.NoticeBox--color--violet{color:#fff;background-color:#3b2864}.NoticeBox--color--purple{color:#fff;background-color:#542663}.NoticeBox--color--pink{color:#fff;background-color:#802257}.NoticeBox--color--brown{color:#fff;background-color:#4c3729}.NoticeBox--color--grey{color:#fff;background-color:#3e3e3e}.NoticeBox--color--light-grey{color:#fff;background-color:#6a6a6a}.NoticeBox--color--good{color:#fff;background-color:#2e4b1a}.NoticeBox--color--average{color:#fff;background-color:#7b4e13}.NoticeBox--color--bad{color:#fff;background-color:#701f1f}.NoticeBox--color--label{color:#fff;background-color:#53565a}.NoticeBox--color--xeno{color:#fff;background-color:#19161b}.NoticeBox--type--info{color:#fff;background-color:#235982}.NoticeBox--type--success{color:#fff;background-color:#1e662f}.NoticeBox--type--warning{color:#fff;background-color:#a95219}.NoticeBox--type--danger{color:#fff;background-color:#8f2828}.NumberInput{position:relative;display:inline-block;border:.0833333333em solid #88bfff;border:.0833333333em solid rgba(136,191,255,.75);border-radius:.16em;color:#88bfff;background-color:#0a0a0a;padding:0 .3333333333em;margin-right:.1666666667em;line-height:1.4166666667em;text-align:right;overflow:visible;cursor:n-resize}.NumberInput--fluid{display:block}.NumberInput__content{margin-left:.5em}.NumberInput__barContainer{position:absolute;top:.1666666667em;bottom:.1666666667em;left:.1666666667em}.NumberInput__bar{position:absolute;bottom:0;left:0;width:.25em;box-sizing:border-box;border-bottom:.0833333333em solid #88bfff;background-color:#88bfff}.NumberInput__input{display:block;position:absolute;top:0;bottom:0;left:0;right:0;border:0;outline:0;width:100%;font-size:1em;line-height:1.4166666667em;height:1.4166666667em;margin:0;padding:0 .5em;font-family:Verdana,sans-serif;background-color:#0a0a0a;color:#fff;text-align:right}.ProgressBar{display:inline-block;position:relative;width:100%;padding:0 .5em;border-width:.0833333333em!important;border-style:solid!important;border-radius:.16em;background-color:rgba(0,0,0,0);transition:border-color .9s ease-out}.ProgressBar__fill{position:absolute;top:-.5px;left:0;bottom:-.5px}.ProgressBar__fill--animated{transition:background-color .9s ease-out,width .9s ease-out}.ProgressBar__content{position:relative;line-height:1.4166666667em;width:100%;text-align:right}.ProgressBar--color--default{border:.0833333333em solid #3e6189}.ProgressBar--color--default .ProgressBar__fill{background-color:#3e6189}.ProgressBar--color--black{border-color:#000!important}.ProgressBar--color--black .ProgressBar__fill{background-color:#000}.ProgressBar--color--white{border-color:#d9d9d9!important}.ProgressBar--color--white .ProgressBar__fill{background-color:#d9d9d9}.ProgressBar--color--red{border-color:#bd2020!important}.ProgressBar--color--red .ProgressBar__fill{background-color:#bd2020}.ProgressBar--color--orange{border-color:#d95e0c!important}.ProgressBar--color--orange .ProgressBar__fill{background-color:#d95e0c}.ProgressBar--color--yellow{border-color:#d9b804!important}.ProgressBar--color--yellow .ProgressBar__fill{background-color:#d9b804}.ProgressBar--color--olive{border-color:#9aad14!important}.ProgressBar--color--olive .ProgressBar__fill{background-color:#9aad14}.ProgressBar--color--green{border-color:#1b9638!important}.ProgressBar--color--green .ProgressBar__fill{background-color:#1b9638}.ProgressBar--color--teal{border-color:#009a93!important}.ProgressBar--color--teal .ProgressBar__fill{background-color:#009a93}.ProgressBar--color--blue{border-color:#1c71b1!important}.ProgressBar--color--blue .ProgressBar__fill{background-color:#1c71b1}.ProgressBar--color--dark-blue{border-color:#003e6e!important}.ProgressBar--color--dark-blue .ProgressBar__fill{background-color:#003e6e}.ProgressBar--color--violet{border-color:#552dab!important}.ProgressBar--color--violet .ProgressBar__fill{background-color:#552dab}.ProgressBar--color--purple{border-color:#8b2baa!important}.ProgressBar--color--purple .ProgressBar__fill{background-color:#8b2baa}.ProgressBar--color--pink{border-color:#cf2082!important}.ProgressBar--color--pink .ProgressBar__fill{background-color:#cf2082}.ProgressBar--color--brown{border-color:#8c5836!important}.ProgressBar--color--brown .ProgressBar__fill{background-color:#8c5836}.ProgressBar--color--grey{border-color:#646464!important}.ProgressBar--color--grey .ProgressBar__fill{background-color:#646464}.ProgressBar--color--light-grey{border-color:#919191!important}.ProgressBar--color--light-grey .ProgressBar__fill{background-color:#919191}.ProgressBar--color--good{border-color:#4d9121!important}.ProgressBar--color--good .ProgressBar__fill{background-color:#4d9121}.ProgressBar--color--average{border-color:#cd7a0d!important}.ProgressBar--color--average .ProgressBar__fill{background-color:#cd7a0d}.ProgressBar--color--bad{border-color:#bd2020!important}.ProgressBar--color--bad .ProgressBar__fill{background-color:#bd2020}.ProgressBar--color--label{border-color:#657a94!important}.ProgressBar--color--label .ProgressBar__fill{background-color:#657a94}.ProgressBar--color--xeno{border-color:#462f4e!important}.ProgressBar--color--xeno .ProgressBar__fill{background-color:#462f4e}.Section{position:relative;margin-bottom:.5em;background-color:#131313;box-sizing:border-box}.Section:last-child{margin-bottom:0}.Section__title{position:relative;padding:.5em;border-bottom:.1666666667em solid #4972a1}.Section__titleText{font-size:1.1666666667em;font-weight:700;color:#fff}.Section__buttons{position:absolute;display:inline-block;right:.5em;margin-top:-.0833333333em}.Section__rest{position:relative}.Section__content{padding:.66em .5em}.Section--fitted>.Section__rest>.Section__content{padding:0}.Section--fill{display:flex;flex-direction:column;height:100%}.Section--fill>.Section__rest{flex-grow:1}.Section--fill>.Section__rest>.Section__content{height:100%}.Section--fill.Section--scrollable>.Section__rest>.Section__content{position:absolute;top:0;left:0;right:0;bottom:0}.Section--fill.Section--iefix{display:table!important;width:100%!important;height:100%!important;border-collapse:collapse;border-spacing:0}.Section--fill.Section--iefix>.Section__rest{display:table-row!important;height:100%!important}.Section--scrollable{overflow-x:hidden;overflow-y:hidden}.Section--scrollable>.Section__rest>.Section__content{overflow-y:scroll;overflow-x:hidden}.Section--scrollableHorizontal{overflow-x:hidden;overflow-y:hidden}.Section--scrollableHorizontal>.Section__rest>.Section__content{overflow-y:hidden;overflow-x:scroll}.Section--scrollable.Section--scrollableHorizontal{overflow-x:hidden;overflow-y:hidden}.Section--scrollable.Section--scrollableHorizontal>.Section__rest>.Section__content{overflow-y:scroll;overflow-x:scroll}.Section .Section{background-color:rgba(0,0,0,0);margin-left:-.5em;margin-right:-.5em}.Section .Section:first-child{margin-top:-.5em}.Section .Section .Section__titleText{font-size:1.0833333333em}.Section .Section .Section .Section__titleText{font-size:1em}.Slider{cursor:e-resize}.Slider__cursorOffset{position:absolute;top:0;left:0;bottom:0;transition:none!important}.Slider__cursor{position:absolute;top:0;right:-.0833333333em;bottom:0;width:0;border-left:.1666666667em solid #fff}.Slider__pointer{position:absolute;right:-.4166666667em;bottom:-.3333333333em;width:0;height:0;border-left:.4166666667em solid rgba(0,0,0,0);border-right:.4166666667em solid rgba(0,0,0,0);border-bottom:.4166666667em solid #fff}.Slider__popupValue{position:absolute;right:0;top:-2rem;font-size:1rem;padding:.25rem .5rem;color:#fff;background-color:#000;transform:translate(50%);white-space:nowrap}.Divider--horizontal{margin:.5em 0}.Divider--horizontal:not(.Divider--hidden){border-top:.1666666667em solid rgba(255,255,255,.1)}.Divider--vertical{height:100%;margin:0 .5em}.Divider--vertical:not(.Divider--hidden){border-left:.1666666667em solid rgba(255,255,255,.1)}.Stack--fill{height:100%}.Stack--horizontal>.Stack__item{margin-left:.5em}.Stack--horizontal>.Stack__item:first-child{margin-left:0}.Stack--vertical>.Stack__item{margin-top:.5em}.Stack--vertical>.Stack__item:first-child{margin-top:0}.Stack--horizontal>.Stack__divider:not(.Stack__divider--hidden){border-left:.1666666667em solid rgba(255,255,255,.1)}.Stack--vertical>.Stack__divider:not(.Stack__divider--hidden){border-top:.1666666667em solid rgba(255,255,255,.1)}.Table{display:table;width:100%;border-collapse:collapse;border-spacing:0;margin:0}.Table--collapsing{width:auto}.Table__row{display:table-row}.Table__cell{display:table-cell;padding:0 .25em}.Table__cell:first-child{padding-left:0}.Table__cell:last-child{padding-right:0}.Table__row--header .Table__cell,.Table__cell--header{font-weight:700;padding-bottom:.5em}.Table__cell--collapsing{width:1%;white-space:nowrap}.Tabs{display:flex;align-items:stretch;overflow:hidden;background-color:#131313}.Tabs--fill{height:100%}.Section .Tabs{background-color:rgba(0,0,0,0)}.Section:not(.Section--fitted) .Tabs{margin:0 -.5em .5em}.Section:not(.Section--fitted) .Tabs:first-child{margin-top:-.5em}.Tabs--vertical{flex-direction:column;padding:.25em 0 .25em .25em}.Tabs--horizontal{margin-bottom:.5em;padding:.25em .25em 0}.Tabs--horizontal:last-child{margin-bottom:0}.Tabs__Tab{flex-grow:0}.Tabs--fluid .Tabs__Tab{flex-grow:1}.Tab{display:flex;align-items:center;justify-content:space-between;background-color:rgba(0,0,0,0);color:rgba(255,255,255,.5);min-height:2.25em;min-width:4em}.Tab:not(.Tab--selected):hover{background-color:rgba(255,255,255,.075)}.Tab--selected{background-color:rgba(255,255,255,.125);color:#dfe7f0}.Tab__text{flex-grow:1;margin:0 .5em}.Tab__left{min-width:1.5em;text-align:center;margin-left:.25em}.Tab__right{min-width:1.5em;text-align:center;margin-right:.25em}.Tabs--horizontal .Tab{border-top:.1666666667em solid rgba(0,0,0,0);border-bottom:.1666666667em solid rgba(0,0,0,0);border-top-left-radius:.25em;border-top-right-radius:.25em}.Tabs--horizontal .Tab--selected{border-bottom:.1666666667em solid #d4dfec}.Tabs--vertical .Tab{min-height:2em;border-left:.1666666667em solid rgba(0,0,0,0);border-right:.1666666667em solid rgba(0,0,0,0);border-top-left-radius:.25em;border-bottom-left-radius:.25em}.Tabs--vertical .Tab--selected{border-right:.1666666667em solid #d4dfec}.Tab--selected.Tab--color--black{color:#535353}.Tabs--horizontal .Tab--selected.Tab--color--black{border-bottom-color:#1a1a1a}.Tabs--vertical .Tab--selected.Tab--color--black{border-right-color:#1a1a1a}.Tab--selected.Tab--color--white{color:#fff}.Tabs--horizontal .Tab--selected.Tab--color--white{border-bottom-color:#fff}.Tabs--vertical .Tab--selected.Tab--color--white{border-right-color:#fff}.Tab--selected.Tab--color--red{color:#e76e6e}.Tabs--horizontal .Tab--selected.Tab--color--red{border-bottom-color:#df3e3e}.Tabs--vertical .Tab--selected.Tab--color--red{border-right-color:#df3e3e}.Tab--selected.Tab--color--orange{color:#f69f66}.Tabs--horizontal .Tab--selected.Tab--color--orange{border-bottom-color:#f37f33}.Tabs--vertical .Tab--selected.Tab--color--orange{border-right-color:#f37f33}.Tab--selected.Tab--color--yellow{color:#fce358}.Tabs--horizontal .Tab--selected.Tab--color--yellow{border-bottom-color:#fbda21}.Tabs--vertical .Tab--selected.Tab--color--yellow{border-right-color:#fbda21}.Tab--selected.Tab--color--olive{color:#d8eb55}.Tabs--horizontal .Tab--selected.Tab--color--olive{border-bottom-color:#cbe41c}.Tabs--vertical .Tab--selected.Tab--color--olive{border-right-color:#cbe41c}.Tab--selected.Tab--color--green{color:#53e074}.Tabs--horizontal .Tab--selected.Tab--color--green{border-bottom-color:#25ca4c}.Tabs--vertical .Tab--selected.Tab--color--green{border-right-color:#25ca4c}.Tab--selected.Tab--color--teal{color:#21fff5}.Tabs--horizontal .Tab--selected.Tab--color--teal{border-bottom-color:#00d6cc}.Tabs--vertical .Tab--selected.Tab--color--teal{border-right-color:#00d6cc}.Tab--selected.Tab--color--blue{color:#62aee6}.Tabs--horizontal .Tab--selected.Tab--color--blue{border-bottom-color:#2e93de}.Tabs--vertical .Tab--selected.Tab--color--blue{border-right-color:#2e93de}.Tab--selected.Tab--color--dark-blue{color:#008ffd}.Tabs--horizontal .Tab--selected.Tab--color--dark-blue{border-bottom-color:#005fa7}.Tabs--vertical .Tab--selected.Tab--color--dark-blue{border-right-color:#005fa7}.Tab--selected.Tab--color--violet{color:#9676db}.Tabs--horizontal .Tab--selected.Tab--color--violet{border-bottom-color:#7349cf}.Tabs--vertical .Tab--selected.Tab--color--violet{border-right-color:#7349cf}.Tab--selected.Tab--color--purple{color:#c274db}.Tabs--horizontal .Tab--selected.Tab--color--purple{border-bottom-color:#ad45d0}.Tabs--vertical .Tab--selected.Tab--color--purple{border-right-color:#ad45d0}.Tab--selected.Tab--color--pink{color:#ea79b9}.Tabs--horizontal .Tab--selected.Tab--color--pink{border-bottom-color:#e34da1}.Tabs--vertical .Tab--selected.Tab--color--pink{border-right-color:#e34da1}.Tab--selected.Tab--color--brown{color:#ca9775}.Tabs--horizontal .Tab--selected.Tab--color--brown{border-bottom-color:#b97447}.Tabs--vertical .Tab--selected.Tab--color--brown{border-right-color:#b97447}.Tab--selected.Tab--color--grey{color:#a3a3a3}.Tabs--horizontal .Tab--selected.Tab--color--grey{border-bottom-color:#848484}.Tabs--vertical .Tab--selected.Tab--color--grey{border-right-color:#848484}.Tab--selected.Tab--color--light-grey{color:#c6c6c6}.Tabs--horizontal .Tab--selected.Tab--color--light-grey{border-bottom-color:#b3b3b3}.Tabs--vertical .Tab--selected.Tab--color--light-grey{border-right-color:#b3b3b3}.Tab--selected.Tab--color--good{color:#8cd95a}.Tabs--horizontal .Tab--selected.Tab--color--good{border-bottom-color:#68c22d}.Tabs--vertical .Tab--selected.Tab--color--good{border-right-color:#68c22d}.Tab--selected.Tab--color--average{color:#f5b35e}.Tabs--horizontal .Tab--selected.Tab--color--average{border-bottom-color:#f29a29}.Tabs--vertical .Tab--selected.Tab--color--average{border-right-color:#f29a29}.Tab--selected.Tab--color--bad{color:#e76e6e}.Tabs--horizontal .Tab--selected.Tab--color--bad{border-bottom-color:#df3e3e}.Tabs--vertical .Tab--selected.Tab--color--bad{border-right-color:#df3e3e}.Tab--selected.Tab--color--label{color:#a8b4c4}.Tabs--horizontal .Tab--selected.Tab--color--label{border-bottom-color:#8b9bb0}.Tabs--vertical .Tab--selected.Tab--color--label{border-right-color:#8b9bb0}.Tab--selected.Tab--color--xeno{color:#9366a3}.Tabs--horizontal .Tab--selected.Tab--color--xeno{border-bottom-color:#664573}.Tabs--vertical .Tab--selected.Tab--color--xeno{border-right-color:#664573}.Input{position:relative;display:inline-block;width:10em;border:.0833333333em solid #88bfff;border:.0833333333em solid rgba(136,191,255,.75);border-radius:.16em;color:#fff;background-color:#0a0a0a;padding:0 .3333333333em;margin-right:.1666666667em;line-height:1.4166666667em;overflow:visible}.Input--fluid{display:block;width:auto}.Input__baseline{display:inline-block;color:rgba(0,0,0,0)}.Input__input{display:block;position:absolute;top:0;bottom:0;left:0;right:0;border:0;outline:0;width:100%;font-size:1em;line-height:1.4166666667em;height:1.4166666667em;margin:0;padding:0 .5em;font-family:Verdana,sans-serif;background-color:rgba(0,0,0,0);color:#fff;color:inherit}.Input__input:-ms-input-placeholder{font-style:italic;color:#777;color:rgba(255,255,255,.45)}.Input--monospace .Input__input{font-family:Consolas,monospace}.TextArea{position:relative;display:inline-block;border:.0833333333em solid #88bfff;border:.0833333333em solid rgba(136,191,255,.75);border-radius:.16em;background-color:#0a0a0a;margin-right:.1666666667em;line-height:1.4166666667em;box-sizing:border-box;width:100%}.TextArea--fluid{display:block;width:auto;height:auto}.TextArea--noborder{border:0px}.TextArea__textarea.TextArea__textarea--scrollable{overflow:auto;overflow-x:hidden;overflow-y:scroll}.TextArea__textarea{display:block;position:absolute;top:0;bottom:0;left:0;right:0;border:0;outline:0;width:100%;height:100%;font-size:1em;line-height:1.4166666667em;min-height:1.4166666667em;margin:0;padding:0 .5em;font-family:inherit;background-color:rgba(0,0,0,0);color:inherit;box-sizing:border-box;word-wrap:break-word;overflow:hidden}.TextArea__textarea:-ms-input-placeholder{font-style:italic;color:#777;color:rgba(255,255,255,.45)}.TextArea__textarea_custom{overflow:visible;white-space:pre-wrap}.Tooltip{z-index:2;padding:.5em .75em;pointer-events:none;text-align:left;transition:opacity .15s ease-out;background-color:#000;color:#fff;box-shadow:.1em .1em 1.25em -.1em rgba(0,0,0,.5);border-radius:.16em;max-width:20.8333333333em}.Chat{color:#abc6ec}.Chat__badge{display:inline-block;min-width:.5em;font-size:.7em;padding:.2em .3em;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:middle;background-color:#dc143c;border-radius:10px;transition:font-size .2s ease-out}.Chat__badge:before{content:"x"}.Chat__badge--animate{font-size:.9em;transition:font-size 0ms}.Chat__scrollButton{position:fixed;right:2em;bottom:1em}.Chat__reconnected{font-size:.85em;text-align:center;margin:1em 0 2em}.Chat__reconnected:before{content:"Reconnected";display:inline-block;border-radius:1em;padding:0 .7em;color:#db2828;background-color:#131313}.Chat__reconnected:after{content:"";display:block;margin-top:-.75em;border-bottom:.1666666667em solid #db2828}.Chat__highlight{color:#000}.Chat__highlight--restricted{color:#fff;background-color:#a00;font-weight:700}.ChatMessage{word-wrap:break-word}.ChatMessage--highlighted{position:relative;border-left:.1666666667em solid #fd4;padding-left:.5em}.ChatMessage--highlighted:after{content:"";position:absolute;top:0;bottom:0;left:0;right:0;background-color:rgba(255,221,68,.1);pointer-events:none}.Ping{position:relative;padding:.125em .25em;border:.0833333333em solid rgba(140,140,140,.5);border-radius:.25em;width:3.75em;text-align:right}.Ping__indicator{content:"";position:absolute;top:.5em;left:.5em;width:.5em;height:.5em;background-color:#888;border-radius:.25em}.Notifications{position:absolute;bottom:1em;left:1em;right:2em}.Notification{color:#fff;background-color:#dc143c;padding:.5em;margin:1em 0}.Notification:first-child{margin-top:0}.Notification:last-child{margin-bottom:0}.Layout,.Layout *{scrollbar-base-color:#181818;scrollbar-face-color:#363636;scrollbar-3dlight-color:#202020;scrollbar-highlight-color:#202020;scrollbar-track-color:#181818;scrollbar-arrow-color:#909090;scrollbar-shadow-color:#363636}.Layout__content{position:absolute;top:0;bottom:0;left:0;right:0;overflow-x:hidden;overflow-y:hidden}.Layout__content--scrollable{overflow-y:scroll;margin-bottom:0}.Window{position:fixed;top:0;bottom:0;left:0;right:0;color:#fff;background-color:#202020;background-image:linear-gradient(to bottom,#202020,#202020)}.Window__titleBar{position:fixed;z-index:1;top:0;left:0;width:100%;height:32px;height:2.6666666667rem}.Window__rest{position:fixed;top:32px;top:2.6666666667rem;bottom:0;left:0;right:0}.Window__contentPadding{margin:.5rem;height:100%;height:calc(100% - 1.01rem)}.Window__contentPadding:after{height:0}.Layout__content--scrollable .Window__contentPadding:after{display:block;content:"";height:.5rem}.Window__dimmer{position:fixed;top:0;bottom:0;left:0;right:0;background-color:rgba(56,56,56,.25);pointer-events:none}.Window__resizeHandle__se{position:fixed;bottom:0;right:0;width:20px;width:1.6666666667rem;height:20px;height:1.6666666667rem;cursor:se-resize}.Window__resizeHandle__s{position:fixed;bottom:0;left:0;right:0;height:6px;height:.5rem;cursor:s-resize}.Window__resizeHandle__e{position:fixed;top:0;bottom:0;right:0;width:3px;width:.25rem;cursor:e-resize}img{margin:0;padding:0;line-height:1;-ms-interpolation-mode:nearest-neighbor;image-rendering:pixelated}img.icon{height:1em;min-height:16px;width:auto;vertical-align:bottom}a{color:#397ea5}a.visited,a:visited{color:#7c00e6}a.popt{text-decoration:none}.popup{position:fixed;top:50%;left:50%;background:#ddd}.popup .close{position:absolute;background:#aaa;top:0;right:0;color:#333;text-decoration:none;z-index:2;padding:0 10px;height:30px;line-height:30px}.popup .close:hover{background:#999}.popup .head{background:#999;color:#ddd;padding:0 10px;height:30px;line-height:30px;text-transform:uppercase;font-size:.9em;font-weight:700;border-bottom:2px solid green}.popup input{border:1px solid #999;background:#fff;margin:0;padding:5px;outline:none;color:#333}.popup input[type=text]:hover,.popup input[type=text]:active,.popup input[type=text]:focus{border-color:green}.popup input[type=submit]{padding:5px 10px;background:#999;color:#ddd;text-transform:uppercase;font-size:.9em;font-weight:700}.popup input[type=submit]:hover,.popup input[type=submit]:focus,.popup input[type=submit]:active{background:#aaa;cursor:pointer}.changeFont{padding:10px}.changeFont a{display:block;text-decoration:none;padding:3px;color:#333}.changeFont a:hover{background:#ccc}.highlightPopup{padding:10px;text-align:center}.highlightPopup input[type=text]{display:block;width:215px;text-align:left;margin-top:5px}.highlightPopup input.highlightColor{background-color:#ff0}.highlightPopup input.highlightTermSubmit{margin-top:5px}.contextMenu{background-color:#ddd;position:fixed;margin:2px;width:150px}.contextMenu a{display:block;padding:2px 5px;text-decoration:none;color:#333}.contextMenu a:hover{background-color:#ccc}.filterMessages{padding:5px}.filterMessages div{padding:2px 0}.icon-stack{height:1em;line-height:1em;width:1em;vertical-align:middle;margin-top:-2px}.motd{color:#a4bad6;font-family:Verdana,sans-serif;white-space:normal}.motd h1,.motd h2,.motd h3,.motd h4,.motd h5,.motd h6{color:#a4bad6;text-decoration:underline}.motd a,.motd a:link,.motd a:visited,.motd a:active,.motd a:hover{color:#a4bad6}.bold,.name,.prefix,.ooc,.looc,.adminooc,.admin,.niche,.medal,.yell{font-weight:700}.italic,.italics{font-style:italic}.highlight{background:#ff0}h1,h2,h3,h4,h5,h6{color:#a4bad6;font-family:Georgia,Verdana,sans-serif}h1.alert,h2.alert{color:#a4bad6}em{font-style:normal;font-weight:700}.ooc{font-weight:700}.adminobserverooc{color:#09c;font-weight:700}.adminooc{color:#3d5bc3;font-weight:700}.adminsay{color:#9611d4;font-weight:700}.admin,.niche{color:#5975da;font-weight:700}.name{font-weight:700}.deadsay{color:#e2c1ff}.binarysay{color:#1e90ff}.binarysay a{color:#0f0}.binarysay a:active,.binarysay a:visited{color:#8f8}.radio{color:#1ecc43}.sciradio{color:#c68cfa}.comradio{color:#fcdf03}.secradio{color:#dd3535}.medradio{color:#57b8f0}.engradio{color:#f37746}.suppradio{color:#b88646}.servradio{color:#6ca729}.syndradio{color:#8f4a4b}.gangradio{color:#ac2ea1}.centcomradio{color:#2681a5}.aiprivradio{color:#d65d95}.redteamradio{color:#f44}.blueteamradio{color:#3434fd}.greenteamradio{color:#34fd34}.yellowteamradio{color:#fdfd34}.yell{font-weight:700}.alert{color:#d82020}.userdanger{color:#c51e1e;font-weight:700;font-size:185%}.bolddanger{color:#c51e1e;font-weight:700}.danger{color:#c51e1e}.warning{color:#c51e1e;font-style:italic}.alertwarning{color:red;font-weight:700}.boldwarning{color:#c51e1e;font-style:italic;font-weight:700}.announce,.boldannounce{color:#c51e1e;font-weight:700}.bigannounce{font-weight:700;font-size:115%}.greenannounce{color:#059223;font-weight:700}.info{color:#9ab0ff}.notice,.staff_ic{color:#6685f5}.tinynotice{color:#6685f5;font-size:85%}.tinynoticeital{color:#6685f5;font-style:italic;font-size:85%}.smallnotice{color:#6685f5;font-size:90%}.smallnoticeital{color:#6685f5;font-style:italic;font-size:90%}.boldnotice{color:#6685f5;font-weight:700}.hear{color:#6685f5;font-style:italic}.adminnotice{color:#6685f5}.adminhelp{color:red;font-weight:700}.unconscious{color:#a4bad6;font-weight:700}.suicide{color:#ff5050;font-style:italic}.green{color:#059223}.grey{color:#838383}.red{color:red}.blue{color:#215cff}.nicegreen{color:#059223}.boldnicegreen{color:#059223;font-weight:700}.cult{color:#973e3b}.cultitalic{color:#973e3b;font-style:italic}.cultbold{color:#973e3b;font-style:italic;font-weight:700}.cultboldtalic,.cultlarge{color:#973e3b;font-weight:700;font-size:185%}.narsie{color:#973e3b;font-weight:700;font-size:925%}.narsiesmall{color:#973e3b;font-weight:700;font-size:370%}.colossus{color:#7f282a;font-size:310%}.hierophant{color:#b441ee;font-weight:700;font-style:italic}.hierophant_warning{color:#c56bf1;font-style:italic}.purple{color:#9956d3}.holoparasite{color:#88809c}.revennotice{color:#c099e2}.revenboldnotice{color:#c099e2;font-weight:700}.revenbignotice{color:#c099e2;font-weight:700;font-size:185%}.revenminor{color:#823abb}.revenwarning{color:#760fbb;font-style:italic}.revendanger{color:#760fbb;font-weight:700;font-size:185%}.deconversion_message{color:#a947ff;font-size:185%;font-style:italic}.ghostalert{color:#60f;font-style:italic;font-weight:700}.alien{color:#855d85}.noticealien{color:#059223}.alertalien{color:#059223;font-weight:700}.changeling{color:#059223;font-style:italic}.alertsyndie{color:red;font-size:185%;font-weight:700}.spider{color:#80f;font-weight:700;font-size:185%}.interface{color:#750e75}.sans{font-family:Comic Sans MS,cursive,sans-serif}.papyrus{font-family:Papyrus,cursive,sans-serif}.robot{font-family:Courier New,cursive,sans-serif}.tape_recorder{color:red;font-family:Courier New,cursive,sans-serif}.command_headset{font-weight:700;font-size:160%}.small{font-size:60%}.big{font-size:185%}.reallybig{font-size:245%}.extremelybig{font-size:310%}.greentext{color:#059223;font-size:185%}.redtext{color:#c51e1e;font-size:185%}.clown{color:#ff70c1;font-size:160%;font-family:Comic Sans MS,cursive,sans-serif;font-weight:700}.singing{font-family:Trebuchet MS,cursive,sans-serif;font-style:italic}.his_grace{color:#15d512;font-family:Courier New,cursive,sans-serif;font-style:italic}.hypnophrase{color:#202020;font-weight:700;animation:hypnocolor 1.5s infinite;animation-direction:alternate}@keyframes hypnocolor{0%{color:#202020}25%{color:#4b02ac}50%{color:#9f41f1}75%{color:#541c9c}to{color:#7adbf3}}.phobia{color:#d00;font-weight:700;animation:phobia .75s infinite}@keyframes phobia{0%{color:#f75a5a}50%{color:#d00}to{color:#f75a5a}}.icon{height:1em;width:auto}.bigicon{font-size:2.5em}.memo{color:#638500;text-align:center}.memoedit{text-align:center;font-size:125%}.abductor{color:#c204c2;font-style:italic}.mind_control{color:#df3da9;font-size:100%;font-weight:700;font-style:italic}.slime{color:#00ced1}.drone{color:#848482}.monkey{color:#975032}.swarmer{color:#2c75ff}.resonate{color:#298f85}.monkeyhive{color:#a56408}.monkeylead{color:#af6805;font-size:80%}.connectionClosed,.fatalError{background:red;color:#fff;padding:5px}.connectionClosed.restored{background:green}.internal.boldnshit{color:#3d5bc3;font-weight:700}.text-normal{font-weight:400;font-style:normal}.hidden{display:none;visibility:hidden}.ml-1{margin-left:1em}.ml-2{margin-left:2em}.ml-3{margin-left:3em}.xooc{color:#ac04e9;font-weight:700;font-size:140%}.mooc{color:#090;font-weight:700;font-size:140%}.yooc{color:#999600;font-weight:700;font-size:140%}.headminsay{color:#653d78;font-weight:700}.radio{color:#b4b4b4}.deptradio{color:#939}.comradio{color:#779cc2}.centradio{color:#5c5c8a}.hcradio{color:#318779}.pvstradio{color:#9b0612}.cryoradio{color:#ad6d48}.airadio{color:#f0f}.secradio{color:#a52929}.engradio{color:#a66300}.sentryradio{color:#844300}.medradio{color:#008160}.supradio{color:#ba8e41}.jtacradio{color:#ad3b98}.intelradio{color:#027d02}.wyradio{color:#fe9b24}.pmcradio{color:#4dc5ce}.vairadio,.rmcradio{color:#e3580e}.cmbradio{color:#1b748c}.clfradio{color:#8e83ca}.alpharadio{color:#db2626}.bravoradio{color:#c68610}.charlieradio{color:#a5a}.deltaradio{color:#007fcf}.echoradio{color:#3eb489}.medium{font-size:110%}.big{font-size:115%}.large{font-size:125%}.extra_large{font-size:130%}.huge{font-size:150%}.underline{text-decoration:underline}.orange{color:#eca100}.normal{font-style:normal}.attack{color:#ff3838}.moderate{color:#c00}.disarm{color:#900}.passive{color:#600}.helpful{color:#368f31}.scanner{color:#ff3838}.scannerb{color:#ff3838;font-weight:700}.scannerburn{color:orange}.scannerburnb{color:orange;font-weight:700}.rose{color:#ff5050}.debuginfo{color:#493d26;font-style:italic}.xenonotice{color:#51a16c}.xenoboldnotice{color:#51a16c;font-weight:700}.xenowarning{color:#51a16c;font-style:italic}.xenominorwarning{color:#51a16c;font-weight:700;font-style:italic}.xenodanger{color:#51a16c;font-weight:700}.avoidharm{color:#72a0e5;font-weight:700}.highdanger{color:#ff3838;font-weight:700;font-size:140%}.xenohighdanger{color:#51a16c;font-weight:700;font-size:140%}.xenoannounce{color:#65c585;font-family:book-antiqua;font-weight:700;font-size:140%}.yautjabold{color:purple;font-weight:700}.yautjaboldbig{color:purple;font-weight:700;font-size:120%}.objectivebig{font-weight:700;font-size:130%}.objectivegreen{color:#0f0}.objectivered{color:red}.objectivesuccess{color:#0f0;font-weight:700;font-size:110%}.objectivefail{color:red;font-weight:700;font-size:110%}.xenotalk,.xeno{color:#c048c0;font-style:italic}.xenoleader{color:#996e99;font-style:italic;font-size:125%}.xenoqueen{color:#996e99;font-style:italic;font-weight:700;font-size:125%}.newscaster{color:maroon}.role_header{color:#e92d2d;display:block;text-align:center;font-weight:700;font-family:trebuchet-ms;font-size:150%}.role_body{color:#3a3ae9;display:block;text-align:center;font-size:125%}.round_header{color:#e92d2d;display:block;text-align:center;font-family:courier;font-weight:700;font-size:180%}.round_body{color:#c5c5c5;display:block;text-align:center;font-family:trebuchet-ms;font-weight:700;font-size:125%}.event_announcement{color:#600d48;font-family:arial-narrow;font-weight:700;font-size:125%}.announce_header{color:#cecece;font-weight:700;font-size:150%}.announce_header_blue,.announce_header_admin{color:#7575f3;font-weight:700;font-size:150%}.announce_body{color:#e92d2d;font-weight:400;font-size:125%}.centerbold{display:block;text-align:center;font-weight:700}.mod{color:#917455;font-weight:700}.modooc{color:#184880;font-weight:700}.adminmod{color:#7c440c;font-weight:700}.mentorsay{color:#d4af57;font-weight:700}.mentorhelp{color:#090;font-weight:700}.mentorbody{color:#da6200;font-weight:700}.mentorstaff,.staffsay{color:#b5850d;font-weight:700}.tajaran{color:#803b56}.tajaran_signlang{color:#941c1c}.skrell{color:#00ced1}.soghun{color:#228b22}.changeling{color:purple}.vox{color:#a0a}.monkey{color:#966c47}.german{color:#858f1e;font-family:Times New Roman,Times,serif}.spanish{color:#cf982b}.japanese{color:#940927}.chinese{color:#fe1919}.zombie{color:#2dacb1;font-style:italic}.rough{font-family:trebuchet-ms,cursive,sans-serif}.commando{color:#fe9b24;font-style:bold}.say_quote{font-family:Georgia,Verdana,sans-serif}.admin .message{color:#314cad}.admin .prefix{font-weight:bolder}.pm{font-size:110%}.deadsay{color:#8b4dff}.retro_translator{font-weight:700}.yautja_translator{color:#a00;font-weight:700;animation:glitch .5s infinite}.examine_block{background:#1b1c1e;border:1px solid #a4bad6;margin:.5em;padding:.5em .75em}.examine_block .icon{width:1.5em;height:1.5em;margin:0;padding:0}.tooltip{font-style:italic;border-bottom:1px dashed #fff}.theme-light .color-black{color:#000!important}.theme-light .color-white{color:#e6e6e6!important}.theme-light .color-red{color:#c82121!important}.theme-light .color-orange{color:#e6630d!important}.theme-light .color-yellow{color:#e5c304!important}.theme-light .color-olive{color:#a3b816!important}.theme-light .color-green{color:#1d9f3b!important}.theme-light .color-teal{color:#00a39c!important}.theme-light .color-blue{color:#1e78bb!important}.theme-light .color-dark-blue{color:#004274!important}.theme-light .color-violet{color:#5a30b5!important}.theme-light .color-purple{color:#932eb4!important}.theme-light .color-pink{color:#db228a!important}.theme-light .color-brown{color:#955d39!important}.theme-light .color-grey{color:#e6e6e6!important}.theme-light .color-light-grey{color:#999!important}.theme-light .color-good{color:#529923!important}.theme-light .color-average{color:#da810e!important}.theme-light .color-bad{color:#c82121!important}.theme-light .color-label{color:#353535!important}.theme-light .color-xeno{color:#4a3253!important}.theme-light .color-bg-black{background-color:#000!important}.theme-light .color-bg-white{background-color:#bfbfbf!important}.theme-light .color-bg-red{background-color:#a61c1c!important}.theme-light .color-bg-orange{background-color:#c0530b!important}.theme-light .color-bg-yellow{background-color:#bfa303!important}.theme-light .color-bg-olive{background-color:#889912!important}.theme-light .color-bg-green{background-color:#188532!important}.theme-light .color-bg-teal{background-color:#008882!important}.theme-light .color-bg-blue{background-color:#19649c!important}.theme-light .color-bg-dark-blue{background-color:#003761!important}.theme-light .color-bg-violet{background-color:#4b2897!important}.theme-light .color-bg-purple{background-color:#7a2696!important}.theme-light .color-bg-pink{background-color:#b61d73!important}.theme-light .color-bg-brown{background-color:#7c4d2f!important}.theme-light .color-bg-grey{background-color:#bfbfbf!important}.theme-light .color-bg-light-grey{background-color:gray!important}.theme-light .color-bg-good{background-color:#44801d!important}.theme-light .color-bg-average{background-color:#b56b0b!important}.theme-light .color-bg-bad{background-color:#a61c1c!important}.theme-light .color-bg-label{background-color:#2c2c2c!important}.theme-light .color-bg-xeno{background-color:#3e2945!important}.theme-light .Tabs{display:flex;align-items:stretch;overflow:hidden;background-color:#fff}.theme-light .Tabs--fill{height:100%}.theme-light .Section .Tabs{background-color:rgba(0,0,0,0)}.theme-light .Section:not(.Section--fitted) .Tabs{margin:0 -.5em .5em}.theme-light .Section:not(.Section--fitted) .Tabs:first-child{margin-top:-.5em}.theme-light .Tabs--vertical{flex-direction:column;padding:.25em 0 .25em .25em}.theme-light .Tabs--horizontal{margin-bottom:.5em;padding:.25em .25em 0}.theme-light .Tabs--horizontal:last-child{margin-bottom:0}.theme-light .Tabs__Tab{flex-grow:0}.theme-light .Tabs--fluid .Tabs__Tab{flex-grow:1}.theme-light .Tab{display:flex;align-items:center;justify-content:space-between;background-color:rgba(0,0,0,0);color:rgba(0,0,0,.5);min-height:2.25em;min-width:4em}.theme-light .Tab:not(.Tab--selected):hover{background-color:rgba(255,255,255,.075)}.theme-light .Tab--selected{background-color:rgba(255,255,255,.125);color:#404040}.theme-light .Tab__text{flex-grow:1;margin:0 .5em}.theme-light .Tab__left{min-width:1.5em;text-align:center;margin-left:.25em}.theme-light .Tab__right{min-width:1.5em;text-align:center;margin-right:.25em}.theme-light .Tabs--horizontal .Tab{border-top:.1666666667em solid rgba(0,0,0,0);border-bottom:.1666666667em solid rgba(0,0,0,0);border-top-left-radius:.25em;border-top-right-radius:.25em}.theme-light .Tabs--horizontal .Tab--selected{border-bottom:.1666666667em solid #000}.theme-light .Tabs--vertical .Tab{min-height:2em;border-left:.1666666667em solid rgba(0,0,0,0);border-right:.1666666667em solid rgba(0,0,0,0);border-top-left-radius:.25em;border-bottom-left-radius:.25em}.theme-light .Tabs--vertical .Tab--selected{border-right:.1666666667em solid #000}.theme-light .Tab--selected.Tab--color--black{color:#404040}.theme-light .Tabs--horizontal .Tab--selected.Tab--color--black{border-bottom-color:#000}.theme-light .Tabs--vertical .Tab--selected.Tab--color--black{border-right-color:#000}.theme-light .Tab--selected.Tab--color--white{color:#ececec}.theme-light .Tabs--horizontal .Tab--selected.Tab--color--white{border-bottom-color:#e6e6e6}.theme-light .Tabs--vertical .Tab--selected.Tab--color--white{border-right-color:#e6e6e6}.theme-light .Tab--selected.Tab--color--red{color:#e14d4d}.theme-light .Tabs--horizontal .Tab--selected.Tab--color--red{border-bottom-color:#c82121}.theme-light .Tabs--vertical .Tab--selected.Tab--color--red{border-right-color:#c82121}.theme-light .Tab--selected.Tab--color--orange{color:#f48942}.theme-light .Tabs--horizontal .Tab--selected.Tab--color--orange{border-bottom-color:#e6630d}.theme-light .Tabs--vertical .Tab--selected.Tab--color--orange{border-right-color:#e6630d}.theme-light .Tab--selected.Tab--color--yellow{color:#fcdd33}.theme-light .Tabs--horizontal .Tab--selected.Tab--color--yellow{border-bottom-color:#e5c304}.theme-light .Tabs--vertical .Tab--selected.Tab--color--yellow{border-right-color:#e5c304}.theme-light .Tab--selected.Tab--color--olive{color:#d0e732}.theme-light .Tabs--horizontal .Tab--selected.Tab--color--olive{border-bottom-color:#a3b816}.theme-light .Tabs--vertical .Tab--selected.Tab--color--olive{border-right-color:#a3b816}.theme-light .Tab--selected.Tab--color--green{color:#33da5a}.theme-light .Tabs--horizontal .Tab--selected.Tab--color--green{border-bottom-color:#1d9f3b}.theme-light .Tabs--vertical .Tab--selected.Tab--color--green{border-right-color:#1d9f3b}.theme-light .Tab--selected.Tab--color--teal{color:#00faef}.theme-light .Tabs--horizontal .Tab--selected.Tab--color--teal{border-bottom-color:#00a39c}.theme-light .Tabs--vertical .Tab--selected.Tab--color--teal{border-right-color:#00a39c}.theme-light .Tab--selected.Tab--color--blue{color:#419ce1}.theme-light .Tabs--horizontal .Tab--selected.Tab--color--blue{border-bottom-color:#1e78bb}.theme-light .Tabs--vertical .Tab--selected.Tab--color--blue{border-right-color:#1e78bb}.theme-light .Tab--selected.Tab--color--dark-blue{color:#0079d7}.theme-light .Tabs--horizontal .Tab--selected.Tab--color--dark-blue{border-bottom-color:#004274}.theme-light .Tabs--vertical .Tab--selected.Tab--color--dark-blue{border-right-color:#004274}.theme-light .Tab--selected.Tab--color--violet{color:#7f58d3}.theme-light .Tabs--horizontal .Tab--selected.Tab--color--violet{border-bottom-color:#5a30b5}.theme-light .Tabs--vertical .Tab--selected.Tab--color--violet{border-right-color:#5a30b5}.theme-light .Tab--selected.Tab--color--purple{color:#b455d4}.theme-light .Tabs--horizontal .Tab--selected.Tab--color--purple{border-bottom-color:#932eb4}.theme-light .Tabs--vertical .Tab--selected.Tab--color--purple{border-right-color:#932eb4}.theme-light .Tab--selected.Tab--color--pink{color:#e558a7}.theme-light .Tabs--horizontal .Tab--selected.Tab--color--pink{border-bottom-color:#db228a}.theme-light .Tabs--vertical .Tab--selected.Tab--color--pink{border-right-color:#db228a}.theme-light .Tab--selected.Tab--color--brown{color:#c0825a}.theme-light .Tabs--horizontal .Tab--selected.Tab--color--brown{border-bottom-color:#955d39}.theme-light .Tabs--vertical .Tab--selected.Tab--color--brown{border-right-color:#955d39}.theme-light .Tab--selected.Tab--color--grey{color:#ececec}.theme-light .Tabs--horizontal .Tab--selected.Tab--color--grey{border-bottom-color:#e6e6e6}.theme-light .Tabs--vertical .Tab--selected.Tab--color--grey{border-right-color:#e6e6e6}.theme-light .Tab--selected.Tab--color--light-grey{color:#b3b3b3}.theme-light .Tabs--horizontal .Tab--selected.Tab--color--light-grey{border-bottom-color:#999}.theme-light .Tabs--vertical .Tab--selected.Tab--color--light-grey{border-right-color:#999}.theme-light .Tab--selected.Tab--color--good{color:#77d23b}.theme-light .Tabs--horizontal .Tab--selected.Tab--color--good{border-bottom-color:#529923}.theme-light .Tabs--vertical .Tab--selected.Tab--color--good{border-right-color:#529923}.theme-light .Tab--selected.Tab--color--average{color:#f3a23a}.theme-light .Tabs--horizontal .Tab--selected.Tab--color--average{border-bottom-color:#da810e}.theme-light .Tabs--vertical .Tab--selected.Tab--color--average{border-right-color:#da810e}.theme-light .Tab--selected.Tab--color--bad{color:#e14d4d}.theme-light .Tabs--horizontal .Tab--selected.Tab--color--bad{border-bottom-color:#c82121}.theme-light .Tabs--vertical .Tab--selected.Tab--color--bad{border-right-color:#c82121}.theme-light .Tab--selected.Tab--color--label{color:#686868}.theme-light .Tabs--horizontal .Tab--selected.Tab--color--label{border-bottom-color:#353535}.theme-light .Tabs--vertical .Tab--selected.Tab--color--label{border-right-color:#353535}.theme-light .Tab--selected.Tab--color--xeno{color:#7e558e}.theme-light .Tabs--horizontal .Tab--selected.Tab--color--xeno{border-bottom-color:#4a3253}.theme-light .Tabs--vertical .Tab--selected.Tab--color--xeno{border-right-color:#4a3253}.theme-light .Section{position:relative;margin-bottom:.5em;background-color:#fff;box-sizing:border-box}.theme-light .Section:last-child{margin-bottom:0}.theme-light .Section__title{position:relative;padding:.5em;border-bottom:.1666666667em solid #fff}.theme-light .Section__titleText{font-size:1.1666666667em;font-weight:700;color:#000}.theme-light .Section__buttons{position:absolute;display:inline-block;right:.5em;margin-top:-.0833333333em}.theme-light .Section__rest{position:relative}.theme-light .Section__content{padding:.66em .5em}.theme-light .Section--fitted>.Section__rest>.Section__content{padding:0}.theme-light .Section--fill{display:flex;flex-direction:column;height:100%}.theme-light .Section--fill>.Section__rest{flex-grow:1}.theme-light .Section--fill>.Section__rest>.Section__content{height:100%}.theme-light .Section--fill.Section--scrollable>.Section__rest>.Section__content{position:absolute;top:0;left:0;right:0;bottom:0}.theme-light .Section--fill.Section--iefix{display:table!important;width:100%!important;height:100%!important;border-collapse:collapse;border-spacing:0}.theme-light .Section--fill.Section--iefix>.Section__rest{display:table-row!important;height:100%!important}.theme-light .Section--scrollable{overflow-x:hidden;overflow-y:hidden}.theme-light .Section--scrollable>.Section__rest>.Section__content{overflow-y:scroll;overflow-x:hidden}.theme-light .Section--scrollableHorizontal{overflow-x:hidden;overflow-y:hidden}.theme-light .Section--scrollableHorizontal>.Section__rest>.Section__content{overflow-y:hidden;overflow-x:scroll}.theme-light .Section--scrollable.Section--scrollableHorizontal{overflow-x:hidden;overflow-y:hidden}.theme-light .Section--scrollable.Section--scrollableHorizontal>.Section__rest>.Section__content{overflow-y:scroll;overflow-x:scroll}.theme-light .Section .Section{background-color:rgba(0,0,0,0);margin-left:-.5em;margin-right:-.5em}.theme-light .Section .Section:first-child{margin-top:-.5em}.theme-light .Section .Section .Section__titleText{font-size:1.0833333333em}.theme-light .Section .Section .Section .Section__titleText{font-size:1em}.theme-light .Button{position:relative;display:inline-block;line-height:1.667em;padding:0 .5em;margin-right:.1666666667em;white-space:nowrap;outline:0;border-radius:.16em;margin-bottom:.1666666667em;user-select:none;-ms-user-select:none}.theme-light .Button .fa,.theme-light .Button .fas,.theme-light .Button .far{margin-left:-.25em;margin-right:-.25em;min-width:1.333em;text-align:center}.theme-light .Button--hasContent .fa,.theme-light .Button--hasContent .fas,.theme-light .Button--hasContent .far{margin-right:.25em}.theme-light .Button--hasContent.Button--iconPosition--right .fa,.theme-light .Button--hasContent.Button--iconPosition--right .fas,.theme-light .Button--hasContent.Button--iconPosition--right .far{margin-right:0;margin-left:3px}.theme-light .Button--ellipsis{overflow:hidden;text-overflow:ellipsis}.theme-light .Button--fluid{display:block;margin-left:0;margin-right:0}.theme-light .Button--circular{border-radius:50%}.theme-light .Button--compact{padding:0 .25em;line-height:1.333em}.theme-light .Button--color--black{transition:color 50ms,background-color 50ms;background-color:#000;color:#fff}.theme-light .Button--color--black:hover{transition:color 0ms,background-color 0ms}.theme-light .Button--color--black:focus{transition:color .1s,background-color .1s}.theme-light .Button--color--black:hover,.theme-light .Button--color--black:focus{background-color:#131313;color:#fff}.theme-light .Button--color--white{transition:color 50ms,background-color 50ms;background-color:#bfbfbf;color:#000}.theme-light .Button--color--white:hover{transition:color 0ms,background-color 0ms}.theme-light .Button--color--white:focus{transition:color .1s,background-color .1s}.theme-light .Button--color--white:hover,.theme-light .Button--color--white:focus{background-color:#efefef;color:#000}.theme-light .Button--color--red{transition:color 50ms,background-color 50ms;background-color:#a61c1c;color:#fff}.theme-light .Button--color--red:hover{transition:color 0ms,background-color 0ms}.theme-light .Button--color--red:focus{transition:color .1s,background-color .1s}.theme-light .Button--color--red:hover,.theme-light .Button--color--red:focus{background-color:#d23333;color:#fff}.theme-light .Button--color--orange{transition:color 50ms,background-color 50ms;background-color:#c0530b;color:#fff}.theme-light .Button--color--orange:hover{transition:color 0ms,background-color 0ms}.theme-light .Button--color--orange:focus{transition:color .1s,background-color .1s}.theme-light .Button--color--orange:hover,.theme-light .Button--color--orange:focus{background-color:#ea7426;color:#fff}.theme-light .Button--color--yellow{transition:color 50ms,background-color 50ms;background-color:#bfa303;color:#fff}.theme-light .Button--color--yellow:hover{transition:color 0ms,background-color 0ms}.theme-light .Button--color--yellow:focus{transition:color .1s,background-color .1s}.theme-light .Button--color--yellow:hover,.theme-light .Button--color--yellow:focus{background-color:#efce17;color:#fff}.theme-light .Button--color--olive{transition:color 50ms,background-color 50ms;background-color:#889912;color:#fff}.theme-light .Button--color--olive:hover{transition:color 0ms,background-color 0ms}.theme-light .Button--color--olive:focus{transition:color .1s,background-color .1s}.theme-light .Button--color--olive:hover,.theme-light .Button--color--olive:focus{background-color:#afc328;color:#fff}.theme-light .Button--color--green{transition:color 50ms,background-color 50ms;background-color:#188532;color:#fff}.theme-light .Button--color--green:hover{transition:color 0ms,background-color 0ms}.theme-light .Button--color--green:focus{transition:color .1s,background-color .1s}.theme-light .Button--color--green:hover,.theme-light .Button--color--green:focus{background-color:#2fac4c;color:#fff}.theme-light .Button--color--teal{transition:color 50ms,background-color 50ms;background-color:#008882;color:#fff}.theme-light .Button--color--teal:hover{transition:color 0ms,background-color 0ms}.theme-light .Button--color--teal:focus{transition:color .1s,background-color .1s}.theme-light .Button--color--teal:hover,.theme-light .Button--color--teal:focus{background-color:#13afa9;color:#fff}.theme-light .Button--color--blue{transition:color 50ms,background-color 50ms;background-color:#19649c;color:#fff}.theme-light .Button--color--blue:hover{transition:color 0ms,background-color 0ms}.theme-light .Button--color--blue:focus{transition:color .1s,background-color .1s}.theme-light .Button--color--blue:hover,.theme-light .Button--color--blue:focus{background-color:#3086c7;color:#fff}.theme-light .Button--color--dark-blue{transition:color 50ms,background-color 50ms;background-color:#003761;color:#fff}.theme-light .Button--color--dark-blue:hover{transition:color 0ms,background-color 0ms}.theme-light .Button--color--dark-blue:focus{transition:color .1s,background-color .1s}.theme-light .Button--color--dark-blue:hover,.theme-light .Button--color--dark-blue:focus{background-color:#135283;color:#fff}.theme-light .Button--color--violet{transition:color 50ms,background-color 50ms;background-color:#4b2897;color:#fff}.theme-light .Button--color--violet:hover{transition:color 0ms,background-color 0ms}.theme-light .Button--color--violet:focus{transition:color .1s,background-color .1s}.theme-light .Button--color--violet:hover,.theme-light .Button--color--violet:focus{background-color:#6a41c1;color:#fff}.theme-light .Button--color--purple{transition:color 50ms,background-color 50ms;background-color:#7a2696;color:#fff}.theme-light .Button--color--purple:hover{transition:color 0ms,background-color 0ms}.theme-light .Button--color--purple:focus{transition:color .1s,background-color .1s}.theme-light .Button--color--purple:hover,.theme-light .Button--color--purple:focus{background-color:#a03fc0;color:#fff}.theme-light .Button--color--pink{transition:color 50ms,background-color 50ms;background-color:#b61d73;color:#fff}.theme-light .Button--color--pink:hover{transition:color 0ms,background-color 0ms}.theme-light .Button--color--pink:focus{transition:color .1s,background-color .1s}.theme-light .Button--color--pink:hover,.theme-light .Button--color--pink:focus{background-color:#da3f96;color:#fff}.theme-light .Button--color--brown{transition:color 50ms,background-color 50ms;background-color:#7c4d2f;color:#fff}.theme-light .Button--color--brown:hover{transition:color 0ms,background-color 0ms}.theme-light .Button--color--brown:focus{transition:color .1s,background-color .1s}.theme-light .Button--color--brown:hover,.theme-light .Button--color--brown:focus{background-color:#a26c49;color:#fff}.theme-light .Button--color--grey{transition:color 50ms,background-color 50ms;background-color:#bfbfbf;color:#000}.theme-light .Button--color--grey:hover{transition:color 0ms,background-color 0ms}.theme-light .Button--color--grey:focus{transition:color .1s,background-color .1s}.theme-light .Button--color--grey:hover,.theme-light .Button--color--grey:focus{background-color:#efefef;color:#000}.theme-light .Button--color--light-grey{transition:color 50ms,background-color 50ms;background-color:gray;color:#fff}.theme-light .Button--color--light-grey:hover{transition:color 0ms,background-color 0ms}.theme-light .Button--color--light-grey:focus{transition:color .1s,background-color .1s}.theme-light .Button--color--light-grey:hover,.theme-light .Button--color--light-grey:focus{background-color:#a6a6a6;color:#fff}.theme-light .Button--color--good{transition:color 50ms,background-color 50ms;background-color:#44801d;color:#fff}.theme-light .Button--color--good:hover{transition:color 0ms,background-color 0ms}.theme-light .Button--color--good:focus{transition:color .1s,background-color .1s}.theme-light .Button--color--good:hover,.theme-light .Button--color--good:focus{background-color:#62a635;color:#fff}.theme-light .Button--color--average{transition:color 50ms,background-color 50ms;background-color:#b56b0b;color:#fff}.theme-light .Button--color--average:hover{transition:color 0ms,background-color 0ms}.theme-light .Button--color--average:focus{transition:color .1s,background-color .1s}.theme-light .Button--color--average:hover,.theme-light .Button--color--average:focus{background-color:#e48f20;color:#fff}.theme-light .Button--color--bad{transition:color 50ms,background-color 50ms;background-color:#a61c1c;color:#fff}.theme-light .Button--color--bad:hover{transition:color 0ms,background-color 0ms}.theme-light .Button--color--bad:focus{transition:color .1s,background-color .1s}.theme-light .Button--color--bad:hover,.theme-light .Button--color--bad:focus{background-color:#d23333;color:#fff}.theme-light .Button--color--label{transition:color 50ms,background-color 50ms;background-color:#2c2c2c;color:#fff}.theme-light .Button--color--label:hover{transition:color 0ms,background-color 0ms}.theme-light .Button--color--label:focus{transition:color .1s,background-color .1s}.theme-light .Button--color--label:hover,.theme-light .Button--color--label:focus{background-color:#464646;color:#fff}.theme-light .Button--color--xeno{transition:color 50ms,background-color 50ms;background-color:#3e2945;color:#fff}.theme-light .Button--color--xeno:hover{transition:color 0ms,background-color 0ms}.theme-light .Button--color--xeno:focus{transition:color .1s,background-color .1s}.theme-light .Button--color--xeno:hover,.theme-light .Button--color--xeno:focus{background-color:#5a4363;color:#fff}.theme-light .Button--color--default{transition:color 50ms,background-color 50ms;background-color:#bbb;color:#000}.theme-light .Button--color--default:hover{transition:color 0ms,background-color 0ms}.theme-light .Button--color--default:focus{transition:color .1s,background-color .1s}.theme-light .Button--color--default:hover,.theme-light .Button--color--default:focus{background-color:#eaeaea;color:#000}.theme-light .Button--color--caution{transition:color 50ms,background-color 50ms;background-color:#be6209;color:#fff}.theme-light .Button--color--caution:hover{transition:color 0ms,background-color 0ms}.theme-light .Button--color--caution:focus{transition:color .1s,background-color .1s}.theme-light .Button--color--caution:hover,.theme-light .Button--color--caution:focus{background-color:#ec8420;color:#fff}.theme-light .Button--color--danger{transition:color 50ms,background-color 50ms;background-color:#9a9d00;color:#fff}.theme-light .Button--color--danger:hover{transition:color 0ms,background-color 0ms}.theme-light .Button--color--danger:focus{transition:color .1s,background-color .1s}.theme-light .Button--color--danger:hover,.theme-light .Button--color--danger:focus{background-color:#c4c813;color:#fff}.theme-light .Button--color--transparent{transition:color 50ms,background-color 50ms;background-color:#eee;color:#000;background-color:rgba(238,238,238,0);color:rgba(0,0,0,.5)}.theme-light .Button--color--transparent:hover{transition:color 0ms,background-color 0ms}.theme-light .Button--color--transparent:focus{transition:color .1s,background-color .1s}.theme-light .Button--color--transparent:hover,.theme-light .Button--color--transparent:focus{background-color:#fcfcfc;color:#000}.theme-light .Button--disabled{background-color:#363636!important}.theme-light .Button--selected{transition:color 50ms,background-color 50ms;background-color:#0668b8;color:#fff}.theme-light .Button--selected:hover{transition:color 0ms,background-color 0ms}.theme-light .Button--selected:focus{transition:color .1s,background-color .1s}.theme-light .Button--selected:hover,.theme-light .Button--selected:focus{background-color:#1a8be7;color:#fff}.theme-light .Button--flex{display:inline-flex;flex-direction:column}.theme-light .Button--flex--fluid{width:100%}.theme-light .Button--verticalAlignContent--top{justify-content:flex-start}.theme-light .Button--verticalAlignContent--middle{justify-content:center}.theme-light .Button--verticalAlignContent--bottom{justify-content:flex-end}.theme-light .Button__content{display:block;align-self:stretch}.theme-light .NumberInput{position:relative;display:inline-block;border:.0833333333em solid #353535;border:.0833333333em solid rgba(53,53,53,.75);border-radius:.16em;color:#353535;background-color:#fff;padding:0 .3333333333em;margin-right:.1666666667em;line-height:1.4166666667em;text-align:right;overflow:visible;cursor:n-resize}.theme-light .NumberInput--fluid{display:block}.theme-light .NumberInput__content{margin-left:.5em}.theme-light .NumberInput__barContainer{position:absolute;top:.1666666667em;bottom:.1666666667em;left:.1666666667em}.theme-light .NumberInput__bar{position:absolute;bottom:0;left:0;width:.25em;box-sizing:border-box;border-bottom:.0833333333em solid #353535;background-color:#353535}.theme-light .NumberInput__input{display:block;position:absolute;top:0;bottom:0;left:0;right:0;border:0;outline:0;width:100%;font-size:1em;line-height:1.4166666667em;height:1.4166666667em;margin:0;padding:0 .5em;font-family:Verdana,sans-serif;background-color:#fff;color:#000;text-align:right}.theme-light .Input{position:relative;display:inline-block;width:10em;border:.0833333333em solid #353535;border:.0833333333em solid rgba(53,53,53,.75);border-radius:.16em;color:#000;background-color:#fff;padding:0 .3333333333em;margin-right:.1666666667em;line-height:1.4166666667em;overflow:visible}.theme-light .Input--fluid{display:block;width:auto}.theme-light .Input__baseline{display:inline-block;color:rgba(0,0,0,0)}.theme-light .Input__input{display:block;position:absolute;top:0;bottom:0;left:0;right:0;border:0;outline:0;width:100%;font-size:1em;line-height:1.4166666667em;height:1.4166666667em;margin:0;padding:0 .5em;font-family:Verdana,sans-serif;background-color:rgba(0,0,0,0);color:#000;color:inherit}.theme-light .Input__input:-ms-input-placeholder{font-style:italic;color:#777;color:rgba(255,255,255,.45)}.theme-light .Input--monospace .Input__input{font-family:Consolas,monospace}.theme-light .TextArea{position:relative;display:inline-block;border:.0833333333em solid #353535;border:.0833333333em solid rgba(53,53,53,.75);border-radius:.16em;background-color:#fff;margin-right:.1666666667em;line-height:1.4166666667em;box-sizing:border-box;width:100%}.theme-light .TextArea--fluid{display:block;width:auto;height:auto}.theme-light .TextArea--noborder{border:0px}.theme-light .TextArea__textarea.TextArea__textarea--scrollable{overflow:auto;overflow-x:hidden;overflow-y:scroll}.theme-light .TextArea__textarea{display:block;position:absolute;top:0;bottom:0;left:0;right:0;border:0;outline:0;width:100%;height:100%;font-size:1em;line-height:1.4166666667em;min-height:1.4166666667em;margin:0;padding:0 .5em;font-family:inherit;background-color:rgba(0,0,0,0);color:inherit;box-sizing:border-box;word-wrap:break-word;overflow:hidden}.theme-light .TextArea__textarea:-ms-input-placeholder{font-style:italic;color:#777;color:rgba(255,255,255,.45)}.theme-light .TextArea__textarea_custom{overflow:visible;white-space:pre-wrap}.theme-light .Knob{position:relative;font-size:1rem;width:2.6em;height:2.6em;margin:0 auto -.2em;cursor:n-resize}.theme-light .Knob:after{content:".";color:rgba(0,0,0,0);line-height:2.5em}.theme-light .Knob__circle{position:absolute;top:.1em;bottom:.1em;left:.1em;right:.1em;margin:.3em;background-color:#333;background-image:linear-gradient(to bottom,rgba(255,255,255,.15),rgba(255,255,255,0));border-radius:50%;box-shadow:0 .05em .5em rgba(0,0,0,.5)}.theme-light .Knob__cursorBox{position:absolute;top:0;bottom:0;left:0;right:0}.theme-light .Knob__cursor{position:relative;top:.05em;margin:0 auto;width:.2em;height:.8em;background-color:rgba(255,255,255,.9)}.theme-light .Knob__popupValue{position:absolute;top:-2rem;right:50%;font-size:1rem;text-align:center;padding:.25rem .5rem;color:#fff;background-color:#000;transform:translate(50%);white-space:nowrap}.theme-light .Knob__ring{position:absolute;top:0;bottom:0;left:0;right:0;padding:.1em}.theme-light .Knob__ringTrackPivot{transform:rotate(135deg)}.theme-light .Knob__ringTrack{fill:rgba(0,0,0,0);stroke:rgba(255,255,255,.1);stroke-width:8;stroke-linecap:round;stroke-dasharray:235.62}.theme-light .Knob__ringFillPivot{transform:rotate(135deg)}.theme-light .Knob--bipolar .Knob__ringFillPivot{transform:rotate(270deg)}.theme-light .Knob__ringFill{fill:rgba(0,0,0,0);stroke:#6a96c9;stroke-width:8;stroke-linecap:round;stroke-dasharray:314.16;transition:stroke 50ms ease-out}.theme-light .Knob--color--black .Knob__ringFill{stroke:#000}.theme-light .Knob--color--white .Knob__ringFill{stroke:#e6e6e6}.theme-light .Knob--color--red .Knob__ringFill{stroke:#c82121}.theme-light .Knob--color--orange .Knob__ringFill{stroke:#e6630d}.theme-light .Knob--color--yellow .Knob__ringFill{stroke:#e5c304}.theme-light .Knob--color--olive .Knob__ringFill{stroke:#a3b816}.theme-light .Knob--color--green .Knob__ringFill{stroke:#1d9f3b}.theme-light .Knob--color--teal .Knob__ringFill{stroke:#00a39c}.theme-light .Knob--color--blue .Knob__ringFill{stroke:#1e78bb}.theme-light .Knob--color--dark-blue .Knob__ringFill{stroke:#004274}.theme-light .Knob--color--violet .Knob__ringFill{stroke:#5a30b5}.theme-light .Knob--color--purple .Knob__ringFill{stroke:#932eb4}.theme-light .Knob--color--pink .Knob__ringFill{stroke:#db228a}.theme-light .Knob--color--brown .Knob__ringFill{stroke:#955d39}.theme-light .Knob--color--grey .Knob__ringFill{stroke:#e6e6e6}.theme-light .Knob--color--light-grey .Knob__ringFill{stroke:#999}.theme-light .Knob--color--good .Knob__ringFill{stroke:#529923}.theme-light .Knob--color--average .Knob__ringFill{stroke:#da810e}.theme-light .Knob--color--bad .Knob__ringFill{stroke:#c82121}.theme-light .Knob--color--label .Knob__ringFill{stroke:#353535}.theme-light .Knob--color--xeno .Knob__ringFill{stroke:#4a3253}.theme-light .Slider{cursor:e-resize}.theme-light .Slider__cursorOffset{position:absolute;top:0;left:0;bottom:0;transition:none!important}.theme-light .Slider__cursor{position:absolute;top:0;right:-.0833333333em;bottom:0;width:0;border-left:.1666666667em solid #000}.theme-light .Slider__pointer{position:absolute;right:-.4166666667em;bottom:-.3333333333em;width:0;height:0;border-left:.4166666667em solid rgba(0,0,0,0);border-right:.4166666667em solid rgba(0,0,0,0);border-bottom:.4166666667em solid #000}.theme-light .Slider__popupValue{position:absolute;right:0;top:-2rem;font-size:1rem;padding:.25rem .5rem;color:#fff;background-color:#000;transform:translate(50%);white-space:nowrap}.theme-light .ProgressBar{display:inline-block;position:relative;width:100%;padding:0 .5em;border-width:.0833333333em!important;border-style:solid!important;border-radius:.16em;background-color:rgba(0,0,0,0);transition:border-color .9s ease-out}.theme-light .ProgressBar__fill{position:absolute;top:-.5px;left:0;bottom:-.5px}.theme-light .ProgressBar__fill--animated{transition:background-color .9s ease-out,width .9s ease-out}.theme-light .ProgressBar__content{position:relative;line-height:1.4166666667em;width:100%;text-align:right}.theme-light .ProgressBar--color--default{border:.0833333333em solid #bfbfbf}.theme-light .ProgressBar--color--default .ProgressBar__fill{background-color:#bfbfbf}.theme-light .ProgressBar--color--black{border-color:#000!important}.theme-light .ProgressBar--color--black .ProgressBar__fill{background-color:#000}.theme-light .ProgressBar--color--white{border-color:#bfbfbf!important}.theme-light .ProgressBar--color--white .ProgressBar__fill{background-color:#bfbfbf}.theme-light .ProgressBar--color--red{border-color:#a61c1c!important}.theme-light .ProgressBar--color--red .ProgressBar__fill{background-color:#a61c1c}.theme-light .ProgressBar--color--orange{border-color:#c0530b!important}.theme-light .ProgressBar--color--orange .ProgressBar__fill{background-color:#c0530b}.theme-light .ProgressBar--color--yellow{border-color:#bfa303!important}.theme-light .ProgressBar--color--yellow .ProgressBar__fill{background-color:#bfa303}.theme-light .ProgressBar--color--olive{border-color:#889912!important}.theme-light .ProgressBar--color--olive .ProgressBar__fill{background-color:#889912}.theme-light .ProgressBar--color--green{border-color:#188532!important}.theme-light .ProgressBar--color--green .ProgressBar__fill{background-color:#188532}.theme-light .ProgressBar--color--teal{border-color:#008882!important}.theme-light .ProgressBar--color--teal .ProgressBar__fill{background-color:#008882}.theme-light .ProgressBar--color--blue{border-color:#19649c!important}.theme-light .ProgressBar--color--blue .ProgressBar__fill{background-color:#19649c}.theme-light .ProgressBar--color--dark-blue{border-color:#003761!important}.theme-light .ProgressBar--color--dark-blue .ProgressBar__fill{background-color:#003761}.theme-light .ProgressBar--color--violet{border-color:#4b2897!important}.theme-light .ProgressBar--color--violet .ProgressBar__fill{background-color:#4b2897}.theme-light .ProgressBar--color--purple{border-color:#7a2696!important}.theme-light .ProgressBar--color--purple .ProgressBar__fill{background-color:#7a2696}.theme-light .ProgressBar--color--pink{border-color:#b61d73!important}.theme-light .ProgressBar--color--pink .ProgressBar__fill{background-color:#b61d73}.theme-light .ProgressBar--color--brown{border-color:#7c4d2f!important}.theme-light .ProgressBar--color--brown .ProgressBar__fill{background-color:#7c4d2f}.theme-light .ProgressBar--color--grey{border-color:#bfbfbf!important}.theme-light .ProgressBar--color--grey .ProgressBar__fill{background-color:#bfbfbf}.theme-light .ProgressBar--color--light-grey{border-color:gray!important}.theme-light .ProgressBar--color--light-grey .ProgressBar__fill{background-color:gray}.theme-light .ProgressBar--color--good{border-color:#44801d!important}.theme-light .ProgressBar--color--good .ProgressBar__fill{background-color:#44801d}.theme-light .ProgressBar--color--average{border-color:#b56b0b!important}.theme-light .ProgressBar--color--average .ProgressBar__fill{background-color:#b56b0b}.theme-light .ProgressBar--color--bad{border-color:#a61c1c!important}.theme-light .ProgressBar--color--bad .ProgressBar__fill{background-color:#a61c1c}.theme-light .ProgressBar--color--label{border-color:#2c2c2c!important}.theme-light .ProgressBar--color--label .ProgressBar__fill{background-color:#2c2c2c}.theme-light .ProgressBar--color--xeno{border-color:#3e2945!important}.theme-light .ProgressBar--color--xeno .ProgressBar__fill{background-color:#3e2945}.theme-light .Chat{color:#000}.theme-light .Chat__badge{display:inline-block;min-width:.5em;font-size:.7em;padding:.2em .3em;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:middle;background-color:#dc143c;border-radius:10px;transition:font-size .2s ease-out}.theme-light .Chat__badge:before{content:"x"}.theme-light .Chat__badge--animate{font-size:.9em;transition:font-size 0ms}.theme-light .Chat__scrollButton{position:fixed;right:2em;bottom:1em}.theme-light .Chat__reconnected{font-size:.85em;text-align:center;margin:1em 0 2em}.theme-light .Chat__reconnected:before{content:"Reconnected";display:inline-block;border-radius:1em;padding:0 .7em;color:#db2828;background-color:#fff}.theme-light .Chat__reconnected:after{content:"";display:block;margin-top:-.75em;border-bottom:.1666666667em solid #db2828}.theme-light .Chat__highlight{color:#000}.theme-light .Chat__highlight--restricted{color:#fff;background-color:#a00;font-weight:700}.theme-light .ChatMessage{word-wrap:break-word}.theme-light .ChatMessage--highlighted{position:relative;border-left:.1666666667em solid #fd4;padding-left:.5em}.theme-light .ChatMessage--highlighted:after{content:"";position:absolute;top:0;bottom:0;left:0;right:0;background-color:rgba(255,221,68,.1);pointer-events:none}.theme-light .Layout,.theme-light .Layout *{scrollbar-base-color:#f2f2f2;scrollbar-face-color:#d6d6d6;scrollbar-3dlight-color:#eee;scrollbar-highlight-color:#eee;scrollbar-track-color:#f2f2f2;scrollbar-arrow-color:#777;scrollbar-shadow-color:#d6d6d6}.theme-light .Layout__content{position:absolute;top:0;bottom:0;left:0;right:0;overflow-x:hidden;overflow-y:hidden}.theme-light .Layout__content--scrollable{overflow-y:scroll;margin-bottom:0}.theme-light .Window{position:fixed;top:0;bottom:0;left:0;right:0;color:#000;background-color:#eee;background-image:linear-gradient(to bottom,#eee,#eee)}.theme-light .Window__titleBar{position:fixed;z-index:1;top:0;left:0;width:100%;height:32px;height:2.6666666667rem}.theme-light .Window__rest{position:fixed;top:32px;top:2.6666666667rem;bottom:0;left:0;right:0}.theme-light .Window__contentPadding{margin:.5rem;height:100%;height:calc(100% - 1.01rem)}.theme-light .Window__contentPadding:after{height:0}.theme-light .Layout__content--scrollable .Window__contentPadding:after{display:block;content:"";height:.5rem}.theme-light .Window__dimmer{position:fixed;top:0;bottom:0;left:0;right:0;background-color:rgba(252,252,252,.25);pointer-events:none}.theme-light .Window__resizeHandle__se{position:fixed;bottom:0;right:0;width:20px;width:1.6666666667rem;height:20px;height:1.6666666667rem;cursor:se-resize}.theme-light .Window__resizeHandle__s{position:fixed;bottom:0;left:0;right:0;height:6px;height:.5rem;cursor:s-resize}.theme-light .Window__resizeHandle__e{position:fixed;top:0;bottom:0;right:0;width:3px;width:.25rem;cursor:e-resize}.theme-light .TitleBar{background-color:#eee;border-bottom:1px solid rgba(0,0,0,.25);box-shadow:0 2px 2px rgba(0,0,0,.1);box-shadow:0 .1666666667rem .1666666667rem rgba(0,0,0,.1);user-select:none;-ms-user-select:none}.theme-light .TitleBar__clickable{color:rgba(0,0,0,.5);background-color:#eee;transition:color .25s ease-out,background-color .25s ease-out}.theme-light .TitleBar__clickable:hover{color:#fff;background-color:#c00;transition:color 0ms,background-color 0ms}.theme-light .TitleBar__title{position:absolute;display:inline-block;top:0;left:46px;left:3.8333333333rem;color:rgba(0,0,0,.75);font-size:14px;font-size:1.1666666667rem;line-height:31px;line-height:2.5833333333rem;white-space:nowrap;pointer-events:none}.theme-light .TitleBar__buttons{pointer-events:initial;display:inline-block;width:100%;margin-left:10px}.theme-light .TitleBar__dragZone{position:absolute;top:0;left:0;right:0;height:32px;height:2.6666666667rem}.theme-light .TitleBar__statusIcon{position:absolute;top:0;left:12px;left:1rem;transition:color .5s;font-size:20px;font-size:1.6666666667rem;line-height:32px!important;line-height:2.6666666667rem!important}.theme-light .TitleBar__close{position:absolute;top:-1px;right:0;width:45px;width:3.75rem;height:32px;height:2.6666666667rem;font-size:20px;font-size:1.6666666667rem;line-height:31px;line-height:2.5833333333rem;text-align:center}.theme-light .TitleBar__devBuildIndicator{position:absolute;top:6px;top:.5rem;right:52px;right:4.3333333333rem;min-width:20px;min-width:1.6666666667rem;padding:2px 4px;padding:.1666666667rem .3333333333rem;background-color:rgba(91,170,39,.75);color:#fff;text-align:center}.theme-light html,.theme-light body{padding:0;margin:0;height:100%;color:#000}.theme-light body{background:#fff;font-family:Verdana,sans-serif;font-size:13px;line-height:1.2;overflow-x:hidden;overflow-y:scroll;word-wrap:break-word}.theme-light img{margin:0;padding:0;line-height:1;-ms-interpolation-mode:nearest-neighbor;image-rendering:pixelated}.theme-light img.icon{height:1em;min-height:16px;width:auto;vertical-align:bottom}.theme-light a{color:#00f}.theme-light a.visited,.theme-light a:visited{color:#f0f}.theme-light a.popt{text-decoration:none}.theme-light .popup{position:fixed;top:50%;left:50%;background:#ddd}.theme-light .popup .close{position:absolute;background:#aaa;top:0;right:0;color:#333;text-decoration:none;z-index:2;padding:0 10px;height:30px;line-height:30px}.theme-light .popup .close:hover{background:#999}.theme-light .popup .head{background:#999;color:#ddd;padding:0 10px;height:30px;line-height:30px;text-transform:uppercase;font-size:.9em;font-weight:700;border-bottom:2px solid green}.theme-light .popup input{border:1px solid #999;background:#fff;margin:0;padding:5px;outline:none;color:#333}.theme-light .popup input[type=text]:hover,.theme-light .popup input[type=text]:active,.theme-light .popup input[type=text]:focus{border-color:green}.theme-light .popup input[type=submit]{padding:5px 10px;background:#999;color:#ddd;text-transform:uppercase;font-size:.9em;font-weight:700}.theme-light .popup input[type=submit]:hover,.theme-light .popup input[type=submit]:focus,.theme-light .popup input[type=submit]:active{background:#aaa;cursor:pointer}.theme-light .changeFont{padding:10px}.theme-light .changeFont a{display:block;text-decoration:none;padding:3px;color:#333}.theme-light .changeFont a:hover{background:#ccc}.theme-light .highlightPopup{padding:10px;text-align:center}.theme-light .highlightPopup input[type=text]{display:block;width:215px;text-align:left;margin-top:5px}.theme-light .highlightPopup input.highlightColor{background-color:#ff0}.theme-light .highlightPopup input.highlightTermSubmit{margin-top:5px}.theme-light .contextMenu{background-color:#ddd;position:fixed;margin:2px;width:150px}.theme-light .contextMenu a{display:block;padding:2px 5px;text-decoration:none;color:#333}.theme-light .contextMenu a:hover{background-color:#ccc}.theme-light .filterMessages{padding:5px}.theme-light .filterMessages div{padding:2px 0}.theme-light .icon-stack{height:1em;line-height:1em;width:1em;vertical-align:middle;margin-top:-2px}.theme-light .motd{color:#638500;font-family:Verdana,sans-serif;white-space:normal}.theme-light .motd h1,.theme-light .motd h2,.theme-light .motd h3,.theme-light .motd h4,.theme-light .motd h5,.theme-light .motd h6{color:#638500;text-decoration:underline}.theme-light .motd a,.theme-light .motd a:link,.theme-light .motd a:visited,.theme-light .motd a:active,.theme-light .motd a:hover{color:#638500}.theme-light .bold,.theme-light .name,.theme-light .prefix,.theme-light .ooc,.theme-light .looc,.theme-light .adminooc,.theme-light .admin,.theme-light .niche,.theme-light .medal,.theme-light .yell{font-weight:700}.theme-light .italic,.theme-light .italics{font-style:italic}.theme-light .highlight{background:#ff0}.theme-light h1,.theme-light h2,.theme-light h3,.theme-light h4,.theme-light h5,.theme-light h6{color:#00f;font-family:Georgia,Verdana,sans-serif}.theme-light em{font-style:normal;font-weight:700}.theme-light .ooc{font-weight:700}.theme-light .adminobserverooc{color:#09c;font-weight:700}.theme-light .adminooc{color:#700038;font-weight:700}.theme-light .adminsay{color:#ff4500;font-weight:700}.theme-light .admin,.theme-light .niche{color:#4473ff;font-weight:700}.theme-light .name{font-weight:700}.theme-light .deadsay{color:#5c00e6}.theme-light .binarysay{color:#20c20e;background-color:#000;display:block}.theme-light .binarysay a{color:#0f0}.theme-light .binarysay a:active,.theme-light .binarysay a:visited{color:#8f8}.theme-light .radio{color:green}.theme-light .sciradio{color:#939}.theme-light .comradio{color:#948f02}.theme-light .medradio{color:#337296}.theme-light .engradio{color:#fb5613}.theme-light .suppradio{color:#a8732b}.theme-light .servradio{color:#6eaa2c}.theme-light .syndradio{color:#6d3f40}.theme-light .gangradio{color:#ac2ea1}.theme-light .centcomradio{color:#686868}.theme-light .aiprivradio{color:#f0f}.theme-light .redteamradio{color:red}.theme-light .blueteamradio{color:#00f}.theme-light .greenteamradio{color:#0f0}.theme-light .yellowteamradio{color:#d1ba22}.theme-light .yell{font-weight:700}.theme-light .alert{color:red}.theme-light h1.alert,.theme-light h2.alert{color:#000}.theme-light .userdanger{color:red;font-weight:700;font-size:185%}.theme-light .bolddanger{color:red;font-weight:700}.theme-light .danger{color:red}.theme-light .tinydanger{color:red;font-size:85%}.theme-light .smalldanger{color:red;font-size:90%}.theme-light .warning{color:red;font-style:italic}.theme-light .alertwarning{color:red;font-weight:700}.theme-light .boldwarning{color:red;font-style:italic;font-weight:700}.theme-light .announce{color:#228b22;font-weight:700}.theme-light .boldannounce{color:red;font-weight:700}.theme-light .bigannounce{font-weight:700;font-size:115%}.theme-light .greenannounce{color:#0f0;font-weight:700}.theme-light .info{color:#00c}.theme-light .notice,.theme-light .staff_ic{color:#009}.theme-light .tinynotice{color:#009;font-size:85%}.theme-light .tinynoticeital{color:#009;font-style:italic;font-size:85%}.theme-light .smallnotice{color:#009;font-size:90%}.theme-light .smallnoticeital{color:#009;font-style:italic;font-size:90%}.theme-light .boldnotice{color:#009;font-weight:700}.theme-light .hear{color:#009;font-style:italic}.theme-light .adminnotice{color:#00f}.theme-light .adminhelp{color:red;font-weight:700}.theme-light .unconscious{color:#00f;font-weight:700}.theme-light .suicide{color:#ff5050;font-style:italic}.theme-light .green{color:#03ff39}.theme-light .grey{color:#838383}.theme-light .red{color:red}.theme-light .blue{color:#00f}.theme-light .nicegreen{color:#14a833}.theme-light .boldnicegreen{color:#14a833;font-weight:700}.theme-light .cult{color:#973e3b}.theme-light .cultitalic{color:#973e3b;font-style:italic}.theme-light .cultbold{color:#973e3b;font-style:italic;font-weight:700}.theme-light .cultboldtalic,.theme-light .cultlarge{color:#973e3b;font-weight:700;font-size:185%}.theme-light .narsie{color:#973e3b;font-weight:700;font-size:925%}.theme-light .narsiesmall{color:#973e3b;font-weight:700;font-size:370%}.theme-light .colossus{color:#7f282a;font-size:310%}.theme-light .hierophant{color:#609;font-weight:700;font-style:italic}.theme-light .hierophant_warning{color:#609;font-style:italic}.theme-light .purple{color:#5e2d79}.theme-light .holoparasite{color:#35333a}.theme-light .revennotice{color:#1d2953}.theme-light .revenboldnotice{color:#1d2953;font-weight:700}.theme-light .revenbignotice{color:#1d2953;font-weight:700;font-size:185%}.theme-light .revenminor{color:#823abb}.theme-light .revenwarning{color:#760fbb;font-style:italic}.theme-light .revendanger{color:#760fbb;font-weight:700;font-size:185%}.theme-light .deconversion_message{color:#5000a0;font-size:185%;font-style:italic}.theme-light .ghostalert{color:#5c00e6;font-style:italic;font-weight:700}.theme-light .alien{color:#543354}.theme-light .noticealien{color:#00c000}.theme-light .alertalien{color:#00c000;font-weight:700}.theme-light .changeling{color:purple;font-style:italic}.theme-light .alertsyndie{color:red;font-size:185%;font-weight:700}.theme-light .spider{color:#4d004d;font-weight:700;font-size:185%}.theme-light .interface{color:#303}.theme-light .sans{font-family:Comic Sans MS,cursive,sans-serif}.theme-light .papyrus{font-family:Papyrus,cursive,sans-serif}.theme-light .robot{font-family:Courier New,cursive,sans-serif}.theme-light .tape_recorder{color:maroon;font-family:Courier New,cursive,sans-serif}.theme-light .command_headset{font-weight:700;font-size:160%}.theme-light .small{font-size:60%}.theme-light .big{font-size:185%}.theme-light .reallybig{font-size:245%}.theme-light .extremelybig{font-size:310%}.theme-light .greentext{color:#0f0;font-size:185%}.theme-light .redtext{color:red;font-size:185%}.theme-light .clown{color:#ff69bf;font-size:160%;font-family:Comic Sans MS,cursive,sans-serif;font-weight:700}.theme-light .singing{font-family:Trebuchet MS,cursive,sans-serif;font-style:italic}.theme-light .his_grace{color:#15d512;font-family:Courier New,cursive,sans-serif;font-style:italic}.theme-light .hypnophrase{color:#0d0d0d;font-weight:700;animation:hypnocolor 1.5s infinite;animation-direction:alternate}@keyframes hypnocolor{0%{color:#0d0d0d}25%{color:#410194}50%{color:#7f17d8}75%{color:#410194}to{color:#3bb5d3}}.theme-light .phobia{color:#d00;font-weight:700;animation:phobia .75s infinite}@keyframes phobia{0%{color:#0d0d0d}50%{color:#d00}to{color:#0d0d0d}}.theme-light .icon{height:1em;width:auto}.theme-light .bigicon{font-size:2.5em}.theme-light .memo{color:#638500;text-align:center}.theme-light .memoedit{text-align:center;font-size:125%}.theme-light .abductor{color:purple;font-style:italic}.theme-light .mind_control{color:#a00d6f;font-size:100%;font-weight:700;font-style:italic}.theme-light .slime{color:#00ced1}.theme-light .drone{color:#848482}.theme-light .monkey{color:#975032}.theme-light .swarmer{color:#2c75ff}.theme-light .resonate{color:#298f85}.theme-light .monkeyhive{color:#774704}.theme-light .monkeylead{color:#774704;font-size:80%}.theme-light .connectionClosed,.theme-light .fatalError{background:red;color:#fff;padding:5px}.theme-light .connectionClosed.restored{background:green}.theme-light .internal.boldnshit{color:#00f;font-weight:700}.theme-light .text-normal{font-weight:400;font-style:normal}.theme-light .hidden{display:none;visibility:hidden}.theme-light .ml-1{margin-left:1em}.theme-light .ml-2{margin-left:2em}.theme-light .ml-3{margin-left:3em}.theme-light .xooc{color:#6c0094;font-weight:700;font-size:140%}.theme-light .mooc{color:#090;font-weight:700;font-size:140%}.theme-light .yooc{color:#999600;font-weight:700;font-size:140%}.theme-light .headminsay{color:#5a0a7f;font-weight:700}.theme-light .radio{color:#4e4e4e}.theme-light .deptradio{color:#939}.theme-light .comradio{color:#004080}.theme-light .centradio{color:#5c5c8a}.theme-light .cryoradio{color:#554e3f}.theme-light .hcradio{color:#318779}.theme-light .pvstradio{color:#9b0612}.theme-light .airadio{color:#f0f}.theme-light .secradio{color:#a30000}.theme-light .engradio{color:#a66300}.theme-light .sentryradio{color:#844300}.theme-light .medradio{color:#008160}.theme-light .supradio{color:#5f4519}.theme-light .jtacradio{color:#702963}.theme-light .intelradio{color:#027d02}.theme-light .wyradio{color:#fe9b24}.theme-light .pmcradio{color:#136957}.theme-light .vairadio{color:#943d0a}.theme-light .cmbradio{color:#1b748c}.theme-light .clfradio{color:#6f679c}.theme-light .alpharadio{color:#ea0000}.theme-light .bravoradio{color:#c68610}.theme-light .charlieradio{color:#a5a}.theme-light .deltaradio{color:#007fcf}.theme-light .echoradio{color:#3a7e65}.theme-light .medium{font-size:110%}.theme-light .big{font-size:115%}.theme-light .large{font-size:125%}.theme-light .extra_large{font-size:130%}.theme-light .huge{font-size:150%}.theme-light .underline{text-decoration:underline}.theme-light .orange{color:#eca100}.theme-light .normal{font-style:normal}.theme-light .attack{color:red}.theme-light .moderate{color:#c00}.theme-light .disarm{color:#900}.theme-light .passive{color:#600}.theme-light .helpful{color:#368f31}.theme-light .scanner{color:red}.theme-light .scannerb{color:red;font-weight:700}.theme-light .scannerburn{color:orange}.theme-light .scannerburnb{color:orange;font-weight:700}.theme-light .rose{color:#ff5050}.theme-light .debuginfo{color:#493d26;font-style:italic}.theme-light .xenonotice{color:#2a623d}.theme-light .xenoboldnotice{color:#2a623d;font-weight:700}.theme-light .xenowarning{color:#2a623d;font-style:italic}.theme-light .xenominorwarning{color:#2a623d;font-weight:700;font-style:italic}.theme-light .xenodanger{color:#2a623d;font-weight:700}.theme-light .avoidharm{color:#72a0e5;font-weight:700}.theme-light .highdanger{color:red;font-weight:700;font-size:140%}.theme-light .xenohighdanger{color:#2a623d;font-weight:700;font-size:140%}.theme-light .xenoannounce{color:#1a472a;font-family:book-antiqua;font-weight:700;font-size:140%}.theme-light .yautjabold{color:purple;font-weight:700}.theme-light .yautjaboldbig{color:purple;font-weight:700;font-size:120%}.theme-light .objectivebig{font-weight:700;font-size:130%}.theme-light .objectivegreen{color:#0f0}.theme-light .objectivered{color:red}.theme-light .objectivesuccess{color:#0f0;font-weight:700;font-size:110%}.theme-light .objectivefail{color:red;font-weight:700;font-size:110%}.theme-light .xenotalk,.theme-light .xeno{color:#900090;font-style:italic}.theme-light .xenoleader{color:#730d73;font-style:italic;font-size:125%}.theme-light .xenoqueen{color:#730d73;font-style:italic;font-weight:700;font-size:125%}.theme-light .newscaster{color:maroon}.theme-light .role_header{color:#db0000;display:block;text-align:center;font-weight:700;font-family:trebuchet-ms;font-size:150%}.theme-light .role_body{color:#009;display:block;text-align:center;font-size:125%}.theme-light .round_header{color:#db0000;display:block;text-align:center;font-family:courier;font-weight:700;font-size:180%}.theme-light .round_body{color:#001427;display:block;text-align:center;font-family:trebuchet-ms;font-weight:700;font-size:125%}.theme-light .event_announcement{color:#600d48;font-family:arial-narrow;font-weight:700;font-size:125%}.theme-light .announce_header{color:#000;font-weight:700;font-size:150%}.theme-light .announce_header_blue{color:#009;font-weight:700;font-size:150%}.theme-light .announce_body{color:red;font-weight:400;font-size:125%}.theme-light .centerbold{display:block;text-align:center;font-weight:700}.theme-light .mod{color:#735638;font-weight:700}.theme-light .modooc{color:#184880;font-weight:700}.theme-light .adminmod{color:#402a14;font-weight:700}.theme-light .mentorsay{color:#b38c32;font-weight:700}.theme-light .mentorhelp{color:#007e00;font-weight:700}.theme-light .mentorbody{color:#da6200;font-weight:700}.theme-light .mentorstaff,.theme-light .staffsay{color:#876101;font-weight:700}.theme-light .tajaran{color:#803b56}.theme-light .tajaran_signlang{color:#941c1c}.theme-light .skrell{color:#00ced1}.theme-light .soghun{color:#228b22}.theme-light .changeling{color:purple}.theme-light .vox{color:#a0a}.theme-light .monkey{color:#966c47}.theme-light .german{color:#858f1e;font-family:Times New Roman,Times,serif}.theme-light .spanish{color:#cf982b}.theme-light .japanese{color:#940927}.theme-light .chinese{color:#fe1919}.theme-light .zombie{color:#216163;font-style:italic}.theme-light .commando{color:#fe9b24;font-style:bold}.theme-light .rough{font-family:trebuchet-ms,cursive,sans-serif}.theme-light .say_quote{font-family:Georgia,Verdana,sans-serif}.theme-light .admin .message{color:#314cad}.theme-light .admin .prefix{font-weight:bolder}.theme-light .pm{font-size:110%}.theme-light .retro_translator{font-weight:700}.theme-light .yautja_translator{color:#a00;font-weight:700;animation:glitch .5s infinite}@keyframes glitch{25%{color:#a00;transform:translate(-2px,-1px)}50%{color:#be0000;transform:translate(1px,-2px)}75%{color:#8d0000;transform:translate(-1px,2px)}to{color:#830000;transform:translate(1px,1px)}}.theme-light .examine_block{background:#f2f7fa;border:1px solid #111a27;margin:.5em;padding:.5em .75em}.theme-light .examine_block .icon{width:1.5em;height:1.5em;margin:0;padding:0}.theme-light .tooltip{font-style:italic;border-bottom:1px dashed #000} diff --git a/tgui/public/tgui-polyfill.min.js b/tgui/public/tgui-polyfill.min.js index 91be6dc87655..fc7c7a512876 100644 --- a/tgui/public/tgui-polyfill.min.js +++ b/tgui/public/tgui-polyfill.min.js @@ -1 +1 @@ -(function(window,document){var version="3.7.3";var options=window.html5||{};var reSkip=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i;var saveClones=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i;var supportsHtml5Styles;var expando="_html5shiv";var expanID=0;var expandoData={};var supportsUnknownElements;(function(){try{var a=document.createElement("a");a.innerHTML="";supportsHtml5Styles="hidden"in a;supportsUnknownElements=a.childNodes.length==1||function(){document.createElement("a");var frag=document.createDocumentFragment();return typeof frag.cloneNode=="undefined"||typeof frag.createDocumentFragment=="undefined"||typeof frag.createElement=="undefined"}()}catch(e){supportsHtml5Styles=true;supportsUnknownElements=true}})();function addStyleSheet(ownerDocument,cssText){var p=ownerDocument.createElement("p"),parent=ownerDocument.getElementsByTagName("head")[0]||ownerDocument.documentElement;p.innerHTML="x";return parent.insertBefore(p.lastChild,parent.firstChild)}function getElements(){var elements=html5.elements;return typeof elements=="string"?elements.split(" "):elements}function addElements(newElements,ownerDocument){var elements=html5.elements;if(typeof elements!="string"){elements=elements.join(" ")}if(typeof newElements!="string"){newElements=newElements.join(" ")}html5.elements=elements+" "+newElements;shivDocument(ownerDocument)}function getExpandoData(ownerDocument){var data=expandoData[ownerDocument[expando]];if(!data){data={};expanID++;ownerDocument[expando]=expanID;expandoData[expanID]=data}return data}function createElement(nodeName,ownerDocument,data){if(!ownerDocument){ownerDocument=document}if(supportsUnknownElements){return ownerDocument.createElement(nodeName)}if(!data){data=getExpandoData(ownerDocument)}var node;if(data.cache[nodeName]){node=data.cache[nodeName].cloneNode()}else if(saveClones.test(nodeName)){node=(data.cache[nodeName]=data.createElem(nodeName)).cloneNode()}else{node=data.createElem(nodeName)}return node.canHaveChildren&&!reSkip.test(nodeName)&&!node.tagUrn?data.frag.appendChild(node):node}function createDocumentFragment(ownerDocument,data){if(!ownerDocument){ownerDocument=document}if(supportsUnknownElements){return ownerDocument.createDocumentFragment()}data=data||getExpandoData(ownerDocument);var clone=data.frag.cloneNode(),i=0,elems=getElements(),l=elems.length;for(;i3?getModifier(init):null,key=String(init.key),chr=String(init.char),location=init.location,keyCode=init.keyCode||(init.keyCode=key)&&key.charCodeAt(0)||0,charCode=init.charCode||(init.charCode=chr)&&chr.charCodeAt(0)||0,bubbles=init.bubbles,cancelable=init.cancelable,repeat=init.repeat,locale=init.locale,view=init.view||window,args;if(!init.which)init.which=init.keyCode;if("initKeyEvent"in out){out.initKeyEvent(type,bubbles,cancelable,view,ctrlKey,altKey,shiftKey,metaKey,keyCode,charCode)}else if(0>>0);var proto=Element.prototype;var querySelector=proto.querySelector;var querySelectorAll=proto.querySelectorAll;proto.querySelector=function qS(css){return find(this,querySelector,css)};proto.querySelectorAll=function qSA(css){return find(this,querySelectorAll,css)};function find(node,method,css){node.setAttribute(dataScope,null);var result=method.call(node,String(css).replace(/(^|,\s*)(:scope([ >]|$))/g,(function($0,$1,$2,$3){return $1+"["+dataScope+"]"+($3||" ")})));node.removeAttribute(dataScope);return result}})()}})(window);(function(global){"use strict";var DOMMap=global.WeakMap||function(){var counter=0,dispatched=false,drop=false,value;function dispatch(key,ce,shouldDrop){drop=shouldDrop;dispatched=false;value=undefined;key.dispatchEvent(ce)}function Handler(value){this.value=value}Handler.prototype.handleEvent=function handleEvent(e){dispatched=true;if(drop){e.currentTarget.removeEventListener(e.type,this,false)}else{value=this.value}};function DOMMap(){counter++;this.__ce__=new Event("@DOMMap:"+counter+Math.random())}DOMMap.prototype={constructor:DOMMap,"delete":function del(key){return dispatch(key,this.__ce__,true),dispatched},get:function get(key){dispatch(key,this.__ce__,false);var v=value;value=undefined;return v},has:function has(key){return dispatch(key,this.__ce__,false),dispatched},set:function set(key,value){dispatch(key,this.__ce__,true);key.addEventListener(this.__ce__.type,new Handler(value),false);return this}};return DOMMap}();function Dict(){}Dict.prototype=(Object.create||Object)(null);function createEventListener(type,callback,options){function eventListener(e){if(eventListener.once){e.currentTarget.removeEventListener(e.type,callback,eventListener);eventListener.removed=true}if(eventListener.passive){e.preventDefault=createEventListener.preventDefault}if(typeof eventListener.callback==="function"){eventListener.callback.call(this,e)}else if(eventListener.callback){eventListener.callback.handleEvent(e)}if(eventListener.passive){delete e.preventDefault}}eventListener.type=type;eventListener.callback=callback;eventListener.capture=!!options.capture;eventListener.passive=!!options.passive;eventListener.once=!!options.once;eventListener.removed=false;return eventListener}createEventListener.preventDefault=function preventDefault(){};var Event=global.CustomEvent,dE=global.dispatchEvent,aEL=global.addEventListener,rEL=global.removeEventListener,counter=0,increment=function(){counter++},indexOf=[].indexOf||function indexOf(value){var length=this.length;while(length--){if(this[length]===value){break}}return length},getListenerKey=function(options){return"".concat(options.capture?"1":"0",options.passive?"1":"0",options.once?"1":"0")},augment;try{aEL("_",increment,{once:true});dE(new Event("_"));dE(new Event("_"));rEL("_",increment,{once:true})}catch(o_O){}if(counter!==1){(function(){var dm=new DOMMap;function createAEL(aEL){return function addEventListener(type,handler,options){if(options&&typeof options!=="boolean"){var info=dm.get(this),key=getListenerKey(options),i,tmp,wrap;if(!info)dm.set(this,info=new Dict);if(!(type in info))info[type]={handler:[],wrap:[]};tmp=info[type];i=indexOf.call(tmp.handler,handler);if(i<0){i=tmp.handler.push(handler)-1;tmp.wrap[i]=wrap=new Dict}else{wrap=tmp.wrap[i]}if(!(key in wrap)){wrap[key]=createEventListener(type,handler,options);aEL.call(this,type,wrap[key],wrap[key].capture)}}else{aEL.call(this,type,handler,options)}}}function createREL(rEL){return function removeEventListener(type,handler,options){if(options&&typeof options!=="boolean"){var info=dm.get(this),key,i,tmp,wrap;if(info&&type in info){tmp=info[type];i=indexOf.call(tmp.handler,handler);if(-1>>0;if(typeof callback!=="function"){throw new TypeError(callback+" is not a function")}if(arguments.length>1){T=thisArg}k=0;while(k 0; } - // Method #2 - var styleSheets = document.styleSheets; - var len = styleSheets.length; - for (var i = 0; i < len; i++) { - var styleSheet = styleSheets[i]; - if(styleSheet.href === undefined) - continue; - if (styleSheet.href.indexOf(url) !== -1) { - return styleSheet.rules.length > 0; - } - } - // All methods failed return false; }; @@ -308,10 +293,7 @@ var node = document.createElement('script'); node.type = 'text/javascript'; node.crossOrigin = 'anonymous'; - // IE8: Prefer non-https protocols - node.src = Byond.IS_LTE_IE9 - ? url.replace('https://', 'http://') - : url; + node.src = url; if (sync) { node.defer = true; } @@ -332,10 +314,7 @@ var node = document.createElement('link'); node.type = 'text/css'; node.rel = 'stylesheet'; - // IE8: Prefer non-https protocols - node.href = Byond.IS_LTE_IE9 - ? url.replace('https://', 'http://') - : url; + node.href = url; // Temporarily set media to something inapplicable // to ensure it'll fetch without blocking render if (!sync) { @@ -395,7 +374,7 @@ else { window.onerror.__stack__ = stack; } - var textProp = Byond.IS_LTE_IE8 ? 'innerText' : 'textContent'; + var textProp = 'textContent'; errorStack[textProp] = window.onerror.__stack__; } // Set window geometry @@ -510,9 +489,6 @@ + "" ); }; - -// Signal tgui that we're ready to receive updates -Byond.sendMessage('ready');
Other human factions