// ==UserScript==
// @name 🐭️ MouseHunt Improved
// @description Improve your MouseHunt experience. Please only use this when the extension is not available, like on mobile.
// @version 0.30.3
// @license MIT
// @author bradp
// @namespace bradp
// @match https://www.mousehuntgame.com/*
// @icon https://i.mouse.rip/mh-improved/icon-64.png
// @run-at document-end
// @grant none
// ==/UserScript==
const mhImprovedVersion = '0.30.3';
const mhImprovedPlatform = 'userscript';
var mhui = (() => {
var __create = Object.create;
var __defProp = Object.defineProperty;
var __defProps = Object.defineProperties;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __propIsEnum = Object.prototype.propertyIsEnumerable;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __spreadValues = (a, b) => {
for (var prop in b || (b = {}))
if (__hasOwnProp.call(b, prop))
__defNormalProp(a, prop, b[prop]);
if (__getOwnPropSymbols)
for (var prop of __getOwnPropSymbols(b)) {
if (__propIsEnum.call(b, prop))
__defNormalProp(a, prop, b[prop]);
}
return a;
};
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
var __esm = (fn, res) => function __init() {
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
};
var __commonJS = (cb, mod) => function __require() {
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
};
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var __async = (__this, __arguments, generator) => {
return new Promise((resolve, reject) => {
var fulfilled = (value) => {
try {
step(generator.next(value));
} catch (e) {
reject(e);
}
};
var rejected = (value) => {
try {
step(generator.throw(value));
} catch (e) {
reject(e);
}
};
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
step((generator = generator.apply(__this, __arguments)).next());
});
};
// _sentry-release-injection-stub
var _global;
var init_sentry_release_injection_stub = __esm({
"_sentry-release-injection-stub"() {
_global = typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
_global.SENTRY_RELEASE = { id: "[email protected]" };
}
});
// node_modules/@sentry/utils/esm/is.js
function isError(wat) {
switch (objectToString.call(wat)) {
case "[object Error]":
case "[object Exception]":
case "[object DOMException]":
return true;
default:
return isInstanceOf(wat, Error);
}
}
function isBuiltin(wat, className) {
return objectToString.call(wat) === `[object ${className}]`;
}
function isErrorEvent(wat) {
return isBuiltin(wat, "ErrorEvent");
}
function isDOMError(wat) {
return isBuiltin(wat, "DOMError");
}
function isDOMException(wat) {
return isBuiltin(wat, "DOMException");
}
function isString(wat) {
return isBuiltin(wat, "String");
}
function isParameterizedString(wat) {
return typeof wat === "object" && wat !== null && "__sentry_template_string__" in wat && "__sentry_template_values__" in wat;
}
function isPrimitive(wat) {
return wat === null || isParameterizedString(wat) || typeof wat !== "object" && typeof wat !== "function";
}
function isPlainObject(wat) {
return isBuiltin(wat, "Object");
}
function isEvent(wat) {
return typeof Event !== "undefined" && isInstanceOf(wat, Event);
}
function isElement(wat) {
return typeof Element !== "undefined" && isInstanceOf(wat, Element);
}
function isRegExp(wat) {
return isBuiltin(wat, "RegExp");
}
function isThenable(wat) {
return Boolean(wat && wat.then && typeof wat.then === "function");
}
function isSyntheticEvent(wat) {
return isPlainObject(wat) && "nativeEvent" in wat && "preventDefault" in wat && "stopPropagation" in wat;
}
function isNaN2(wat) {
return typeof wat === "number" && wat !== wat;
}
function isInstanceOf(wat, base) {
try {
return wat instanceof base;
} catch (_e) {
return false;
}
}
function isVueViewModel(wat) {
return !!(typeof wat === "object" && wat !== null && (wat.__isVue || wat._isVue));
}
var objectToString;
var init_is = __esm({
"node_modules/@sentry/utils/esm/is.js"() {
init_sentry_release_injection_stub();
objectToString = Object.prototype.toString;
}
});
// node_modules/@sentry/utils/esm/string.js
function truncate(str, max = 0) {
if (typeof str !== "string" || max === 0) {
return str;
}
return str.length <= max ? str : `${str.slice(0, max)}...`;
}
function safeJoin(input, delimiter) {
if (!Array.isArray(input)) {
return "";
}
const output = [];
for (let i = 0; i < input.length; i++) {
const value = input[i];
try {
if (isVueViewModel(value)) {
output.push("[VueViewModel]");
} else {
output.push(String(value));
}
} catch (e) {
output.push("[value cannot be serialized]");
}
}
return output.join(delimiter);
}
function isMatchingPattern(value, pattern, requireExactStringMatch = false) {
if (!isString(value)) {
return false;
}
if (isRegExp(pattern)) {
return pattern.test(value);
}
if (isString(pattern)) {
return requireExactStringMatch ? value === pattern : value.includes(pattern);
}
return false;
}
function stringMatchesSomePattern(testString, patterns = [], requireExactStringMatch = false) {
return patterns.some((pattern) => isMatchingPattern(testString, pattern, requireExactStringMatch));
}
var init_string = __esm({
"node_modules/@sentry/utils/esm/string.js"() {
init_sentry_release_injection_stub();
init_is();
}
});
// node_modules/@sentry/utils/esm/aggregate-errors.js
function applyAggregateErrorsToEvent(exceptionFromErrorImplementation, parser, maxValueLimit = 250, key, limit2, event, hint) {
if (!event.exception || !event.exception.values || !hint || !isInstanceOf(hint.originalException, Error)) {
return;
}
const originalException = event.exception.values.length > 0 ? event.exception.values[event.exception.values.length - 1] : void 0;
if (originalException) {
event.exception.values = truncateAggregateExceptions(
aggregateExceptionsFromError(
exceptionFromErrorImplementation,
parser,
limit2,
hint.originalException,
key,
event.exception.values,
originalException,
0
),
maxValueLimit
);
}
}
function aggregateExceptionsFromError(exceptionFromErrorImplementation, parser, limit2, error, key, prevExceptions, exception, exceptionId) {
if (prevExceptions.length >= limit2 + 1) {
return prevExceptions;
}
let newExceptions = [...prevExceptions];
if (isInstanceOf(error[key], Error)) {
applyExceptionGroupFieldsForParentException(exception, exceptionId);
const newException = exceptionFromErrorImplementation(parser, error[key]);
const newExceptionId = newExceptions.length;
applyExceptionGroupFieldsForChildException(newException, key, newExceptionId, exceptionId);
newExceptions = aggregateExceptionsFromError(
exceptionFromErrorImplementation,
parser,
limit2,
error[key],
key,
[newException, ...newExceptions],
newException,
newExceptionId
);
}
if (Array.isArray(error.errors)) {
error.errors.forEach((childError, i) => {
if (isInstanceOf(childError, Error)) {
applyExceptionGroupFieldsForParentException(exception, exceptionId);
const newException = exceptionFromErrorImplementation(parser, childError);
const newExceptionId = newExceptions.length;
applyExceptionGroupFieldsForChildException(newException, `errors[${i}]`, newExceptionId, exceptionId);
newExceptions = aggregateExceptionsFromError(
exceptionFromErrorImplementation,
parser,
limit2,
childError,
key,
[newException, ...newExceptions],
newException,
newExceptionId
);
}
});
}
return newExceptions;
}
function applyExceptionGroupFieldsForParentException(exception, exceptionId) {
exception.mechanism = exception.mechanism || { type: "generic", handled: true };
exception.mechanism = __spreadProps(__spreadValues({}, exception.mechanism), {
is_exception_group: true,
exception_id: exceptionId
});
}
function applyExceptionGroupFieldsForChildException(exception, source, exceptionId, parentId) {
exception.mechanism = exception.mechanism || { type: "generic", handled: true };
exception.mechanism = __spreadProps(__spreadValues({}, exception.mechanism), {
type: "chained",
source,
exception_id: exceptionId,
parent_id: parentId
});
}
function truncateAggregateExceptions(exceptions, maxValueLength) {
return exceptions.map((exception) => {
if (exception.value) {
exception.value = truncate(exception.value, maxValueLength);
}
return exception;
});
}
var init_aggregate_errors = __esm({
"node_modules/@sentry/utils/esm/aggregate-errors.js"() {
init_sentry_release_injection_stub();
init_is();
init_string();
}
});
// node_modules/@sentry/utils/esm/worldwide.js
function isGlobalObj(obj) {
return obj && obj.Math == Math ? obj : void 0;
}
function getGlobalObject() {
return GLOBAL_OBJ;
}
function getGlobalSingleton(name, creator, obj) {
const gbl = obj || GLOBAL_OBJ;
const __SENTRY__ = gbl.__SENTRY__ = gbl.__SENTRY__ || {};
const singleton = __SENTRY__[name] || (__SENTRY__[name] = creator());
return singleton;
}
var GLOBAL_OBJ;
var init_worldwide = __esm({
"node_modules/@sentry/utils/esm/worldwide.js"() {
init_sentry_release_injection_stub();
GLOBAL_OBJ = typeof globalThis == "object" && isGlobalObj(globalThis) || // eslint-disable-next-line no-restricted-globals
typeof window == "object" && isGlobalObj(window) || typeof self == "object" && isGlobalObj(self) || typeof global == "object" && isGlobalObj(global) || /* @__PURE__ */ function() {
return this;
}() || {};
}
});
// node_modules/@sentry/utils/esm/browser.js
function htmlTreeAsString(elem, options = {}) {
if (!elem) {
return "<unknown>";
}
try {
let currentElem = elem;
const MAX_TRAVERSE_HEIGHT = 5;
const out = [];
let height = 0;
let len = 0;
const separator = " > ";
const sepLength = separator.length;
let nextStr;
const keyAttrs = Array.isArray(options) ? options : options.keyAttrs;
const maxStringLength = !Array.isArray(options) && options.maxStringLength || DEFAULT_MAX_STRING_LENGTH;
while (currentElem && height++ < MAX_TRAVERSE_HEIGHT) {
nextStr = _htmlElementAsString(currentElem, keyAttrs);
if (nextStr === "html" || height > 1 && len + out.length * sepLength + nextStr.length >= maxStringLength) {
break;
}
out.push(nextStr);
len += nextStr.length;
currentElem = currentElem.parentNode;
}
return out.reverse().join(separator);
} catch (_oO) {
return "<unknown>";
}
}
function _htmlElementAsString(el, keyAttrs) {
const elem = el;
const out = [];
let className;
let classes;
let key;
let attr;
let i;
if (!elem || !elem.tagName) {
return "";
}
if (WINDOW.HTMLElement) {
if (elem instanceof HTMLElement && elem.dataset && elem.dataset["sentryComponent"]) {
return elem.dataset["sentryComponent"];
}
}
out.push(elem.tagName.toLowerCase());
const keyAttrPairs = keyAttrs && keyAttrs.length ? keyAttrs.filter((keyAttr) => elem.getAttribute(keyAttr)).map((keyAttr) => [keyAttr, elem.getAttribute(keyAttr)]) : null;
if (keyAttrPairs && keyAttrPairs.length) {
keyAttrPairs.forEach((keyAttrPair) => {
out.push(`[${keyAttrPair[0]}="${keyAttrPair[1]}"]`);
});
} else {
if (elem.id) {
out.push(`#${elem.id}`);
}
className = elem.className;
if (className && isString(className)) {
classes = className.split(/\s+/);
for (i = 0; i < classes.length; i++) {
out.push(`.${classes[i]}`);
}
}
}
const allowedAttrs = ["aria-label", "type", "name", "title", "alt"];
for (i = 0; i < allowedAttrs.length; i++) {
key = allowedAttrs[i];
attr = elem.getAttribute(key);
if (attr) {
out.push(`[${key}="${attr}"]`);
}
}
return out.join("");
}
function getLocationHref() {
try {
return WINDOW.document.location.href;
} catch (oO) {
return "";
}
}
function getComponentName(elem) {
if (!WINDOW.HTMLElement) {
return null;
}
let currentElem = elem;
const MAX_TRAVERSE_HEIGHT = 5;
for (let i = 0; i < MAX_TRAVERSE_HEIGHT; i++) {
if (!currentElem) {
return null;
}
if (currentElem instanceof HTMLElement && currentElem.dataset["sentryComponent"]) {
return currentElem.dataset["sentryComponent"];
}
currentElem = currentElem.parentNode;
}
return null;
}
var WINDOW, DEFAULT_MAX_STRING_LENGTH;
var init_browser = __esm({
"node_modules/@sentry/utils/esm/browser.js"() {
init_sentry_release_injection_stub();
init_is();
init_worldwide();
WINDOW = getGlobalObject();
DEFAULT_MAX_STRING_LENGTH = 80;
}
});
// node_modules/@sentry/utils/esm/debug-build.js
var DEBUG_BUILD;
var init_debug_build = __esm({
"node_modules/@sentry/utils/esm/debug-build.js"() {
init_sentry_release_injection_stub();
DEBUG_BUILD = typeof __SENTRY_DEBUG__ === "undefined" || __SENTRY_DEBUG__;
}
});
// node_modules/@sentry/utils/esm/logger.js
function consoleSandbox(callback) {
if (!("console" in GLOBAL_OBJ)) {
return callback();
}
const console2 = GLOBAL_OBJ.console;
const wrappedFuncs = {};
const wrappedLevels = Object.keys(originalConsoleMethods);
wrappedLevels.forEach((level) => {
const originalConsoleMethod = originalConsoleMethods[level];
wrappedFuncs[level] = console2[level];
console2[level] = originalConsoleMethod;
});
try {
return callback();
} finally {
wrappedLevels.forEach((level) => {
console2[level] = wrappedFuncs[level];
});
}
}
function makeLogger() {
let enabled = false;
const logger2 = {
enable: () => {
enabled = true;
},
disable: () => {
enabled = false;
},
isEnabled: () => enabled
};
if (DEBUG_BUILD) {
CONSOLE_LEVELS.forEach((name) => {
logger2[name] = (...args) => {
if (enabled) {
consoleSandbox(() => {
GLOBAL_OBJ.console[name](`${PREFIX}[${name}]:`, ...args);
});
}
};
});
} else {
CONSOLE_LEVELS.forEach((name) => {
logger2[name] = () => void 0;
});
}
return logger2;
}
var PREFIX, CONSOLE_LEVELS, originalConsoleMethods, logger;
var init_logger = __esm({
"node_modules/@sentry/utils/esm/logger.js"() {
init_sentry_release_injection_stub();
init_debug_build();
init_worldwide();
PREFIX = "Sentry Logger ";
CONSOLE_LEVELS = [
"debug",
"info",
"warn",
"error",
"log",
"assert",
"trace"
];
originalConsoleMethods = {};
logger = makeLogger();
}
});
// node_modules/@sentry/utils/esm/dsn.js
function isValidProtocol(protocol) {
return protocol === "http" || protocol === "https";
}
function dsnToString(dsn, withPassword = false) {
const { host, path, pass, port, projectId, protocol, publicKey } = dsn;
return `${protocol}://${publicKey}${withPassword && pass ? `:${pass}` : ""}@${host}${port ? `:${port}` : ""}/${path ? `${path}/` : path}${projectId}`;
}
function dsnFromString(str) {
const match = DSN_REGEX.exec(str);
if (!match) {
consoleSandbox(() => {
console.error(`Invalid Sentry Dsn: ${str}`);
});
return void 0;
}
const [protocol, publicKey, pass = "", host, port = "", lastPath] = match.slice(1);
let path = "";
let projectId = lastPath;
const split = projectId.split("/");
if (split.length > 1) {
path = split.slice(0, -1).join("/");
projectId = split.pop();
}
if (projectId) {
const projectMatch = projectId.match(/^\d+/);
if (projectMatch) {
projectId = projectMatch[0];
}
}
return dsnFromComponents({ host, pass, path, projectId, port, protocol, publicKey });
}
function dsnFromComponents(components) {
return {
protocol: components.protocol,
publicKey: components.publicKey || "",
pass: components.pass || "",
host: components.host,
port: components.port || "",
path: components.path || "",
projectId: components.projectId
};
}
function validateDsn(dsn) {
if (!DEBUG_BUILD) {
return true;
}
const { port, projectId, protocol } = dsn;
const requiredComponents = ["protocol", "publicKey", "host", "projectId"];
const hasMissingRequiredComponent = requiredComponents.find((component) => {
if (!dsn[component]) {
logger.error(`Invalid Sentry Dsn: ${component} missing`);
return true;
}
return false;
});
if (hasMissingRequiredComponent) {
return false;
}
if (!projectId.match(/^\d+$/)) {
logger.error(`Invalid Sentry Dsn: Invalid projectId ${projectId}`);
return false;
}
if (!isValidProtocol(protocol)) {
logger.error(`Invalid Sentry Dsn: Invalid protocol ${protocol}`);
return false;
}
if (port && isNaN(parseInt(port, 10))) {
logger.error(`Invalid Sentry Dsn: Invalid port ${port}`);
return false;
}
return true;
}
function makeDsn(from) {
const components = typeof from === "string" ? dsnFromString(from) : dsnFromComponents(from);
if (!components || !validateDsn(components)) {
return void 0;
}
return components;
}
var DSN_REGEX;
var init_dsn = __esm({
"node_modules/@sentry/utils/esm/dsn.js"() {
init_sentry_release_injection_stub();
init_debug_build();
init_logger();
DSN_REGEX = /^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;
}
});
// node_modules/@sentry/utils/esm/error.js
var SentryError;
var init_error = __esm({
"node_modules/@sentry/utils/esm/error.js"() {
init_sentry_release_injection_stub();
SentryError = class extends Error {
/** Display name of this error instance. */
constructor(message, logLevel = "warn") {
super(message);
this.message = message;
this.name = new.target.prototype.constructor.name;
Object.setPrototypeOf(this, new.target.prototype);
this.logLevel = logLevel;
}
};
}
});
// node_modules/@sentry/utils/esm/object.js
function fill(source, name, replacementFactory) {
if (!(name in source)) {
return;
}
const original = source[name];
const wrapped = replacementFactory(original);
if (typeof wrapped === "function") {
markFunctionWrapped(wrapped, original);
}
source[name] = wrapped;
}
function addNonEnumerableProperty(obj, name, value) {
try {
Object.defineProperty(obj, name, {
// enumerable: false, // the default, so we can save on bundle size by not explicitly setting it
value,
writable: true,
configurable: true
});
} catch (o_O) {
DEBUG_BUILD && logger.log(`Failed to add non-enumerable property "${name}" to object`, obj);
}
}
function markFunctionWrapped(wrapped, original) {
try {
const proto = original.prototype || {};
wrapped.prototype = original.prototype = proto;
addNonEnumerableProperty(wrapped, "__sentry_original__", original);
} catch (o_O) {
}
}
function getOriginalFunction(func) {
return func.__sentry_original__;
}
function urlEncode(object) {
return Object.keys(object).map((key) => `${encodeURIComponent(key)}=${encodeURIComponent(object[key])}`).join("&");
}
function convertToPlainObject(value) {
if (isError(value)) {
return __spreadValues({
message: value.message,
name: value.name,
stack: value.stack
}, getOwnProperties(value));
} else if (isEvent(value)) {
const newObj = __spreadValues({
type: value.type,
target: serializeEventTarget(value.target),
currentTarget: serializeEventTarget(value.currentTarget)
}, getOwnProperties(value));
if (typeof CustomEvent !== "undefined" && isInstanceOf(value, CustomEvent)) {
newObj.detail = value.detail;
}
return newObj;
} else {
return value;
}
}
function serializeEventTarget(target) {
try {
return isElement(target) ? htmlTreeAsString(target) : Object.prototype.toString.call(target);
} catch (_oO) {
return "<unknown>";
}
}
function getOwnProperties(obj) {
if (typeof obj === "object" && obj !== null) {
const extractedProps = {};
for (const property in obj) {
if (Object.prototype.hasOwnProperty.call(obj, property)) {
extractedProps[property] = obj[property];
}
}
return extractedProps;
} else {
return {};
}
}
function extractExceptionKeysForMessage(exception, maxLength = 40) {
const keys = Object.keys(convertToPlainObject(exception));
keys.sort();
if (!keys.length) {
return "[object has no keys]";
}
if (keys[0].length >= maxLength) {
return truncate(keys[0], maxLength);
}
for (let includedKeys = keys.length; includedKeys > 0; includedKeys--) {
const serialized = keys.slice(0, includedKeys).join(", ");
if (serialized.length > maxLength) {
continue;
}
if (includedKeys === keys.length) {
return serialized;
}
return truncate(serialized, maxLength);
}
return "";
}
function dropUndefinedKeys(inputValue) {
const memoizationMap = /* @__PURE__ */ new Map();
return _dropUndefinedKeys(inputValue, memoizationMap);
}
function _dropUndefinedKeys(inputValue, memoizationMap) {
if (isPlainObject(inputValue)) {
const memoVal = memoizationMap.get(inputValue);
if (memoVal !== void 0) {
return memoVal;
}
const returnValue = {};
memoizationMap.set(inputValue, returnValue);
for (const key of Object.keys(inputValue)) {
if (typeof inputValue[key] !== "undefined") {
returnValue[key] = _dropUndefinedKeys(inputValue[key], memoizationMap);
}
}
return returnValue;
}
if (Array.isArray(inputValue)) {
const memoVal = memoizationMap.get(inputValue);
if (memoVal !== void 0) {
return memoVal;
}
const returnValue = [];
memoizationMap.set(inputValue, returnValue);
inputValue.forEach((item) => {
returnValue.push(_dropUndefinedKeys(item, memoizationMap));
});
return returnValue;
}
return inputValue;
}
var init_object = __esm({
"node_modules/@sentry/utils/esm/object.js"() {
init_sentry_release_injection_stub();
init_browser();
init_debug_build();
init_is();
init_logger();
init_string();
}
});
// node_modules/@sentry/utils/esm/stacktrace.js
function createStackParser(...parsers) {
const sortedParsers = parsers.sort((a, b) => a[0] - b[0]).map((p) => p[1]);
return (stack, skipFirst = 0) => {
const frames = [];
const lines = stack.split("\n");
for (let i = skipFirst; i < lines.length; i++) {
const line = lines[i];
if (line.length > 1024) {
continue;
}
const cleanedLine = WEBPACK_ERROR_REGEXP.test(line) ? line.replace(WEBPACK_ERROR_REGEXP, "$1") : line;
if (cleanedLine.match(/\S*Error: /)) {
continue;
}
for (const parser of sortedParsers) {
const frame = parser(cleanedLine);
if (frame) {
frames.push(frame);
break;
}
}
if (frames.length >= STACKTRACE_FRAME_LIMIT) {
break;
}
}
return stripSentryFramesAndReverse(frames);
};
}
function stackParserFromStackParserOptions(stackParser) {
if (Array.isArray(stackParser)) {
return createStackParser(...stackParser);
}
return stackParser;
}
function stripSentryFramesAndReverse(stack) {
if (!stack.length) {
return [];
}
const localStack = Array.from(stack);
if (/sentryWrapped/.test(localStack[localStack.length - 1].function || "")) {
localStack.pop();
}
localStack.reverse();
if (STRIP_FRAME_REGEXP.test(localStack[localStack.length - 1].function || "")) {
localStack.pop();
if (STRIP_FRAME_REGEXP.test(localStack[localStack.length - 1].function || "")) {
localStack.pop();
}
}
return localStack.slice(0, STACKTRACE_FRAME_LIMIT).map((frame) => __spreadProps(__spreadValues({}, frame), {
filename: frame.filename || localStack[localStack.length - 1].filename,
function: frame.function || "?"
}));
}
function getFunctionName(fn) {
try {
if (!fn || typeof fn !== "function") {
return defaultFunctionName;
}
return fn.name || defaultFunctionName;
} catch (e) {
return defaultFunctionName;
}
}
var STACKTRACE_FRAME_LIMIT, WEBPACK_ERROR_REGEXP, STRIP_FRAME_REGEXP, defaultFunctionName;
var init_stacktrace = __esm({
"node_modules/@sentry/utils/esm/stacktrace.js"() {
init_sentry_release_injection_stub();
STACKTRACE_FRAME_LIMIT = 50;
WEBPACK_ERROR_REGEXP = /\(error: (.*)\)/;
STRIP_FRAME_REGEXP = /captureMessage|captureException/;
defaultFunctionName = "<anonymous>";
}
});
// node_modules/@sentry/utils/esm/instrument/_handlers.js
function addHandler(type, handler) {
handlers[type] = handlers[type] || [];
handlers[type].push(handler);
}
function maybeInstrument(type, instrumentFn) {
if (!instrumented[type]) {
instrumentFn();
instrumented[type] = true;
}
}
function triggerHandlers(type, data) {
const typeHandlers = type && handlers[type];
if (!typeHandlers) {
return;
}
for (const handler of typeHandlers) {
try {
handler(data);
} catch (e) {
DEBUG_BUILD && logger.error(
`Error while triggering instrumentation handler.
Type: ${type}
Name: ${getFunctionName(handler)}
Error:`,
e
);
}
}
}
var handlers, instrumented;
var init_handlers = __esm({
"node_modules/@sentry/utils/esm/instrument/_handlers.js"() {
init_sentry_release_injection_stub();
init_debug_build();
init_logger();
init_stacktrace();
handlers = {};
instrumented = {};
}
});
// node_modules/@sentry/utils/esm/instrument/console.js
function addConsoleInstrumentationHandler(handler) {
const type = "console";
addHandler(type, handler);
maybeInstrument(type, instrumentConsole);
}
function instrumentConsole() {
if (!("console" in GLOBAL_OBJ)) {
return;
}
CONSOLE_LEVELS.forEach(function(level) {
if (!(level in GLOBAL_OBJ.console)) {
return;
}
fill(GLOBAL_OBJ.console, level, function(originalConsoleMethod) {
originalConsoleMethods[level] = originalConsoleMethod;
return function(...args) {
const handlerData = { args, level };
triggerHandlers("console", handlerData);
const log = originalConsoleMethods[level];
log && log.apply(GLOBAL_OBJ.console, args);
};
});
});
}
var init_console = __esm({
"node_modules/@sentry/utils/esm/instrument/console.js"() {
init_sentry_release_injection_stub();
init_logger();
init_object();
init_worldwide();
init_handlers();
}
});
// node_modules/@sentry/utils/esm/misc.js
function uuid4() {
const gbl = GLOBAL_OBJ;
const crypto = gbl.crypto || gbl.msCrypto;
let getRandomByte = () => Math.random() * 16;
try {
if (crypto && crypto.randomUUID) {
return crypto.randomUUID().replace(/-/g, "");
}
if (crypto && crypto.getRandomValues) {
getRandomByte = () => {
const typedArray = new Uint8Array(1);
crypto.getRandomValues(typedArray);
return typedArray[0];
};
}
} catch (_) {
}
return ("10000000100040008000" + 1e11).replace(
/[018]/g,
(c) => (
// eslint-disable-next-line no-bitwise
(c ^ (getRandomByte() & 15) >> c / 4).toString(16)
)
);
}
function getFirstException(event) {
return event.exception && event.exception.values ? event.exception.values[0] : void 0;
}
function getEventDescription(event) {
const { message, event_id: eventId } = event;
if (message) {
return message;
}
const firstException = getFirstException(event);
if (firstException) {
if (firstException.type && firstException.value) {
return `${firstException.type}: ${firstException.value}`;
}
return firstException.type || firstException.value || eventId || "<unknown>";
}
return eventId || "<unknown>";
}
function addExceptionTypeValue(event, value, type) {
const exception = event.exception = event.exception || {};
const values = exception.values = exception.values || [];
const firstException = values[0] = values[0] || {};
if (!firstException.value) {
firstException.value = value || "";
}
if (!firstException.type) {
firstException.type = type || "Error";
}
}
function addExceptionMechanism(event, newMechanism) {
const firstException = getFirstException(event);
if (!firstException) {
return;
}
const defaultMechanism = { type: "generic", handled: true };
const currentMechanism = firstException.mechanism;
firstException.mechanism = __spreadValues(__spreadValues(__spreadValues({}, defaultMechanism), currentMechanism), newMechanism);
if (newMechanism && "data" in newMechanism) {
const mergedData = __spreadValues(__spreadValues({}, currentMechanism && currentMechanism.data), newMechanism.data);
firstException.mechanism.data = mergedData;
}
}
function checkOrSetAlreadyCaught(exception) {
if (exception && exception.__sentry_captured__) {
return true;
}
try {
addNonEnumerableProperty(exception, "__sentry_captured__", true);
} catch (err) {
}
return false;
}
function arrayify(maybeArray) {
return Array.isArray(maybeArray) ? maybeArray : [maybeArray];
}
var init_misc = __esm({
"node_modules/@sentry/utils/esm/misc.js"() {
init_sentry_release_injection_stub();
init_object();
init_worldwide();
}
});
// node_modules/@sentry/utils/esm/instrument/dom.js
function addClickKeypressInstrumentationHandler(handler) {
const type = "dom";
addHandler(type, handler);
maybeInstrument(type, instrumentDOM);
}
function instrumentDOM() {
if (!WINDOW2.document) {
return;
}
const triggerDOMHandler = triggerHandlers.bind(null, "dom");
const globalDOMEventHandler = makeDOMEventHandler(triggerDOMHandler, true);
WINDOW2.document.addEventListener("click", globalDOMEventHandler, false);
WINDOW2.document.addEventListener("keypress", globalDOMEventHandler, false);
["EventTarget", "Node"].forEach((target) => {
const proto = WINDOW2[target] && WINDOW2[target].prototype;
if (!proto || !proto.hasOwnProperty || !proto.hasOwnProperty("addEventListener")) {
return;
}
fill(proto, "addEventListener", function(originalAddEventListener) {
return function(type, listener, options) {
if (type === "click" || type == "keypress") {
try {
const el = this;
const handlers2 = el.__sentry_instrumentation_handlers__ = el.__sentry_instrumentation_handlers__ || {};
const handlerForType = handlers2[type] = handlers2[type] || { refCount: 0 };
if (!handlerForType.handler) {
const handler = makeDOMEventHandler(triggerDOMHandler);
handlerForType.handler = handler;
originalAddEventListener.call(this, type, handler, options);
}
handlerForType.refCount++;
} catch (e) {
}
}
return originalAddEventListener.call(this, type, listener, options);
};
});
fill(
proto,
"removeEventListener",
function(originalRemoveEventListener) {
return function(type, listener, options) {
if (type === "click" || type == "keypress") {
try {
const el = this;
const handlers2 = el.__sentry_instrumentation_handlers__ || {};
const handlerForType = handlers2[type];
if (handlerForType) {
handlerForType.refCount--;
if (handlerForType.refCount <= 0) {
originalRemoveEventListener.call(this, type, handlerForType.handler, options);
handlerForType.handler = void 0;
delete handlers2[type];
}
if (Object.keys(handlers2).length === 0) {
delete el.__sentry_instrumentation_handlers__;
}
}
} catch (e) {
}
}
return originalRemoveEventListener.call(this, type, listener, options);
};
}
);
});
}
function isSimilarToLastCapturedEvent(event) {
if (event.type !== lastCapturedEventType) {
return false;
}
try {
if (!event.target || event.target._sentryId !== lastCapturedEventTargetId) {
return false;
}
} catch (e) {
}
return true;
}
function shouldSkipDOMEvent(eventType, target) {
if (eventType !== "keypress") {
return false;
}
if (!target || !target.tagName) {
return true;
}
if (target.tagName === "INPUT" || target.tagName === "TEXTAREA" || target.isContentEditable) {
return false;
}
return true;
}
function makeDOMEventHandler(handler, globalListener = false) {
return (event) => {
if (!event || event["_sentryCaptured"]) {
return;
}
const target = getEventTarget(event);
if (shouldSkipDOMEvent(event.type, target)) {
return;
}
addNonEnumerableProperty(event, "_sentryCaptured", true);
if (target && !target._sentryId) {
addNonEnumerableProperty(target, "_sentryId", uuid4());
}
const name = event.type === "keypress" ? "input" : event.type;
if (!isSimilarToLastCapturedEvent(event)) {
const handlerData = { event, name, global: globalListener };
handler(handlerData);
lastCapturedEventType = event.type;
lastCapturedEventTargetId = target ? target._sentryId : void 0;
}
clearTimeout(debounceTimerID);
debounceTimerID = WINDOW2.setTimeout(() => {
lastCapturedEventTargetId = void 0;
lastCapturedEventType = void 0;
}, DEBOUNCE_DURATION);
};
}
function getEventTarget(event) {
try {
return event.target;
} catch (e) {
return null;
}
}
var WINDOW2, DEBOUNCE_DURATION, debounceTimerID, lastCapturedEventType, lastCapturedEventTargetId;
var init_dom = __esm({
"node_modules/@sentry/utils/esm/instrument/dom.js"() {
init_sentry_release_injection_stub();
init_misc();
init_object();
init_worldwide();
init_handlers();
WINDOW2 = GLOBAL_OBJ;
DEBOUNCE_DURATION = 1e3;
}
});
// node_modules/@sentry/utils/esm/supports.js
function supportsFetch() {
if (!("fetch" in WINDOW3)) {
return false;
}
try {
new Headers();
new Request("http://www.example.com");
new Response();
return true;
} catch (e) {
return false;
}
}
function isNativeFetch(func) {
return func && /^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(func.toString());
}
function supportsNativeFetch() {
if (typeof EdgeRuntime === "string") {
return true;
}
if (!supportsFetch()) {
return false;
}
if (isNativeFetch(WINDOW3.fetch)) {
return true;
}
let result = false;
const doc = WINDOW3.document;
if (doc && typeof doc.createElement === "function") {
try {
const sandbox = doc.createElement("iframe");
sandbox.hidden = true;
doc.head.appendChild(sandbox);
if (sandbox.contentWindow && sandbox.contentWindow.fetch) {
result = isNativeFetch(sandbox.contentWindow.fetch);
}
doc.head.removeChild(sandbox);
} catch (err) {
DEBUG_BUILD && logger.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ", err);
}
}
return result;
}
var WINDOW3;
var init_supports = __esm({
"node_modules/@sentry/utils/esm/supports.js"() {
init_sentry_release_injection_stub();
init_debug_build();
init_logger();
init_worldwide();
WINDOW3 = getGlobalObject();
}
});
// node_modules/@sentry/utils/esm/instrument/fetch.js
function addFetchInstrumentationHandler(handler) {
const type = "fetch";
addHandler(type, handler);
maybeInstrument(type, instrumentFetch);
}
function instrumentFetch() {
if (!supportsNativeFetch()) {
return;
}
fill(GLOBAL_OBJ, "fetch", function(originalFetch) {
return function(...args) {
const { method, url } = parseFetchArgs(args);
const handlerData = {
args,
fetchData: {
method,
url
},
startTimestamp: Date.now()
};
triggerHandlers("fetch", __spreadValues({}, handlerData));
return originalFetch.apply(GLOBAL_OBJ, args).then(
(response) => {
const finishedHandlerData = __spreadProps(__spreadValues({}, handlerData), {
endTimestamp: Date.now(),
response
});
triggerHandlers("fetch", finishedHandlerData);
return response;
},
(error) => {
const erroredHandlerData = __spreadProps(__spreadValues({}, handlerData), {
endTimestamp: Date.now(),
error
});
triggerHandlers("fetch", erroredHandlerData);
throw error;
}
);
};
});
}
function hasProp(obj, prop) {
return !!obj && typeof obj === "object" && !!obj[prop];
}
function getUrlFromResource(resource) {
if (typeof resource === "string") {
return resource;
}
if (!resource) {
return "";
}
if (hasProp(resource, "url")) {
return resource.url;
}
if (resource.toString) {
return resource.toString();
}
return "";
}
function parseFetchArgs(fetchArgs) {
if (fetchArgs.length === 0) {
return { method: "GET", url: "" };
}
if (fetchArgs.length === 2) {
const [url, options] = fetchArgs;
return {
url: getUrlFromResource(url),
method: hasProp(options, "method") ? String(options.method).toUpperCase() : "GET"
};
}
const arg = fetchArgs[0];
return {
url: getUrlFromResource(arg),
method: hasProp(arg, "method") ? String(arg.method).toUpperCase() : "GET"
};
}
var init_fetch = __esm({
"node_modules/@sentry/utils/esm/instrument/fetch.js"() {
init_sentry_release_injection_stub();
init_object();
init_supports();
init_worldwide();
init_handlers();
}
});
// node_modules/@sentry/utils/esm/instrument/globalError.js
function addGlobalErrorInstrumentationHandler(handler) {
const type = "error";
addHandler(type, handler);
maybeInstrument(type, instrumentError);
}
function instrumentError() {
_oldOnErrorHandler = GLOBAL_OBJ.onerror;
GLOBAL_OBJ.onerror = function(msg, url, line, column, error) {
const handlerData = {
column,
error,
line,
msg,
url
};
triggerHandlers("error", handlerData);
if (_oldOnErrorHandler && !_oldOnErrorHandler.__SENTRY_LOADER__) {
return _oldOnErrorHandler.apply(this, arguments);
}
return false;
};
GLOBAL_OBJ.onerror.__SENTRY_INSTRUMENTED__ = true;
}
var _oldOnErrorHandler;
var init_globalError = __esm({
"node_modules/@sentry/utils/esm/instrument/globalError.js"() {
init_sentry_release_injection_stub();
init_worldwide();
init_handlers();
_oldOnErrorHandler = null;
}
});
// node_modules/@sentry/utils/esm/instrument/globalUnhandledRejection.js
function addGlobalUnhandledRejectionInstrumentationHandler(handler) {
const type = "unhandledrejection";
addHandler(type, handler);
maybeInstrument(type, instrumentUnhandledRejection);
}
function instrumentUnhandledRejection() {
_oldOnUnhandledRejectionHandler = GLOBAL_OBJ.onunhandledrejection;
GLOBAL_OBJ.onunhandledrejection = function(e) {
const handlerData = e;
triggerHandlers("unhandledrejection", handlerData);
if (_oldOnUnhandledRejectionHandler && !_oldOnUnhandledRejectionHandler.__SENTRY_LOADER__) {
return _oldOnUnhandledRejectionHandler.apply(this, arguments);
}
return true;
};
GLOBAL_OBJ.onunhandledrejection.__SENTRY_INSTRUMENTED__ = true;
}
var _oldOnUnhandledRejectionHandler;
var init_globalUnhandledRejection = __esm({
"node_modules/@sentry/utils/esm/instrument/globalUnhandledRejection.js"() {
init_sentry_release_injection_stub();
init_worldwide();
init_handlers();
_oldOnUnhandledRejectionHandler = null;
}
});
// node_modules/@sentry/utils/esm/vendor/supportsHistory.js
function supportsHistory() {
const chrome2 = WINDOW4.chrome;
const isChromePackagedApp = chrome2 && chrome2.app && chrome2.app.runtime;
const hasHistoryApi = "history" in WINDOW4 && !!WINDOW4.history.pushState && !!WINDOW4.history.replaceState;
return !isChromePackagedApp && hasHistoryApi;
}
var WINDOW4;
var init_supportsHistory = __esm({
"node_modules/@sentry/utils/esm/vendor/supportsHistory.js"() {
init_sentry_release_injection_stub();
init_worldwide();
WINDOW4 = getGlobalObject();
}
});
// node_modules/@sentry/utils/esm/instrument/history.js
function addHistoryInstrumentationHandler(handler) {
const type = "history";
addHandler(type, handler);
maybeInstrument(type, instrumentHistory);
}
function instrumentHistory() {
if (!supportsHistory()) {
return;
}
const oldOnPopState = WINDOW5.onpopstate;
WINDOW5.onpopstate = function(...args) {
const to = WINDOW5.location.href;
const from = lastHref;
lastHref = to;
const handlerData = { from, to };
triggerHandlers("history", handlerData);
if (oldOnPopState) {
try {
return oldOnPopState.apply(this, args);
} catch (_oO) {
}
}
};
function historyReplacementFunction(originalHistoryFunction) {
return function(...args) {
const url = args.length > 2 ? args[2] : void 0;
if (url) {
const from = lastHref;
const to = String(url);
lastHref = to;
const handlerData = { from, to };
triggerHandlers("history", handlerData);
}
return originalHistoryFunction.apply(this, args);
};
}
fill(WINDOW5.history, "pushState", historyReplacementFunction);
fill(WINDOW5.history, "replaceState", historyReplacementFunction);
}
var WINDOW5, lastHref;
var init_history = __esm({
"node_modules/@sentry/utils/esm/instrument/history.js"() {
init_sentry_release_injection_stub();
init_object();
init_worldwide();
init_supportsHistory();
init_handlers();
WINDOW5 = GLOBAL_OBJ;
}
});
// node_modules/@sentry/utils/esm/instrument/xhr.js
function addXhrInstrumentationHandler(handler) {
const type = "xhr";
addHandler(type, handler);
maybeInstrument(type, instrumentXHR);
}
function instrumentXHR() {
if (!WINDOW6.XMLHttpRequest) {
return;
}
const xhrproto = XMLHttpRequest.prototype;
fill(xhrproto, "open", function(originalOpen) {
return function(...args) {
const startTimestamp = Date.now();
const method = isString(args[0]) ? args[0].toUpperCase() : void 0;
const url = parseUrl(args[1]);
if (!method || !url) {
return originalOpen.apply(this, args);
}
this[SENTRY_XHR_DATA_KEY] = {
method,
url,
request_headers: {}
};
if (method === "POST" && url.match(/sentry_key/)) {
this.__sentry_own_request__ = true;
}
const onreadystatechangeHandler = () => {
const xhrInfo = this[SENTRY_XHR_DATA_KEY];
if (!xhrInfo) {
return;
}
if (this.readyState === 4) {
try {
xhrInfo.status_code = this.status;
} catch (e) {
}
const handlerData = {
args: [method, url],
endTimestamp: Date.now(),
startTimestamp,
xhr: this
};
triggerHandlers("xhr", handlerData);
}
};
if ("onreadystatechange" in this && typeof this.onreadystatechange === "function") {
fill(this, "onreadystatechange", function(original) {
return function(...readyStateArgs) {
onreadystatechangeHandler();
return original.apply(this, readyStateArgs);
};
});
} else {
this.addEventListener("readystatechange", onreadystatechangeHandler);
}
fill(this, "setRequestHeader", function(original) {
return function(...setRequestHeaderArgs) {
const [header, value] = setRequestHeaderArgs;
const xhrInfo = this[SENTRY_XHR_DATA_KEY];
if (xhrInfo && isString(header) && isString(value)) {
xhrInfo.request_headers[header.toLowerCase()] = value;
}
return original.apply(this, setRequestHeaderArgs);
};
});
return originalOpen.apply(this, args);
};
});
fill(xhrproto, "send", function(originalSend) {
return function(...args) {
const sentryXhrData = this[SENTRY_XHR_DATA_KEY];
if (!sentryXhrData) {
return originalSend.apply(this, args);
}
if (args[0] !== void 0) {
sentryXhrData.body = args[0];
}
const handlerData = {
args: [sentryXhrData.method, sentryXhrData.url],
startTimestamp: Date.now(),
xhr: this
};
triggerHandlers("xhr", handlerData);
return originalSend.apply(this, args);
};
});
}
function parseUrl(url) {
if (isString(url)) {
return url;
}
try {
return url.toString();
} catch (e2) {
}
return void 0;
}
var WINDOW6, SENTRY_XHR_DATA_KEY;
var init_xhr = __esm({
"node_modules/@sentry/utils/esm/instrument/xhr.js"() {
init_sentry_release_injection_stub();
init_is();
init_object();
init_worldwide();
init_handlers();
WINDOW6 = GLOBAL_OBJ;
SENTRY_XHR_DATA_KEY = "__sentry_xhr_v3__";
}
});
// node_modules/@sentry/utils/esm/env.js
function getSDKSource() {
return "npm";
}
var init_env = __esm({
"node_modules/@sentry/utils/esm/env.js"() {
init_sentry_release_injection_stub();
}
});
// node_modules/@sentry/utils/esm/memo.js
function memoBuilder() {
const hasWeakSet = typeof WeakSet === "function";
const inner = hasWeakSet ? /* @__PURE__ */ new WeakSet() : [];
function memoize(obj) {
if (hasWeakSet) {
if (inner.has(obj)) {
return true;
}
inner.add(obj);
return false;
}
for (let i = 0; i < inner.length; i++) {
const value = inner[i];
if (value === obj) {
return true;
}
}
inner.push(obj);
return false;
}
function unmemoize(obj) {
if (hasWeakSet) {
inner.delete(obj);
} else {
for (let i = 0; i < inner.length; i++) {
if (inner[i] === obj) {
inner.splice(i, 1);
break;
}
}
}
}
return [memoize, unmemoize];
}
var init_memo = __esm({
"node_modules/@sentry/utils/esm/memo.js"() {
init_sentry_release_injection_stub();
}
});
// node_modules/@sentry/utils/esm/normalize.js
function normalize(input, depth = 100, maxProperties = Infinity) {
try {
return visit("", input, depth, maxProperties);
} catch (err) {
return { ERROR: `**non-serializable** (${err})` };
}
}
function normalizeToSize(object, depth = 3, maxSize = 100 * 1024) {
const normalized = normalize(object, depth);
if (jsonSize(normalized) > maxSize) {
return normalizeToSize(object, depth - 1, maxSize);
}
return normalized;
}
function visit(key, value, depth = Infinity, maxProperties = Infinity, memo = memoBuilder()) {
const [memoize, unmemoize] = memo;
if (value == null || // this matches null and undefined -> eqeq not eqeqeq
["number", "boolean", "string"].includes(typeof value) && !isNaN2(value)) {
return value;
}
const stringified = stringifyValue(key, value);
if (!stringified.startsWith("[object ")) {
return stringified;
}
if (value["__sentry_skip_normalization__"]) {
return value;
}
const remainingDepth = typeof value["__sentry_override_normalization_depth__"] === "number" ? value["__sentry_override_normalization_depth__"] : depth;
if (remainingDepth === 0) {
return stringified.replace("object ", "");
}
if (memoize(value)) {
return "[Circular ~]";
}
const valueWithToJSON = value;
if (valueWithToJSON && typeof valueWithToJSON.toJSON === "function") {
try {
const jsonValue = valueWithToJSON.toJSON();
return visit("", jsonValue, remainingDepth - 1, maxProperties, memo);
} catch (err) {
}
}
const normalized = Array.isArray(value) ? [] : {};
let numAdded = 0;
const visitable = convertToPlainObject(value);
for (const visitKey in visitable) {
if (!Object.prototype.hasOwnProperty.call(visitable, visitKey)) {
continue;
}
if (numAdded >= maxProperties) {
normalized[visitKey] = "[MaxProperties ~]";
break;
}
const visitValue = visitable[visitKey];
normalized[visitKey] = visit(visitKey, visitValue, remainingDepth - 1, maxProperties, memo);
numAdded++;
}
unmemoize(value);
return normalized;
}
function stringifyValue(key, value) {
try {
if (key === "domain" && value && typeof value === "object" && value._events) {
return "[Domain]";
}
if (key === "domainEmitter") {
return "[DomainEmitter]";
}
if (typeof global !== "undefined" && value === global) {
return "[Global]";
}
if (typeof window !== "undefined" && value === window) {
return "[Window]";
}
if (typeof document !== "undefined" && value === document) {
return "[Document]";
}
if (isVueViewModel(value)) {
return "[VueViewModel]";
}
if (isSyntheticEvent(value)) {
return "[SyntheticEvent]";
}
if (typeof value === "number" && value !== value) {
return "[NaN]";
}
if (typeof value === "function") {
return `[Function: ${getFunctionName(value)}]`;
}
if (typeof value === "symbol") {
return `[${String(value)}]`;
}
if (typeof value === "bigint") {
return `[BigInt: ${String(value)}]`;
}
const objName = getConstructorName(value);
if (/^HTML(\w*)Element$/.test(objName)) {
return `[HTMLElement: ${objName}]`;
}
return `[object ${objName}]`;
} catch (err) {
return `**non-serializable** (${err})`;
}
}
function getConstructorName(value) {
const prototype = Object.getPrototypeOf(value);
return prototype ? prototype.constructor.name : "null prototype";
}
function utf8Length(value) {
return ~-encodeURI(value).split(/%..|./).length;
}
function jsonSize(value) {
return utf8Length(JSON.stringify(value));
}
var init_normalize = __esm({
"node_modules/@sentry/utils/esm/normalize.js"() {
init_sentry_release_injection_stub();
init_is();
init_memo();
init_object();
init_stacktrace();
}
});
// node_modules/@sentry/utils/esm/syncpromise.js
function resolvedSyncPromise(value) {
return new SyncPromise((resolve) => {
resolve(value);
});
}
function rejectedSyncPromise(reason) {
return new SyncPromise((_, reject) => {
reject(reason);
});
}
var States, SyncPromise;
var init_syncpromise = __esm({
"node_modules/@sentry/utils/esm/syncpromise.js"() {
init_sentry_release_injection_stub();
init_is();
(function(States2) {
const PENDING = 0;
States2[States2["PENDING"] = PENDING] = "PENDING";
const RESOLVED = 1;
States2[States2["RESOLVED"] = RESOLVED] = "RESOLVED";
const REJECTED = 2;
States2[States2["REJECTED"] = REJECTED] = "REJECTED";
})(States || (States = {}));
SyncPromise = class _SyncPromise {
constructor(executor) {
_SyncPromise.prototype.__init.call(this);
_SyncPromise.prototype.__init2.call(this);
_SyncPromise.prototype.__init3.call(this);
_SyncPromise.prototype.__init4.call(this);
this._state = States.PENDING;
this._handlers = [];
try {
executor(this._resolve, this._reject);
} catch (e) {
this._reject(e);
}
}
/** JSDoc */
then(onfulfilled, onrejected) {
return new _SyncPromise((resolve, reject) => {
this._handlers.push([
false,
(result) => {
if (!onfulfilled) {
resolve(result);
} else {
try {
resolve(onfulfilled(result));
} catch (e) {
reject(e);
}
}
},
(reason) => {
if (!onrejected) {
reject(reason);
} else {
try {
resolve(onrejected(reason));
} catch (e) {
reject(e);
}
}
}
]);
this._executeHandlers();
});
}
/** JSDoc */
catch(onrejected) {
return this.then((val) => val, onrejected);
}
/** JSDoc */
finally(onfinally) {
return new _SyncPromise((resolve, reject) => {
let val;
let isRejected;
return this.then(
(value) => {
isRejected = false;
val = value;
if (onfinally) {
onfinally();
}
},
(reason) => {
isRejected = true;
val = reason;
if (onfinally) {
onfinally();
}
}
).then(() => {
if (isRejected) {
reject(val);
return;
}
resolve(val);
});
});
}
/** JSDoc */
__init() {
this._resolve = (value) => {
this._setResult(States.RESOLVED, value);
};
}
/** JSDoc */
__init2() {
this._reject = (reason) => {
this._setResult(States.REJECTED, reason);
};
}
/** JSDoc */
__init3() {
this._setResult = (state, value) => {
if (this._state !== States.PENDING) {
return;
}
if (isThenable(value)) {
void value.then(this._resolve, this._reject);
return;
}
this._state = state;
this._value = value;
this._executeHandlers();
};
}
/** JSDoc */
__init4() {
this._executeHandlers = () => {
if (this._state === States.PENDING) {
return;
}
const cachedHandlers = this._handlers.slice();
this._handlers = [];
cachedHandlers.forEach((handler) => {
if (handler[0]) {
return;
}
if (this._state === States.RESOLVED) {
handler[1](this._value);
}
if (this._state === States.REJECTED) {
handler[2](this._value);
}
handler[0] = true;
});
};
}
};
}
});
// node_modules/@sentry/utils/esm/promisebuffer.js
function makePromiseBuffer(limit2) {
const buffer = [];
function isReady() {
return limit2 === void 0 || buffer.length < limit2;
}
function remove(task) {
return buffer.splice(buffer.indexOf(task), 1)[0];
}
function add(taskProducer) {
if (!isReady()) {
return rejectedSyncPromise(new SentryError("Not adding Promise because buffer limit was reached."));
}
const task = taskProducer();
if (buffer.indexOf(task) === -1) {
buffer.push(task);
}
void task.then(() => remove(task)).then(
null,
() => remove(task).then(null, () => {
})
);
return task;
}
function drain(timeout) {
return new SyncPromise((resolve, reject) => {
let counter = buffer.length;
if (!counter) {
return resolve(true);
}
const capturedSetTimeout = setTimeout(() => {
if (timeout && timeout > 0) {
resolve(false);
}
}, timeout);
buffer.forEach((item) => {
void resolvedSyncPromise(item).then(() => {
if (!--counter) {
clearTimeout(capturedSetTimeout);
resolve(true);
}
}, reject);
});
});
}
return {
$: buffer,
add,
drain
};
}
var init_promisebuffer = __esm({
"node_modules/@sentry/utils/esm/promisebuffer.js"() {
init_sentry_release_injection_stub();
init_error();
init_syncpromise();
}
});
// node_modules/@sentry/utils/esm/url.js
function parseUrl2(url) {
if (!url) {
return {};
}
const match = url.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);
if (!match) {
return {};
}
const query = match[6] || "";
const fragment = match[8] || "";
return {
host: match[4],
path: match[5],
protocol: match[2],
search: query,
hash: fragment,
relative: match[5] + query + fragment
// everything minus origin
};
}
var init_url = __esm({
"node_modules/@sentry/utils/esm/url.js"() {
init_sentry_release_injection_stub();
}
});
// node_modules/@sentry/utils/esm/severity.js
function severityLevelFromString(level) {
return level === "warn" ? "warning" : validSeverityLevels.includes(level) ? level : "log";
}
var validSeverityLevels;
var init_severity = __esm({
"node_modules/@sentry/utils/esm/severity.js"() {
init_sentry_release_injection_stub();
validSeverityLevels = ["fatal", "error", "warning", "log", "info", "debug"];
}
});
// node_modules/@sentry/utils/esm/time.js
function dateTimestampInSeconds() {
return Date.now() / ONE_SECOND_IN_MS;
}
function createUnixTimestampInSecondsFunc() {
const { performance } = GLOBAL_OBJ;
if (!performance || !performance.now) {
return dateTimestampInSeconds;
}
const approxStartingTimeOrigin = Date.now() - performance.now();
const timeOrigin = performance.timeOrigin == void 0 ? approxStartingTimeOrigin : performance.timeOrigin;
return () => {
return (timeOrigin + performance.now()) / ONE_SECOND_IN_MS;
};
}
var ONE_SECOND_IN_MS, timestampInSeconds, _browserPerformanceTimeOriginMode, browserPerformanceTimeOrigin;
var init_time = __esm({
"node_modules/@sentry/utils/esm/time.js"() {
init_sentry_release_injection_stub();
init_worldwide();
ONE_SECOND_IN_MS = 1e3;
timestampInSeconds = createUnixTimestampInSecondsFunc();
browserPerformanceTimeOrigin = (() => {
const { performance } = GLOBAL_OBJ;
if (!performance || !performance.now) {
_browserPerformanceTimeOriginMode = "none";
return void 0;
}
const threshold = 3600 * 1e3;
const performanceNow = performance.now();
const dateNow = Date.now();
const timeOriginDelta = performance.timeOrigin ? Math.abs(performance.timeOrigin + performanceNow - dateNow) : threshold;
const timeOriginIsReliable = timeOriginDelta < threshold;
const navigationStart = performance.timing && performance.timing.navigationStart;
const hasNavigationStart = typeof navigationStart === "number";
const navigationStartDelta = hasNavigationStart ? Math.abs(navigationStart + performanceNow - dateNow) : threshold;
const navigationStartIsReliable = navigationStartDelta < threshold;
if (timeOriginIsReliable || navigationStartIsReliable) {
if (timeOriginDelta <= navigationStartDelta) {
_browserPerformanceTimeOriginMode = "timeOrigin";
return performance.timeOrigin;
} else {
_browserPerformanceTimeOriginMode = "navigationStart";
return navigationStart;
}
}
_browserPerformanceTimeOriginMode = "dateNow";
return dateNow;
})();
}
});
// node_modules/@sentry/utils/esm/envelope.js
function createEnvelope(headers, items2 = []) {
return [headers, items2];
}
function addItemToEnvelope(envelope, newItem) {
const [headers, items2] = envelope;
return [headers, [...items2, newItem]];
}
function forEachEnvelopeItem(envelope, callback) {
const envelopeItems = envelope[1];
for (const envelopeItem of envelopeItems) {
const envelopeItemType = envelopeItem[0].type;
const result = callback(envelopeItem, envelopeItemType);
if (result) {
return true;
}
}
return false;
}
function encodeUTF8(input, textEncoder) {
const utf8 = textEncoder || new TextEncoder();
return utf8.encode(input);
}
function serializeEnvelope(envelope, textEncoder) {
const [envHeaders, items2] = envelope;
let parts = JSON.stringify(envHeaders);
function append(next) {
if (typeof parts === "string") {
parts = typeof next === "string" ? parts + next : [encodeUTF8(parts, textEncoder), next];
} else {
parts.push(typeof next === "string" ? encodeUTF8(next, textEncoder) : next);
}
}
for (const item of items2) {
const [itemHeaders, payload] = item;
append(`
${JSON.stringify(itemHeaders)}
`);
if (typeof payload === "string" || payload instanceof Uint8Array) {
append(payload);
} else {
let stringifiedPayload;
try {
stringifiedPayload = JSON.stringify(payload);
} catch (e) {
stringifiedPayload = JSON.stringify(normalize(payload));
}
append(stringifiedPayload);
}
}
return typeof parts === "string" ? parts : concatBuffers(parts);
}
function concatBuffers(buffers) {
const totalLength = buffers.reduce((acc, buf) => acc + buf.length, 0);
const merged = new Uint8Array(totalLength);
let offset = 0;
for (const buffer of buffers) {
merged.set(buffer, offset);
offset += buffer.length;
}
return merged;
}
function createAttachmentEnvelopeItem(attachment, textEncoder) {
const buffer = typeof attachment.data === "string" ? encodeUTF8(attachment.data, textEncoder) : attachment.data;
return [
dropUndefinedKeys({
type: "attachment",
length: buffer.length,
filename: attachment.filename,
content_type: attachment.contentType,
attachment_type: attachment.attachmentType
}),
buffer
];
}
function envelopeItemTypeToDataCategory(type) {
return ITEM_TYPE_TO_DATA_CATEGORY_MAP[type];
}
function getSdkMetadataForEnvelopeHeader(metadataOrEvent) {
if (!metadataOrEvent || !metadataOrEvent.sdk) {
return;
}
const { name, version } = metadataOrEvent.sdk;
return { name, version };
}
function createEventEnvelopeHeaders(event, sdkInfo, tunnel, dsn) {
const dynamicSamplingContext = event.sdkProcessingMetadata && event.sdkProcessingMetadata.dynamicSamplingContext;
return __spreadValues(__spreadValues(__spreadValues({
event_id: event.event_id,
sent_at: (/* @__PURE__ */ new Date()).toISOString()
}, sdkInfo && { sdk: sdkInfo }), !!tunnel && dsn && { dsn: dsnToString(dsn) }), dynamicSamplingContext && {
trace: dropUndefinedKeys(__spreadValues({}, dynamicSamplingContext))
});
}
var ITEM_TYPE_TO_DATA_CATEGORY_MAP;
var init_envelope = __esm({
"node_modules/@sentry/utils/esm/envelope.js"() {
init_sentry_release_injection_stub();
init_dsn();
init_normalize();
init_object();
ITEM_TYPE_TO_DATA_CATEGORY_MAP = {
session: "session",
sessions: "session",
attachment: "attachment",
transaction: "transaction",
event: "error",
client_report: "internal",
user_report: "default",
profile: "profile",
replay_event: "replay",
replay_recording: "replay",
check_in: "monitor",
feedback: "feedback",
// TODO: This is a temporary workaround until we have a proper data category for metrics
statsd: "unknown"
};
}
});
// node_modules/@sentry/utils/esm/clientreport.js
function createClientReportEnvelope(discarded_events, dsn, timestamp) {
const clientReportItem = [
{ type: "client_report" },
{
timestamp: timestamp || dateTimestampInSeconds(),
discarded_events
}
];
return createEnvelope(dsn ? { dsn } : {}, [clientReportItem]);
}
var init_clientreport = __esm({
"node_modules/@sentry/utils/esm/clientreport.js"() {
init_sentry_release_injection_stub();
init_envelope();
init_time();
}
});
// node_modules/@sentry/utils/esm/ratelimit.js
function parseRetryAfterHeader(header, now = Date.now()) {
const headerDelay = parseInt(`${header}`, 10);
if (!isNaN(headerDelay)) {
return headerDelay * 1e3;
}
const headerDate = Date.parse(`${header}`);
if (!isNaN(headerDate)) {
return headerDate - now;
}
return DEFAULT_RETRY_AFTER;
}
function disabledUntil(limits, category) {
return limits[category] || limits.all || 0;
}
function isRateLimited(limits, category, now = Date.now()) {
return disabledUntil(limits, category) > now;
}
function updateRateLimits(limits, { statusCode, headers }, now = Date.now()) {
const updatedRateLimits = __spreadValues({}, limits);
const rateLimitHeader = headers && headers["x-sentry-rate-limits"];
const retryAfterHeader = headers && headers["retry-after"];
if (rateLimitHeader) {
for (const limit2 of rateLimitHeader.trim().split(",")) {
const [retryAfter, categories] = limit2.split(":", 2);
const headerDelay = parseInt(retryAfter, 10);
const delay = (!isNaN(headerDelay) ? headerDelay : 60) * 1e3;
if (!categories) {
updatedRateLimits.all = now + delay;
} else {
for (const category of categories.split(";")) {
updatedRateLimits[category] = now + delay;
}
}
}
} else if (retryAfterHeader) {
updatedRateLimits.all = now + parseRetryAfterHeader(retryAfterHeader, now);
} else if (statusCode === 429) {
updatedRateLimits.all = now + 60 * 1e3;
}
return updatedRateLimits;
}
var DEFAULT_RETRY_AFTER;
var init_ratelimit = __esm({
"node_modules/@sentry/utils/esm/ratelimit.js"() {
init_sentry_release_injection_stub();
DEFAULT_RETRY_AFTER = 60 * 1e3;
}
});
// node_modules/@sentry/utils/esm/eventbuilder.js
function parseStackFrames(stackParser, error) {
return stackParser(error.stack || "", 1);
}
function exceptionFromError(stackParser, error) {
const exception = {
type: error.name || error.constructor.name,
value: error.message
};
const frames = parseStackFrames(stackParser, error);
if (frames.length) {
exception.stacktrace = { frames };
}
return exception;
}
var init_eventbuilder = __esm({
"node_modules/@sentry/utils/esm/eventbuilder.js"() {
init_sentry_release_injection_stub();
}
});
// node_modules/@sentry/utils/esm/index.js
var init_esm = __esm({
"node_modules/@sentry/utils/esm/index.js"() {
init_sentry_release_injection_stub();
init_aggregate_errors();
init_browser();
init_dsn();
init_error();
init_worldwide();
init_is();
init_logger();
init_misc();
init_normalize();
init_object();
init_promisebuffer();
init_severity();
init_stacktrace();
init_string();
init_supports();
init_syncpromise();
init_time();
init_env();
init_envelope();
init_clientreport();
init_ratelimit();
init_url();
init_eventbuilder();
init_console();
init_dom();
init_xhr();
init_fetch();
init_history();
init_globalError();
init_globalUnhandledRejection();
}
});
// node_modules/@sentry/core/esm/debug-build.js
var DEBUG_BUILD2;
var init_debug_build2 = __esm({
"node_modules/@sentry/core/esm/debug-build.js"() {
init_sentry_release_injection_stub();
DEBUG_BUILD2 = typeof __SENTRY_DEBUG__ === "undefined" || __SENTRY_DEBUG__;
}
});
// node_modules/@sentry/core/esm/constants.js
var DEFAULT_ENVIRONMENT;
var init_constants = __esm({
"node_modules/@sentry/core/esm/constants.js"() {
init_sentry_release_injection_stub();
DEFAULT_ENVIRONMENT = "production";
}
});
// node_modules/@sentry/core/esm/eventProcessors.js
function getGlobalEventProcessors() {
return getGlobalSingleton("globalEventProcessors", () => []);
}
function addGlobalEventProcessor(callback) {
getGlobalEventProcessors().push(callback);
}
function notifyEventProcessors(processors, event, hint, index = 0) {
return new SyncPromise((resolve, reject) => {
const processor = processors[index];
if (event === null || typeof processor !== "function") {
resolve(event);
} else {
const result = processor(__spreadValues({}, event), hint);
DEBUG_BUILD2 && processor.id && result === null && logger.log(`Event processor "${processor.id}" dropped event`);
if (isThenable(result)) {
void result.then((final) => notifyEventProcessors(processors, final, hint, index + 1).then(resolve)).then(null, reject);
} else {
void notifyEventProcessors(processors, result, hint, index + 1).then(resolve).then(null, reject);
}
}
});
}
var init_eventProcessors = __esm({
"node_modules/@sentry/core/esm/eventProcessors.js"() {
init_sentry_release_injection_stub();
init_esm();
init_debug_build2();
}
});
// node_modules/@sentry/core/esm/session.js
function makeSession(context) {
const startingTime = timestampInSeconds();
const session = {
sid: uuid4(),
init: true,
timestamp: startingTime,
started: startingTime,
duration: 0,
status: "ok",
errors: 0,
ignoreDuration: false,
toJSON: () => sessionToJSON(session)
};
if (context) {
updateSession(session, context);
}
return session;
}
function updateSession(session, context = {}) {
if (context.user) {
if (!session.ipAddress && context.user.ip_address) {
session.ipAddress = context.user.ip_address;
}
if (!session.did && !context.did) {
session.did = context.user.id || context.user.email || context.user.username;
}
}
session.timestamp = context.timestamp || timestampInSeconds();
if (context.abnormal_mechanism) {
session.abnormal_mechanism = context.abnormal_mechanism;
}
if (context.ignoreDuration) {
session.ignoreDuration = context.ignoreDuration;
}
if (context.sid) {
session.sid = context.sid.length === 32 ? context.sid : uuid4();
}
if (context.init !== void 0) {
session.init = context.init;
}
if (!session.did && context.did) {
session.did = `${context.did}`;
}
if (typeof context.started === "number") {
session.started = context.started;
}
if (session.ignoreDuration) {
session.duration = void 0;
} else if (typeof context.duration === "number") {
session.duration = context.duration;
} else {
const duration = session.timestamp - session.started;
session.duration = duration >= 0 ? duration : 0;
}
if (context.release) {
session.release = context.release;
}
if (context.environment) {
session.environment = context.environment;
}
if (!session.ipAddress && context.ipAddress) {
session.ipAddress = context.ipAddress;
}
if (!session.userAgent && context.userAgent) {
session.userAgent = context.userAgent;
}
if (typeof context.errors === "number") {
session.errors = context.errors;
}
if (context.status) {
session.status = context.status;
}
}
function closeSession(session, status) {
let context = {};
if (status) {
context = { status };
} else if (session.status === "ok") {
context = { status: "exited" };
}
updateSession(session, context);
}
function sessionToJSON(session) {
return dropUndefinedKeys({
sid: `${session.sid}`,
init: session.init,
// Make sure that sec is converted to ms for date constructor
started: new Date(session.started * 1e3).toISOString(),
timestamp: new Date(session.timestamp * 1e3).toISOString(),
status: session.status,
errors: session.errors,
did: typeof session.did === "number" || typeof session.did === "string" ? `${session.did}` : void 0,
duration: session.duration,
abnormal_mechanism: session.abnormal_mechanism,
attrs: {
release: session.release,
environment: session.environment,
ip_address: session.ipAddress,
user_agent: session.userAgent
}
});
}
var init_session = __esm({
"node_modules/@sentry/core/esm/session.js"() {
init_sentry_release_injection_stub();
init_esm();
}
});
// node_modules/@sentry/core/esm/utils/spanUtils.js
function spanToTraceContext(span) {
const { spanId: span_id, traceId: trace_id } = span.spanContext();
const { data, op, parent_span_id, status, tags, origin } = spanToJSON(span);
return dropUndefinedKeys({
data,
op,
parent_span_id,
span_id,
status,
tags,
trace_id,
origin
});
}
function spanToJSON(span) {
if (spanIsSpanClass(span)) {
return span.getSpanJSON();
}
if (typeof span.toJSON === "function") {
return span.toJSON();
}
return {};
}
function spanIsSpanClass(span) {
return typeof span.getSpanJSON === "function";
}
function spanIsSampled(span) {
const { traceFlags } = span.spanContext();
return Boolean(traceFlags & TRACE_FLAG_SAMPLED);
}
var TRACE_FLAG_SAMPLED;
var init_spanUtils = __esm({
"node_modules/@sentry/core/esm/utils/spanUtils.js"() {
init_sentry_release_injection_stub();
init_esm();
TRACE_FLAG_SAMPLED = 1;
}
});
// node_modules/@sentry/core/esm/utils/prepareEvent.js
function prepareEvent(options, event, hint, scope, client, isolationScope) {
const { normalizeDepth = 3, normalizeMaxBreadth = 1e3 } = options;
const prepared = __spreadProps(__spreadValues({}, event), {
event_id: event.event_id || hint.event_id || uuid4(),
timestamp: event.timestamp || dateTimestampInSeconds()
});
const integrations = hint.integrations || options.integrations.map((i) => i.name);
applyClientOptions(prepared, options);
applyIntegrationsMetadata(prepared, integrations);
if (event.type === void 0) {
applyDebugIds(prepared, options.stackParser);
}
const finalScope = getFinalScope(scope, hint.captureContext);
if (hint.mechanism) {
addExceptionMechanism(prepared, hint.mechanism);
}
const clientEventProcessors = client && client.getEventProcessors ? client.getEventProcessors() : [];
const data = getGlobalScope().getScopeData();
if (isolationScope) {
const isolationData = isolationScope.getScopeData();
mergeScopeData(data, isolationData);
}
if (finalScope) {
const finalScopeData = finalScope.getScopeData();
mergeScopeData(data, finalScopeData);
}
const attachments = [...hint.attachments || [], ...data.attachments];
if (attachments.length) {
hint.attachments = attachments;
}
applyScopeDataToEvent(prepared, data);
const eventProcessors = [
...clientEventProcessors,
// eslint-disable-next-line deprecation/deprecation
...getGlobalEventProcessors(),
// Run scope event processors _after_ all other processors
...data.eventProcessors
];
const result = notifyEventProcessors(eventProcessors, prepared, hint);
return result.then((evt) => {
if (evt) {
applyDebugMeta(evt);
}
if (typeof normalizeDepth === "number" && normalizeDepth > 0) {
return normalizeEvent(evt, normalizeDepth, normalizeMaxBreadth);
}
return evt;
});
}
function applyClientOptions(event, options) {
const { environment, release, dist, maxValueLength = 250 } = options;
if (!("environment" in event)) {
event.environment = "environment" in options ? environment : DEFAULT_ENVIRONMENT;
}
if (event.release === void 0 && release !== void 0) {
event.release = release;
}
if (event.dist === void 0 && dist !== void 0) {
event.dist = dist;
}
if (event.message) {
event.message = truncate(event.message, maxValueLength);
}
const exception = event.exception && event.exception.values && event.exception.values[0];
if (exception && exception.value) {
exception.value = truncate(exception.value, maxValueLength);
}
const request = event.request;
if (request && request.url) {
request.url = truncate(request.url, maxValueLength);
}
}
function applyDebugIds(event, stackParser) {
const debugIdMap = GLOBAL_OBJ._sentryDebugIds;
if (!debugIdMap) {
return;
}
let debugIdStackFramesCache;
const cachedDebugIdStackFrameCache = debugIdStackParserCache.get(stackParser);
if (cachedDebugIdStackFrameCache) {
debugIdStackFramesCache = cachedDebugIdStackFrameCache;
} else {
debugIdStackFramesCache = /* @__PURE__ */ new Map();
debugIdStackParserCache.set(stackParser, debugIdStackFramesCache);
}
const filenameDebugIdMap = Object.keys(debugIdMap).reduce((acc, debugIdStackTrace) => {
let parsedStack;
const cachedParsedStack = debugIdStackFramesCache.get(debugIdStackTrace);
if (cachedParsedStack) {
parsedStack = cachedParsedStack;
} else {
parsedStack = stackParser(debugIdStackTrace);
debugIdStackFramesCache.set(debugIdStackTrace, parsedStack);
}
for (let i = parsedStack.length - 1; i >= 0; i--) {
const stackFrame = parsedStack[i];
if (stackFrame.filename) {
acc[stackFrame.filename] = debugIdMap[debugIdStackTrace];
break;
}
}
return acc;
}, {});
try {
event.exception.values.forEach((exception) => {
exception.stacktrace.frames.forEach((frame) => {
if (frame.filename) {
frame.debug_id = filenameDebugIdMap[frame.filename];
}
});
});
} catch (e) {
}
}
function applyDebugMeta(event) {
const filenameDebugIdMap = {};
try {
event.exception.values.forEach((exception) => {
exception.stacktrace.frames.forEach((frame) => {
if (frame.debug_id) {
if (frame.abs_path) {
filenameDebugIdMap[frame.abs_path] = frame.debug_id;
} else if (frame.filename) {
filenameDebugIdMap[frame.filename] = frame.debug_id;
}
delete frame.debug_id;
}
});
});
} catch (e) {
}
if (Object.keys(filenameDebugIdMap).length === 0) {
return;
}
event.debug_meta = event.debug_meta || {};
event.debug_meta.images = event.debug_meta.images || [];
const images = event.debug_meta.images;
Object.keys(filenameDebugIdMap).forEach((filename) => {
images.push({
type: "sourcemap",
code_file: filename,
debug_id: filenameDebugIdMap[filename]
});
});
}
function applyIntegrationsMetadata(event, integrationNames) {
if (integrationNames.length > 0) {
event.sdk = event.sdk || {};
event.sdk.integrations = [...event.sdk.integrations || [], ...integrationNames];
}
}
function normalizeEvent(event, depth, maxBreadth) {
if (!event) {
return null;
}
const normalized = __spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({}, event), event.breadcrumbs && {
breadcrumbs: event.breadcrumbs.map((b) => __spreadValues(__spreadValues({}, b), b.data && {
data: normalize(b.data, depth, maxBreadth)
}))
}), event.user && {
user: normalize(event.user, depth, maxBreadth)
}), event.contexts && {
contexts: normalize(event.contexts, depth, maxBreadth)
}), event.extra && {
extra: normalize(event.extra, depth, maxBreadth)
});
if (event.contexts && event.contexts.trace && normalized.contexts) {
normalized.contexts.trace = event.contexts.trace;
if (event.contexts.trace.data) {
normalized.contexts.trace.data = normalize(event.contexts.trace.data, depth, maxBreadth);
}
}
if (event.spans) {
normalized.spans = event.spans.map((span) => {
const data = spanToJSON(span).data;
if (data) {
span.data = normalize(data, depth, maxBreadth);
}
return span;
});
}
return normalized;
}
function getFinalScope(scope, captureContext) {
if (!captureContext) {
return scope;
}
const finalScope = scope ? scope.clone() : new Scope();
finalScope.update(captureContext);
return finalScope;
}
function parseEventHintOrCaptureContext(hint) {
if (!hint) {
return void 0;
}
if (hintIsScopeOrFunction(hint)) {
return { captureContext: hint };
}
if (hintIsScopeContext(hint)) {
return {
captureContext: hint
};
}
return hint;
}
function hintIsScopeOrFunction(hint) {
return hint instanceof Scope || typeof hint === "function";
}
function hintIsScopeContext(hint) {
return Object.keys(hint).some((key) => captureContextKeys.includes(key));
}
var debugIdStackParserCache, captureContextKeys;
var init_prepareEvent = __esm({
"node_modules/@sentry/core/esm/utils/prepareEvent.js"() {
init_sentry_release_injection_stub();
init_esm();
init_constants();
init_eventProcessors();
init_scope();
init_applyScopeDataToEvent();
init_spanUtils();
debugIdStackParserCache = /* @__PURE__ */ new WeakMap();
captureContextKeys = [
"user",
"level",
"extra",
"contexts",
"tags",
"fingerprint",
"requestSession",
"propagationContext"
];
}
});
// node_modules/@sentry/core/esm/exports.js
function captureException(exception, hint) {
return getCurrentHub().captureException(exception, parseEventHintOrCaptureContext(hint));
}
function captureEvent(event, hint) {
return getCurrentHub().captureEvent(event, hint);
}
function addBreadcrumb(breadcrumb, hint) {
getCurrentHub().addBreadcrumb(breadcrumb, hint);
}
function setContext(name, context) {
getCurrentHub().setContext(name, context);
}
function withScope(...rest) {
if (rest.length === 2) {
const [scope, callback] = rest;
if (!scope) {
return getCurrentHub().withScope(callback);
}
const hub = getCurrentHub();
return hub.withScope(() => {
hub.getStackTop().scope = scope;
return callback(scope);
});
}
return getCurrentHub().withScope(rest[0]);
}
function getClient() {
return getCurrentHub().getClient();
}
function getCurrentScope() {
return getCurrentHub().getScope();
}
function startSession(context) {
const client = getClient();
const isolationScope = getIsolationScope();
const currentScope = getCurrentScope();
const { release, environment = DEFAULT_ENVIRONMENT } = client && client.getOptions() || {};
const { userAgent } = GLOBAL_OBJ.navigator || {};
const session = makeSession(__spreadValues(__spreadValues({
release,
environment,
user: isolationScope.getUser()
}, userAgent && { userAgent }), context));
const currentSession = isolationScope.getSession();
if (currentSession && currentSession.status === "ok") {
updateSession(currentSession, { status: "exited" });
}
endSession();
isolationScope.setSession(session);
currentScope.setSession(session);
return session;
}
function endSession() {
const isolationScope = getIsolationScope();
const currentScope = getCurrentScope();
const session = isolationScope.getSession();
if (session) {
closeSession(session);
}
_sendSessionUpdate();
isolationScope.setSession();
currentScope.setSession();
}
function _sendSessionUpdate() {
const isolationScope = getIsolationScope();
const currentScope = getCurrentScope();
const client = getClient();
const session = currentScope.getSession() || isolationScope.getSession();
if (session && client && client.captureSession) {
client.captureSession(session);
}
}
function captureSession(end = false) {
if (end) {
endSession();
return;
}
_sendSessionUpdate();
}
var init_exports = __esm({
"node_modules/@sentry/core/esm/exports.js"() {
init_sentry_release_injection_stub();
init_esm();
init_constants();
init_hub();
init_session();
init_prepareEvent();
}
});
// node_modules/@sentry/core/esm/tracing/dynamicSamplingContext.js
function getDynamicSamplingContextFromClient(trace_id, client, scope) {
const options = client.getOptions();
const { publicKey: public_key } = client.getDsn() || {};
const { segment: user_segment } = scope && scope.getUser() || {};
const dsc = dropUndefinedKeys({
environment: options.environment || DEFAULT_ENVIRONMENT,
release: options.release,
user_segment,
public_key,
trace_id
});
client.emit && client.emit("createDsc", dsc);
return dsc;
}
function getDynamicSamplingContextFromSpan(span) {
const client = getClient();
if (!client) {
return {};
}
const dsc = getDynamicSamplingContextFromClient(spanToJSON(span).trace_id || "", client, getCurrentScope());
const txn = span.transaction;
if (!txn) {
return dsc;
}
const v7FrozenDsc = txn && txn._frozenDynamicSamplingContext;
if (v7FrozenDsc) {
return v7FrozenDsc;
}
const { sampleRate: maybeSampleRate, source } = txn.metadata;
if (maybeSampleRate != null) {
dsc.sample_rate = `${maybeSampleRate}`;
}
const jsonSpan = spanToJSON(txn);
if (source && source !== "url") {
dsc.transaction = jsonSpan.description;
}
dsc.sampled = String(spanIsSampled(txn));
client.emit && client.emit("createDsc", dsc);
return dsc;
}
var init_dynamicSamplingContext = __esm({
"node_modules/@sentry/core/esm/tracing/dynamicSamplingContext.js"() {
init_sentry_release_injection_stub();
init_esm();
init_constants();
init_exports();
init_spanUtils();
}
});
// node_modules/@sentry/core/esm/utils/applyScopeDataToEvent.js
function applyScopeDataToEvent(event, data) {
const { fingerprint, span, breadcrumbs, sdkProcessingMetadata, propagationContext } = data;
applyDataToEvent(event, data);
if (span) {
applySpanToEvent(event, span);
}
applyFingerprintToEvent(event, fingerprint);
applyBreadcrumbsToEvent(event, breadcrumbs);
applySdkMetadataToEvent(event, sdkProcessingMetadata, propagationContext);
}
function mergeScopeData(data, mergeData) {
const {
extra,
tags,
user: user2,
contexts,
level,
sdkProcessingMetadata,
breadcrumbs,
fingerprint,
eventProcessors,
attachments,
propagationContext,
// eslint-disable-next-line deprecation/deprecation
transactionName,
span
} = mergeData;
mergePropOverwrite(data, "extra", extra);
mergePropOverwrite(data, "tags", tags);
mergePropOverwrite(data, "user", user2);
mergePropOverwrite(data, "contexts", contexts);
mergePropOverwrite(data, "sdkProcessingMetadata", sdkProcessingMetadata);
if (level) {
data.level = level;
}
if (transactionName) {
data.transactionName = transactionName;
}
if (span) {
data.span = span;
}
if (breadcrumbs.length) {
data.breadcrumbs = [...data.breadcrumbs, ...breadcrumbs];
}
if (fingerprint.length) {
data.fingerprint = [...data.fingerprint, ...fingerprint];
}
if (eventProcessors.length) {
data.eventProcessors = [...data.eventProcessors, ...eventProcessors];
}
if (attachments.length) {
data.attachments = [...data.attachments, ...attachments];
}
data.propagationContext = __spreadValues(__spreadValues({}, data.propagationContext), propagationContext);
}
function mergePropOverwrite(data, prop, mergeVal) {
if (mergeVal && Object.keys(mergeVal).length) {
data[prop] = __spreadValues(__spreadValues({}, data[prop]), mergeVal);
}
}
function applyDataToEvent(event, data) {
const {
extra,
tags,
user: user2,
contexts,
level,
// eslint-disable-next-line deprecation/deprecation
transactionName
} = data;
if (extra && Object.keys(extra).length) {
event.extra = __spreadValues(__spreadValues({}, extra), event.extra);
}
if (tags && Object.keys(tags).length) {
event.tags = __spreadValues(__spreadValues({}, tags), event.tags);
}
if (user2 && Object.keys(user2).length) {
event.user = __spreadValues(__spreadValues({}, user2), event.user);
}
if (contexts && Object.keys(contexts).length) {
event.contexts = __spreadValues(__spreadValues({}, contexts), event.contexts);
}
if (level) {
event.level = level;
}
if (transactionName) {
event.transaction = transactionName;
}
}
function applyBreadcrumbsToEvent(event, breadcrumbs) {
const mergedBreadcrumbs = [...event.breadcrumbs || [], ...breadcrumbs];
event.breadcrumbs = mergedBreadcrumbs.length ? mergedBreadcrumbs : void 0;
}
function applySdkMetadataToEvent(event, sdkProcessingMetadata, propagationContext) {
event.sdkProcessingMetadata = __spreadProps(__spreadValues(__spreadValues({}, event.sdkProcessingMetadata), sdkProcessingMetadata), {
propagationContext
});
}
function applySpanToEvent(event, span) {
event.contexts = __spreadValues({ trace: spanToTraceContext(span) }, event.contexts);
const transaction = span.transaction;
if (transaction) {
event.sdkProcessingMetadata = __spreadValues({
dynamicSamplingContext: getDynamicSamplingContextFromSpan(span)
}, event.sdkProcessingMetadata);
const transactionName = spanToJSON(transaction).description;
if (transactionName) {
event.tags = __spreadValues({ transaction: transactionName }, event.tags);
}
}
}
function applyFingerprintToEvent(event, fingerprint) {
event.fingerprint = event.fingerprint ? arrayify(event.fingerprint) : [];
if (fingerprint) {
event.fingerprint = event.fingerprint.concat(fingerprint);
}
if (event.fingerprint && !event.fingerprint.length) {
delete event.fingerprint;
}
}
var init_applyScopeDataToEvent = __esm({
"node_modules/@sentry/core/esm/utils/applyScopeDataToEvent.js"() {
init_sentry_release_injection_stub();
init_esm();
init_dynamicSamplingContext();
init_spanUtils();
}
});
// node_modules/@sentry/core/esm/scope.js
function getGlobalScope() {
if (!globalScope) {
globalScope = new Scope();
}
return globalScope;
}
function generatePropagationContext() {
return {
traceId: uuid4(),
spanId: uuid4().substring(16)
};
}
var DEFAULT_MAX_BREADCRUMBS, globalScope, Scope;
var init_scope = __esm({
"node_modules/@sentry/core/esm/scope.js"() {
init_sentry_release_injection_stub();
init_esm();
init_eventProcessors();
init_session();
init_applyScopeDataToEvent();
DEFAULT_MAX_BREADCRUMBS = 100;
Scope = class _Scope {
/** Flag if notifying is happening. */
/** Callback for client to receive scope changes. */
/** Callback list that will be called after {@link applyToEvent}. */
/** Array of breadcrumbs. */
/** User */
/** Tags */
/** Extra */
/** Contexts */
/** Attachments */
/** Propagation Context for distributed tracing */
/**
* A place to stash data which is needed at some point in the SDK's event processing pipeline but which shouldn't get
* sent to Sentry
*/
/** Fingerprint */
/** Severity */
// eslint-disable-next-line deprecation/deprecation
/**
* Transaction Name
*/
/** Span */
/** Session */
/** Request Mode Session Status */
/** The client on this scope */
// NOTE: Any field which gets added here should get added not only to the constructor but also to the `clone` method.
constructor() {
this._notifyingListeners = false;
this._scopeListeners = [];
this._eventProcessors = [];
this._breadcrumbs = [];
this._attachments = [];
this._user = {};
this._tags = {};
this._extra = {};
this._contexts = {};
this._sdkProcessingMetadata = {};
this._propagationContext = generatePropagationContext();
}
/**
* Inherit values from the parent scope.
* @deprecated Use `scope.clone()` and `new Scope()` instead.
*/
static clone(scope) {
return scope ? scope.clone() : new _Scope();
}
/**
* Clone this scope instance.
*/
clone() {
const newScope = new _Scope();
newScope._breadcrumbs = [...this._breadcrumbs];
newScope._tags = __spreadValues({}, this._tags);
newScope._extra = __spreadValues({}, this._extra);
newScope._contexts = __spreadValues({}, this._contexts);
newScope._user = this._user;
newScope._level = this._level;
newScope._span = this._span;
newScope._session = this._session;
newScope._transactionName = this._transactionName;
newScope._fingerprint = this._fingerprint;
newScope._eventProcessors = [...this._eventProcessors];
newScope._requestSession = this._requestSession;
newScope._attachments = [...this._attachments];
newScope._sdkProcessingMetadata = __spreadValues({}, this._sdkProcessingMetadata);
newScope._propagationContext = __spreadValues({}, this._propagationContext);
newScope._client = this._client;
return newScope;
}
/** Update the client on the scope. */
setClient(client) {
this._client = client;
}
/**
* Get the client assigned to this scope.
*
* It is generally recommended to use the global function `Sentry.getClient()` instead, unless you know what you are doing.
*/
getClient() {
return this._client;
}
/**
* Add internal on change listener. Used for sub SDKs that need to store the scope.
* @hidden
*/
addScopeListener(callback) {
this._scopeListeners.push(callback);
}
/**
* @inheritDoc
*/
addEventProcessor(callback) {
this._eventProcessors.push(callback);
return this;
}
/**
* @inheritDoc
*/
setUser(user2) {
this._user = user2 || {};
if (this._session) {
updateSession(this._session, { user: user2 });
}
this._notifyScopeListeners();
return this;
}
/**
* @inheritDoc
*/
getUser() {
return this._user;
}
/**
* @inheritDoc
*/
getRequestSession() {
return this._requestSession;
}
/**
* @inheritDoc
*/
setRequestSession(requestSession) {
this._requestSession = requestSession;
return this;
}
/**
* @inheritDoc
*/
setTags(tags) {
this._tags = __spreadValues(__spreadValues({}, this._tags), tags);
this._notifyScopeListeners();
return this;
}
/**
* @inheritDoc
*/
setTag(key, value) {
this._tags = __spreadProps(__spreadValues({}, this._tags), { [key]: value });
this._notifyScopeListeners();
return this;
}
/**
* @inheritDoc
*/
setExtras(extras) {
this._extra = __spreadValues(__spreadValues({}, this._extra), extras);
this._notifyScopeListeners();
return this;
}
/**
* @inheritDoc
*/
setExtra(key, extra) {
this._extra = __spreadProps(__spreadValues({}, this._extra), { [key]: extra });
this._notifyScopeListeners();
return this;
}
/**
* @inheritDoc
*/
setFingerprint(fingerprint) {
this._fingerprint = fingerprint;
this._notifyScopeListeners();
return this;
}
/**
* @inheritDoc
*/
setLevel(level) {
this._level = level;
this._notifyScopeListeners();
return this;
}
/**
* Sets the transaction name on the scope for future events.
* @deprecated Use extra or tags instead.
*/
setTransactionName(name) {
this._transactionName = name;
this._notifyScopeListeners();
return this;
}
/**
* @inheritDoc
*/
setContext(key, context) {
if (context === null) {
delete this._contexts[key];
} else {
this._contexts[key] = context;
}
this._notifyScopeListeners();
return this;
}
/**
* Sets the Span on the scope.
* @param span Span
* @deprecated Instead of setting a span on a scope, use `startSpan()`/`startSpanManual()` instead.
*/
setSpan(span) {
this._span = span;
this._notifyScopeListeners();
return this;
}
/**
* Returns the `Span` if there is one.
* @deprecated Use `getActiveSpan()` instead.
*/
getSpan() {
return this._span;
}
/**
* Returns the `Transaction` attached to the scope (if there is one).
* @deprecated You should not rely on the transaction, but just use `startSpan()` APIs instead.
*/
getTransaction() {
const span = this._span;
return span && span.transaction;
}
/**
* @inheritDoc
*/
setSession(session) {
if (!session) {
delete this._session;
} else {
this._session = session;
}
this._notifyScopeListeners();
return this;
}
/**
* @inheritDoc
*/
getSession() {
return this._session;
}
/**
* @inheritDoc
*/
update(captureContext) {
if (!captureContext) {
return this;
}
if (typeof captureContext === "function") {
const updatedScope = captureContext(this);
return updatedScope instanceof _Scope ? updatedScope : this;
}
if (captureContext instanceof _Scope) {
this._tags = __spreadValues(__spreadValues({}, this._tags), captureContext._tags);
this._extra = __spreadValues(__spreadValues({}, this._extra), captureContext._extra);
this._contexts = __spreadValues(__spreadValues({}, this._contexts), captureContext._contexts);
if (captureContext._user && Object.keys(captureContext._user).length) {
this._user = captureContext._user;
}
if (captureContext._level) {
this._level = captureContext._level;
}
if (captureContext._fingerprint) {
this._fingerprint = captureContext._fingerprint;
}
if (captureContext._requestSession) {
this._requestSession = captureContext._requestSession;
}
if (captureContext._propagationContext) {
this._propagationContext = captureContext._propagationContext;
}
} else if (isPlainObject(captureContext)) {
captureContext = captureContext;
this._tags = __spreadValues(__spreadValues({}, this._tags), captureContext.tags);
this._extra = __spreadValues(__spreadValues({}, this._extra), captureContext.extra);
this._contexts = __spreadValues(__spreadValues({}, this._contexts), captureContext.contexts);
if (captureContext.user) {
this._user = captureContext.user;
}
if (captureContext.level) {
this._level = captureContext.level;
}
if (captureContext.fingerprint) {
this._fingerprint = captureContext.fingerprint;
}
if (captureContext.requestSession) {
this._requestSession = captureContext.requestSession;
}
if (captureContext.propagationContext) {
this._propagationContext = captureContext.propagationContext;
}
}
return this;
}
/**
* @inheritDoc
*/
clear() {
this._breadcrumbs = [];
this._tags = {};
this._extra = {};
this._user = {};
this._contexts = {};
this._level = void 0;
this._transactionName = void 0;
this._fingerprint = void 0;
this._requestSession = void 0;
this._span = void 0;
this._session = void 0;
this._notifyScopeListeners();
this._attachments = [];
this._propagationContext = generatePropagationContext();
return this;
}
/**
* @inheritDoc
*/
addBreadcrumb(breadcrumb, maxBreadcrumbs) {
const maxCrumbs = typeof maxBreadcrumbs === "number" ? maxBreadcrumbs : DEFAULT_MAX_BREADCRUMBS;
if (maxCrumbs <= 0) {
return this;
}
const mergedBreadcrumb = __spreadValues({
timestamp: dateTimestampInSeconds()
}, breadcrumb);
const breadcrumbs = this._breadcrumbs;
breadcrumbs.push(mergedBreadcrumb);
this._breadcrumbs = breadcrumbs.length > maxCrumbs ? breadcrumbs.slice(-maxCrumbs) : breadcrumbs;
this._notifyScopeListeners();
return this;
}
/**
* @inheritDoc
*/
getLastBreadcrumb() {
return this._breadcrumbs[this._breadcrumbs.length - 1];
}
/**
* @inheritDoc
*/
clearBreadcrumbs() {
this._breadcrumbs = [];
this._notifyScopeListeners();
return this;
}
/**
* @inheritDoc
*/
addAttachment(attachment) {
this._attachments.push(attachment);
return this;
}
/**
* @inheritDoc
* @deprecated Use `getScopeData()` instead.
*/
getAttachments() {
const data = this.getScopeData();
return data.attachments;
}
/**
* @inheritDoc
*/
clearAttachments() {
this._attachments = [];
return this;
}
/** @inheritDoc */
getScopeData() {
const {
_breadcrumbs,
_attachments,
_contexts,
_tags,
_extra,
_user,
_level,
_fingerprint,
_eventProcessors,
_propagationContext,
_sdkProcessingMetadata,
_transactionName,
_span
} = this;
return {
breadcrumbs: _breadcrumbs,
attachments: _attachments,
contexts: _contexts,
tags: _tags,
extra: _extra,
user: _user,
level: _level,
fingerprint: _fingerprint || [],
eventProcessors: _eventProcessors,
propagationContext: _propagationContext,
sdkProcessingMetadata: _sdkProcessingMetadata,
transactionName: _transactionName,
span: _span
};
}
/**
* Applies data from the scope to the event and runs all event processors on it.
*
* @param event Event
* @param hint Object containing additional information about the original exception, for use by the event processors.
* @hidden
* @deprecated Use `applyScopeDataToEvent()` directly
*/
applyToEvent(event, hint = {}, additionalEventProcessors = []) {
applyScopeDataToEvent(event, this.getScopeData());
const eventProcessors = [
...additionalEventProcessors,
// eslint-disable-next-line deprecation/deprecation
...getGlobalEventProcessors(),
...this._eventProcessors
];
return notifyEventProcessors(eventProcessors, event, hint);
}
/**
* Add data which will be accessible during event processing but won't get sent to Sentry
*/
setSDKProcessingMetadata(newData) {
this._sdkProcessingMetadata = __spreadValues(__spreadValues({}, this._sdkProcessingMetadata), newData);
return this;
}
/**
* @inheritDoc
*/
setPropagationContext(context) {
this._propagationContext = context;
return this;
}
/**
* @inheritDoc
*/
getPropagationContext() {
return this._propagationContext;
}
/**
* Capture an exception for this scope.
*
* @param exception The exception to capture.
* @param hint Optinal additional data to attach to the Sentry event.
* @returns the id of the captured Sentry event.
*/
captureException(exception, hint) {
const eventId = hint && hint.event_id ? hint.event_id : uuid4();
if (!this._client) {
logger.warn("No client configured on scope - will not capture exception!");
return eventId;
}
const syntheticException = new Error("Sentry syntheticException");
this._client.captureException(
exception,
__spreadProps(__spreadValues({
originalException: exception,
syntheticException
}, hint), {
event_id: eventId
}),
this
);
return eventId;
}
/**
* Capture a message for this scope.
*
* @param message The message to capture.
* @param level An optional severity level to report the message with.
* @param hint Optional additional data to attach to the Sentry event.
* @returns the id of the captured message.
*/
captureMessage(message, level, hint) {
const eventId = hint && hint.event_id ? hint.event_id : uuid4();
if (!this._client) {
logger.warn("No client configured on scope - will not capture message!");
return eventId;
}
const syntheticException = new Error(message);
this._client.captureMessage(
message,
level,
__spreadProps(__spreadValues({
originalException: message,
syntheticException
}, hint), {
event_id: eventId
}),
this
);
return eventId;
}
/**
* Captures a manually created event for this scope and sends it to Sentry.
*
* @param exception The event to capture.
* @param hint Optional additional data to attach to the Sentry event.
* @returns the id of the captured event.
*/
captureEvent(event, hint) {
const eventId = hint && hint.event_id ? hint.event_id : uuid4();
if (!this._client) {
logger.warn("No client configured on scope - will not capture event!");
return eventId;
}
this._client.captureEvent(event, __spreadProps(__spreadValues({}, hint), { event_id: eventId }), this);
return eventId;
}
/**
* This will be called on every set call.
*/
_notifyScopeListeners() {
if (!this._notifyingListeners) {
this._notifyingListeners = true;
this._scopeListeners.forEach((callback) => {
callback(this);
});
this._notifyingListeners = false;
}
}
};
}
});
// node_modules/@sentry/core/esm/version.js
var SDK_VERSION;
var init_version = __esm({
"node_modules/@sentry/core/esm/version.js"() {
init_sentry_release_injection_stub();
SDK_VERSION = "7.93.0";
}
});
// node_modules/@sentry/core/esm/hub.js
function getMainCarrier() {
GLOBAL_OBJ.__SENTRY__ = GLOBAL_OBJ.__SENTRY__ || {
extensions: {},
hub: void 0
};
return GLOBAL_OBJ;
}
function makeMain(hub) {
const registry = getMainCarrier();
const oldHub = getHubFromCarrier(registry);
setHubOnCarrier(registry, hub);
return oldHub;
}
function getCurrentHub() {
const registry = getMainCarrier();
if (registry.__SENTRY__ && registry.__SENTRY__.acs) {
const hub = registry.__SENTRY__.acs.getCurrentHub();
if (hub) {
return hub;
}
}
return getGlobalHub(registry);
}
function getIsolationScope() {
return getCurrentHub().getIsolationScope();
}
function getGlobalHub(registry = getMainCarrier()) {
if (!hasHubOnCarrier(registry) || getHubFromCarrier(registry).isOlderThan(API_VERSION)) {
setHubOnCarrier(registry, new Hub());
}
return getHubFromCarrier(registry);
}
function hasHubOnCarrier(carrier) {
return !!(carrier && carrier.__SENTRY__ && carrier.__SENTRY__.hub);
}
function getHubFromCarrier(carrier) {
return getGlobalSingleton("hub", () => new Hub(), carrier);
}
function setHubOnCarrier(carrier, hub) {
if (!carrier)
return false;
const __SENTRY__ = carrier.__SENTRY__ = carrier.__SENTRY__ || {};
__SENTRY__.hub = hub;
return true;
}
var API_VERSION, DEFAULT_BREADCRUMBS, Hub;
var init_hub = __esm({
"node_modules/@sentry/core/esm/hub.js"() {
init_sentry_release_injection_stub();
init_esm();
init_constants();
init_debug_build2();
init_scope();
init_session();
init_version();
API_VERSION = parseFloat(SDK_VERSION);
DEFAULT_BREADCRUMBS = 100;
Hub = class {
/** Is a {@link Layer}[] containing the client and scope */
/** Contains the last event id of a captured event. */
/**
* Creates a new instance of the hub, will push one {@link Layer} into the
* internal stack on creation.
*
* @param client bound to the hub.
* @param scope bound to the hub.
* @param version number, higher number means higher priority.
*/
constructor(client, scope, isolationScope, _version = API_VERSION) {
this._version = _version;
let assignedScope;
if (!scope) {
assignedScope = new Scope();
assignedScope.setClient(client);
} else {
assignedScope = scope;
}
let assignedIsolationScope;
if (!isolationScope) {
assignedIsolationScope = new Scope();
assignedIsolationScope.setClient(client);
} else {
assignedIsolationScope = isolationScope;
}
this._stack = [{ scope: assignedScope }];
if (client) {
this.bindClient(client);
}
this._isolationScope = assignedIsolationScope;
}
/**
* @inheritDoc
*/
isOlderThan(version) {
return this._version < version;
}
/**
* @inheritDoc
*/
bindClient(client) {
const top = this.getStackTop();
top.client = client;
top.scope.setClient(client);
if (client && client.setupIntegrations) {
client.setupIntegrations();
}
}
/**
* @inheritDoc
*
* @deprecated Use `withScope` instead.
*/
pushScope() {
const scope = this.getScope().clone();
this.getStack().push({
client: this.getClient(),
scope
});
return scope;
}
/**
* @inheritDoc
*
* @deprecated Use `withScope` instead.
*/
popScope() {
if (this.getStack().length <= 1)
return false;
return !!this.getStack().pop();
}
/**
* @inheritDoc
*/
withScope(callback) {
const scope = this.pushScope();
let maybePromiseResult;
try {
maybePromiseResult = callback(scope);
} catch (e) {
this.popScope();
throw e;
}
if (isThenable(maybePromiseResult)) {
return maybePromiseResult.then(
(res) => {
this.popScope();
return res;
},
(e) => {
this.popScope();
throw e;
}
);
}
this.popScope();
return maybePromiseResult;
}
/**
* @inheritDoc
*/
getClient() {
return this.getStackTop().client;
}
/** Returns the scope of the top stack. */
getScope() {
return this.getStackTop().scope;
}
/** @inheritdoc */
getIsolationScope() {
return this._isolationScope;
}
/** Returns the scope stack for domains or the process. */
getStack() {
return this._stack;
}
/** Returns the topmost scope layer in the order domain > local > process. */
getStackTop() {
return this._stack[this._stack.length - 1];
}
/**
* @inheritDoc
*
* @deprecated Use `Sentry.captureException()` instead.
*/
captureException(exception, hint) {
const eventId = this._lastEventId = hint && hint.event_id ? hint.event_id : uuid4();
const syntheticException = new Error("Sentry syntheticException");
this.getScope().captureException(exception, __spreadProps(__spreadValues({
originalException: exception,
syntheticException
}, hint), {
event_id: eventId
}));
return eventId;
}
/**
* @inheritDoc
*
* @deprecated Use `Sentry.captureMessage()` instead.
*/
captureMessage(message, level, hint) {
const eventId = this._lastEventId = hint && hint.event_id ? hint.event_id : uuid4();
const syntheticException = new Error(message);
this.getScope().captureMessage(message, level, __spreadProps(__spreadValues({
originalException: message,
syntheticException
}, hint), {
event_id: eventId
}));
return eventId;
}
/**
* @inheritDoc
*
* @deprecated Use `Sentry.captureEvent()` instead.
*/
captureEvent(event, hint) {
const eventId = hint && hint.event_id ? hint.event_id : uuid4();
if (!event.type) {
this._lastEventId = eventId;
}
this.getScope().captureEvent(event, __spreadProps(__spreadValues({}, hint), { event_id: eventId }));
return eventId;
}
/**
* @inheritDoc
*/
lastEventId() {
return this._lastEventId;
}
/**
* @inheritDoc
*/
addBreadcrumb(breadcrumb, hint) {
const { scope, client } = this.getStackTop();
if (!client)
return;
const { beforeBreadcrumb = null, maxBreadcrumbs = DEFAULT_BREADCRUMBS } = client.getOptions && client.getOptions() || {};
if (maxBreadcrumbs <= 0)
return;
const timestamp = dateTimestampInSeconds();
const mergedBreadcrumb = __spreadValues({ timestamp }, breadcrumb);
const finalBreadcrumb = beforeBreadcrumb ? consoleSandbox(() => beforeBreadcrumb(mergedBreadcrumb, hint)) : mergedBreadcrumb;
if (finalBreadcrumb === null)
return;
if (client.emit) {
client.emit("beforeAddBreadcrumb", finalBreadcrumb, hint);
}
scope.addBreadcrumb(finalBreadcrumb, maxBreadcrumbs);
}
/**
* @inheritDoc
*/
setUser(user2) {
this.getScope().setUser(user2);
}
/**
* @inheritDoc
*/
setTags(tags) {
this.getScope().setTags(tags);
}
/**
* @inheritDoc
*/
setExtras(extras) {
this.getScope().setExtras(extras);
}
/**
* @inheritDoc
*/
setTag(key, value) {
this.getScope().setTag(key, value);
}
/**
* @inheritDoc
*/
setExtra(key, extra) {
this.getScope().setExtra(key, extra);
}
/**
* @inheritDoc
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any
setContext(name, context) {
this.getScope().setContext(name, context);
}
/**
* @inheritDoc
*
* @deprecated Use `getScope()` directly.
*/
configureScope(callback) {
const { scope, client } = this.getStackTop();
if (client) {
callback(scope);
}
}
/**
* @inheritDoc
*/
run(callback) {
const oldHub = makeMain(this);
try {
callback(this);
} finally {
makeMain(oldHub);
}
}
/**
* @inheritDoc
*/
getIntegration(integration) {
const client = this.getClient();
if (!client)
return null;
try {
return client.getIntegration(integration);
} catch (_oO) {
DEBUG_BUILD2 && logger.warn(`Cannot retrieve integration ${integration.id} from the current Hub`);
return null;
}
}
/**
* Starts a new `Transaction` and returns it. This is the entry point to manual tracing instrumentation.
*
* A tree structure can be built by adding child spans to the transaction, and child spans to other spans. To start a
* new child span within the transaction or any span, call the respective `.startChild()` method.
*
* Every child span must be finished before the transaction is finished, otherwise the unfinished spans are discarded.
*
* The transaction must be finished with a call to its `.end()` method, at which point the transaction with all its
* finished child spans will be sent to Sentry.
*
* @param context Properties of the new `Transaction`.
* @param customSamplingContext Information given to the transaction sampling function (along with context-dependent
* default values). See {@link Options.tracesSampler}.
*
* @returns The transaction which was just started
*
* @deprecated Use `startSpan()`, `startSpanManual()` or `startInactiveSpan()` instead.
*/
startTransaction(context, customSamplingContext) {
const result = this._callExtensionMethod("startTransaction", context, customSamplingContext);
if (DEBUG_BUILD2 && !result) {
const client = this.getClient();
if (!client) {
logger.warn(
"Tracing extension 'startTransaction' is missing. You should 'init' the SDK before calling 'startTransaction'"
);
} else {
logger.warn(`Tracing extension 'startTransaction' has not been added. Call 'addTracingExtensions' before calling 'init':
Sentry.addTracingExtensions();
Sentry.init({...});
`);
}
}
return result;
}
/**
* @inheritDoc
*/
traceHeaders() {
return this._callExtensionMethod("traceHeaders");
}
/**
* @inheritDoc
*
* @deprecated Use top level `captureSession` instead.
*/
captureSession(endSession2 = false) {
if (endSession2) {
return this.endSession();
}
this._sendSessionUpdate();
}
/**
* @inheritDoc
* @deprecated Use top level `endSession` instead.
*/
endSession() {
const layer = this.getStackTop();
const scope = layer.scope;
const session = scope.getSession();
if (session) {
closeSession(session);
}
this._sendSessionUpdate();
scope.setSession();
}
/**
* @inheritDoc
* @deprecated Use top level `startSession` instead.
*/
startSession(context) {
const { scope, client } = this.getStackTop();
const { release, environment = DEFAULT_ENVIRONMENT } = client && client.getOptions() || {};
const { userAgent } = GLOBAL_OBJ.navigator || {};
const session = makeSession(__spreadValues(__spreadValues({
release,
environment,
user: scope.getUser()
}, userAgent && { userAgent }), context));
const currentSession = scope.getSession && scope.getSession();
if (currentSession && currentSession.status === "ok") {
updateSession(currentSession, { status: "exited" });
}
this.endSession();
scope.setSession(session);
return session;
}
/**
* Returns if default PII should be sent to Sentry and propagated in ourgoing requests
* when Tracing is used.
*
* @deprecated Use top-level `getClient().getOptions().sendDefaultPii` instead. This function
* only unnecessarily increased API surface but only wrapped accessing the option.
*/
shouldSendDefaultPii() {
const client = this.getClient();
const options = client && client.getOptions();
return Boolean(options && options.sendDefaultPii);
}
/**
* Sends the current Session on the scope
*/
_sendSessionUpdate() {
const { scope, client } = this.getStackTop();
const session = scope.getSession();
if (session && client && client.captureSession) {
client.captureSession(session);
}
}
/**
* Internal helper function to call a method on the top client if it exists.
*
* @param method The method to call on the client.
* @param args Arguments to pass to the client function.
*/
_withClient(callback) {
const { scope, client } = this.getStackTop();
if (client) {
callback(client, scope);
}
}
/**
* Calls global extension method and binding current instance to the function call
*/
// @ts-expect-error Function lacks ending return statement and return type does not include 'undefined'. ts(2366)
// eslint-disable-next-line @typescript-eslint/no-explicit-any
_callExtensionMethod(method, ...args) {
const carrier = getMainCarrier();
const sentry = carrier.__SENTRY__;
if (sentry && sentry.extensions && typeof sentry.extensions[method] === "function") {
return sentry.extensions[method].apply(this, args);
}
DEBUG_BUILD2 && logger.warn(`Extension method ${method} couldn't be found, doing nothing.`);
}
};
}
});
// node_modules/@sentry/core/esm/envelope.js
function enhanceEventWithSdkInfo(event, sdkInfo) {
if (!sdkInfo) {
return event;
}
event.sdk = event.sdk || {};
event.sdk.name = event.sdk.name || sdkInfo.name;
event.sdk.version = event.sdk.version || sdkInfo.version;
event.sdk.integrations = [...event.sdk.integrations || [], ...sdkInfo.integrations || []];
event.sdk.packages = [...event.sdk.packages || [], ...sdkInfo.packages || []];
return event;
}
function createSessionEnvelope(session, dsn, metadata, tunnel) {
const sdkInfo = getSdkMetadataForEnvelopeHeader(metadata);
const envelopeHeaders = __spreadValues(__spreadValues({
sent_at: (/* @__PURE__ */ new Date()).toISOString()
}, sdkInfo && { sdk: sdkInfo }), !!tunnel && dsn && { dsn: dsnToString(dsn) });
const envelopeItem = "aggregates" in session ? [{ type: "sessions" }, session] : [{ type: "session" }, session.toJSON()];
return createEnvelope(envelopeHeaders, [envelopeItem]);
}
function createEventEnvelope(event, dsn, metadata, tunnel) {
const sdkInfo = getSdkMetadataForEnvelopeHeader(metadata);
const eventType = event.type && event.type !== "replay_event" ? event.type : "event";
enhanceEventWithSdkInfo(event, metadata && metadata.sdk);
const envelopeHeaders = createEventEnvelopeHeaders(event, sdkInfo, tunnel, dsn);
delete event.sdkProcessingMetadata;
const eventItem = [{ type: eventType }, event];
return createEnvelope(envelopeHeaders, [eventItem]);
}
var init_envelope2 = __esm({
"node_modules/@sentry/core/esm/envelope.js"() {
init_sentry_release_injection_stub();
init_esm();
}
});
// node_modules/@sentry/core/esm/api.js
function getBaseApiEndpoint(dsn) {
const protocol = dsn.protocol ? `${dsn.protocol}:` : "";
const port = dsn.port ? `:${dsn.port}` : "";
return `${protocol}//${dsn.host}${port}${dsn.path ? `/${dsn.path}` : ""}/api/`;
}
function _getIngestEndpoint(dsn) {
return `${getBaseApiEndpoint(dsn)}${dsn.projectId}/envelope/`;
}
function _encodedAuth(dsn, sdkInfo) {
return urlEncode(__spreadValues({
// We send only the minimum set of required information. See
// https://github.com/getsentry/sentry-javascript/issues/2572.
sentry_key: dsn.publicKey,
sentry_version: SENTRY_API_VERSION
}, sdkInfo && { sentry_client: `${sdkInfo.name}/${sdkInfo.version}` }));
}
function getEnvelopeEndpointWithUrlEncodedAuth(dsn, tunnelOrOptions = {}) {
const tunnel = typeof tunnelOrOptions === "string" ? tunnelOrOptions : tunnelOrOptions.tunnel;
const sdkInfo = typeof tunnelOrOptions === "string" || !tunnelOrOptions._metadata ? void 0 : tunnelOrOptions._metadata.sdk;
return tunnel ? tunnel : `${_getIngestEndpoint(dsn)}?${_encodedAuth(dsn, sdkInfo)}`;
}
var SENTRY_API_VERSION;
var init_api = __esm({
"node_modules/@sentry/core/esm/api.js"() {
init_sentry_release_injection_stub();
init_esm();
SENTRY_API_VERSION = "7";
}
});
// node_modules/@sentry/core/esm/integration.js
function filterDuplicates(integrations) {
const integrationsByName = {};
integrations.forEach((currentInstance) => {
const { name } = currentInstance;
const existingInstance = integrationsByName[name];
if (existingInstance && !existingInstance.isDefaultInstance && currentInstance.isDefaultInstance) {
return;
}
integrationsByName[name] = currentInstance;
});
return Object.keys(integrationsByName).map((k) => integrationsByName[k]);
}
function getIntegrationsToSetup(options) {
const defaultIntegrations2 = options.defaultIntegrations || [];
const userIntegrations = options.integrations;
defaultIntegrations2.forEach((integration) => {
integration.isDefaultInstance = true;
});
let integrations;
if (Array.isArray(userIntegrations)) {
integrations = [...defaultIntegrations2, ...userIntegrations];
} else if (typeof userIntegrations === "function") {
integrations = arrayify(userIntegrations(defaultIntegrations2));
} else {
integrations = defaultIntegrations2;
}
const finalIntegrations = filterDuplicates(integrations);
const debugIndex = findIndex(finalIntegrations, (integration) => integration.name === "Debug");
if (debugIndex !== -1) {
const [debugInstance] = finalIntegrations.splice(debugIndex, 1);
finalIntegrations.push(debugInstance);
}
return finalIntegrations;
}
function setupIntegrations(client, integrations) {
const integrationIndex = {};
integrations.forEach((integration) => {
if (integration) {
setupIntegration(client, integration, integrationIndex);
}
});
return integrationIndex;
}
function setupIntegration(client, integration, integrationIndex) {
if (integrationIndex[integration.name]) {
DEBUG_BUILD2 && logger.log(`Integration skipped because it was already installed: ${integration.name}`);
return;
}
integrationIndex[integration.name] = integration;
if (installedIntegrations.indexOf(integration.name) === -1) {
integration.setupOnce(addGlobalEventProcessor, getCurrentHub);
installedIntegrations.push(integration.name);
}
if (integration.setup && typeof integration.setup === "function") {
integration.setup(client);
}
if (client.on && typeof integration.preprocessEvent === "function") {
const callback = integration.preprocessEvent.bind(integration);
client.on("preprocessEvent", (event, hint) => callback(event, hint, client));
}
if (client.addEventProcessor && typeof integration.processEvent === "function") {
const callback = integration.processEvent.bind(integration);
const processor = Object.assign((event, hint) => callback(event, hint, client), {
id: integration.name
});
client.addEventProcessor(processor);
}
DEBUG_BUILD2 && logger.log(`Integration installed: ${integration.name}`);
}
function findIndex(arr, callback) {
for (let i = 0; i < arr.length; i++) {
if (callback(arr[i]) === true) {
return i;
}
}
return -1;
}
function convertIntegrationFnToClass(name, fn) {
return Object.assign(
// eslint-disable-next-line @typescript-eslint/no-explicit-any
function ConvertedIntegration(...rest) {
return __spreadValues({
// eslint-disable-next-line @typescript-eslint/no-empty-function
setupOnce: () => {
}
}, fn(...rest));
},
{ id: name }
);
}
var installedIntegrations;
var init_integration = __esm({
"node_modules/@sentry/core/esm/integration.js"() {
init_sentry_release_injection_stub();
init_esm();
init_debug_build2();
init_eventProcessors();
init_hub();
installedIntegrations = [];
}
});
// node_modules/@sentry/core/esm/metrics/utils.js
function serializeMetricBuckets(metricBucketItems) {
let out = "";
for (const item of metricBucketItems) {
const tagEntries = Object.entries(item.tags);
const maybeTags = tagEntries.length > 0 ? `|#${tagEntries.map(([key, value]) => `${key}:${value}`).join(",")}` : "";
out += `${item.name}@${item.unit}:${item.metric}|${item.metricType}${maybeTags}|T${item.timestamp}
`;
}
return out;
}
var init_utils = __esm({
"node_modules/@sentry/core/esm/metrics/utils.js"() {
init_sentry_release_injection_stub();
}
});
// node_modules/@sentry/core/esm/metrics/envelope.js
function createMetricEnvelope(metricBucketItems, dsn, metadata, tunnel) {
const headers = {
sent_at: (/* @__PURE__ */ new Date()).toISOString()
};
if (metadata && metadata.sdk) {
headers.sdk = {
name: metadata.sdk.name,
version: metadata.sdk.version
};
}
if (!!tunnel && dsn) {
headers.dsn = dsnToString(dsn);
}
const item = createMetricEnvelopeItem(metricBucketItems);
return createEnvelope(headers, [item]);
}
function createMetricEnvelopeItem(metricBucketItems) {
const payload = serializeMetricBuckets(metricBucketItems);
const metricHeaders = {
type: "statsd",
length: payload.length
};
return [metricHeaders, payload];
}
var init_envelope3 = __esm({
"node_modules/@sentry/core/esm/metrics/envelope.js"() {
init_sentry_release_injection_stub();
init_esm();
init_utils();
}
});
// node_modules/@sentry/core/esm/baseclient.js
function _validateBeforeSendResult(beforeSendResult, beforeSendLabel) {
const invalidValueError = `${beforeSendLabel} must return \`null\` or a valid event.`;
if (isThenable(beforeSendResult)) {
return beforeSendResult.then(
(event) => {
if (!isPlainObject(event) && event !== null) {
throw new SentryError(invalidValueError);
}
return event;
},
(e) => {
throw new SentryError(`${beforeSendLabel} rejected with ${e}`);
}
);
} else if (!isPlainObject(beforeSendResult) && beforeSendResult !== null) {
throw new SentryError(invalidValueError);
}
return beforeSendResult;
}
function processBeforeSend(options, event, hint) {
const { beforeSend, beforeSendTransaction } = options;
if (isErrorEvent2(event) && beforeSend) {
return beforeSend(event, hint);
}
if (isTransactionEvent(event) && beforeSendTransaction) {
return beforeSendTransaction(event, hint);
}
return event;
}
function isErrorEvent2(event) {
return event.type === void 0;
}
function isTransactionEvent(event) {
return event.type === "transaction";
}
var ALREADY_SEEN_ERROR, BaseClient;
var init_baseclient = __esm({
"node_modules/@sentry/core/esm/baseclient.js"() {
init_sentry_release_injection_stub();
init_esm();
init_api();
init_debug_build2();
init_envelope2();
init_hub();
init_integration();
init_envelope3();
init_session();
init_dynamicSamplingContext();
init_prepareEvent();
ALREADY_SEEN_ERROR = "Not capturing exception because it's already been captured.";
BaseClient = class {
/**
* A reference to a metrics aggregator
*
* @experimental Note this is alpha API. It may experience breaking changes in the future.
*/
/** Options passed to the SDK. */
/** The client Dsn, if specified in options. Without this Dsn, the SDK will be disabled. */
/** Array of set up integrations. */
/** Indicates whether this client's integrations have been set up. */
/** Number of calls being processed */
/** Holds flushable */
// eslint-disable-next-line @typescript-eslint/ban-types
/**
* Initializes this client instance.
*
* @param options Options for the client.
*/
constructor(options) {
this._options = options;
this._integrations = {};
this._integrationsInitialized = false;
this._numProcessing = 0;
this._outcomes = {};
this._hooks = {};
this._eventProcessors = [];
if (options.dsn) {
this._dsn = makeDsn(options.dsn);
} else {
DEBUG_BUILD2 && logger.warn("No DSN provided, client will not send events.");
}
if (this._dsn) {
const url = getEnvelopeEndpointWithUrlEncodedAuth(this._dsn, options);
this._transport = options.transport(__spreadProps(__spreadValues({
recordDroppedEvent: this.recordDroppedEvent.bind(this)
}, options.transportOptions), {
url
}));
}
}
/**
* @inheritDoc
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
captureException(exception, hint, scope) {
if (checkOrSetAlreadyCaught(exception)) {
DEBUG_BUILD2 && logger.log(ALREADY_SEEN_ERROR);
return;
}
let eventId = hint && hint.event_id;
this._process(
this.eventFromException(exception, hint).then((event) => this._captureEvent(event, hint, scope)).then((result) => {
eventId = result;
})
);
return eventId;
}
/**
* @inheritDoc
*/
captureMessage(message, level, hint, scope) {
let eventId = hint && hint.event_id;
const eventMessage = isParameterizedString(message) ? message : String(message);
const promisedEvent = isPrimitive(message) ? this.eventFromMessage(eventMessage, level, hint) : this.eventFromException(message, hint);
this._process(
promisedEvent.then((event) => this._captureEvent(event, hint, scope)).then((result) => {
eventId = result;
})
);
return eventId;
}
/**
* @inheritDoc
*/
captureEvent(event, hint, scope) {
if (hint && hint.originalException && checkOrSetAlreadyCaught(hint.originalException)) {
DEBUG_BUILD2 && logger.log(ALREADY_SEEN_ERROR);
return;
}
let eventId = hint && hint.event_id;
this._process(
this._captureEvent(event, hint, scope).then((result) => {
eventId = result;
})
);
return eventId;
}
/**
* @inheritDoc
*/
captureSession(session) {
if (!(typeof session.release === "string")) {
DEBUG_BUILD2 && logger.warn("Discarded session because of missing or non-string release");
} else {
this.sendSession(session);
updateSession(session, { init: false });
}
}
/**
* @inheritDoc
*/
getDsn() {
return this._dsn;
}
/**
* @inheritDoc
*/
getOptions() {
return this._options;
}
/**
* @see SdkMetadata in @sentry/types
*
* @return The metadata of the SDK
*/
getSdkMetadata() {
return this._options._metadata;
}
/**
* @inheritDoc
*/
getTransport() {
return this._transport;
}
/**
* @inheritDoc
*/
flush(timeout) {
const transport = this._transport;
if (transport) {
if (this.metricsAggregator) {
this.metricsAggregator.flush();
}
return this._isClientDoneProcessing(timeout).then((clientFinished) => {
return transport.flush(timeout).then((transportFlushed) => clientFinished && transportFlushed);
});
} else {
return resolvedSyncPromise(true);
}
}
/**
* @inheritDoc
*/
close(timeout) {
return this.flush(timeout).then((result) => {
this.getOptions().enabled = false;
if (this.metricsAggregator) {
this.metricsAggregator.close();
}
return result;
});
}
/** Get all installed event processors. */
getEventProcessors() {
return this._eventProcessors;
}
/** @inheritDoc */
addEventProcessor(eventProcessor) {
this._eventProcessors.push(eventProcessor);
}
/**
* Sets up the integrations
*/
setupIntegrations(forceInitialize) {
if (forceInitialize && !this._integrationsInitialized || this._isEnabled() && !this._integrationsInitialized) {
this._integrations = setupIntegrations(this, this._options.integrations);
this._integrationsInitialized = true;
}
}
/**
* Gets an installed integration by its `id`.
*
* @returns The installed integration or `undefined` if no integration with that `id` was installed.
*/
getIntegrationById(integrationId) {
return this._integrations[integrationId];
}
/**
* @inheritDoc
*/
getIntegration(integration) {
try {
return this._integrations[integration.id] || null;
} catch (_oO) {
DEBUG_BUILD2 && logger.warn(`Cannot retrieve integration ${integration.id} from the current Client`);
return null;
}
}
/**
* @inheritDoc
*/
addIntegration(integration) {
setupIntegration(this, integration, this._integrations);
}
/**
* @inheritDoc
*/
sendEvent(event, hint = {}) {
this.emit("beforeSendEvent", event, hint);
let env = createEventEnvelope(event, this._dsn, this._options._metadata, this._options.tunnel);
for (const attachment of hint.attachments || []) {
env = addItemToEnvelope(
env,
createAttachmentEnvelopeItem(
attachment,
this._options.transportOptions && this._options.transportOptions.textEncoder
)
);
}
const promise = this._sendEnvelope(env);
if (promise) {
promise.then((sendResponse) => this.emit("afterSendEvent", event, sendResponse), null);
}
}
/**
* @inheritDoc
*/
sendSession(session) {
const env = createSessionEnvelope(session, this._dsn, this._options._metadata, this._options.tunnel);
this._sendEnvelope(env);
}
/**
* @inheritDoc
*/
recordDroppedEvent(reason, category, _event) {
if (this._options.sendClientReports) {
const key = `${reason}:${category}`;
DEBUG_BUILD2 && logger.log(`Adding outcome: "${key}"`);
this._outcomes[key] = this._outcomes[key] + 1 || 1;
}
}
/**
* @inheritDoc
*/
captureAggregateMetrics(metricBucketItems) {
DEBUG_BUILD2 && logger.log(`Flushing aggregated metrics, number of metrics: ${metricBucketItems.length}`);
const metricsEnvelope = createMetricEnvelope(
metricBucketItems,
this._dsn,
this._options._metadata,
this._options.tunnel
);
this._sendEnvelope(metricsEnvelope);
}
// Keep on() & emit() signatures in sync with types' client.ts interface
/* eslint-disable @typescript-eslint/unified-signatures */
/** @inheritdoc */
/** @inheritdoc */
on(hook, callback) {
if (!this._hooks[hook]) {
this._hooks[hook] = [];
}
this._hooks[hook].push(callback);
}
/** @inheritdoc */
/** @inheritdoc */
emit(hook, ...rest) {
if (this._hooks[hook]) {
this._hooks[hook].forEach((callback) => callback(...rest));
}
}
/* eslint-enable @typescript-eslint/unified-signatures */
/** Updates existing session based on the provided event */
_updateSessionFromEvent(session, event) {
let crashed = false;
let errored = false;
const exceptions = event.exception && event.exception.values;
if (exceptions) {
errored = true;
for (const ex of exceptions) {
const mechanism = ex.mechanism;
if (mechanism && mechanism.handled === false) {
crashed = true;
break;
}
}
}
const sessionNonTerminal = session.status === "ok";
const shouldUpdateAndSend = sessionNonTerminal && session.errors === 0 || sessionNonTerminal && crashed;
if (shouldUpdateAndSend) {
updateSession(session, __spreadProps(__spreadValues({}, crashed && { status: "crashed" }), {
errors: session.errors || Number(errored || crashed)
}));
this.captureSession(session);
}
}
/**
* Determine if the client is finished processing. Returns a promise because it will wait `timeout` ms before saying
* "no" (resolving to `false`) in order to give the client a chance to potentially finish first.
*
* @param timeout The time, in ms, after which to resolve to `false` if the client is still busy. Passing `0` (or not
* passing anything) will make the promise wait as long as it takes for processing to finish before resolving to
* `true`.
* @returns A promise which will resolve to `true` if processing is already done or finishes before the timeout, and
* `false` otherwise
*/
_isClientDoneProcessing(timeout) {
return new SyncPromise((resolve) => {
let ticked = 0;
const tick = 1;
const interval = setInterval(() => {
if (this._numProcessing == 0) {
clearInterval(interval);
resolve(true);
} else {
ticked += tick;
if (timeout && ticked >= timeout) {
clearInterval(interval);
resolve(false);
}
}
}, tick);
});
}
/** Determines whether this SDK is enabled and a transport is present. */
_isEnabled() {
return this.getOptions().enabled !== false && this._transport !== void 0;
}
/**
* Adds common information to events.
*
* The information includes release and environment from `options`,
* breadcrumbs and context (extra, tags and user) from the scope.
*
* Information that is already present in the event is never overwritten. For
* nested objects, such as the context, keys are merged.
*
* @param event The original event.
* @param hint May contain additional information about the original exception.
* @param scope A scope containing event metadata.
* @returns A new event with more information.
*/
_prepareEvent(event, hint, scope, isolationScope = getIsolationScope()) {
const options = this.getOptions();
const integrations = Object.keys(this._integrations);
if (!hint.integrations && integrations.length > 0) {
hint.integrations = integrations;
}
this.emit("preprocessEvent", event, hint);
return prepareEvent(options, event, hint, scope, this, isolationScope).then((evt) => {
if (evt === null) {
return evt;
}
const { propagationContext } = evt.sdkProcessingMetadata || {};
const trace2 = evt.contexts && evt.contexts.trace;
if (!trace2 && propagationContext) {
const { traceId: trace_id, spanId, parentSpanId, dsc } = propagationContext;
evt.contexts = __spreadValues({
trace: {
trace_id,
span_id: spanId,
parent_span_id: parentSpanId
}
}, evt.contexts);
const dynamicSamplingContext = dsc ? dsc : getDynamicSamplingContextFromClient(trace_id, this, scope);
evt.sdkProcessingMetadata = __spreadValues({
dynamicSamplingContext
}, evt.sdkProcessingMetadata);
}
return evt;
});
}
/**
* Processes the event and logs an error in case of rejection
* @param event
* @param hint
* @param scope
*/
_captureEvent(event, hint = {}, scope) {
return this._processEvent(event, hint, scope).then(
(finalEvent) => {
return finalEvent.event_id;
},
(reason) => {
if (DEBUG_BUILD2) {
const sentryError = reason;
if (sentryError.logLevel === "log") {
logger.log(sentryError.message);
} else {
logger.warn(sentryError);
}
}
return void 0;
}
);
}
/**
* Processes an event (either error or message) and sends it to Sentry.
*
* This also adds breadcrumbs and context information to the event. However,
* platform specific meta data (such as the User's IP address) must be added
* by the SDK implementor.
*
*
* @param event The event to send to Sentry.
* @param hint May contain additional information about the original exception.
* @param scope A scope containing event metadata.
* @returns A SyncPromise that resolves with the event or rejects in case event was/will not be send.
*/
_processEvent(event, hint, scope) {
const options = this.getOptions();
const { sampleRate } = options;
const isTransaction = isTransactionEvent(event);
const isError2 = isErrorEvent2(event);
const eventType = event.type || "error";
const beforeSendLabel = `before send for type \`${eventType}\``;
if (isError2 && typeof sampleRate === "number" && Math.random() > sampleRate) {
this.recordDroppedEvent("sample_rate", "error", event);
return rejectedSyncPromise(
new SentryError(
`Discarding event because it's not included in the random sample (sampling rate = ${sampleRate})`,
"log"
)
);
}
const dataCategory = eventType === "replay_event" ? "replay" : eventType;
return this._prepareEvent(event, hint, scope).then((prepared) => {
if (prepared === null) {
this.recordDroppedEvent("event_processor", dataCategory, event);
throw new SentryError("An event processor returned `null`, will not send event.", "log");
}
const isInternalException = hint.data && hint.data.__sentry__ === true;
if (isInternalException) {
return prepared;
}
const result = processBeforeSend(options, prepared, hint);
return _validateBeforeSendResult(result, beforeSendLabel);
}).then((processedEvent) => {
if (processedEvent === null) {
this.recordDroppedEvent("before_send", dataCategory, event);
throw new SentryError(`${beforeSendLabel} returned \`null\`, will not send event.`, "log");
}
const session = scope && scope.getSession();
if (!isTransaction && session) {
this._updateSessionFromEvent(session, processedEvent);
}
const transactionInfo = processedEvent.transaction_info;
if (isTransaction && transactionInfo && processedEvent.transaction !== event.transaction) {
const source = "custom";
processedEvent.transaction_info = __spreadProps(__spreadValues({}, transactionInfo), {
source
});
}
this.sendEvent(processedEvent, hint);
return processedEvent;
}).then(null, (reason) => {
if (reason instanceof SentryError) {
throw reason;
}
this.captureException(reason, {
data: {
__sentry__: true
},
originalException: reason
});
throw new SentryError(
`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
Reason: ${reason}`
);
});
}
/**
* Occupies the client with processing and event
*/
_process(promise) {
this._numProcessing++;
void promise.then(
(value) => {
this._numProcessing--;
return value;
},
(reason) => {
this._numProcessing--;
return reason;
}
);
}
/**
* @inheritdoc
*/
_sendEnvelope(envelope) {
this.emit("beforeEnvelope", envelope);
if (this._isEnabled() && this._transport) {
return this._transport.send(envelope).then(null, (reason) => {
DEBUG_BUILD2 && logger.error("Error while sending event:", reason);
});
} else {
DEBUG_BUILD2 && logger.error("Transport disabled");
}
}
/**
* Clears outcomes on this client and returns them.
*/
_clearOutcomes() {
const outcomes = this._outcomes;
this._outcomes = {};
return Object.keys(outcomes).map((key) => {
const [reason, category] = key.split(":");
return {
reason,
category,
quantity: outcomes[key]
};
});
}
/**
* @inheritDoc
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
};
}
});
// node_modules/@sentry/core/esm/sdk.js
function initAndBind(clientClass, options) {
if (options.debug === true) {
if (DEBUG_BUILD2) {
logger.enable();
} else {
consoleSandbox(() => {
console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.");
});
}
}
const hub = getCurrentHub();
const scope = hub.getScope();
scope.update(options.initialScope);
const client = new clientClass(options);
hub.bindClient(client);
}
var init_sdk = __esm({
"node_modules/@sentry/core/esm/sdk.js"() {
init_sentry_release_injection_stub();
init_esm();
init_debug_build2();
init_hub();
}
});
// node_modules/@sentry/core/esm/transports/base.js
function createTransport(options, makeRequest, buffer = makePromiseBuffer(
options.bufferSize || DEFAULT_TRANSPORT_BUFFER_SIZE
)) {
let rateLimits = {};
const flush2 = (timeout) => buffer.drain(timeout);
function send(envelope) {
const filteredEnvelopeItems = [];
forEachEnvelopeItem(envelope, (item, type) => {
const envelopeItemDataCategory = envelopeItemTypeToDataCategory(type);
if (isRateLimited(rateLimits, envelopeItemDataCategory)) {
const event = getEventForEnvelopeItem(item, type);
options.recordDroppedEvent("ratelimit_backoff", envelopeItemDataCategory, event);
} else {
filteredEnvelopeItems.push(item);
}
});
if (filteredEnvelopeItems.length === 0) {
return resolvedSyncPromise();
}
const filteredEnvelope = createEnvelope(envelope[0], filteredEnvelopeItems);
const recordEnvelopeLoss = (reason) => {
forEachEnvelopeItem(filteredEnvelope, (item, type) => {
const event = getEventForEnvelopeItem(item, type);
options.recordDroppedEvent(reason, envelopeItemTypeToDataCategory(type), event);
});
};
const requestTask = () => makeRequest({ body: serializeEnvelope(filteredEnvelope, options.textEncoder) }).then(
(response) => {
if (response.statusCode !== void 0 && (response.statusCode < 200 || response.statusCode >= 300)) {
DEBUG_BUILD2 && logger.warn(`Sentry responded with status code ${response.statusCode} to sent event.`);
}
rateLimits = updateRateLimits(rateLimits, response);
return response;
},
(error) => {
recordEnvelopeLoss("network_error");
throw error;
}
);
return buffer.add(requestTask).then(
(result) => result,
(error) => {
if (error instanceof SentryError) {
DEBUG_BUILD2 && logger.error("Skipped sending event because buffer is full.");
recordEnvelopeLoss("queue_overflow");
return resolvedSyncPromise();
} else {
throw error;
}
}
);
}
send.__sentry__baseTransport__ = true;
return {
send,
flush: flush2
};
}
function getEventForEnvelopeItem(item, type) {
if (type !== "event" && type !== "transaction") {
return void 0;
}
return Array.isArray(item) ? item[1] : void 0;
}
var DEFAULT_TRANSPORT_BUFFER_SIZE;
var init_base = __esm({
"node_modules/@sentry/core/esm/transports/base.js"() {
init_sentry_release_injection_stub();
init_esm();
init_debug_build2();
DEFAULT_TRANSPORT_BUFFER_SIZE = 30;
}
});
// node_modules/@sentry/core/esm/integrations/functiontostring.js
var originalFunctionToString, INTEGRATION_NAME, functionToStringIntegration, FunctionToString;
var init_functiontostring = __esm({
"node_modules/@sentry/core/esm/integrations/functiontostring.js"() {
init_sentry_release_injection_stub();
init_esm();
init_integration();
INTEGRATION_NAME = "FunctionToString";
functionToStringIntegration = () => {
return {
name: INTEGRATION_NAME,
setupOnce() {
originalFunctionToString = Function.prototype.toString;
try {
Function.prototype.toString = function(...args) {
const context = getOriginalFunction(this) || this;
return originalFunctionToString.apply(context, args);
};
} catch (e) {
}
}
};
};
FunctionToString = convertIntegrationFnToClass(INTEGRATION_NAME, functionToStringIntegration);
}
});
// node_modules/@sentry/core/esm/integrations/inboundfilters.js
function _mergeOptions(internalOptions = {}, clientOptions = {}) {
return {
allowUrls: [...internalOptions.allowUrls || [], ...clientOptions.allowUrls || []],
denyUrls: [...internalOptions.denyUrls || [], ...clientOptions.denyUrls || []],
ignoreErrors: [
...internalOptions.ignoreErrors || [],
...clientOptions.ignoreErrors || [],
...internalOptions.disableErrorDefaults ? [] : DEFAULT_IGNORE_ERRORS
],
ignoreTransactions: [
...internalOptions.ignoreTransactions || [],
...clientOptions.ignoreTransactions || [],
...internalOptions.disableTransactionDefaults ? [] : DEFAULT_IGNORE_TRANSACTIONS
],
ignoreInternal: internalOptions.ignoreInternal !== void 0 ? internalOptions.ignoreInternal : true
};
}
function _shouldDropEvent(event, options) {
if (options.ignoreInternal && _isSentryError(event)) {
DEBUG_BUILD2 && logger.warn(`Event dropped due to being internal Sentry Error.
Event: ${getEventDescription(event)}`);
return true;
}
if (_isIgnoredError(event, options.ignoreErrors)) {
DEBUG_BUILD2 && logger.warn(
`Event dropped due to being matched by \`ignoreErrors\` option.
Event: ${getEventDescription(event)}`
);
return true;
}
if (_isIgnoredTransaction(event, options.ignoreTransactions)) {
DEBUG_BUILD2 && logger.warn(
`Event dropped due to being matched by \`ignoreTransactions\` option.
Event: ${getEventDescription(event)}`
);
return true;
}
if (_isDeniedUrl(event, options.denyUrls)) {
DEBUG_BUILD2 && logger.warn(
`Event dropped due to being matched by \`denyUrls\` option.
Event: ${getEventDescription(
event
)}.
Url: ${_getEventFilterUrl(event)}`
);
return true;
}
if (!_isAllowedUrl(event, options.allowUrls)) {
DEBUG_BUILD2 && logger.warn(
`Event dropped due to not being matched by \`allowUrls\` option.
Event: ${getEventDescription(
event
)}.
Url: ${_getEventFilterUrl(event)}`
);
return true;
}
return false;
}
function _isIgnoredError(event, ignoreErrors) {
if (event.type || !ignoreErrors || !ignoreErrors.length) {
return false;
}
return _getPossibleEventMessages(event).some((message) => stringMatchesSomePattern(message, ignoreErrors));
}
function _isIgnoredTransaction(event, ignoreTransactions) {
if (event.type !== "transaction" || !ignoreTransactions || !ignoreTransactions.length) {
return false;
}
const name = event.transaction;
return name ? stringMatchesSomePattern(name, ignoreTransactions) : false;
}
function _isDeniedUrl(event, denyUrls) {
if (!denyUrls || !denyUrls.length) {
return false;
}
const url = _getEventFilterUrl(event);
return !url ? false : stringMatchesSomePattern(url, denyUrls);
}
function _isAllowedUrl(event, allowUrls) {
if (!allowUrls || !allowUrls.length) {
return true;
}
const url = _getEventFilterUrl(event);
return !url ? true : stringMatchesSomePattern(url, allowUrls);
}
function _getPossibleEventMessages(event) {
const possibleMessages = [];
if (event.message) {
possibleMessages.push(event.message);
}
let lastException;
try {
lastException = event.exception.values[event.exception.values.length - 1];
} catch (e) {
}
if (lastException) {
if (lastException.value) {
possibleMessages.push(lastException.value);
if (lastException.type) {
possibleMessages.push(`${lastException.type}: ${lastException.value}`);
}
}
}
if (DEBUG_BUILD2 && possibleMessages.length === 0) {
logger.error(`Could not extract message for event ${getEventDescription(event)}`);
}
return possibleMessages;
}
function _isSentryError(event) {
try {
return event.exception.values[0].type === "SentryError";
} catch (e) {
}
return false;
}
function _getLastValidUrl(frames = []) {
for (let i = frames.length - 1; i >= 0; i--) {
const frame = frames[i];
if (frame && frame.filename !== "<anonymous>" && frame.filename !== "[native code]") {
return frame.filename || null;
}
}
return null;
}
function _getEventFilterUrl(event) {
try {
let frames;
try {
frames = event.exception.values[0].stacktrace.frames;
} catch (e) {
}
return frames ? _getLastValidUrl(frames) : null;
} catch (oO) {
DEBUG_BUILD2 && logger.error(`Cannot extract url for event ${getEventDescription(event)}`);
return null;
}
}
var DEFAULT_IGNORE_ERRORS, DEFAULT_IGNORE_TRANSACTIONS, INTEGRATION_NAME2, inboundFiltersIntegration, InboundFilters;
var init_inboundfilters = __esm({
"node_modules/@sentry/core/esm/integrations/inboundfilters.js"() {
init_sentry_release_injection_stub();
init_esm();
init_debug_build2();
init_integration();
DEFAULT_IGNORE_ERRORS = [/^Script error\.?$/, /^Javascript error: Script error\.? on line 0$/];
DEFAULT_IGNORE_TRANSACTIONS = [
/^.*\/healthcheck$/,
/^.*\/healthy$/,
/^.*\/live$/,
/^.*\/ready$/,
/^.*\/heartbeat$/,
/^.*\/health$/,
/^.*\/healthz$/
];
INTEGRATION_NAME2 = "InboundFilters";
inboundFiltersIntegration = (options) => {
return {
name: INTEGRATION_NAME2,
processEvent(event, _hint, client) {
const clientOptions = client.getOptions();
const mergedOptions = _mergeOptions(options, clientOptions);
return _shouldDropEvent(event, mergedOptions) ? null : event;
}
};
};
InboundFilters = convertIntegrationFnToClass(INTEGRATION_NAME2, inboundFiltersIntegration);
}
});
// node_modules/@sentry/core/esm/integrations/linkederrors.js
var DEFAULT_KEY, DEFAULT_LIMIT, INTEGRATION_NAME3, linkedErrorsIntegration, LinkedErrors;
var init_linkederrors = __esm({
"node_modules/@sentry/core/esm/integrations/linkederrors.js"() {
init_sentry_release_injection_stub();
init_esm();
init_integration();
DEFAULT_KEY = "cause";
DEFAULT_LIMIT = 5;
INTEGRATION_NAME3 = "LinkedErrors";
linkedErrorsIntegration = (options = {}) => {
const limit2 = options.limit || DEFAULT_LIMIT;
const key = options.key || DEFAULT_KEY;
return {
name: INTEGRATION_NAME3,
preprocessEvent(event, hint, client) {
const options2 = client.getOptions();
applyAggregateErrorsToEvent(
exceptionFromError,
options2.stackParser,
options2.maxValueLength,
key,
limit2,
event,
hint
);
}
};
};
LinkedErrors = convertIntegrationFnToClass(INTEGRATION_NAME3, linkedErrorsIntegration);
}
});
// node_modules/@sentry/core/esm/integrations/index.js
var integrations_exports = {};
__export(integrations_exports, {
FunctionToString: () => FunctionToString,
InboundFilters: () => InboundFilters,
LinkedErrors: () => LinkedErrors
});
var init_integrations = __esm({
"node_modules/@sentry/core/esm/integrations/index.js"() {
init_sentry_release_injection_stub();
init_functiontostring();
init_inboundfilters();
init_linkederrors();
}
});
// node_modules/@sentry/core/esm/index.js
var init_esm2 = __esm({
"node_modules/@sentry/core/esm/index.js"() {
init_sentry_release_injection_stub();
init_exports();
init_baseclient();
init_sdk();
init_base();
init_version();
init_integration();
init_integrations();
}
});
// node_modules/@sentry/browser/esm/helpers.js
function shouldIgnoreOnError() {
return ignoreOnError > 0;
}
function ignoreNextOnError() {
ignoreOnError++;
setTimeout(() => {
ignoreOnError--;
});
}
function wrap(fn, options = {}, before) {
if (typeof fn !== "function") {
return fn;
}
try {
const wrapper = fn.__sentry_wrapped__;
if (wrapper) {
return wrapper;
}
if (getOriginalFunction(fn)) {
return fn;
}
} catch (e) {
return fn;
}
const sentryWrapped = function() {
const args = Array.prototype.slice.call(arguments);
try {
if (before && typeof before === "function") {
before.apply(this, arguments);
}
const wrappedArguments = args.map((arg) => wrap(arg, options));
return fn.apply(this, wrappedArguments);
} catch (ex) {
ignoreNextOnError();
withScope((scope) => {
scope.addEventProcessor((event) => {
if (options.mechanism) {
addExceptionTypeValue(event, void 0, void 0);
addExceptionMechanism(event, options.mechanism);
}
event.extra = __spreadProps(__spreadValues({}, event.extra), {
arguments: args
});
return event;
});
captureException(ex);
});
throw ex;
}
};
try {
for (const property in fn) {
if (Object.prototype.hasOwnProperty.call(fn, property)) {
sentryWrapped[property] = fn[property];
}
}
} catch (_oO) {
}
markFunctionWrapped(sentryWrapped, fn);
addNonEnumerableProperty(fn, "__sentry_wrapped__", sentryWrapped);
try {
const descriptor = Object.getOwnPropertyDescriptor(sentryWrapped, "name");
if (descriptor.configurable) {
Object.defineProperty(sentryWrapped, "name", {
get() {
return fn.name;
}
});
}
} catch (_oO) {
}
return sentryWrapped;
}
var WINDOW7, ignoreOnError;
var init_helpers = __esm({
"node_modules/@sentry/browser/esm/helpers.js"() {
init_sentry_release_injection_stub();
init_esm2();
init_esm();
WINDOW7 = GLOBAL_OBJ;
ignoreOnError = 0;
}
});
// node_modules/@sentry/browser/esm/debug-build.js
var DEBUG_BUILD3;
var init_debug_build3 = __esm({
"node_modules/@sentry/browser/esm/debug-build.js"() {
init_sentry_release_injection_stub();
DEBUG_BUILD3 = typeof __SENTRY_DEBUG__ === "undefined" || __SENTRY_DEBUG__;
}
});
// node_modules/@sentry/browser/esm/eventbuilder.js
function exceptionFromError2(stackParser, ex) {
const frames = parseStackFrames2(stackParser, ex);
const exception = {
type: ex && ex.name,
value: extractMessage(ex)
};
if (frames.length) {
exception.stacktrace = { frames };
}
if (exception.type === void 0 && exception.value === "") {
exception.value = "Unrecoverable error caught";
}
return exception;
}
function eventFromPlainObject(stackParser, exception, syntheticException, isUnhandledRejection) {
const client = getClient();
const normalizeDepth = client && client.getOptions().normalizeDepth;
const event = {
exception: {
values: [
{
type: isEvent(exception) ? exception.constructor.name : isUnhandledRejection ? "UnhandledRejection" : "Error",
value: getNonErrorObjectExceptionValue(exception, { isUnhandledRejection })
}
]
},
extra: {
__serialized__: normalizeToSize(exception, normalizeDepth)
}
};
if (syntheticException) {
const frames = parseStackFrames2(stackParser, syntheticException);
if (frames.length) {
event.exception.values[0].stacktrace = { frames };
}
}
return event;
}
function eventFromError(stackParser, ex) {
return {
exception: {
values: [exceptionFromError2(stackParser, ex)]
}
};
}
function parseStackFrames2(stackParser, ex) {
const stacktrace = ex.stacktrace || ex.stack || "";
const popSize = getPopSize(ex);
try {
return stackParser(stacktrace, popSize);
} catch (e) {
}
return [];
}
function getPopSize(ex) {
if (ex) {
if (typeof ex.framesToPop === "number") {
return ex.framesToPop;
}
if (reactMinifiedRegexp.test(ex.message)) {
return 1;
}
}
return 0;
}
function extractMessage(ex) {
const message = ex && ex.message;
if (!message) {
return "No error message";
}
if (message.error && typeof message.error.message === "string") {
return message.error.message;
}
return message;
}
function eventFromException(stackParser, exception, hint, attachStacktrace) {
const syntheticException = hint && hint.syntheticException || void 0;
const event = eventFromUnknownInput2(stackParser, exception, syntheticException, attachStacktrace);
addExceptionMechanism(event);
event.level = "error";
if (hint && hint.event_id) {
event.event_id = hint.event_id;
}
return resolvedSyncPromise(event);
}
function eventFromMessage2(stackParser, message, level = "info", hint, attachStacktrace) {
const syntheticException = hint && hint.syntheticException || void 0;
const event = eventFromString(stackParser, message, syntheticException, attachStacktrace);
event.level = level;
if (hint && hint.event_id) {
event.event_id = hint.event_id;
}
return resolvedSyncPromise(event);
}
function eventFromUnknownInput2(stackParser, exception, syntheticException, attachStacktrace, isUnhandledRejection) {
let event;
if (isErrorEvent(exception) && exception.error) {
const errorEvent = exception;
return eventFromError(stackParser, errorEvent.error);
}
if (isDOMError(exception) || isDOMException(exception)) {
const domException = exception;
if ("stack" in exception) {
event = eventFromError(stackParser, exception);
} else {
const name = domException.name || (isDOMError(domException) ? "DOMError" : "DOMException");
const message = domException.message ? `${name}: ${domException.message}` : name;
event = eventFromString(stackParser, message, syntheticException, attachStacktrace);
addExceptionTypeValue(event, message);
}
if ("code" in domException) {
event.tags = __spreadProps(__spreadValues({}, event.tags), { "DOMException.code": `${domException.code}` });
}
return event;
}
if (isError(exception)) {
return eventFromError(stackParser, exception);
}
if (isPlainObject(exception) || isEvent(exception)) {
const objectException = exception;
event = eventFromPlainObject(stackParser, objectException, syntheticException, isUnhandledRejection);
addExceptionMechanism(event, {
synthetic: true
});
return event;
}
event = eventFromString(stackParser, exception, syntheticException, attachStacktrace);
addExceptionTypeValue(event, `${exception}`, void 0);
addExceptionMechanism(event, {
synthetic: true
});
return event;
}
function eventFromString(stackParser, message, syntheticException, attachStacktrace) {
const event = {};
if (attachStacktrace && syntheticException) {
const frames = parseStackFrames2(stackParser, syntheticException);
if (frames.length) {
event.exception = {
values: [{ value: message, stacktrace: { frames } }]
};
}
}
if (isParameterizedString(message)) {
const { __sentry_template_string__, __sentry_template_values__ } = message;
event.logentry = {
message: __sentry_template_string__,
params: __sentry_template_values__
};
return event;
}
event.message = message;
return event;
}
function getNonErrorObjectExceptionValue(exception, { isUnhandledRejection }) {
const keys = extractExceptionKeysForMessage(exception);
const captureType = isUnhandledRejection ? "promise rejection" : "exception";
if (isErrorEvent(exception)) {
return `Event \`ErrorEvent\` captured as ${captureType} with message \`${exception.message}\``;
}
if (isEvent(exception)) {
const className = getObjectClassName(exception);
return `Event \`${className}\` (type=${exception.type}) captured as ${captureType}`;
}
return `Object captured as ${captureType} with keys: ${keys}`;
}
function getObjectClassName(obj) {
try {
const prototype = Object.getPrototypeOf(obj);
return prototype ? prototype.constructor.name : void 0;
} catch (e) {
}
}
var reactMinifiedRegexp;
var init_eventbuilder2 = __esm({
"node_modules/@sentry/browser/esm/eventbuilder.js"() {
init_sentry_release_injection_stub();
init_esm2();
init_esm();
reactMinifiedRegexp = /Minified React error #\d+;/i;
}
});
// node_modules/@sentry/browser/esm/userfeedback.js
function createUserFeedbackEnvelope(feedback, {
metadata,
tunnel,
dsn
}) {
const headers = __spreadValues(__spreadValues({
event_id: feedback.event_id,
sent_at: (/* @__PURE__ */ new Date()).toISOString()
}, metadata && metadata.sdk && {
sdk: {
name: metadata.sdk.name,
version: metadata.sdk.version
}
}), !!tunnel && !!dsn && { dsn: dsnToString(dsn) });
const item = createUserFeedbackEnvelopeItem(feedback);
return createEnvelope(headers, [item]);
}
function createUserFeedbackEnvelopeItem(feedback) {
const feedbackHeaders = {
type: "user_report"
};
return [feedbackHeaders, feedback];
}
var init_userfeedback = __esm({
"node_modules/@sentry/browser/esm/userfeedback.js"() {
init_sentry_release_injection_stub();
init_esm();
}
});
// node_modules/@sentry/browser/esm/client.js
var BrowserClient;
var init_client = __esm({
"node_modules/@sentry/browser/esm/client.js"() {
init_sentry_release_injection_stub();
init_esm2();
init_esm();
init_debug_build3();
init_eventbuilder2();
init_helpers();
init_userfeedback();
BrowserClient = class extends BaseClient {
/**
* Creates a new Browser SDK instance.
*
* @param options Configuration options for this SDK.
*/
constructor(options) {
const sdkSource = WINDOW7.SENTRY_SDK_SOURCE || getSDKSource();
options._metadata = options._metadata || {};
options._metadata.sdk = options._metadata.sdk || {
name: "sentry.javascript.browser",
packages: [
{
name: `${sdkSource}:@sentry/browser`,
version: SDK_VERSION
}
],
version: SDK_VERSION
};
super(options);
if (options.sendClientReports && WINDOW7.document) {
WINDOW7.document.addEventListener("visibilitychange", () => {
if (WINDOW7.document.visibilityState === "hidden") {
this._flushOutcomes();
}
});
}
}
/**
* @inheritDoc
*/
eventFromException(exception, hint) {
return eventFromException(this._options.stackParser, exception, hint, this._options.attachStacktrace);
}
/**
* @inheritDoc
*/
eventFromMessage(message, level = "info", hint) {
return eventFromMessage2(this._options.stackParser, message, level, hint, this._options.attachStacktrace);
}
/**
* Sends user feedback to Sentry.
*/
captureUserFeedback(feedback) {
if (!this._isEnabled()) {
DEBUG_BUILD3 && logger.warn("SDK not enabled, will not capture user feedback.");
return;
}
const envelope = createUserFeedbackEnvelope(feedback, {
metadata: this.getSdkMetadata(),
dsn: this.getDsn(),
tunnel: this.getOptions().tunnel
});
this._sendEnvelope(envelope);
}
/**
* @inheritDoc
*/
_prepareEvent(event, hint, scope) {
event.platform = event.platform || "javascript";
return super._prepareEvent(event, hint, scope);
}
/**
* Sends client reports as an envelope.
*/
_flushOutcomes() {
const outcomes = this._clearOutcomes();
if (outcomes.length === 0) {
DEBUG_BUILD3 && logger.log("No outcomes to send");
return;
}
if (!this._dsn) {
DEBUG_BUILD3 && logger.log("No dsn provided, will not send outcomes");
return;
}
DEBUG_BUILD3 && logger.log("Sending outcomes:", outcomes);
const envelope = createClientReportEnvelope(outcomes, this._options.tunnel && dsnToString(this._dsn));
this._sendEnvelope(envelope);
}
};
}
});
// node_modules/@sentry/browser/esm/transports/utils.js
function getNativeFetchImplementation() {
if (cachedFetchImpl) {
return cachedFetchImpl;
}
if (isNativeFetch(WINDOW7.fetch)) {
return cachedFetchImpl = WINDOW7.fetch.bind(WINDOW7);
}
const document2 = WINDOW7.document;
let fetchImpl = WINDOW7.fetch;
if (document2 && typeof document2.createElement === "function") {
try {
const sandbox = document2.createElement("iframe");
sandbox.hidden = true;
document2.head.appendChild(sandbox);
const contentWindow = sandbox.contentWindow;
if (contentWindow && contentWindow.fetch) {
fetchImpl = contentWindow.fetch;
}
document2.head.removeChild(sandbox);
} catch (e) {
DEBUG_BUILD3 && logger.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ", e);
}
}
return cachedFetchImpl = fetchImpl.bind(WINDOW7);
}
function clearCachedFetchImplementation() {
cachedFetchImpl = void 0;
}
var cachedFetchImpl;
var init_utils2 = __esm({
"node_modules/@sentry/browser/esm/transports/utils.js"() {
init_sentry_release_injection_stub();
init_esm();
init_debug_build3();
init_helpers();
cachedFetchImpl = void 0;
}
});
// node_modules/@sentry/browser/esm/transports/fetch.js
function makeFetchTransport(options, nativeFetch = getNativeFetchImplementation()) {
let pendingBodySize = 0;
let pendingCount = 0;
function makeRequest(request) {
const requestSize = request.body.length;
pendingBodySize += requestSize;
pendingCount++;
const requestOptions = __spreadValues({
body: request.body,
method: "POST",
referrerPolicy: "origin",
headers: options.headers,
// Outgoing requests are usually cancelled when navigating to a different page, causing a "TypeError: Failed to
// fetch" error and sending a "network_error" client-outcome - in Chrome, the request status shows "(cancelled)".
// The `keepalive` flag keeps outgoing requests alive, even when switching pages. We want this since we're
// frequently sending events right before the user is switching pages (eg. whenfinishing navigation transactions).
// Gotchas:
// - `keepalive` isn't supported by Firefox
// - As per spec (https://fetch.spec.whatwg.org/#http-network-or-cache-fetch):
// If the sum of contentLength and inflightKeepaliveBytes is greater than 64 kibibytes, then return a network error.
// We will therefore only activate the flag when we're below that limit.
// There is also a limit of requests that can be open at the same time, so we also limit this to 15
// See https://github.com/getsentry/sentry-javascript/pull/7553 for details
keepalive: pendingBodySize <= 6e4 && pendingCount < 15
}, options.fetchOptions);
try {
return nativeFetch(options.url, requestOptions).then((response) => {
pendingBodySize -= requestSize;
pendingCount--;
return {
statusCode: response.status,
headers: {
"x-sentry-rate-limits": response.headers.get("X-Sentry-Rate-Limits"),
"retry-after": response.headers.get("Retry-After")
}
};
});
} catch (e) {
clearCachedFetchImplementation();
pendingBodySize -= requestSize;
pendingCount--;
return rejectedSyncPromise(e);
}
}
return createTransport(options, makeRequest);
}
var init_fetch2 = __esm({
"node_modules/@sentry/browser/esm/transports/fetch.js"() {
init_sentry_release_injection_stub();
init_esm2();
init_esm();
init_utils2();
}
});
// node_modules/@sentry/browser/esm/transports/xhr.js
function makeXHRTransport(options) {
function makeRequest(request) {
return new SyncPromise((resolve, reject) => {
const xhr = new XMLHttpRequest();
xhr.onerror = reject;
xhr.onreadystatechange = () => {
if (xhr.readyState === XHR_READYSTATE_DONE) {
resolve({
statusCode: xhr.status,
headers: {
"x-sentry-rate-limits": xhr.getResponseHeader("X-Sentry-Rate-Limits"),
"retry-after": xhr.getResponseHeader("Retry-After")
}
});
}
};
xhr.open("POST", options.url);
for (const header in options.headers) {
if (Object.prototype.hasOwnProperty.call(options.headers, header)) {
xhr.setRequestHeader(header, options.headers[header]);
}
}
xhr.send(request.body);
});
}
return createTransport(options, makeRequest);
}
var XHR_READYSTATE_DONE;
var init_xhr2 = __esm({
"node_modules/@sentry/browser/esm/transports/xhr.js"() {
init_sentry_release_injection_stub();
init_esm2();
init_esm();
XHR_READYSTATE_DONE = 4;
}
});
// node_modules/@sentry/browser/esm/stack-parsers.js
function createFrame(filename, func, lineno, colno) {
const frame = {
filename,
function: func,
in_app: true
// All browser frames are considered in_app
};
if (lineno !== void 0) {
frame.lineno = lineno;
}
if (colno !== void 0) {
frame.colno = colno;
}
return frame;
}
var UNKNOWN_FUNCTION, CHROME_PRIORITY, WINJS_PRIORITY, GECKO_PRIORITY, chromeRegex, chromeEvalRegex, chrome, chromeStackLineParser, geckoREgex, geckoEvalRegex, gecko, geckoStackLineParser, winjsRegex, winjs, winjsStackLineParser, defaultStackLineParsers, defaultStackParser, extractSafariExtensionDetails;
var init_stack_parsers = __esm({
"node_modules/@sentry/browser/esm/stack-parsers.js"() {
init_sentry_release_injection_stub();
init_esm();
UNKNOWN_FUNCTION = "?";
CHROME_PRIORITY = 30;
WINJS_PRIORITY = 40;
GECKO_PRIORITY = 50;
chromeRegex = /^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i;
chromeEvalRegex = /\((\S*)(?::(\d+))(?::(\d+))\)/;
chrome = (line) => {
const parts = chromeRegex.exec(line);
if (parts) {
const isEval = parts[2] && parts[2].indexOf("eval") === 0;
if (isEval) {
const subMatch = chromeEvalRegex.exec(parts[2]);
if (subMatch) {
parts[2] = subMatch[1];
parts[3] = subMatch[2];
parts[4] = subMatch[3];
}
}
const [func, filename] = extractSafariExtensionDetails(parts[1] || UNKNOWN_FUNCTION, parts[2]);
return createFrame(filename, func, parts[3] ? +parts[3] : void 0, parts[4] ? +parts[4] : void 0);
}
return;
};
chromeStackLineParser = [CHROME_PRIORITY, chrome];
geckoREgex = /^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i;
geckoEvalRegex = /(\S+) line (\d+)(?: > eval line \d+)* > eval/i;
gecko = (line) => {
const parts = geckoREgex.exec(line);
if (parts) {
const isEval = parts[3] && parts[3].indexOf(" > eval") > -1;
if (isEval) {
const subMatch = geckoEvalRegex.exec(parts[3]);
if (subMatch) {
parts[1] = parts[1] || "eval";
parts[3] = subMatch[1];
parts[4] = subMatch[2];
parts[5] = "";
}
}
let filename = parts[3];
let func = parts[1] || UNKNOWN_FUNCTION;
[func, filename] = extractSafariExtensionDetails(func, filename);
return createFrame(filename, func, parts[4] ? +parts[4] : void 0, parts[5] ? +parts[5] : void 0);
}
return;
};
geckoStackLineParser = [GECKO_PRIORITY, gecko];
winjsRegex = /^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i;
winjs = (line) => {
const parts = winjsRegex.exec(line);
return parts ? createFrame(parts[2], parts[1] || UNKNOWN_FUNCTION, +parts[3], parts[4] ? +parts[4] : void 0) : void 0;
};
winjsStackLineParser = [WINJS_PRIORITY, winjs];
defaultStackLineParsers = [chromeStackLineParser, geckoStackLineParser, winjsStackLineParser];
defaultStackParser = createStackParser(...defaultStackLineParsers);
extractSafariExtensionDetails = (func, filename) => {
const isSafariExtension = func.indexOf("safari-extension") !== -1;
const isSafariWebExtension = func.indexOf("safari-web-extension") !== -1;
return isSafariExtension || isSafariWebExtension ? [
func.indexOf("@") !== -1 ? func.split("@")[0] : UNKNOWN_FUNCTION,
isSafariExtension ? `safari-extension:${filename}` : `safari-web-extension:${filename}`
] : [func, filename];
};
}
});
// node_modules/@sentry/browser/esm/integrations/globalhandlers.js
function _installGlobalOnErrorHandler(client) {
addGlobalErrorInstrumentationHandler((data) => {
const { stackParser, attachStacktrace } = getOptions();
if (getClient() !== client || shouldIgnoreOnError()) {
return;
}
const { msg, url, line, column, error } = data;
const event = error === void 0 && isString(msg) ? _eventFromIncompleteOnError(msg, url, line, column) : _enhanceEventWithInitialFrame(
eventFromUnknownInput2(stackParser, error || msg, void 0, attachStacktrace, false),
url,
line,
column
);
event.level = "error";
captureEvent(event, {
originalException: error,
mechanism: {
handled: false,
type: "onerror"
}
});
});
}
function _installGlobalOnUnhandledRejectionHandler(client) {
addGlobalUnhandledRejectionInstrumentationHandler((e) => {
const { stackParser, attachStacktrace } = getOptions();
if (getClient() !== client || shouldIgnoreOnError()) {
return;
}
const error = _getUnhandledRejectionError(e);
const event = isPrimitive(error) ? _eventFromRejectionWithPrimitive(error) : eventFromUnknownInput2(stackParser, error, void 0, attachStacktrace, true);
event.level = "error";
captureEvent(event, {
originalException: error,
mechanism: {
handled: false,
type: "onunhandledrejection"
}
});
});
}
function _getUnhandledRejectionError(error) {
if (isPrimitive(error)) {
return error;
}
const e = error;
try {
if ("reason" in e) {
return e.reason;
} else if ("detail" in e && "reason" in e.detail) {
return e.detail.reason;
}
} catch (e2) {
}
return error;
}
function _eventFromRejectionWithPrimitive(reason) {
return {
exception: {
values: [
{
type: "UnhandledRejection",
// String() is needed because the Primitive type includes symbols (which can't be automatically stringified)
value: `Non-Error promise rejection captured with value: ${String(reason)}`
}
]
}
};
}
function _eventFromIncompleteOnError(msg, url, line, column) {
const ERROR_TYPES_RE = /^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;
let message = isErrorEvent(msg) ? msg.message : msg;
let name = "Error";
const groups2 = message.match(ERROR_TYPES_RE);
if (groups2) {
name = groups2[1];
message = groups2[2];
}
const event = {
exception: {
values: [
{
type: name,
value: message
}
]
}
};
return _enhanceEventWithInitialFrame(event, url, line, column);
}
function _enhanceEventWithInitialFrame(event, url, line, column) {
const e = event.exception = event.exception || {};
const ev = e.values = e.values || [];
const ev0 = ev[0] = ev[0] || {};
const ev0s = ev0.stacktrace = ev0.stacktrace || {};
const ev0sf = ev0s.frames = ev0s.frames || [];
const colno = isNaN(parseInt(column, 10)) ? void 0 : column;
const lineno = isNaN(parseInt(line, 10)) ? void 0 : line;
const filename = isString(url) && url.length > 0 ? url : getLocationHref();
if (ev0sf.length === 0) {
ev0sf.push({
colno,
filename,
function: "?",
in_app: true,
lineno
});
}
return event;
}
function globalHandlerLog(type) {
DEBUG_BUILD3 && logger.log(`Global Handler attached: ${type}`);
}
function getOptions() {
const client = getClient();
const options = client && client.getOptions() || {
stackParser: () => [],
attachStacktrace: false
};
return options;
}
var INTEGRATION_NAME4, globalHandlersIntegrations, GlobalHandlers;
var init_globalhandlers = __esm({
"node_modules/@sentry/browser/esm/integrations/globalhandlers.js"() {
init_sentry_release_injection_stub();
init_esm2();
init_esm();
init_debug_build3();
init_eventbuilder2();
init_helpers();
INTEGRATION_NAME4 = "GlobalHandlers";
globalHandlersIntegrations = (options = {}) => {
const _options = __spreadValues({
onerror: true,
onunhandledrejection: true
}, options);
return {
name: INTEGRATION_NAME4,
setupOnce() {
Error.stackTraceLimit = 50;
},
setup(client) {
if (_options.onerror) {
_installGlobalOnErrorHandler(client);
globalHandlerLog("onerror");
}
if (_options.onunhandledrejection) {
_installGlobalOnUnhandledRejectionHandler(client);
globalHandlerLog("onunhandledrejection");
}
}
};
};
GlobalHandlers = convertIntegrationFnToClass(INTEGRATION_NAME4, globalHandlersIntegrations);
}
});
// node_modules/@sentry/browser/esm/integrations/trycatch.js
function _wrapTimeFunction(original) {
return function(...args) {
const originalCallback = args[0];
args[0] = wrap(originalCallback, {
mechanism: {
data: { function: getFunctionName(original) },
handled: false,
type: "instrument"
}
});
return original.apply(this, args);
};
}
function _wrapRAF(original) {
return function(callback) {
return original.apply(this, [
wrap(callback, {
mechanism: {
data: {
function: "requestAnimationFrame",
handler: getFunctionName(original)
},
handled: false,
type: "instrument"
}
})
]);
};
}
function _wrapXHR(originalSend) {
return function(...args) {
const xhr = this;
const xmlHttpRequestProps = ["onload", "onerror", "onprogress", "onreadystatechange"];
xmlHttpRequestProps.forEach((prop) => {
if (prop in xhr && typeof xhr[prop] === "function") {
fill(xhr, prop, function(original) {
const wrapOptions = {
mechanism: {
data: {
function: prop,
handler: getFunctionName(original)
},
handled: false,
type: "instrument"
}
};
const originalFunction = getOriginalFunction(original);
if (originalFunction) {
wrapOptions.mechanism.data.handler = getFunctionName(originalFunction);
}
return wrap(original, wrapOptions);
});
}
});
return originalSend.apply(this, args);
};
}
function _wrapEventTarget(target) {
const globalObject = WINDOW7;
const proto = globalObject[target] && globalObject[target].prototype;
if (!proto || !proto.hasOwnProperty || !proto.hasOwnProperty("addEventListener")) {
return;
}
fill(proto, "addEventListener", function(original) {
return function(eventName, fn, options) {
try {
if (typeof fn.handleEvent === "function") {
fn.handleEvent = wrap(fn.handleEvent, {
mechanism: {
data: {
function: "handleEvent",
handler: getFunctionName(fn),
target
},
handled: false,
type: "instrument"
}
});
}
} catch (err) {
}
return original.apply(this, [
eventName,
// eslint-disable-next-line @typescript-eslint/no-explicit-any
wrap(fn, {
mechanism: {
data: {
function: "addEventListener",
handler: getFunctionName(fn),
target
},
handled: false,
type: "instrument"
}
}),
options
]);
};
});
fill(
proto,
"removeEventListener",
function(originalRemoveEventListener) {
return function(eventName, fn, options) {
const wrappedEventHandler = fn;
try {
const originalEventHandler = wrappedEventHandler && wrappedEventHandler.__sentry_wrapped__;
if (originalEventHandler) {
originalRemoveEventListener.call(this, eventName, originalEventHandler, options);
}
} catch (e) {
}
return originalRemoveEventListener.call(this, eventName, wrappedEventHandler, options);
};
}
);
}
var DEFAULT_EVENT_TARGET, INTEGRATION_NAME5, tryCatchIntegration, TryCatch;
var init_trycatch = __esm({
"node_modules/@sentry/browser/esm/integrations/trycatch.js"() {
init_sentry_release_injection_stub();
init_esm2();
init_esm();
init_helpers();
DEFAULT_EVENT_TARGET = [
"EventTarget",
"Window",
"Node",
"ApplicationCache",
"AudioTrackList",
"BroadcastChannel",
"ChannelMergerNode",
"CryptoOperation",
"EventSource",
"FileReader",
"HTMLUnknownElement",
"IDBDatabase",
"IDBRequest",
"IDBTransaction",
"KeyOperation",
"MediaController",
"MessagePort",
"ModalWindow",
"Notification",
"SVGElementInstance",
"Screen",
"SharedWorker",
"TextTrack",
"TextTrackCue",
"TextTrackList",
"WebSocket",
"WebSocketWorker",
"Worker",
"XMLHttpRequest",
"XMLHttpRequestEventTarget",
"XMLHttpRequestUpload"
];
INTEGRATION_NAME5 = "TryCatch";
tryCatchIntegration = (options = {}) => {
const _options = __spreadValues({
XMLHttpRequest: true,
eventTarget: true,
requestAnimationFrame: true,
setInterval: true,
setTimeout: true
}, options);
return {
name: INTEGRATION_NAME5,
// TODO: This currently only works for the first client this is setup
// We may want to adjust this to check for client etc.
setupOnce() {
if (_options.setTimeout) {
fill(WINDOW7, "setTimeout", _wrapTimeFunction);
}
if (_options.setInterval) {
fill(WINDOW7, "setInterval", _wrapTimeFunction);
}
if (_options.requestAnimationFrame) {
fill(WINDOW7, "requestAnimationFrame", _wrapRAF);
}
if (_options.XMLHttpRequest && "XMLHttpRequest" in WINDOW7) {
fill(XMLHttpRequest.prototype, "send", _wrapXHR);
}
const eventTargetOption = _options.eventTarget;
if (eventTargetOption) {
const eventTarget = Array.isArray(eventTargetOption) ? eventTargetOption : DEFAULT_EVENT_TARGET;
eventTarget.forEach(_wrapEventTarget);
}
}
};
};
TryCatch = convertIntegrationFnToClass(INTEGRATION_NAME5, tryCatchIntegration);
}
});
// node_modules/@sentry/browser/esm/integrations/breadcrumbs.js
function _getSentryBreadcrumbHandler(client) {
return function addSentryBreadcrumb(event) {
if (getClient() !== client) {
return;
}
addBreadcrumb(
{
category: `sentry.${event.type === "transaction" ? "transaction" : "event"}`,
event_id: event.event_id,
level: event.level,
message: getEventDescription(event)
},
{
event
}
);
};
}
function _getDomBreadcrumbHandler(client, dom) {
return function _innerDomBreadcrumb(handlerData) {
if (getClient() !== client) {
return;
}
let target;
let componentName;
let keyAttrs = typeof dom === "object" ? dom.serializeAttribute : void 0;
let maxStringLength = typeof dom === "object" && typeof dom.maxStringLength === "number" ? dom.maxStringLength : void 0;
if (maxStringLength && maxStringLength > MAX_ALLOWED_STRING_LENGTH) {
DEBUG_BUILD3 && logger.warn(
`\`dom.maxStringLength\` cannot exceed ${MAX_ALLOWED_STRING_LENGTH}, but a value of ${maxStringLength} was configured. Sentry will use ${MAX_ALLOWED_STRING_LENGTH} instead.`
);
maxStringLength = MAX_ALLOWED_STRING_LENGTH;
}
if (typeof keyAttrs === "string") {
keyAttrs = [keyAttrs];
}
try {
const event = handlerData.event;
const element = _isEvent(event) ? event.target : event;
target = htmlTreeAsString(element, { keyAttrs, maxStringLength });
componentName = getComponentName(element);
} catch (e) {
target = "<unknown>";
}
if (target.length === 0) {
return;
}
const breadcrumb = {
category: `ui.${handlerData.name}`,
message: target
};
if (componentName) {
breadcrumb.data = { "ui.component_name": componentName };
}
addBreadcrumb(breadcrumb, {
event: handlerData.event,
name: handlerData.name,
global: handlerData.global
});
};
}
function _getConsoleBreadcrumbHandler(client) {
return function _consoleBreadcrumb(handlerData) {
if (getClient() !== client) {
return;
}
const breadcrumb = {
category: "console",
data: {
arguments: handlerData.args,
logger: "console"
},
level: severityLevelFromString(handlerData.level),
message: safeJoin(handlerData.args, " ")
};
if (handlerData.level === "assert") {
if (handlerData.args[0] === false) {
breadcrumb.message = `Assertion failed: ${safeJoin(handlerData.args.slice(1), " ") || "console.assert"}`;
breadcrumb.data.arguments = handlerData.args.slice(1);
} else {
return;
}
}
addBreadcrumb(breadcrumb, {
input: handlerData.args,
level: handlerData.level
});
};
}
function _getXhrBreadcrumbHandler(client) {
return function _xhrBreadcrumb(handlerData) {
if (getClient() !== client) {
return;
}
const { startTimestamp, endTimestamp } = handlerData;
const sentryXhrData = handlerData.xhr[SENTRY_XHR_DATA_KEY];
if (!startTimestamp || !endTimestamp || !sentryXhrData) {
return;
}
const { method, url, status_code, body } = sentryXhrData;
const data = {
method,
url,
status_code
};
const hint = {
xhr: handlerData.xhr,
input: body,
startTimestamp,
endTimestamp
};
addBreadcrumb(
{
category: "xhr",
data,
type: "http"
},
hint
);
};
}
function _getFetchBreadcrumbHandler(client) {
return function _fetchBreadcrumb(handlerData) {
if (getClient() !== client) {
return;
}
const { startTimestamp, endTimestamp } = handlerData;
if (!endTimestamp) {
return;
}
if (handlerData.fetchData.url.match(/sentry_key/) && handlerData.fetchData.method === "POST") {
return;
}
if (handlerData.error) {
const data = handlerData.fetchData;
const hint = {
data: handlerData.error,
input: handlerData.args,
startTimestamp,
endTimestamp
};
addBreadcrumb(
{
category: "fetch",
data,
level: "error",
type: "http"
},
hint
);
} else {
const response = handlerData.response;
const data = __spreadProps(__spreadValues({}, handlerData.fetchData), {
status_code: response && response.status
});
const hint = {
input: handlerData.args,
response,
startTimestamp,
endTimestamp
};
addBreadcrumb(
{
category: "fetch",
data,
type: "http"
},
hint
);
}
};
}
function _getHistoryBreadcrumbHandler(client) {
return function _historyBreadcrumb(handlerData) {
if (getClient() !== client) {
return;
}
let from = handlerData.from;
let to = handlerData.to;
const parsedLoc = parseUrl2(WINDOW7.location.href);
let parsedFrom = from ? parseUrl2(from) : void 0;
const parsedTo = parseUrl2(to);
if (!parsedFrom || !parsedFrom.path) {
parsedFrom = parsedLoc;
}
if (parsedLoc.protocol === parsedTo.protocol && parsedLoc.host === parsedTo.host) {
to = parsedTo.relative;
}
if (parsedLoc.protocol === parsedFrom.protocol && parsedLoc.host === parsedFrom.host) {
from = parsedFrom.relative;
}
addBreadcrumb({
category: "navigation",
data: {
from,
to
}
});
};
}
function _isEvent(event) {
return !!event && !!event.target;
}
var MAX_ALLOWED_STRING_LENGTH, INTEGRATION_NAME6, breadcrumbsIntegration, Breadcrumbs;
var init_breadcrumbs = __esm({
"node_modules/@sentry/browser/esm/integrations/breadcrumbs.js"() {
init_sentry_release_injection_stub();
init_esm2();
init_esm();
init_debug_build3();
init_helpers();
MAX_ALLOWED_STRING_LENGTH = 1024;
INTEGRATION_NAME6 = "Breadcrumbs";
breadcrumbsIntegration = (options = {}) => {
const _options = __spreadValues({
console: true,
dom: true,
fetch: true,
history: true,
sentry: true,
xhr: true
}, options);
return {
name: INTEGRATION_NAME6,
setup(client) {
if (_options.console) {
addConsoleInstrumentationHandler(_getConsoleBreadcrumbHandler(client));
}
if (_options.dom) {
addClickKeypressInstrumentationHandler(_getDomBreadcrumbHandler(client, _options.dom));
}
if (_options.xhr) {
addXhrInstrumentationHandler(_getXhrBreadcrumbHandler(client));
}
if (_options.fetch) {
addFetchInstrumentationHandler(_getFetchBreadcrumbHandler(client));
}
if (_options.history) {
addHistoryInstrumentationHandler(_getHistoryBreadcrumbHandler(client));
}
if (_options.sentry && client.on) {
client.on("beforeSendEvent", _getSentryBreadcrumbHandler(client));
}
}
};
};
Breadcrumbs = convertIntegrationFnToClass(INTEGRATION_NAME6, breadcrumbsIntegration);
}
});
// node_modules/@sentry/browser/esm/integrations/linkederrors.js
var DEFAULT_KEY2, DEFAULT_LIMIT2, INTEGRATION_NAME7, linkedErrorsIntegration2, LinkedErrors2;
var init_linkederrors2 = __esm({
"node_modules/@sentry/browser/esm/integrations/linkederrors.js"() {
init_sentry_release_injection_stub();
init_esm2();
init_esm();
init_eventbuilder2();
DEFAULT_KEY2 = "cause";
DEFAULT_LIMIT2 = 5;
INTEGRATION_NAME7 = "LinkedErrors";
linkedErrorsIntegration2 = (options = {}) => {
const limit2 = options.limit || DEFAULT_LIMIT2;
const key = options.key || DEFAULT_KEY2;
return {
name: INTEGRATION_NAME7,
preprocessEvent(event, hint, client) {
const options2 = client.getOptions();
applyAggregateErrorsToEvent(
// This differs from the LinkedErrors integration in core by using a different exceptionFromError function
exceptionFromError2,
options2.stackParser,
options2.maxValueLength,
key,
limit2,
event,
hint
);
}
};
};
LinkedErrors2 = convertIntegrationFnToClass(INTEGRATION_NAME7, linkedErrorsIntegration2);
}
});
// node_modules/@sentry/browser/esm/integrations/httpcontext.js
var INTEGRATION_NAME8, httpContextIntegration, HttpContext;
var init_httpcontext = __esm({
"node_modules/@sentry/browser/esm/integrations/httpcontext.js"() {
init_sentry_release_injection_stub();
init_esm2();
init_helpers();
INTEGRATION_NAME8 = "HttpContext";
httpContextIntegration = () => {
return {
name: INTEGRATION_NAME8,
preprocessEvent(event) {
if (!WINDOW7.navigator && !WINDOW7.location && !WINDOW7.document) {
return;
}
const url = event.request && event.request.url || WINDOW7.location && WINDOW7.location.href;
const { referrer } = WINDOW7.document || {};
const { userAgent } = WINDOW7.navigator || {};
const headers = __spreadValues(__spreadValues(__spreadValues({}, event.request && event.request.headers), referrer && { Referer: referrer }), userAgent && { "User-Agent": userAgent });
const request = __spreadProps(__spreadValues(__spreadValues({}, event.request), url && { url }), { headers });
event.request = request;
}
};
};
HttpContext = convertIntegrationFnToClass(INTEGRATION_NAME8, httpContextIntegration);
}
});
// node_modules/@sentry/browser/esm/integrations/dedupe.js
function _shouldDropEvent2(currentEvent, previousEvent) {
if (!previousEvent) {
return false;
}
if (_isSameMessageEvent(currentEvent, previousEvent)) {
return true;
}
if (_isSameExceptionEvent(currentEvent, previousEvent)) {
return true;
}
return false;
}
function _isSameMessageEvent(currentEvent, previousEvent) {
const currentMessage = currentEvent.message;
const previousMessage = previousEvent.message;
if (!currentMessage && !previousMessage) {
return false;
}
if (currentMessage && !previousMessage || !currentMessage && previousMessage) {
return false;
}
if (currentMessage !== previousMessage) {
return false;
}
if (!_isSameFingerprint(currentEvent, previousEvent)) {
return false;
}
if (!_isSameStacktrace(currentEvent, previousEvent)) {
return false;
}
return true;
}
function _isSameExceptionEvent(currentEvent, previousEvent) {
const previousException = _getExceptionFromEvent(previousEvent);
const currentException = _getExceptionFromEvent(currentEvent);
if (!previousException || !currentException) {
return false;
}
if (previousException.type !== currentException.type || previousException.value !== currentException.value) {
return false;
}
if (!_isSameFingerprint(currentEvent, previousEvent)) {
return false;
}
if (!_isSameStacktrace(currentEvent, previousEvent)) {
return false;
}
return true;
}
function _isSameStacktrace(currentEvent, previousEvent) {
let currentFrames = _getFramesFromEvent(currentEvent);
let previousFrames = _getFramesFromEvent(previousEvent);
if (!currentFrames && !previousFrames) {
return true;
}
if (currentFrames && !previousFrames || !currentFrames && previousFrames) {
return false;
}
currentFrames = currentFrames;
previousFrames = previousFrames;
if (previousFrames.length !== currentFrames.length) {
return false;
}
for (let i = 0; i < previousFrames.length; i++) {
const frameA = previousFrames[i];
const frameB = currentFrames[i];
if (frameA.filename !== frameB.filename || frameA.lineno !== frameB.lineno || frameA.colno !== frameB.colno || frameA.function !== frameB.function) {
return false;
}
}
return true;
}
function _isSameFingerprint(currentEvent, previousEvent) {
let currentFingerprint = currentEvent.fingerprint;
let previousFingerprint = previousEvent.fingerprint;
if (!currentFingerprint && !previousFingerprint) {
return true;
}
if (currentFingerprint && !previousFingerprint || !currentFingerprint && previousFingerprint) {
return false;
}
currentFingerprint = currentFingerprint;
previousFingerprint = previousFingerprint;
try {
return !!(currentFingerprint.join("") === previousFingerprint.join(""));
} catch (_oO) {
return false;
}
}
function _getExceptionFromEvent(event) {
return event.exception && event.exception.values && event.exception.values[0];
}
function _getFramesFromEvent(event) {
const exception = event.exception;
if (exception) {
try {
return exception.values[0].stacktrace.frames;
} catch (_oO) {
return void 0;
}
}
return void 0;
}
var INTEGRATION_NAME9, dedupeIntegration, Dedupe;
var init_dedupe = __esm({
"node_modules/@sentry/browser/esm/integrations/dedupe.js"() {
init_sentry_release_injection_stub();
init_esm2();
init_esm();
init_debug_build3();
INTEGRATION_NAME9 = "Dedupe";
dedupeIntegration = () => {
let previousEvent;
return {
name: INTEGRATION_NAME9,
processEvent(currentEvent) {
if (currentEvent.type) {
return currentEvent;
}
try {
if (_shouldDropEvent2(currentEvent, previousEvent)) {
DEBUG_BUILD3 && logger.warn("Event dropped due to being a duplicate of previously captured event.");
return null;
}
} catch (_oO) {
}
return previousEvent = currentEvent;
}
};
};
Dedupe = convertIntegrationFnToClass(INTEGRATION_NAME9, dedupeIntegration);
}
});
// node_modules/@sentry/browser/esm/sdk.js
function init(options = {}) {
if (options.defaultIntegrations === void 0) {
options.defaultIntegrations = defaultIntegrations;
}
if (options.release === void 0) {
if (typeof __SENTRY_RELEASE__ === "string") {
options.release = __SENTRY_RELEASE__;
}
if (WINDOW7.SENTRY_RELEASE && WINDOW7.SENTRY_RELEASE.id) {
options.release = WINDOW7.SENTRY_RELEASE.id;
}
}
if (options.autoSessionTracking === void 0) {
options.autoSessionTracking = true;
}
if (options.sendClientReports === void 0) {
options.sendClientReports = true;
}
const clientOptions = __spreadProps(__spreadValues({}, options), {
stackParser: stackParserFromStackParserOptions(options.stackParser || defaultStackParser),
integrations: getIntegrationsToSetup(options),
transport: options.transport || (supportsFetch() ? makeFetchTransport : makeXHRTransport)
});
initAndBind(BrowserClient, clientOptions);
if (options.autoSessionTracking) {
startSessionTracking();
}
}
function startSessionTracking() {
if (typeof WINDOW7.document === "undefined") {
DEBUG_BUILD3 && logger.warn("Session tracking in non-browser environment with @sentry/browser is not supported.");
return;
}
startSession({ ignoreDuration: true });
captureSession();
addHistoryInstrumentationHandler(({ from, to }) => {
if (from !== void 0 && from !== to) {
startSession({ ignoreDuration: true });
captureSession();
}
});
}
var defaultIntegrations;
var init_sdk2 = __esm({
"node_modules/@sentry/browser/esm/sdk.js"() {
init_sentry_release_injection_stub();
init_esm2();
init_esm();
init_client();
init_debug_build3();
init_helpers();
init_globalhandlers();
init_trycatch();
init_breadcrumbs();
init_linkederrors2();
init_httpcontext();
init_dedupe();
init_stack_parsers();
init_fetch2();
init_xhr2();
defaultIntegrations = [
new integrations_exports.InboundFilters(),
new integrations_exports.FunctionToString(),
new TryCatch(),
new Breadcrumbs(),
new GlobalHandlers(),
new LinkedErrors2(),
new Dedupe(),
new HttpContext()
];
}
});
// node_modules/@sentry/browser/esm/integrations/index.js
var integrations_exports2 = {};
__export(integrations_exports2, {
Breadcrumbs: () => Breadcrumbs,
Dedupe: () => Dedupe,
GlobalHandlers: () => GlobalHandlers,
HttpContext: () => HttpContext,
LinkedErrors: () => LinkedErrors2,
TryCatch: () => TryCatch
});
var init_integrations2 = __esm({
"node_modules/@sentry/browser/esm/integrations/index.js"() {
init_sentry_release_injection_stub();
init_globalhandlers();
init_trycatch();
init_breadcrumbs();
init_linkederrors2();
init_httpcontext();
init_dedupe();
}
});
// node_modules/@sentry/browser/esm/index.js
var windowIntegrations, INTEGRATIONS;
var init_esm3 = __esm({
"node_modules/@sentry/browser/esm/index.js"() {
init_sentry_release_injection_stub();
init_esm2();
init_esm2();
init_helpers();
init_sdk2();
init_integrations2();
windowIntegrations = {};
if (WINDOW7.Sentry && WINDOW7.Sentry.Integrations) {
windowIntegrations = WINDOW7.Sentry.Integrations;
}
INTEGRATIONS = __spreadValues(__spreadValues(__spreadValues({}, windowIntegrations), integrations_exports), integrations_exports2);
}
});
// src/utils/settings.js
var getSettingDirect, saveSettingDirect, getSetting, getSettings, saveSetting;
var init_settings = __esm({
"src/utils/settings.js"() {
init_sentry_release_injection_stub();
getSettingDirect = (key = null, defaultValue = null, identifier = "mh-utils-settings") => {
const settings = JSON.parse(localStorage.getItem(identifier)) || {};
if (!key) {
return settings;
}
if (Object.prototype.hasOwnProperty.call(settings, key)) {
return settings[key];
}
return defaultValue;
};
saveSettingDirect = (key, value, identifier = "mh-utils-settings") => {
const settings = getSettingDirect(null, {}, identifier);
settings[key] = value;
localStorage.setItem(identifier, JSON.stringify(settings));
};
getSetting = (key, defaultValue = false) => {
return getSettingDirect(key, defaultValue, "mousehunt-improved-settings");
};
getSettings = () => {
const settings = localStorage.getItem("mousehunt-improved-settings");
if (!settings) {
return {};
}
return JSON.parse(settings);
};
saveSetting = (key, value) => {
saveSettingDirect(key, value, "mousehunt-improved-settings");
return value;
};
}
});
// src/utils/flags.js
var getFlag;
var init_flags = __esm({
"src/utils/flags.js"() {
init_sentry_release_injection_stub();
init_settings();
getFlag = (flag) => {
const flags = getSetting("override-flags");
if (!flags) {
return false;
}
return flags.replaceAll(" ", "").split(",").includes(flag);
};
}
});
// src/utils/debug.js
var debug, debugplain, debuglog, debuglite;
var init_debug = __esm({
"src/utils/debug.js"() {
init_sentry_release_injection_stub();
init_flags();
debug = (message, ...args) => {
if (getFlag("debug")) {
console.log(
`%cMH Improved%c: ${message}`,
"color: #90588c; font-weight: 900",
"color: inherit; font-weight: inherit",
...args
);
}
};
debugplain = (...args) => {
if (getFlag("debug")) {
console.log(...args);
}
};
debuglog = (module, message, ...args) => {
if (getFlag("debug")) {
console.log(
`%cMH Improved %c${module}%c ${message}`,
"color: #90588c; font-weight: 900",
"color: #90588c; font-weight: 400",
"color: inherit; font-weight: inherit",
...args
);
}
};
debuglite = (message, ...args) => {
if (getFlag("debug")) {
console.log(
`%c MH Improved%c: ${message}`,
"color: #90588c",
"color: inherit",
...args
);
}
};
}
});
// src/utils/data.js
var isValidDataFile, getCacheKey, getCacheExpirationKey, getCacheExpirations, getCacheExpiration, setCacheExpiration, isCacheExpired, getCachedData, setCachedData, fetchAndCacheData, getData, clearCaches, getHeaders, sessionSet, sessionGet;
var init_data = __esm({
"src/utils/data.js"() {
init_sentry_release_injection_stub();
init_debug();
init_flags();
isValidDataFile = (file) => {
const validDataFiles = /* @__PURE__ */ new Set([
"minlucks",
"wisdom",
"effs",
"mice-groups",
"mice-regions",
"items-tradable",
"scoreboards",
"environments",
"upscaled-images"
]);
return validDataFiles.has(file);
};
getCacheKey = (key) => {
return `mh-improved-cached-data--${key}`;
};
getCacheExpirationKey = () => {
return "mh-improved-cached-data-expiration";
};
getCacheExpirations = () => {
return JSON.parse(localStorage.getItem(getCacheExpirationKey())) || {};
};
getCacheExpiration = (key) => {
const allCacheExpirations = getCacheExpirations();
return allCacheExpirations[key] || {
date: 0,
version: 0
};
};
setCacheExpiration = (key) => {
const allCacheExpirations = getCacheExpirations();
debuglog("utils.data", `Setting cache expiration for ${key}`);
allCacheExpirations[key] = {
date: Date.now() + (Math.floor(Math.random() * 7) + 7) * 24 * 60 * 60 * 1e3,
version: mhImprovedVersion
};
debuglog("utils.data", `Setting cache expiration for ${key} to ${allCacheExpirations[key].date}`);
localStorage.setItem(getCacheExpirationKey(), JSON.stringify(allCacheExpirations));
};
isCacheExpired = (key) => {
const expiration = getCacheExpiration(key);
if (!expiration || !(expiration == null ? void 0 : expiration.date) || !(expiration == null ? void 0 : expiration.version)) {
return true;
}
if (expiration.version !== mhImprovedVersion) {
return true;
}
return expiration.date < Date.now();
};
getCachedData = (key) => {
const isExpired = isCacheExpired(key);
if (isExpired) {
return false;
}
const fromStorage = localStorage.getItem(getCacheKey(key));
if (!fromStorage) {
return false;
}
return JSON.parse(fromStorage);
};
setCachedData = (key, data) => {
const cacheKey = getCacheKey(key);
localStorage.setItem(cacheKey, JSON.stringify(data));
setCacheExpiration(key);
};
fetchAndCacheData = (key) => __async(void 0, null, function* () {
const data = yield fetch(`https://api.mouse.rip/${key}`, {
method: "GET",
headers: getHeaders()
});
const json = yield data.json();
setCachedData(key, json);
return json;
});
getData = (key) => __async(void 0, null, function* () {
if (!isValidDataFile(key)) {
debuglog("utils.data", `Cannot get data for ${key}, invalid key`);
return false;
}
const cachedData = getCachedData(key);
if (cachedData) {
return cachedData;
}
debuglog("utils.data", `Fetching data for ${key} ...`);
const data = yield fetchAndCacheData(key);
debuglog("utils.data", `Fetched data for ${key}`, data);
return data;
});
clearCaches = () => {
const allCacheExpirations = getCacheExpirations();
for (const key of Object.keys(allCacheExpirations)) {
localStorage.removeItem(getCacheKey(key));
}
for (const key of Object.keys(sessionStorage)) {
if (key.startsWith("mh-improved")) {
sessionStorage.removeItem(key);
}
}
localStorage.removeItem(getCacheExpirationKey());
};
getHeaders = () => {
return {
"Content-Type": "application/json",
"X-MH-Improved": "true",
"X-MH-Improved-Version": mhImprovedVersion,
"X-MH-Improved-Platform": mhImprovedPlatform
};
};
sessionSet = (key, value, retry = false) => {
if (getFlag("no-cache")) {
return;
}
key = `mh-improved-${key}`;
const stringified = JSON.stringify(value);
try {
sessionStorage.setItem(key, stringified);
} catch (error) {
if ("QuotaExceededError" === error.name && !retry) {
for (const skey of Object.keys(sessionStorage)) {
if (skey.startsWith("mh-improved")) {
sessionStorage.removeItem(skey);
}
}
sessionSet(key, value, true);
}
}
};
sessionGet = (key, defaultValue = false) => {
if (getFlag("no-cache")) {
return defaultValue;
}
key = `mh-improved-${key}`;
const value = sessionStorage.getItem(key);
if (!value) {
return defaultValue;
}
return JSON.parse(value);
};
}
});
// src/utils/draggable.js
var makeElementDraggable;
var init_draggable = __esm({
"src/utils/draggable.js"() {
init_sentry_release_injection_stub();
makeElementDraggable = (dragTarget, dragHandle, defaultX = null, defaultY = null, storageKey = null, savePosition = true) => {
const modal = document.querySelector(dragTarget);
if (!modal) {
return;
}
const handle = document.querySelector(dragHandle);
if (!handle) {
return;
}
const keepWithinLimits = (type, value) => {
if ("top" === type) {
return value < -20 ? -20 : value;
}
if (value < handle.offsetWidth * -1 + 20) {
return handle.offsetWidth * -1 + 20;
}
if (value > document.body.clientWidth - 20) {
return document.body.clientWidth - 20;
}
return value;
};
const onMouseDown = (e) => {
e.preventDefault();
setTimeout(() => {
x1 = e.clientX;
y1 = e.clientY;
modal.classList.add("mh-is-dragging");
document.onmousemove = onDrag;
document.onmouseup = finishDrag;
}, 50);
};
const finishDrag = () => {
document.onmouseup = null;
document.onmousemove = null;
modal.classList.remove("mh-is-dragging");
if (storageKey) {
localStorage.setItem(storageKey, JSON.stringify({ x: modal.offsetLeft, y: modal.offsetTop }));
}
};
const onDrag = (e) => {
e.preventDefault();
x2 = x1 - e.clientX;
y2 = y1 - e.clientY;
x1 = e.clientX;
y1 = e.clientY;
const newLeft = keepWithinLimits("left", modal.offsetLeft - x2);
const newTop = keepWithinLimits("top", modal.offsetTop - y2);
modal.style.left = `${newLeft}px`;
modal.style.top = `${newTop}px`;
};
let startX = defaultX || 0;
let startY = defaultY || 0;
if (!storageKey) {
storageKey = `mh-draggable-${dragTarget}-${dragHandle}`;
}
if (savePosition) {
const storedPosition = localStorage.getItem(storageKey);
if (storedPosition) {
const position = JSON.parse(storedPosition);
startX = keepWithinLimits("left", position.x);
startY = keepWithinLimits("top", position.y);
}
}
modal.style.left = `${startX}px`;
modal.style.top = `${startY}px`;
let x1 = 0, y1 = 0, x2 = 0, y2 = 0;
handle.onmousedown = onMouseDown;
};
}
});
// src/utils/styles.js
var addStylesDirect, addStyles, addHudStyles, removeHudStyles;
var init_styles = __esm({
"src/utils/styles.js"() {
init_sentry_release_injection_stub();
addStylesDirect = (styles, identifier = "mh-utils-custom-styles", once = false) => {
identifier = `mh-utils-${identifier}`;
const existingStyles = document.querySelector(`#${identifier}`);
if (existingStyles) {
if (once) {
return existingStyles;
}
existingStyles.innerHTML += styles;
return existingStyles;
}
const style = document.createElement("style");
style.id = identifier;
style.innerHTML = styles;
document.head.append(style);
return style;
};
addStyles = (styles, identifier = "mh-improved-styles", replace = false) => __async(void 0, null, function* () {
const existingStyles = document.querySelector(`#${identifier}`);
styles = Array.isArray(styles) ? styles.join("\n") : styles;
if (existingStyles) {
if (replace) {
existingStyles.innerHTML = styles;
} else {
existingStyles.innerHTML += styles;
}
return;
}
const style = document.createElement("style");
style.id = identifier;
style.innerHTML = styles;
document.head.append(style);
});
addHudStyles = (styles) => __async(void 0, null, function* () {
addStyles(styles, "mh-improved-styles-location-hud", true);
});
removeHudStyles = () => {
const styles = document.querySelectorAll(".mh-improved-styles-location-hud");
styles.forEach((style) => {
style.remove();
});
};
}
});
// src/utils/styles/favorite-button.css
var favorite_button_default;
var init_favorite_button = __esm({
"src/utils/styles/favorite-button.css"() {
favorite_button_default = ".custom-favorite-button{top:0;right:0;display:inline-block;width:35px;height:35px;vertical-align:middle;background:url(https://www.mousehuntgame.com/images/ui/camp/trap/star_empty.png?asset_cache_version=2) 50% 50% no-repeat;background-size:90%;border-radius:50%}.custom-favorite-button-small{width:20px;height:20px}.custom-favorite-button:hover{background-color:#fff;background-image:url(https://www.mousehuntgame.com/images/ui/camp/trap/star_favorite.png?asset_cache_version=2);outline:2px solid #ccc}.custom-favorite-button.active{background-image:url(https://www.mousehuntgame.com/images/ui/camp/trap/star_favorite.png?asset_cache_version=2)}.custom-favorite-button.busy{background-image:url(https://www.mousehuntgame.com/images/ui/loaders/small_spinner.gif?asset_cache_version=2)}\n";
}
});
// src/utils/elements.js
var makeElement, makeButton, makeLink, makeFavoriteButton, createPopup, makeTooltip, makePage;
var init_elements = __esm({
"src/utils/elements.js"() {
init_sentry_release_injection_stub();
init_settings();
init_styles();
init_flags();
init_favorite_button();
makeElement = (tag, classes = "", text = "", appendTo = null) => {
const element = document.createElement(tag);
if (Array.isArray(classes)) {
classes = classes.join(" ");
}
if (classes && classes.length) {
element.className = classes;
}
element.innerHTML = text;
if (appendTo) {
appendTo.append(element);
return appendTo;
}
return element;
};
makeButton = (text, href, tiny = true, extraClasses = [], encodeAsSpace = false) => {
href = href.replaceAll(/\s/g, "_");
href = encodeAsSpace ? href.replaceAll("_", "%20") : href.replaceAll(/\s/g, "_");
href = href.replaceAll("$", "_");
return `<a href="${href}" class="mousehuntActionButton ${tiny ? "tiny" : ""} ${extraClasses.join(" ")}"><span>${text}</span></a>`;
};
makeLink = (text, href, encodeAsSpace = false) => {
if (encodeAsSpace) {
href = href.replaceAll("_", "%20");
}
return `<a href="${href}" target="_mouse" class="mousehuntActionButton tiny"><span>${text}</span></a>`;
};
makeFavoriteButton = (options) => __async(void 0, null, function* () {
addStylesDirect(favorite_button_default, "mh-improved-styles-favorite-button", true);
const {
id = null,
target = null,
size = "small",
state = false,
isSetting = true,
defaultState = false,
onChange = null,
onActivate = null,
onDeactivate = null
} = options;
const existing = document.querySelector(`#${id}`);
if (existing) {
existing.remove();
}
const star = document.createElement("a");
star.classList.add("custom-favorite-button");
if (size === "small") {
star.classList.add("custom-favorite-button-small");
}
star.id = id;
star.setAttribute("data-item-id", id);
star.setAttribute("href", "#");
star.style.display = "inline-block";
let currentSetting = false;
currentSetting = isSetting ? getSettingDirect(id, defaultState) : state;
if (currentSetting) {
star.classList.add("active");
} else {
star.classList.add("inactive");
}
star.addEventListener("click", (e) => __async(void 0, null, function* () {
star.classList.add("busy");
e.preventDefault();
e.stopPropagation();
const currentStar = e.target;
const currentState = !currentStar.classList.contains("active");
if (onChange !== null) {
yield onChange(currentState);
} else if (isSetting) {
saveSettingDirect(id, currentState);
}
currentStar.classList.remove("inactive");
currentStar.classList.remove("active");
if (currentState) {
currentStar.classList.add("active");
if (onActivate !== null) {
yield onActivate(currentState);
}
} else {
currentStar.classList.add("inactive");
if (onDeactivate !== null) {
yield onDeactivate(currentState);
}
}
setTimeout(() => {
currentStar.classList.remove("busy");
}, 300);
}));
if (target) {
target.append(star);
}
return star;
});
createPopup = (options) => {
if ("undefined" === typeof jsDialog || !jsDialog) {
return false;
}
const settings = Object.assign({}, {
title: "",
content: "",
hasCloseButton: true,
template: "default",
show: true,
className: ""
}, options);
const popup = new jsDialog();
popup.setIsModal(!settings.hasCloseButton);
popup.setTemplate(settings.template);
popup.addToken("{*title*}", settings.title);
popup.addToken("{*content*}", settings.content);
popup.setAttributes({
className: settings.className
});
if (settings.show) {
popup.show();
}
return popup;
};
makeTooltip = (options) => {
if (getFlag("disable-mh-improved-tooltips")) {
return false;
}
if (!options.appendTo) {
return false;
}
const {
appendTo,
className = "",
text = ""
} = options;
const tooltip = makeElement("div", ["PreferencesPage__blackTooltip", "mh-improved-tooltip", className]);
makeElement("span", "PreferencesPage__blackTooltipText", text, tooltip);
appendTo.append(tooltip);
};
makePage = (content) => {
const setContent = () => {
const pageContainer = document.querySelector(".mousehuntHud-page-tabContentContainer");
if (!pageContainer) {
return;
}
if (typeof content === "function") {
pageContainer.innerHTML = "";
content(pageContainer);
} else if (typeof content === "object" && content instanceof HTMLElement) {
pageContainer.innerHTML = "";
pageContainer.append(content);
} else {
pageContainer.innerHTML = content;
}
};
hg.utils.PageUtil.setPage("PrivacyPolicy", {}, setContent, setContent);
};
}
});
// src/utils/page.js
var getCurrentPage, getCurrentTab, getCurrentSubtab, getCurrentDialog, isCurrentPage;
var init_page = __esm({
"src/utils/page.js"() {
init_sentry_release_injection_stub();
getCurrentPage = () => {
return hg.utils.PageUtil.getCurrentPage().toLowerCase();
};
getCurrentTab = () => {
const tab = hg.utils.PageUtil.getCurrentPageTab().toLowerCase();
if (tab.length <= 0) {
return getCurrentPage();
}
return tab;
};
getCurrentSubtab = () => {
const subtab = hg.utils.PageUtil.getCurrentPageSubTab();
if (!subtab || subtab.length <= 0) {
return getCurrentTab();
}
return subtab.toLowerCase();
};
getCurrentDialog = () => {
const overlay = document.querySelector("#overlayPopup");
if (overlay && overlay.classList.length <= 0) {
return null;
}
let overlayType = overlay.classList.value;
overlayType = overlayType.replace("jsDialogFixed", "");
overlayType = overlayType.replace("default", "");
overlayType = overlayType.replace("wide", "");
overlayType = overlayType.replace("ajax", "");
overlayType = overlayType.replace("overlay", "");
overlayType = overlayType.replace("treasureMapPopup", "map");
overlayType = overlayType.replace("itemViewPopup", "item");
overlayType = overlayType.replace("mouseViewPopup", "mouse");
overlayType = overlayType.replace("largerImage", "image");
overlayType = overlayType.replace("convertibleOpenViewPopup", "convertible");
overlayType = overlayType.replace("adventureBookPopup", "adventureBook");
overlayType = overlayType.replace("marketplaceViewPopup", "marketplace");
overlayType = overlayType.replace("giftSelectorViewPopup", "gifts");
overlayType = overlayType.replace("supportPageContactUsForm", "support");
overlayType = overlayType.replace("MHCheckout", "premiumShop");
overlayType = overlayType.trim();
if ("Popup" === overlayType) {
return false;
}
return overlayType;
};
isCurrentPage = (targetPage = null, targetTab = null, targetSubtab = null, forceCurrentPage = null, forceCurrentTab = null, forceCurrentSubtab = null) => {
if (!targetPage) {
return false;
}
const currentPage = forceCurrentPage || getCurrentPage();
if (!targetTab) {
return currentPage === targetPage;
}
const currentTab = forceCurrentTab || getCurrentTab();
if (!targetSubtab) {
return currentPage === targetPage && currentTab === targetTab;
}
const currentSubtab = forceCurrentSubtab || getCurrentSubtab();
if (currentSubtab === currentTab) {
return currentPage === targetPage && currentTab === targetTab;
}
return currentPage === targetPage && currentTab === targetTab && currentSubtab === targetSubtab;
};
}
});
// src/utils/location.js
var getCurrentLocation, getRelicHunterLocation;
var init_location = __esm({
"src/utils/location.js"() {
init_sentry_release_injection_stub();
init_data();
getCurrentLocation = () => {
const location = (user == null ? void 0 : user.environment_type) || "";
return location.toLowerCase();
};
getRelicHunterLocation = () => {
const cacheExpiry = 5 * 60 * 1e3;
const cacheKey = "mh-improved-relic-hunter-location";
let cached = sessionGet(cacheKey);
if (cached) {
cached = JSON.parse(cached);
}
if (cached && cached.expiry > Date.now()) {
return cached.data;
}
return fetch("https://rh-api.mouse.rip/", { headers: getHeaders() }).then((response) => response.json()).then((data) => {
const expiry = Date.now() + cacheExpiry;
sessionSet(cacheKey, JSON.stringify({ expiry, data }));
return data;
}).catch((error) => {
console.error(error);
});
};
}
});
// src/utils/horn.js
var showHornMessage;
var init_horn = __esm({
"src/utils/horn.js"() {
init_sentry_release_injection_stub();
init_elements();
showHornMessage = (options) => {
const huntersHornView = document.querySelector(".huntersHornView__messageContainer");
if (!huntersHornView) {
return;
}
const settings = {
title: options.title || "Hunters Horn",
text: options.text || "This is a message from the Hunters Horn",
button: options.button || "OK",
action: options.action || (() => {
}),
dismiss: options.dismiss || null,
type: options.type || "recent_linked_turn",
classname: options.classname || "",
image: options.image || null,
imageLink: options.imageLink || null,
imageCallback: options.imageCallback || null
};
const backdrop = document.querySelector(".huntersHornView__backdrop");
if (backdrop) {
backdrop.classList.add("huntersHornView__backdrop--active");
}
const gameInfo = document.querySelector(".mousehuntHud-gameInfo");
if (gameInfo) {
gameInfo.classList.add("blur");
}
const messageWrapper = makeElement("div", ["huntersHornView__message huntersHornView__message--active", settings.classname]);
const message = makeElement("div", ["huntersHornMessageView", `huntersHornMessageView--${settings.type}`]);
makeElement("div", "huntersHornMessageView__title", settings.title, message);
const content = makeElement("div", "huntersHornMessageView__content");
if (settings.image) {
const imgWrapper = makeElement("div", "huntersHornMessageView__friend");
const img = makeElement("a", "huntersHornMessageView__friendProfilePic");
if (settings.imageLink) {
img.href = settings.imageLink;
} else if (settings.imageCallback) {
img.addEventListener("click", settings.imageCallback);
} else {
img.href = "#";
}
img.style.backgroundImage = `url(${settings.image})`;
imgWrapper.append(img);
content.append(imgWrapper);
}
makeElement("div", "huntersHornMessageView__text", settings.text, content);
const buttonSpacer = makeElement("div", "huntersHornMessageView__buttonSpacer");
const button = makeElement("button", "huntersHornMessageView__action");
const buttonLabel = makeElement("div", "huntersHornMessageView__actionLabel");
makeElement("span", "huntersHornMessageView__actionText", settings.button, buttonLabel);
button.append(buttonLabel);
button.addEventListener("click", () => {
if (settings.action) {
settings.action();
}
messageWrapper.innerHTML = "";
backdrop.classList.remove("huntersHornView__backdrop--active");
gameInfo.classList.remove("blur");
});
buttonSpacer.append(button);
content.append(buttonSpacer);
message.append(content);
if (settings.dismiss) {
const countdown = makeElement("button", ["huntersHornMessageView__countdown"]);
makeElement("div", "huntersHornMessageView__countdownButtonImage", "", countdown);
const svgMarkup = `<svg class="huntersHornMessageView__countdownSVG">
<circle r="46%" cx="50%" cy="50%" class="huntersHornMessageView__countdownCircleTrack"></circle>
<circle r="46%" cx="50%" cy="50%" class="huntersHornMessageView__countdownCircle" style="animation-duration: ${settings.dismiss}ms;"></circle>
</svg>`;
countdown.innerHTML += svgMarkup;
countdown.addEventListener("click", () => {
countdown.classList.add("huntersHornMessageView__countdown--complete");
messageWrapper.innerHTML = "";
backdrop.classList.remove("huntersHornView__backdrop--active");
gameInfo.classList.remove("blur");
});
message.append(countdown);
}
messageWrapper.append(message);
const existingMessages = huntersHornView.querySelector(".huntersHornView__message");
if (existingMessages) {
existingMessages.remove();
}
huntersHornView.append(messageWrapper);
if (settings.dismiss) {
setTimeout(() => {
const countdown = messageWrapper.querySelector(".huntersHornMessageView__countdown");
if (countdown) {
countdown.classList.add("huntersHornMessageView__countdown--complete");
}
messageWrapper.innerHTML = "";
backdrop.classList.remove("huntersHornView__backdrop--active");
gameInfo.classList.remove("blur");
}, settings.dismiss);
}
};
}
});
// src/utils/events.js
var requestCallbacks, onRequestHolder, onRequest, runCallbacks, overlayMutationObserver, overlayCallbacks, onOverlayChange, getDialogMapping, onDialogShow, onDialogHide, pageChangeCallbacks, pageChangeObserver, onPageChange, onEvent, onTravel, onTravelCallback, onNavigation, onTurn;
var init_events = __esm({
"src/utils/events.js"() {
init_sentry_release_injection_stub();
init_page();
init_location();
init_horn();
requestCallbacks = {};
onRequestHolder = null;
onRequest = (callback, url = null, skipSuccess = false) => {
if (!url) {
url = "*";
}
if (!requestCallbacks[url]) {
requestCallbacks[url] = [];
}
requestCallbacks[url].push({
callback,
skipSuccess
});
if (onRequestHolder) {
return;
}
const req = XMLHttpRequest.prototype.open;
XMLHttpRequest.prototype.open = function() {
this.addEventListener("load", function() {
if (this.responseText) {
let response = {};
try {
response = JSON.parse(this.responseText);
} catch (e) {
return;
}
Object.keys(requestCallbacks).forEach((key) => {
if (key === "*" || this.responseURL.includes(key)) {
requestCallbacks[key].forEach((item) => {
if (item.skipSuccess || response.success) {
item.callback(response);
}
});
}
});
}
});
Reflect.apply(req, this, arguments);
};
onRequestHolder = true;
};
runCallbacks = (settings, parentNode, callbacks) => {
Object.keys(settings).forEach((key) => {
if (parentNode && parentNode.classList && parentNode.classList.contains(settings[key].selector)) {
settings[key].isVisible = true;
if (callbacks[key] && callbacks[key].show) {
callbacks[key].show();
}
} else if (settings[key].isVisible) {
settings[key].isVisible = false;
if (callbacks[key] && callbacks[key].hide) {
callbacks[key].hide();
}
}
});
return settings;
};
overlayMutationObserver = null;
overlayCallbacks = [];
onOverlayChange = (callbacks) => {
let overlayData = {
map: {
isVisible: false,
selector: "treasureMapPopup"
},
item: {
isVisible: false,
selector: "itemViewPopup"
},
mouse: {
isVisible: false,
selector: "mouseViewPopup"
},
image: {
isVisible: false,
selector: "largerImage"
},
convertible: {
isVisible: false,
selector: "convertibleOpenViewPopup"
},
adventureBook: {
isVisible: false,
selector: "adventureBookPopup"
},
marketplace: {
isVisible: false,
selector: "marketplaceViewPopup"
},
gifts: {
isVisible: false,
selector: "giftSelectorViewPopup"
},
support: {
isVisible: false,
selector: "supportPageContactUsForm"
},
premiumShop: {
isVisible: false,
selector: "MHCheckout"
}
};
overlayCallbacks.push(callbacks);
if (overlayMutationObserver) {
return;
}
overlayMutationObserver = true;
const observer = new MutationObserver(() => {
overlayCallbacks.forEach((callback) => {
if (callback.change) {
callback.change();
}
const overlayType = document.querySelector("#overlayPopup");
if (overlayType && overlayType.classList.length <= 0) {
return;
}
const overlayBg = document.querySelector("#overlayBg");
if (overlayBg && overlayBg.classList.length > 0) {
if (callback.show) {
callback.show();
}
} else if (callback.hide) {
callback.hide();
}
overlayData = runCallbacks(overlayData, overlayType, callback);
});
});
const observeTarget = document.querySelector("#overlayPopup");
if (observeTarget) {
observer.observe(observeTarget, {
attributes: true,
attributeFilter: ["class"]
});
}
};
getDialogMapping = () => {
return {
treasureMapPopup: "map",
itemViewPopup: "item",
mouseViewPopup: "mouse",
largerImage: "image",
convertibleOpenViewPopup: "convertible",
adventureBookPopup: "adventureBook",
marketplaceViewPopup: "marketplace",
giftSelectorViewPopup: "gifts",
supportPageContactUsForm: "support",
MHCheckout: "premiumShop"
};
};
onDialogShow = (callback, overlay = null, once = false) => {
const identifier = callback.toString().replaceAll(/[^\w-]/gi, "");
eventRegistry.addEventListener("js_dialog_show", () => {
if (!activejsDialog) {
return;
}
const tokens = activejsDialog.getAllTokens();
if (!tokens || !tokens["{*content*}"] || !tokens["{*content*}"].value || tokens["{*content*}"].value === "" || tokens["{*content*}"].value.includes('data-item-type=""') || // Item view.
tokens["{*content*}"].value.includes('data-mouse-id=""')) {
return;
}
const atts = activejsDialog.getAttributes();
let dialogType = atts.className.replace("jsDialogFixed", "").replace("wide", "").replace("default", "").replaceAll(" ", " ").replaceAll(" ", ".").trim();
if (dialogType.endsWith(".")) {
dialogType = dialogType.slice(0, -1);
}
if (!overlay && "function" === typeof callback) {
return callback();
}
const dialogMapping = getDialogMapping();
if ("function" === typeof callback && (overlay === dialogType || overlay === dialogMapping[dialogType])) {
return callback();
}
}, null, once, 0, identifier);
};
onDialogHide = (callback, overlay = null, once = false) => {
eventRegistry.addEventListener("js_dialog_hide", () => {
var _a, _b;
const dialogType = ((_b = (_a = window == null ? void 0 : window.mhutils) == null ? void 0 : _a.lastDialog) == null ? void 0 : _b.overlay) || null;
window.mhutils = window.mhutils ? __spreadProps(__spreadValues({}, window.mhutils), { lastDialog: null }) : null;
if (!overlay) {
return callback();
}
const dialogMapping = getDialogMapping();
if (overlay === dialogType || overlay === dialogMapping[dialogType]) {
return callback();
}
}, null, once);
};
pageChangeCallbacks = [];
pageChangeObserver = null;
onPageChange = (callbacks) => {
let tabData = {
blueprint: { isVisible: null, selector: "showBlueprint" },
tem: { isVisible: false, selector: "showTrapEffectiveness" },
trap: { isVisible: false, selector: "editTrap" },
camp: { isVisible: false, selector: "PageCamp" },
travel: { isVisible: false, selector: "PageTravel" },
inventory: { isVisible: false, selector: "PageInventory" },
shop: { isVisible: false, selector: "PageShops" },
mice: { isVisible: false, selector: "PageAdversaries" },
friends: { isVisible: false, selector: "PageFriends" },
sendSupplies: { isVisible: false, selector: "PageSupplyTransfer" },
team: { isVisible: false, selector: "PageTeam" },
tournament: { isVisible: false, selector: "PageTournament" },
news: { isVisible: false, selector: "PageNews" },
scoreboards: { isVisible: false, selector: "PageScoreboards" },
discord: { isVisible: false, selector: "PageJoinDiscord" },
preferences: { isVisible: false, selector: "PagePreferences" },
profile: { isVisible: false, selector: "HunterProfile" }
};
pageChangeCallbacks.push(callbacks);
if (pageChangeObserver) {
return;
}
pageChangeObserver = true;
const observer = new MutationObserver(() => {
pageChangeCallbacks.forEach((callback) => {
if (callback.change) {
callback.change();
}
const mhContainer = document.querySelector("#mousehuntContainer");
if (mhContainer && mhContainer.classList.length > 0) {
tabData = runCallbacks(tabData, mhContainer, callback);
}
});
});
const observeTarget = document.querySelector("#mousehuntContainer");
if (observeTarget) {
observer.observe(observeTarget, {
attributes: true,
attributeFilter: ["class"]
});
}
};
onEvent = (event, callback, remove = false) => {
eventRegistry.addEventListener(event, callback, null, remove);
};
onTravel = (location, options) => {
eventRegistry.addEventListener("travel_complete", () => onTravelCallback(location, options));
};
onTravelCallback = (location, options) => {
if (location && location !== getCurrentLocation()) {
return;
}
if (options == null ? void 0 : options.shouldAddReminder) {
showHornMessage({
title: options.title || "",
text: options.text || "",
button: options.button || "Dismiss",
action: options.action || null
});
}
if (options.callback) {
options.callback();
}
};
onNavigation = (callback, options = {}) => {
const defaults = {
page: false,
tab: false,
subtab: false,
onLoad: true
};
const { page, tab, subtab, onLoad: onLoad2 } = Object.assign(defaults, options);
const bypassMatch = !page;
if (onLoad2 && (bypassMatch || isCurrentPage(page, tab, subtab))) {
callback();
}
eventRegistry.addEventListener("set_page", (e) => {
var _a;
const tabs = ((_a = e == null ? void 0 : e.data) == null ? void 0 : _a.tabs) || {};
const currentTab = Object.keys(tabs).find((key) => tabs[key].is_active_tab);
const forceCurrentTab = currentTab == null ? void 0 : currentTab.type;
if (bypassMatch) {
callback();
return;
}
if (!subtab) {
if (isCurrentPage(page, tab, false, getCurrentPage(), forceCurrentTab)) {
callback();
}
return;
}
if ((currentTab == null ? void 0 : currentTab.subtabs) && (currentTab == null ? void 0 : currentTab.subtabs.length) > 0) {
const forceSubtab = currentTab.subtabs.find((searchTab) => searchTab.is_active_subtab).subtab_type;
if (isCurrentPage(page, tab, subtab, getCurrentPage(), forceCurrentTab, forceSubtab)) {
callback();
}
}
});
eventRegistry.addEventListener("set_tab", (e) => {
const forceCurrentTab = e.page_arguments.tab;
const forceCurrentSubtab = e.page_arguments.sub_tab;
if (bypassMatch) {
callback();
return;
}
if (isCurrentPage(page, tab, subtab, getCurrentPage(), forceCurrentTab, forceCurrentSubtab)) {
callback();
}
});
};
onTurn = (callback) => {
onRequest(callback, "managers/ajax/turns/activeturn.php", true);
};
}
});
// src/utils/global.js
var addToGlobal, getGlobal;
var init_global = __esm({
"src/utils/global.js"() {
init_sentry_release_injection_stub();
addToGlobal = (key, value) => {
if (!window.mhui) {
window.mhui = {};
}
window.mhui[key] = value;
app.mhui = mhui;
};
getGlobal = (key) => {
if (window.mhui) {
return window.mhui[key] || false;
}
if (app.mhui) {
return app.mhui[key] || false;
}
return false;
};
}
});
// src/utils/styles/game-info-bar.css
var game_info_bar_default;
var init_game_info_bar = __esm({
"src/utils/styles/game-info-bar.css"() {
game_info_bar_default = ".mousehuntHud-gameInfo .mousehuntHud-menu{position:relative;top:unset;left:unset;display:inline;width:unset;height:unset;padding-top:unset;padding-left:unset;background:unset}\n";
}
});
// src/utils/links.js
var addItemToGameInfoBar, getCleanSubmenuLabel, addSubmenuItem, removeSubmenuItem, addSubmenuDivider;
var init_links = __esm({
"src/utils/links.js"() {
init_sentry_release_injection_stub();
init_styles();
init_game_info_bar();
addItemToGameInfoBar = (options) => {
const settings = Object.assign({}, {
label: "",
href: "",
class: "",
callback: null,
external: false
}, options);
const safeLabel = settings.label.replaceAll(/[^\da-z]/gi, "_").toLowerCase();
const exists = document.querySelector(`#mh-custom-topmenu-${safeLabel}`);
if (exists) {
return;
}
addStylesDirect(game_info_bar_default, "mh-improved-styles-game-info-bar", true);
const menu = document.querySelector(".mousehuntHud-gameInfo");
if (!menu) {
return;
}
const item = document.createElement("a");
item.id = `mh-custom-topmenu-${safeLabel}`;
item.classList.add("mousehuntHud-gameInfo-item");
item.classList.add("mousehuntHud-custom-menu-item");
item.href = settings.href || "#";
const name = document.createElement("div");
name.classList.add("name");
if (settings.label) {
name.innerText = settings.label;
}
item.append(name);
if (settings.class) {
item.classList.add(settings.class);
}
if (settings.href) {
item.href = settings.href;
}
if (settings.callback) {
item.addEventListener("click", settings.callback);
}
if (settings.external) {
const externalLinkIconWrapper = document.createElement("div");
externalLinkIconWrapper.classList.add("mousehuntHud-menu");
const externalLinkIcon = document.createElement("div");
externalLinkIcon.classList.add("external_icon");
externalLinkIconWrapper.append(externalLinkIcon);
item.append(externalLinkIconWrapper);
}
menu.insertBefore(item, menu.firstChild);
};
getCleanSubmenuLabel = (label) => {
return label.toLowerCase().replaceAll(/[^\da-z]/g, "-");
};
addSubmenuItem = (options) => {
const settings = Object.assign({}, {
id: null,
menu: "kingdom",
label: "",
icon: "https://www.mousehuntgame.com/images/ui/hud/menu/special.png",
href: "",
class: "",
callback: null,
external: false
}, options);
const menuTarget = document.querySelector(`.mousehuntHud-menu .${settings.menu}`);
if (!menuTarget) {
return;
}
if (!menuTarget.classList.contains("hasChildren")) {
menuTarget.classList.add("hasChildren");
}
let hasSubmenu = true;
let submenu = menuTarget.querySelector("ul");
if (!submenu) {
hasSubmenu = false;
submenu = document.createElement("ul");
}
const item = document.createElement("li");
item.classList.add("custom-submenu-item");
const label = settings.label.length > 0 ? settings.label : settings.id;
const cleanLabel = getCleanSubmenuLabel(label);
const exists = document.querySelector(`#custom-submenu-item-${cleanLabel}`);
if (exists) {
exists.remove();
}
item.id = settings.id ? `custom-submenu-item-${settings.id}` : `custom-submenu-item-${cleanLabel}`;
if (settings.class) {
const classes = settings.class.split(" ");
item.classList.add(...classes);
}
const link = document.createElement("a");
link.href = settings.href || "#";
if (settings.callback) {
link.addEventListener("click", (e) => {
e.preventDefault();
settings.callback();
});
}
const icon = document.createElement("div");
icon.classList.add("icon");
icon.style = `background-image: url(${settings.icon});`;
const name = document.createElement("div");
name.classList.add("name");
name.innerHTML = settings.label;
link.append(icon);
link.append(name);
if (settings.external) {
const externalLinkIcon = document.createElement("div");
externalLinkIcon.classList.add("external_icon");
link.append(externalLinkIcon);
link.target = "_blank";
link.rel = "noopener noreferrer";
}
item.append(link);
submenu.append(item);
if (!hasSubmenu) {
menuTarget.append(submenu);
}
};
removeSubmenuItem = (id) => {
id = getCleanSubmenuLabel(id);
const item = document.querySelector(`#custom-submenu-item-${id}`);
if (item) {
item.remove();
}
};
addSubmenuDivider = (menu, className = "") => {
addSubmenuItem({
menu,
id: `mh-improved-submenu-divider-${className}`,
label: "",
icon: "",
href: "",
class: `mh-improved-submenu-divider ${className}`
});
};
}
});
// src/utils/maps.js
var mapper, mapData, mapModel, getMapData, setMapData, getLastMaptain, setLastMaptain, cacheFinishedMap, showTravelConfirmation, addMHCTData, getCachedValue, getCacheKey2, getMouseCachedKey, setCachedValue, getArEl, getHighestArText, getArForMouse, getArText, getHighestArForMouse;
var init_maps = __esm({
"src/utils/maps.js"() {
init_sentry_release_injection_stub();
init_data();
init_location();
init_flags();
init_global();
init_elements();
mapper = (key = false) => {
if (key) {
const mapperData = getGlobal("mapper");
if (!mapperData || !mapperData[key]) {
return false;
}
return mapperData[key];
}
return getGlobal("mapper");
};
mapData = () => {
const m = mapper();
if (!m) {
return {};
}
return m.mapData;
};
mapModel = () => {
const m = mapper();
if (!m) {
return {};
}
return m.mapModel;
};
getMapData = (mapId = false, strict = false) => {
if (mapId !== false) {
const sessionMap = sessionGet(`mh-improved-map-cache-${mapId}`);
if (sessionMap) {
return sessionMap;
}
}
if (strict) {
return false;
}
const localStorageMap = sessionGet("map-cache-last-map");
if (localStorageMap) {
return localStorageMap;
}
return false;
};
setMapData = (mapId, theMapData) => {
sessionSet(`mh-improved-map-cache-${mapId}`, theMapData);
sessionSet("map-cache-last-map", theMapData);
};
getLastMaptain = () => {
return sessionGet("last-maptain");
};
setLastMaptain = (id) => {
sessionSet("last-maptain", id);
};
cacheFinishedMap = () => __async(void 0, null, function* () {
const completedMap = user.quests.QuestRelicHunter.maps.find((map) => map.is_complete);
if (!(completedMap == null ? void 0 : completedMap.map_id)) {
return;
}
const data = getMapData(completedMap.map_id);
if (!data) {
return;
}
const maptain = data.hunters.find((hunter) => hunter.captain);
setLastMaptain(maptain.user_id || "");
});
showTravelConfirmation = (environment, theMapModel) => {
if (!(environment == null ? void 0 : environment.id) || !(environment == null ? void 0 : environment.type)) {
return;
}
const environmentData = theMapModel.getEnvironmentById(environment.id);
const environmentGoals = theMapModel.getGoalsByEnvironment(environment.id);
const templateData = { environment: environmentData, goals: environmentGoals };
const noun = environmentData.num_missing_goals === 1 ? "mouse" : "mice";
const dialog = new hg.views.TreasureMapDialogView();
dialog.setTitle("Travel to " + environmentData.name + "?");
dialog.setDescription("This area has " + environmentData.num_missing_goals + " missing " + noun + ".");
dialog.setContent(hg.utils.TemplateUtil.renderFromFile("TreasureMapDialogView", "travel", templateData));
dialog.setCssClass("confirm");
dialog.setContinueAction("Travel", () => {
app.pages.TravelPage.travel(environment.type);
dialog.hide();
setTimeout(() => {
jsDialog().hide();
}, 250);
});
hg.controllers.TreasureMapController.showDialog(dialog);
};
addMHCTData = (mouse, appendTo, type = "mouse") => __async(void 0, null, function* () {
const existingMhct = appendTo.querySelector(`#mhct-${mouse.unique_id}-${type}`);
if (existingMhct) {
return;
}
const mhctjson = yield getArForMouse(mouse.unique_id, type);
const mhctDiv = makeElement("div", "mhct-data");
mhctDiv.id = `mhct-${mouse.unique_id}-${type}`;
const header = makeElement("div", "mhct-title");
makeElement("span", "mhct-title-text", "item" === type ? "Drop Rates" : "Attraction Rates", header);
const mhctLink = makeElement("a", "mhct-link", "View on MHCT \u2192");
mhctLink.target = "_mhct";
if (!mouse.name) {
const nameEl = document.querySelector(".treasureMapView-highlight-name");
mouse.name = nameEl ? nameEl.innerText : mouse.unique_id;
}
mhctLink.href = "item" === type ? `https://www.mhct.win/loot.php?item=${mouse.unique_id}` : `https://www.mhct.win/attractions.php?mouse_name=${mouse.name}`;
header.append(mhctLink);
mhctDiv.append(header);
if (!mhctjson.slice) {
return;
}
const environments5 = yield getData("environments");
const amountOfLocationsToShow = 5;
mhctjson.slice(0, amountOfLocationsToShow).forEach((mhct) => {
const mhctRow = makeElement("div", "mhct-row");
const location = makeElement("div", "mhct-location");
makeElement("span", "mhct-location-text", mhct.location, location);
if (mhct.stage) {
makeElement("span", "mhct-stage", mhct.stage, location);
}
const environment = environments5.find((env) => {
return env.name === mhct.location;
});
if (!environment) {
mhctRow.classList.add("mhct-row-no-env");
}
mhctRow.append(location);
makeElement("div", "mhct-bait", mhct.cheese, mhctRow);
const mhctRate = Number.parseInt("item" === type ? mhct.drop_pct : mhct.rate / 100, 10).toFixed(1);
makeElement("div", "mhct-rate", `${mhctRate}%`, mhctRow);
mhctRow.addEventListener("click", () => {
if (environment.id === getCurrentLocation()) {
app.pages.CampPage.toggleItemBrowser("bait");
jsDialog().hide();
return;
}
const travelEnvironment = mapper("mapData").environments.find((env) => {
return env.type === environment.id;
});
showTravelConfirmation(travelEnvironment, mapModel());
});
mhctDiv.append(mhctRow);
});
if (0 === mhctjson.length) {
const mhctRow = makeElement("div", "mhct-row");
makeElement("div", "mhct-no-data", "No data available", mhctRow);
mhctDiv.append(mhctRow);
}
appendTo.append(mhctDiv);
});
getCachedValue = (key) => {
if (getFlag("no-cache")) {
return false;
}
const isInSession = sessionGet(key);
if (isInSession !== null) {
return JSON.parse(isInSession);
}
const localStorageContainer = localStorage.getItem(getCacheKey2());
if (!localStorageContainer) {
return false;
}
const container = JSON.parse(localStorageContainer);
if (!container[key]) {
return false;
}
return container[key];
};
getCacheKey2 = () => {
return `mh-improved-cached-ar-v${mhImprovedVersion}`;
};
getMouseCachedKey = () => {
return `mhct-ar-value-v${mhImprovedVersion}`;
};
setCachedValue = (key, value, saveToSession = false) => {
if (saveToSession) {
sessionSet(key, JSON.stringify(value));
return;
}
const localStorageContainer = localStorage.getItem(getCacheKey2());
let container = {};
if (localStorageContainer) {
container = JSON.parse(localStorageContainer);
}
container[key] = value;
localStorage.setItem(getCacheKey2(), JSON.stringify(container));
};
getArEl = (id, type = "mouse") => __async(void 0, null, function* () {
let ar = yield getArText(id, type);
let arType = "location";
if (!ar) {
ar = yield getHighestArText(id, type);
if (!ar || ar.length === 0) {
return makeElement("div", ["mh-ui-ar", "mh-ui-no-ar"], "?");
}
arType = "highest";
}
let arDifficulty = "easy";
if (ar >= 99) {
arDifficulty = "guaranteed";
} else if (ar >= 78) {
arDifficulty = "super-easy";
} else if (ar >= 48) {
arDifficulty = "easy";
} else if (ar >= 38) {
arDifficulty = "medium";
} else if (ar >= 18) {
arDifficulty = "hard";
} else if (ar >= 8) {
arDifficulty = "super-hard";
} else if (ar >= 3) {
arDifficulty = "extreme";
} else {
arDifficulty = "impossible";
}
if (ar.toString().slice(-3) === ".00") {
ar = ar.toString().slice(0, -3);
}
return makeElement("div", ["mh-ui-ar", `mh-ui-ar-${arType}`, `mh-ui-ar-${arDifficulty}`], `${ar}%`);
});
getHighestArText = (id, type = "mouse") => __async(void 0, null, function* () {
const highest = yield getHighestArForMouse(id, type);
return highest != null ? highest : false;
});
getArForMouse = (id, type = "mouse") => __async(void 0, null, function* () {
let mhctjson = [];
const cachedAr = getCachedValue(`${getMouseCachedKey()}-${id}-${type}`);
if (cachedAr) {
return cachedAr;
}
const isItem = "item" === type;
const mhctPath = isItem ? "mhct-item" : "mhct";
let mhctdata = [];
const data = mapData() || {};
const mapType = (data == null ? void 0 : data.map_type) || "";
let url = `https://api.mouse.rip/${mhctPath}/${id}`;
if (mapType.toLowerCase().includes("halloween")) {
url = `https://api.mouse.rip/${mhctPath}/${id}-hlw_22`;
}
mhctdata = yield fetch(url, { headers: getHeaders() });
if (!mhctdata.ok) {
return [];
}
mhctjson = yield mhctdata.json();
if (!mhctjson || mhctjson.length === 0) {
setCachedValue(`${getMouseCachedKey()}-${id}-${type}`, [], true);
return [];
}
if (isItem) {
mhctjson.forEach((rate) => {
rate.rate = Number.parseInt(rate.drop_pct * 100);
delete rate.drop_ct;
});
}
setCachedValue(`${getMouseCachedKey()}-${id}-${type}`, mhctjson);
return mhctjson;
});
getArText = (id, type = "mouse") => __async(void 0, null, function* () {
const rates = yield getArForMouse(id, type);
if (!rates || rates.length === 0) {
return false;
}
const rate = rates[0];
if (!rate) {
return false;
}
return (rate.rate / 100).toFixed(2);
});
getHighestArForMouse = (id, type = "mouse") => __async(void 0, null, function* () {
const rates = yield getArForMouse(id, type);
if (!rates || rates.length === 0) {
return 0;
}
if (Object.keys(rates).length === 0 && rates.constructor === Object) {
return 0;
}
if (!rates.sort) {
return 0;
}
rates.sort((a, b) => b.rate - a.rate);
const rate = rates[0];
if (!rate) {
return 0;
}
return rate.rate / 100;
});
}
});
// src/modules/global-styles/errors.css
var errors_default;
var init_errors = __esm({
"src/modules/global-styles/errors.css"() {
errors_default = '.mousehunt-improved-error{position:fixed;right:25%;bottom:50px;left:25%;z-index:20;display:flex;flex-direction:column;align-items:stretch;padding:10px 20px;background-color:#febebe;border:1px solid #4e2727;border-radius:6px;box-shadow:0 0 10px 1px #bc7b7b}.mousehunt-improved-error h1{margin:0 0 .75em;font-size:1.3em;font-weight:900;color:#9f2323}.mousehunt-improved-error p{margin:.5em 0;font-size:1em;line-height:1.5}.mousehunt-improved-error pre{margin:0 .5em;color:#8b0101}.mousehunt-improved-error pre:before{content:"> "}\n';
}
});
// src/utils/messages.js
var showErrorMessage, showSuccessMessage, showLoadingError;
var init_messages = __esm({
"src/utils/messages.js"() {
init_sentry_release_injection_stub();
init_debug();
init_elements();
init_errors();
showErrorMessage = (message, appendTo, classes = "", type = "error") => {
if (!appendTo) {
appendTo = document.querySelector(".treasureMapRootView-subTabRow.treasureMapRootView-padding");
}
const typeClass = `mh-ui-${type}-message`;
const existing = document.querySelector(`.${typeClass}`);
if (existing) {
existing.remove();
}
const error = makeElement("div", [`mh-ui-${type}-message`, "mh-ui-fade", classes], message);
appendTo.append(error);
setTimeout(() => {
error.classList.add("mh-ui-fade-in");
}, 10);
setTimeout(() => {
error.classList.remove("mh-ui-fade-in");
error.classList.add("mh-ui-fade-out");
}, 2e3);
setTimeout(() => {
error.remove();
}, 2500);
};
showSuccessMessage = (message, appendTo, classes = "") => {
showErrorMessage(message, appendTo, classes, "success");
};
showLoadingError = (e) => {
debug("Error loading MouseHunt Improved:", e);
const errorElement = document.createElement("div");
errorElement.classList.add("mousehunt-improved-error");
errorElement.innerHTML = "<h1>Error loading MouseHunt Improved</h1>";
if (e.message) {
errorElement.innerHTML += `<pre>${e.message}</pre>`;
}
errorElement.innerHTML += '<p>There was an error loading MouseHunt Improved. Try refreshing the page. If the error persists, please add an issue to the <a href="https://github.com/MHCommunity/mousehunt-improved">GitHub repo</a>.</p>';
document.body.append(errorElement);
const errorStyles = document.createElement("style");
errorStyles.innerHTML = errors_default;
document.head.append(errorStyles);
};
}
});
// src/utils/styles/settings.css
var settings_default;
var init_settings2 = __esm({
"src/utils/styles/settings.css"() {
settings_default = ".PagePreferences .mousehuntHud-page-tabContent.game_settings.userscript-settings .settingRow .settingRow-action-inputContainer.select.busy:before,.PagePreferences .mousehuntHud-page-tabContent.game_settings.userscript-settings .settingRow .settingRow-action-inputContainer.select.completed:before,.PagePreferences .mousehuntHud-page-tabContent.game_settings.better-mh-settings .settingRow .settingRow-action-inputContainer.select.busy:before,.PagePreferences .mousehuntHud-page-tabContent.game_settings.better-mh-settings .settingRow .settingRow-action-inputContainer.select.completed:before{top:30px;right:-25px;left:unset}.PagePreferences .mousehuntHud-page-tabContent.game_settings .settingRow .name{height:unset;min-height:20px}.PagePreferences__settingAction.inputDropdownWrapper.busy:before,.PagePreferences__settingAction.inputDropdownWrapper.completed:before{right:-25px;left:unset}.inputBoxContainer.multiSelect{max-width:400px}.settingRow-action-inputContainer.textarea{display:flex;gap:5px;align-items:flex-end}.PagePreferences__setting.textarea{display:grid;grid-template-columns:350px 1fr}.textarea .inputBox{width:100%;min-height:45px}.textarea .PagePreferences__settingAction{margin-bottom:0}.mh-utils-settings-subheader{padding-top:10px;padding-bottom:10px;font-size:10px;color:#848484}.settingRow-action-inputContainer.inputText{display:flex;gap:5px;align-items:stretch}.mh-utils-settings-refresh-message{position:fixed;right:0;bottom:0;left:0;z-index:5;padding:1em;font-size:1.5em;text-align:center;pointer-events:none;background-color:#d6f2d6;border-top:1px solid #6cc36c;opacity:1;transition:opacity .5s ease-in-out}.mh-utils-settings-refresh-message-hidden{opacity:0}\n";
}
});
// src/utils/settings-markup.js
var hasAddedSettingsStyles, addSettingStyles, saveSettingDirectAndToggleClass, addSettingsTab, addSettingsTabOnce, addSetting, makeToggle, addSettingOnce, fadeInTimeout, fadeOutTimeout, removeTimeout, addSettingRefreshReminder, addMhuiSetting, addAdvancedSettings, addSettingForModule;
var init_settings_markup = __esm({
"src/utils/settings-markup.js"() {
init_sentry_release_injection_stub();
init_page();
init_settings();
init_styles();
init_elements();
init_events();
init_settings2();
hasAddedSettingsStyles = false;
addSettingStyles = () => {
if (hasAddedSettingsStyles) {
return;
}
hasAddedSettingsStyles = true;
addStylesDirect(settings_default, "mh-improved-styles-settings");
};
saveSettingDirectAndToggleClass = (node, key, value, identifier = "mh-utils-settings") => {
node.parentNode.parentNode.classList.add("busy");
node.classList.toggle("active");
saveSettingDirect(key, value, identifier);
node.parentNode.parentNode.classList.remove("busy");
node.parentNode.parentNode.classList.add("completed");
setTimeout(() => {
node.parentNode.parentNode.classList.remove("completed");
}, 1e3);
addSettingRefreshReminder();
};
addSettingsTab = (identifier = "userscript-settings", name = "Userscript Settings") => {
addSettingStyles();
addSettingsTabOnce(identifier, name);
onPageChange({ preferences: { show: () => addSettingsTabOnce(identifier, name) } });
return identifier;
};
addSettingsTabOnce = (identifier = "userscript-settings", name = "Userscript Settings") => {
if ("preferences" !== getCurrentPage()) {
return;
}
const existingSettings = document.querySelector(`#${identifier}`);
if (existingSettings) {
return;
}
const tabsContainer = document.querySelector(".mousehuntHud-page-tabHeader-container");
if (!tabsContainer) {
return;
}
const tabsContentContainer = document.querySelector(".mousehuntHud-page-tabContentContainer");
if (!tabsContentContainer) {
return;
}
identifier = identifier.replaceAll(/[^\w-]/gi, "");
const settingsTab = document.createElement("a");
settingsTab.id = identifier;
settingsTab.href = "#";
settingsTab.classList.add("mousehuntHud-page-tabHeader", identifier);
settingsTab.setAttribute("data-tab", identifier);
settingsTab.setAttribute("onclick", "hg.utils.PageUtil.onclickPageTabHandler(this); return false;");
const settingsTabText = document.createElement("span");
settingsTabText.innerText = name;
settingsTab.append(settingsTabText);
tabsContainer.append(settingsTab);
const settingsTabContent = document.createElement("div");
settingsTabContent.classList.add("mousehuntHud-page-tabContent", "game_settings", identifier);
settingsTabContent.setAttribute("data-tab", identifier);
tabsContentContainer.append(settingsTabContent);
if (identifier === getCurrentTab()) {
const tab = document.querySelector(`#${identifier}`);
if (tab) {
tab.click();
}
}
};
addSetting = (name, key, defaultValue = true, description = "", section = {}, tab = "userscript-settings", settings = null) => {
onPageChange({ preferences: { show: () => addSettingOnce(name, key, defaultValue, description, section, tab, settings) } });
addSettingOnce(name, key, defaultValue, description, section, tab, settings);
};
makeToggle = (toggleKey, toggleDefaultValue, toggleTab) => {
const settingRowInputCheckbox = makeElement("div", "mousehuntSettingSlider");
const currentSetting = getSettingDirect(toggleKey, null, toggleTab);
let isActive = false;
if (currentSetting) {
settingRowInputCheckbox.classList.add("active");
isActive = true;
} else if (null === currentSetting && toggleDefaultValue) {
settingRowInputCheckbox.classList.add("active");
isActive = true;
}
settingRowInputCheckbox.onclick = (event) => {
saveSettingDirectAndToggleClass(event.target, toggleKey, !isActive, toggleTab);
};
return settingRowInputCheckbox;
};
addSettingOnce = (name, key, defaultValue = true, description = "", section = {}, tab = "userscript-settings", settingSettings = null) => {
addSettingStyles();
const container = document.querySelector(`.mousehuntHud-page-tabContent.${tab}`);
if (!container) {
return;
}
section = {
id: section.id || "settings",
name: section.name || "Userscript Settings",
description: section.description || "",
subSetting: section.subSetting || false
};
let tabId = "mh-utils-settings";
if (tab !== "userscript-settings") {
tabId = tab;
}
section.id = `${tabId}-${section.id.replaceAll(/[^\w-]/gi, "")}`;
let sectionExists = document.querySelector(`#${section.id}`);
if (!sectionExists) {
const title = document.createElement("div");
title.id = section.id;
title.classList.add("PagePreferences__title");
const titleText = document.createElement("h3");
titleText.classList.add("PagePreferences__titleText");
titleText.textContent = section.name;
title.append(titleText);
const seperator = document.createElement("div");
seperator.classList.add("PagePreferences__separator");
title.append(seperator);
container.append(title);
sectionExists = document.querySelector(`#${section.id}`);
if (section.description) {
const settingSubHeader = makeElement("h4", ["settings-subheader", "mh-utils-settings-subheader"], section.description);
seperator.before(settingSubHeader);
}
}
const settingExists = document.querySelector(`#${section.id}-${key}`);
if (settingExists) {
return;
}
const settings = makeElement("div", ["PagePreferences__settingsList", `PagePreferences__settingsList-${key}`, `PagePreferences__settingsList-${section.id}`]);
settings.id = `${section.id}-${key}`;
if (section.subSetting) {
settings.classList.add("PagePreferences__subSetting");
}
const settingRow = makeElement("div", "PagePreferences__setting");
const settingRowLabel = makeElement("div", "PagePreferences__settingLabel");
const settingName = makeElement("div", "PagePreferences__settingName", name);
const defaultSettingText = makeElement("div", "PagePreferences__settingDefault");
if (settingSettings && (settingSettings.type === "select" || settingSettings.type === "multi-select")) {
defaultSettingText.textContent = defaultValue.map((item) => item.name).join(", ");
} else {
defaultSettingText.textContent = defaultValue ? "Enabled" : "Disabled";
}
defaultSettingText.textContent = `Default setting: ${defaultSettingText.textContent}`;
const settingDescription = makeElement("div", "PagePreferences__settingDescription");
settingDescription.innerHTML = description;
settingRowLabel.append(settingName);
settingRowLabel.append(defaultSettingText);
settingRowLabel.append(settingDescription);
const settingRowAction = makeElement("div", "PagePreferences__settingAction");
const settingRowInput = makeElement("div", "settingRow-action-inputContainer");
if (settingSettings && (settingSettings.type === "select" || settingSettings.type === "multi-select")) {
const settingRowInputDropdown = document.createElement("div");
settingRowInputDropdown.classList.add("inputBoxContainer");
if (settingSettings.type === "multi-select") {
settingRowInputDropdown.classList.add("multiSelect");
settingRowInput.classList.add("multiSelect", "select");
}
let amount = 1;
if (settingSettings.type === "multi-select" && settingSettings.number) {
amount = settingSettings.number;
}
const makeOption = (option, foundSelected, currentSetting, dValue, i) => {
const settingRowInputDropdownSelectOption = document.createElement("option");
settingRowInputDropdownSelectOption.value = option.value;
settingRowInputDropdownSelectOption.textContent = option.name;
settingRowInputDropdownSelectOption.disabled = option.disabled || false;
if (currentSetting && currentSetting === option.value) {
settingRowInputDropdownSelectOption.selected = true;
foundSelected = true;
} else if (!foundSelected && dValue && dValue[i] && dValue[i].value === option.value) {
settingRowInputDropdownSelectOption.selected = true;
foundSelected = true;
}
return {
settingRowInputDropdownSelectOption,
foundSelected
};
};
for (let i = 0; i < amount; i++) {
const settingRowInputDropdownSelect = document.createElement("select");
settingRowInputDropdownSelect.classList.add("inputBox");
if (settingSettings.type === "multi-select") {
settingRowInputDropdownSelect.classList.add("multiSelect");
}
const currentSetting = getSettingDirect(`${key}-${i}`, null, tab);
let foundSelected = false;
settingSettings.options.forEach((option) => {
if (option.value === "group") {
const settingRowInputDropdownSelectOptgroup = document.createElement("optgroup");
settingRowInputDropdownSelectOptgroup.label = option.name;
option.options.forEach((optgroupOption) => {
const result = makeOption(optgroupOption, foundSelected, currentSetting, defaultValue, i);
foundSelected = result.foundSelected;
settingRowInputDropdownSelectOptgroup.append(result.settingRowInputDropdownSelectOption);
});
settingRowInputDropdownSelect.append(settingRowInputDropdownSelectOptgroup);
} else {
const result = makeOption(option, foundSelected, currentSetting, defaultValue, i);
foundSelected = result.foundSelected;
settingRowInputDropdownSelect.append(result.settingRowInputDropdownSelectOption);
}
});
settingRowInputDropdown.append(settingRowInputDropdownSelect);
let timeout = null;
settingRowInputDropdownSelect.onchange = (event) => {
const parent = settingRowInputDropdownSelect.parentNode.parentNode.parentNode;
parent.classList.add("inputDropdownWrapper");
parent.classList.add("busy");
saveSettingDirect(`${key}-${i}`, event.target.value, tab);
parent.classList.remove("busy");
parent.classList.add("completed");
clearTimeout(timeout);
timeout = setTimeout(() => {
parent.classList.remove("completed");
}, 1e3);
};
settingRowInput.append(settingRowInputDropdown);
settingRowAction.append(settingRowInput);
}
} else if (settingSettings && settingSettings.type === "input") {
const settingRowInputText = makeElement("input", "inputBox");
settingRowInputText.value = getSettingDirect(key, defaultValue, tab);
const inputSaveButton = makeElement("button", ["mousehuntActionButton", "tiny", "inputSaveButton"]);
makeElement("span", "", "Save", inputSaveButton);
let timeout = null;
inputSaveButton.addEventListener("click", (event) => {
const parent = event.target.parentNode.parentNode.parentNode;
parent.classList.add("inputDropdownWrapper");
parent.classList.add("inputTextWrapper");
parent.classList.add("busy");
parent.classList.remove("completed");
saveSettingDirect(key, settingRowInputText.value, tab);
parent.classList.remove("busy");
parent.classList.add("completed");
clearTimeout(timeout);
timeout = setTimeout(() => {
parent.classList.remove("completed");
}, 1e3);
addSettingRefreshReminder();
});
settingRowInput.classList.add("inputText");
settingRowInput.append(settingRowInputText);
settingRowInput.append(inputSaveButton);
settingRowAction.append(settingRowInput);
} else if (settingSettings && settingSettings.type === "textarea") {
settingRow.classList.add("textarea");
const settingRowInputText = makeElement("textarea", "inputBox");
settingRowInputText.value = getSettingDirect(key, defaultValue, tab);
const inputSaveButton = makeElement("button", ["mousehuntActionButton", "tiny", "inputSaveButton"]);
makeElement("span", "", "Save", inputSaveButton);
let timeout = null;
inputSaveButton.addEventListener("click", (event) => {
const parent = event.target.parentNode.parentNode.parentNode;
parent.classList.add("inputDropdownWrapper");
parent.classList.add("textareaWrapper");
parent.classList.add("busy");
saveSettingDirect(key, settingRowInputText.value, tab);
parent.classList.remove("busy");
parent.classList.add("completed");
clearTimeout(timeout);
timeout = setTimeout(() => {
parent.classList.remove("completed");
}, 1e3);
addSettingRefreshReminder();
});
settingRowInput.classList.add("textarea");
settingRowInput.append(settingRowInputText);
settingRowInput.append(inputSaveButton);
settingRowAction.append(settingRowInput);
} else if (settingSettings && settingSettings.type === "multi-toggle") {
settingRowAction.classList.add("multi-toggle");
const multiToggleRow = makeElement("div", ["PagePreferences__settingsList", "multi-toggle-row"]);
settingSettings.options.forEach((option) => {
const optionSettingRow = makeElement("div", "PagePreferences__settingsList");
const optionSettingRowLabel = makeElement("div", "PagePreferences__settingLabel");
makeElement("div", "PagePreferences__settingName", option.name, optionSettingRowLabel);
optionSettingRow.append(optionSettingRowLabel);
const optionSettingRowAction = makeElement("div", "PagePreferences__settingAction");
const optionSettingRowInput = makeElement("div", "settingRow-action-inputContainer");
const settingRowInputCheckbox = makeToggle(`${key}-${option.id}`, option.value, tab);
optionSettingRowInput.append(settingRowInputCheckbox);
optionSettingRowAction.append(optionSettingRowInput);
optionSettingRow.append(optionSettingRowAction);
multiToggleRow.append(optionSettingRow);
});
settingRowAction.append(multiToggleRow);
} else {
const settingRowInputCheckbox = makeToggle(key, defaultValue, tab);
settingRowInput.append(settingRowInputCheckbox);
settingRowAction.append(settingRowInput);
}
settingRow.append(settingRowLabel);
settingRow.append(settingRowAction);
settings.append(settingRow);
sectionExists.append(settings);
};
fadeInTimeout = null;
fadeOutTimeout = null;
removeTimeout = null;
addSettingRefreshReminder = () => {
addSettingStyles();
let refreshMessage = document.querySelector("#mh-utils-settings-refresh-message");
if (!refreshMessage) {
const newMessageEl = makeElement("div", ["mh-utils-settings-refresh-message", "mh-ui-fade"], "Refresh the page to apply your changes.");
newMessageEl.id = "mh-utils-settings-refresh-message";
const body = document.querySelector("body");
body.append(newMessageEl);
refreshMessage = document.querySelector("#mh-utils-settings-refresh-message");
}
clearTimeout(fadeInTimeout);
clearTimeout(fadeOutTimeout);
clearTimeout(removeTimeout);
fadeInTimeout = setTimeout(() => {
refreshMessage.classList.add("mh-ui-fade-in");
}, 250);
fadeOutTimeout = setTimeout(() => {
refreshMessage.classList.remove("mh-ui-fade-in");
refreshMessage.classList.add("mh-ui-fade-out");
}, 3e3);
removeTimeout = setTimeout(() => {
refreshMessage.remove();
}, 5e3);
};
addMhuiSetting = (id, title, defaultVal, description, module, options = null) => __async(void 0, null, function* () {
var _a;
addSetting(
title,
id,
defaultVal,
description,
{
id: module.id,
name: module.name,
description: module.description,
subSetting: (_a = module.subSetting) != null ? _a : false
},
"mousehunt-improved-settings",
options
);
});
addAdvancedSettings = () => {
const advancedTab = {
id: "mousehunt-improved-settings-overrides",
name: "Advanced",
default: true,
description: ""
};
addSetting(
"Custom Styles",
"override-styles",
"",
'<a href="https://github.com/MHCommunity/mousehunt-improved/wiki/Custom-CSS" target="_blank">Custom CSS</a> to apply to MouseHunt.',
advancedTab,
"mousehunt-improved-settings",
{ type: "textarea" }
);
addSetting(
"Feature Flags",
"override-flags",
"",
'Comma seperated list of <a href="https://github.com/MHCommunity/mousehunt-improved/wiki/List-of-Feature-Flags" target="_blank">feature flags</a> to enable.',
advancedTab,
"mousehunt-improved-settings",
{ type: "input" }
);
addSetting(
"Error Reporting",
"error-reporting",
true,
"Send anonymous error reports to the developers.",
advancedTab,
"mousehunt-improved-settings"
);
};
addSettingForModule = (module) => __async(void 0, null, function* () {
for (const submodule of module.modules) {
if (!submodule.alwaysLoad && !submodule.beta) {
yield addSetting(
submodule.name,
submodule.id,
submodule.default,
submodule.description,
{
id: module.id,
name: module.name,
description: module.description
},
"mousehunt-improved-settings"
);
}
if (!submodule.beta && submodule.settings && (submodule.alwaysLoad || getSetting(submodule.id, submodule.default))) {
const subModSettings = module;
subModSettings.subSetting = true;
yield submodule.settings(subModSettings);
}
}
});
}
});
// src/utils/templates.js
var replaceInTemplate;
var init_templates = __esm({
"src/utils/templates.js"() {
init_sentry_release_injection_stub();
replaceInTemplate = (templateId, replacements) => {
let templateContent = hg.utils.TemplateUtil.getTemplate(templateId);
replacements.forEach((replacement) => {
templateContent = templateContent.replace(replacement[0], replacement[1]);
});
hg.utils.TemplateUtil.addTemplate(templateId, templateContent);
};
}
});
// src/utils/user.js
var getUserItems, getUserSetupDetails, normalizeTitle, isUserTitleAtLeast;
var init_user = __esm({
"src/utils/user.js"() {
init_sentry_release_injection_stub();
init_page();
getUserItems = (items2) => __async(void 0, null, function* () {
return new Promise((resolve) => {
hg.utils.UserInventory.getItems(items2, (resp) => {
resolve(resp);
});
});
});
getUserSetupDetails = () => {
const userObj = user;
const setup = {
type: userObj.trap_power_type_name,
stats: {
power: userObj.trap_power,
powerBonus: userObj.trap_power_bonus,
luck: userObj.trap_luck,
attractionBonus: userObj.trap_attraction_bonus,
cheeseEfect: userObj.trap_cheese_effect
},
bait: {
id: Number.parseInt(userObj.bait_item_id),
name: userObj.bait_name,
quantity: Number.parseInt(userObj.bait_quantity),
power: 0,
powerBonus: 0,
luck: 0,
attractionBonus: 0
},
base: {
id: Number.parseInt(userObj.base_item_id),
name: userObj.base_name,
power: 0,
powerBonus: 0,
luck: 0,
attractionBonus: 0
},
charm: {
id: Number.parseInt(userObj.trinket_item_id),
name: userObj.trinket_name,
quantity: Number.parseInt(userObj.trinket_quantity),
power: 0,
powerBonus: 0,
luck: 0,
attractionBonus: 0
},
weapon: {
id: Number.parseInt(userObj.weapon_item_id),
name: userObj.weapon_name,
power: 0,
powerBonus: 0,
luck: 0,
attractionBonus: 0
},
aura: {
lgs: {
active: false,
power: 0,
powerBonus: 0,
luck: 0
},
lightning: {
active: false,
power: 0,
powerBonus: 0,
luck: 0
},
chrome: {
active: false,
power: 0,
powerBonus: 0,
luck: 0
},
slayer: {
active: false,
power: 0,
powerBonus: 0,
luck: 0
},
festive: {
active: false,
power: 0,
powerBonus: 0,
luck: 0
},
luckycodex: {
active: false,
power: 0,
powerBonus: 0,
luck: 0
},
riftstalker: {
active: false,
power: 0,
powerBonus: 0,
luck: 0
}
},
location: {
name: userObj.environment_name,
id: userObj.environment_id,
slug: userObj.environment_type
}
};
if ("camp" !== getCurrentPage()) {
return setup;
}
const calculations = document.querySelectorAll(".campPage-trap-trapStat");
if (!calculations) {
return setup;
}
calculations.forEach((calculation) => {
if (calculation.classList.length <= 1) {
return;
}
const type = calculation.classList[1];
const math = calculation.querySelectorAll(".math .campPage-trap-trapStat-mathRow");
if (!math) {
return;
}
math.forEach((row) => {
if (row.classList.contains("label")) {
return;
}
let value = row.querySelector(".campPage-trap-trapStat-mathRow-value");
let name = row.querySelector(".campPage-trap-trapStat-mathRow-name");
if (!value || !name || !name.innerText) {
return;
}
name = name.innerText;
value = value.innerText || "0";
let tempType = type;
let isBonus = false;
if (value.includes("%")) {
tempType = type + "Bonus";
isBonus = true;
}
tempType = tempType.replace("_bonusBonus", "Bonus");
value = value.replace("%", "");
value = value.replace(",", "");
value = Number.parseInt(value * 100) / 100;
if (tempType === "attractionBonus") {
value = value / 100;
}
if (setup.weapon.name === name) {
setup.weapon[tempType] = value;
} else if (setup.base.name === name) {
setup.base[tempType] = value;
} else if (setup.charm.name === name) {
setup.charm[tempType] = value;
} else if (setup.bait.name === name) {
setup.bait[tempType] = value;
} else if ("Your trap has no cheese effect bonus." === name) {
setup.cheeseEffect = "No Effect";
} else {
let auraType = name.replace(" Aura", "");
if (!auraType) {
return;
}
auraType = auraType.toLowerCase();
auraType = auraType.replaceAll(" ", "_");
auraType = auraType.replaceAll(/\W/gi, "");
auraType = auraType.replace("golden_luck_boost", "lgs");
auraType = auraType.replace("2023_lucky_codex", "luckycodex");
auraType = auraType.replace("_set_bonus_2_pieces", "");
auraType = auraType.replace("_set_bonus_3_pieces", "");
if (!setup.aura[auraType]) {
setup.aura[auraType] = {
active: true,
type: auraType,
power: 0,
powerBonus: 0,
luck: 0
};
} else {
setup.aura[auraType].active = true;
setup.aura[auraType].type = auraType;
}
value = Number.parseInt(value);
if (isBonus) {
value = value / 100;
}
setup.aura[auraType][tempType] = value;
}
});
});
return setup;
};
normalizeTitle = (title = "") => {
if (!title) {
return "";
}
const normalizedTitle = title.toLowerCase().replaceAll(" ", "").replaceAll("/", "_").replaceAll("journeyman_journeywoman", "journeyman").replaceAll("journeywoman", "journeyman").replaceAll("lord_lady", "lord").replaceAll("lady", "lord").replaceAll("baron_baroness", "baron").replaceAll("baroness", "baron").replaceAll("count_countess", "count").replaceAll("countess", "count").replaceAll("grand_duke_grand_duchess", "grand_duke").replaceAll("grand_duchess", "grand_duke").replaceAll("archduke_archduchess", "archduke").replaceAll("archduchess", "archduke").replaceAll("duke_duchess", "duke").replaceAll("duke_dutchess", "duke").replaceAll("duchess", "duke").replaceAll("grand_duke", "grandduke").replaceAll("/", "").replaceAll(" ", "").toLowerCase();
return normalizedTitle;
};
isUserTitleAtLeast = (title) => {
const titles = [
"novice",
"recruit",
"apprentice",
"initiate",
"journeyman",
"master",
"grandmaster",
"legendary",
"hero",
"knight",
"lord",
"baron",
"count",
"duke",
"grandduke",
"archduke",
"viceroy",
"elder",
"sage",
"fable"
];
const titleIndex = titles.indexOf(normalizeTitle(user.title_name));
const checkIndex = titles.indexOf(normalizeTitle(title));
return titleIndex >= checkIndex;
};
}
});
// src/utils/utils.js
function isAppleOS(_window = null) {
if (!_window) {
if (typeof window === "undefined") {
return false;
}
_window = window;
}
const { platform } = _window.navigator;
return platform.includes("Mac") || ["iPad", "iPhone"].includes(platform);
}
var isApp, isUnsupportedFile, isiFrame, isLegacyHUD, isLoggedIn, isOverlayVisible, bodyClasses, addBodyClass, removeBodyClass, getTradableItems, doRequest, sleep, hasMiniCRE;
var init_utils3 = __esm({
"src/utils/utils.js"() {
init_sentry_release_injection_stub();
init_data();
init_events();
init_page();
isApp = () => {
return typeof app !== "undefined" && typeof user !== "undefined" && typeof hg !== "undefined" && typeof eventRegistry !== "undefined";
};
isUnsupportedFile = (path = false) => {
path = path || window.location.pathname;
return path.match(/\.(jpeg|jpg|gif|png|svg|json|css|js)$/i);
};
isiFrame = () => {
return window.self !== window.top;
};
isLegacyHUD = () => {
return hg.utils.PageUtil.isLegacy();
};
isLoggedIn = () => {
return user.length > 0 && "login" !== getCurrentPage();
};
isOverlayVisible = () => {
return activejsDialog && activejsDialog.isVisible();
};
bodyClasses = { added: [], removed: [] };
addBodyClass = (className) => {
if (bodyClasses.removed.includes(className) || bodyClasses.added.includes(className)) {
return;
}
bodyClasses.added.push(className);
const addClass2 = () => {
document.body.classList.add(className);
};
addClass2();
onNavigation(addClass2);
onTravel(null, {
/**
* Callback to add the class after travel.
*/
callback: () => {
setTimeout(addClass2, 500);
}
});
};
removeBodyClass = (className) => {
bodyClasses.removed.push(className);
document.body.classList.remove(className);
};
getTradableItems = (valueKey = "all") => __async(void 0, null, function* () {
const tradableItems = yield getData("items-tradable");
if ("all" === valueKey) {
return tradableItems;
}
const returnItems = [];
for (const item of tradableItems) {
returnItems.push({
name: item.name,
value: item[valueKey]
});
}
return returnItems;
});
doRequest = (_0, ..._1) => __async(void 0, [_0, ..._1], function* (url, formData = {}) {
var _a;
if ("undefined" === typeof lastReadJournalEntryId || "undefined" === typeof user) {
return;
}
if (!lastReadJournalEntryId || !user || !user.unique_hash) {
return;
}
const form = new FormData();
form.append("sn", "Hitgrab");
form.append("hg_is_ajax", 1);
form.append("last_read_journal_entry_id", lastReadJournalEntryId != null ? lastReadJournalEntryId : 0);
form.append("uh", (_a = user.unique_hash) != null ? _a : "");
for (const key in formData) {
form.append(key, formData[key]);
}
const requestBody = new URLSearchParams(form).toString();
const response = yield fetch(
callbackurl ? callbackurl + url : "https://www.mousehuntgame.com/" + url,
{
method: "POST",
body: requestBody,
headers: {
"Content-Type": "application/x-www-form-urlencoded"
}
}
);
const data = yield response.json();
return data;
});
sleep = (ms) => __async(void 0, null, function* () {
return new Promise((resolve) => setTimeout(resolve, ms));
});
hasMiniCRE = () => {
const hasMiniCre = sessionGet("has-mini-cre");
if (hasMiniCre) {
return true;
}
if ("camp" !== getCurrentPage()) {
return;
}
const cre = document.querySelector('.min-luck-container[style="position: absolute; top: 7px; right: 7px;"]');
if (!cre) {
sessionSet("has-mini-cre", false);
return false;
}
sessionSet("has-mini-cre", true);
return true;
};
}
});
// src/utils/index.js
var utils_exports = {};
__export(utils_exports, {
addAdvancedSettings: () => addAdvancedSettings,
addBodyClass: () => addBodyClass,
addHudStyles: () => addHudStyles,
addItemToGameInfoBar: () => addItemToGameInfoBar,
addMHCTData: () => addMHCTData,
addMhuiSetting: () => addMhuiSetting,
addSetting: () => addSetting,
addSettingForModule: () => addSettingForModule,
addSettingsTab: () => addSettingsTab,
addStyles: () => addStyles,
addStylesDirect: () => addStylesDirect,
addSubmenuDivider: () => addSubmenuDivider,
addSubmenuItem: () => addSubmenuItem,
addToGlobal: () => addToGlobal,
cacheFinishedMap: () => cacheFinishedMap,
clearCaches: () => clearCaches,
createPopup: () => createPopup,
debug: () => debug,
debuglite: () => debuglite,
debuglog: () => debuglog,
debugplain: () => debugplain,
doRequest: () => doRequest,
getArEl: () => getArEl,
getArForMouse: () => getArForMouse,
getCurrentDialog: () => getCurrentDialog,
getCurrentLocation: () => getCurrentLocation,
getCurrentPage: () => getCurrentPage,
getCurrentSubtab: () => getCurrentSubtab,
getCurrentTab: () => getCurrentTab,
getData: () => getData,
getFlag: () => getFlag,
getGlobal: () => getGlobal,
getHeaders: () => getHeaders,
getHighestArForMouse: () => getHighestArForMouse,
getLastMaptain: () => getLastMaptain,
getMapData: () => getMapData,
getRelicHunterLocation: () => getRelicHunterLocation,
getSetting: () => getSetting,
getSettingDirect: () => getSettingDirect,
getSettings: () => getSettings,
getTradableItems: () => getTradableItems,
getUserItems: () => getUserItems,
getUserSetupDetails: () => getUserSetupDetails,
hasMiniCRE: () => hasMiniCRE,
isApp: () => isApp,
isAppleOS: () => isAppleOS,
isCurrentPage: () => isCurrentPage,
isLegacyHUD: () => isLegacyHUD,
isLoggedIn: () => isLoggedIn,
isOverlayVisible: () => isOverlayVisible,
isUnsupportedFile: () => isUnsupportedFile,
isUserTitleAtLeast: () => isUserTitleAtLeast,
isiFrame: () => isiFrame,
makeButton: () => makeButton,
makeElement: () => makeElement,
makeElementDraggable: () => makeElementDraggable,
makeFavoriteButton: () => makeFavoriteButton,
makeLink: () => makeLink,
makePage: () => makePage,
makeTooltip: () => makeTooltip,
mapData: () => mapData,
mapModel: () => mapModel,
mapper: () => mapper,
onDialogHide: () => onDialogHide,
onDialogShow: () => onDialogShow,
onEvent: () => onEvent,
onNavigation: () => onNavigation,
onOverlayChange: () => onOverlayChange,
onPageChange: () => onPageChange,
onRequest: () => onRequest,
onTravel: () => onTravel,
onTurn: () => onTurn,
removeBodyClass: () => removeBodyClass,
removeHudStyles: () => removeHudStyles,
removeSubmenuItem: () => removeSubmenuItem,
replaceInTemplate: () => replaceInTemplate,
saveSetting: () => saveSetting,
saveSettingDirect: () => saveSettingDirect,
sessionGet: () => sessionGet,
sessionSet: () => sessionSet,
setLastMaptain: () => setLastMaptain,
setMapData: () => setMapData,
showErrorMessage: () => showErrorMessage,
showHornMessage: () => showHornMessage,
showLoadingError: () => showLoadingError,
showSuccessMessage: () => showSuccessMessage,
showTravelConfirmation: () => showTravelConfirmation,
sleep: () => sleep
});
var init_utils4 = __esm({
"src/utils/index.js"() {
init_sentry_release_injection_stub();
init_data();
init_debug();
init_draggable();
init_elements();
init_events();
init_flags();
init_global();
init_horn();
init_links();
init_location();
init_maps();
init_messages();
init_page();
init_settings();
init_settings_markup();
init_styles();
init_templates();
init_user();
init_utils3();
}
});
// src/modules/better-gifts/settings/index.js
function settings_default2(module) {
const orderOptions = [
{
name: "Newest to Oldest",
value: "default"
},
{
name: "Oldest to Newest",
value: "reverse"
}
];
addMhuiSetting(
"gift-buttons-send-order",
"Order to send",
[orderOptions[0]],
"Whether to send gifts from newest received to oldest received or the other way around.",
module,
{
type: "multi-select",
number: 1,
options: orderOptions
}
);
const skipBadGiftOptions = [
{
name: "Skip all non-GOTD gifts",
value: "skip"
},
{
name: "Don't skip any gifts",
value: "no-skip"
},
{
name: "Skip Mozzarella Cheese only",
value: "mozzarella"
},
{
name: "Skip Stale Cheese only",
value: "stale"
},
{
name: "Skip Radioactive Sludge only",
value: "sludge"
},
{
name: "Skip Mozz. Cheese & Stale Cheese",
value: "mozzarella-stale"
},
{
name: "Skip Mozz. Cheese & Radioactive Sludge",
value: "mozzarella-sludge"
},
{
name: "Skip Stale Cheese & Radioactive Sludge",
value: "stale-sludge"
}
];
addMhuiSetting(
"gift-buttons-ignore-bad-gifts",
"Ignore gifts that aren't the Gift of the Day",
[skipBadGiftOptions[0]],
"Skip sending over Mozzarella Cheese, Stale Cheese, and Radioactive Sludge.",
module,
{
type: "multi-select",
number: 1,
options: skipBadGiftOptions
}
);
}
var init_settings3 = __esm({
"src/modules/better-gifts/settings/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
}
});
// src/modules/better-gifts/styles.css
var styles_default;
var init_styles2 = __esm({
"src/modules/better-gifts/styles.css"() {
styles_default = ".giftSelectorView-giftContainer .giftSelectorView-gift.gift_of_the_day{width:20%}#bulk-gifting-gift-buttons{position:relative;display:flex;justify-content:flex-end;margin-bottom:10px}#bulk-gifting-gift-buttons button{display:block;padding:10px;font-size:12px;color:#000;text-align:center;text-decoration:none;background-color:#eee;border:1px solid #000;border-radius:5px;box-shadow:1px 1px 1px #eee}#bulk-gifting-gift-buttons .mh-gift-buttons-accept,#bulk-gifting-gift-buttons .mh-gift-buttons-paid-gifts{margin-right:10px}#bulk-gifting-gift-buttons button:hover,#bulk-gifting-gift-buttons button:focus,#bulk-gifting-gift-buttons .mh-gift-buttons-return:hover,#bulk-gifting-gift-buttons .mh-gift-buttons-return:focus,#bulk-gifting-gift-buttons .mh-gift-buttons-accept-reverse:hover,#bulk-gifting-gift-buttons .mh-gift-buttons-accept-reverse:focus{background-color:#ffae00;box-shadow:0 0 5px #fff inset,1px 1px 1px #fff}#bulk-gifting-gift-buttons button.disabled:hover,#bulk-gifting-gift-buttons button.disabled:focus{cursor:default;background-color:#eee;box-shadow:0 0 3px red}#bulk-gifting-gift-buttons .mh-gift-buttons-return{background-color:#fff600}.giftSelectorView-inbox-giftContainer{height:auto;min-height:300px;max-height:75vh}.giftSelectorView-inbox-giftRow.complete{height:25px;padding-top:5px;padding-left:15px;border:none;box-shadow:none}.giftSelectorView-inbox-giftRow.complete .giftSelectorView-inbox-gift-thumb{display:inline}.giftSelectorView-inbox-giftRow.complete .itemImage{display:inline-block;width:25px;height:25px}.giftSelectorView-inbox-giftRow.complete .giftSelectorView-inbox-gift-details{width:90%}.mh-gift-buttons-send-random,.mh-gift-buttons-send-faves{margin-top:-2px;margin-left:10px}.giftSelectorView-gift.sendable.gift.gift_of_the_day{flex:1}.giftSelectorView-gift .giftSelectorView-gift-padding{min-width:75px;border:1px solid #dcdcdc;box-shadow:none}.giftSelectorView-gift.gift_of_the_day .giftSelectorView-gift-padding{background-color:#a5e3ff}.giftSelectorView-scroller.giftSelectorView-giftContainer{display:flex;flex-wrap:wrap;justify-content:space-evenly}.giftSelectorView-gift.gift_of_the_day:hover .giftSelectorView-gift-padding{background-color:#0090ff}body #overlayPopup .giftSelectorView-scroller.giftSelectorView-giftContainer{min-height:unset}.giftSelectorView-friend.complete .giftSelectorView-friend-padding:before{bottom:9px;left:10px;z-index:1;filter:drop-shadow(0 0 3px #b9ff5d) drop-shadow(1px 1px 4px #b9ff5d) drop-shadow(-1px -1px 3px #b9ff5d)}.mh-gift-buttons-clone-wrapper .giftSelectorView-gift-description{display:flex;align-items:stretch}.mh-gift-buttons-clone-wrapper .giftSelectorView-gift-padding{min-width:unset;padding:0 2px;margin:0;border:none}.mh-gift-buttons-clone-wrapper .giftSelectorView-gift-name{height:unset}.mh-gift-buttons-clone-wrapper .giftSelectorView-gift-name span{padding:5px}.mh-gift-buttons-clone-wrapper .giftSelectorView-content-leftBar-highlightBlock{padding:5px;margin:0 5px 0 10px;background-color:transparent}.giftSelectorView-friend.complete .giftSelectorView-friend-padding:after,.mh-gift-buttons-clone-wrapper .giftSelectorView-gift.gift_of_the_day .giftSelectorView-gift-padding:after{display:none}.mh-gift-buttons-clone-wrapper .giftSelectorView-gift.gift_of_the_day .giftSelectorView-gift-padding{color:#000;background-color:#fff}.mh-gift-buttons-clone-wrapper .giftSelectorView-gift.gift_of_the_day:hover .giftSelectorView-gift-padding{background-color:#a5e3ff}.giftSelectorView-friend-group-title{padding:3px;font-size:11px}.giftSelectorView-friend-padding,.giftSelectorView-confirmPopup-block-actionItem .giftSelectorView-friend:hover .giftSelectorView-friend-padding{border-radius:0}.giftSelectorView-friend .giftSelectorView-friend-padding{height:30px}.mh-gift-buttons-clone-wrapper .giftSelectorView-gift .itemImage{width:50px;height:50px}.giftSelectorView-gift .itemImage{width:100%;height:80px}.giftSelectorView-friend-name{display:flex;flex-flow:column;align-items:flex-start;justify-content:flex-start;width:unset;height:unset;padding:0 3px;line-height:1.1}.giftSelectorView-friend-name span{display:block}#bulk-gifting-gift-buttons.mh-gift-buttons-send-popup{margin-bottom:0}.giftSelectorView-tabContentContainer .giftSelectorView-tabContent.active .giftSelectorView-actionContainer{display:flex;align-items:center;justify-content:flex-end}#bulk-gifting-gift-buttons.mh-gift-buttons-send-popup button{padding:6px;font-size:12px}a.mousehuntActionButton.giftSelectorView-action-confirm span{display:block;width:auto;min-width:80px}.giftSelectorView-friendRow-returnImage:hover{margin-top:-10px;margin-right:10px;margin-left:0;border:none}.giftSelectorView-claimableGift{min-height:100px}.giftSelectorView-claimableGift.accordion_disabled:after,.giftSelectorView-claimableGift.expanded:after{box-shadow:none}.giftSelectorView-claimableGift.accordion_disabled,.giftSelectorView-claimableGift.expanded{padding:5px;margin-bottom:11px;border:1px solid #ccc;border-radius:3px}.giftSelectorView-claimableGift-title-itemName{font-size:13px}.giftSelectorView-content-subtitle{border-bottom:none}.giftSelectorView-inboxGiftOfTheDay{padding:5px 0}.giftSelectorView-inbox-giftRow.paidgift{background-color:#fff08c;border:none}.giftSelectorView-inbox-gift-details .giftSelectorView-inbox-gift-sent{padding-top:3px}.giftSelectorView-inbox-giftRow{display:flex;align-items:center;justify-content:space-between;min-height:40px}.giftSelectorView-inbox-gift-details{flex:1;width:auto;margin:0 0 0 10px}.giftSelectorView-inbox-giftRow.paidgift .giftSelectorView-inbox-gift-actions{padding-bottom:0}.giftSelectorView-inboxGiftOfTheDay-label{margin-right:5px}.giftSelectorView-inboxGiftOfTheDay-gift{font-size:12px}.giftSelectorView-inboxGiftOfTheDay-gift abbr{text-decoration:none;vertical-align:middle}.mh-gift-buttons-clone-wrapper{max-height:275px;overflow-y:auto}.paidgift a.giftSelectorView-friendRow-action.return{text-indent:-70px}\n";
}
});
// src/modules/better-gifts/index.js
var getIgnoredGifts, claimGifts, makeAcceptButton, makeReturnButton, fixTypo, lineBreakGiftFooter, getButtons, makeButtons, getLimit, pickFriends, addSendButton, addRandomSendButton, _showTab, _selectGift, addGiftSwitcher, addButtonsToDropdown, addButtonsToPopup, main, init2, better_gifts_default;
var init_better_gifts = __esm({
"src/modules/better-gifts/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
init_settings3();
init_styles2();
getIgnoredGifts = () => {
const ignored = getSetting("gift-buttons-ignore-bad-gifts-0", "skip");
const skipOptions = {
skip: [
"mozzarella_cheese",
"stale_cheese",
"stale_cheese_craft_item"
],
"no-skip": [],
mozzarella: [
"mozzarella_cheese"
],
stale: [
"stale_cheese_craft_item"
],
sludge: [
"radioactive_sludge"
],
"mozzarella-stale": [
"mozzarella_cheese",
"stale_cheese_craft_item"
],
"mozzarella-sludge": [
"mozzarella_cheese",
"radioactive_sludge"
],
"stale-sludge": [
"stale_cheese_craft_item",
"radioactive_sludge"
]
};
return skipOptions[ignored] || skipOptions.skip;
};
claimGifts = (send = false, retries = 0) => __async(void 0, null, function* () {
hg.views.GiftSelectorView.show();
const isLoaded = document.querySelector(".giftSelectorView-tabContent.active .giftSelectorView-friendRow");
if (!isLoaded) {
if (retries <= 10) {
setTimeout(() => {
claimGifts(send, retries + 1);
}, 250);
}
return;
}
let gifts = hg.views.GiftSelectorView.getClaimableGiftsSortedByTime();
if (getSetting("gift-buttons-claim-order-0", "reverse") === "reverse") {
gifts.reverse();
}
const ignoredGifts = getIgnoredGifts();
let sendLimit = hg.views.GiftSelectorView.getNumSendableActionsRemaining();
let claimLimit = hg.views.GiftSelectorView.getNumClaimableActionsRemaining();
gifts = gifts.filter((gift) => {
if (gift.channel !== "gift") {
return false;
}
if (ignoredGifts.includes(gift.item_type)) {
return false;
}
return true;
});
for (const gift of gifts) {
let verb = send ? "return" : "claim";
if (send && sendLimit > 0 && gift.is_returnable) {
verb = "return";
sendLimit--;
claimLimit--;
}
const giftEl = document.querySelector(`.giftSelectorView-friendRow[data-gift-id="${gift.gift_id}"] .giftSelectorView-friendRow-action.${verb}`);
if (!giftEl) {
continue;
}
const event = { target: giftEl };
if (send && "return" === verb && sendLimit > 0) {
hg.views.GiftSelectorView.selectReturnableGift(event, giftEl);
sendLimit--;
claimLimit--;
} else if (!send && "claim" === verb && claimLimit > 0) {
hg.views.GiftSelectorView.selectClaimableGift(giftEl);
claimLimit--;
}
}
setTimeout(() => {
const confirm2 = document.querySelector(".mousehuntActionButton.giftSelectorView-action-confirm.small");
if (confirm2) {
setTimeout(() => {
hg.views.GiftSelectorView.submitConfirm(confirm2);
}, 250);
}
}, 500);
});
makeAcceptButton = (buttonContainer) => {
const acceptButton = makeElement("button", ["mh-gift-button", "mh-gift-buttons-accept"], "Accept All");
const acceptLimit = document.querySelector(".giftSelectorView-numClaimActionsRemaining");
if (acceptLimit && acceptLimit.innerText === "0") {
acceptButton.classList.add("disabled");
} else {
acceptButton.addEventListener("click", () => {
claimGifts();
});
}
buttonContainer.append(acceptButton);
};
makeReturnButton = (buttonContainer) => {
const returnWrapper = makeElement("div", "mh-gift-buttons-return-wrapper");
const returnButton = makeElement("button", ["mh-gift-button", "mh-gift-buttons-return"], "Accept & Return All");
const returnLimit = document.querySelector(".giftSelectorView-numSendActionsRemaining");
if (returnLimit && returnLimit.innerText === "0") {
returnButton.classList.add("disabled");
} else {
returnButton.addEventListener("click", () => {
claimGifts(true);
});
}
returnWrapper.append(returnButton);
buttonContainer.append(returnWrapper);
};
fixTypo = () => {
replaceInTemplate("ViewGiftSelector", [
[
"You can send 1 free gifts",
"You can send 1 free gift"
],
[
"<b>1</b> free gifts",
"<b>1</b> free gift"
]
]);
};
lineBreakGiftFooter = () => {
replaceInTemplate("GiftSelectorView", [
[
"more free gifts today. You can",
'more free gifts today. <p class="mh-ui-footer-gifts-second-line">You can'
],
[
'class="giftSelectorView-inboxHeader-closeButton" onclick="hg.views.GiftSelectorView.hideInbox(); return false;">Close</a>',
'class="giftSelectorView-inboxHeader-closeButton" onclick="hg.views.GiftSelectorView.hideInbox(); return false;">\u2715</a>'
]
]);
};
getButtons = (className = false) => {
const buttonContainer = document.createElement("div");
buttonContainer.id = "bulk-gifting-gift-buttons";
if (className) {
buttonContainer.classList.add(className);
}
makeAcceptButton(buttonContainer);
makeReturnButton(buttonContainer);
return buttonContainer;
};
makeButtons = () => {
if (document.querySelector("#bulk-gifting-gift-buttons")) {
return;
}
const buttonContainer = document.createElement("div");
buttonContainer.id = "bulk-gifting-gift-buttons";
makeAcceptButton(buttonContainer);
makeReturnButton(buttonContainer);
const giftFooter = document.querySelector(".giftSelectorView-inbox-footer");
if (giftFooter && giftFooter.firstChild) {
giftFooter.insertBefore(buttonContainer, giftFooter.firstChild);
}
};
getLimit = () => {
const limitEl = document.querySelector(".giftSelectorView-tabContent.active .giftSelectorView-actionLimit.giftSelectorView-numSendActionsRemaining");
limit = limitEl ? Number.parseInt(limitEl.innerText, 10) : 0;
return limit;
};
pickFriends = (friends, useRandom = true) => {
const selected = [];
let sent = 0;
if (useRandom) {
const bound = friends.length > 35 ? 35 : friends.length;
const firstRandom = Math.floor(Math.random() * bound);
selected.push(firstRandom);
sent++;
}
let limit2 = getLimit();
while (sent < limit2) {
if (selected.length >= friends.length) {
break;
}
if (useRandom) {
const random = Math.floor(Math.random() * friends.length);
if (selected.includes(random)) {
continue;
}
selected.push(random);
} else {
selected.push(sent);
}
sent++;
limit2 = getLimit();
}
selected.forEach((index) => {
friends[index].click();
});
if (getLimit() < 1) {
const buttons = document.querySelectorAll(".mh-gift-buttons");
buttons.forEach((button) => {
button.classList.add("disabled");
});
}
};
addSendButton = (className, text, selector, buttonContainer) => {
const existing = document.querySelector(`.mh-gift-buttons-send-${className}`);
if (existing) {
existing.remove();
}
const sendButton = makeElement("button", ["mousehuntActionButton", "tiny", "mh-gift-buttons", `mh-gift-buttons-send-${className}`]);
makeElement("span", "mousehuntActionButton-text", text, sendButton);
const limit2 = getLimit();
if (limit2 && limit2 < 1) {
sendButton.classList.add("disabled");
}
sendButton.addEventListener("click", () => {
const friends = document.querySelectorAll(selector);
if (!friends.length) {
return;
}
if ("faves" === className) {
pickFriends(friends, false);
} else {
pickFriends(friends);
}
});
buttonContainer.append(sendButton);
};
addRandomSendButton = () => {
const _selectGift2 = hg.views.GiftSelectorView.selectGift;
hg.views.GiftSelectorView.selectGift = (gift) => {
_selectGift2(gift);
const title = document.querySelector(".giftSelectorView-tabContent.active .selectFriends .giftSelectorView-content-title");
if (!title) {
return false;
}
addSendButton("random", "Select Random Friends", ".giftSelectorView-tabContent.active .giftSelectorView-friend:not(.disabled, .selected)", title);
addSendButton("faves", "Select Frequent Gifters", ".giftSelectorView-tabContent.active .giftSelectorView-friend-group.favorite .giftSelectorView-friend:not(.disabled, .selected)", title);
};
};
addGiftSwitcher = () => {
if (_showTab || _selectGift) {
return;
}
_showTab = hg.views.GiftSelectorView.showTab;
_selectGift = hg.views.GiftSelectorView.selectGift;
hg.views.GiftSelectorView.showTab = (tabType, viewState, preserveVariables, preserveActions) => {
_showTab(tabType, viewState, preserveVariables, preserveActions);
hg.views.GiftSelectorView.selectGift = (gift) => {
_selectGift(gift);
const giftContainer = document.querySelector(".giftSelectorView-tabContent.active.selectFriends .giftSelectorView-content-leftBar");
if (!giftContainer) {
return false;
}
const existing = document.querySelector(".mh-gift-buttons-clone-wrapper");
if (existing) {
existing.remove();
}
const giftType = tabType === "send_free_gifts" ? "gift" : "paidgift";
const gifts = document.querySelectorAll(`.active .selectGift .giftSelectorView-scroller.giftSelectorView-giftContainer .giftSelectorView-gift.sendable.${giftType}`);
if (!gifts.length) {
return;
}
const cloneWrapper = makeElement("div", "mh-gift-buttons-clone-wrapper");
gifts.forEach((toClone) => {
const clone = toClone.cloneNode(true);
const giftWrap = makeElement("div", "giftSelectorView-content-leftBar-highlightBlock");
giftWrap.append(clone);
giftWrap.addEventListener("click", () => {
const prevSelected = document.querySelectorAll(".mh-gift-buttons-clone-selected");
prevSelected.forEach((el) => {
el.classList.remove("mh-gift-buttons-clone-selected");
});
giftWrap.classList.add("mh-gift-buttons-clone-selected");
});
cloneWrapper.append(giftWrap);
});
giftContainer.append(cloneWrapper);
};
};
};
addButtonsToDropdown = () => {
const buttonLink = document.querySelector("#hgbar_freegifts");
if (!buttonLink) {
return;
}
buttonLink.addEventListener("click", function() {
makeButtons();
});
};
addButtonsToPopup = () => {
const actionRow = document.querySelector(".giftSelectorView-tabContentContainer .giftSelectorView-tabContent.active .giftSelectorView-actionContainer");
if (!actionRow) {
return;
}
const existing = document.querySelector(".mh-gift-buttons-send-popup");
if (existing) {
existing.remove();
}
const buttons = getButtons("mh-gift-buttons-send-popup");
actionRow.insertBefore(buttons, actionRow.firstChild);
};
main = () => {
onRequest(makeButtons, "managers/ajax/users/socialGift.php");
addButtonsToDropdown();
onDialogShow(addButtonsToPopup, "giftSelectorViewPopup");
addRandomSendButton();
addGiftSwitcher();
fixTypo();
lineBreakGiftFooter();
};
init2 = () => __async(void 0, null, function* () {
addStyles(styles_default);
main();
});
better_gifts_default = {
id: "better-gifts",
name: "Better Gifts",
type: "better",
default: true,
description: "Quickly accept and return all your gifts as well as picking random friends to send to.",
load: init2,
settings: settings_default2
};
}
});
// src/data/recipes-me-conversion.json
var recipes_me_conversion_default;
var init_recipes_me_conversion = __esm({
"src/data/recipes-me-conversion.json"() {
recipes_me_conversion_default = {
no: [
"abominable_asiago_cheese_magic",
"ancient_cheese_6_pieces",
"ancient_cheese_potion",
"cherry_potion",
"corrupted_radioactive_blue_cheese_potion",
"gnarled_cheese_potion",
"greater_radioactive_blue_cheese_potion",
"limelight_cheese_6",
"radioactive_blue_cheese_potion",
"runic_cheese_2_pieces",
"runic_cheese_potion"
],
maybe: [
"ancient_string_cheese_potion",
"crimson_cheese_magic_essence_recipe",
"gauntlet_potion_2",
"gauntlet_potion_3",
"gauntlet_potion_4",
"glowing_gruyere_cheese_5_pieces",
"greater_wicked_gnarly_potion",
"rain_cheese_potion",
"vengeful_vanilla_stilton_magic_essence",
"wicked_gnarly_potion",
"wind_cheese_potion"
]
};
}
});
// src/data/recipes-to-reorder.json
var recipes_to_reorder_default;
var init_recipes_to_reorder = __esm({
"src/data/recipes-to-reorder.json"() {
recipes_to_reorder_default = {
base: {
living_grove_base_recipe: "living_grove_base",
polluted_base_rebuild: "polluted_base",
soiled_base_rebuild_recipe: "soiled_base",
tribal_base: "tribal_base",
tiki_base: "tiki_base"
},
collectible: {
admirals_ship_journal_theme_recipe: "admirals_ship_journal_theme_collectible",
bristle_woods_rift_journal_theme_recipe: "bristle_woods_rift_journal_theme_collectible",
burroughs_rift_journal_theme_recipe: "burroughs_rift_journal_theme_collectible",
chrome_journal_theme_recipe: "chrome_journal_theme_collectible",
gnawnian_games_journal_theme_recipe: "gnawnian_games_theme_collectible",
labyrinth_journal_theme_recipe: "labyrinth_journal_theme_collectible",
lightning_slayer_journal_theme_recipe: "lightning_slayer_journal_theme_collectible",
living_garden_theme_recipe: "living_garden_theme_collectible",
moussu_picchu_journal_theme_recipe: "moussu_picchu_journal_theme_collectible",
polluted_theme_recipe: "completed_polluted_journal_theme_collectible",
queso_journal_theme_recipe: "queso_canyon_theme_collectible",
regal_theme_recipe: "completed_regal_theme_collectible",
relic_hunter_journal_theme_recipe: "relic_hunter_journal_theme_collectible"
},
crafting_item: {
geyser_draconic_chassis_recipe: "draconic_geyser_chassis_crafting_item",
geyser_draconic_chassis_i_recipe: "draconic_geyser_chassis_i_crafting_item",
christened_ship: "huntington_map_piece",
s_s__huntington_ii: "huntington_map_piece"
},
map_piece: {
unchristened_ship: "unchristened_ship_craft_item",
balacks_lantern: "balack_lantern_map_piece",
ocean_navigation_kit: "ocean_navigation_map_piece",
zzt_key_1: "zzt_key",
repaired_oculus_recipe: "high_altitude_license_stat_item"
},
weapon: {
chrome_floating_arcane_upgraded_recipe: "chrome_floating_arcane_upgraded_weapon",
chrome_monstrobot_recipe: "chrome_monstrobot_weapon",
chrome_oasis_water_node_recipe: "chrome_oasis_water_node_weapon",
chrome_phantasmic_oasis_recipe: "chrome_phantasmic_oasis_weapon",
chrome_school_of_sharks_recipe: "chrome_school_of_sharks_weapon",
chrome_sphynx_recipe: "chrome_sphynx_weapon",
chrome_storm_wrought_ballista_recipe: "chrome_storm_wrought_ballista_weapon",
chrome_temporal_turbine_recipe: "chrome_temporal_turbine_weapon",
chrome_thought_obliterator_recipe: "chrome_floating_forgotten_upgraded_weapon",
clockapult_of_winter_past: "clockapult_of_winter_past_weapon",
geyser_draconic_weapon_recipe: "geyser_draconic_weapon",
fluffy_deathbot_weapon: "fluffy_deathbot_weapon",
grungy_deathbot_weapon: "grungy_deathbot_weapon",
icy_rhinobot: "icy_rhinobot_weapon",
ninja_ambush_weapon: "ninja_ambush_weapon",
regrown_thorned_venus_mouse_trap: "throned_venus_mouse_trap_weapon",
acronym_recipe: "acronym_weapon",
ambush_trap_rebuild: "ambush_weapon",
rebuild_celestial_dissonance_recipe: "celestial_dissonance_weapon",
rebuild_chrome_storm_wrought_ballista_recipe: "chrome_storm_wrought_ballista_weapon",
clockapult_of_time_rebuild: "clockapult_of_time_weapon",
rebuild_crystal_tower_recipe: "crystal_tower_weapon",
digby_drillbot: "digby_drillbot_weapon",
dragon_ballista_rebuild: "dragonvine_ballista_weapon",
endless_labyrinth_trap_rebuild_recipe: "endless_labyrinth_weapon",
event_horizon_recipe: "event_horizon_weapon",
harpoon_gun: "harpoon_gun_weapon",
rebuild_high_tension_recipe: "high_tension_spring_weapon",
ice_blaster_trap_rebuild: "ice_blaster_weapon",
wolfsbane_rebuild_recipe: "wolfsbane_weapon",
mouse_deathbot: "mouse_deathbot_weapon",
net_cannon: "net_cannon_weapon",
oasis_water_node_recipe: "oasis_water_node_weapon",
obelisk_of_slumber: "obelisk_of_slumber_weapon",
rebuild_phantasmic_oasis_recipe: "phantasmic_oasis_weapon",
rhinobot_rebuild: "rhinobot_weapon",
sandstorm_monstrobot_recipe: "sandstormbot_weapon",
rebuild_upgraded_rune_shark_weapon_recipe: "upgraded_rune_shark_weapon",
scum_scrubber_trap_rebuild_recipe: "scum_scrubber_weapon",
soul_catcher_rebuild: "hween_2011_weapon",
sphynx_weapon_recipe: "sphynx_weapon",
steam_laser_mk_i_rebuild: "steam_laser_mk_i_weapon",
storm_wrought_ballista_recipe: "storm_wrought_ballista_weapon",
temporal_turbine_recipe: "temporal_turbine",
zugzwangs_last_move: "zugzwangs_last_move_weapon",
rebuild_floating_arcane_upgraded_recipe: "floating_arcane_upgraded_weapon",
rebuild_thought_obliterator_recipe: "floating_forgotten_upgraded_weapon",
venus_mouse_trap: "venus_mouse_trap_weapon"
}
};
}
});
// src/modules/better-inventory/recipes.js
var cleanUpRecipeBook, showCraftWarning, warnOnBadCrafts, modifySmashableTooltip, moveRecipe, updateRecipesOnPage, recipes_default;
var init_recipes = __esm({
"src/modules/better-inventory/recipes.js"() {
init_sentry_release_injection_stub();
init_utils4();
init_recipes_me_conversion();
init_recipes_to_reorder();
cleanUpRecipeBook = () => {
const allTab = document.querySelector(".inventoryPage-tagDirectory-tag.all.hidden");
if (allTab) {
allTab.classList.remove("hidden");
}
const tagLinks = document.querySelectorAll(".mousehuntHud-page-subTabContent.recipe a.inventoryPage-tagDirectory-tag");
tagLinks.forEach((tagLink) => {
const tag = tagLink.getAttribute("data-tag");
tagLink.removeAttribute("onclick");
tagLink.addEventListener("click", (e) => {
app.pages.InventoryPage.showTagGroup(e.target);
const hasBeenUpdated = tagLink.classList.contains("updated");
if (!hasBeenUpdated) {
updateRecipesOnPage(tag);
tagLink.classList.add("updated");
}
});
});
};
showCraftWarning = (text) => {
const confirm2 = document.querySelector(".mousehuntActionButton.inventoryPage-confirmPopup-suffix-button.confirm");
if (!confirm2) {
return;
}
const existing = document.querySelector(".mhui-craft-warning-tooltip");
if (existing) {
existing.remove();
}
const tooltip = makeElement("div", "mhui-craft-warning-tooltip", text);
confirm2.parentNode.append(tooltip);
};
warnOnBadCrafts = (limit2 = 0) => {
const confirm2 = document.querySelector(".mousehuntActionButton.inventoryPage-confirmPopup-suffix-button.confirm");
if (!confirm2) {
if (limit2 <= 3) {
setTimeout(() => {
warnOnBadCrafts(limit2 + 1);
}, 250);
}
return;
}
const type = confirm2.getAttribute("data-confirm-type");
if (!type) {
return;
}
if (!("recipe" === type || "potion" === type)) {
return;
}
const popup = document.querySelector(".inventoryPage-confirmPopup");
if (!popup) {
return;
}
const recipe = popup.getAttribute("data-item-type");
if (!recipe) {
return;
}
if ("potion" === type) {
const consumed = document.querySelectorAll('.inventoryPage-confirmPopup-itemRow-quantity[data-source="consumed"]');
let hasSB = false;
consumed.forEach((item) => {
if (item.getAttribute("data-item-type") === "super_brie_cheese") {
hasSB = true;
}
});
if (!hasSB) {
return;
}
}
if (recipes_me_conversion_default.no.includes(recipe)) {
showCraftWarning("This is not worth crafting using Magic Essence.");
} else if (recipes_me_conversion_default.maybe.includes(recipe)) {
showCraftWarning("Check the price of SUPER|brie+ before using Magic Essence.");
}
};
modifySmashableTooltip = () => __async(void 0, null, function* () {
if ("crafting" !== getCurrentTab() || "hammer" !== getCurrentSubtab()) {
return;
}
const items2 = document.querySelectorAll(".inventoryPage-item");
if (!items2) {
return;
}
items2.forEach((item) => __async(void 0, null, function* () {
const tooltip = item.querySelector(".tooltip");
if (!tooltip) {
return;
}
let producedItem = item.getAttribute("data-produced-item");
if (!producedItem) {
return;
}
item.addEventListener("mouseenter", () => __async(void 0, null, function* () {
if (item.getAttribute("data-new-tooltip") === "newTooltip") {
return;
}
item.setAttribute("data-new-tooltip", "newTooltip");
producedItem = producedItem.includes(",") ? producedItem.split(",") : [producedItem];
const itemType = item.getAttribute("data-item-type");
producedItem.push(itemType);
const itemData = yield getUserItems(producedItem);
if (!itemData || !itemData[0]) {
return;
}
const formattedParts = itemData.find((itemDataItem) => itemDataItem.type === itemType).formatted_parts;
if (!formattedParts) {
return;
}
const tooltipWrapper = makeElement("div", ["newTooltip", "tooltip"]);
itemData.forEach((itemDataItem) => {
const formattedPart = formattedParts.find((formattedPartItem) => formattedPartItem.type === itemDataItem.type);
if (!formattedPart) {
return;
}
const name = formattedPart.name;
const thumb = formattedPart.thumbnail_transparent || itemDataItem.thumbnail;
let quantity = formattedPart.quantity;
if ("gold_stat_item" === itemDataItem.type) {
const quantityInt = Number.parseInt(quantity);
if (quantityInt >= 1e6) {
quantity = `${Math.floor(quantityInt / 1e5) / 10}m`;
} else if (quantityInt >= 1e3) {
quantity = `${Math.floor(quantityInt / 100) / 10}k`;
}
}
makeElement("div", ["new-tooltip-item", "inventoryPage-item"], `
<div class="inventoryPage-item-margin clear-block">
<div class="inventoryPage-item-imageContainer">
<div class="itemImage"><img src="${thumb}">
<div class="quantity">${quantity}</div>
</div>
</div>
<div class="inventoryPage-item-content-nameContainer">
<div class="inventoryPage-item-content-name">
<span>${name}</span>
</div>
</div>
</div>`, tooltipWrapper);
});
tooltip.parentNode.insertBefore(tooltipWrapper, tooltip.nextSibling);
}));
}));
});
moveRecipe = (type, recipesContainer) => {
const recipeEl = document.querySelector(`.inventoryPage-item.recipe[data-produced-item="${type}"]`);
if (recipeEl) {
recipeEl.classList.add("reordered");
recipesContainer.append(recipeEl);
}
};
updateRecipesOnPage = (type) => __async(void 0, null, function* () {
if (!recipes_to_reorder_default[type]) {
return;
}
const recipesContainer = document.querySelector(`.inventoryPage-tagContent-tagGroup[data-tag="${type}"]`);
if (!recipesContainer) {
return;
}
const recipesModifying = [];
const knownRecipes = document.querySelectorAll(".inventoryPage-tagContent-tagGroup.active .inventoryPage-item.recipe.known");
knownRecipes.forEach((recipe) => {
const recipeId = recipe.getAttribute("data-item-type");
recipesModifying.push(recipeId);
});
if (recipesModifying.length === 0) {
return;
}
const itemTypes = recipesModifying.map((recipe) => {
return recipes_to_reorder_default[type][recipe];
}).filter(Boolean);
if (type === "crafting_item") {
itemTypes.push("geyser_draconic_weapon");
}
const ownedItems = yield getUserItems(itemTypes);
ownedItems.forEach((item) => {
if (!item.quantity || item.quantity < 1) {
return;
}
if ("geyser_draconic_weapon" === item.type) {
moveRecipe("draconic_geyser_chassis_crafting_item", recipesContainer);
moveRecipe("draconic_geyser_chassis_i_crafting_item", recipesContainer);
} else {
moveRecipe(item.type, recipesContainer);
}
});
});
recipes_default = () => __async(void 0, null, function* () {
onNavigation(
cleanUpRecipeBook,
{
page: "inventory",
tab: "crafting",
subtab: "recipe"
}
);
onEvent("js_dialog_show", warnOnBadCrafts);
modifySmashableTooltip();
});
}
});
// src/modules/better-inventory/settings/index.js
function settings_default3(module) {
addMhuiSetting(
"better-inventory-one-item-per-row",
"Show one item per row",
true,
"Makes each item full-width.",
module
);
addMhuiSetting(
"better-inventory-larger-images",
"Show larger images",
true,
"Increases the size of item images for smaller items, such as baits or collectibles.",
module
);
}
var init_settings4 = __esm({
"src/modules/better-inventory/settings/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
}
});
// src/modules/better-inventory/double-width-item.css
var double_width_item_default;
var init_double_width_item = __esm({
"src/modules/better-inventory/double-width-item.css"() {
double_width_item_default = ".mousehuntHud-page-tabContent.special div[data-tag=adventuring] .inventoryPage-tagContent-listing,.mousehuntHud-page-tabContent.special div[data-tag=convertibles] .inventoryPage-tagContent-listing,.mousehuntHud-page-tabContent.special div[data-tag=spring_hunt] .inventoryPage-tagContent-listing,.mousehuntHud-page-tabContent.special div[data-tag=treasure_chests] .inventoryPage-tagContent-listing{display:grid;grid-template-columns:1fr 1fr;gap:5px;place-items:stretch}.mousehuntHud-page-tabContent.special .inventoryPage-item.full,.mousehuntHud-page-tabContent.special .inventoryPage-item.full:nth-child(odd){display:block;width:282px;margin-right:0;margin-left:0}.mousehuntHud-page-tabContent.special div[data-tag=treasure_chests] .inventoryPage-item-margin.clear-block{height:100%}\n";
}
});
// src/modules/better-inventory/full-width-item.css
var full_width_item_default;
var init_full_width_item = __esm({
"src/modules/better-inventory/full-width-item.css"() {
full_width_item_default = ".inventoryPage-item.full{width:100%}.inventoryPage-item-content-action span{display:block;margin-bottom:5px}.mousehuntPage-content .inventoryPage-item-button:nth-child(2){margin-left:0!important}.inventoryPage-item-content-action>span{display:inline-block}.inventoryPage-item.base .itemViewStatBlock.horizontal.base,.inventoryPage-item.weapon .itemViewStatBlock.horizontal.weapon{float:right;width:54%}.inventoryPage-item.base .inventoryPage-item-content-description-text,.inventoryPage-item.weapon .inventoryPage-item-content-description-text{width:45%;height:unset;max-height:115px;overflow-y:auto}\n";
}
});
// src/modules/better-inventory/larger-images.css
var larger_images_default;
var init_larger_images = __esm({
"src/modules/better-inventory/larger-images.css"() {
larger_images_default = ".inventoryPage-item.small{width:19%;height:125px;margin-bottom:10px}.inventoryPage-item.small .itemImage,.inventoryPage-item.small .itemImage img{width:80px;height:80px}\n";
}
});
// src/modules/better-inventory/styles.css
var styles_default2;
var init_styles3 = __esm({
"src/modules/better-inventory/styles.css"() {
styles_default2 = '.inventoryPage-item.component .inventoryPage-item-imageContainer .itemImage{margin:0 auto;border:none;border-radius:0}.inventoryPage-item-content-action{margin-top:15px}.inventoryPage-item-content-description{height:auto}.inventoryPage-item.torn_page .inventoryPage-item-name,.inventoryPage-item.stat .inventoryPage-item-name,.inventoryPage-item.collectible .inventoryPage-item-name,.inventoryPage-item.message_item .inventoryPage-item-name{margin-left:10px}.inventoryPage-item.torn_page .inventoryPage-item-imageContainer,.inventoryPage-item.stat .inventoryPage-item-imageContainer,.inventoryPage-item.collectible .inventoryPage-item-imageContainer,.inventoryPage-item.message_item .inventoryPage-item-imageContainer{margin-top:0}.inventoryPage-item-name{padding:10px;font-size:1.3em;background-color:transparent;border:none}.inventoryPage-item-name abbr{text-decoration:none}.mousehuntHud-page-subTabContent.trinket.show_tags.trinket.active .mousehuntHud-page-subTabContent-prefix:first-child{display:none}.inventoryPage-tagContent-tagTitle{display:flex;align-items:center;padding:0 5px 10px;margin:0;font-size:1.4em;border:none}.mousehuntHud-page-subTabContent.hammer .inventoryPage-tagContent-tagGroup{padding:8px 0 8px 8px}.mousehuntHud-page-subTabContent.hammer .inventoryPage-tagContent-tagGroup:nth-child(2n){background-color:#f6f6f6}.mousehuntHud-page-subTabContent.hammer .inventoryPage-tagContent-tagTitle{padding:0 0 10px;font-size:14px;font-weight:400}.mousehuntHud-page-subTabContent.hammer .inventoryPage-tagContent-listing{display:flex;flex-wrap:wrap;place-content:center flex-start;align-items:stretch}.mousehuntHud-page-subTabContent.hammer .mousehuntHud-page-subTabContent.hammer .inventoryPage-item{width:68px;margin:0 3px 0 0;background-color:#fff;border-radius:10px}.mousehuntHud-page-subTabContent.hammer .inventoryPage-item:nth-child(7n){margin-right:0}.mousehuntHud-page-subTabContent.hammer .inventoryPage-item{height:auto;padding-bottom:0;margin-bottom:0;font-size:9px}.mousehuntHud-page-subTabContent.hammer .inventoryPage-item-margin.clear-block{border:none;border-radius:0}.mousehuntHud-page-subTabContent.hammer .inventoryPage-item:hover .inventoryPage-item-margin{background-color:#e3e3e3;outline:1px solid #888;box-shadow:none}.mousehuntHud-page-subTabContent.hammer .inventoryPage-item .tooltip,.mousehuntHud-page-subTabContent.hammer .inventoryPage-item .newTooltip{display:none}.mousehuntHud-page-subTabContent.hammer .inventoryPage-item:hover .newTooltip{display:flex;align-items:center;width:auto}.mousehuntHud-page-subTabContent.hammer .inventoryPage-item:hover .tooltip .inventoryPage-item-margin{text-align:center;background-color:transparent;outline:none}.mousehuntHud-page-subTabContent.hammer .inventoryPage-item.small .tooltip.newTooltip .itemImage{float:none;width:60px;height:60px;overflow:visible}.mousehuntHud-page-subTabContent.hammer .inventoryPage-item.small .tooltip.newTooltip .itemImage img{width:55px;height:55px}.mousehuntHud-page-subTabContent.hammer .inventoryPage-item:hover .newTooltip .inventoryPage-item-content-nameContainer,.mousehuntHud-page-subTabContent.hammer .inventoryPage-item:hover .newTooltip .inventoryPage-item-content-name{height:auto}.mousehuntHud-page-subTabContent.hammer .inventoryPage-item:hover .newTooltip .inventoryPage-item-content-name span{min-width:60px}a.inventoryPage-item-larryLexicon{display:none}.inventoryPage-item-content-description-text{max-height:125px;padding:0;font-size:10px;line-height:16px;color:#6e6e6e}.inventoryPage-item.base .inventoryPage-item-content-description-text,.inventoryPage-item.weapon .inventoryPage-item-content-description-text,.inventoryPage-item.trinket .inventoryPage-item-content-description-text{height:auto}.inventoryPage-item.full.weapon .quantity,.inventoryPage-item.full.base .quantity{display:none}.inventoryPage-item .itemImage{margin-bottom:10px;overflow:visible}.inventoryPage-item-recipeOptions li{margin-left:5px;background-color:#fffcdb;border-style:solid}.inventoryPage-item.small .itemImage .quantity{overflow:visible}.mousehuntHud-page-subTabContent.recipe .inventoryPage-item .itemImage{display:flex;align-items:center;justify-content:center;height:55px}.mousehuntHud-page-subTabContent.recipe .inventoryPage-item .itemImage img{width:50px;height:50px}.inventoryPage-item-content-description-consumedItem.error{gap:2px;background-color:#f5ddddd1;border-radius:7px}input.inventoryPage-tagDirectory-searchBar-input{width:auto;min-width:50%;margin-right:10px}.mousehuntHud-page-subTabContent-prefix.clear-block{height:25px;margin-top:-20px;color:transparent}.inventoryPage-tagDirectory-searchBar{display:flex;align-items:center;justify-content:space-evenly;padding-right:0;color:transparent}.inventoryPage-item.torn_page .quantity{display:none}.inventoryPage-item.torn_page .itemImage img{width:50px;min-width:unset;height:50px;min-height:unset}.inventoryPage-item.full.torn_page{width:32%;margin:5px}.inventoryPage-item.torn_page .inventoryPage-item-name{padding-right:0;font-size:1em}.inventoryPage-item.torn_page .itemImage{width:40px;height:40px;margin-top:-5px}.inventoryPage-item.torn_page .inventoryPage-item-contentContainer{margin:0}.inventoryPage-item.torn_page .inventoryPage-item-content-action div{display:flex;justify-content:space-around;margin-right:15px}.inventoryPage-item.torn_page .inventoryPage-item-content-description{display:none}.inventoryPage-item.torn_page input.viewFront,.inventoryPage-item.torn_page input.viewBack{display:inline-block;padding:3px 5px;border-radius:3px;box-shadow:1px 1px 4px #fff2aa inset}.inventoryPage-craftingTable-title{display:none}.mousehuntHud-page-subTabContent.crafting_table .inventoryPage-craftingTable{background:#f6f3eb;border:1px solid #d3cecb;border-radius:3px;box-shadow:inset -1px 1px 3px #d3cecb}.inventoryPage-craftingTable-slot-item.itemImage{margin-bottom:10px}.inventoryPage-craftingTable-slot-item-controls{display:flex;align-items:center;justify-content:center;height:17px;margin:0;background:transparent}.inventoryPage-craftingTable-slot-item-controls input{height:24px;margin-top:-1px}.inventoryPage-craftingTable-action{margin:10px;background:none;border:none}.inventoryPage-craftingTable-slot-item[data-owned="1"] .inventoryPage-craftingTable-slot-item-controls-increment{opacity:.2}.inventoryPage-craftingTable-slot{width:160px;padding:5px;margin:5px;background:#f6f3eb;border:1px solid #d3cecb;border-radius:3px;box-shadow:inset -1px 1px 3px #d3cecb}.inventoryPage-craftingTable-slotContainer{display:flex;flex-direction:column;align-content:center;justify-items:center;background-color:#f6f3eb}.inventoryPage-craftingTable-slot-item{display:flex;flex-direction:column;align-items:center;justify-content:flex-start}.inventoryPage-craftingTable-slot-item.empty .inventoryPage-craftingTable-slot-item-controls,.inventoryPage-craftingTable-slot-item.empty .inventoryPage-craftingTable-slot-item-nameContainer{display:none}.inventoryPage-craftingTable-slot-item.empty .inventoryPage-craftingTable-slot-item-name{color:transparent}.inventoryPage-craftingTable-slot-item-quantity{display:none}.inventoryPage-craftingTable-slot-item-name{font-size:11px;font-weight:100}.inventoryPage-craftingTable-slot-item-nameContainer{width:100%;height:auto;margin:5px}.inventoryPage-craftingTable-slot-item .itemImage,.inventoryPage-craftingTable-slot-item img{width:55px;height:55px}a.inventoryPage-item-larryLexicon.tsitu-lock-convertible{top:5px;right:5px!important;display:flex;align-items:center;justify-content:center;width:20px;height:20px!important;padding:2px;font-size:13px;border:1px solid #bebebe;border-radius:50%}.inventoryPage-tagContent-tagTitle.tsitu-lock-convertible{position:absolute;top:-10px;right:0}.inventoryPage-item.small.message_item .inventoryPage-item-content-name:after{position:absolute;top:5px;right:2px;width:10px;height:10px;content:"";background-color:#8bf4ed;border-radius:50%}.mhui-craft-warning-tooltip{position:absolute;top:0;left:0;width:auto;padding:10px;font-size:10px;font-weight:900;background:#f5c7c7;border:1px solid #e07878;border-radius:5px}#jsDialogAjaxSuffix{position:relative}.inventoryPage-item .itemImage .limitedEdition{top:-1px;left:-5px;z-index:1}#overlayPopup.itemViewPopup .itemViewContainer.message_item .button{margin:10px 0 0}.inventoryPage-item.base .inventoryPage-item-content-description-text,.inventoryPage-item.weapon .inventoryPage-item-content-description-text{max-height:115px;overflow:visible}.inventoryPage-confirmPopup-itemTable{display:flex;flex-direction:column}.inventoryPage-confirmPopup-itemRow-description-name{margin-bottom:5px}.inventoryPage-confirmPopup-itemRow-description-owned{margin-bottom:5px;font-size:12px}.inventoryPage-confirmPopup-itemRow-quantity{font-family:lucida grande,tahoma,verdana,arial,sans-serif}.inventoryPage-item-content-action>span{display:none}.inventoryPage-item .item_set:after{position:absolute;top:8px;right:3px;display:block;width:28px;height:28px;content:"";background-image:url(https://www.mousehuntgame.com/images/items/stats/large/cb301652677b77c9abd3a99622aa3ca7.png);background-repeat:no-repeat;background-size:contain;opacity:.2}.inventoryPage-item:hover .item_set:after{opacity:1}.mh-dark-mode .itemViewStatBlock.horizontal .itemViewStatBlock-padding{background-color:#2c2c2c}.mh-dark-mode .inventoryPage-item .item_set:before{color:#2c2c2c}.inventoryPage-item:hover .item_set:before{color:#2c2c2c}.inventoryPage-item.trinket .inventoryPage-item-content-description{min-height:120px}.inventoryPage-item.trinket .itemViewStatBlock.trinket{float:right;width:90px;margin:0 5px}.inventoryPage-item-content-description-text div[style="border: 1px red dotted; padding: 5px; font-size: 10px;"],.inventoryPage-item-content-description-text b[style="color:red; font-size: 14px;"],.inventoryPage-item[data-item-type=rainbow_scroll_case_convertible] .inventoryPage-item-content-description-text br,.inventoryPage-item[data-item-type=party_size_rainbow_scroll_case_convertible] .inventoryPage-item-content-description-text br{display:none}.inventoryPage-item-content-action span{margin-right:5px}.inventoryPage-item.small .inventoryPage-item-margin{margin-bottom:10px;box-shadow:0 4px 10px -10px #000}.mousehuntHud-page-subTabContent.trinket .mousehuntHud-page-subTabContent-prefix{display:none}\n';
}
});
// src/modules/better-inventory/index.js
var setOpenQuantityOnClick, addOpenAlltoConvertible, addItemViewPopupToCollectibles, addArmButtonToCharms, main2, init3, better_inventory_default;
var init_better_inventory = __esm({
"src/modules/better-inventory/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
init_recipes();
init_settings4();
init_double_width_item();
init_full_width_item();
init_larger_images();
init_styles3();
setOpenQuantityOnClick = (attempts = 0) => {
const qty = document.querySelector(".itemView-action-convertForm");
if (!qty) {
if (attempts > 10) {
return;
}
setTimeout(() => {
setOpenQuantityOnClick(attempts + 1);
}, 200);
return;
}
qty.addEventListener("click", (e) => {
if (e.target.tagName === "DIV") {
const textQty = e.target.innerText;
const qtyArray = textQty.split(" ");
let maxNum = qtyArray.at(-1);
maxNum = maxNum.replace("Submit", "");
maxNum = Number.parseInt(maxNum);
const input = document.querySelector(".itemView-action-convert-quantity");
input.value = maxNum;
}
});
};
addOpenAlltoConvertible = () => {
const form = document.querySelector(".convertible .itemView-action-convertForm");
if (!form) {
return;
}
if (form.getAttribute("data-open-all-added")) {
return;
}
form.setAttribute("data-open-all-added", true);
const formHTML = form.innerHTML;
const formHTMLArray = formHTML.split(" /");
if (!formHTMLArray[1]) {
return;
}
const formHTMLArray2 = formHTMLArray[1].split("<a");
if (!formHTMLArray2[1]) {
return;
}
const quantity = formHTMLArray2[0].trim();
const newFormHTML = `${formHTMLArray[0]}/ <span class="open-all">${quantity}</span><a${formHTMLArray2[1]}`;
form.innerHTML = newFormHTML;
const openAll = document.querySelector(".open-all");
openAll.addEventListener("click", () => {
const input = form.querySelector(".itemView-action-convert-quantity");
if (!input) {
return;
}
input.value = quantity;
});
};
addItemViewPopupToCollectibles = () => {
const collectibles = document.querySelectorAll(".mousehuntHud-page-subTabContent.collectible .inventoryPage-item.small");
if (!collectibles.length) {
return;
}
collectibles.forEach((collectible) => {
const type = collectible.getAttribute("data-item-type");
if (!type) {
return;
}
if ("message_item" === collectible.getAttribute("data-item-classification")) {
return;
}
collectible.setAttribute("onclick", "");
collectible.addEventListener("click", (e) => {
e.preventDefault();
hg.views.ItemView.show(type);
});
});
};
addArmButtonToCharms = () => {
if ("inventory" !== getCurrentPage() || "traps" !== getCurrentTab() || "trinket" !== getCurrentSubtab()) {
return;
}
const charms = document.querySelectorAll(".inventoryPage-item.trinket");
if (!charms.length) {
return;
}
charms.forEach((charm) => {
const existingArmButton = charm.querySelector(".inventoryPage-item-imageContainer-action");
if (existingArmButton) {
return;
}
const actionContainer = charm.querySelector(".inventoryPage-item-imageContainer");
if (!actionContainer) {
return;
}
const armButton = makeElement("div", "inventoryPage-item-imageContainer-action");
armButton.setAttribute("onclick", "app.pages.InventoryPage.armItem(this); return false;");
actionContainer.append(armButton);
});
};
main2 = () => {
onOverlayChange({ item: { show: setOpenQuantityOnClick } });
if ("item" === getCurrentPage()) {
setOpenQuantityOnClick();
}
addOpenAlltoConvertible();
addItemViewPopupToCollectibles();
addArmButtonToCharms();
onNavigation(() => {
addOpenAlltoConvertible();
addItemViewPopupToCollectibles();
addArmButtonToCharms();
}, {
page: "inventory"
});
onEvent("js_dialog_show", addOpenAlltoConvertible);
recipes_default();
};
init3 = () => __async(void 0, null, function* () {
addStyles([
styles_default2,
getSetting("better-inventory-one-item-per-row", true) ? full_width_item_default : double_width_item_default,
getSetting("better-inventory-larger-images", true) ? larger_images_default : ""
]);
main2();
});
better_inventory_default = {
id: "better-inventory",
name: "Better Inventory",
type: "better",
default: true,
description: "Updates the inventory layout and styling. ",
load: init3,
settings: settings_default3
};
}
});
// src/modules/better-item-view/styles.css
var styles_default3;
var init_styles4 = __esm({
"src/modules/better-item-view/styles.css"() {
styles_default3 = '.itemView-titleContainer{height:26px}.itemView-header-name{display:flex;align-items:center;justify-content:space-between}.mh-item-links{display:flex;justify-content:flex-end;margin-right:-10px}.mh-item-links a{margin-right:5px}.itemView-header-name .mh-item-links span{display:inline-block;font-size:11px;font-weight:400}.itemView-has-mhct .mouse-ar-wrapper{display:grid;grid-template-columns:150px auto 50px;place-items:center stretch;padding:5px;margin:5px 0;font-size:12px}.itemView-has-mhct .has-stages .mouse-ar-wrapper{grid-template-columns:110px 140px auto 50px}.itemView-has-mhct .mouse-ar-wrapper div{padding:0 2px}.itemView-has-mhct .mice-ar-wrapper{margin-right:10px}.mouse-ar-wrapper .stage{font-size:10px}.mouse-ar-wrapper .cheese{font-size:11px}.itemView-has-mhct .ar-header{display:flex;align-items:center;justify-content:space-between;height:26px;padding-bottom:2px;margin-top:10px;margin-bottom:10px;font-size:12px;font-weight:900;border-bottom:1px solid #ccc}.itemView-has-mhct .ar-link{font-size:9px}.itemView-has-mhct .rate{text-align:right}.itemView-has-mhct .mouse-ar-wrapper:nth-child(odd){background-color:#e7e7e7}.itemView-has-mhct .itemView-description{font-weight:500;line-height:19px}.itemView-action.crafting_item b{display:none}.itemView-action.crafting_item:before{content:"This can be used to craft other items!"}.itemViewContainer.map_piece .itemView-action-text.map_piece,.itemViewContainer.base .itemView-action-text.base,.itemViewContainer.weapon .itemView-actio-textn.weapon,.itemViewContainer.bait .itemView-action-text.bait,.itemViewContainer.trinket .itemView-action-text.trinket,.itemViewContainer.potion .itemView-action-text.potion,.itemViewContainer.readiness_item .itemView-action-text.readiness_item,.itemViewContainer.convertible .itemView-action-text.convertible,.itemViewContainer.torn_page .itemView-action-text.torn_page,.itemViewContainer.crafting_item .itemView-action-text.crafting_item,.itemViewContainer.collectible .itemView-action-text.collectible,.itemViewContainer.message_item .itemView-action-text.message_item,.itemViewContainer.bonus_loot .itemView-action-text.bonus_loot,.itemViewContainer.stat .itemView-action-text.stat,.itemViewContainer.quest .itemView-action-text.quest,.itemViewContainer.skin .itemView-action-text.skin{display:none!important}.itemViewContainer .shopCustomization .itemViewStatBlock-stat{display:flex;flex-direction:column;align-items:center}.itemViewContainer .itemViewStatBlock-stat{display:flex;flex-direction:row;align-items:center;justify-content:center}.itemViewContainer .itemViewStatBlock-stat-value{flex:1}.itemViewContainer .itemViewStatBlock-stat.cheeseEffect{font-size:9px;text-align:center}.itemViewContainer .itemViewStatBlock.trinket .itemViewStatBlock-padding{display:flex;flex-direction:column;align-items:stretch;width:100px}.itemViewContainer .itemViewStatBlock.trinket{width:100px;font-size:13px}#overlayPopup.itemViewPopup #jsDialogClose{z-index:1}#overlayPopup.itemViewPopup .itemView-header-classification{right:25px;color:transparent}.itemView-actionContainer{display:flex;flex-wrap:wrap;gap:10px}.itemView-header-classification{color:transparent}.itemView-action{border-top:none}.itemViewContainer.potion .inventoryPage-item-recipeOptions li{width:365px}.itemView-character-image{width:auto;height:84px;margin-top:-15px;margin-left:-9px}.itemView-character-name{left:-11px;width:75px;font-size:15px}.itemView-padding{margin-left:70px}.itemView-thumbnail.large{margin-left:-15px}input.itemView-action-convert-quantity{width:50px}.itemViewPopup .itemViewStatBlock-padding{flex-direction:column}\n';
}
});
// src/modules/better-item-view/index.js
var getLinkMarkup, addLinks, updateItemView, main3, init4, better_item_view_default;
var init_better_item_view = __esm({
"src/modules/better-item-view/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
init_styles4();
getLinkMarkup = (name, id) => {
return makeLink("MHCT", `https://www.mhct.win/loot.php?item=${id}`, true) + makeLink("Wiki", `https://mhwiki.hitgrab.com/wiki/index.php/${name}`);
};
addLinks = (itemId) => {
const title = document.querySelector(".itemView-header-name");
if (!title) {
return;
}
const currentLinks = document.querySelector(".mh-item-links");
if (currentLinks) {
currentLinks.remove();
}
const div = document.createElement("div");
div.classList.add("mh-item-links");
div.innerHTML = getLinkMarkup(title.innerText, itemId);
title.append(div);
const values = document.querySelector(".mouseView-values");
const desc = document.querySelector(".mouseView-descriptionContainer");
if (values && desc) {
desc.insertBefore(values, desc.firstChild);
}
};
updateItemView = () => __async(void 0, null, function* () {
const itemView = document.querySelector(".itemViewContainer");
if (!itemView) {
return;
}
const itemId = itemView.getAttribute("data-item-id");
if (!itemId) {
return;
}
const sidebar = document.querySelector(".itemView-sidebar");
if (sidebar) {
const crafting = document.querySelector(".itemView-action.crafting_item");
if (crafting) {
sidebar.append(crafting);
}
}
addLinks(itemId);
const id = Number.parseInt(itemId, 10);
const ignored = [
2473,
// mina's gift
823,
// party charm
803,
// chrome charm
420,
// king's credits
1980,
// king's keys
585
// scrambles
];
if (ignored.includes(id)) {
return;
}
let mhctjson = yield getArForMouse(itemId, "item");
if (!mhctjson || mhctjson === void 0) {
return;
}
itemView.classList.add("mouseview-has-mhct");
const container = itemView.querySelector(".itemView-padding");
if (!container) {
return;
}
const arWrapper = makeElement("div", "ar-wrapper");
const title = makeElement("div", "ar-header");
const titleText = makeElement("div", "ar-title", "Drop Rates", title);
makeTooltip({
appendTo: titleText,
text: 'The best location and bait, according to data gathered by <a href="https://mhct.win/" target="_blank">MHCT</a>.'
});
const link = makeElement("a", "ar-link", "View on MHCT \u2192");
link.href = `https://www.mhct.win/loot.php?item=${itemId}`;
link.target = "_mhct";
title.append(link);
arWrapper.append(title);
const itemsArWrapper = makeElement("div", "item-ar-wrapper");
const hasStages = mhctjson.some((itemAr) => itemAr.stage);
if (hasStages) {
itemsArWrapper.classList.add("has-stages");
}
mhctjson = mhctjson.filter((itemAr) => Number.parseInt(itemAr.drop_pct, 10) > 0).slice(0, 15);
mhctjson.forEach((itemAr) => {
const dropPercent = Number.parseInt(itemAr.drop_pct, 10).toFixed(2);
if (dropPercent !== "0.00") {
const itemArWrapper = makeElement("div", "mouse-ar-wrapper");
makeElement("div", "location", itemAr.location, itemArWrapper);
if (hasStages) {
makeElement("div", "stage", itemAr.stage, itemArWrapper);
}
makeElement("div", "cheese", itemAr.cheese, itemArWrapper);
makeElement("div", "rate", `${dropPercent}%`, itemArWrapper);
itemsArWrapper.append(itemArWrapper);
}
});
if (mhctjson.length > 0) {
arWrapper.append(itemsArWrapper);
container.append(arWrapper);
}
});
main3 = () => {
onOverlayChange({ item: { show: updateItemView } });
onPageChange({ item: { show: updateItemView } });
};
init4 = () => __async(void 0, null, function* () {
addStyles(styles_default3);
main3();
});
better_item_view_default = {
id: "better-item-view",
name: "Better Item View",
type: "better",
default: true,
description: "Shows drop rates, links to MHCT and the wiki, and updates the look of the item view popup.",
load: init4
};
}
});
// src/modules/better-journal/styles/backgrounds.css
var backgrounds_default;
var init_backgrounds = __esm({
"src/modules/better-journal/styles/backgrounds.css"() {
backgrounds_default = ".journal .content .entry.minimalJournalImage{background-position:15px center!important;background-size:40px}.journal .content .entry.labyrinthSmall.minimalJournalImage.labyrinth-clue{background-position:10px center!important;background-size:50px!important}.journal .content .entry,.journal .content .entry.short.misc.custom.adventureBook-journal.goal{background-position:10px center}.journal .content .entry.folkloreForest-bookClaimed{background-position:10px 30px}.journal .content .entry.short.misc.custom.winterTaiga.festiveSpiritLootBoost.minimalJournalImage,.journal .content .entry.short.misc.custom.winterTaiga.workshopPartProduced.minimalJournalImage,.journal .content .entry.short.misc.custom.winterTaiga.frostKingDefeated.minimalJournalImage,.journal .content .entry.short.misc.custom.winterTaiga.shieldDestroyed.minimalJournalImage,.journal .content .entry.short.misc.custom.winterTaiga.shieldDamaged.minimalJournalImage,.journal .content .entry.moved_forward,.journal .content .entry.champions_fire_loot{background-position:10px center!important;background-size:50px!important}.entry.short.misc.custom.denture_base_decay_trigger{background-position:10px;background-size:50px}\n";
}
});
// src/modules/better-journal/styles/date-hiding.css
var date_hiding_default;
var init_date_hiding = __esm({
"src/modules/better-journal/styles/date-hiding.css"() {
date_hiding_default = ".entry.short.refine_pollutinum .journaldate,.entry.short.torch_charm_event .journaldate,.entry.short.unstable_charm_trigger .journaldate,.entry.short.tournamentpointswithloot .journaldate,.entry.short.tournamentpoints .journaldate,.entry.short.rift-bristlewoods-acolyteSandStolen .journaldate,.entry.short.rift-bristlewoods-lootBooster .journaldate,.entry.short.super_rift_vacuum_trigger .journaldate,.entry.short.queso_canyon_queso_pumped .journaldate,.entry.short.custom.chesla_trap_trigger .journaldate,.entry.short.wordCount.minimalJournal .journaldate,.entry.short.folkloreForest.folkloreForest-lootFuelBoost .journaldate,.entry.short.labyrinth.labyrinth-chooseDoor .journaldate,.entry.short.labyrinth.labyrinth-intersection .journaldate,.entry.short.rift-whisker-woods-increase .journaldate{display:none}\n";
}
});
// src/modules/better-journal/styles/fullstop.css
var fullstop_default;
var init_fullstop = __esm({
"src/modules/better-journal/styles/fullstop.css"() {
fullstop_default = '.entry.short.log_summary.stats .fullstop{display:none}.journal .entry .journalbody .journaltext .lucky:after{position:relative;top:unset;display:inline;background:unset}.journal .entry .journaltext br:after{content:" "}.journal .entry.catchsuccessloot .journaltext br,.journal .entry.luckycatchsuccess .journaltext br,.journal .entry.relicHunter_catch .journaltext br:after,.journal .entry.relicHunter_complete .journaltext br:after{content:""}.unstable_charm_trigger .journaltext a:last-of-type:after,.journaltext .loot:last-of-type:after,.journaltext .lucky:last-of-type:after,.journaltext .item:last-of-type:after,.entry.short.supplytransferitem .journaltext a:after,.entry.gloomyGreenwood-incense .journaltext:after,.journal .entry.relicHunter_complete .journaltext b:last-of-type:after,.entry.halloween_boiling_cauldron.brew_finished a:last-of-type:after,.entry.halloween_boiling_cauldron.brew_removed a:last-of-type:after,.entry.badge .journaltext a:after,.entry.folkloreForest.folkloreForest-lootFuelBoost .journaltext:after,.entry.folkloreForest-farmToTable .journaltext a:last-of-type:after,.entry.folkloreForest-forewordFarm.folkloreForest-plantStarted .journaltext a:after,.entry.festiveSpiritLootBoost .journaltext a:after,.entry.golemUpgraded .journaltext a:after,.entry.workshopPartProduced .journaltext a:after,.entry.labyrinthSmall.minimalJournalImage.labyrinth-clue b:after{display:inline;content:"."}.entry.alchemists_cookbook_base_bonus .journaltext .loot:last-of-type:after{content:""}.journal .entry a.lucky:after{top:0;left:0;width:unset;height:unset;background:none}.entry.short.supplytransferitem .journaltext #friend-data-wrapper a:after{content:""}\n';
}
});
// src/modules/better-journal/styles/general.css
var general_default;
var init_general = __esm({
"src/modules/better-journal/styles/general.css"() {
general_default = '.journalEntries{padding-top:5px}.journal .entry .journalbody{margin-top:3px;margin-bottom:3px;margin-left:85px}.journal .entry.minimalJournal .journalbody{margin-left:10px}.journal .entry{position:relative;padding-right:3px;border:1px solid #5b5b5b;border-bottom:none}.journal .entry:last-child{border-bottom:1px solid #a4a4a4}.journal .entry .journalimage{position:absolute;top:0;bottom:0;display:flex;flex-direction:column;align-items:center;justify-content:center;width:65px;height:auto}.shop_purchase .journal .entry .journalimage{margin:15px 0 0 10px}.journal .entry .journalimage a:hover,.journal .entry .journalimage a:focus{overflow:visible}.journal .entry .journalimage a{display:inline-block;width:60px;height:60px;overflow:hidden}.journal .entry a img{width:62px;height:auto;padding:0;margin:-2px;border:1px solid #000}.journal .entry a:hover img,.journal .entry a:focus img{filter:brightness(1.1)}.journal .entry .journalbody .journaltext{margin-right:5px;line-height:20px}.journal .entry .journaltext b{font-weight:400}.journal .entry .journaltext p:first-of-type{margin-top:0}.journal .entry .journaltext>*{line-height:24px}.journal .entry .journalbody .journaldate{display:inline-block;width:calc(100% - 10px);padding-top:5px;padding-bottom:3px;margin-bottom:5px;font-size:11px;font-weight:100;border-bottom:1px solid #717171}.journal-detailLinkContainer a:first-child{display:none}.journal-detailLinkContainer{text-align:center}a.journal-detailLink.full{font-size:11px;text-transform:lowercase;background:none}a.journal-detailLink.full:before{text-transform:capitalize;content:"View "}a.journal-detailLink.full:after{content:" \\2192"}.pagerView-container{background:transparent}.pagerView-link{border:none}.jsingle .journalEntries{padding-top:1px}.journal .entry a:hover img{border:1px solid #6db8ca;outline:1px solid #90d3e4;box-shadow:0 0 6px -2px #e3e31f}.journal .entry .journaltext p:last-of-type{margin-bottom:0}.journal .entry .journaltext .decoration{margin-left:-12px;font-size:21px;vertical-align:top;filter:drop-shadow(0 0 1px #89299e) drop-shadow(0 0 5px #89299e) drop-shadow(0 0 10px #89299e)}.journal .entry .journalbody .journalactions{position:absolute;right:5px;float:none}\n';
}
});
// src/modules/better-journal/styles/gold-points.css
var gold_points_default;
var init_gold_points = __esm({
"src/modules/better-journal/styles/gold-points.css"() {
gold_points_default = '.mh-ui-gold,.mh-ui-points{position:relative;margin-left:22px}.mh-ui-gold:after,.mh-ui-points:after{position:absolute;inset:-4px 0 0 -22px;width:20px;height:20px;content:"";background-image:url(https://www.mousehuntgame.com/images/items/stats/transparent_thumb/dccbaeebbdfa745340ff9363749f35ba.png?cv=2);background-position:center;background-size:contain}.mh-ui-points:after{top:-3px;background-image:url(https://www.mousehuntgame.com/images/items/stats/transparent_thumb/eeebc1c32b4242b95f75041be7275980.png?cv=2)}\n';
}
});
// src/modules/better-journal/styles/icons.css
var icons_default;
var init_icons = __esm({
"src/modules/better-journal/styles/icons.css"() {
icons_default = '.journaltext a[href="https://www.mousehuntgame.com/item.php?item_type=super_brie_cheese"],.journaltext a[href="https://www.mousehuntgame.com/item.php?item_type=chrome_trinket"],.journaltext a[href="https://www.mousehuntgame.com/item.php?item_type=party_trinket"],.journaltext a[href="https://www.mousehuntgame.com/item.php?item_type=snowball_trinket"]{position:relative;padding-left:18px;white-space:nowrap}.journaltext a[href="https://www.mousehuntgame.com/item.php?item_type=super_brie_cheese"]:before,.journaltext a[href="https://www.mousehuntgame.com/item.php?item_type=chrome_trinket"]:before,.journaltext a[href="https://www.mousehuntgame.com/item.php?item_type=party_trinket"]:before,.journaltext a[href="https://www.mousehuntgame.com/item.php?item_type=snowball_trinket"]:before{position:absolute;top:-3px;left:-4px;display:inline-block;width:19px;height:19px;content:"";background-repeat:no-repeat;background-size:contain}.journaltext a[href="https://www.mousehuntgame.com/item.php?item_type=super_brie_cheese"]:before{background-image:url(https://www.mousehuntgame.com/images/items/bait/large/32b20c3984d2f03b132c295ea3b99e7e.png?cv=2)}.journaltext a[href="https://www.mousehuntgame.com/item.php?item_type=chrome_trinket"]{padding-left:15px}.journaltext a[href="https://www.mousehuntgame.com/item.php?item_type=chrome_trinket"]:before{background-image:url(https://i.mouse.rip/upscaled/7d9f0e220db8280b84b8bffe39cd803e.png)}.journaltext a[href="https://www.mousehuntgame.com/item.php?item_type=party_trinket"]{padding-left:15px}.journaltext a[href="https://www.mousehuntgame.com/item.php?item_type=party_trinket"]:before{background-image:url(https://i.mouse.rip/upscaled/8331fe131377c15fcf5c4773bde1fd8f.png)}.journaltext a[href="https://www.mousehuntgame.com/item.php?item_type=snowball_trinket"]{padding-left:15px}.journaltext a[href="https://www.mousehuntgame.com/item.php?item_type=snowball_trinket"]:before{top:-2px;background-image:url(https://www.mousehuntgame.com/images/items/trinkets/large/36d3d62f27e2b76944591f86229bc2f0.png?cv=2)}\n';
}
});
// src/modules/better-journal/styles/link-colors.css
var link_colors_default;
var init_link_colors = __esm({
"src/modules/better-journal/styles/link-colors.css"() {
link_colors_default = '.journal .entry a.item[href="https://www.mousehuntgame.com/item.php?item_type=scavenger_hunt_hint_stat_item"],.journal .entry a.item[href="https://www.mousehuntgame.com/item.php?item_type=map_clue_stat_item"]{color:#1e831e}.journal .entry a.loot[href="https://www.mousehuntgame.com/item.php?item_type=fulminas_gift_convertible"],.journal .entry a.lucky[href="https://www.mousehuntgame.com/item.php?item_type=fulminas_gift_convertible"]{color:#a012a0}\n';
}
});
// src/modules/better-journal/styles/progress-log.css
var progress_log_default;
var init_progress_log = __esm({
"src/modules/better-journal/styles/progress-log.css"() {
progress_log_default = ".journal .entry.log_summary .journalbody{margin-left:10px}.journal .entry.log_summary .journaltext b{display:block;padding-top:1em;font-weight:900}.mh-ui-progress-log-link{display:block;width:100px;margin:1em auto}.log_summary tbody{display:block;margin:0}.entry.short.log_summary{background-color:#fff}#overlayPopup.hunting_summary .label{padding:5px;font-size:13px;background-color:#eee;border:1px solid #ccc}.journal .content .log_summary table td.value{padding-right:10px;font-size:12px;line-height:24px}.journal .content .log_summary table{display:flex;justify-content:center;width:330px}.journal .content .log_summary table td.field{padding-left:10px}.journal .content .log_summary table td.field.mice,.journal .content .log_summary table td.field.points,.journal .content .log_summary table td.field.gold,.journal .content .log_summary table td.field.loot{padding:0 0 4px;font-size:12px;text-align:center}.journal .content .log_summary table tr:nth-child(7){outline:none}.journal .content .log_summary table td.spacer{display:none}.journal .content .log_summary table th{border-color:#c6c6c6}#overlayPopup.hunting_summary .leftColumn,#overlayPopup.hunting_summary .rightColumn{margin-bottom:20px}#overlayPopup.hunting_summary .title{margin:10px;font-size:19px;text-align:center}#overlayPopup.hunting_summary .baitContainer,#overlayPopup.hunting_summary .lootContainer{display:grid;margin-bottom:20px;border:1px solid #ccc}#overlayPopup.hunting_summary .lootContainer{grid-template-columns:1fr 1fr 1fr 1fr}#overlayPopup.hunting_summary .baitContainer .label,#overlayPopup.hunting_summary .lootContainer .label{border-top:none;border-right:none;border-left:none}#overlayPopup.hunting_summary .baitContainer .label{grid-column:span 2}#overlayPopup.hunting_summary .lootContainer .label{grid-column:span 4}#overlayPopup.hunting_summary .lootContainer a .wrapper{padding:3px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#overlayPopup.hunting_summary .miceContainer a{display:grid;grid-template-columns:0 50px auto;align-items:center;padding:6px 0;font-size:10px;line-height:14px}#overlayPopup.hunting_summary .miceContainer{display:grid;grid-template-columns:1fr 1fr;place-items:start stretch}#overlayPopup.hunting_summary .miceContainer .catches{float:none;font-size:11px}#overlayPopup.hunting_summary .miceContainer a img{margin:0 3px}#overlayPopup.hunting_summary .baitContainer a{display:inline-block;float:none;width:auto}#overlayPopup.hunting_summary .lootContainer a{width:160px}#overlayPopup.hunting_summary .baitContainer a .wrapper{font-size:10px}#overlayPopup.hunting_summary .baitContainer a img{width:35px;height:auto;margin-top:6px}#overlayPopup.hunting_summary .baitContainer a b{display:inline-block;padding-bottom:6px}.reportTitle{padding-bottom:.5em;font-size:1.5em}.reportSubtitle{padding-bottom:.75em;font-size:1.125em}\n";
}
});
// src/modules/better-journal/styles/custom-entries/crafting.css
var crafting_default;
var init_crafting = __esm({
"src/modules/better-journal/styles/custom-entries/crafting.css"() {
crafting_default = ".journal .entry.craft.item{min-height:70px}\n";
}
});
// src/modules/better-journal/styles/custom-entries/draw-winner.css
var draw_winner_default;
var init_draw_winner = __esm({
"src/modules/better-journal/styles/custom-entries/draw-winner.css"() {
draw_winner_default = '.journal .entry.drawwinner{box-shadow:inset 0 0 4px 2px #8fc68f;animation:warpathWiggle 1s 5}.journal .entry.drawwinner:after{position:absolute;inset:0;content:"";background:url(https://www.mousehuntgame.com/images/ui/journal/donation_shimmer.png?asset_cache_version=2) no-repeat -130px 0;animation:donationShimmer 5s infinite}\n';
}
});
// src/modules/better-journal/styles/custom-entries/maps.css
var maps_default;
var init_maps2 = __esm({
"src/modules/better-journal/styles/custom-entries/maps.css"() {
maps_default = ".journal .entry.relicHunter_complete .journaltext b{font-weight:700}\n";
}
});
// src/modules/better-journal/styles/custom-entries/other.css
var other_default;
var init_other = __esm({
"src/modules/better-journal/styles/custom-entries/other.css"() {
other_default = ".donationComplete .journalimage img{mix-blend-mode:normal}.journal .relicHunter_slayer_aura_relic_bonus{background-image:url(https://www.mousehuntgame.com/images/items/collectibles/large/a6e804d0d9eeb22ff01660a144521ff1.png?cv=2);background-repeat:no-repeat;background-size:45px!important}\n";
}
});
// src/modules/better-journal/styles/custom-entries/queso-pump.css
var queso_pump_default;
var init_queso_pump = __esm({
"src/modules/better-journal/styles/custom-entries/queso-pump.css"() {
queso_pump_default = ".journal .entry.queso_canyon_queso_pumped{background-image:url(https://www.mousehuntgame.com/images/items/bait/transparent_thumb/06c81c66b0f21f2a8b6a2b989f40bd8d.png?cv=2);background-repeat:no-repeat;background-position:9px;background-size:contain}.journal .entry.queso_canyon_queso_pumped .journalbody{margin-left:63px}.entry.short.queso_canyon_queso_pumped .journalbody{display:flex;align-items:center;justify-content:flex-start;margin:5px 5px 5px 10px;white-space:normal}\n";
}
});
// src/modules/better-journal/styles/custom-entries/rank-up.css
var rank_up_default;
var init_rank_up = __esm({
"src/modules/better-journal/styles/custom-entries/rank-up.css"() {
rank_up_default = '.journal .entry.titlechange{background-image:url(https://www.mousehuntgame.com/images/ui/hud/camp/re_engagement/popup/rank_up_icon.png);background-repeat:no-repeat;background-position:right center;background-size:contain}.journal .entry.titlechange:after{position:absolute;inset:0;pointer-events:none;content:"";background:url(https://www.mousehuntgame.com/images/ui/journal/donation_shimmer.png?asset_cache_version=2) no-repeat -130px 0;filter:hue-rotate(123deg);transition:all .3s;animation:donationShimmer 5s;animation-iteration-count:infinite}@media screen and (prefers-reduced-motion: reduce){.journal .entry.titlechange:after{animation:none}}.journal .content .titlechange .journalimage img,.journal .content .titlechange .journalimage{width:75px}.journal .entry.titlechange .journalbody{text-shadow:0 0 1px #70c9da}\n';
}
});
// src/modules/better-journal/styles/custom-entries/social-gift.css
var social_gift_default;
var init_social_gift = __esm({
"src/modules/better-journal/styles/custom-entries/social-gift.css"() {
social_gift_default = ".socialGift.socialGift-send .journaltext{max-height:60px;padding-right:10px;padding-left:80px;margin-right:-3px;margin-bottom:-4px;margin-left:-80px;overflow-y:auto;box-shadow:inset 0 -20px 15px -16px #999}.journal .entry.socialGift.socialGift-send .journalbody .journaltext{margin-right:-2px;margin-left:-85px}.socialGift.socialGift-send .journaltext #friend-data-wrapper{display:none}.journal .entry.socialGift-send{padding-bottom:0}\n";
}
});
// src/modules/better-journal/styles/custom-entries/tournaments.css
var tournaments_default;
var init_tournaments = __esm({
"src/modules/better-journal/styles/custom-entries/tournaments.css"() {
tournaments_default = ".entry.short.tournamentpointswithloot,.entry.short.tournamentpoints{padding:2px;background:#dbd1b4}.entry.short.tournamentpointswithloot .journalbody,.entry.short.tournamentpoints .journalbody{display:flex;align-items:center;justify-content:flex-start;margin:5px 5px 5px 10px;white-space:normal}\n";
}
});
// src/modules/better-journal/styles/custom-entries/base/alchemist-cookbook.css
var alchemist_cookbook_default;
var init_alchemist_cookbook = __esm({
"src/modules/better-journal/styles/custom-entries/base/alchemist-cookbook.css"() {
alchemist_cookbook_default = ".journal .content .entry.alchemists_cookbook_base_bonus{background-position:10px;background-size:55px!important}.journal .content .entry.alchemists_cookbook_base_bonus .journalbody{margin-left:80px}.journal .entry.alchemists_cookbook_base_bonus{background-position:5px;box-shadow:inset 0 0 20px #ae3fa4}\n";
}
});
// src/modules/better-journal/styles/custom-entries/catch/bonus.css
var bonus_default;
var init_bonus = __esm({
"src/modules/better-journal/styles/custom-entries/catch/bonus.css"() {
bonus_default = ".journal .content .bonuscatchsuccess,.journal .content .bonuscatchfailure{box-shadow:none}.journal .content .bonuscatchsuccess:after,.journal .content .bonuscatchfailure:after,.journal .content .bonuscatchsuccess:before,.journal .content .bonuscatchfailure:before{content:none;background:none}\n";
}
});
// src/modules/better-journal/styles/custom-entries/catch/failure.css
var failure_default;
var init_failure = __esm({
"src/modules/better-journal/styles/custom-entries/catch/failure.css"() {
failure_default = ".journal .content .entry.catchfailure{background-position:0;background-size:75px}\n";
}
});
// src/modules/better-journal/styles/custom-entries/catch/lucky.css
var lucky_default;
var init_lucky = __esm({
"src/modules/better-journal/styles/custom-entries/catch/lucky.css"() {
lucky_default = '.journal .entry.luckycatchsuccess .journalimage:after{background:none}.journal .entry.luckycatchsuccess:after{position:absolute;top:8px;right:10px;width:18px;height:18px;content:"";background:url(https://www.mousehuntgame.com/images/ui/camp/trap/stat_luck.png?asset_cache_version=2);background-repeat:no-repeat;background-size:cover;animation:mh-improved-fade-out 1s ease-out 1s forwards}.journal .entry.luckycatchsuccess .journaltext .luckyCatch{-webkit-text-stroke-color:#7bc95e;-webkit-text-stroke-width:thin}.journal .entry.luckycatchsuccess .journalimage{position:absolute;top:0;bottom:0}\n';
}
});
// src/modules/better-journal/styles/custom-entries/catch/prize.css
var prize_default;
var init_prize = __esm({
"src/modules/better-journal/styles/custom-entries/catch/prize.css"() {
prize_default = ".journal .content .catchsuccessprize{background-color:#7dea7d}\n";
}
});
// src/modules/better-journal/styles/custom-entries/charm/gilded.css
var gilded_default;
var init_gilded = __esm({
"src/modules/better-journal/styles/custom-entries/charm/gilded.css"() {
gilded_default = ".entry.short.misc.custom.chesla_trap_trigger{display:flex;align-items:center;min-height:35px;padding-left:10px;font-size:10px;line-height:15px;background-color:#edd1f3}\n";
}
});
// src/modules/better-journal/styles/custom-entries/charm/rift-vacuum.css
var rift_vacuum_default;
var init_rift_vacuum = __esm({
"src/modules/better-journal/styles/custom-entries/charm/rift-vacuum.css"() {
rift_vacuum_default = ".journal .entry.short.super_rift_vacuum_trigger{box-shadow:0 0 20px #c997de inset}.journal .entry.short.custom.super_rift_vacuum_trigger{background-position:10px 5px;background-size:50px}\n";
}
});
// src/modules/better-journal/styles/custom-entries/charm/torch.css
var torch_default;
var init_torch = __esm({
"src/modules/better-journal/styles/custom-entries/charm/torch.css"() {
torch_default = ".entry.short.misc.custom.torch_charm_event{display:flex;align-items:center;min-height:35px;padding-left:5px;font-size:10px;line-height:15px;background-color:#dcf7ff}.entry.short.misc.custom.torch_charm_event .journalimage{width:55px}.entry.short.misc.custom.torch_charm_event .journalimage img{width:45px;height:45px}\n";
}
});
// src/modules/better-journal/styles/custom-entries/charm/ultimate.css
var ultimate_default;
var init_ultimate = __esm({
"src/modules/better-journal/styles/custom-entries/charm/ultimate.css"() {
ultimate_default = '.journal .content .ultimate_intact,.journal .content .ultimate_pop{background-position:10px}.journal .content .ultimate_intact:after,.journal .content .ultimate_pop:after{position:absolute;top:17px;left:11px;width:48px;height:48px;content:"";outline:1px solid #22eab4}\n';
}
});
// src/modules/better-journal/styles/custom-entries/charm/unstable.css
var unstable_default;
var init_unstable = __esm({
"src/modules/better-journal/styles/custom-entries/charm/unstable.css"() {
unstable_default = ".entry.short.misc.custom.unstable_charm_trigger{display:flex;align-items:center;min-height:35px;padding-left:5px;font-size:10px;line-height:15px;background-color:#dcf7ff}.journal .entry.short.misc.custom.unstable_charm_trigger .journaltext{max-width:265px;margin-left:-10px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.entry.short.misc.custom.unstable_charm_trigger .journalimage{width:55px}.journal .entry.short.misc.custom.unstable_charm_trigger .journalimage img{width:45px;height:45px}\n";
}
});
// src/modules/better-journal/styles/custom-entries/location/brift.css
var brift_default;
var init_brift = __esm({
"src/modules/better-journal/styles/custom-entries/location/brift.css"() {
brift_default = ".journal .entry.burroughs_rift.danger_zone{background-color:#ccdfe2;background-position:10px center;background-size:59px}\n";
}
});
// src/modules/better-journal/styles/custom-entries/location/bwrift.css
var bwrift_default;
var init_bwrift = __esm({
"src/modules/better-journal/styles/custom-entries/location/bwrift.css"() {
bwrift_default = ".entry.short.rift-bristlewoods-acolyteSandStolen{padding:2px;background:#ffc16e}.entry.short.rift-bristlewoods-acolyteSandStolen .journalbody{display:flex;align-items:center;justify-content:flex-start;margin:5px 5px 5px 10px;white-space:normal}\n";
}
});
// src/modules/better-journal/styles/custom-entries/location/folklore-forest.css
var folklore_forest_default;
var init_folklore_forest = __esm({
"src/modules/better-journal/styles/custom-entries/location/folklore-forest.css"() {
folklore_forest_default = '.journal .entry.folkloreForest.folkloreForest-lootFuelBoost{min-height:unset;background-color:#b6f1d1}.entry.folkloreForest-farmToTable .journaltext a:nth-last-of-type(2):after{content:" and "}.journal .entry.folkloreForest-tableOfContents.wordCount{font-size:13px;background-color:#fff9ee;box-shadow:inset 0 0 9px -2px #a78f77}.journal .entry.folkloreForest-tableOfContents.wordCount:after{position:absolute;top:1px;left:20px;width:37px;height:37px;color:#d9bb92;content:"";background-image:url(https://www.mousehuntgame.com/images/folklore_forest_upgrades/golden_quill_thumb.png?cv=2);background-repeat:no-repeat;background-size:cover;mix-blend-mode:luminosity}\n';
}
});
// src/modules/better-journal/styles/custom-entries/location/frift.css
var frift_default;
var init_frift = __esm({
"src/modules/better-journal/styles/custom-entries/location/frift.css"() {
frift_default = '.journal .entry.riftFuroma{position:relative}.journal .entry.riftFuroma-energyLost .journalbody{margin-left:80px}.journal .entry.riftFuroma-energyLost .journalbody:before{position:absolute;top:-12px;left:-96px;display:block;width:75px;height:80px;content:"";background-image:url(https://www.mousehuntgame.com/images/ui/hud/rift_furoma/droid.png?asset_cache_version=2);filter:grayscale(1);background-repeat:no-repeat;background-position:0 -100px;background-size:110%;mix-blend-mode:luminosity}\n';
}
});
// src/modules/better-journal/styles/custom-entries/location/halloween.css
var halloween_default;
var init_halloween = __esm({
"src/modules/better-journal/styles/custom-entries/location/halloween.css"() {
halloween_default = ".journal .entry.gloomyGreenwood-incense{background-color:#ffc277}\n";
}
});
// src/modules/better-journal/styles/custom-entries/location/labyrinth.css
var labyrinth_default;
var init_labyrinth = __esm({
"src/modules/better-journal/styles/custom-entries/location/labyrinth.css"() {
labyrinth_default = ".entry.short.misc.custom.labyrinth.labyrinth-chooseDoor,.entry.short.misc.custom.labyrinth.labyrinth-intersection{display:flex;align-items:center}\n";
}
});
// src/modules/better-journal/styles/custom-entries/location/toxic-spill.css
var toxic_spill_default;
var init_toxic_spill = __esm({
"src/modules/better-journal/styles/custom-entries/location/toxic-spill.css"() {
toxic_spill_default = ".entry.short.misc.custom.refine_pollutinum{display:flex;align-items:center;min-height:35px;padding-left:5px;font-size:10px;line-height:15px;background-color:#7f7;background-position:20px;background-size:25px}.entry.short.misc.custom.torch_charm_event .refine_pollutinum{width:55px}\n";
}
});
// src/modules/better-journal/styles/custom-entries/location/vrift.css
var vrift_default;
var init_vrift = __esm({
"src/modules/better-journal/styles/custom-entries/location/vrift.css"() {
vrift_default = ".journal .entry.rift_valour.minimalJournalImage.enter_tower .journaltext,.journal .entry.rift_valour.minimalJournalImage.no_loot_retreat .journaltext,.journal .entry.rift_valour.minimalJournalImage.upgrade_longstride .journaltext,.journal .entry.rift_valour.minimalJournalImage.upgrade_stamina .journaltext,.journal .entry.rift_valour.minimalJournalImage.upgrade_siphon .journaltext{padding-top:0}.journal .entry.rift_valour.moved_forward{background-color:#6dd5fb}\n";
}
});
// src/modules/better-journal/styles/custom-entries/location/wwrift.css
var wwrift_default;
var init_wwrift = __esm({
"src/modules/better-journal/styles/custom-entries/location/wwrift.css"() {
wwrift_default = ".entry.short.rift-whisker-woods-increase .journalbody{margin:0 30px;font-size:10px;text-align:center}\n";
}
});
// src/modules/better-journal/styles/custom-entries/mouse/glazy.css
var glazy_default;
var init_glazy = __esm({
"src/modules/better-journal/styles/custom-entries/mouse/glazy.css"() {
glazy_default = ".mh-dark-mode .entry.short.catchsuccessloot[data-mouse-type=glazed],.entry.short.catchsuccessloot[data-mouse-type=glazed]{color:#000!important;background-color:#fcdb28;box-shadow:0 0 10px 8px #fdee96 inset}.mh-dark-mode .entry.short.catchsuccessloot[data-mouse-type=glazed] a{color:#3b5998}\n";
}
});
// src/modules/better-journal/styles/custom-entries/mouse/stuck-snowball.css
var stuck_snowball_default;
var init_stuck_snowball = __esm({
"src/modules/better-journal/styles/custom-entries/mouse/stuck-snowball.css"() {
stuck_snowball_default = ".journal .entry.stuck_snowball_catch{background:#a5d6fb}\n";
}
});
// src/modules/better-journal/styles/index.js
var main4, styles_default4;
var init_styles5 = __esm({
"src/modules/better-journal/styles/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
init_backgrounds();
init_date_hiding();
init_fullstop();
init_general();
init_gold_points();
init_icons();
init_link_colors();
init_progress_log();
init_crafting();
init_draw_winner();
init_maps2();
init_other();
init_queso_pump();
init_rank_up();
init_social_gift();
init_tournaments();
init_alchemist_cookbook();
init_bonus();
init_failure();
init_lucky();
init_prize();
init_gilded();
init_rift_vacuum();
init_torch();
init_ultimate();
init_unstable();
init_brift();
init_bwrift();
init_folklore_forest();
init_frift();
init_halloween();
init_labyrinth();
init_toxic_spill();
init_vrift();
init_wwrift();
init_glazy();
init_stuck_snowball();
main4 = () => {
const stylesToAdd = [
general_default,
backgrounds_default,
date_hiding_default,
fullstop_default,
progress_log_default,
gold_points_default,
link_colors_default,
crafting_default,
draw_winner_default,
maps_default,
other_default,
queso_pump_default,
rank_up_default,
social_gift_default,
tournaments_default,
alchemist_cookbook_default,
bonus_default,
failure_default,
lucky_default,
prize_default,
gilded_default,
rift_vacuum_default,
torch_default,
ultimate_default,
unstable_default,
brift_default,
bwrift_default,
folklore_forest_default,
frift_default,
halloween_default,
labyrinth_default,
toxic_spill_default,
vrift_default,
wwrift_default,
glazy_default,
stuck_snowball_default
];
if (getFlag("journal-icons")) {
stylesToAdd.push(icons_default);
}
addStyles(stylesToAdd);
};
styles_default4 = main4;
}
});
// src/modules/better-journal/index.js
var modifyText, wrapGoldAndPoints, maybeKeepAsOriginal, maybeRestoreOriginalEntry, updateJournalText, updateMouseImageLinks, kingsPromoTextChange, main5, init5, better_journal_default;
var init_better_journal = __esm({
"src/modules/better-journal/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
init_styles5();
modifyText = (selector, strings) => __async(void 0, null, function* () {
const elements = document.querySelectorAll(selector);
elements.forEach((element) => __async(void 0, null, function* () {
strings.forEach((string) => __async(void 0, null, function* () {
if (!Array.isArray(string) || string.length !== 2) {
return;
}
const oldText = element.innerHTML;
const newText = oldText.replace(string[0], string[1]);
if (oldText !== newText) {
element.innerHTML = newText;
}
}));
}));
});
wrapGoldAndPoints = () => {
const entries = document.querySelectorAll(".journal .entry");
if (!entries.length) {
return;
}
entries.forEach((entry) => {
if (entry.getAttribute("data-modified-points-gold")) {
return;
}
entry.setAttribute("data-modified-points-gold", true);
const points = entry.innerHTML.match(/worth (.+?) points/i);
const gold = entry.innerHTML.match(/points and (.+?) gold/i);
if (points) {
entry.innerHTML = entry.innerHTML.replace(points[0], `worth <span class="mh-ui-points">${points[1]}</span> points`);
}
if (gold) {
entry.innerHTML = entry.innerHTML.replace(gold[0], `points and <span class="mh-ui-gold">${gold[1]}</span> gold`);
}
});
};
maybeKeepAsOriginal = (entry) => {
const keepOriginalMice = [
// 'stuck_snowball',
];
const entryId = entry.getAttribute("data-entry-id");
if (!entryId) {
return;
}
const hasOriginal = entry.getAttribute("data-is-custom-entry");
if (hasOriginal) {
return;
}
const isMouse = entry.getAttribute("data-mouse-type");
if (isMouse && keepOriginalMice.includes(isMouse)) {
const entryText = entry.querySelector(".journaltext");
if (entryText) {
sessionSet(`mhui-custom-entry-${entryId}`, entryText.innerHTML);
entry.setAttribute("data-is-custom-entry", true);
}
}
};
maybeRestoreOriginalEntry = (entry) => {
const entryId = entry.getAttribute("data-entry-id");
const originalText = sessionGet(`mhui-custom-entry-${entryId}`);
if (originalText) {
entry.querySelector(".journaltext").innerHTML = originalText;
}
};
updateJournalText = () => {
wrapGoldAndPoints();
const entries = document.querySelectorAll(".journal .entry");
entries.forEach((entry) => {
maybeKeepAsOriginal(entry);
});
modifyText(".journal .entry .journalbody .journaltext", [
// Hunt entries
["I sounded the Hunter's Horn and was successful in the hunt!", ""],
["where I was successful in my hunt! I", "and"],
["I went on a hunt with", "I hunted with"],
[/\d+? oz. /i, ""],
[/\d+? lb. /i, ""],
[/from (\d+?) x/i, "from $1"],
[/purchased (\d+?) x/i, "purchased $1"],
["<br><b>The mouse also dropped the following loot:</b>", "==DROPREPLACE=="],
[".<br>==DROPREPLACE==<br>", " that dropped "],
["<br>==DROPREPLACE==<br>", " that dropped "],
["I caught an", "I caught a"],
["I caught a", "<p>I caught a"],
["found that I had caught a mouse! I", ""],
["found that I had caught a mouse! <p>I", ""],
["I checked my trap and caught", "I checked my trap and found"],
["I returned to check my trap, but it appeared", "I checked my trap, but"],
["was successful in the hunt! I", ""],
["where I was successful in my hunt! I", "and"],
["my efforts were fruitless. A", "a"],
["got <font", "was <font"],
["trap.<br><br>Additionally, the fiend pillaged", "trap, and stealing"],
["gold from me!", "gold."],
["trap.<br><br>Additionally, the power of this mouse crippled my courage, setting me back", "trap and I lost"],
// Map entries
["I successfully completed ", "Completing "],
["! Everyone who helped has been rewarded with", " gave me"],
[" each!", ", I can "],
["claim my reward", "claim the reward."],
["now!", ""],
[", ending the hunt!", "."],
["View Map Summary", ""],
// Other
["I should hunt and catch a Relic Hunter or visit a Cartographer to obtain a new Treasure Map!", ""],
["hunt and catch a Relic Hunter or ", "I can "],
["Treasure Map!", "Treasure Map."],
[", causing my trap to glimmer with a magnificent shine", ""],
[", causing my trap to sparkle with a fiendish glow", ""],
[", causing my trap to spark with lightning", ""],
["!The", "! The"],
["(Local Time)", ""],
["and your item(s) have been", ""],
[":</b><br>", "</b> "],
[/<a href="receipt.php.+?view receipt<\/a>/i, ""],
["me:<br>", "me "],
[/i should tell my friends to check .+? during the next .+? to catch one!/i, ""],
[/i can go to my .+? to open it/i, ""],
["Luckily she was not interested in my cheese or charms!", ""],
["while she was in my trap, but", "and"],
[" while scampering off!", ""],
["The mouse stole", " The mouse stole"],
["Chest, I can", "Chest, "],
["<br>I should ", "I can "],
["<br>I can ", "I can "],
[" I replaced my bait since it seemed to be stale.", ""],
["*POP* Your Unstable Charm pops off your trap and has", "My Unstable Charm"],
["You quickly add it to your inventory!", ""],
["I quickly added it to my inventory!", ""],
[" burned out and left behind ", " turned into "],
[" a elusive ", " a "],
["I moved forward a whopping", "I moved forward"],
["!I", "! I"],
["in search of more loot", ""],
["or I can return to the", "or return to the"],
[" and begin a new expedition", ""],
[" ate a piece of cheese without setting off my trap.", " stole my cheese."],
["slowly collapsed into itself with a powerful force, compressing mist in the air into an ", "compressed mist in the air into an "],
["Your S.U.P.E.R. Scum Scrubber scrubbed the mouse clean and found ", "My trap found an extra "],
["You scrubba-lubba-dub-dubbed your barrel and refined ", "I refined "],
["an additional 1 ", "an additional "],
[">.", ">"],
[", and ", " and "],
["!.,", "!"],
["My tower's ", "My "],
["Energy Cannon", "cannon"],
["before it could even touch my cheese!", ""],
["The mouse dropped the following prize", "that dropped"],
["My Unstable Charm turned into", "My Unstable Charm became"],
["\u2022 ", " "],
["My Condensed Creativity created additional loot:", "My Condensed Creativity created an additional "],
["The mouse stole an Ancient Relic and dropped a Relic Hunter Scroll Case", "The mouse stole an Ancient Relic and dropped a Relic Hunter Scroll Case!"],
["*BLING*", '<span class="decoration">\u2728\uFE0F</span>'],
// Event stuff
// SEH
[/was.+chocolatonium.+trap!/i, ""],
// Halloween
[/an additional:<br>/i, "an additional "],
[/ · /g, ""],
[/(\d+?) x /gi, " \xB7 $1 x "],
["<p></p>", ""]
]);
const replacements = [];
const sehWords = [
"chocoholic",
"chocolate-crazed",
"voracious",
"gluttonous",
"hypoglycemic",
"ravenous",
"greedy",
"hungry",
"hyperactive",
"sugar-induced"
];
sehWords.forEach((word) => {
replacements.push([`A ${word}`, "I caught a bonus"]);
});
modifyText(".journal .entry.custom .journalbody .journaltext", replacements);
const log = document.querySelector(".journal .content .log_summary");
if (log) {
const link = log.querySelector("td a");
if (link) {
link.classList.add("mh-ui-progress-log-link", "mousehuntActionButton", "tiny", "lightBlue");
const span = document.createElement("span");
span.innerText = "View Progress Log";
link.innerText = "";
link.append(span);
}
}
const restoreEntries = document.querySelectorAll(".journal .entry[data-is-custom-entry]");
restoreEntries.forEach((entry) => {
maybeRestoreOriginalEntry(entry);
});
};
updateMouseImageLinks = () => {
const mouseEntries = document.querySelectorAll(".journal .entry[data-mouse-type]");
mouseEntries.forEach((entry) => {
const mouseType = entry.getAttribute("data-mouse-type");
const mouseImageLink = entry.querySelector(".journalimage a[onclick]");
if (!(mouseType && mouseImageLink)) {
return;
}
mouseImageLink.setAttribute("onclick", `hg.views.MouseView.show('${mouseType}'); return false;`);
});
};
kingsPromoTextChange = () => {
const kingsPromo = document.querySelector(".shopsPage-kingsCalibratorPromo");
if (kingsPromo) {
kingsPromo.innerHTML = kingsPromo.innerHTML.replace("and even", "and");
}
};
main5 = () => {
updateJournalText();
updateMouseImageLinks();
};
init5 = () => __async(void 0, null, function* () {
styles_default4();
main5();
onRequest(kingsPromoTextChange, "managers/ajax/users/dailyreward.php");
onRequest(() => {
main5();
setTimeout(main5, 300);
setTimeout(main5, 900);
});
if (getSetting("better-journal-privacy")) {
journalPrivacy();
}
});
better_journal_default = {
id: "better-journal",
name: "Better Journal",
type: "better",
default: true,
description: "Modify the journal text, layout, and styling.",
load: init5
};
}
});
// src/modules/better-kings-reward/styles.css
var styles_default5;
var init_styles6 = __esm({
"src/modules/better-kings-reward/styles.css"() {
styles_default5 = ".puzzleView__imageContainer{background-color:transparent;border-color:#73332a;border-width:1px}.puzzleView__image img{filter:hue-rotate(333deg);transform:scale(1.3) translate(-10px,5px);transform-origin:left}.puzzleView__requestNewPuzzleButton{background-color:#a35721;opacity:.3;transition:opacity .2s ease-in-out}.puzzleView__requestNewPuzzleButton:hover,.puzzleView__requestNewPuzzleButton:focus{border-color:transparent;opacity:1}.puzzleView__requestNewPuzzleButtonIcon{filter:invert(1);opacity:.8}input.puzzleView__code{font-size:28px;letter-spacing:8px}\n";
}
});
// src/modules/better-kings-reward/index.js
var continueOnKingsReward, initiateKingsReward, startKingsReward, init6, better_kings_reward_default;
var init_better_kings_reward = __esm({
"src/modules/better-kings-reward/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
init_styles6();
continueOnKingsReward = (req) => {
if (req.success && req.puzzle_reward) {
const resume = document.querySelector(".puzzleView__resumeButton");
if (resume) {
resume.click();
}
}
};
initiateKingsReward = () => {
const reward = document.querySelector(".huntersHornMessageView huntersHornMessageView--puzzle .huntersHornMessageView__action");
if (reward) {
reward.click();
}
};
startKingsReward = () => {
const rewardStart = document.querySelector(".huntersHornMessageView--puzzle .huntersHornMessageView__action");
if (rewardStart) {
rewardStart.click();
}
setTimeout(() => {
const puzzle = document.querySelector(".puzzleView__code");
if (puzzle) {
puzzle.focus();
}
}, 500);
};
init6 = () => __async(void 0, null, function* () {
addStyles(styles_default5);
onRequest(initiateKingsReward, "managers/ajax/turns/activeturn.php", true);
onRequest(continueOnKingsReward, "managers/ajax/users/puzzle.php", true);
onRequest(startKingsReward);
startKingsReward();
});
better_kings_reward_default = {
id: "better-kings-reward",
name: "Better King's Reward",
type: "better",
default: true,
description: "Updates the style of the King's Reward slightly, automatically closes the success message",
load: init6
};
}
});
// src/modules/better-maps/modules/helper.js
var openMiniMap, makeMenuItem, helper_default;
var init_helper = __esm({
"src/modules/better-maps/modules/helper.js"() {
init_sentry_release_injection_stub();
init_utils4();
openMiniMap = (mapId) => __async(void 0, null, function* () {
const mapData2 = yield doRequest("managers/ajax/users/treasuremap.php", {
action: "map_info",
map_id: mapId
});
const t = mapData2.treasure_map;
createPopup({
title: "map",
content: `<div class="mh-improved-map-helper-popup-content">
<div class="row">
<div class="title">
map_id
</div>
<div class="value">
${t.map_id}
</div>
</div>
<div class="row">
<div class="title">
map_class
</div>
<div class="value">
${t.map_class}
</div>
</div>
<div class="row">
<div class="title">
map_type
</div>
<div class="value">
${t.map_type}
</div>
</div>
<div class="row">
<div class="title">
invite_mode
</div>
<div class="value">
${t.invite_mode} (${t.invite_mode_names[t.invite_mode]} - ${t.invite_mode_descriptions[t.invite_mode]})
</div>
</div>
<div class="row">
<div class="title">
is_listed
</div>
<div class="value">
${t.is_listed}
</div>
</div>
<div class="row">
<div class="title">
name
</div>
<div class="value">
${t.name}
</div>
</div>
<div class="row">
<div class="title">
thumb
</div>
<div class="value">
${t.thumb}
</div>
</div>
<div class="row">
<div class="title">
quality
</div>
<div class="value">
${t.quality}
</div>
</div>
<div class="row">
<div class="title">
is_upgraded
</div>
<div class="value">
${t.is_upgraded}
</div>
</div>
<div class="row">
<div class="title">
is_complete
</div>
<div class="value">
${t.is_complete}
</div>
</div>
<div class="row">
<div class="title">
is_owner
</div>
<div class="value">
${t.is_owner}
</div>
</div>
<div class="row">
<div class="title">
num_active_hunters
</div>
<div class="value">
${t.num_active_hunters}
</div>
</div>
<div class="row">
<div class="title">
viewing_user_is_on_map
</div>
<div class="value">
${t.viewing_user_is_on_map}
</div>
</div>
<div class="row">
<div class="title">
min_title_name
</div>
<div class="value">
${t.min_title_name}
</div>
</div>
<div class="row">
<div class="title">
min_title_wisdom
</div>
<div class="value">
${t.min_title_wisdom}
</div>
</div>
<div class="row">
<div class="title">
max_hunters
</div>
<div class="value">
${t.max_hunters}
</div>
</div>
<div class="row">
<div class="title">
invited_hunters
</div>
<div class="value">
${t.invited_hunters.join(", ")}
</div>
</div>
<div class="row">
<div class="title">
invite_requests
</div>
<div class="value">
${t.invite_requests.join(", ")}
</div>
</div>
<div class="row">
<div class="title">
goals.mouse
</div>
<div class="value">
${t.goals.mouse.map((m) => {
return `<div class="mouse">
<div class="unique_id">${m.unique_id}</div>
<div class="model_type">${m.model_type}</div>
<div class="type">${m.type}</div>
<div class="name">${m.name}</div>
<div class="small">${m.small}</div>
<div class="large">${m.large}</div>
<div class="group">${m.group}</div>
<div class="sub_group">${m.sub_group}</div>
<div class="is_landscape">${m.is_landscape}</div>
<div class="environment_ids">${m.environment_ids.join(", ")}</div>
</div>`;
}).join("")}
</div>
</div>
<div class="row">
<div class="title">
hunters
</div>
<div class="value">
${t.hunters.map((h) => {
return `<div class="hunter">
<div class="name">${h.name}</div>
<div class="user_id">${h.user_id}</div>
<div class="sn_user_id">${h.sn_user_id}</div>
<div class="profile_pic">${h.profile_pic}</div>
<div class="environment_name">${h.environment_name}</div>
<div class="environment_id">${h.environment_id}</div>
<div class="environment_icon">${h.environment_icon}</div>
<div class="is_online">${h.is_online}</div>
<div class="last_active_formatted">${h.last_active_formatted}</div>
<div class="base_name">${h.base_name}</div>
<div class="base_thumb">${h.base_thumb}</div>
<div class="weapon_name">${h.weapon_name}</div>
<div class="weapon_thumb">${h.weapon_thumb}</div>
<div class="bait_name">${h.bait_name}</div>
<div class="bait_thumb">${h.bait_thumb}</div>
<div class="trinket_name">${h.trinket_name}</div>
<div class="trinket_thumb">${h.trinket_thumb}</div>
<div class="is_active">${h.is_active}</div>
<div class="display_order">${h.display_order}</div>
<div class="captain">${h.captain}</div>
<div class="upgrader">${h.upgrader}</div>
</div>`;
}).join("")}
</div>
</div>
<div class="row">
<div class="title">
environments
</div>
<div class="value">
${t.environments.map((e) => {
return `<div class="environment">
${e.name} (${e.type})
<div class="thumb">${e.thumb}</div>
<div class="header">${e.header}</div>
</div>`;
}).join("")}
</div>
</div>
</div>`,
className: "mh-improved-map-helper-popup",
show: true
});
});
makeMenuItem = () => {
var _a, _b, _c, _d, _e, _f, _g, _h;
removeSubmenuItem("mh-improved-map-helper");
const mapId = (_b = (_a = user == null ? void 0 : user.quests) == null ? void 0 : _a.QuestRelicHunter) == null ? void 0 : _b.default_map_id;
if (!mapId) {
return;
}
addSubmenuItem({
id: "mh-improved-map-helper",
menu: "camp",
label: `<span class="title">${(_d = (_c = user == null ? void 0 : user.quests) == null ? void 0 : _c.QuestRelicHunter) == null ? void 0 : _d.label}</span><span class="subtitle">${(_f = (_e = user == null ? void 0 : user.quests) == null ? void 0 : _e.QuestRelicHunter) == null ? void 0 : _f.value}</span>`,
icon: ((_h = (_g = user == null ? void 0 : user.quests) == null ? void 0 : _g.QuestRelicHunter) == null ? void 0 : _h.image) || "https://www.mousehuntgame.com/images/items/convertibles/large/bfca4a1c658e49903654d0a84f52c9fd.png",
callback: () => {
openMiniMap(mapId);
}
});
};
helper_default = () => {
makeMenuItem();
onRequest(makeMenuItem);
};
}
});
// src/modules/better-maps/modules/toggle-ar.js
var addArDataToMap, toggleAr, maybeClickArToggle, addArToggle, removeArToggle;
var init_toggle_ar = __esm({
"src/modules/better-maps/modules/toggle-ar.js"() {
init_sentry_release_injection_stub();
init_utils4();
addArDataToMap = (mapData2) => __async(void 0, null, function* () {
var _a, _b;
let type = "mouse";
if (((_a = mapData2 == null ? void 0 : mapData2.goals) == null ? void 0 : _a.mouse.length) === 0) {
type = "item";
}
const mice = ((_b = mapData2 == null ? void 0 : mapData2.goals) == null ? void 0 : _b[type]) || [];
if (!mice || mice.length === 0) {
return;
}
const goals = document.querySelectorAll(".treasureMapView-goals-groups");
if (goals && goals.length > 0) {
let hasAdded = false;
goals.forEach((goal) => {
if (goal.classList.contains("mh-ui-ar-hidden")) {
goal.classList.remove("mh-ui-ar-hidden");
hasAdded = true;
}
});
if (hasAdded) {
return;
}
}
mice.forEach((mouse) => __async(void 0, null, function* () {
const mouseEl = document.querySelector(`.treasureMapView-goals-group-goal[data-unique-id="${mouse.unique_id}"]`);
if (!mouseEl) {
return;
}
if (mouseEl.classList.contains("complete")) {
return;
}
if (mouseEl.getAttribute("data-mh-ui-ar")) {
const existing = mouseEl.querySelector(".mh-ui-ar");
if (existing) {
existing.remove();
}
}
const name = mouseEl.querySelector(".treasureMapView-goals-group-goal-name");
if (!name) {
return;
}
const arEl = yield getArEl(mouse.unique_id, type);
if (!arEl) {
return;
}
name.append(arEl);
mouseEl.setAttribute("data-mh-ui-ar", true);
}));
});
toggleAr = () => __async(void 0, null, function* () {
const mapView = document.querySelector(".treasureMapView");
if (!mapView) {
return;
}
const toggle = mapView.querySelector(".mh-ui-toggle-ar-button");
if (!toggle) {
return;
}
toggle.classList.add("disabled");
const text = toggle.querySelector(".toggle-ar-text");
if (!text) {
return;
}
let arText = "AR";
let arTitle = "Attraction Rates";
const mapClass = mapView.classList.toString();
if (mapClass.includes("scavenger")) {
arText = "DR";
arTitle = "Drop Rates";
}
const showing = mapView.classList.contains("mh-ui-ar-showing");
if (showing) {
mapView.classList.remove("mh-ui-ar-showing");
mapView.classList.add("mh-ui-ar-hidden");
text.innerText = `Show ${arText}`;
toggle.title = `Show ${arTitle}`;
} else {
mapView.classList.add("mh-ui-ar-showing");
mapView.classList.remove("mh-ui-ar-hidden");
text.innerText = "\xB7\xB7\xB7";
yield addArDataToMap(mapper("mapData"));
text.innerText = `Hide ${arText}`;
toggle.title = `Hide ${arTitle}`;
}
toggle.classList.remove("disabled");
});
maybeClickArToggle = () => {
const mapView = document.querySelector(".treasureMapView");
if (!mapView) {
return;
}
const toggle = mapView.querySelector(".mh-ui-toggle-ar-button");
if (!toggle) {
return;
}
const showing = mapView.classList.contains("mh-ui-ar-showing");
const currentButtonState = toggle.querySelector(".toggle-ar-text").innerText.replace("AR", "").replace("DR", "").trim();
if (showing && currentButtonState !== "Hide") {
toggle.click();
} else if (!showing && currentButtonState !== "Show") {
toggle.click();
}
};
addArToggle = (tab = "goals") => __async(void 0, null, function* () {
const mapView = document.querySelector(".treasureMapView");
if (!mapView) {
return;
}
const exists = document.querySelector(".mh-ui-toggle-ar-button");
if (exists) {
exists.classList.remove("hidden");
if ("goals" === tab && mapView.classList.contains("mh-ui-ar-showing")) {
addArDataToMap(mapper("mapData"));
}
return;
}
const wrapper = document.querySelector(".treasureMapRootView-subTabRow");
if (!wrapper) {
return;
}
const toggle = makeElement("button", ["mousehuntActionButton", "tiny", "mh-ui-toggle-ar-button"]);
let arText = "AR";
let arTitle = "Attraction Rates";
if (mapper("mapData").is_scavenger_hunt) {
arText = "DR";
arTitle = "Drop Rates";
}
makeElement("span", "toggle-ar-text", `Show ${arText}`, toggle);
toggle.title = `Show ${arTitle}`;
toggle.addEventListener("click", toggleAr);
wrapper.append(toggle);
yield toggleAr();
maybeClickArToggle();
});
removeArToggle = () => {
const toggle = document.querySelector(".mh-ui-toggle-ar-button");
if (toggle) {
toggle.classList.add("hidden");
}
};
}
});
// src/modules/better-maps/modules/highlighting.js
var areaHighlightingVrift, areaHighlightingFrox, areaHighlightingFloatingIslands, getProfilePic, addProfilePicToCurrentFloor, highlighting_default;
var init_highlighting = __esm({
"src/modules/better-maps/modules/highlighting.js"() {
init_sentry_release_injection_stub();
init_utils4();
areaHighlightingVrift = () => {
if ("rift_valour" !== getCurrentLocation()) {
return false;
}
let currentFloorState = (user.quests.QuestRiftValour.floor || 0) % 8;
if (user.quests.QuestRiftValour.is_at_eclipse) {
currentFloorState = "eclipse";
if (user.enviroment_atts.active_augmentations.tu) {
currentFloorState = "eclipse-uu";
}
} else if ("farming" === user.quests.QuestRiftValour.state) {
currentFloorState = "outside";
}
const floorCategory = document.querySelector(`.mouse-category-wrapper.mouse-category-vrift-${currentFloorState}`);
if (!floorCategory) {
return false;
}
floorCategory.classList.add("mouse-category-current-floor");
return true;
};
areaHighlightingFrox = () => {
if ("fort_rox" !== getCurrentLocation()) {
return false;
}
let mapArea = "day";
if (user.quests.QuestFortRox) {
const phase = user.quests.QuestFortRox.current_phase || "day";
if ("day" === phase) {
mapArea = "day";
} else if ("dawn" === phase) {
mapArea = "dawn";
} else if ("night" === phase) {
mapArea = "night";
}
}
const floorCategory = document.querySelector(`.mouse-category-wrapper.mouse-category-${mapArea}`);
if (!floorCategory) {
return false;
}
floorCategory.classList.add("mouse-category-current-floor");
return true;
};
areaHighlightingFloatingIslands = () => {
var _a, _b;
if ("floating_islands" !== getCurrentLocation()) {
return false;
}
const fiAtts = ((_b = (_a = user == null ? void 0 : user.quests) == null ? void 0 : _a.QuestFloatingIslands) == null ? void 0 : _b.hunting_site_atts) || {};
let islandType = "";
if (fiAtts.is_high_tier_island) {
islandType = "hai";
} else if (fiAtts.is_low_tier_island) {
islandType = "lai";
} else if (fiAtts.is_vault_island) {
islandType = "sp";
}
const powerTypeMappings = {
arcn: "arcane",
frgttn: "forgotten",
hdr: "hydro",
shdw: "shadow",
drcnc: "draconic",
law: "law",
phscl: "physical",
tctcl: "tactical"
};
const islandPowerType = powerTypeMappings[fiAtts.island_power_type] || "";
const floorCategory = document.querySelector(`.mouse-category-wrapper.mouse-category-esp-${islandPowerType}`);
if (!floorCategory) {
return false;
}
floorCategory.classList.add("mouse-category-current-floor");
const floorSubCategory = document.querySelector(`.mouse-category-wrapper.mouse-category-esp-${islandPowerType} .mouse-subcategory-${islandType}`);
if (floorSubCategory) {
floorSubCategory.classList.add("mouse-subcategory-current-floor");
}
return true;
};
getProfilePic = () => __async(void 0, null, function* () {
var _a, _b;
const userData = yield doRequest("managers/ajax/pages/friends.php", {
action: "get_friends_by_snuids",
"snuids[]": user.sn_user_id
});
return ((_b = (_a = userData == null ? void 0 : userData.friends) == null ? void 0 : _a[0]) == null ? void 0 : _b.profile_pic) || "https://www.mousehuntgame.com//images/ui/friends/anonymous_user.png";
});
addProfilePicToCurrentFloor = () => __async(void 0, null, function* () {
const existing = document.querySelector("#mh-mapper-current-floor-profile-pic");
if (existing) {
return;
}
const profPic = yield getProfilePic();
const styleElement = document.createElement("style");
styleElement.id = "mh-mapper-current-floor-profile-pic";
styleElement.innerHTML = `.mouse-category-wrapper.mouse-category-current-floor .mouse-category-header::after,
.mouse-subcategory-wrapper.mouse-subcategory-current-floor .mouse-subcategory-header::after {
background-image: url(${profPic});
}`;
document.body.append(styleElement);
});
highlighting_default = () => {
const data = mapData();
if (!data) {
return;
}
const mapType = data.map_type;
const existing = document.querySelector(".mouse-category-current-floor");
if (existing) {
existing.classList.remove("mouse-category-current-floor");
}
let added = false;
switch (mapType) {
case "sky_palace":
added = areaHighlightingFloatingIslands();
break;
case "fort_rox":
added = areaHighlightingFrox();
break;
case "valour_rift":
added = areaHighlightingVrift();
break;
default:
break;
}
if (added) {
addProfilePicToCurrentFloor();
}
};
}
});
// src/data/map-groups.json
var map_groups_default;
var init_map_groups = __esm({
"src/data/map-groups.json"() {
map_groups_default = {
sky_palace: {
categories: [
{
name: "Arcane",
id: "esp-arcane",
icon: "/powertypes/arcane.png",
color: "#b4ffff",
mice: [
"sky_dancer",
"sky_glass_glazier",
"sky_glass_sorcerer",
{
mouse: "arcane_paragon",
subcategory: "hai"
},
{
mouse: "sky_highborne",
subcategory: "hai"
},
{
mouse: "empyrean_arcane_mouse",
subcategory: "sp"
}
]
},
{
name: "Draconic",
id: "esp-draconic",
icon: "/powertypes/draconic.png",
color: "#cf9e64",
mice: [
"dragon_breather",
"dragon_lancer",
"tiny_dragonfly",
{
mouse: "draconic_paragon",
subcategory: "hai"
},
{
mouse: "regal_spearman",
subcategory: "hai"
},
{
mouse: "empyrean_draconic_mouse",
subcategory: "sp"
}
]
},
{
name: "Forgotten",
id: "esp-forgotten",
icon: "/powertypes/forgotten.png",
color: "#c37aa1",
mice: [
"cumulost",
"spry_sky_explorer",
"spry_sky_seer",
{
mouse: "forgotten_paragon",
subcategory: "hai"
},
{
mouse: "spheric_diviner",
subcategory: "hai"
},
{
mouse: "empyrean_forgotten_mouse",
subcategory: "sp"
}
]
},
{
name: "Hydro",
id: "esp-hydro",
icon: "/powertypes/hydro.png",
color: "#a0dcff",
mice: [
"cute_cloud_conjurer",
"nimbomancer",
"sky_surfer",
{
mouse: "hydro_paragon",
subcategory: "hai"
},
{
mouse: "mist_maker",
subcategory: "hai"
},
{
mouse: "empyrean_hydro_mouse",
subcategory: "sp"
}
]
},
{
name: "Law",
id: "esp-law",
icon: "/powertypes/law.png",
color: "#efcf86",
mice: [
"devious_gentleman",
"lawbender",
"stack_of_thieves",
{
mouse: "law_paragon",
subcategory: "hai"
},
{
mouse: "agent_m",
subcategory: "hai"
},
{
mouse: "empyrean_law_mouse",
subcategory: "sp"
}
]
},
{
name: "Physical",
id: "esp-physical",
icon: "/powertypes/physical.png",
color: "#d98181",
mice: [
"ground_gavaleer",
"heracles",
"sky_swordsman",
{
mouse: "physical_paragon",
subcategory: "hai"
},
{
mouse: "sky_squire",
subcategory: "hai"
},
{
mouse: "empyrean_physical_mouse",
subcategory: "sp"
}
]
},
{
name: "Shadow",
id: "esp-shadow",
icon: "/powertypes/shadow.png",
color: "#a4c0c1",
mice: [
"astrological_astronomer",
"overcaster",
"stratocaster",
{
mouse: "shadow_paragon",
subcategory: "hai"
},
{
mouse: "shadow_sage",
subcategory: "hai"
},
{
mouse: "empyrean_shadow_mouse",
subcategory: "sp"
}
]
},
{
name: "Tactical",
id: "esp-tactical",
icon: "/powertypes/tactical.png",
color: "#cc8282",
mice: [
"gyrologer",
"seasoned_islandographer",
"worried_wayfinder",
{
mouse: "tactical_paragon",
subcategory: "hai"
},
{
mouse: "captain_cloudkicker",
subcategory: "hai"
},
{
mouse: "empyrean_tactical_mouse",
subcategory: "sp"
}
]
},
{
name: "Sky Palace",
id: "esp-sky_palace",
icon: "/items/stats/large/dd362c178b67d5e45fda7b2da273e7d6.png",
color: "#a3fec4",
mice: [
"empyrean_charm_hoarder",
"empyrean_oreglass_miner",
"empyrean_cloudstone_miner",
"empyrean_treasure_guardian"
]
},
{
name: "Pirates",
id: "esp-pirates",
icon: "/items/bait/large/1e7bf5043a13043d8f1d05a752d55469.png",
color: "#f173bf",
mice: [
"admiral_cloudbeard",
"cutthroat_cannoneer",
"cutthroat_pirate",
"mairitime_pirate",
"empyrean_pirate",
"scarlet_revenger",
"suave_pirate"
]
},
{
name: "Other",
icon: "/items/stats/large/66b6a6a48a0c83cec5a15a286bd17749.png",
color: "#",
mice: [
"daydreamer",
"kite_flyer",
"richard_rich",
"empyrean_loot_cache_guardian"
]
},
{
name: "Wardens",
id: "esp-wardens",
icon: "/items/convertibles/large/017121852a8cc100b40bdaeae01485db.png",
color: "#d3bdd3",
mice: [
"fog_warden",
"frost_warden",
"rain_warden",
"wind_warden"
]
},
{
name: "Launchpad",
id: "esp-launchpad",
icon: "/items/stats/large/66b6a6a48a0c83cec5a15a286bd17749.png",
color: "#c2c2c2",
mice: [
"cloud_miner",
"launchpad_labourer",
"sky_greaser",
"skydiver"
]
}
],
subcategories: [
{
id: "hai",
name: "High Altitude Island"
},
{
id: "sp",
name: "Sky Palace"
}
]
},
farming_and_fishing: {
categories: [
{
name: "Farm",
id: "fofo-farm",
icon: "/folklore_forest_upgrades/farm_plot_2_thumb.png",
color: "#d7b18b",
mice: [
"angry_aphid",
"crazed_cultivator",
"grit_grifter",
"mighty_mite",
"root_rummager",
"wily_weevil",
{
mouse: "crazed_cultivator",
subcategory: "sb"
},
{
mouse: "land_loafer",
subcategory: "zero-plants"
},
{
mouse: "loathsome_locust",
subcategory: "three-papyrus"
}
]
},
{
name: "Prologue Pond",
id: "fofo-pond",
icon: "/folklore_forest_upgrades/tackle_box_thumb.png",
color: "#c3def5",
mice: [
"beachcomber",
"sand_sifter",
"tackle_tracker",
{
mouse: "covetous_coastguard",
subcategory: "sb"
}
]
},
{
name: "Prologue Pond",
subtitle: "Grubben",
icon: "/items/bait/large/90d54a45bde5a369b22d53ee5362e701.png",
color: "#fbc3fa",
mice: [
"pompous_perch",
"careless_catfish",
"melodramatic_minnow"
]
},
{
name: "Prologue Pond",
subtitle: "Clamebert",
icon: "/items/bait/large/bdef6fb2ed84af400a941e2fd1b0ec03.png",
color: "#f3e0ff",
mice: [
"nefarious_nautilus",
"vicious_vampire_squid",
"sinister_squid"
]
},
{
name: "Bosses",
id: "fofo-bosses",
icon: "/items/stats/large/262ee00dd81b7fbdf7a5a88b347e7847.png",
color: "#fde671",
mice: [
"monstrous_midge",
"architeuthulhu_of_the_abyss"
]
}
],
subcategories: [
{
id: "sb",
name: "SUPER|brie+"
},
{
id: "zero-plants",
name: "Zero Plants"
},
{
id: "three-papyrus",
name: "Three Papyrus Plants"
}
]
},
folklore_forest_prelude: {
categories: [
{
name: "Farm",
id: "fofo-farm",
icon: "/folklore_forest_upgrades/farm_plot_2_thumb.png",
color: "#d7b18b",
mice: [
"angry_aphid",
"grit_grifter",
"crazed_cultivator",
"mighty_mite",
"wily_weevil",
{
mouse: "crazed_cultivator",
subcategory: "sb"
},
{
mouse: "land_loafer",
subcategory: "zero-plants"
},
{
mouse: "loathsome_locust",
subcategory: "three-papyrus"
}
]
},
{
name: "Prologue Pond",
id: "fofo-pond",
icon: "/folklore_forest_upgrades/tackle_box_thumb.png",
color: "#c3def5",
mice: [
"beachcomber",
"sand_sifter",
"tackle_tracker",
{
mouse: "covetous_coastguard",
subcategory: "sb"
}
]
},
{
name: "Prologue Pond",
subtitle: "Grubben",
icon: "/items/bait/large/90d54a45bde5a369b22d53ee5362e701.png",
color: "#fbc3fa",
mice: [
"pompous_perch",
"careless_catfish",
"melodramatic_minnow"
]
},
{
name: "Prologue Pond",
subtitle: "Clamebert",
icon: "/items/bait/large/bdef6fb2ed84af400a941e2fd1b0ec03.png",
color: "#f3e0ff",
mice: [
"nefarious_nautilus",
"vicious_vampire_squid",
"sinister_squid"
]
},
{
name: "Table of Contents",
subtitle: "Not Writing",
id: "fofo-toc-not-writing",
icon: "/folklore_forest_upgrades/silver_quill_thumb.png",
mice: [
"brothers_grimmaus",
"hans_cheesetian_squeakersen",
"madame_dormouse",
{
mouse: "matriarch_gander",
subcategory: "sb"
}
]
},
{
name: "Table of Contents",
subtitle: "Writing",
id: "fofo-toc-writing",
icon: "/folklore_forest_upgrades/golden_quill_thumb.png",
color: "#e9c390",
mice: [
"humphrey_dumphrey",
"little_bo_squeak",
"little_miss_fluffet"
]
},
{
name: "Table of Contents",
subtitle: "Writing - First Draft",
id: "fofo-toc-first-draft",
icon: "/items/bait/large/9782ba50ed4c64f8f8412563cf2ce709.png",
mice: [
"fibbocchio",
"pinkielina",
"princess_and_the_olive"
]
},
{
name: "Table of Contents",
subtitle: "Writing - Second Draft",
id: "fofo-toc-second-draft",
icon: "/items/bait/large/e0cb22771eba37bf047a801edbf7f91e.png",
mice: [
"flamboyant_flautist",
"greenbeard",
"ice_regent"
]
},
{
name: "Bosses",
id: "fofo-bosses",
icon: "/items/stats/large/262ee00dd81b7fbdf7a5a88b347e7847.png",
color: "#fde671",
mice: [
"bitter_grammarian",
"mythweaver",
"monstrous_midge",
"architeuthulhu_of_the_abyss"
]
}
],
subcategories: [
{
id: "sb",
name: "SUPER|brie+"
},
{
id: "zero-plants",
name: "Zero Plants"
},
{
id: "three-papyrus",
name: "Three Papyrus Plants"
}
]
},
valour_rift: {
categories: [
{
name: "Puppetry",
subtitle: "Floors 1, 9, 17, 25",
id: "vrift-1",
color: "#EAF2D3",
mice: [
"rift_gaunt_puppet",
"rift_gaunt_puppet_champ"
]
},
{
name: "Thievery",
subtitle: "Floors 2, 10, 18, 26",
id: "vrift-2",
color: "#acf28d",
mice: [
"rift_gaunt_thief",
"rift_gaunt_thief_champ"
]
},
{
name: "Melee",
subtitle: "Floors 3, 11, 19, 27",
id: "vrift-3",
color: "#FCE5CD",
mice: [
"rift_gaunt_melee",
"rift_gaunt_melee_champ"
]
},
{
name: "Bard",
subtitle: "Floors 4, 12, 20, 28",
id: "vrift-4",
color: "#F6B26B",
mice: [
"rift_gaunt_bard",
"rift_gaunt_bard_champ"
]
},
{
name: "Magic",
subtitle: "Floors 5, 13, 21, 29",
id: "vrift-5",
color: "#F9CB9C",
mice: [
"rift_gaunt_magic",
"rift_gaunt_magic_champ"
]
},
{
name: "Noble",
subtitle: "Floors 6, 14, 22, 30",
id: "vrift-6",
color: "#F4CCCC",
mice: [
"rift_gaunt_noble",
"rift_gaunt_noble_champ"
]
},
{
name: "Dusty",
subtitle: "Floors 7, 15, 23, 31",
id: "vrift-7",
color: "#E06666",
mice: [
"rift_gaunt_dust",
"rift_gaunt_dust_champ"
]
},
{
name: "Non-UU",
id: "vrift-eclipse",
color: "#EA9999",
mice: [
"rift_gaunt_eclipse"
]
},
{
name: "Ultimate Umbra",
id: "vrift-eclipse-uu",
color: "#ff8181",
mice: [
"rift_gaunt_monster",
"rift_gaunt_final_eclipse"
]
},
{
name: "Other",
id: "vrift-other",
color: "#B6D7A8",
mice: [
"rift_gaunt_generic_one",
"rift_gaunt_generic_three",
"rift_gaunt_generic_two",
"rift_gaunt_prestige_low",
"rift_gaunt_prestige_med",
"rift_gaunt_prestige_high",
"rift_gaunt_rare"
]
},
{
name: "Outside",
id: "vrift-outside",
icon: "",
color: "#d0def7",
mice: [
"rift_gaunt_elixir_one",
"rift_gaunt_elixir_two"
]
}
],
subcategories: []
},
rift_stalkers: {
categories: [
{
name: "Gnawnia Rift",
color: "#f7e8f9",
mice: [
"rift_white",
"rift_dwarf",
"rift_diamond",
"rift_gold"
]
},
{
name: "Furoma Rift",
subtitle: "Training Grounds",
color: "#e5a571",
mice: [
"rift_samurai",
"rift_kung_fu",
"rift_worker",
"rift_ninja",
"rift_dumpling_chef",
"rift_archer"
]
},
{
name: "Furoma Rift",
subtitle: "Pagoda",
color: "#cb7136",
mice: [
"rift_assassin",
"rift_monk",
"rift_fang_student",
"rift_belt_student",
"rift_claw_student",
"rift_dojo_sensei",
"rift_fang_master",
"rift_claw_master",
"rift_belt_master",
"rift_dojo_master"
]
},
{
name: "Bristle Woods Rift",
mice: [
"rift_acolyte",
"rift_chrono",
"rift_gargoyle",
"rift_golem",
"rift_gorgon",
"rift_keeper",
"rift_keepers_assistant",
"rift_lich",
"rift_ooze",
"rift_reaper",
"rift_scavenger",
"rift_skeleton",
"rift_sorcerer",
"rift_spectre",
"rift_spider",
"rift_terror_knight",
"rift_wight"
]
}
]
},
rift_walkers: {
categories: [
{
name: "Gnawnia Rift",
color: "#f7e8f9",
mice: [
"rift_field",
"rift_bionic",
"rift_granite",
"rift_steel",
"rift_white",
"rift_grey",
"rift_brown",
"rift_lightning",
"rift_dwarf",
"rift_tiny",
"rift_cowardly",
"rift_spotted",
"rift_flying",
"rift_mole",
"rift_diamond",
"rift_gold"
]
}
]
},
queso_canyon_grand_tour: {
categories: [
{
name: "KSS",
id: "kss",
color: "#96b9dc",
icon: "/powertypes/draconic.png",
mice: [
"geyser_eruption_dragon_wildfire",
"geyser_eruption_dragon_epic"
]
},
{
name: "Cinder-Brut",
id: "cinder-brut",
color: "#7fff66",
icon: "/powertypes/draconic.png",
mice: [
"geyser_eruption_dragon_large",
"geyser_eruption_dragon_flaming"
]
},
{
name: "BE Trio",
id: "be-trio",
color: "#ffb1b1",
icon: "/powertypes/draconic.png",
mice: [
"geyser_eruption_dragon_hot",
"geyser_eruption_dragon_medium",
"geyser_eruption_dragon_medium_spice"
]
},
{
name: "Sizzle Mild",
id: "sizzle-mild",
color: "#ffc816",
icon: "/powertypes/draconic.png",
mice: [
"geyser_eruption_dragon_small",
"geyser_eruption_dragon_mild"
]
},
{
name: "Pressure Set",
id: "pressure-set",
color: "#dcb8ff",
icon: "/items/stats/transparent_thumb/209ca347c42ff56071ddd50f087a5bb8.png?cv=2",
mice: [
"geyser_pressure_builder_hot",
"geyser_pressure_builder_medium",
"geyser_pressure_builder_mild",
"geyser_pressure_builder_flaming"
]
},
{
name: "Corky & Friends",
id: "corky-friends",
color: "#f4c47e",
icon: "/items/crafting_items/transparent_thumb/17907f705fe8e7fa8f7b94f058e11ae5.png?cv=2",
mice: [
"geyser_cork_dropper_bland",
"geyser_cork_dropper_medium",
"geyser_cork_dropper_mild",
"geyser_cork_dropper_hot",
"geyser_cork_dropper_rare",
"geyser_cork_dropper_flaming"
]
},
{
name: "Queso River",
id: "queso-river",
color: "#89e8a9",
icon: "/powertypes/law.png",
mice: [
"croquet_crusher",
"pump_raider",
"sleepy_merchant",
"tiny_saboteur"
]
},
{
name: "Prickly Plains",
id: "prickly-plains",
color: "#cddb75",
icon: "/powertypes/arcane.png",
mice: [
{
mouse: "spice_grower",
subcategory: "mild"
},
{
mouse: "spice_collector",
subcategory: "bland"
},
{
mouse: "spice_farmer",
subcategory: "mild"
},
{
mouse: "spice_finder",
subcategory: "medium"
},
{
mouse: "spice_raider",
subcategory: "hot"
},
{
mouse: "spice_reaper",
subcategory: "hot"
},
{
mouse: "spice_seer",
subcategory: "bland"
},
{
mouse: "spice_sovereign",
subcategory: "medium"
}
]
},
{
name: "Cantera Quarry",
id: "cantera-quarry",
color: "#e9b2db",
icon: "/powertypes/shadow.png",
mice: [
{
mouse: "chip_chiseler",
subcategory: "bland"
},
{
mouse: "fiery_crusher",
subcategory: "hot"
},
{
mouse: "grampa_golem",
subcategory: "hot"
},
{
mouse: "nachore_golem",
subcategory: "medium"
},
{
mouse: "ore_chipper",
subcategory: "mild"
},
{
mouse: "rubble_rouser",
subcategory: "medium"
},
{
mouse: "rubble_rummager",
subcategory: "mild"
},
{
mouse: "tiny_toppler",
subcategory: "bland"
}
]
}
],
subcategories: [
{
id: "bland",
name: "Bland Queso"
},
{
id: "medium",
name: "Medium Queso"
},
{
id: "mild",
name: "Mild Queso"
},
{
id: "hot",
name: "Hot Queso"
}
]
},
fort_rox: {
categories: [
{
name: "Night",
id: "night",
color: "#d0d0d0",
icon: "",
mice: [
"were_alpha",
"moonstone_slinger",
"mischievous_wereminer",
"wealthy_werewarrior"
]
},
{
name: "First Light / Utter Darkness",
id: "first-light-utter-darkness",
color: "#dc8ec7",
icon: "/powertypes/arcane.png",
mice: [
"arcane_summoner",
"cursed_taskmaster",
"moonstone_golem",
"moonstone_mystic",
"night_watcher",
"nightfire_wallbreak"
]
},
{
name: "Twilight, Midnight, Pitch",
id: "twilight-midnight-pitch",
color: "#84c3ff",
icon: "/powertypes/shadow.png",
mice: [
"good_supply_night",
"nightmancer",
"reveling_lycanthrope",
"werehauler",
"wereminer"
]
},
{
name: "Dawn",
id: "dawn",
color: "#f9d65a",
icon: "/powertypes/arcane.png",
mice: [
"dawn_guardian",
"monster_of_the_meteor"
]
},
{
name: "Day",
id: "day",
color: "#ffdb9c",
icon: "/powertypes/law.png",
mice: [
"hardworking_hauler",
"moonstone_snacker",
"moonstone_miner",
"good_supply_day",
"mischievous_moonstone_miner"
]
}
]
},
warpath: {
categories: [
{
name: "Wave 1",
color: "#f1d16f",
mice: [
"desert_scout_weak",
"desert_warrior_weak",
"desert_archer_weak"
]
},
{
name: "Wave 2",
color: "#ea947b",
mice: [
"desert_mage",
"desert_archer",
"desert_warrior",
"desert_scout",
"desert_cavalry"
]
},
{
name: "Wave 3",
color: "#ff7249",
mice: [
"desert_artillery",
"desert_mage_strong",
"desert_scout_epic",
"desert_archer_epic",
"desert_cavalry_strong",
"desert_warrior_epic"
]
},
{
name: "Wave 4",
color: "#ffad49",
mice: [
"desert_elite_gaurd",
"desert_boss"
]
},
{
name: "Any wave",
color: "#fffcb2",
mice: [
"desert_beast",
"desert_supply",
"desert_general"
]
}
]
},
halloween_treat_2021: {
categories: [
{
name: "Standard",
id: "standard",
icon: "https://www.mousehuntgame.com/images/items/bait/large/bb0fe6fa6f55e5ccb1f98dea058409e0.png?cv=2",
color: "#fefa76",
mice: [
"grey_recluse",
"hween_cobweb",
"vampira",
"zombot_unipire",
"candy_cat",
"candy_goblin",
"shortcut",
"tricky_witch",
"sweet_tooth"
]
},
{
name: "Monterey Jack-O-Lantern",
id: "monterey-Jack",
icon: "https://www.mousehuntgame.com/images/items/bait/large/65fd19bf5b16dcaa6b3cfebd2f55348c.png?cv=2",
color: "#f9a645",
mice: [
"sprit_light",
"gordborg",
"pumpkin_hoarder",
"trick",
"treat",
"chainsaw",
"maize_harvester"
]
}
]
},
halloween_trick_2021: {
categories: [
{
name: "Bonefort",
id: "bonefort",
icon: "https://www.mousehuntgame.com/images/items/bait/large/e6ac92f19a6ac930aad02e317cf8e6e8.png?cv=2",
color: "#bfbfbf",
mice: [
"creepy_marionette",
"dire_lycan",
"grave_digger",
"hollowhead",
"hween_2014_boss",
"hween_2016_boss",
"hween_2013_boss",
"rift_grave_digger"
]
},
{
name: "Polter-Geitost",
id: "polter-geitost",
icon: "https://www.mousehuntgame.com/images/items/bait/large/04d69ccc7a5b1578cdf90b9651fb2315.png?cv=2",
color: "#84bde6",
mice: [
"hween_2018_boss",
"hween_2017_boss",
"rift_ghost_pirate",
"gourd_ghoul",
"scorned_pirate",
"spectral_butler",
"spectral_swashbuckler"
]
},
{
name: "Scream",
id: "scream",
icon: "https://www.mousehuntgame.com/images/items/bait/large/fe9d538d1a811bdb787b78aa1526ee50.png?cv=2",
color: "#86dd6c",
mice: [
"hween_2021_boss",
"hween_2015_boss",
"hollowed_demon",
"hollowed_minion",
"hween_2012_boss"
]
}
]
},
naughty_f_list: {
categories: [
{
name: "Anywhere",
id: "anywhere",
icon: "https://www.mousehuntgame.com/images/items/stats/large/680f6a68612ca9181a90b5719b20ef78.png?cv=2",
color: "#3f8bae",
mice: [
"hoarder",
{
mouse: "winter_hunt_toy_strong",
subcategory: "pp"
},
{
mouse: "stuck_snowball",
subcategory: "pp"
},
{
mouse: "glazed",
subcategory: "pp"
},
{
mouse: "joy",
subcategory: "gpp"
}
]
},
{
name: "Cinnamon Hill",
id: "cinnamon_hill",
icon: "https://www.mousehuntgame.com/images/environments/9116f87ec4f9ef3be13a1a833a61aec4.jpg?cv=2",
color: "#c76e39",
mice: [
"candy_cane",
"nice_knitting",
"winter_boss_2019",
"snow_scavenger",
"toboggan_technician",
"green_circle_boss",
{
mouse: "triple_lutz",
subcategory: "pp"
},
{
mouse: "black_diamond_racer",
subcategory: "pp"
},
{
mouse: "double_black_diamond",
subcategory: "pp"
},
{
mouse: "free_skiing",
subcategory: "pp"
},
{
mouse: "winter_boss_2020",
subcategory: "pp"
},
{
mouse: "nitro_racer",
subcategory: "pp"
},
{
mouse: "winter_boss_2021",
subcategory: "pp"
},
{
mouse: "winter_boss_2015",
subcategory: "pp"
},
{
mouse: "snowball_general_one",
subcategory: "pp"
},
{
mouse: "golem_jockey",
subcategory: "pp"
},
{
mouse: "snowball_hoarder",
subcategory: "pp"
},
{
mouse: "sporty_ski_instructor",
subcategory: "pp"
},
{
mouse: "wreath_thief",
subcategory: "pp"
},
{
mouse: "new_year_flight",
subcategory: "pp"
}
]
},
{
name: "Golem Workshop",
id: "golem_workshop",
icon: "https://www.mousehuntgame.com/images/environments/bbd5eeca404e57ec2ffb9d9a108361a2.jpg?cv=2",
color: "#9ab1b4",
mice: [
"gingerbread",
"greedy_al",
"winter_future",
"winter_past",
"winter_present",
{
mouse: "scrooge",
subcategory: "sb"
},
{
mouse: "ribbon",
subcategory: "pp"
},
{
mouse: "christmas_tree",
subcategory: "pp"
},
{
mouse: "winter_hunt_toy",
subcategory: "pp"
},
{
mouse: "elf",
subcategory: "pp"
},
{
mouse: "mad_elf",
subcategory: "pp"
},
{
mouse: "nutcracker",
subcategory: "pp"
},
{
mouse: "ornament",
subcategory: "pp"
},
{
mouse: "present",
subcategory: "pp"
},
{
mouse: "ridiculous_sweater",
subcategory: "pp"
},
{
mouse: "snowman_architect",
subcategory: "pp"
},
{
mouse: "stocking",
subcategory: "pp"
},
{
mouse: "toy",
subcategory: "pp"
},
{
mouse: "toy_builder",
subcategory: "pp"
},
{
mouse: "disco_ball_head",
subcategory: "pp"
}
]
},
{
name: "Ice Fortress",
id: "ice_fortress",
icon: "https://www.mousehuntgame.com/images/environments/15d8d9d837b22b31707d06f412b78e0d.jpg?cv=2",
color: "#cc85fe",
mice: [
"confused_courier",
"frigid_foreman",
"miser",
"missle_toe",
"snowblower",
"snowglobe",
"builder",
{
mouse: "builder",
subcategory: "pp"
},
{
mouse: "winter_boss_2014",
subcategory: "pp"
},
{
mouse: "glacia_ice_fist",
subcategory: "pp"
},
{
mouse: "winter_boss_2016",
subcategory: "pp"
},
{
mouse: "winter_boss_2018",
subcategory: "pp"
},
{
mouse: "winter_boss_2017",
subcategory: "pp"
},
{
mouse: "snowball_general_two",
subcategory: "pp"
},
{
mouse: "snowball_bully",
subcategory: "pp"
},
{
mouse: "slay",
subcategory: "pp"
},
{
mouse: "snow_fort",
subcategory: "pp"
},
{
mouse: "snowball_general_three",
subcategory: "pp"
},
{
mouse: "squeaker_claws",
subcategory: "pp"
},
{
mouse: "tundra_huntress",
subcategory: "pp"
},
{
mouse: "new_years",
subcategory: "pp"
},
{
mouse: "winter_boss_2022",
subcategory: "boss"
}
]
}
],
subcategories: [
{
id: "pp",
name: "Pecan Pecorino"
},
{
id: "gpp",
name: "Glazed Pecan Pecorino"
},
{
id: "sb",
name: "SUPER|brie+"
},
{
id: "boss",
name: "Boss"
}
]
},
nice_f_list: {
categories: [
{
name: "Anywhere",
id: "anywhere",
icon: "https://www.mousehuntgame.com/images/items/stats/large/680f6a68612ca9181a90b5719b20ef78.png?cv=2",
color: "#3f8bae",
mice: [
"hoarder",
{
mouse: "winter_hunt_toy_strong",
subcategory: "pp"
},
{
mouse: "stuck_snowball",
subcategory: "pp"
},
{
mouse: "glazed",
subcategory: "pp"
},
{
mouse: "joy",
subcategory: "gpp"
}
]
},
{
name: "Cinnamon Hill",
id: "cinnamon_hill",
icon: "https://www.mousehuntgame.com/images/environments/9116f87ec4f9ef3be13a1a833a61aec4.jpg?cv=2",
color: "#c76e39",
mice: [
"candy_cane",
"nice_knitting",
"winter_boss_2019",
"snow_scavenger",
"toboggan_technician",
"green_circle_boss",
{
mouse: "triple_lutz",
subcategory: "pp"
},
{
mouse: "black_diamond_racer",
subcategory: "pp"
},
{
mouse: "double_black_diamond",
subcategory: "pp"
},
{
mouse: "free_skiing",
subcategory: "pp"
},
{
mouse: "winter_boss_2020",
subcategory: "pp"
},
{
mouse: "nitro_racer",
subcategory: "pp"
},
{
mouse: "winter_boss_2021",
subcategory: "pp"
},
{
mouse: "winter_boss_2015",
subcategory: "pp"
},
{
mouse: "snowball_general_one",
subcategory: "pp"
},
{
mouse: "golem_jockey",
subcategory: "pp"
},
{
mouse: "snowball_hoarder",
subcategory: "pp"
},
{
mouse: "sporty_ski_instructor",
subcategory: "pp"
},
{
mouse: "wreath_thief",
subcategory: "pp"
},
{
mouse: "new_year_flight",
subcategory: "pp"
}
]
},
{
name: "Golem Workshop",
id: "golem_workshop",
icon: "https://www.mousehuntgame.com/images/environments/bbd5eeca404e57ec2ffb9d9a108361a2.jpg?cv=2",
color: "#9ab1b4",
mice: [
"gingerbread",
"greedy_al",
"winter_future",
"winter_past",
"winter_present",
{
mouse: "scrooge",
subcategory: "sb"
},
{
mouse: "ribbon",
subcategory: "pp"
},
{
mouse: "christmas_tree",
subcategory: "pp"
},
{
mouse: "winter_hunt_toy",
subcategory: "pp"
},
{
mouse: "elf",
subcategory: "pp"
},
{
mouse: "mad_elf",
subcategory: "pp"
},
{
mouse: "nutcracker",
subcategory: "pp"
},
{
mouse: "ornament",
subcategory: "pp"
},
{
mouse: "present",
subcategory: "pp"
},
{
mouse: "ridiculous_sweater",
subcategory: "pp"
},
{
mouse: "snowman_architect",
subcategory: "pp"
},
{
mouse: "stocking",
subcategory: "pp"
},
{
mouse: "toy",
subcategory: "pp"
},
{
mouse: "toy_builder",
subcategory: "pp"
},
{
mouse: "disco_ball_head",
subcategory: "pp"
}
]
},
{
name: "Ice Fortress",
id: "ice_fortress",
icon: "https://www.mousehuntgame.com/images/environments/15d8d9d837b22b31707d06f412b78e0d.jpg?cv=2",
color: "#cc85fe",
mice: [
"confused_courier",
"frigid_foreman",
"miser",
"missle_toe",
"snowblower",
"snowglobe",
"builder",
{
mouse: "builder",
subcategory: "pp"
},
{
mouse: "winter_boss_2014",
subcategory: "pp"
},
{
mouse: "glacia_ice_fist",
subcategory: "pp"
},
{
mouse: "winter_boss_2016",
subcategory: "pp"
},
{
mouse: "winter_boss_2018",
subcategory: "pp"
},
{
mouse: "winter_boss_2017",
subcategory: "pp"
},
{
mouse: "snowball_general_two",
subcategory: "pp"
},
{
mouse: "snowball_bully",
subcategory: "pp"
},
{
mouse: "slay",
subcategory: "pp"
},
{
mouse: "snow_fort",
subcategory: "pp"
},
{
mouse: "snowball_general_three",
subcategory: "pp"
},
{
mouse: "squeaker_claws",
subcategory: "pp"
},
{
mouse: "tundra_huntress",
subcategory: "pp"
},
{
mouse: "new_years",
subcategory: "pp"
},
{
mouse: "winter_boss_2022",
subcategory: "boss"
}
]
}
],
subcategories: [
{
id: "pp",
name: "Pecan Pecorino"
},
{
id: "gpp",
name: "Glazed Pecan Pecorino"
},
{
id: "sb",
name: "SUPER|brie+"
},
{
id: "boss",
name: "Boss"
}
]
},
new_years: {
categories: [
{
name: "Anywhere",
id: "anywhere",
icon: "https://www.mousehuntgame.com/images/items/stats/large/680f6a68612ca9181a90b5719b20ef78.png?cv=2",
color: "#3f8bae",
mice: [
"hoarder",
{
mouse: "winter_hunt_toy_strong",
subcategory: "pp"
},
{
mouse: "stuck_snowball",
subcategory: "pp"
},
{
mouse: "glazed",
subcategory: "pp"
},
{
mouse: "joy",
subcategory: "gpp"
}
]
},
{
name: "Cinnamon Hill",
id: "cinnamon_hill",
icon: "https://www.mousehuntgame.com/images/environments/9116f87ec4f9ef3be13a1a833a61aec4.jpg?cv=2",
color: "#c76e39",
mice: [
"candy_cane",
"nice_knitting",
"winter_boss_2019",
"snow_scavenger",
"toboggan_technician",
"green_circle_boss",
{
mouse: "triple_lutz",
subcategory: "pp"
},
{
mouse: "black_diamond_racer",
subcategory: "pp"
},
{
mouse: "double_black_diamond",
subcategory: "pp"
},
{
mouse: "free_skiing",
subcategory: "pp"
},
{
mouse: "winter_boss_2020",
subcategory: "pp"
},
{
mouse: "nitro_racer",
subcategory: "pp"
},
{
mouse: "winter_boss_2021",
subcategory: "pp"
},
{
mouse: "winter_boss_2015",
subcategory: "pp"
},
{
mouse: "snowball_general_one",
subcategory: "pp"
},
{
mouse: "golem_jockey",
subcategory: "pp"
},
{
mouse: "snowball_hoarder",
subcategory: "pp"
},
{
mouse: "sporty_ski_instructor",
subcategory: "pp"
},
{
mouse: "wreath_thief",
subcategory: "pp"
},
{
mouse: "new_year_flight",
subcategory: "pp"
}
]
},
{
name: "Golem Workshop",
id: "golem_workshop",
icon: "https://www.mousehuntgame.com/images/environments/bbd5eeca404e57ec2ffb9d9a108361a2.jpg?cv=2",
color: "#9ab1b4",
mice: [
"gingerbread",
"greedy_al",
"winter_future",
"winter_past",
"winter_present",
{
mouse: "scrooge",
subcategory: "sb"
},
{
mouse: "ribbon",
subcategory: "pp"
},
{
mouse: "christmas_tree",
subcategory: "pp"
},
{
mouse: "winter_hunt_toy",
subcategory: "pp"
},
{
mouse: "elf",
subcategory: "pp"
},
{
mouse: "mad_elf",
subcategory: "pp"
},
{
mouse: "nutcracker",
subcategory: "pp"
},
{
mouse: "ornament",
subcategory: "pp"
},
{
mouse: "present",
subcategory: "pp"
},
{
mouse: "ridiculous_sweater",
subcategory: "pp"
},
{
mouse: "snowman_architect",
subcategory: "pp"
},
{
mouse: "stocking",
subcategory: "pp"
},
{
mouse: "toy",
subcategory: "pp"
},
{
mouse: "toy_builder",
subcategory: "pp"
},
{
mouse: "disco_ball_head",
subcategory: "pp"
}
]
},
{
name: "Ice Fortress",
id: "ice_fortress",
icon: "https://www.mousehuntgame.com/images/environments/15d8d9d837b22b31707d06f412b78e0d.jpg?cv=2",
color: "#cc85fe",
mice: [
"confused_courier",
"frigid_foreman",
"miser",
"missle_toe",
"snowblower",
"snowglobe",
"builder",
{
mouse: "builder",
subcategory: "pp"
},
{
mouse: "winter_boss_2014",
subcategory: "pp"
},
{
mouse: "glacia_ice_fist",
subcategory: "pp"
},
{
mouse: "winter_boss_2016",
subcategory: "pp"
},
{
mouse: "winter_boss_2018",
subcategory: "pp"
},
{
mouse: "winter_boss_2017",
subcategory: "pp"
},
{
mouse: "snowball_general_two",
subcategory: "pp"
},
{
mouse: "snowball_bully",
subcategory: "pp"
},
{
mouse: "slay",
subcategory: "pp"
},
{
mouse: "snow_fort",
subcategory: "pp"
},
{
mouse: "snowball_general_three",
subcategory: "pp"
},
{
mouse: "squeaker_claws",
subcategory: "pp"
},
{
mouse: "tundra_huntress",
subcategory: "pp"
},
{
mouse: "new_years",
subcategory: "pp"
},
{
mouse: "winter_boss_2022",
subcategory: "boss"
}
]
}
],
subcategories: [
{
id: "pp",
name: "Pecan Pecorino"
},
{
id: "gpp",
name: "Glazed Pecan Pecorino"
},
{
id: "sb",
name: "SUPER|brie+"
},
{
id: "boss",
name: "Boss"
}
]
}
};
}
});
// src/modules/better-maps/modules/tab-sorted.js
var getMouseDataForMap, makeMouseDiv, makeSortedPageWrapper, makeSortedMiceList, makeScavengerSortedPage, makeGenericSortedPage, moveTabToBody, processSortedTabClick, addSortedMapTab, showSortedTab, hideSortedTab;
var init_tab_sorted = __esm({
"src/modules/better-maps/modules/tab-sorted.js"() {
init_sentry_release_injection_stub();
init_utils4();
init_toggle_ar();
init_highlighting();
init_map_groups();
getMouseDataForMap = (currentMapData, type = "mouse") => {
let unsortedMice = [];
if (currentMapData.goals[type]) {
unsortedMice = currentMapData.goals[type];
}
let caughtMice = [];
currentMapData.hunters.forEach((hunter) => {
caughtMice = [...caughtMice, ...hunter.completed_goal_ids[type]];
});
unsortedMice = unsortedMice.filter((mouse) => {
return !caughtMice.includes(mouse.unique_id);
});
let categories = [];
if (map_groups_default[currentMapData.map_type] && map_groups_default[currentMapData.map_type].categories) {
categories = map_groups_default[currentMapData.map_type].categories;
}
let subcategories = [];
if (map_groups_default[currentMapData.map_type] && map_groups_default[currentMapData.map_type].subcategories) {
subcategories = map_groups_default[currentMapData.map_type].subcategories;
}
return {
unsortedMice,
categories,
subcategories,
getMouseDataForMap
};
};
makeMouseDiv = (mouse, type = "mouse") => __async(void 0, null, function* () {
const mouseDiv = makeElement("div", "mouse-container");
mouseDiv.setAttribute("data-mouse-id", mouse.unique_id);
mouseDiv.setAttribute("data-mouse-type", mouse.type);
mouseDiv.setAttribute("data-type", type);
const mouseData = makeElement("div", "mouse-data");
const mouseImage = makeElement("img", "mouse-image");
mouseImage.src = "mouse" === type ? mouse.small : mouse.thumb;
mouseImage.alt = mouse.name;
mouseData.append(mouseImage);
makeElement("div", "mouse-name", mouse.name, mouseData);
const mouseAr = yield getArEl(mouse.unique_id, type);
if (mouseAr) {
mouseData.append(mouseAr);
}
mouseDiv.append(mouseData);
const mouseExtraInfoWrapper = makeElement("div", "mouse-mhct-extra-info-wrapper");
const mouseExtraInfo = makeElement("div", "mouse-extra-info");
if (Array.isArray(mouse.environment_ids)) {
const locationText = makeElement("div", "location-text-wrapper");
makeElement("span", "location-text", "Found in ", locationText);
mouse.environment_ids.forEach((environmentID, index) => {
const environment = mapData().environments.find((env) => env.id === environmentID);
if (environment) {
const locationLink = makeElement("a", "mouse-location-link", environment.name);
locationLink.title = `Travel to ${environment.name}`;
locationLink.setAttribute("data-environment-id", environment.id);
locationLink.addEventListener("click", () => {
showTravelConfirmation(environment, mapModel());
});
if (index !== 0) {
locationText.append(document.createTextNode(", "));
}
locationText.append(locationLink);
}
});
mouseExtraInfo.append(locationText);
}
if (mouse.weaknesses) {
const weakness = makeElement("div", "mouse-weakness");
mouse.weaknesses.forEach((weaknessType) => {
if (weaknessType.power_types.length === 0) {
return;
}
const weaknessTypeDiv = makeElement("div", "weakness-type");
makeElement("div", "weakness-name", weaknessType.name, weaknessTypeDiv);
const powerTypes = makeElement("div", "power-types");
weaknessType.power_types.forEach((ptype) => {
const powerType = document.createElement("img");
powerType.src = `https://www.mousehuntgame.com/images/powertypes/${ptype.name}.png`;
powerTypes.append(powerType);
});
weaknessTypeDiv.append(powerTypes);
weakness.append(weaknessTypeDiv);
});
mouseExtraInfo.append(weakness);
}
mouseExtraInfoWrapper.append(mouseExtraInfo);
mouseDiv.append(mouseExtraInfoWrapper);
mouseDiv.addEventListener("click", () => __async(void 0, null, function* () {
const isSelected = mouseDiv.classList.contains("mouse-container-selected");
if (isSelected) {
mouseDiv.classList.remove("mouse-container-selected");
return;
}
addMHCTData(mouse, mouseExtraInfo, type);
const addClass2 = !mouseDiv.classList.contains("mouse-container-selected");
const allSelected = document.querySelectorAll(".mouse-container-selected");
if (allSelected) {
allSelected.forEach((selected) => {
selected.classList.remove("mouse-container-selected");
});
}
if (addClass2) {
mouseDiv.classList.add("mouse-container-selected");
}
}));
return mouseDiv;
});
makeSortedPageWrapper = () => {
const sortedPage = makeElement("div", "sorted-page");
makeElement("div", ["sorted-loading", "mousehuntPage-loading", "active"], "", sortedPage);
makeElement("div", "sorted-page-content", "", sortedPage);
return sortedPage;
};
makeSortedMiceList = () => __async(void 0, null, function* () {
const currentMapData = getMapData(mapData().map_id);
const { unsortedMice, categories, subcategories } = getMouseDataForMap(currentMapData);
const target = document.querySelector(".sorted-page-content");
if (!target) {
return;
}
const categoriesWrapper = makeElement("div", "mouse-category-container");
for (const category of categories) {
const categoryID = category.id;
const categoryWrapper = makeElement("div", "mouse-category-wrapper");
categoryWrapper.classList.add(`mouse-category-${categoryID}`, "mouse-category-wrapper-hidden");
const categoryHeader = makeElement("div", "mouse-category-header");
if (category.color) {
categoryWrapper.style.backgroundColor = category.color;
}
const iconTitleWrapper = makeElement("div", "mouse-category-icon-title-wrapper");
if (category.icon) {
const categoryIcon = makeElement("img", "mouse-category-icon");
categoryIcon.src = category.icon.indexOf("/") === 0 ? `https://www.mousehuntgame.com/images${category.icon}` : category.icon;
iconTitleWrapper.append(categoryIcon);
}
const iconTitleTitleWrapper = makeElement("div", "mouse-category-icon-title-title-wrapper");
makeElement("div", "mouse-category-title", category.name, iconTitleTitleWrapper);
makeElement("div", "mouse-category-subtitle", category.subtitle, iconTitleTitleWrapper);
iconTitleWrapper.append(iconTitleTitleWrapper);
categoryHeader.append(iconTitleWrapper);
categoryWrapper.append(categoryHeader);
const categoryMice = makeElement("div", "mouse-category-mice");
const addToSubCat = [];
category.mice.sort((a, b) => {
if (a.name < b.name) {
return -1;
}
return 1;
});
for (const mouse of category.mice) {
let hasSubCat = false;
let mouseType = mouse;
if (typeof mouse === "object" && mouse.subcategory) {
hasSubCat = mouse.subcategory;
mouseType = mouse.mouse;
}
const mouseIndex = unsortedMice.findIndex((unsortedMouse) => {
return unsortedMouse.type === mouseType;
});
if (mouseIndex === -1) {
continue;
}
const mouseDiv = yield makeMouseDiv(unsortedMice[mouseIndex]);
if (hasSubCat) {
if (!addToSubCat[hasSubCat]) {
addToSubCat[hasSubCat] = [];
}
addToSubCat[hasSubCat].push(mouseDiv);
} else {
categoryMice.append(mouseDiv);
}
categoryWrapper.append(categoryMice);
unsortedMice.splice(mouseIndex, 1);
categoryWrapper.classList.remove("mouse-category-wrapper-hidden");
}
for (const subcategory of subcategories) {
if (addToSubCat[subcategory.id] && addToSubCat[subcategory.id].length > 0) {
const subcategoryWrapper = document.createElement("div");
subcategoryWrapper.classList.add("mouse-subcategory-wrapper", `mouse-subcategory-${subcategory.id}`);
if (subcategory.color) {
subcategoryWrapper.style.backgroundColor = subcategory.color;
}
const currentSubCat = map_groups_default[currentMapData.map_type].subcategories.find((subcat) => {
return subcat.id === subcategory.id;
});
const subcategoryHeader = makeElement("div", "mouse-subcategory-header");
makeElement("div", "mouse-subcategory-title", currentSubCat.name, subcategoryHeader);
subcategoryWrapper.append(subcategoryHeader);
const subcategoryMice = makeElement("div", "mouse-subcategory-mice");
addToSubCat[subcategory.id].forEach((mouseDiv) => {
subcategoryMice.append(mouseDiv);
});
subcategoryWrapper.append(subcategoryMice);
categoryWrapper.append(subcategoryWrapper);
}
}
categoriesWrapper.append(categoryWrapper);
}
if (unsortedMice.length > 0) {
const unsortedWrapper = makeElement("div", "mouse-category-wrapper");
unsortedWrapper.classList.add("mouse-category-unsorted");
const unsortedHeader = makeElement("div", "mouse-category-header");
const unsortedTitle = makeElement("div", "mouse-category-title", "Unsorted");
unsortedHeader.append(unsortedTitle);
unsortedWrapper.append(unsortedHeader);
const unsortedMiceDiv = makeElement("div", "mouse-category-mice");
for (const mouse of unsortedMice) {
const mouseDiv = yield makeMouseDiv(mouse);
unsortedMiceDiv.append(mouseDiv);
}
unsortedWrapper.append(unsortedMiceDiv);
categoriesWrapper.append(unsortedWrapper);
}
target.append(categoriesWrapper);
});
makeScavengerSortedPage = () => __async(void 0, null, function* () {
const target = document.querySelector(".sorted-page-content");
if (!target) {
return;
}
target.classList.add("scavenger-sorted-page");
const currentMapData = getMapData(mapData().map_id);
console.log(currentMapData);
});
makeGenericSortedPage = () => __async(void 0, null, function* () {
const target = document.querySelector(".sorted-page-content");
if (!target) {
return;
}
target.classList.add("generic-sorted-page");
const currentMapData = getMapData(mapData().map_id);
let type = "mouse";
if (currentMapData.map_type.includes("scavenger")) {
type = "item";
}
const { unsortedMice } = getMouseDataForMap(currentMapData, type);
const sortedUnsorted = yield Promise.all(unsortedMice.map((mouse) => __async(void 0, null, function* () {
const ar = yield getHighestArForMouse(mouse.unique_id, type);
return __spreadProps(__spreadValues({}, mouse), {
ar
});
})));
sortedUnsorted.sort((a, b) => {
if (a.ar > b.ar) {
return -1;
}
return 1;
});
for (const mouse of sortedUnsorted) {
const mouseDiv = yield makeMouseDiv(mouse, type);
target.append(mouseDiv);
}
});
moveTabToBody = () => {
const sortedMiceContainer = document.querySelector("#sorted-mice-container");
if (!sortedMiceContainer) {
return;
}
const body = document.querySelector("body");
if (!body) {
return;
}
body.append(sortedMiceContainer);
};
processSortedTabClick = () => __async(void 0, null, function* () {
const currentlyActive = document.querySelector(".treasureMapRootView-subTab.sorted-map-tab.active");
if (currentlyActive) {
return;
}
const otherTabs = document.querySelectorAll(".treasureMapRootView-subTab:not(.sorted-map-tab)");
if (otherTabs) {
otherTabs.forEach((tab) => {
tab.removeEventListener("click", moveTabToBody);
tab.addEventListener("click", moveTabToBody);
});
}
const currentMapData = mapData();
if (!currentMapData || !currentMapData.goals) {
return;
}
const activeTab = document.querySelector(".treasureMapRootView-subTab.active");
if (activeTab) {
activeTab.classList.remove("active");
}
const sortedTab = document.querySelector(".treasureMapRootView-subTab.sorted-map-tab");
if (sortedTab) {
sortedTab.classList.add("active");
}
const mapContainer = document.querySelector(".treasureMapView-blockWrapper");
if (!mapContainer) {
return;
}
const leftBlock = mapContainer.querySelector(".treasureMapView-leftBlock");
if (leftBlock) {
leftBlock.style.display = "none";
}
const rightBlock = mapContainer.querySelector(".treasureMapView-rightBlock");
if (rightBlock) {
rightBlock.style.display = "none";
}
const existing = document.querySelector("#sorted-mice-container");
if (existing) {
existing.remove();
}
const sortedMiceContainer = document.createElement("div");
sortedMiceContainer.id = "sorted-mice-container";
const sortedPage = makeSortedPageWrapper();
sortedMiceContainer.append(sortedPage);
mapContainer.append(sortedMiceContainer);
if (map_groups_default[currentMapData.map_type]) {
yield makeSortedMiceList();
} else if (currentMapData.is_scavenger_hunt) {
yield makeScavengerSortedPage();
yield makeGenericSortedPage();
} else {
yield makeGenericSortedPage();
}
const loading = document.querySelector(".sorted-loading");
if (loading) {
loading.remove();
}
highlighting_default();
});
addSortedMapTab = () => {
const mapTabs = document.querySelector(".treasureMapRootView-subTabContainer");
if (!mapTabs || mapTabs.length <= 0) {
return false;
}
if (mapTabs.querySelector(".sorted-map-tab")) {
return false;
}
const sortedTab = makeElement("a", "treasureMapRootView-subTab sorted-map-tab", "Sorted");
sortedTab.setAttribute("data-type", "sorted");
const divider = makeElement("div", "treasureMapRootView-subTab-spacer");
mapTabs.insertBefore(divider, mapTabs.children[0]);
mapTabs.insertBefore(sortedTab, mapTabs.children[0]);
return true;
};
showSortedTab = () => {
processSortedTabClick();
addArToggle();
};
hideSortedTab = () => {
removeArToggle();
};
}
});
// src/modules/better-maps/modules/consolation-prizes.js
var consolation_prizes_default;
var init_consolation_prizes = __esm({
"src/modules/better-maps/modules/consolation-prizes.js"() {
init_sentry_release_injection_stub();
init_utils4();
consolation_prizes_default = () => __async(void 0, null, function* () {
const consolationButton = document.querySelector(".treasureMapView-consolationPrize-message");
if (!consolationButton || !mapData().has_consolation_prizes || !mapData().consolation_prizes) {
return;
}
const existing = document.querySelector(".mh-mapper-consolation-prizes");
if (existing) {
existing.remove();
}
const prizeWrapper = makeElement("div", "mh-mapper-consolation-prizes");
const prizes = mapData().consolation_prizes || [];
for (const prize of prizes) {
const prizeDiv = makeElement("div", "mh-mapper-consolation-prize");
const prizeImg = makeElement("img", "mh-mapper-consolation-prize");
prizeImg.src = prize.thumb;
prizeDiv.append(prizeImg);
makeElement("div", "mh-mapper-consolation-prize-text", `${prize.quantity} ${prize.name}`, prizeDiv);
prizeWrapper.append(prizeDiv);
}
consolationButton.parentElement.append(prizeWrapper);
});
}
});
// src/modules/better-maps/modules/tab-goals.js
var getLinkMarkup2, addMouseLinksToMap, addClassesToGroups, moveLeaveButton, addQuickInvite, showGoalsTab, hideGoalsTab;
var init_tab_goals = __esm({
"src/modules/better-maps/modules/tab-goals.js"() {
init_sentry_release_injection_stub();
init_utils4();
init_toggle_ar();
init_consolation_prizes();
getLinkMarkup2 = (name) => {
return makeLink("MHCT AR", `https://www.mhct.win/attractions.php?mouse=${name}`, true) + makeLink("Wiki", `https://mhwiki.hitgrab.com/wiki/index.php/${name}_Mouse`) + makeLink("mhdb", `https://dbgames.info/mousehunt/mice/${name}_Mouse`);
};
addMouseLinksToMap = () => __async(void 0, null, function* () {
const overlay = document.querySelector("#overlayPopup");
if (!(overlay && overlay.classList.contains("treasureMapPopup"))) {
return;
}
const mouseIcon = document.querySelectorAll(".treasureMapView-goals-group-goal");
if (!mouseIcon || mouseIcon.length === 0) {
return;
}
const mapViewClasses = document.querySelector(".treasureMapView");
if (!mapViewClasses) {
return;
}
let type = "mouse";
if (mapViewClasses.classList.value.includes("scavenger_hunt")) {
type = "item";
}
mouseIcon.forEach((mouse) => {
let mouseType = mouse.classList.value.replace("treasureMapView-goals-group-goal", "").replace(" mouse", "").replace(" item", "").replace(" complete", "").replace("landscape", "").replace("notAvailable", "").replaceAll(" ", "").trim();
if ("item" === type) {
mouseType = mouse.getAttribute("data-unique-id");
}
mouse.addEventListener("click", () => __async(void 0, null, function* () {
const title = document.querySelector(".treasureMapView-highlight-name");
if (!title) {
return;
}
title.classList.add("mh-ui-mouse-links-map-name");
title.addEventListener("click", () => {
if (type === "item") {
hg.views.ItemView.show(mouseType);
} else if (type === "mouse") {
hg.views.MouseView.show(mouseType);
}
});
title.setAttribute("data-mouse-id", mouseType);
const existing = document.querySelector(`#mh-ui-mouse-links-map-${mouseType}-${type}`);
if (existing) {
return;
}
const div = makeElement("div", "mh-ui-mouse-links-map");
div.id = `mh-ui-mouse-links-map-${mouseType}-${type}`;
div.innerHTML = getLinkMarkup2(title.innerText);
const envs = document.querySelector(".treasureMapView-highlight-environments");
if (envs) {
envs.parentNode.insertBefore(div, envs.nextSibling);
}
let appendMHCTto = document.querySelector(".treasureMapView-highlight-weaknessContainer");
if (!appendMHCTto) {
appendMHCTto = document.querySelector(".mh-ui-mouse-links-map");
}
const existingArs = document.querySelectorAll(".mh-ui-mouse-links-map-ars");
if (existingArs && existingArs.length > 0) {
existingArs.forEach((ar) => ar.remove());
}
const container = document.querySelector(".treasureMapView-highlight.goal.active");
if (!container) {
return;
}
const arsEl = makeElement("div", "mh-ui-mouse-links-map-ars");
arsEl.id = `mh-ui-mouse-links-map-ars-${mouseType}-${type}`;
yield addMHCTData({ unique_id: mouseType }, arsEl, type);
if (arsEl.innerHTML === "") {
return;
}
container.classList.add("has-mhct-ars");
container.append(arsEl);
}));
});
});
addClassesToGroups = (mapData2) => {
const groups2 = document.querySelectorAll(".treasureMapView-goals-groups");
groups2.forEach((group) => {
const title = group.querySelector(".treasureMapView-block-content-heading");
if (!title) {
return;
}
if (title.classList.contains("mh-ui-goals-group-completed-title")) {
return;
}
const completed = title.innerText.includes(" found these mice:") || title.innerText.includes(" found this mouse:");
group.classList.add("mh-ui-goals-group", completed ? "completed" : "incomplete");
let countText = "";
const count2 = group.querySelector(".treasureMapView-block-content-heading-count");
if (count2) {
group.setAttribute("data-mouse-count", count2.innerText.replace("(", "").replace(")", ""));
countText = count2.innerText;
}
if (!completed) {
return;
}
const hunterName = title.innerText.replace(countText, "").replace(" found these mice:", "").replace(" found this mouse:", "").trim();
let hunter = mapData2.hunters.find((h) => h.name.trim() === hunterName);
if (!hunter) {
const image2 = group.querySelector(".treasureMapView-block-content-heading-image");
if (!image2) {
return;
}
const url = image2.getAttribute("style").replace("background-image:url(", "").replace("background-image: url(", "").replace(");", "");
hunter = mapData2.hunters.find((h) => h.profile_pic === url);
}
if (!hunter && (hunterName === `${user.firstname} ${user.lastname}` || hunterName === `${user.firstname}${user.lastname}`)) {
hunter = {
name: `${user.firstname} ${user.lastname}`,
sn_user_id: user.sn_user_id
};
}
if (!hunter) {
return;
}
const image = group.querySelector(".treasureMapView-block-content-heading-image");
if (!image) {
image.title = `Go to ${hunter.name}'s profile`;
image.classList.add("mh-ui-goals-group-completed-image");
image.addEventListener("click", () => {
hg.utils.PageUtil.showHunterProfile(hunter.sn_user_id);
});
}
const replacementTitle = makeElement("div", "treasureMapView-block-content-heading");
if (image) {
replacementTitle.append(image);
}
const nameLink = makeElement("a", "mh-ui-goals-group-completed-title", hunter.name);
nameLink.setAttribute("data-snuid", hunter.sn_user_id);
nameLink.addEventListener("click", (e) => {
e.preventDefault();
hg.utils.PageUtil.showHunterProfile(hunter.sn_user_id);
});
replacementTitle.append(nameLink);
makeElement("span", "mh-ui-goals-group-completed-text", " found these mice:", replacementTitle);
if (count2) {
replacementTitle.append(count2);
}
title.replaceWith(replacementTitle);
});
};
moveLeaveButton = () => __async(void 0, null, function* () {
const leaveButton = document.querySelector(".treasureMapView-mapLeaveContainer .treasureMapView-leaveMapButton");
if (!leaveButton) {
return;
}
const actions = document.querySelector(".treasureMapView-mapMenu-group-actions");
if (!actions) {
return;
}
const existing = document.querySelector(".mh-ui-leave-map-button");
if (existing) {
return;
}
const clone = leaveButton.cloneNode(true);
clone.classList.add("mh-ui-leave-map-button");
clone.classList.remove("lightBlue");
clone.addEventListener("click", () => {
leaveButton.click();
});
actions.insertBefore(clone, actions.firstChild);
});
addQuickInvite = (mapData2) => __async(void 0, null, function* () {
const sidebar = document.querySelector(".treasureMapView-rightBlock.treasureMapView-goalSidebar");
if (!sidebar) {
return;
}
const existing = document.querySelector(".mh-ui-quick-invite");
if (existing) {
existing.remove();
}
if (!(mapData2 == null ? void 0 : mapData2.is_owner)) {
return;
}
const mapId = mapData2 == null ? void 0 : mapData2.map_id;
if (!mapId) {
return;
}
const inviteWrapper = makeElement("div", "mh-ui-quick-invite-wrapper");
const inviteInput = makeElement("input", "mh-ui-quick-invite-input");
inviteInput.type = "number";
inviteInput.placeholder = "Hunter ID";
inviteWrapper.append(inviteInput);
const inviteButton = makeElement("div", ["mousehuntActionButton", "tiny", "mh-ui-quick-invite"]);
makeElement("span", "", "Invite", inviteButton);
const indicators = makeElement("div", "mh-ui-quick-invite-indicators");
const spinner = makeElement("div", ["mh-ui-quick-invite-indicator", "mh-ui-quick-invite-spinner", "hidden"]);
const success = makeElement("div", ["mh-ui-quick-invite-indicator", "mh-ui-quick-invite-success", "hidden"]);
indicators.append(spinner);
indicators.append(success);
inviteWrapper.append(indicators);
const inviteError = (message) => {
debuglog("better-maps", `Invite error: ${message}`);
inviteInput.disabled = false;
inviteButton.classList.remove("disabled");
spinner.classList.add("hidden");
showErrorMessage(message, inviteWrapper);
return false;
};
const inviteAction = () => __async(void 0, null, function* () {
var _a, _b, _c, _d, _e, _f;
if (inviteButton.classList.contains("disabled")) {
return;
}
inviteInput.disabled = true;
inviteButton.classList.add("disabled");
spinner.classList.remove("hidden");
const hunterId = Number.parseInt(inviteInput.value, 10);
if (!hunterId) {
return inviteError("Invalid hunter ID");
}
if ((_a = mapData2 == null ? void 0 : mapData2.hunters) == null ? void 0 : _a.find((h) => h.sn_user_id === hunterId && h.is_active)) {
return inviteError("Hunter is already on the map");
}
debuglog("better-maps", `Inviting hunter ${hunterId} to map ${mapId}`);
let snuid;
const friendData = sessionGet("cache-maps-hunter-data", {});
if (friendData && friendData[hunterId]) {
debuglog("better-maps", `Using cached friend data for ${hunterId}`);
snuid = friendData[hunterId];
} else {
debuglog("better-maps", `Fetching friend data for ${hunterId}`);
const getFriendData = yield doRequest("managers/ajax/pages/friends.php", {
action: "community_search_by_id",
user_id: hunterId
});
if ((getFriendData == null ? void 0 : getFriendData.success) && ((_b = getFriendData == null ? void 0 : getFriendData.friend) == null ? void 0 : _b.sn_user_id)) {
snuid = (_c = getFriendData == null ? void 0 : getFriendData.friend) == null ? void 0 : _c.sn_user_id;
const canAccept = (_f = (_e = (_d = getFriendData == null ? void 0 : getFriendData.friend.user_interactions) == null ? void 0 : _d.actions) == null ? void 0 : _e.send_map_invite.maps[0]) == null ? void 0 : _f.is_allowed;
friendData[hunterId] = {
snuid: snuid || false,
canAccept: canAccept || false
};
if (canAccept) {
sessionSet("cache-maps-hunter-data", friendData);
}
} else {
return inviteError("Could not find hunter");
}
}
debuglog("better-maps", `Inviting hunter ${hunterId} with snuid ${snuid} to map ${mapId}`);
const invited = yield doRequest("managers/ajax/users/treasuremap.php", {
action: "send_invites",
map_id: mapId,
"snuids[]": snuid
});
if (invited && (invited == null ? void 0 : invited.success)) {
debuglog("better-maps", `Successfully invited hunter ${hunterId} to map ${mapId}`);
inviteInput.value = "";
inviteInput.disabled = false;
inviteButton.classList.remove("disabled");
spinner.classList.add("hidden");
success.classList.remove("hidden");
setTimeout(() => {
success.classList.add("hidden");
}, 2e3);
} else {
return inviteError("Error inviting hunter");
}
debuglog("better-maps", ".");
});
inviteButton.addEventListener("click", inviteAction);
inviteInput.addEventListener("keyup", (e) => {
if (e.key === "Enter") {
inviteAction();
}
});
inviteWrapper.append(inviteButton);
sidebar.insertBefore(inviteWrapper, sidebar.firstChild);
});
showGoalsTab = (mapData2) => __async(void 0, null, function* () {
addArToggle();
addMouseLinksToMap();
consolation_prizes_default();
addClassesToGroups(mapData2);
moveLeaveButton();
addQuickInvite(mapData2);
});
hideGoalsTab = () => {
removeArToggle();
};
}
});
// src/modules/better-maps/modules/tab-hunters.js
var makeUserTableLoading, makeUserTable, getInvitedHunterData, getUserData, removeEmptyHunterSlotsFromList, getLeftHunters, modifyButtons, fixPluralInvites, showHuntersTab;
var init_tab_hunters = __esm({
"src/modules/better-maps/modules/tab-hunters.js"() {
init_sentry_release_injection_stub();
init_utils4();
makeUserTableLoading = (id, title, appendTo) => {
const wrapper = makeElement("div", "treasureMapView-block-title", title);
wrapper.id = `hunters-loading-${id}-title`;
appendTo.append(wrapper);
const loading = makeElement("div", "treasureMapView-block");
loading.id = `hunters-loading-${id}-block`;
const loadingWwrapper = makeElement("div", "treasureMapView-allyTable", "");
const row = makeElement("div", "treasureMapView-allyRow", "");
makeElement("div", ["mousehuntPage-loading", "active"], "", row);
loadingWwrapper.append(row);
loading.append(loadingWwrapper);
appendTo.append(loading);
};
makeUserTable = (hunters, id, title, appendTo) => __async(void 0, null, function* () {
const loadingTitle = document.querySelector(`#hunters-loading-${id}-title`);
const loadingBlock = document.querySelector(`#hunters-loading-${id}-block`);
if (loadingTitle) {
loadingTitle.remove();
}
if (loadingBlock) {
loadingBlock.remove();
}
const existing = document.querySelector(`#hunters-${id}`);
if (existing) {
return;
}
const wrapper = makeElement("div", ["mh-ui-custom-map-block", "treasureMapView-block-title"], title.replace("#count#", hunters.length));
wrapper.id = `hunters-${id}`;
appendTo.append(wrapper);
const block = makeElement("div", "treasureMapView-block");
block.id = `hunters-${id}-block`;
const blockContent = makeElement("div", "treasureMapView-block-content");
const table = makeElement("div", "treasureMapView-allyTable");
hunters.forEach((hunter) => {
let actions = `<a href="supplytransfer.php?fid=${hunter.sn_user_id}"class="mousehuntActionButton tiny lightBlue"><span>Send<br>Supplies</span></a>`;
if ("requests" === id) {
const declineAction = `<a class="treasureMapDialogView-deleteInviteRequest reject-invite-request mh-mapper-invite-request-action" data-snuid="${hunter.sn_user_id}" data-snuid="100000830940163">X</a>`;
const acceptAction = `<a href="#" class="treasureMapDialogView-continueButton mousehuntActionButton accept-invite-request mh-mapper-invite-request-action" data-snuid="${hunter.sn_user_id}"><span>Accept</span></a>`;
actions = `${declineAction}${acceptAction}`;
}
const markup = `<div class="treasureMapView-allyCell favourite"></div>
<div class="treasureMapView-allyCell image">
<div class="treasureMapView-hunter">
<div class="treasureMapView-hunter-image-wrapper">
<img src="${hunter.profile_pic}" class="treasureMapView-hunter-image">
</div>
</div>
</div>
<div class="treasureMapView-allyCell name">
<div class="treasureMapView-ally-name">
<a href="https://www.mousehuntgame.com/profile.php?snuid=${hunter.sn_user_id}">${hunter.name}</a>
</div>
<a href="#" class="treasureMapView-ally-environment treasureMapView-travelButton" data-environment-id="${hunter.environment_id}">
${hunter.environment_name}
</a>
</div>
<div class="treasureMapView-allyCell lastActive">
<div class="treasureMapView-ally-lastActive ${hunter.is_online ? "online" : ""}">
${hunter.last_active_formatted}
</div>
</div>
<div class="treasureMapView-allyCell trap">
<div class="treasureMapView-componentContainer">
<div class="treasureMapView-componentThumb" style="background-image: url(${hunter.base_thumb});" title="${hunter.base_name}"></div>
<div class="treasureMapView-componentThumb" style="background-image: url(${hunter.weapon_thumb});" title="${hunter.weapon_name}"></div>
<div class="treasureMapView-componentThumb" style="background-image: url(${hunter.bait_thumb});" title="${hunter.bait_name}"></div>
<div class="treasureMapView-componentThumb" style="background-image: url(${hunter.trinket_thumb});" title="${hunter.trinket_name}"></div>
</div>
</div>
<div class="treasureMapView-allyCell actions">${actions}</div>`;
makeElement("div", "treasureMapView-allyRow", markup, table);
});
block.append(table);
blockContent.append(block);
appendTo.append(block);
if ("requests" === id) {
const actionButtons = document.querySelectorAll(".mh-mapper-invite-request-action");
actionButtons.forEach((button) => {
button.addEventListener("click", () => {
const snuid = Number.parseInt(button.dataset.snuid, 10);
if (button.classList.contains("accept-invite-request")) {
hg.utils.TreasureMapUtil.acceptInviteRequests(mapper("mapData").map_id, [snuid], () => {
}, () => {
});
} else {
hg.utils.TreasureMapUtil.declineInviteRequests(mapper("mapData").map_id, [snuid], () => {
}, () => {
});
}
});
});
}
});
getInvitedHunterData = (invited) => __async(void 0, null, function* () {
if (invited.length === 0) {
return [];
}
if (invited.length <= 12) {
const hunters2 = yield getUserData(invited);
return hunters2;
}
const batches = [];
for (let i = 0; i < invited.length; i += 12) {
batches.push(invited.slice(i, i + 12));
}
const hunters = [];
for (const batch_ of batches) {
const batch = yield getUserData(batch_);
hunters.push(...batch);
}
return hunters;
});
getUserData = (userId) => __async(void 0, null, function* () {
return new Promise((resolve) => {
hg.utils.User.getUserData(userId, ["bait_name", "bait_thumb", "base_name", "base_thumb", "environment_id", "environment_name", "is_online", "last_active_formatted", "trinket_name", "trinket_thumb", "weapon_name", "weapon_thumb"], (resp) => {
resolve(resp);
});
});
});
removeEmptyHunterSlotsFromList = () => __async(void 0, null, function* () {
const emptySlots = document.querySelectorAll(".treasureMapView-allyCell.name");
if (emptySlots.length) {
let shouldRemove = false;
emptySlots.forEach((slot) => {
if (slot.textContent === "The map owner can invite more hunters." || slot.textContent === "Click to invite a friend.") {
if (shouldRemove) {
shouldRemove.parentNode.remove();
}
slot.parentNode.classList.add("hunters-last-slot");
shouldRemove = slot;
}
});
}
});
getLeftHunters = (mapData2) => {
const huntersLeft = [];
mapData2.hunters.forEach((hunter) => {
if (!hunter.is_active) {
huntersLeft.push(hunter);
}
});
return huntersLeft;
};
modifyButtons = () => {
const buttons = [
{
selector: ".mh-ui-find-hunters-block .treasureMapAlliesView-showInviteButton",
text: "Invite Friends"
},
{
selector: ".mh-ui-find-hunters-block .treasureMapAlliesView-showInviteTeamButton",
text: "Invite Team"
},
{
selector: ".mh-ui-map-settings-block .treasureMapView-inviteModeButton",
text: "Change Settings"
},
{
selector: ".mh-ui-share-block .treasureMapView-copyShareLinkButton",
text: "Copy"
}
];
buttons.forEach((button) => {
const el = document.querySelector(button.selector);
if (el) {
el.classList.add("tiny");
const text = el.querySelector("span");
if (text) {
text.textContent = button.text;
}
}
});
};
fixPluralInvites = () => {
const invitesEl = document.querySelector(".treasureMapView-numInvitesSent");
if (invitesEl && invitesEl.textContent === "1 invites sent.") {
invitesEl.innerHTML = invitesEl.innerHTML.replace("invites", "invite");
}
};
showHuntersTab = (mapData2) => __async(void 0, null, function* () {
var _a;
modifyButtons();
removeEmptyHunterSlotsFromList();
fixPluralInvites();
const leftBlock = document.querySelector(".treasureMapView-leftBlock");
if (!leftBlock) {
return;
}
const huntersLeft = getLeftHunters(mapData2);
if (huntersLeft.length) {
makeUserTable(huntersLeft, "left", `Hunters that have left map (${huntersLeft.length || 0})`, leftBlock);
}
if (mapData2.invited_hunters.length) {
makeUserTableLoading("invited", `Invited hunters (${mapData2.invited_hunters.length || 0})`, leftBlock);
const invitedData = yield getInvitedHunterData(mapData2.invited_hunters);
makeUserTable(invitedData, "invited", "Invited hunters (#count#)", leftBlock);
}
if (((_a = mapData2.invite_requests) == null ? void 0 : _a.length) > 0) {
makeUserTableLoading("requests", `Invite Requests (${mapData2.invite_requests.length || 0})`, leftBlock);
const requestData = yield getInvitedHunterData(mapData2.invite_requests);
makeUserTable(requestData, "requests", "Invite Requests (#count)", leftBlock);
}
});
}
});
// src/data/relic-hunter-hints.json
var relic_hunter_hints_default;
var init_relic_hunter_hints = __esm({
"src/data/relic-hunter-hints.json"() {
relic_hunter_hints_default = {
acolyte_realm: [
"Standing on the other side of a green and purple portal.",
"Inside an elaborate one-way trap designed by Plankrun.",
"Outside a smoky purple tower."
],
balacks_cove: [
"Roaming amongst the most powerful of Lich mice.",
"Lurking in a damp and darkened grotto."
],
bazaar: [
"Searching for the best deals in the Burroughs.",
"Ducking between stalls and tents and loud merchants.",
"Under the pointiest tent in all the Kingdom!"
],
bountiful_beanstalk: [
"Hobnobbing with giants.",
"Infiltrating a lofty castle.",
"Climbing into the clouds."
],
calm_clearing: [
"Taking a relaxing hike through a forested area.",
"By a peaceful rock in a grassy clearing.",
"Tucked behind dense trees where it's quiet and peaceful."
],
cape_clawed: [
"Watching the peaceful gathering of tribal mice.",
"On a small bit of land near a volcano."
],
catacombs: [
"Listening for sinister secrets deep underground.",
"Walking through dark hallways in search of a Keeper's Candle."
],
claw_shot_city: [
"Keeping an eye on the long-arm of the law.",
"Spitting in a spittoon! Yuck!"
],
derr_dunes: [
"Ankle deep in rocky, tropical sand.",
"Tumbling down hills of rreD sand."
],
desert_city: [
"Visiting a walled city that is no stranger to sieges.",
"Keeping a close eye on would-be thieves..."
],
desert_oasis: [
"Tending to a most troublesome and dangerous garden.",
"Enjoying a drink on the overgrown rooftop patio."
],
desert_warpath: [
"Marching through the Sandtail Desert.",
"Dodging arrows, spears, swords, and spells!"
],
dojo: [
"Practicing an ancient art with fledgling warriors.",
"Safely inside the bottom floor of a bamboo building.",
"Carefully watching the training activities of advanced students."
],
elub_shore: [
"Near the bluE waters of the island.",
"Watching the calm waters of Rodentia while remaining safely ashore."
],
floating_islands: [
"Investigating what can be built in a workshop.",
"Searching the skies for treasure.",
"Peering through an oculus.",
"In the clouds above Hollow Heights.",
"Watching hunters' dirigibles fly by.",
"Avoiding falling victim to Sky Pirates."
],
forbidden_grove: [
"Trapped between two planes of existence.",
"Behind heavy stone gates."
],
foreword_farm: [
"Reaping what she sowed...",
"Cultivating a hearty yield...",
"Toiling away in fertile fields..."
],
fungal_cavern: [
"Carefully navigating a subterranean and humid environment.",
"Deep inside of an infested, glowing, twisting, unending cave of untold riches..."
],
great_gnarled_tree: [
"Tracing the deep patterns of bark growing on ancient towers.",
"By a tree older than Gnawnia itself.",
"Finding shade in the largest tree in the Kingdom."
],
harbour: [
"Near the loud and low horns and the dinging of bells.",
"Visiting where many new hunters seek out seafaring mice.",
"By the sea where there's plenty of fresh air and sunshine."
],
kings_arms: [
"Where royal strength rewards hunting prowess.",
"Under a circular roof atop arm-shared paths.",
"Browsing wares available with a most royal currency."
],
kings_gauntlet: [
"Climbing up spiralling, menacing stairs.",
"Trekking up a massive tower in Valour.",
"Atop a tall tower with the perfect view of an Eclipse."
],
laboratory: [
"Performing bizarre experiments and chemical reactions.",
"Where the powerful and strange breeds of mice first arose.",
"Amongst brightly glowing potions."
],
lagoon: [
"Waist-deep in a shallow, sparkling pond.",
"Amongst sparkling, still water.",
"Climbing jagged rocks and slick moss."
],
mountain: [
"Looking across vast landscapes and the many horizons of the land.",
"Cutting through the pass to reach the town on the other side.",
"In a treacherous environment where only the toughest of mice survive."
],
mousoleum: [
"Investigating the spirits of slain mice.",
"Surveying where scientists harvest 'spare parts'.",
"Studying the spooky remains of Zombie Mice."
],
moussu_picchu: [
"Climbing and exploring some long lost ruins.",
"Up high upon a weather changing plateau."
],
nerg_plains: [
"Investigating a well-seasoned Gumbo Cheese.",
"Running through flat fields of greeN."
],
prologue_pond: [
"Reeling it in...",
"Choosing the right tackle..."
],
queso_river: [
"Enjoying a quick dip in a cheesy bath.",
"Sipping delicious liquid cheese from a river.",
"Protecting her ears from the sound of loud pumps."
],
seasonal_garden: [
"Watching the sky and wondering what the weather will bring.",
"Braving the ever-changing elements."
],
slushy_shoreline: [
"Walking along the coldest waters in Gnawnia.",
"At the beachside site of an invasion force!",
"Shivering near the edges of the mainland."
],
ss_huntington_ii: [
"Testing out balance on the high seas.",
"Looking a bit queasy..."
],
sunken_city: [
"Walking along the bottom of the Rodentia Ocean.",
"Investigating powerful diving equipment."
],
table_of_contents: [
"Sitting down at a wooden table...",
"Creating clever characters...",
"Penning plot points...",
"Sharpening a quill..."
],
tournament_hall: [
"Amongst the triumphant trumpets of master hunters of old.",
"Browsing the rewards of competitive champions.",
"Competing for the limelight amongst the finest champions."
],
town_of_digby: [
"Exploring the deep and winding caverns near a technologically-advanced underground city.",
"Amongst powerful drills and excavation equipment.",
"Hiding in the shadows while standing in the limelight."
],
town_of_gnawnia: [
"Hiding within the hustle and bustle in the city of the crown.",
"Trying to spot the King himself.",
"In a town with a dense population."
],
training_grounds: [
"Standing among the ranks of new students out in the field.",
"Watching the careful training of artful students.",
"Relaxing in the shade of tall engraved rock."
],
windmill: [
"Observing the churning and grinding of the new harvest.",
"By an agricultural structure once owned by one of Gnawnia's most prosperous farmers.",
"Grinding up hundreds of tiny seeds from a stalky, golden plant."
],
zugzwang_library: [
"Leafing through ancient tomes of knowledge.",
"Expanding knowledge and climbing endless ladders."
]
};
}
});
// src/modules/better-maps/styles/general.css
var general_default2;
var init_general2 = __esm({
"src/modules/better-maps/styles/general.css"() {
general_default2 = '.treasureMapView-singleEnvironment-label{padding-bottom:8px}.treasureMapView-block.treasureMapView-singleEnvironment{border-radius:2px}.treasureMapView-block-content.halfHeight{padding:0;border-radius:0}.treasureMapView-block{border-radius:3px}.treasureMapView-mapMenu-group.rewards .treasureMapView-mapMenu-group-title,.treasureMapView-ally-ownerLabel{display:none}input.treasureMapView-shareLinkInput{display:inline-block;width:87px;padding:3px;margin-right:2px}.treasureMapView-ownerRequestActions{display:block;width:61px;margin:0 auto}.treasureMapView-mapMenu-group.rewards{display:flex;flex-direction:row-reverse;margin-top:-10px;margin-right:-5px}.rewards .treasureMapView-mapMenu-rewardName{max-width:unset;margin-right:3px;font-size:12px}.rewards .treasureMapView-mapMenu-subgroup.chest.mousehuntTooltipParent{display:flex;flex-direction:row-reverse;gap:5px;align-items:center}.rewards .treasureMapView-mapMenu-group-content{display:flex;flex-wrap:wrap;justify-content:flex-end;max-width:335px}.max_hunters_10 .rewards .treasureMapView-mapMenu-group-content{max-width:200px}.rewards .treasureMapView-mapMenu-auraIcon{width:33px;height:33px;margin-top:-10px}.rewards .treasureMapView-mapMenu-auraIconContainer{margin:0}.rewards .treasureMapView-mapMenu-group-actions{display:flex;flex-direction:row;justify-content:flex-end;width:auto}.rewards .treasureMapView-mapMenu-group-actions .mousehuntActionButton{margin-top:5px;margin-right:4px;margin-bottom:0!important}.treasureMapView-allyCell.name{padding-left:10px}.treasureMapView-ally-name{padding-bottom:5px}.treasureMapView-mapMenu-mapIcon{width:45px}.max_hunters_10 .treasureMapView-mapMenu-mapIcon{width:80px}img.treasureMapView-reward-chestIcon{box-sizing:border-box;width:160px;height:160px;padding:0;margin:20px auto;background:transparent;box-shadow:none}.treasureMapInvitesView .treasureMapView-leftBlock:first-child .treasureMapView-block-title:first-child{display:none}.treasureMapView-block-content.noMinHeight.noPadding.treasureMapInvitesView-scoreboards .treasureMapView-block-title:nth-child(3),.treasureMapView-block-content.noMinHeight.noPadding.treasureMapInvitesView-scoreboards .treasureMapView-scoreboard:nth-child(4){display:none}.treasureMapInventoryView-scrollCase-aura{overflow:hidden;font-size:9px;line-height:15px}.treasureMapInventoryView-scrollCase-aura br:after{content:" "}.treasureMapInventoryView-scrollCase-aura br{content:""}.treasureMapInventoryView-scrollCase-aura b:first-of-type{display:block;font-size:10px}.treasureMapShopsView .treasureMapView-leftBlock{width:99%}.treasureMapShopsView .treasureMapView-rightBlock{display:none}.treasureMapPopup-shop{padding:10px;margin-bottom:10px;background-color:#fbfbfb;border:1px solid #ccc;border-radius:4px}.treasureMapPopup-shop-environment.active:before{box-shadow:none}.treasureMapView-block-content-heading{margin:10px 0 5px}.treasureMapInventoryView-scrollCase{align-items:center;padding:10px;margin-top:8px;margin-bottom:10px;background-color:#fbfbfb;border:1px solid #ccc;border-radius:4px}.mh-dark-mode .treasureMapInventoryView-scrollCase{background-color:#333;border-color:#424242}.treasureMapView-block-content-heading-image{margin-right:10px}.mh-dark-mode .treasureMapShopsView-shopItems .treasureMapView-block-content-heading,.mh-dark-mode .treasureMapShopsView-shopItems .treasureMapView-block-content-heading-count{color:#000}.mh-dark-mode .pageFrameView .treasureMapPopup-shop-environment.active:before{background-color:transparent}.treasureMapPopup-shop[data-environment-type=rift_valour]{background-color:#e5daed}.treasureMapPopup-shop[data-environment-type=rift_bristle_woods]{background-color:#bda39e}.treasureMapPopup-shop[data-environment-type=rift_furoma]{background-color:#ffdca4}.treasureMapPopup-shop[data-environment-type=rift_whisker_woods]{background-color:#cfe07e}.treasureMapPopup-shop[data-environment-type=rift_burroughs]{background-color:#c6c6c6}.treasureMapPopup-shop[data-environment-type=rift_gnawnia]{background-color:#ffdaf4}.treasureMapPopup-shop[data-environment-type=table_of_contents]{background-color:#dfffd4}.treasureMapPopup-shop[data-environment-type=prologue_pond]{background-color:#d3ffff}.treasureMapPopup-shop[data-environment-type=foreword_farm]{background-color:#faedcd}.treasureMapPopup-shop[data-environment-type=floating_islands]{background-color:#fce0d7}.treasureMapPopup-shop[data-environment-type=moussu_picchu]{background-color:#fed3ff}.treasureMapPopup-shop[data-environment-type=ancient_city]{background-color:#ccc}.treasureMapPopup-shop[data-environment-type=fungal_cavern]{background-color:#c3f3de}.treasureMapPopup-shop[data-environment-type=sunken_city]{background-color:#c8f9ff}.treasureMapPopup-shop[data-environment-type=queso_geyser],.treasureMapPopup-shop[data-environment-type=queso_quarry],.treasureMapPopup-shop[data-environment-type=queso_plains],.treasureMapPopup-shop[data-environment-type=queso_river]{background-color:#f8f3ae}.treasureMapPopup-shop[data-environment-type=fort_rox]{background-color:#f2d5c9}.treasureMapPopup-shop[data-environment-type=desert_oasis]{background-color:#d1e7bf}.treasureMapPopup-shop[data-environment-type=desert_city]{background-color:#e48f89}.treasureMapPopup-shop[data-environment-type=desert_warpath]{background-color:#ffb280}.treasureMapPopup-shop[data-environment-type=slushy_shoreline]{background-color:#a0d3ee}.treasureMapPopup-shop[data-environment-type=seasonal_garden]{background-color:#e8e8e9}.treasureMapPopup-shop[data-environment-type=pollution_outbreak]{background-color:#cde691}.treasureMapPopup-shop[data-environment-type=kings_gauntlet]{background-color:#ccc}.treasureMapPopup-shop[data-environment-type=cape_clawed]{background-color:#b8d3dc}.treasureMapPopup-shop[data-environment-type=catacombs]{background-color:#a88ca4}.treasureMapPopup-shop[data-environment-type=great_gnarled_tree]{background-color:#abd59b}.treasureMapPopup-shop[data-environment-type=town_of_digby]{background-color:#e5e6d8}.treasureMapPopup-shop[data-environment-type=mousoleum]{background-color:#d6c8a2}.treasureMapPopup-shop[data-environment-type=harbour]{background-color:#fffcb6}.treasureMapPopup-shop[data-environment-type=queso_quarry],.treasureMapPopup-shop[data-environment-type=queso_plains]{display:none}.treasureMapPopup-shop-item-description-costContainer{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;padding-top:5px;margin-top:10px;border-top:1px solid #ccc}.treasureMapInventoryView-scrollCase-name{padding-bottom:5px}.mapper-self img{border-radius:50%;outline:2px solid #73ddff}.treasureMapView-block.treasureMapView-scavengerHunt{min-height:auto;padding:10px;background:#edfff2}.treasureMapView-hunter.empty img.treasureMapView-hunter-image{border:1px solid #aaa;opacity:.4}.treasureMapDialogView-userSelector .userSelectorView-content{height:550px}.treasureMapDialogView .userSelector-cell.name{font-size:12px}td.userSelector-cell.map_num_clues_found.number{font-size:8px}th.userSelector-column.is_favourite{color:transparent}.userSelector-table th.userSelectorView-sortByLink{text-align:center}.userSelector-table th.userSelectorView-sortByLink:after{margin-right:10px;margin-left:1px}.userSelectorView-filterContainer{font-size:12px}label.userSelectorView-filter-label{color:transparent}.treasureMapUserSelectorView-toggleFavouritesContainer.treasureMapView-block-title label{font-weight:400}.treasureMapDialogView .userSelector-cell abbr{text-decoration:none}.treasureMapDialogView-userSelector-selectedUserList-content{counter-reset:sent left}.treasureMapDialogView-userSelector-selectedUser{position:relative;counter-increment:sent}.treasureMapDialogView-userSelector-selectedUser.empty{counter-increment:left}.treasureMapUserSelectorView-actions:hover .treasureMapDialogView-userSelector-selectedUser:after{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-size:16px;font-weight:900;color:#fff;text-align:center;text-shadow:-1px 0 1px #000,1px 0 1px #000,0 0 0 #000,0 -1px 1px #000,0 1px 1px #000,0 0 0 #000;content:counter(sent)}.treasureMapUserSelectorView-actions:hover .treasureMapDialogView-userSelector-selectedUser.empty:after{content:counter(left)}.userSelector-table .userSelector-groupHeading td{padding:5px 0 2px 5px;border-right:none;border-left:none}.userSelector-table .userSelector-groupHeading td:first-child{border-top:none}.treasureMapView-environment-hunters .treasureMapView-hunter.captain .treasureMapView-hunter-image{width:20px;height:20px}.mh-mapper-consolation-prizes{display:flex;flex-direction:column;margin:10px 5px}h2.mh-mapper-consolation-prizes-title{padding:5px;margin-top:10px;font-size:12px;font-weight:700}.mh-mapper-consolation-prize{display:flex;flex-direction:row;align-items:center}img.mh-mapper-consolation-prize{width:25px;height:25px;margin-right:5px}.treasureMapView-block-title.mh-ui-environments-title,.treasureMapView-block-title.mh-ui-map-location-title,.treasureMapView-block-title.mh-ui-consolation-prizes-title{display:none}.treasureMapView-block-title.mh-ui-goals-title{margin:-7px;color:transparent}.treasureMapRootView-subTab-label{display:none}.treasureMapView-block-search{right:7px;bottom:15px}input.treasureMapView-block-search-text{height:25px;font-size:12px;border:1px solid #ccc}.treasureMapRootView-subTabRow{align-items:center}.treasureMapView-highlight{padding:3px;box-shadow:none}.treasureMapView-highlight-content{padding:6px 0}.treasureMapView-highlight.goal.active.sticky.mouse.has-mhct-ars{width:40%}.treasureMapView-highlight-weakness-types img{width:17px}.treasureMapView-goals-groups.incomplete{padding-bottom:15px}.treasureMapView-highlight.environment .treasureMapView-highlight-content,.treasureMapView-highlight-description{padding:10px}.mh-ui-environments-block .treasureMapView-block-content.halfHeight{max-height:unset}.treasureMapView-goals-group-goal.notAvailable{opacity:.5}.treasureMapView-goals-group-goal.notAvailable:hover,.treasureMapView-goals-group-goal.notAvailable.sticky{opacity:1}.complete .treasureMapView-goals-group-goal-name,.complete .treasureMapView-goals-group-goal-padding{height:35px}.treasureMapView-goals-group-goal.complete:after{width:21px;height:21px}.treasureMapView-mapLeaveContainer .mousehuntActionButton.lightBlue.treasureMapView-leaveMapButton,.mousehuntActionButton.mh-ui-leave-map-button{background:#ffa5a5}.treasureMapView-mapLeaveContainer .mousehuntActionButton.lightBlue.treasureMapView-leaveMapButton:before,.mousehuntActionButton.mh-ui-leave-map-button:before{background:#f27b6a;box-shadow:0 0 10px #ffa5a5 inset}.treasureMapView-mapLeaveContainer .mousehuntActionButton.lightBlue.treasureMapView-leaveMapButton:hover:before,.treasureMapView-mapLeaveContainer .mousehuntActionButton.lightBlue.treasureMapView-leaveMapButton:focus:before,.mousehuntActionButton.mh-ui-leave-map-button:hover:before,.mousehuntActionButton.mh-ui-leave-map-button:focus:before{background:#ffa5a5}.treasureMapView-block-content.treasureMapInvitesView-scoreboards{padding:2px;overflow-x:hidden}.mh-dark-mode .pageFrameView #overlayPopup.treasureMapPopup .treasureMapRootView-content a.treasureMapView-block-row.active{color:#000;background:#f2eb6f}.treasureMapView-hunter.upgrader .treasureMapView-hunter-image{box-shadow:0 0 1px 3px #ffb40c}.treasureMapView-hunter-miceCaught.active{background-color:#eee}.mh-dark-mode .pageFrameView .treasureMapView-rightBlock{padding:0;background-color:transparent}.treasureMapView-highlight-catcher{display:inline-block;height:auto;background:none;border:none}.treasureMapView-highlight-group,.treasureMapView-highlight-environments{text-align:center}.treasureMapView-highlight-catcher-title{display:inline-block;margin-top:-20px;margin-left:12px;vertical-align:middle}.treasureMapView-highlight-weakness-title{font-size:8.4px}.treasureMapView-highlight.goal{width:30%}.treasureMapView-highlight-weaknessContainer{display:flex;align-items:baseline;margin:0 1px}.treasureMapInventoryView-relicHunter-hintSuffix{margin-bottom:10px;font-size:10px;font-style:italic;text-align:center}.treasureMapInventoryView-relicHunter{padding-top:120px}.treasureMapInventoryView-relicHunter:before{height:110px;border-bottom:1px solid #ccc}.treasureMapPopup-season-reward-name{padding:2px;font-size:11px}.treasureMapPopup-seasonContainer.mousehuntTooltipParent{font-size:11px}.treasureMapInventoryView .treasureMapView-block-search{right:0}.treasureMapInventoryView .treasureMapView-block-title,.treasureMapShopsView .treasureMapView-block-title{margin-bottom:0;visibility:hidden}.treasureMapInventoryView .treasureMapView-block-search,.treasureMapShopsView .treasureMapView-block-search{visibility:visible}.treasureMapRootView-footer .treasureMapRootView-footer-item{font-size:11px}.treasureMapRootView-footer .treasureMapRootView-footer-item:nth-child(3) .treasureMapRootView-footer-item-thumb,.treasureMapRootView-footer .treasureMapRootView-footer-item:nth-child(4) .treasureMapRootView-footer-item-thumb{height:21px;padding-left:3px;margin-right:-10px;background-color:#7b789a;background-repeat:no-repeat;background-position:center;border-top-right-radius:0;border-bottom-right-radius:0}.treasureMapRootView-footer .treasureMapRootView-footer-item:nth-child(3) .treasureMapRootView-footer-item-quantity,.treasureMapRootView-footer .treasureMapRootView-footer-item:nth-child(4) .treasureMapRootView-footer-item-quantity{height:13px;padding:4px;margin-left:5px;border-top-left-radius:0;border-bottom-left-radius:0}.treasureMapView-mapMenu.treasureMapRootView-padding{margin-bottom:30px}.treasureMapView-mapMenu.treasureMapRootView-padding.max_hunters_10{margin-bottom:50px}.mh-ui-we-did-it-title{display:none}.mh-ui-we-did-it-block{margin-top:3px}.treasureMapView-block.treasureMapView-reward.mh-ui-we-did-it-block{margin-top:3px;background-color:#95ef9b;border-color:#14851b}.treasureMapPopup-mapInvite .treasureMapView-hunter-wrapper.mousehuntTooltipParent{font-size:10px}.treasureMapPopup-mapInvite .treasureMapView-hunter{margin:3px 0}.treasureMapView-mapMenu-group-content.upgraded .treasureMapView-mapMenu-mapIcon,.treasureMapListingsTableView-mapThumbnail.rare{filter:drop-shadow(0 0 2px #ffb40c) drop-shadow(0 0 5px #ffb40c);box-shadow:none}.treasureMapDialogView-inviteFriend-completeContainer{display:grid;grid-template-columns:repeat(4,1fr);place-items:stretch stretch}.treasureMapDialogView-inviteFriend-complete{display:flex;align-items:center;justify-content:flex-start;text-align:left}.treasureMapDialogView-environmentGoals{max-height:unset}.treasureMapView-hunter-icon{top:-9px}.treasureMapTooltipView.active{transform:translateY(0)}.treasureMapView-mapWarning.treasureMapRootView-padding{padding-left:5px;margin-bottom:10px;font-size:10px;line-height:1.5;text-align:center;box-shadow:0 0 1px 1px #ffa5a5}.treasureMapView-consolationPrizeMessage{margin:15px 0;box-shadow:0 0 1px 1px #ffa5a5}.treasureMapView-mapWarning:before{display:none}.treasureMapDialogView-title{margin-bottom:5px}\n';
}
});
// src/modules/better-maps/styles/helper.css
var helper_default2;
var init_helper2 = __esm({
"src/modules/better-maps/styles/helper.css"() {
helper_default2 = "#custom-submenu-item-mh-improved-map-helper .name{display:flex;flex-direction:column;justify-content:center;height:30px;line-height:1.3}#custom-submenu-item-mh-improved-map-helper .title{overflow:hidden;font-size:11px;text-overflow:ellipsis;white-space:nowrap}#custom-submenu-item-mh-improved-map-helper .subtitle{font-size:10px}.mh-improved-map-helper-popup pre{box-sizing:border-box;width:100%;height:400px;padding:10px;overflow:scroll;font-family:monospace;white-space:normal;background-color:#eee}\n";
}
});
// src/modules/better-maps/styles/hunters.css
var hunters_default;
var init_hunters = __esm({
"src/modules/better-maps/styles/hunters.css"() {
hunters_default = ".treasureMapView-componentContainer{width:130px}.treasureMapView-block.treasureMapView-invitedHuntersList{margin:20px 0}.treasureMapView-block.treasureMapView-invitedHuntersList .userSelectorView-user-image{width:20px;height:20px}.treasureMapView-block.treasureMapView-invitedHuntersList .treasureMapView-invitedHuntersList-row-link{font-size:10px}.treasureMapView-invitedHuntersList-row{margin-top:3px}.treasureMapDialogView-deleteInviteRequest.reject-invite-request{display:inline-block;width:12px;padding:3px;margin-right:6px;color:#242424;text-align:center;background-color:#dcd5d5;border-radius:50%}.treasureMapDialogView-deleteInviteRequest.reject-invite-request:hover,.treasureMapDialogView-deleteInviteRequest.reject-invite-request:focus,.treasureMapDialogView-deleteInviteRequest.reject-invite-request:active{text-decoration:none;background-color:#a3a3a3}.treasureMapView-allyRow:last-child .treasureMapView-allyCell.hunters-last-slot{display:inline-block;width:90px;margin-top:16px;margin-left:10px;font-style:italic;white-space:nowrap;vertical-align:middle}.treasureMapView-mapMenu-group-invite.mh-ui-invite-wrapper{display:flex;gap:5px}.treasureMapView-mapMenu-group-invite .mousehuntActionButton.mh-ui-invite-button{margin-bottom:0!important}.mh-ui-find-hunters-title,.mh-ui-map-settings-title,.mh-ui-share-title{display:none}.mh-ui-find-hunters-block{margin-top:18px}.mh-ui-map-settings-block .treasureMapView-block-content{display:flex;flex-direction:column;gap:5px;align-items:stretch;justify-content:center}.treasureMapView-block.mh-ui-share-block .treasureMapView-block-content{display:flex;gap:3px;align-items:center}a.mousehuntActionButton.lightBlue.treasureMapView-inviteModeButton{margin-top:0}.mh-ui-find-hunters-block .treasureMapView-mapMenu-group-invite{display:flex;align-items:stretch;justify-content:space-around}.treasureMapView-mapMenu-group-invite .mousehuntActionButton{margin-bottom:0!important}.treasureMapView-header .treasureMapView-hunter-image{min-width:44px;min-height:44px}.mh-ui-quick-invite-wrapper{position:relative;box-sizing:border-box;display:flex;align-items:center;justify-content:space-around;max-width:185px;padding:10px;margin-bottom:10px;background-color:#eee;border:1px solid #ccc;border-radius:3px}input.mh-ui-quick-invite-input{width:auto;max-width:100px;padding:5px;margin:0;border:1px solid #c6c6c6}.mh-ui-quick-invite-indicator{position:absolute;top:15px;right:65px;width:20px;height:20px}.mh-ui-quick-invite-indicator.mh-ui-quick-invite-spinner{background-image:url(https://www.mousehuntgame.com/images/ui/loaders/small_spinner.gif?asset_cache_version=2);background-repeat:no-repeat;background-size:16px}.mh-ui-quick-invite-indicator.mh-ui-quick-invite-success{background-image:url(https://www.mousehuntgame.com/images/ui/hud/meadow_checkmark.png?asset_cache_version=2);background-repeat:no-repeat;background-size:16px}.mh-ui-quick-invite-wrapper .mh-ui-error-message{position:absolute;top:42px;right:5px;left:5px;text-align:center}span.treasureMapView-shareLinkInputStatus{position:absolute;right:20px;bottom:4px;padding:3px;font-size:11px;background-color:#baf966;border-radius:5px;box-shadow:0 1px 2px -1px #000}.treasureMapView-mapMenu-group-invite{display:flex;flex-direction:column;gap:10px}.treasureMapView-inviteModeDescription{margin-bottom:5px}\n";
}
});
// src/modules/better-maps/styles/map-ar.css
var map_ar_default;
var init_map_ar = __esm({
"src/modules/better-maps/styles/map-ar.css"() {
map_ar_default = ".treasureMapView.treasure .treasureMapView-goals-group-goal[data-mh-ui-ar=true] .treasureMapView-goals-group-goal-name,.treasureMapView.event .treasureMapView-goals-group-goal[data-mh-ui-ar=true] .treasureMapView-goals-group-goal-name{position:relative;display:flex;flex-direction:column;align-items:flex-start;justify-content:space-evenly}.mh-ui-ar{padding:3px;font-size:10px;color:#000;background-color:#fff;border:1px solid #d9d9d9;border-radius:4px}.poster .mh-ui-ar{position:absolute;right:0;bottom:-7px;font-family:lucida grande,tahoma,verdana,arial,sans-serif;font-size:10px;color:#000;text-shadow:none}.mh-ui-ar-hidden .mh-ui-ar{display:none}.complete .mh-ui-ar{background-color:#e5e5e5}.mh-ui-ar-guaranteed{background-color:#0ef;border-color:#8fb1b3}.mh-ui-ar-super-easy{background-color:#8ffaab;border-color:#73b484}.mh-ui-ar-easy{background-color:#b9ff9e;border-color:#8fb17a}.mh-ui-ar-medium{background-color:#ffdab9;border-color:#c5a381}.mh-ui-ar-hard{background-color:#ffc440;border-color:#c59c40}.mh-ui-ar-super-hard{background-color:#ff9e9e;border-color:#c55a5a}.mh-ui-ar-extreme{color:#fff;background-color:#ed6464;border-color:#a64a4a}.mh-ui-ar-impossible{color:#fff;background-color:#c92222;border-color:#5a2121}.mh-ui-toggle-ar-button,.mh-ui-ar-failed{margin-left:10px}.treasure .treasureMapView-goals-group-goal[data-mh-ui-ar=true].item .treasureMapView-goals-group-goal-name,.event .treasureMapView-goals-group-goal[data-mh-ui-ar=true].item .treasureMapView-goals-group-goal-name{align-items:center}\n";
}
});
// src/modules/better-maps/styles/mhct.css
var mhct_default;
var init_mhct = __esm({
"src/modules/better-maps/styles/mhct.css"() {
mhct_default = ".mhct-data{display:none;padding-top:5px;margin-top:5px;border-top:1px solid #a8a8a8}.mouse-container-selected .mhct-data{display:block}.treasureMapView-highlight.goal.sticky .mh-ui-mouse-links-map-ars .mhct-data{display:block;margin-top:3px}.mhct-title{display:none;padding:10px;margin-bottom:10px;font-size:12px;border-bottom:1px solid #dedede}.mhct-row{display:grid;grid-template-columns:2fr 2fr 1fr;column-gap:5px;place-items:center stretch;padding:5px 0;font-size:11px;color:#000}.mhct-row:nth-child(odd){background-color:#e2e2e2}.mhct-location{display:flex;flex-direction:column}.mhct-stage{color:#666}.mh-dark-mode .mhct-stage{color:#a7a7a7}.mhct-rate{font-family:monospace;font-size:13px;text-align:right}.mh-ui-mouse-links-map-ars .mhct-data{position:relative;display:flex;padding:4px;margin:0;color:#000;background-color:#fff;border-top:none;border-radius:6px}.mh-dark-mode .mh-ui-mouse-links-map-ars .mhct-data{color:#fff;border-color:#2c2c2c}.mh-ui-mouse-links-map-ars .mhct-row:nth-child(odd){color:#000;background-color:#f2f2f2}.mh-ui-mouse-links-map-ars .mhct-rate{font-size:14px}.mh-ui-mouse-links-map-ars .mhct-row{place-items:start stretch}.mh-ui-mouse-links-map-ars .mhct-title{display:flex;align-items:center;justify-content:space-between;padding:5px;margin:-4px -4px 2px;font-size:11px;color:#000;background-color:#d6d6d6;border-top:1px solid #dedede;border-bottom:1px solid #2c415a;border-top-left-radius:4px;border-top-right-radius:4px}.mh-dark-mode .mh-ui-mouse-links-map-ars .mhct-title{color:#fff;background-color:#000;border-color:#2c2c2c}.mh-ui-mouse-links-map-ars .mhct-stage{max-width:80px;overflow:hidden;text-overflow:ellipsis}\n";
}
});
// src/modules/better-maps/styles/sidebar.css
var sidebar_default;
var init_sidebar = __esm({
"src/modules/better-maps/styles/sidebar.css"() {
sidebar_default = ".mh-mapper-sidebar{padding:0;margin:10px 0 20px;border:1px solid #ddedff}.mh-mapper-sidebar .mh-mapper-sidebar-name{width:auto;padding:5px;background-color:#ddedff}.mh-mapper-sidebar-mouse:hover,.mh-mapper-sidebar-mouse:focus,.mh-mapper-sidebar-mouse:active{filter:none}.mh-mice-sidebar{background-color:#ddedff}.mh-mapper-sidebar .mousehuntHud-userStat.treasureMap{display:flex;align-items:center;justify-content:center;width:100%;text-shadow:none}.mh-mapper-sidebar .mousehuntHud-userStat.treasureMap .label{width:auto;padding:0;color:#181818;text-shadow:none}.mh-mapper-sidebar .mousehuntHud-userStat.treasureMap .icon{margin-right:10px}.mh-mapper-sidebar-mouse{display:flex;gap:5px;align-items:center;justify-content:flex-start;padding:1px 5px}.mh-mapper-sidebar .mouse-image{width:25px;height:25px}\n";
}
});
// src/modules/better-maps/styles/sorted.css
var sorted_default;
var init_sorted = __esm({
"src/modules/better-maps/styles/sorted.css"() {
sorted_default = '#sorted-mice-container{margin:20px 5px}#sorted-mice-container .mouse-category-container{display:grid;grid-template-columns:1fr 1fr 1fr;grid-gap:10px;place-items:stretch stretch;margin-bottom:25px}#sorted-mice-container .mouse-category-wrapper{position:relative;color:#000;background-color:#e6e6e6;border:1px solid rgb(5 5 5 / 50%);border-radius:0;box-shadow:0 2px 1px -1px #909090}#sorted-mice-container .mouse-category-header{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;padding:6px 10px;margin-bottom:3px;color:#000;background-color:#ffffffa6;border-bottom:1px solid rgb(5 5 5)}#sorted-mice-container .mouse-category-icon{width:30px;height:30px;margin-right:10px}#sorted-mice-container .mouse-category-icon-title-wrapper{display:flex;align-items:center}#sorted-mice-container .mouse-category-title{font-size:14px}#sorted-mice-container .mouse-category-subtitle{margin-top:2px;font-size:11px;font-style:italic}#sorted-mice-container .mouse-category-mice{padding:4px}#sorted-mice-container .mouse-container{padding-right:5px;margin-bottom:5px;cursor:pointer;border-radius:4px}#sorted-mice-container .mouse-data{position:relative;display:flex;align-items:center}#sorted-mice-container .mouse-name{flex:1}#sorted-mice-container .mouse-extra-info{display:none}#sorted-mice-container .mouse-container-selected,#sorted-mice-container .mouse-container:hover,#sorted-mice-container .mouse-container:focus{position:relative;background:#ffffff7f;outline:1px solid #6d6d6d}#sorted-mice-container .mouse-container-selected .mouse-mhct-extra-info-wrapper{position:absolute;right:-30px;left:-30px;z-index:10;display:block;padding:10px 5px;margin-top:-5px;background-color:#eaeaea;border:1px solid #000;border-radius:3px;box-shadow:0 10px 15px #00000087}#sorted-mice-container .mouse-subcategory-mice .mouse-container-selected .mouse-mhct-extra-info-wrapper{right:-15px;left:-15px}#sorted-mice-container .mouse-container-selected .mouse-extra-info{display:block}#sorted-mice-container .mouse-image{width:auto;height:35px;margin:5px;border-radius:3px;outline:1px solid #989898}.mh-dark-mode #sorted-mice-container .mouse-image{border-radius:3px}#sorted-mice-container .mouse-category-wrapper-hidden{display:none}#sorted-mice-container .mouse-subcategory-wrapper{margin:3px;background-color:#fff9;border:1px solid rgb(0 0 0 / 60%);box-shadow:inset 1px 1px 2px -1px #0009}#sorted-mice-container .mouse-subcategory-header{position:relative;padding:8px;margin-bottom:3px;font-size:11px;border-bottom:1px solid #999}#sorted-mice-container .mouse-subcategory-mice{padding:0 5px}#sorted-mice-container .mouse-locations{display:flex;flex-direction:column}#sorted-mice-container .mouse-location{display:inline-block;margin-bottom:5px}#sorted-mice-container .mhct{margin-top:15px}#sorted-mice-container .location-text-wrapper{text-align:center}#sorted-mice-container .mouse-weakness{display:flex;align-items:center;margin-top:10px}#sorted-mice-container .weakness-type{display:flex;flex-wrap:wrap;align-items:center;justify-content:center}#sorted-mice-container .power-types img{width:15px;height:15px;margin:1px}#sorted-mice-container .weakness-name{flex:0 0 100%;margin-right:2px;margin-bottom:2px;font-size:10px;text-align:center}#sorted-mice-container .mouse-locations-wrapper{display:flex}.mouse-category-wrapper.mouse-category-current-floor .mouse-category-header:after,.mouse-subcategory-wrapper.mouse-subcategory-current-floor .mouse-subcategory-header:after{position:absolute;top:-4px;right:2px;z-index:1;width:25px;height:25px;margin:0;content:"";background-color:#fff;background-image:url(https://www.mousehuntgame.com//images/ui/friends/anonymous_user.png);background-size:cover;border-radius:50%}.mouse-subcategory-wrapper.mouse-subcategory-current-floor .mouse-subcategory-header:after{top:5px;border:1px solid #9f9f9f}.mouse-category-wrapper.mouse-category-current-floor .mouse-category-header:before{position:absolute;top:-8px;right:-4px;width:37px;height:48px;content:"";background-image:url(https://www.mousehuntgame.com/images/ui/hud/bountiful_beanstalk/player.png?asset_cache_version=2);filter:hue-rotate(275deg);background-repeat:no-repeat;background-position:center;background-position-y:0;background-size:100%}#sorted-mice-container .mouse-subcategory-wrapper .mouse-subcategory-header{margin-bottom:3px;background-color:#ffffffbf;border-bottom:1px solid #070707}.mhct-row.mhct-row-no-env{cursor:not-allowed}.sorted-page-content.generic-sorted-page{display:grid;grid-template-columns:1fr 1fr 1fr;gap:0 40px}.poster .sorted-page-content .mh-ui-ar{position:relative;right:unset;bottom:unset}.sorted-page-content .mhct-stage{max-width:110px;overflow:hidden;text-overflow:ellipsis}\n';
}
});
// src/modules/better-maps/styles/sorted-map.css
var sorted_map_default;
var init_sorted_map = __esm({
"src/modules/better-maps/styles/sorted-map.css"() {
sorted_map_default = "#sorted-mice-container .mouse-category-twilight-midnight-pitch .mouse-category-title{font-size:13px}#sorted-mice-container .mouse-category-first-light-utter-darkness .mouse-category-title{font-size:12px}\n";
}
});
// src/modules/better-maps/styles/userscripts.css
var userscripts_default;
var init_userscripts = __esm({
"src/modules/better-maps/styles/userscripts.css"() {
userscripts_default = 'fieldset.tsitu-mapping{display:flex;align-items:center;justify-content:flex-end;float:right;width:200px!important;padding:0!important;margin-right:13px;margin-left:0!important;border:none!important}span.tsitu-mapping{display:flex!important;align-items:center;padding-bottom:8px;margin:0!important}span.tsitu-mapping.tsitu-refresh-span>span{display:none}.tsitu-mapping br,.tsitu-mapping legend,.tsitu-mapping label{display:none}input[name=tsitu-mapping-id-input]{width:100px;height:17px;line-height:20px}.tsitu-mapping button[style="margin-left: 5px;"]{padding:4px 3px;margin-right:4px;margin-left:2px!important;font-size:9px;color:#000;text-shadow:0 0 1px #fff;background-color:#f4e830;border:1px solid #000;border-radius:5px;box-shadow:0 -5px 8px -2px #ffae00 inset}.tsitu-mapping button[style="margin-left: 5px;"]:hover,.tsitu-mapping button[style="margin-left: 5px;"]:focus{background-color:#fff600;box-shadow:inset 0 0 16px 2px #fffaab}button.mousehuntActionButton.tiny.tsitu-mapping{padding:4px!important;margin:0!important}.mh-dark-mode input[name=tsitu-mapping-id-input]{color:#fff;background-color:#636363;border:1px solid #2c2c2c}\n';
}
});
// src/modules/better-maps/styles/index.js
var main6, styles_default6;
var init_styles7 = __esm({
"src/modules/better-maps/styles/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
init_general2();
init_helper2();
init_hunters();
init_map_ar();
init_mhct();
init_sidebar();
init_sorted();
init_sorted_map();
init_userscripts();
main6 = () => {
addStyles([
general_default2,
helper_default2,
hunters_default,
map_ar_default,
mhct_default,
sidebar_default,
sorted_default,
sorted_map_default,
userscripts_default
]);
};
styles_default6 = main6;
}
});
// src/modules/better-maps/index.js
var addBlockClasses, interceptMapRequest, initMapper, intercept, clearStickyMouse, updateRelicHunterHint, relicHunterUpdate, init7, better_maps_default;
var init_better_maps = __esm({
"src/modules/better-maps/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
init_utils4();
init_helper();
init_tab_sorted();
init_tab_goals();
init_tab_hunters();
init_relic_hunter_hints();
init_styles7();
addBlockClasses = () => {
const rightBlocks = document.querySelectorAll(".treasureMapView-rightBlock > div");
const leftBlocks = document.querySelectorAll(".treasureMapView-leftBlock > div");
const blocks = [...rightBlocks, ...leftBlocks];
let prevBlockType = "";
blocks.forEach((block) => {
if (block.classList.contains("treasureMapView-block-title")) {
const blockType = block.innerText.trim().toLowerCase().replaceAll(" ", "-").replaceAll(/[^a-z-]/g, "").replace("--", "-").replace("goalssearch", "goals");
block.classList.add(`mh-ui-${blockType}-title`);
prevBlockType = blockType;
} else {
block.classList.add(`mh-ui-${prevBlockType}-block`);
}
});
};
interceptMapRequest = (mapId) => {
sessionSet("map-refreshed", Date.now());
if (!mapId) {
return false;
}
const init61 = (mapData2) => {
addToGlobal("mapper", {
mapData: mapData2,
mapModel: new hg.models.TreasureMapModel(mapData2)
});
eventRegistry.doEvent("mapper_loaded", mapData2);
return data;
};
const data = getMapData(mapId, true);
if (data) {
return init61(data);
}
return false;
};
initMapper = (map) => {
if (!map || !map.map_id || !map.map_type) {
return;
}
const content = document.querySelector(".treasureMapRootView-content");
if (content && content.classList.contains("loading")) {
const observer = new MutationObserver((mutations, mobserver) => {
mutations.forEach((mutation) => {
if (mutation.type === "attributes" && mutation.attributeName === "class" && !mutation.target.classList.contains("loading")) {
mobserver.disconnect();
initMapper(map);
}
});
});
const rootOfChanges = document.querySelector(".treasureMapRootView");
observer.observe(rootOfChanges, {
attributes: true,
childList: true,
subtree: true
});
}
addSortedMapTab();
const tabs = document.querySelectorAll(".treasureMapRootView-subTab");
tabs.forEach((tab) => {
tab.addEventListener("click", () => {
addBlockClasses();
eventRegistry.doEvent("map_tab_click", map);
eventRegistry.doEvent(`map_${tab.getAttribute("data-type")}_tab_click`, map);
});
});
eventRegistry.doEvent("map_show_goals_tab_click", map);
addBlockClasses();
};
intercept = () => {
const parentShowMap = hg.controllers.TreasureMapController.showMap;
hg.controllers.TreasureMapController.showMap = (id = false) => {
var _a, _b;
parentShowMap(id);
const intercepted = interceptMapRequest(id != null ? id : (_b = (_a = user == null ? void 0 : user.quests) == null ? void 0 : _a.QuestRelicHunter) == null ? void 0 : _b.default_map_id);
setTimeout(() => {
var _a2, _b2;
if (!intercepted) {
interceptMapRequest(id != null ? id : (_b2 = (_a2 = user == null ? void 0 : user.quests) == null ? void 0 : _a2.QuestRelicHunter) == null ? void 0 : _b2.default_map_id);
}
}, 1e3);
};
onRequest((data) => {
if (data.treasure_map && data.treasure_map.map_id) {
setMapData(data.treasure_map.map_id, data.treasure_map);
}
}, "managers/ajax/users/treasuremap.php", true);
onRequest((data) => {
if (data.treasure_map && data.treasure_map.map_id) {
setMapData(data.treasure_map.map_id, data.treasure_map);
}
}, "managers/ajax/board/board.php", true);
};
clearStickyMouse = () => {
const sticky = document.querySelector(".treasureMapView-highlight");
if (sticky) {
sticky.classList.remove("sticky");
sticky.classList.remove("active");
}
const mapGroupGoal = document.querySelectorAll(".treasureMapView-goals-group-goal");
if (mapGroupGoal) {
mapGroupGoal.forEach((goal) => {
goal.classList.remove("sticky");
});
}
};
updateRelicHunterHint = () => __async(void 0, null, function* () {
const relicHunter = document.querySelector(".treasureMapInventoryView-relicHunter-hint");
if (!relicHunter) {
return false;
}
if (relicHunter.getAttribute("data-travel-button-added")) {
return true;
}
relicHunter.setAttribute("data-travel-button-added", true);
const hint = relicHunter.innerText.trim();
let key = false;
Object.keys(relic_hunter_hints_default).forEach((k) => {
if (relic_hunter_hints_default[k].includes(hint)) {
key = k;
}
});
if (!key) {
return true;
}
environments = yield getData("environments");
const environment = environments.find((e) => e.id === key);
if (!environment) {
return true;
}
let hintWrapper = document.querySelector(".treasureMapInventoryView-relicHunter");
if (!hintWrapper) {
hintWrapper = relicHunter;
}
makeElement("div", "treasureMapInventoryView-relicHunter-hintSuffix", `... in ${environment.name}.`, hintWrapper);
const travelButton = makeElement("div", ["mousehuntActionButton", "small"]);
makeElement("span", "", "Travel", travelButton);
travelButton.addEventListener("click", () => {
hg.utils.User.travel(environment.id);
});
hintWrapper.append(travelButton);
return true;
});
relicHunterUpdate = () => {
const _showInventory = hg.controllers.TreasureMapController.showInventory;
hg.controllers.TreasureMapController.showInventory = () => {
_showInventory();
let tries = 0;
const interval = setInterval(() => __async(void 0, null, function* () {
tries++;
if ((yield updateRelicHunterHint()) || tries > 5) {
clearInterval(interval);
}
}), 250);
};
};
init7 = () => __async(void 0, null, function* () {
styles_default6();
eventRegistry.addEventListener("map_sorted_tab_click", showSortedTab);
eventRegistry.addEventListener("map_show_goals_tab_click", showGoalsTab);
eventRegistry.addEventListener("map_manage_allies_tab_click", showHuntersTab);
eventRegistry.addEventListener("map_tab_click", (map) => {
hideGoalsTab(map);
hideSortedTab(map);
clearStickyMouse();
});
eventRegistry.addEventListener("mapper_loaded", initMapper);
intercept();
relicHunterUpdate();
if (getFlag("better-maps-helper")) {
helper_default();
}
});
better_maps_default = {
id: "better-maps",
name: "Better Maps",
type: "better",
default: true,
description: "Adds a number of features to maps, including showing attracting rates, a sorted tab that categorizes a variety of maps, and showing more infomation on the Hunters tab.",
load: init7
};
}
});
// src/modules/better-marketplace/settings/index.js
function settings_default4(module) {
addMhuiSetting(
"better-marketplace-search-all",
"Default to showing all items in the marketplace search.",
false,
"If disabled, then useless items will be hidden from the search dropdown by default.",
module
);
}
var init_settings5 = __esm({
"src/modules/better-marketplace/settings/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
}
});
// src/modules/better-marketplace/styles.css
var styles_default7;
var init_styles8 = __esm({
"src/modules/better-marketplace/styles.css"() {
styles_default7 = "div#select2-drop.marketplaceView-header-search-dropdown .select2-result-label{white-space:nowrap}div#select2-drop.marketplaceView-header-search-dropdown .select2-result-sub .select2-result-label{display:grid;grid-template-columns:30px 4fr 1fr;place-items:center start;padding-left:10px}div#select2-drop.marketplaceView-header-search-dropdown .friendsPage-filter-environment-thumb{width:25px;height:25px;border-radius:0;box-shadow:none}.marketplaceView-item-quickListings .marketplaceView-table-listing-quantity:hover,.marketplaceView-item-quickListings .marketplaceView-table-listing-quantity:focus{text-decoration:underline}a.marketplaceView-goldValue.marketplaceView-quantityNotGold:after{display:none;background-image:none}label.mhui-marketplace-search-toggle{display:flex;align-items:center;justify-content:center;font-size:9px;color:#fff;border-radius:10px}.marketplaceView-header-searchContainer{top:5px;right:30px!important;height:70px}.marketplaceView-header-search-title{margin-bottom:2px}.marketplaceView-item-leftBlock{margin-top:20px}.marketplaceView-itemImage .limitedEdition{display:none}.marketplaceHome-blockItem.small .marketplaceView-itemImage{width:70px;height:70px;padding-bottom:0;margin-bottom:10px}.marketplaceHome-blockItem.small .marketplaceView-item-imageContainer{width:auto}.marketplaceHome-blockItem.small .marketplaceView-favouriteButton{right:5px}tr.open td.marketplaceView-table-name{white-space:nowrap}.marketplaceListing .marketplaceView-itemImage.favourite{border:none;box-shadow:none}.marketplaceView-item h1{display:flex;align-items:center;justify-content:flex-start}.mh-improved-marketplace-item-title-actions{display:inline-flex;flex-grow:1;gap:5px;justify-content:end;margin-right:5px}.marketplaceView-item.view .mousehuntCharacterGuideBox .mousehuntCharacterGuideBox-content{margin-left:80px}.marketplaceView-item-averagePrice,.marketplaceView-item-averagePrice span{font-size:12px}\n";
}
});
// src/data/items-marketplace-hidden.json
var items_marketplace_hidden_default;
var init_items_marketplace_hidden = __esm({
"src/data/items-marketplace-hidden.json"() {
items_marketplace_hidden_default = [
{
id: 361,
name: "Super Regal Gift Basket"
},
{
id: 387,
name: "2010 Pumpkin Treat Basket"
},
{
id: 401,
name: "Halloween Basket"
},
{
id: 430,
name: "Wishing Well Basket"
},
{
id: 432,
name: "Cornucopia Gift Basket"
},
{
id: 434,
name: "Festive Gift Basket"
},
{
id: 436,
name: "Jumbo Festive Gift Basket"
},
{
id: 468,
name: "Massive Festive Gift Basket"
},
{
id: 499,
name: "Heart of the Rabbit Gift Basket"
},
{
id: 504,
name: "Birthday Gift Basket"
},
{
id: 516,
name: "Warpath Survival Kit"
},
{
id: 546,
name: "Catacombs Survival Kit"
},
{
id: 588,
name: "Spring Gift Basket 2011"
},
{
id: 592,
name: "Zombie Invasion Survival Kit"
},
{
id: 593,
name: "Muridae Gift Basket"
},
{
id: 594,
name: "Muridae Mega Kit"
},
{
id: 595,
name: "Muridae Supply Kit"
},
{
id: 619,
name: "Lucky Hunting Kit"
},
{
id: 622,
name: "Derr Tribal Kit"
},
{
id: 623,
name: "Elub Tribal Kit"
},
{
id: 624,
name: "Mega Tribal Kit"
},
{
id: 625,
name: "Nerg Tribal Kit"
},
{
id: 631,
name: "Library Gift Basket"
},
{
id: 634,
name: "Library Supply Kit"
},
{
id: 687,
name: "2011 Pumpkin Treat Basket"
},
{
id: 689,
name: "Jumbo Halloween Goodie Bag"
},
{
id: 705,
name: "2011 Spooky Supply Kit"
},
{
id: 723,
name: "Feta Gift Basket"
},
{
id: 731,
name: "Winter Survival Kit"
},
{
id: 765,
name: "Festive Tournament Supply Kit"
},
{
id: 775,
name: "Tournament Supply Kit"
},
{
id: 788,
name: "Dragon Festival Celebration Kit"
},
{
id: 789,
name: "Dragon Festival Gift Basket"
},
{
id: 805,
name: "<3 Gift Basket"
},
{
id: 807,
name: "Party Giftbox"
},
{
id: 809,
name: "Party-in-a-Box"
},
{
id: 832,
name: "Spring Gift Basket 2012"
},
{
id: 833,
name: "Egg Hunting Kit"
},
{
id: 852,
name: "Marshmallow Gift Basket"
},
{
id: 857,
name: "Shoreline Supplies"
},
{
id: 880,
name: "Drilling Gift Set"
},
{
id: 881,
name: "Iceberg Invasion Kit"
},
{
id: 904,
name: "Athlete's Kit"
},
{
id: 905,
name: "Training Gift Basket"
},
{
id: 920,
name: "Treasure Hunting Kit"
},
{
id: 956,
name: "2012 Pumpkin Treat Basket"
},
{
id: 958,
name: "Cursed City Charm Pack"
},
{
id: 961,
name: "Essence Collector Kit"
},
{
id: 964,
name: "Living Garden Charm Pack"
},
{
id: 965,
name: "Lost City Charm Pack"
},
{
id: 967,
name: "Sand Crypts Charm Pack"
},
{
id: 968,
name: "Sand Dunes Charm Pack"
},
{
id: 969,
name: "Twisted Essence Collector Kit"
},
{
id: 970,
name: "Twisted Garden Charm Pack"
},
{
id: 1060,
name: "New Year's Party Ball"
},
{
id: 1083,
name: "Cozy Cruise Gift Basket"
},
{
id: 1084,
name: "Cruise Commander Crate"
},
{
id: 1104,
name: "Birthday Party Pack"
},
{
id: 1105,
name: "Super MechaParty Box"
},
{
id: 1146,
name: "Spring Gift Basket"
},
{
id: 1170,
name: "Bounty Trail Kit"
},
{
id: 1171,
name: "Claw Shot Chest"
},
{
id: 1173,
name: "Sheriff's Satchel"
},
{
id: 1188,
name: "Daredevil Canyon Train Pack"
},
{
id: 1189,
name: "Entire Train Car"
},
{
id: 1191,
name: "Raider River Train Pack"
},
{
id: 1192,
name: "Supply Depot Train Pack"
},
{
id: 1193,
name: "Heavy Train Trunk"
},
{
id: 1213,
name: "2013 Pumpkin Treat Basket"
},
{
id: 1214,
name: "Haunted Treasure Hunting Kit"
},
{
id: 1215,
name: "Ultimate Spooky Supply Bundle"
},
{
id: 1221,
name: "Spooky Skin Pack"
},
{
id: 1248,
name: "Regal Gift Basket"
},
{
id: 1257,
name: "Bucket of Snowball Bocconcini"
},
{
id: 1258,
name: "Festive Bundle"
},
{
id: 1260,
name: "Festive Skin Pack #1"
},
{
id: 1261,
name: "Fort Builder's Lunchbox"
},
{
id: 1262,
name: "Fort Builder's Construction Kit"
},
{
id: 1271,
name: "Super Festive Bundle"
},
{
id: 1272,
name: "Ultimate Festive Bundle"
},
{
id: 1299,
name: "2014 Party Pack"
},
{
id: 1317,
name: "Hazmat Cleanup Kit"
},
{
id: 1352,
name: "Horse Festival Celebration Kit"
},
{
id: 1353,
name: "Lunar Athletic Pack"
},
{
id: 1358,
name: "Year of the Horse Gift Basket"
},
{
id: 1393,
name: "Forgotten Art of Dance Skin Pack"
},
{
id: 1396,
name: "Cupcake Party Tower"
},
{
id: 1397,
name: "Cupcake Party Tray"
},
{
id: 1400,
name: "Sugar Rush in a Box"
},
{
id: 1415,
name: "Gnawnia Rift Gift Basket"
},
{
id: 1416,
name: "Gnawnia Rift Survival Kit"
},
{
id: 1432,
name: "Bonus Egg Hunting Kit"
},
{
id: 1459,
name: "Airship Supply Kit"
},
{
id: 1460,
name: "Dirigible Kit"
},
{
id: 1496,
name: "Diving Kit"
},
{
id: 1499,
name: "Ocean Crafting Kit"
},
{
id: 1500,
name: "Submersible Supplies"
},
{
id: 1501,
name: "Sunken Gift Basket"
},
{
id: 1526,
name: "MEGA Tournament Supply Kit"
},
{
id: 1532,
name: "Burroughs Blackhole Box"
},
{
id: 1533,
name: "Burroughs Rift Crate"
},
{
id: 1534,
name: "Magical Mist Basket"
},
{
id: 1556,
name: "2014 Pumpkin Treat Basket"
},
{
id: 1559,
name: "Halloween Charm Bag"
},
{
id: 1560,
name: "Halloween Pillowcase"
},
{
id: 1564,
name: "Spooky Shuffle Pack"
},
{
id: 1565,
name: "Spooky Skin Pack #2"
},
{
id: 1590,
name: "Winter Builder Charm"
},
{
id: 1591,
name: "Winter Hoarder Charm"
},
{
id: 1592,
name: "Winter Miser Charm"
},
{
id: 1593,
name: "Festive Skin Pack #2"
},
{
id: 1594,
name: "Ice Fortress Hobbyist Case"
},
{
id: 1595,
name: "Ice Fortress Craftsman Crate"
},
{
id: 1596,
name: "Ice Fortress Starter Kit"
},
{
id: 1601,
name: "Ice Fortress Pro Pack"
},
{
id: 1608,
name: "Throwable Snowball Booster Pack"
},
{
id: 1609,
name: "Winter Builder Charm Kit"
},
{
id: 1610,
name: "Winter Hoarder Charm Kit"
},
{
id: 1611,
name: "Winter Miser Charm Kit"
},
{
id: 1628,
name: "2015 Party Pack"
},
{
id: 1632,
name: "Tactical Zombie Gear"
},
{
id: 1633,
name: "Whisker Rift Domination Box"
},
{
id: 1634,
name: "Whisker Rift Hunting Kit"
},
{
id: 1635,
name: "Whisker Wicker Gift Basket"
},
{
id: 1636,
name: "Woodsy Charm Bag"
},
{
id: 1655,
name: "Be Mine Big Box"
},
{
id: 1661,
name: "Sheep Festival Jumbo Kit"
},
{
id: 1662,
name: "Year of the Sheep Gift Basket"
},
{
id: 1678,
name: "Cupcake Combo Kit"
},
{
id: 1691,
name: "Lucky Clover Kit"
},
{
id: 1698,
name: "Eggstra Charge Charm Kit"
},
{
id: 1717,
name: "Glowing Gruyere Kit"
},
{
id: 1718,
name: "Nightshade Basket"
},
{
id: 1719,
name: "Nightshade Kit"
},
{
id: 1720,
name: "Underground Exploration Kit"
},
{
id: 1743,
name: "Nightshade Farming Kit"
},
{
id: 1761,
name: "Jumbo Treasure Hunting Kit"
},
{
id: 1843,
name: "Trawler Gift Basket"
},
{
id: 1847,
name: "Adventure Gift Basket"
},
{
id: 1848,
name: "Grand Adventure Kit"
},
{
id: 1883,
name: "Glowing Gruyere Gift Basket"
},
{
id: 1884,
name: "Labyrinth Exploration Kit"
},
{
id: 1924,
name: "Labyrinth Treasure Hunting Kit"
},
{
id: 1926,
name: "2015 Halloween Skin Pack"
},
{
id: 1927,
name: "Spooky Shuffle Bonanza Box"
},
{
id: 1931,
name: "2015 Pumpkin Treat Basket"
},
{
id: 1952,
name: "Super Sudsy Cleanup Kit"
},
{
id: 1971,
name: "Jumbo Regal Gift Basket"
},
{
id: 1986,
name: "Asiago Gift Basket"
},
{
id: 1993,
name: "Tobogganer's Big Box"
},
{
id: 1994,
name: "Ultimate Festive Kit"
},
{
id: 2005,
name: "2016 Party Pack"
},
{
id: 2011,
name: "Monkey Festival Jumbo Kit"
},
{
id: 2012,
name: "Year of the Monkey Gift Basket"
},
{
id: 2025,
name: "Labyrinth Puzzle Box Recovery Kit"
},
{
id: 2033,
name: "Extra Sweet Gift Basket"
},
{
id: 2034,
name: "Extra Sweet Combo Kit"
},
{
id: 2035,
name: "Sprinkling Kit"
},
{
id: 2052,
name: "Lucky Rainbow Kit"
},
{
id: 2074,
name: "Oil Showers Kit"
},
{
id: 2075,
name: "Poison Flowers Kit"
},
{
id: 2076,
name: "Furoma Rift Crafting Kit"
},
{
id: 2077,
name: "Furoma Rift Enerchi Pack"
},
{
id: 2078,
name: "Furoma Rift Gift Bento Box"
},
{
id: 2079,
name: "Jumbo Furoma Rift Crafting Kit"
},
{
id: 2115,
name: "Rift Treasure Hunting Basket"
},
{
id: 2122,
name: "Ronza's Diving Supply Ship"
},
{
id: 2123,
name: "Ronza's Fungal Supply Ship"
},
{
id: 2124,
name: "Ronza's Gauntlet Supply Ship"
},
{
id: 2125,
name: "Ronza's Labyrinth Supply Ship"
},
{
id: 2126,
name: "Ronza's Living Garden Supply Ship"
},
{
id: 2127,
name: "2016 Ronza's Rift Supply Ship"
},
{
id: 2128,
name: "Ronza's Tribal Supply Ship"
},
{
id: 2178,
name: "Competitor's Kit"
},
{
id: 2179,
name: "Games Gift Basket"
},
{
id: 2185,
name: "Royal Week 5 Challenge Supply Kit"
},
{
id: 2186,
name: "Royal Week 1 Challenge Supply Kit"
},
{
id: 2187,
name: "Royal Week 4 Challenge Supply Kit"
},
{
id: 2188,
name: "Royal Week 2 Challenge Supply Kit"
},
{
id: 2189,
name: "Royal Week 3 Challenge Supply Kit"
},
{
id: 2190,
name: "2016 Halloween Skin Pack"
},
{
id: 2191,
name: "2016 Pumpkin Treat Basket"
},
{
id: 2192,
name: "Battery Gift Basket"
},
{
id: 2195,
name: "Flashlight Treasure Kit"
},
{
id: 2202,
name: "Spooky Shuffle Ticket Box"
},
{
id: 2212,
name: "Fort Rox Gift Basket"
},
{
id: 2213,
name: "Fort Rox Supply Kit"
},
{
id: 2230,
name: "Festive Skin Pack 2016"
},
{
id: 2231,
name: "Great Winter Hunt Gift Basket"
},
{
id: 2232,
name: "Great Winter Hunt Supply Kit"
},
{
id: 2233,
name: "Large Great Winter Hunt Supply Kit"
},
{
id: 2254,
name: "2017 Party Pack"
},
{
id: 2264,
name: "Year of the Rooster Gift Basket"
},
{
id: 2265,
name: "Year of the Rooster Supply Kit"
},
{
id: 2274,
name: "Lovely Valentine Bouquet"
},
{
id: 2280,
name: "Sprinkly Sprinkling Kit"
},
{
id: 2281,
name: "Sprinkly Sweet Gift Basket"
},
{
id: 2282,
name: "Sprinkly Sweet Combo Kit"
},
{
id: 2293,
name: "Fort Rox Treasure Hunting Kit"
},
{
id: 2325,
name: "Bristle Woods Rift Gift Basket"
},
{
id: 2326,
name: "Bristle Woods Rift Supply Kit"
},
{
id: 2354,
name: "Bristle Woods Rift Treasure Hunting Kit"
},
{
id: 2365,
name: "Magical Cleanup Kit"
},
{
id: 2366,
name: "Sudsy Gift Basket"
},
{
id: 2385,
name: "2017 Ronza's Rift Supply Ship"
},
{
id: 2420,
name: "Warpath Treasure Hunting Kit"
},
{
id: 2430,
name: "Moussu Picchu Gift Basket"
},
{
id: 2431,
name: "Moussu Picchu Supply Kit"
},
{
id: 2447,
name: "2017 Halloween Skin Pack"
},
{
id: 2451,
name: "Ghastly Gift Basket"
},
{
id: 2452,
name: "Spooky Supply Kit"
},
{
id: 2478,
name: "Moussu Picchu Treasure Hunting Kit"
},
{
id: 2489,
name: "Festive Skin Pack 2017"
},
{
id: 2494,
name: "Snow Golem Gift Basket"
},
{
id: 2495,
name: "Snow Golem Supply Box"
},
{
id: 2496,
name: "Stuffed Snow Golem Stocking"
},
{
id: 2497,
name: "Snow Golem Treasure Hunting Kit"
},
{
id: 2526,
name: "Let It Snow Charm"
},
{
id: 2534,
name: "2018 Party Pack"
},
{
id: 2535,
name: "Golem Builder Party Pack"
},
{
id: 2540,
name: "Extreme Regal Supply Kit"
},
{
id: 2544,
name: "Year of the Dog Gift Basket"
},
{
id: 2545,
name: "Year of the Dog Large Supply Kit"
},
{
id: 2546,
name: "Year of the Dog Supply Kit"
},
{
id: 2558,
name: "2018 Gilded Birthday Scroll Case"
},
{
id: 2565,
name: "10th Birthday Gift Basket"
},
{
id: 2566,
name: "10th Birthday Duffle Bag"
},
{
id: 2567,
name: "Gilded Time Traveler's Scroll Case"
},
{
id: 2594,
name: "Egg Hunter Supply Kit"
},
{
id: 2610,
name: "Wild Gift Basket"
},
{
id: 2611,
name: "Wild Supply Kit"
},
{
id: 2641,
name: "Ronza's Fort Rox Supply Ship"
},
{
id: 2642,
name: "Ronza's Moussu Picchu Supply Ship"
},
{
id: 2643,
name: "Ronza's Queso Canyon Supply Ship"
},
{
id: 2679,
name: "Ethereal Treasure Hunting Kit"
},
{
id: 2681,
name: "Spooky Supply Ghostship"
},
{
id: 2687,
name: "Vampire Hunting Kit"
},
{
id: 2707,
name: "Great Winter Hunt 2018 Gift Basket"
},
{
id: 2708,
name: "Great Winter Hunt 2018 Large Supply Kit"
},
{
id: 2709,
name: "Winter Hunt Supply Kit"
},
{
id: 2710,
name: "Great Winter Hunt Treasure Hunting Kit"
},
{
id: 2749,
name: "Year of the Pig Gift Basket"
},
{
id: 2750,
name: "Year of the Pig Large Supply Kit"
},
{
id: 2751,
name: "Year of the Pig Supply Kit"
},
{
id: 2760,
name: "2019 Birthday Gift Basket"
},
{
id: 2761,
name: "2019 Birthday Supply Kit"
},
{
id: 2780,
name: "Factory Repair Charm"
},
{
id: 2793,
name: "Eggsweeper Starter Pack"
},
{
id: 2804,
name: "Spring Hunt Gift Basket"
},
{
id: 2805,
name: "Eggfinder Supply Kit"
},
{
id: 2824,
name: "Queso Geyser Gift Basket"
},
{
id: 2825,
name: "Queso Geyser Starter Pack"
},
{
id: 2826,
name: "Queso Geyser Supply Kit"
},
{
id: 2847,
name: "Queso Canyon Grand Tour Treasure Hunting Kit"
},
{
id: 2941,
name: "XL Winter Supply Kit"
},
{
id: 2967,
name: "Year of the Rat Gift Basket"
},
{
id: 2968,
name: "Year of the Rat Large Supply Kit"
},
{
id: 2969,
name: "Year of the Rat Supply Kit"
},
{
id: 2985,
name: "SUPER|brie+ Factory Gift Basket"
},
{
id: 2986,
name: "SUPER|brie+ Factory Supply Kit"
},
{
id: 3018,
name: "Ronza's Rift Supply Ship"
},
{
id: 3036,
name: "Floating Large Supply Kit"
},
{
id: 3037,
name: "Floating Supply Kit"
},
{
id: 3123,
name: "Treasure Hunting Gift Set"
},
{
id: 3132,
name: "Glazed Gift Basket"
},
{
id: 3133,
name: "Glazed Snow Golem Supply Box"
},
{
id: 3134,
name: "Glazed Snow Golem Supply Kit"
},
{
id: 3158,
name: "Be Mine Bouquet"
},
{
id: 3161,
name: "Year of the Ox Gift Basket"
},
{
id: 3162,
name: "Year of the Ox Large Supply Kit"
},
{
id: 3163,
name: "Year of the Ox Supply Kit"
},
{
id: 3179,
name: "Speedy Repair Gift Basket"
},
{
id: 3180,
name: "Speedy Repair Supply Kit"
},
{
id: 3209,
name: "Eggscellent Gift Basket"
},
{
id: 3210,
name: "Eggstravagant Supply Kit"
},
{
id: 3248,
name: "Rift Dirigible Kit"
},
{
id: 3249,
name: "2021 Ronza's Floating Islands Supply Ship"
},
{
id: 3283,
name: "Brewer's Apprentice Kit"
},
{
id: 3284,
name: "Brewmaster's Supply Kit"
},
{
id: 3285,
name: "Gloomy Gift Basket"
},
{
id: 3337,
name: "Jingling Glazed Gift Basket"
},
{
id: 3338,
name: "Jingling Glazed Supply Box"
},
{
id: 3339,
name: "Jingling Glazed Supply Kit"
},
{
id: 3373,
name: "100 Pack of Lunar Lantern Candles"
},
{
id: 3374,
name: "100 Pack of Red Lunar Lantern Candles"
},
{
id: 3375,
name: "10 Pack of Lunar Lantern Candles"
},
{
id: 3376,
name: "10 Pack of Red Lunar Lantern Candles"
},
{
id: 3377,
name: "30 Pack of Lunar Lantern Candles"
},
{
id: 3378,
name: "30 Pack of Red Lunar Lantern Candles"
},
{
id: 3379,
name: "Year of the Tiger Gift Basket"
},
{
id: 3380,
name: "Year of the Tiger Large Supply Kit"
},
{
id: 3381,
name: "Year of the Tiger Supply Kit"
},
{
id: 3392,
name: "Large Speedy Repair Supply Kit"
},
{
id: 3415,
name: "Ronza's Floating Islands Supply Ship"
},
{
id: 3482,
name: "Alchemist's Supply Box"
},
{
id: 3483,
name: "Apothecary's Supply Kit"
},
{
id: 3484,
name: "Insidious Gift Basket"
},
{
id: 3508,
name: "Winter Taiga Gift Basket"
},
{
id: 3509,
name: "Winter Taiga Large Supply Kit"
},
{
id: 3510,
name: "Winter Taiga Small Supply Kit"
},
{
id: 3536,
name: "Year of the Rabbit Gift Basket"
},
{
id: 3537,
name: "Year of the Rabbit Large Supply Kit"
},
{
id: 3538,
name: "Year of the Rabbit Supply Kit"
},
{
id: 3582,
name: "Large Bountiful Supply Kit"
},
{
id: 3583,
name: "Bountiful Supply Kit"
},
{
id: 3601,
name: "Ronza's Beanstalk Supply Ship"
},
{
id: 3613,
name: "Bountiful Treasure Hunting Kit"
}
];
}
});
// src/modules/better-marketplace/index.js
var initSearch, modifySearch, waitForSearchReady, autocloseClaim, getLinkMarkup3, overloadShowItem, originalSelect, newSelect, init8, better_marketplace_default;
var init_better_marketplace = __esm({
"src/modules/better-marketplace/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
init_settings5();
init_styles8();
init_items_marketplace_hidden();
initSearch = (searchInputDOM) => {
const blankOpt = document.createElement("option");
blankOpt.value = "";
blankOpt.text = "";
blankOpt.disabled = true;
blankOpt.selected = true;
blankOpt.hidden = true;
searchInputDOM.prepend(blankOpt);
searchInputDOM = $(".marketplaceView-header-search");
searchInputDOM.select2({
formatResult: hg.views.MarketplaceView.formatSelect2Result,
formatSelection: hg.views.MarketplaceView.formatSelect2Result,
dropdownAutoWidth: false,
placeholder: "Search for items...",
minimumInputLength: 0,
dropdownCssClass: "marketplaceView-header-search-dropdown",
width: "resolve"
}).on("change", function() {
if (!searchInputDOM.prop("disabled") && searchInputDOM.val()) {
hg.views.MarketplaceView.showItem(searchInputDOM.val(), "view", false, false, true);
}
});
};
modifySearch = (opts) => {
const searchContainer = document.querySelector(".marketplaceView-header-searchContainer");
if (!searchContainer) {
return;
}
let searchInputDOM = $(".marketplaceView-header-search");
searchInputDOM.select2("destroy");
if (originalSelect === null) {
const originalSelectNode = document.querySelector(".marketplaceView-header-search");
originalSelect = originalSelectNode.cloneNode(true);
originalSelect.classList.remove("marketplaceView-header-search");
}
opts.forEach((opt) => {
if (!opt.value || opt.value === "" || items_marketplace_hidden_default.some((item) => item.id === opt.value || item.name === opt.text)) {
opt.remove();
}
});
initSearch(searchInputDOM);
newSelect = document.querySelector("select.marketplaceView-header-search");
const toggleSearch = makeElement("input", "mhui-marketplace-search-toggle");
toggleSearch.setAttribute("type", "checkbox");
const label = makeElement("label", "mhui-marketplace-search-toggle");
label.setAttribute("for", "mhui-marketplace-search-toggle");
label.append(toggleSearch);
label.append(document.createTextNode("Search all items"));
const defaultToAll = getSetting("better-marketplace-search-all");
toggleSearch.checked = defaultToAll;
if (defaultToAll) {
newSelect.innerHTML = originalSelect.innerHTML;
newSelect.value = originalSelect.value;
}
label.addEventListener("click", () => {
toggleSearch.checked = !toggleSearch.checked;
toggleSearch.dispatchEvent(new Event("change"));
});
toggleSearch.addEventListener("change", () => {
searchInputDOM = $(".marketplaceView-header-search");
searchInputDOM.select2("destroy");
const currentOpts = document.querySelector(".marketplaceView-header-search");
if (toggleSearch.checked) {
currentOpts.innerHTML = originalSelect.innerHTML;
currentOpts.value = originalSelect.value;
} else {
currentOpts.innerHTML = newSelect.innerHTML;
currentOpts.value = newSelect.value;
}
initSearch(searchInputDOM);
});
searchContainer.append(label);
};
waitForSearchReady = (attempts = 0) => {
const opts = document.querySelectorAll(".marketplaceView-header-search option");
let timeoutPending = false;
if (opts.length === 0) {
if (attempts < 10) {
timeoutPending = setTimeout(() => waitForSearchReady(attempts + 1), 300);
}
return;
}
if (timeoutPending) {
clearTimeout(timeoutPending);
}
setTimeout(() => {
modifySearch(opts);
}, 300);
};
autocloseClaim = (resp) => {
var _a, _b;
if (!(resp && resp.success)) {
return;
}
const journalEntry = (_b = (_a = resp == null ? void 0 : resp.journal_markup[0]) == null ? void 0 : _a.render_data) == null ? void 0 : _b.css_class;
if (!journalEntry || journalEntry === "") {
return;
}
if (journalEntry.includes("marketplace_claim_listing") || journalEntry.includes("marketplace_complete_listing")) {
setTimeout(() => hg.views.MarketplaceView.hideDialog(), 250);
}
};
getLinkMarkup3 = (name, id) => {
return makeLink("MHCT", `https://www.mhct.win/loot.php?item=${id}`, true) + makeLink("Wiki", `https://mhwiki.hitgrab.com/wiki/index.php/${name}`);
};
overloadShowItem = () => {
const originalShowItem = hg.views.MarketplaceView.showItem;
hg.views.MarketplaceView.showItem = (itemId, action, defaultQuantity, defaultUnitPriceWithTariff, force) => {
const actionButton = document.querySelector(".marketplaceView-item-actionType .marketplaceView-listingType");
if (actionButton) {
actionButton.addEventListener("click", () => {
const actionType = actionButton.classList.contains("buy") ? "sell" : "buy";
originalShowItem(itemId, actionType, defaultQuantity, defaultUnitPriceWithTariff, force);
});
}
originalShowItem(itemId, action, defaultQuantity, defaultUnitPriceWithTariff, force);
const actions = document.querySelector(".marketplaceView-item-titleActions");
if (!actions) {
return;
}
const existing = document.querySelector(".mh-improved-marketplace-item-title-actions");
if (existing) {
existing.remove();
}
let itemName = document.querySelector(".marketplaceView-item-titleName");
itemName = itemName ? itemName.textContent.trim() : "";
const buttons = makeElement("div", "mh-improved-marketplace-item-title-actions", getLinkMarkup3(itemName, itemId));
actions.insertBefore(buttons, actions.firstChild);
};
};
originalSelect = null;
newSelect = null;
init8 = () => __async(void 0, null, function* () {
addStyles(styles_default7);
onOverlayChange({ marketplace: { show: () => {
waitForSearchReady();
overloadShowItem();
} } });
onRequest(autocloseClaim, "managers/ajax/users/marketplace.php");
});
better_marketplace_default = {
id: "better-marketplace",
name: "Better Marketplace",
type: "better",
default: true,
description: 'Updates the marketplace layout and appearance and adds a variety of small features, like being able to click the "Buying" or "Selling" text to toggle between the two.',
load: init8,
settings: settings_default4
};
}
});
// src/modules/better-mice/mousepage.js
var makeKingsCrownsTab, makeKingsCrownsTabContentContent, makeMouseCrownSection, makeKingsCrownsTabContent, addKingsCrownsToMicePage, parseImperialWeight, getSetRowValue, sortStats, addSortButton, getSelectorPrefix, addSortingToCat, hasAddedSortingTabClickListeners, addSortingTabClickListeners, clickCurrentTab, addSortingToStatsPage, mousepage_default;
var init_mousepage = __esm({
"src/modules/better-mice/mousepage.js"() {
init_sentry_release_injection_stub();
init_utils4();
makeKingsCrownsTab = () => {
const tabContainer = document.querySelector(".mousehuntHud-page-tabHeader-container");
if (!tabContainer) {
return;
}
const existingTab = document.querySelector(".mousehuntHud-page-tabHeader.kings-crowns-tab");
if (existingTab) {
return;
}
const kingsCrownsTab = makeElement("a", ["mousehuntHud-page-tabHeader", "groups", "kings-crowns-tab"]);
makeElement("span", "", "King's Crowns", kingsCrownsTab);
kingsCrownsTab.setAttribute("data-tab", "kings_crowns");
kingsCrownsTab.setAttribute("data-legacy-mode", "");
kingsCrownsTab.setAttribute("onclick", "hg.utils.PageUtil.onclickPageTabHandler(this); return false;");
tabContainer.append(kingsCrownsTab);
return kingsCrownsTab;
};
makeKingsCrownsTabContentContent = () => {
const tabContentContainer = document.querySelector(".mousehuntHud-page-tabContentContainer");
if (!tabContentContainer) {
return;
}
const tabContent = makeElement("div", ["mousehuntHud-page-tabContent", "kings_crowns"]);
tabContent.setAttribute("data-tab", "kings_crowns");
tabContent.setAttribute("data-template-file", "AdversariesPage");
makeElement("div", "mousehuntHud-page-tabContent-loading", "", tabContent);
const subTabContent = makeElement("div", ["mousehuntHud-page-subTabContent", "all", "active"]);
subTabContent.setAttribute("data-tab", "all");
subTabContent.setAttribute("data-template-file", "AdversariesPage");
subTabContent.setAttribute("data-template", "subtab");
subTabContent.setAttribute("data-initialized", "");
subTabContent.setAttribute("data-user-id", "");
makeElement("div", "mouseCrownsView", "", subTabContent);
tabContent.append(subTabContent);
tabContentContainer.append(tabContent);
};
makeMouseCrownSection = (type, mice, header = false, subheader = false) => {
const wrapper = makeElement("div", ["mouseCrownsView-group", type]);
if (header) {
const headerDiv = makeElement("div", "mouseCrownsView-group-header");
makeElement("div", ["mouseCrownsView-crown", type], "", headerDiv);
const name = makeElement("div", "mouseCrownsView-group-header-name");
makeElement("b", false, header, headerDiv);
if (subheader) {
makeElement("div", "mouseCrownsView-group-header-subtitle", subheader, name);
}
headerDiv.append(name);
wrapper.append(headerDiv);
}
const list = makeElement("div", "mouseCrownsView-group-mice");
mice.forEach((mouse) => {
if (!mouse.id) {
return;
}
const mouseWrapper = makeElement("div", "mouseCrownsView-group-mouse");
mouseWrapper.setAttribute("data-mouse-id", mouse.id);
mouseWrapper.setAttribute("data-mouse-type", mouse.type);
mouseWrapper.setAttribute("data-mouse-large", mouse.large);
mouseWrapper.setAttribute("onclick", "hg.views.MouseCrownsView.showMouseImage(this); return false;");
if (mouse.landscape) {
mouseWrapper.classList.add("landscape");
}
const innerWrapper = makeElement("div", "mouseCrownsView-group-mouse-padding");
const image = makeElement("div", ["mouseCrownsView-group-mouse-image", mouse.type]);
image.setAttribute("data-image", mouse.image);
image.setAttribute("data-loader", "mouse");
image.setAttribute("style", `background-image: url("${mouse.image}");`);
innerWrapper.append(image);
makeElement("div", "mouseCrownsView-group-mouse-catches", mouse.num_catches, innerWrapper);
const label = makeElement("div", "mouseCrownsView-group-mouse-label");
const nameWrapper = makeElement("span", false, "");
makeElement("div", "mouseCrownsView-group-mouse-name", mouse.name, nameWrapper);
label.append(nameWrapper);
innerWrapper.append(label);
const favoriteButton = makeElement("div", "mouseCrownsView-group-mouse-favouriteButton");
if (mouse.is_favourite) {
favoriteButton.classList.add("active");
}
favoriteButton.setAttribute("data-mouse-id", mouse.id);
favoriteButton.setAttribute("onclick", "hg.views.MouseCrownsView.toggleFavouriteHandler(event); return false;");
innerWrapper.append(favoriteButton);
mouseWrapper.append(innerWrapper);
list.append(mouseWrapper);
});
wrapper.append(list);
return wrapper;
};
makeKingsCrownsTabContent = () => __async(void 0, null, function* () {
makeKingsCrownsTabContentContent();
let crowns = [];
const cachedCrowns = sessionGet("kings-crowns");
const cachedCrownsTime = sessionGet("kings-crowns-time");
if (cachedCrowns && cachedCrownsTime && Date.now() - cachedCrownsTime < 3e5) {
crowns = JSON.parse(cachedCrowns);
} else {
const crownsReq = yield doRequest("managers/ajax/pages/page.php", {
page_class: "HunterProfile",
"page_arguments[tab]": "kings_crowns",
"page_arguments[sub_tab]": false
});
crowns = crownsReq.page.tabs.kings_crowns.subtabs[0].mouse_crowns;
sessionSet("kings-crowns", crowns);
sessionSet("kings-crownsTime", Date.now());
}
const tabInnerContent = document.querySelector(".mousehuntHud-page-tabContent.kings_crowns");
if (!tabInnerContent) {
return;
}
const favorites = makeMouseCrownSection("favorites", crowns.favourite_mice);
tabInnerContent.append(favorites);
crowns.badge_groups.forEach((group) => {
const section = makeMouseCrownSection(group.type, group.mice, `${group.name} Crowns (${group.count})`, `Earned at ${group.catches} catches`);
tabInnerContent.append(section);
});
});
addKingsCrownsToMicePage = () => __async(void 0, null, function* () {
makeKingsCrownsTab();
makeKingsCrownsTabContent();
});
parseImperialWeight = (weightText) => {
const lbsSplit = weightText.innerText.split("lb.");
const lbs = lbsSplit.length > 1 ? lbsSplit[0] : 0;
const ozSplit = weightText.innerText.split("oz.");
const oz = ozSplit.length > 1 ? ozSplit[0] : 0;
return Number.parseInt(lbs) * 16 + Number.parseInt(oz);
};
getSetRowValue = (row, type) => {
let value = 0;
value = row.getAttribute(`data-sort-value-${type}`);
if (value) {
return Number.parseInt(value);
}
const valueText = row.querySelector(`${getSelectorPrefix()} .mouseListView-categoryContent-subgroup-mouse-stats.${type}`);
if (type === "average_weight" || type === "heaviest_catch") {
if (valueText.innerText.includes("lb") || valueText.innerText.includes("oz")) {
value = parseImperialWeight(valueText);
} else if (valueText.innerText.includes("kg")) {
value = valueText.innerText.replace("kg.", "");
} else {
value = 0;
}
} else {
value = valueText.innerText ? valueText.innerText.replaceAll(",", "") || 0 : 0;
}
row.setAttribute(`data-sort-value-${type}`, value);
return Number.parseInt(value);
};
sortStats = (type, reverse = false) => {
reverse = !reverse;
let rows = document.querySelectorAll(`${getSelectorPrefix()} .active .mouseListView-categoryContent-subgroup-mouse:not(:first-child)`);
if (!rows.length) {
return;
}
const headerRow = document.querySelector(`${getSelectorPrefix()} .active .mouseListView-categoryContent-subgroup-mouse:first-child`);
if (!headerRow) {
return;
}
rows.forEach((row) => {
getSetRowValue(row, type);
});
rows = [...rows].sort((a, b) => {
const aVal = getSetRowValue(a, type);
const bVal = getSetRowValue(b, type);
if (aVal === bVal || type === "name") {
const aNameEl = a.querySelector(".mouseListView-categoryContent-subgroup-mouse-stats.name");
if (!aNameEl) {
return 0;
}
const bNameEl = b.querySelector(".mouseListView-categoryContent-subgroup-mouse-stats.name");
if (!bNameEl) {
return 0;
}
const aName = aNameEl.innerText;
const bName = bNameEl.innerText;
if (aName === bName) {
return 0;
}
return aName > bName ? 1 : -1;
}
return aVal > bVal ? 1 : -1;
});
if (reverse) {
rows = rows.reverse();
}
rows.forEach((row) => {
row.parentNode.append(row);
});
};
addSortButton = (elements, type) => {
elements.forEach((el) => {
const sortButton = makeElement("div", ["sort-button", "unsorted"], "");
el.addEventListener("click", () => {
const otherSortButtons = el.parentNode.querySelectorAll(".sort-button");
otherSortButtons.forEach((button) => {
if (button !== sortButton) {
button.classList.remove("reverse");
button.classList.add("unsorted");
}
});
if (sortButton.classList.contains("unsorted")) {
sortButton.classList.remove("unsorted");
sortStats(type);
return;
}
if (sortButton.classList.contains("reverse")) {
sortButton.classList.remove("reverse");
sortStats(type);
return;
}
sortButton.classList.add("reverse");
sortStats(type, true);
});
el.append(sortButton);
});
};
getSelectorPrefix = () => {
const currentTab = getCurrentTab();
let currentSubtab = getCurrentSubtab();
if (currentTab === currentSubtab) {
currentSubtab = false;
}
return `.${currentTab} .mousehuntHud-page-subTabContent.active${currentSubtab ? `.${currentSubtab}` : ""}`;
};
addSortingToCat = (cat, retries = 0) => {
const cats = [
"name",
"catches",
"misses",
"average_weight",
"heaviest_catch"
];
const selector = `${getSelectorPrefix()} .mouseListView-categoryContent-category[data-category="${cat}"]`;
const category = document.querySelector(selector);
if (!category || category && category.classList.contains("loading")) {
if (retries > 10) {
return;
}
setTimeout(() => addSortingToCat(cat, retries + 1), 300);
return;
}
if (category.getAttribute("data-added-sorting")) {
return;
}
cats.forEach((mcat) => {
const els = category.querySelectorAll(`${getSelectorPrefix()} .mouseListView-categoryContent-category.all.active .mouseListView-categoryContent-subgroup-mouse.header .mouseListView-categoryContent-subgroup-mouse-stats.${mcat}`);
if (els.length) {
addSortButton(els, mcat);
}
});
category.setAttribute("data-added-sorting", true);
const rows = category.querySelectorAll(`${getSelectorPrefix()} .mouseListView-categoryContent-subgroup-mouse:not(:first-child)`);
if (!rows.length) {
return;
}
rows.forEach((row) => {
const catches = row.querySelector(`${getSelectorPrefix()} .mouseListView-categoryContent-subgroup-mouse-stats.catches`);
if (!catches) {
return;
}
const value = catches.innerText ? catches.innerText.replaceAll(",", "") || 0 : 0;
if (value >= 2500) {
row.classList.add("crown", "diamond");
} else if (value >= 1e3) {
row.classList.add("crown", "platinum");
} else if (value >= 500) {
row.classList.add("crown", "gold");
} else if (value >= 100) {
row.classList.add("crown", "silver");
} else if (value >= 10) {
row.classList.add("crown", "bronze");
}
});
};
hasAddedSortingTabClickListeners = false;
addSortingTabClickListeners = () => {
if (hasAddedSortingTabClickListeners) {
return;
}
hasAddedSortingTabClickListeners = true;
const _categoryClickHandler = hg.views.MouseListView.categoryClickHandler;
hg.views.MouseListView.categoryClickHandler = (el) => {
_categoryClickHandler(el);
addSortingToCat(el.getAttribute("data-category"));
};
};
clickCurrentTab = () => {
const activeTab = document.querySelector(".mousehuntHud-page-tabContent.active .mousehuntHud-page-subTabContent.active .mouseListView-categoryContainer.active a");
if (!activeTab) {
setTimeout(clickCurrentTab, 250);
return;
}
addSortingToCat(activeTab.getAttribute("data-category"));
hg.views.MouseListView.categoryClickHandler(activeTab);
};
addSortingToStatsPage = () => {
addSortingTabClickListeners();
clickCurrentTab();
};
mousepage_default = () => __async(void 0, null, function* () {
if ("adversaries" === getCurrentPage() && getCurrentTab() === "kings_crowns") {
addKingsCrownsToMicePage();
const tab = document.querySelector(".mousehuntHud-page-tabHeader.kings-crowns-tab");
hg.utils.PageUtil.onclickPageTabHandler(tab);
}
onNavigation(addKingsCrownsToMicePage, {
page: "adversaries"
});
onNavigation(addSortingToStatsPage, {
page: "adversaries",
tab: "your_stats",
subtab: "group"
});
onNavigation(addSortingToStatsPage, {
page: "adversaries",
tab: "your_stats",
subtab: "location"
});
eventRegistry.addEventListener("set_tab", () => {
if ("your_stats" === getCurrentTab()) {
addSortingToStatsPage();
}
});
onNavigation(addSortingToStatsPage, {
page: "hunterprofile",
tab: "mice"
});
});
}
});
// src/modules/better-mice/styles.css
var styles_default8;
var init_styles9 = __esm({
"src/modules/better-mice/styles.css"() {
styles_default8 = '.mouseView-titleContainer{height:26px}.mouseView-values{float:none;font-size:11px;line-height:unset}.mouseView-title{font-size:1.2em;line-height:24px}.mh-ui-mouse-links{display:inline-block;float:right;margin-right:15px}.mh-ui-mouse-links-map{display:flex;justify-content:center;padding-bottom:5px}.mh-ui-mouse-links a{margin-right:10px}.mh-ui-mouse-links-map a{margin:10px 10px 10px 0}.mouseview-title-group{padding-bottom:8px;font-size:11px}.mh-ui-mouse-links-map .mousehuntActionButton.tiny{margin:3px}.mouseView-movedContainer{display:flex;flex-direction:row;margin-top:10px}.mouseview-has-mhct .mouseView-weaknessContainer{display:flex;flex-direction:column;align-items:center;width:160px}.mouseview-has-mhct .mouseView-categoryContent-subgroup-mouse-weaknesses{width:100%}.mouseview-has-mhct .mouseView-socialContainer{display:none}.mouseview-has-mhct .mouseView-statsContainer{display:flex;align-items:stretch;width:100%}.mouseview-has-mhct .mouseView-statsContainer-block-padding{padding:10px}.mouseview-has-mhct .mouseView-statsContainer-block-padding b{display:inline-block;padding-bottom:8px}.mouseview-has-mhct .mouseView-descriptionContainer{width:100%}.mouseView-categoryContent-subgroup-mouse-weaknesses-label{font-size:12px;font-weight:400;font-variant:none}.mouseview-has-mhct .mouseView-difficulty{display:none}.mouseview-has-mhct .mouse-ar-wrapper{display:grid;grid-template-columns:150px auto 50px;place-items:center stretch;padding:5px;margin:5px 0;font-size:12px}.mouseview-has-mhct .has-stages .mouse-ar-wrapper{grid-template-columns:120px 140px auto 50px}.mouseview-has-mhct .mouse-ar-wrapper div{padding:0 2px}.mouseview-has-mhct .mice-ar-wrapper{margin-right:10px}.mouse-ar-wrapper .stage{font-size:10px}.mouse-ar-wrapper .cheese{font-size:11px}.mouseview-has-mhct .ar-header{display:flex;align-items:center;justify-content:space-between;height:26px;padding-bottom:2px;margin-top:10px;font-size:12px;font-weight:900;border-bottom:1px solid #ccc}.mouseview-has-mhct .ar-link{font-weight:400}.mouseview-has-mhct .rate{text-align:right}.mouseview-has-mhct .mouse-ar-wrapper:nth-child(odd){background-color:#e7e7e7}.mouseview-has-mhct .mouseView-description{font-weight:500;line-height:19px}.mh-ui-mouse-links-map-name{color:#3b5998;cursor:pointer}.treasureMapView-highlight-name{padding:5px 0 10px;font-weight:400;text-align:center}.mh-ui-mouse-links-map-name:hover{text-decoration:underline}.mh-ui-mouse-links-map .treasureMapView-highlight-group{text-align:center}.mouseView-image{box-shadow:none}.mouseView-image:hover{box-shadow:1px 1px 2px #e70}.mouseView a.custom-favorite-button,.mouseView a.custom-favorite-button-small{position:absolute;top:15px;left:15px;width:30px;height:30px;background-size:contain}#custom-submenu-item-king-s-crowns .icon{filter:sepia(1) brightness(.5)}.mouseView-statsContainer-block-padding abbr{text-decoration:none}.mouseView-statsContainer-block-padding{padding:5px}a.mouseListView-categoryContent-subgroup-mouse-thumb{position:relative}.crown .mouseListView-categoryContent-subgroup-mouse-thumb:after{position:absolute;top:-4px;left:-8px;z-index:2;width:20px;height:20px;content:"";background-color:#fdfdfa;background-size:contain;border:1px solid #929292;border-radius:50%}.crown.bronze .mouseListView-categoryContent-subgroup-mouse-thumb:after{background-image:url(https://www.mousehuntgame.com/images/ui/crowns/crown_bronze.png)}.crown.silver .mouseListView-categoryContent-subgroup-mouse-thumb:after{background-image:url(https://www.mousehuntgame.com/images/ui/crowns/crown_silver.png)}.crown.gold .mouseListView-categoryContent-subgroup-mouse-thumb:after{background-image:url(https://www.mousehuntgame.com/images/ui/crowns/crown_gold.png)}.crown.diamond .mouseListView-categoryContent-subgroup-mouse-thumb:after{background-image:url(https://www.mousehuntgame.com/images/ui/crowns/crown_diamond.png)}.crown.platinum .mouseListView-categoryContent-subgroup-mouse-thumb:after{background-image:url(https://www.mousehuntgame.com/images/ui/crowns/crown_platinum.png)}.mouseListView-categoryContent-subgroup-mouse-thumb,.mouseListView-categoryContent-subgroup-mouse .mouseListView-categoryContent-subgroup-mouse-margin{transition:.2s}.mouseListView-categoryContent-subgroup-mouse-thumb:hover{transform:scale(1.2)}a.mouseListView-categoryContent-subgroup-mouse:hover .mouseListView-categoryContent-subgroup-mouse-margin{background-size:contain}.mouseViewPopup .mouseView-image:hover{box-shadow:none;transform:scale(.95)}.mouseViewPopup .mouseView-image{transition:.2s}.mouseViewPopup .mouseView-descriptionContainer{display:grid;grid-template-columns:3fr 2fr;justify-items:stretch}.mouseViewPopup .mouseView-values{margin-left:0}.mouseViewPopup .mouseView-description{grid-column:span 2;padding-top:5px}.mouseViewPopup .mouseView-group.mouseview-title-group{text-align:right}img.minluck-power-type-img{width:20px}li.minluck-item{display:inline-flex;gap:3px;align-items:center;width:auto;padding:2px;margin:2px;font-size:12px;background-color:#f2f2f2;border:1px solid #ccc;border-radius:8px}ul.minluck-list{display:flex;flex-wrap:wrap;place-content:center flex-start;width:auto;margin-right:-5px}.minluck-title{display:flex;align-items:center;justify-content:space-between;padding-bottom:2px;margin-top:10px;margin-bottom:5px;font-size:12px;font-weight:900;border-bottom:1px solid #ccc}.mouseCrownsView-group-mouse:hover .mouseCrownsView-group-mouse-padding{background-color:#fff}.mouseCrownsView-group-mouse-favouriteButton{top:0;right:0}.mouseCrownsView-group-mouse-image{background-size:cover;transition:.4s}\n';
}
});
// src/modules/better-mice/index.js
var getLinkMarkup4, addLinks2, isFavorite, addFavoriteButton, addMinluck, addWisdom, updateMouseView, _original, replaceShowMouseImage, main7, wisdoms, minlucks, init9, better_mice_default;
var init_better_mice = __esm({
"src/modules/better-mice/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
init_utils4();
init_mousepage();
init_styles9();
getLinkMarkup4 = (name) => {
return makeLink("MHCT AR", `https://www.mhct.win/attractions.php?mouse_name=${name}`) + makeLink("Wiki", `https://mhwiki.hitgrab.com/wiki/index.php/${name}`);
};
addLinks2 = () => {
const title = document.querySelector(".mouseView-title");
if (!title) {
return;
}
const currentLinks = document.querySelector(".mh-ui-mouse-links");
if (currentLinks) {
currentLinks.remove();
}
const div = document.createElement("div");
div.classList.add("mh-ui-mouse-links");
div.innerHTML = getLinkMarkup4(title.innerText);
title.parentNode.insertBefore(div, title);
const values = document.querySelector(".mouseView-values");
const desc = document.querySelector(".mouseView-descriptionContainer");
if (values && desc) {
desc.insertBefore(values, desc.firstChild);
}
};
isFavorite = (mouseId) => __async(void 0, null, function* () {
var _a, _b, _c, _d, _e;
const favorites = yield doRequest("managers/ajax/pages/page.php", {
page_class: "HunterProfile",
"page_arguments[tab]": "kings_crowns",
"page_arguments[sub_tab]": false,
"page_arguments[snuid]": window.user.sn_user_id
});
if (!((_e = (_d = (_c = (_b = (_a = favorites.page) == null ? void 0 : _a.tabs) == null ? void 0 : _b.kings_crowns) == null ? void 0 : _c.subtabs[0]) == null ? void 0 : _d.mouse_crowns) == null ? void 0 : _e.favourite_mice.length)) {
return false;
}
return favorites.page.tabs.kings_crowns.subtabs[0].mouse_crowns.favourite_mice.some((mouse) => {
return mouse.id && mouse.id === Number.parseInt(mouseId, 10);
});
});
addFavoriteButton = (mouseId, mouseView) => __async(void 0, null, function* () {
const state = yield isFavorite(mouseId);
const fave = yield makeFavoriteButton({
target: mouseView,
size: "large",
isSetting: false,
state,
onChange: () => {
doRequest("managers/ajax/mice/mouse_crowns.php", {
action: "toggle_favourite",
user_id: window.user.user_id,
mouse_id: mouseId
});
}
});
mouseView.append(fave);
});
addMinluck = (mouseId, mouseView) => __async(void 0, null, function* () {
const appendTo = mouseView.querySelector(".mouseView-contentContainer");
if (!appendTo) {
return;
}
const minluckContainer = makeElement("div", "minluck-container");
const titleText = makeElement("div", "minluck-title", "Minlucks");
makeTooltip({
appendTo: titleText,
text: "If your current luck is above the minluck, you are guaranteed to catch the mouse if you attract it."
});
minluckContainer.append(titleText);
const minluckList = makeElement("ul", "minluck-list");
const minluck = minlucks.find((m) => m.id === Number.parseInt(mouseId, 10));
const mouseMinlucks = (minluck == null ? void 0 : minluck.minlucks) || {};
Object.keys(mouseMinlucks).forEach((powerType) => {
if (!mouseMinlucks[powerType] || "\u221E" === mouseMinlucks[powerType]) {
return;
}
const minluckItem = makeElement("li", "minluck-item");
const powerTypeImg = makeElement("img", "minluck-power-type-img");
powerTypeImg.src = `https://www.mousehuntgame.com/images/powertypes/${powerType.toLowerCase()}.png`;
minluckItem.append(powerTypeImg);
makeElement("div", "minluck-power-type-minluck", mouseMinlucks[powerType], minluckItem);
minluckList.append(minluckItem);
});
minluckContainer.append(minluckList);
appendTo.append(minluckContainer);
});
addWisdom = (mouseId, mouseView) => __async(void 0, null, function* () {
const values = mouseView.querySelector(".mouseView-values");
if (!values) {
return;
}
let wisdom = wisdoms.find((m) => m.id === Number.parseInt(mouseId, 10));
wisdom = (wisdom == null ? void 0 : wisdom.wisdom) || 0;
wisdom = wisdom.toString().replaceAll(/\B(?=(\d{3})+(?!\d))/g, ",");
makeElement("span", "wisdom-container", ` / ${wisdom} Wisdom`, values);
});
updateMouseView = () => __async(void 0, null, function* () {
const mouseView = document.querySelector("#overlayPopup .mouseView");
if (!mouseView) {
return;
}
const mouseId = mouseView.getAttribute("data-mouse-id");
if (!mouseId) {
return;
}
const name = mouseView.querySelector(".mouseView-title");
if (!name) {
return;
}
const catchesEl = document.querySelectorAll(".mouseView-statsContainer-block-padding td abbr");
if (catchesEl && catchesEl.length > 0) {
catchesEl.forEach((el) => {
const catchesNumber = el.getAttribute("title").replace(" Catches", "").replace(" catches", "").replace(" Misses", "").replace(" misses", "").trim();
if (catchesNumber) {
el.innerText = catchesNumber;
}
});
}
addLinks2();
addFavoriteButton(mouseId, mouseView);
yield addMinluck(mouseId, mouseView);
yield addWisdom(mouseId, mouseView);
mouseView.classList.add("mouseview-has-mhct");
const group = document.querySelector(".mouseView-group");
if (group) {
group.classList.add("mouseview-title-group");
const descContainer = document.querySelector(".mouseView-descriptionContainer");
if (descContainer) {
if (descContainer.childNodes.length > 1) {
descContainer.insertBefore(group, descContainer.childNodes[1]);
} else {
descContainer.append(group);
}
}
}
const grouptitle = mouseView.querySelector(".mouseView-group.mouseview-title-group");
if (grouptitle) {
grouptitle.innerHTML = grouptitle.innerHTML.replace("Group: ", "");
}
const container = mouseView.querySelector(".mouseView-contentContainer");
if (!container) {
return;
}
const imageContainer = mouseView.querySelector(".mouseView-imageContainer");
if (imageContainer) {
const movedContainer = makeElement("div", "mouseView-movedContainer");
const statsContainer = mouseView.querySelector(".mouseView-statsContainer");
if (statsContainer) {
movedContainer.append(statsContainer);
}
const weaknessContainer = mouseView.querySelector(".mouseView-weaknessContainer");
if (weaknessContainer) {
movedContainer.append(weaknessContainer);
const weaknesses = weaknessContainer.querySelectorAll(".mouseView-categoryContent-subgroup-mouse-weaknesses-padding");
weaknesses.forEach((w) => {
const weakness = w.querySelector(".mouseView-weakness");
if (!weakness) {
w.classList.add("mouseview-weakness-empty");
w.classList.add("hidden");
}
});
}
imageContainer.append(movedContainer);
}
const arWrapper = makeElement("div", "ar-wrapper");
const title = makeElement("div", "ar-header");
const titleText = makeElement("div", "ar-title", "Attraction Rates", title);
makeTooltip({
appendTo: titleText,
text: 'The best location and bait, according to data gathered by <a href="https://mhct.win/" target="_blank">MHCT</a>.'
});
const link = makeElement("a", "ar-link", "View on MHCT \u2192");
link.href = `https://www.mhct.win/attractions.php?mouse_name=${name.innerText}`;
link.target = "_mhct";
title.append(link);
arWrapper.append(title);
const mhctjson = yield getArForMouse(mouseId, "mouse");
if (!mhctjson || mhctjson === void 0 || mhctjson.length === 0 || "error" in mhctjson) {
return;
}
const miceArWrapper = makeElement("div", "mice-ar-wrapper");
const hasStages = mhctjson.some((mouseAr) => mouseAr.stage);
if (hasStages) {
miceArWrapper.classList.add("has-stages");
}
if (!mhctjson.slice) {
return;
}
mhctjson.slice(0, 15).forEach((mouseAr) => {
const mouseArWrapper = makeElement("div", "mouse-ar-wrapper");
makeElement("div", "location", mouseAr.location, mouseArWrapper);
if (hasStages) {
makeElement("div", "stage", mouseAr.stage, mouseArWrapper);
}
makeElement("div", "cheese", mouseAr.cheese, mouseArWrapper);
makeElement("div", "rate", `${(mouseAr.rate / 100).toFixed(2)}%`, mouseArWrapper);
miceArWrapper.append(mouseArWrapper);
});
if (mhctjson.length > 0) {
arWrapper.append(miceArWrapper);
container.append(arWrapper);
}
});
replaceShowMouseImage = () => {
if (_original) {
return;
}
_original = hg.views.MouseCrownsView.showMouseImage;
hg.views.MouseCrownsView.showMouseImage = (element) => {
const type = element.getAttribute("data-mouse-type");
if (type) {
hg.views.MouseView.show(type);
return;
}
_original(element);
};
};
main7 = () => __async(void 0, null, function* () {
onOverlayChange({ mouse: { show: updateMouseView } });
minlucks = yield getData("minlucks");
wisdoms = yield getData("wisdom");
addSubmenuItem({
menu: "mice",
label: "Groups",
icon: "https://www.mousehuntgame.com/images/ui/hud/menu/mice.png?asset_cache_version=2",
href: "https://www.mousehuntgame.com/adversaries.php?tab=groups"
});
addSubmenuItem({
menu: "mice",
label: "Regions",
icon: "https://www.mousehuntgame.com/images/ui/hud/menu/travel.png?asset_cache_version=2",
href: "https://www.mousehuntgame.com/adversaries.php?tab=regions"
});
addSubmenuItem({
menu: "mice",
label: "Your Stats",
icon: "https://www.mousehuntgame.com/images/ui/hud/menu/special.png?asset_cache_version=2",
href: "https://www.mousehuntgame.com/adversaries.php?tab=your_stats"
});
addSubmenuItem({
menu: "mice",
label: "King's Crowns",
icon: "https://www.mousehuntgame.com/images/ui/crowns/crown_silver.png?asset_cache_version=2",
href: "https://www.mousehuntgame.com/adversaries.php?tab=kings_crowns"
});
});
init9 = () => __async(void 0, null, function* () {
addStyles(styles_default8);
main7();
mousepage_default();
replaceShowMouseImage();
});
better_mice_default = {
id: "better-mice",
name: "Better Mice",
type: "better",
default: true,
description: "Adds attraction rate stats and links to MHWiki and MHCT to mouse dialogs. Adds sorting to the mouse stats pages, and adds the King's Crown tab to the mouse pages.",
load: init9
};
}
});
// src/modules/better-quests/settings/index.js
function settings_default5(module) {
addMhuiSetting(
"better-quests-m400-helper",
"M400 Helper",
true,
'Adds a "Travel to next step" button to the M400 quest.',
module
);
}
var init_settings6 = __esm({
"src/modules/better-quests/settings/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
}
});
// src/data/m400-locations.json
var m400_locations_default;
var init_m400_locations = __esm({
"src/data/m400-locations.json"() {
m400_locations_default = {
balacks_cove: [
"Balack's Cove",
"Derr Lich",
"Elub Lich",
"Nerg Lich"
],
bazaar: [
"Bazaar",
"Master Burglar",
"Burglar",
"Granite"
],
calm_clearing: [
"Calm Clearing"
],
cape_clawed: [
"Cape Clawed"
],
catacombs: [
"Catacombs",
"Lycan",
"Terror Knight",
"Keeper"
],
claw_shot_city: [
"Claw Shot City",
"Prospector",
"Ruffian",
"Saloon Gal",
"Lasso Cowgirl",
"Shopkeeper",
"Tumbleweed",
"Pyrite"
],
derr_dunes: [
"Derr Dunes",
"Grunt",
"Guardian",
"Renegade",
"Seer",
"Trailblazer"
],
desert_city: [
"Muridae Market",
"Blacksmith",
"Mage Weaver",
"Market Guard",
"Spice Merchant",
"Market Thief",
"Pie Thief",
"Lumberjack",
"Glass Blower",
"Limestone Miner"
],
desert_oasis: [
"Living Garden",
"Twisted Garden",
"Barkshell",
"Camofusion",
"Thorn",
"Twisted Hotcakes",
"Bark",
"Camoflower",
"Strawberry Hotcakes",
"Thistle",
"Calalilly",
"Shroom"
],
desert_warpath: [
"Fiery Warpath"
],
dojo: [
"Dojo"
],
dracano: [
"Dracano",
"Draconic Warden",
"Whelpling",
"Dragon"
],
elub_shore: [
"Elub Shore",
"Mystic",
"Pack",
"Protector",
"Scout",
"Vanquisher"
],
forbidden_grove: [
"Acolyte Realm",
"Gate Guardian",
"Sorceror",
"Gorgon",
"Forbidden Grove",
"Realm Ripper",
"Realm Rippers"
],
fort_rox: [
"Fort Rox"
],
great_gnarled_tree: [
"Great Gnarled Tree"
],
harbour: [
"Harbour"
],
iceberg: [
"Iceberg"
],
jungle_of_dread: [
"Jungle of Dread",
"Magma Carrier",
"Primal",
"Stonework Warrior",
"Pygmy Wrangler",
"Swarm of Pygmy"
],
kings_arms: [
"King's Arms"
],
kings_gauntlet: [
"King's Gauntlet",
"Cavalier",
"Terra",
"Knight",
"Page",
"Phalanx",
"Stealth"
],
laboratory: [
"Laboratory",
"Monster"
],
lagoon: [
"Lagoon"
],
lost_city: [
"Cursed City",
"Lost City",
"Cursed Librarian",
"Cursed Enchanter",
"Essence Guardian",
"Essence Collector",
"Ethereal Enchanter",
"Ethereal Librarian",
"Ethereal Librarians",
"Ethereal Enchanters"
],
meadow: [
"Meadow",
"Bionic"
],
meditation_room: [
"Meditation Room",
"Master of the Cheese Belt",
"Master of the Cheese Claw",
"Master of the Cheese Fang",
"Masters of the Cheese Belt",
"Masters of the Cheese Claw",
"Masters of the Cheese Fang"
],
mountain: [
"Mountain"
],
mousoleum: [
"Mousoleum",
"Zombie",
"Ravenous Zombie"
],
nerg_plains: [
"Nerg Plains",
"Conjurer",
"Conqueror",
"Defender",
"Finder",
"Pathfinder"
],
pinnacle_chamber: [
"Pinnacle Chamber",
"Master of the Dojo",
"Masters of the Dojo",
"Dojo Sensei"
],
pollution_outbreak: [
"Toxic Spill"
],
sand_dunes: [
"Sand Dunes",
"Sand Crypts",
"Sand Colossus",
"Scarab",
"Serpentine",
"Grubling Herder",
"Sand Pilgrim",
"Sand Pilgrims",
"Quesodillo",
"Spiky Devil",
"Dunehopper"
],
seasonal_garden: [
"Seasonal Garden",
"Mystic Knight",
"Technic Knight",
"Mystic Bishop",
"Technic Bishop"
],
slushy_shoreline: [
"Slushy Shoreline",
"Chipper",
"Snow Slinger",
"Snow Sniper",
"Snow Soldier",
"Yeti",
"Polar Bear"
],
ss_huntington_ii: [
"SS Huntington IV",
"S.S. Huntington IV",
"Buccaneer",
"Captain"
],
sunken_city: [
"Sunken City"
],
tournament_hall: [
"Tournament Hall"
],
town_of_digby: [
"Town of Digby",
"Lambent Crystal"
],
town_of_gnawnia: [
"Town of Gnawnia"
],
train_station: [
"Gnawnian Express Station"
],
training_grounds: [
"Training Grounds",
"Ninja",
"Kung Fu",
"Samurai",
"Archer"
],
zugzwang_tower: [
"Zugzwang's Tower"
],
zuzwang_library: [
"Crystal Library",
"Effervescent",
"Walker",
"Tome Sprite",
"Pocketwatch"
]
};
}
});
// src/modules/better-quests/m400.js
var renderButton, main8, m400_default;
var init_m400 = __esm({
"src/modules/better-quests/m400.js"() {
init_sentry_release_injection_stub();
init_utils4();
init_m400_locations();
renderButton = (location) => {
const title = document.querySelector(".campPage-quests-title");
if (!title) {
return;
}
const existingButton = document.querySelector("#mh-improved-m400-travel");
if (existingButton) {
existingButton.remove();
}
const button = makeElement("div", ["mousehuntActionButton", "tiny", "mh-m400-travel", `mh-m400-travel-${location}`]);
button.id = "mh-improved-m400-travel";
if (location === getCurrentLocation()) {
button.classList.add("disabled");
}
makeElement("span", "mousehuntActionButton-text", "Travel to next step", button);
button.setAttribute("data-location", location);
button.addEventListener("click", (e) => {
let clickedLocation = e.target.getAttribute("data-location");
if (!clickedLocation) {
const parent = e.target.parentElement;
if (!parent) {
return;
}
clickedLocation = parent.getAttribute("data-location");
}
app.pages.TravelPage.travel(clickedLocation);
hg.utils.PageUtil.setPage("Camp", null, () => {
});
});
title.append(button);
};
main8 = () => {
var _a, _b, _c;
const questTitle = document.querySelector(".campPage-quests-title");
if (!questTitle) {
return;
}
const isM400 = ((_b = (_a = user.quests) == null ? void 0 : _a.QuestLibraryM400Research) == null ? void 0 : _b.is_assignment) || ((_c = user.quests.QuestLibraryM400Research) == null ? void 0 : _c.is_bait_assignment);
if (!isM400) {
return;
}
const container = document.querySelector(".campPage-quests-container");
if (!container) {
return;
}
container.classList.add("mh-m400-quest");
const allTasks = document.querySelectorAll(".campPage-quests-objective-container");
if (!allTasks) {
return;
}
const taskNames = document.querySelectorAll(".campPage-quests-objective-task");
if (taskNames) {
taskNames.forEach((task) => {
const newText = task.innerText.replaceAll("Collect 1 Piece of M400 Intel", "Collect Intel");
task.innerText = newText;
});
}
const last = [...allTasks].reverse().find((task) => {
return !task.classList.contains("locked") && !task.classList.contains("complete");
});
if (!last) {
return;
}
const objective = last.querySelector(".campPage-quests-objective-task");
if (!objective) {
return;
}
let location = objective.innerText.split(" in ");
if (location.length === 1) {
location = objective.innerText.split(" from ");
}
if (location.length === 1) {
return;
}
location = location[1].replace("Mice", "").replace("the ", "").trim();
const locationKey = Object.keys(m400_locations_default).find((key) => {
return m400_locations_default[key].includes(location);
});
if (!locationKey) {
return;
}
renderButton(locationKey);
};
m400_default = () => __async(void 0, null, function* () {
main8();
onNavigation(main8, {
page: "camp"
});
});
}
});
// src/modules/better-quests/styles.css
var styles_default9;
var init_styles10 = __esm({
"src/modules/better-quests/styles.css"() {
styles_default9 = "#mh-improved-m400-travel{left:15px;cursor:pointer}.m400-helper-hidden,.campPage-quests-objective-container.locked .campPage-quests-objective-content,.campPage-quests-footer-smash-icon,.campPage-quests-footer-smash-warning{display:none}.campPage-quests-objective-container .campPage-quests-objective-thumb{width:35px;height:25px}.campPage-quests-objective-content{width:calc(100% - 35px)}.campPage-quests-objective-container.locked .campPage-quests-objective-thumb{width:100%;margin:0 auto;opacity:.4}.campPage-quests-footer-smash{display:flex;flex-direction:row;place-content:center center;align-items:center;padding:4px;font-size:9.75px;text-decoration:underline;border-radius:3px;box-shadow:none}#mh-research-smash-warning{position:absolute;bottom:28px;left:30px;display:block;max-width:250px;line-height:16px;text-align:left}#overlayPopup.zugzwangsLibraryQuestShopPopup .errorText{padding:10px 0;color:#da1717}#overlayPopup.zugzwangsLibraryQuestShopPopup .questLink .image{width:57px}#overlayPopup.zugzwangsLibraryQuestShopPopup .questLink .image img{width:40px;height:40px;margin:0}#overlayPopup.zugzwangsLibraryQuestShopPopup .questLink .actions{margin-left:-19px}#overlayPopup.zugzwangsLibraryQuestShopPopup .questLink .content b{display:block;padding:5px 0;font-size:12px;color:#000}#overlayPopup.zugzwangsLibraryQuestShopPopup .questLink .content{color:#909090}#overlayPopup.zugzwangsLibraryQuestShopPopup .questLink .requirements b{display:inline-block;padding:7px}#overlayPopup.zugzwangsLibraryQuestShopPopup .questLink .item img,#overlayPopup.zugzwangsLibraryQuestShopPopup .questLink br{display:none}#overlayPopup.zugzwangsLibraryQuestShopPopup .questContainer{height:auto;overflow-y:visible}#overlayPopup.zugzwangsLibraryQuestShopPopup a.questLink{display:flex;align-items:center}#overlayPopup.zugzwangsLibraryQuestShopPopup a.questLink:hover,#overlayPopup.zugzwangsLibraryQuestShopPopup a.questLink:focus,#overlayPopup.zugzwangsLibraryQuestShopPopup a.questLink:active{cursor:default}.mh-m400-travel{margin-top:-2px;margin-left:10px}.mh-m400-quest .campPage-quests-objective-progress,.mh-m400-quest .campPage-quests-objective-progressBar{display:none}\n";
}
});
// src/modules/better-quests/index.js
var updateObjectiveFooterDisplay, addQuestsTab, addQuestTabEventListener, addResearchSmashWarning, moveErrorText, removeSmashText, assignments, getAssignmentMeta, updateAssignmentList, modifyAvailableQuestsPopup, checkForQuestSmash, m400IfEnabled, main9, init10, better_quests_default;
var init_better_quests = __esm({
"src/modules/better-quests/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
init_settings6();
init_m400();
init_styles10();
updateObjectiveFooterDisplay = () => {
const footerText = document.querySelector(".campPage-quests-footer-smash");
if (!footerText) {
return;
}
const newHref = footerText.getAttribute("href").replace("subtab", "sub_tab");
footerText.setAttribute("href", `${newHref}#smashQuest`);
footerText.innerHTML = footerText.innerHTML.replace("Don't like an assignment? Cancel it by smashing the assignment ", "Cancel this assignment by smashing it ");
};
addQuestsTab = () => {
const tabs = document.querySelector(".campPage-tabs-tabRow");
if (!tabs) {
return;
}
const existing = tabs.querySelector('a[data-tab="quests"]');
if (existing) {
return;
}
const newQuestsButton = document.createElement("a");
newQuestsButton.classList.add("campPage-tabs-tabHeader");
newQuestsButton.classList.add("quests");
newQuestsButton.setAttribute("data-tab", "quests");
newQuestsButton.addEventListener("click", () => {
hg.views.HeadsUpDisplayZugswangLibraryView.showPopup();
});
const newQuestsButtonText = document.createElement("span");
newQuestsButtonText.innerText = "Quests";
newQuestsButton.append(newQuestsButtonText);
tabs.insertBefore(newQuestsButton, tabs.lastChild);
};
addQuestTabEventListener = () => {
const questTabContent = document.querySelector('.campPage-tabs-tabContent[data-tab="quests"]');
if (!questTabContent) {
return;
}
const observer = new MutationObserver(() => {
updateObjectiveFooterDisplay();
m400IfEnabled();
});
observer.observe(questTabContent, { childList: true });
};
addResearchSmashWarning = () => {
const existing = document.querySelector("#mh-research-smash-warning");
if (existing) {
existing.remove();
}
const subtab = hg.utils.PageUtil.getCurrentPageSubTab();
if ("hammer" !== subtab) {
return;
}
const confirm2 = document.querySelector(".inventoryPage-confirmPopup");
if (!confirm2) {
return;
}
const type = confirm2.getAttribute("data-item-type");
if (!type) {
return;
}
const assignments2 = [
"double_run_advanced_research_quest",
"seasonalgardenresearch_quest_item",
"library_adv_hween2013_research_quest_item",
"mystickingresearch_quest_item",
"extra_spooky_hween2014_assignment_quest_item",
"library_m400_research_quest_item",
"charming_study_hween2014_assignment_quest_item",
"zurreal_trap_research_quest_item",
"library_hween2013_research_quest_item",
"pagoda_research_quest_item",
"techkingresearch_quest_item",
"library_power_type_research_quest_item",
"library_m400_bait_research_quest_item",
"pagoda_advanced_research_quest_item",
"furoma_research_quest_item",
"library_mice_research_quest_item",
"hg_letter_research_quest_item",
"library_catalog_quest_item",
"mystic_advanced_research_quest_item",
"tech_advanced_research_quest_item",
"lab_monster_1_quest_item"
];
if (!assignments2.includes(type)) {
return;
}
const warningText = document.createElement("div");
warningText.id = "mh-research-smash-warning";
warningText.innerText = "If you smash an assignment, you will have to wait 1 hour until you can get a new one.";
confirm2.insertBefore(warningText, confirm2.firstChild);
};
moveErrorText = () => {
const errorTextEl = document.querySelectorAll(".questLink .requirements .error");
if (!errorTextEl) {
return;
}
let errorText = "";
errorTextEl.forEach((el) => {
if (el.innerText) {
errorText = el.innerText;
}
el.classList.add("hidden");
});
if (!errorText) {
return;
}
errorText = errorText.replace(/ \d\d seconds/, "").replace(" before taking", " for");
const titleBar = document.querySelector("#jsDialogAjaxPrefix h2");
if (!titleBar) {
return;
}
const titleError = makeElement("h3", "errorText", errorText);
titleBar.parentNode.insertBefore(titleError, titleBar.nextSibling);
};
removeSmashText = () => {
const smashText = document.querySelector(".smashQuest");
if (smashText) {
smashText.classList.add("hidden");
}
};
assignments = [
{
id: "library_intro_research_assignment_convertible",
name: "Catalog Library Mice",
cost: 0,
reward: 20,
rank: false
},
{
id: "",
name: "Library Research",
cost: 20,
reward: 30,
rank: false
},
{
id: "zugzwang_research_assignment_convertible",
name: "Zugzwang Research",
cost: 50,
reward: 80,
rank: false
},
{
id: "furoma_research_assignment_convertible",
name: "Furoma Research",
cost: 130,
reward: 90,
rank: false
},
{
id: "adv_zugzwang_research_assignment_convertible",
name: "Advanced Zugzwang Research",
cost: 150,
reward: 150,
rank: false
},
{
id: "zurreal_trap_research_convertible",
name: "Zurreal Trap Research",
cost: 900,
reward: 400,
rank: false
},
{
id: "library_m400_bait_assignment_convertible",
name: "M400 Bait Research Assignment",
cost: 1250,
reward: 200,
rank: true
},
{
id: "library_m400_assignment_convertible",
name: "M400 Hunting Research Assignment",
cost: 1900,
reward: 300,
rank: true
}
];
getAssignmentMeta = (assignment) => {
const wikiLink = `https://mhwiki.hitgrab.com/wiki/index.php/Library_Assignment#${assignment.name.replaceAll(" ", "_")}`;
return `<a href="${wikiLink}" target="_blank">Wiki</a> | Requires: ${assignment.cost} | Reward: ${assignment.reward}`;
};
updateAssignmentList = () => {
const assignmentList = document.querySelectorAll("#overlayPopup.zugzwangsLibraryQuestShopPopup .questLink");
if (!assignmentList) {
return;
}
assignmentList.forEach((outerEl) => {
const el = outerEl.querySelector(".content b");
if (!el) {
return;
}
const assignmentName = el.innerText;
const assignment = assignments.find((a) => a.name === assignmentName);
if (!assignment) {
return;
}
const requirements = el.parentNode.parentNode.querySelector(".requirements");
if (!requirements) {
return;
}
const metaWrapper = makeElement("div", "mh-ui-assignment-meta-wrapper");
makeElement("div", "mh-ui-assignment-meta", getAssignmentMeta(assignment), metaWrapper);
requirements.parentNode.insertBefore(metaWrapper, requirements.nextSibling);
requirements.remove();
if ("M400 Hunting Research Assignment" === assignmentName) {
const m400Wrapper = makeElement("div", ["content", "mh-ui-m400-wrapper"]);
makeElement("b", "mh-ui-m400-title", assignmentName, m400Wrapper);
makeElement("span", "mh-ui-m400-content", "This envelope contains a Research Assignment that will have you looking for the elusive M400 prototype.", m400Wrapper);
el.parentNode.parentNode.querySelector(".content").replaceWith(m400Wrapper);
}
outerEl.removeAttribute("onclick");
const button = outerEl.querySelector(".actions .mousehuntActionButton");
if (!button) {
return;
}
button.addEventListener("click", () => {
hg.views.HeadsUpDisplayZugswangLibraryView.showConfirm(assignment.id);
});
});
};
modifyAvailableQuestsPopup = () => {
if (!document.querySelector("#overlayPopup.zugzwangsLibraryQuestShopPopup")) {
return;
}
updateAssignmentList();
const isError2 = document.querySelector(".questLink .requirements .error");
if (isError2) {
moveErrorText();
removeSmashText();
}
};
checkForQuestSmash = () => {
if (!window.location.hash || "#smashQuest" !== window.location.hash) {
return;
}
if ("crafting" !== getCurrentTab() || "hammer" !== getCurrentSubtab()) {
return;
}
const assignment = document.querySelector('.inventoryPage-item.quest[data-produced-item="nothing_stat_item"]');
if (!assignment) {
return;
}
app.pages.InventoryPage.useItem(assignment);
};
m400IfEnabled = () => {
if (!getSetting("better-quests-m400-helper", true)) {
return;
}
m400_default();
};
main9 = () => {
const activate = () => {
addQuestTabEventListener();
addQuestsTab();
checkForQuestSmash();
};
m400IfEnabled();
activate();
onNavigation(activate, {
page: "camp"
});
onNavigation(checkForQuestSmash, {
page: "inventory",
tab: "crafting",
subtab: "hammer"
});
onOverlayChange({
show: () => {
addResearchSmashWarning();
modifyAvailableQuestsPopup();
}
});
};
init10 = () => __async(void 0, null, function* () {
addStyles(styles_default9);
main9();
});
better_quests_default = {
id: "better-quests",
name: "Better Quests",
type: "better",
default: true,
description: "Allows you to open the assignments popup anywhere, improves the UI of the quests tab, and adds a helper for the M400 assignments.",
load: init10,
settings: settings_default5
};
}
});
// src/modules/better-send-supplies/settings/index.js
function settings_default6(module) {
return __async(this, null, function* () {
yield addMhuiSetting(
"send-supplies-pinned-items",
"Pinned Items",
[
{
name: "SUPER|brie+",
value: "SUPER|brie+"
},
{
name: "Empowered SUPER|brie+",
value: "Empowered SUPER|b..."
},
{
name: "Rift Cherries",
value: "Rift Cherries"
},
{
name: "Rift-torn Roots",
value: "Rift-torn Roots"
},
{
name: "Sap-filled Thorns",
value: "Sap-filled Thorns"
}
],
"Items to pin at the top of the send supplies page.",
module,
{
type: "multi-select",
number: 5,
options: yield getTradableItems("truncated_name")
}
);
});
}
var init_settings7 = __esm({
"src/modules/better-send-supplies/settings/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
}
});
// src/modules/better-send-supplies/styles.css
var styles_default10;
var init_styles11 = __esm({
"src/modules/better-send-supplies/styles.css"() {
styles_default10 = "#supplytransfer .tabContent.recipient .listContainer .actions{display:none}#supplytransfer .listContainer a.element.recipient{width:97px;height:73px;white-space:nowrap}#supplytransfer .tabContent.recipient .listContainer span.content{font-size:12px}#supplytransfer .listContainer a.element:hover{background-color:#d8f0ff}#supplytransfer .listContainer a.element.item{display:flex;flex-direction:column;align-items:center;justify-content:space-evenly;width:82px;height:77px}#supplytransfer .itemList a.element .itemImage{width:50px;height:50px}#supplytransfer .tabContent.item .listContainer{width:auto;margin-left:80px}#supplytransfer .categoryMenu{width:70px;padding-left:5px;background-color:#fff}#supplytransfer .categoryMenu a{margin-bottom:1px;font-size:12px;text-align:left}#supplytransfer .itemList a.element .itemImage img{width:45px;height:45px}#supplytransfer .listContainer a.element .details{font-size:11px}#supplytransfer .categoryMenu a:hover,#supplytransfer .categoryMenu a:focus,#supplytransfer .categoryMenu a:active{padding-left:5px;margin-left:-5px;text-decoration:none;background-color:#d8f0ff}#supplytransfer .drawer{padding-bottom:40px;margin-bottom:10px}.mhui-supply-search{display:flex;align-items:center;justify-content:space-between;padding:5px;margin:5px 5px 5px 0;line-height:20px}input.mhui-supply-search-input{padding:9px;margin-right:10px}form.mhui-supply-search-form{display:flex;align-items:center}#supplytransfer .drawer .tabContent .searchContainer{position:absolute;top:-5px;right:26px}#supplytransfer .drawer .tabContent h2{display:inline-block;min-width:230px;padding-bottom:0;margin-bottom:0;margin-left:8px;font-size:15px;font-weight:400;line-height:unset;border:none}#supplytransfer .listContainer a.element.item.hidden{display:none}.mhui-supply-sort-wrapper a,.mhui-supply-sort-wrapper img{width:35px;height:20px}.mhui-supply-sort-wrapper{display:flex;flex-direction:row;gap:5px;align-items:center;justify-content:flex-end;width:30%;margin-right:5px}.mhui-supply-sort-wrapper a{margin:0 4px;line-height:20px;text-align:center;text-decoration:none;border:1px solid #ccc;border-radius:3px;box-shadow:2px 2px 3px #cdc9c6 inset}.mhui-supply-sort-wrapper a:hover,.mhui-supply-sort-wrapper a.focus{background-color:#cac0b2}#supplytransfer .listContainer a.element.item.pinned{background-color:#aef5f7}.mhui-supply-quick-quantity-wrapper{display:flex;align-items:center;justify-content:space-around;max-width:150px;margin:10px auto}\n";
}
});
// src/modules/better-send-supplies/index.js
var processSearch, addSearch, asNum, resortItems, addSortButtons, highlightFavoritedItems, addQuickQuantityButtons, items, currentSort, upgradeSendSupplies, hasSorted, main10, init11, better_send_supplies_default;
var init_better_send_supplies = __esm({
"src/modules/better-send-supplies/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
init_settings7();
init_styles11();
processSearch = () => {
const currentValue = document.querySelector("#mhui-supply-search-input");
if (!currentValue.value) {
items.forEach((item) => {
item.classList.remove("hidden");
});
}
items.forEach((item) => {
const text = item.textContent.toLowerCase();
if (text.includes(currentValue.value.toLowerCase())) {
item.classList.remove("hidden");
} else {
item.classList.add("hidden");
}
});
};
addSearch = () => {
const existing = document.querySelector(".mhui-supply-search-wrapper");
if (existing) {
return;
}
const container = document.querySelector("#supplytransfer .tabContent.item");
if (!container) {
return;
}
const form = makeElement("form", "mhui-supply-search-form");
const label = makeElement("label", ["mhui-supply-search-label", "screen-reader-only"]);
label.setAttribute("for", "mhui-supply-search-input");
makeElement("span", "", "Search for an item", label);
form.append(label);
const input = makeElement("input", "mhui-supply-search-input");
input.setAttribute("type", "text");
input.setAttribute("id", "mhui-supply-search-input");
input.setAttribute("placeholder", "Search for an item");
input.setAttribute("autocomplete", "off");
input.addEventListener("keyup", processSearch);
form.append(input);
const titleWrapper = makeElement("div", "mhui-supply-search");
const title = container.querySelector("h2");
title.textContent = "Send Supplies";
titleWrapper.append(title);
titleWrapper.append(form);
container.insertBefore(titleWrapper, container.firstChild);
setTimeout(() => {
input.focus();
}, 100);
};
asNum = (number) => {
return Number.parseInt(number.replace(",", ""));
};
resortItems = (sortType = "alpha") => {
const container = document.querySelector("#supplytransfer .tabContent.item .listContainer");
const items2 = container.querySelectorAll(".item");
let sortSelector = ".quantity";
if ("alpha" === sortType || "alpha-reverse" === sortType) {
sortSelector = ".details";
}
const sorted = [...items2].sort((a, b) => {
const aText = a.querySelector(sortSelector).textContent;
const bText = b.querySelector(sortSelector).textContent;
switch (sortType) {
case "alpha":
return aText.localeCompare(bText);
case "alpha-reverse":
return bText.localeCompare(aText);
case "qty":
return asNum(bText) - asNum(aText);
case "qty-reverse":
return asNum(aText) - asNum(bText);
}
return 0;
});
for (const item of sorted) {
if (item.classList.contains("pinned")) {
continue;
}
container.append(item);
}
currentSort = sortType;
};
addSortButtons = () => {
const existing = document.querySelector(".mhui-supply-sort-wrapper");
if (existing) {
return;
}
const container = document.querySelector(".mhui-supply-search");
if (!container) {
return;
}
const sortWrapper = makeElement("div", "mhui-supply-sort-wrapper");
makeElement("span", "mhui-supply-sort-label", "Sort by:", sortWrapper);
const alphaSortButton = makeElement("div", ["mousehuntActionButton", "tiny", "mhui-supply-sort-alphabetic"]);
makeElement("span", "mousehuntActionButton-text", "Name", alphaSortButton);
alphaSortButton.addEventListener("click", () => {
resortItems(currentSort === "alpha" ? "alpha-reverse" : "alpha");
});
sortWrapper.append(alphaSortButton);
const sortQtyButton = makeElement("div", ["mousehuntActionButton", "tiny", "mhui-supply-sort-quantity"]);
makeElement("span", "mousehuntActionButton-text", "Quantity", sortQtyButton);
sortQtyButton.addEventListener("click", () => {
resortItems(currentSort === "qty" ? "qty-reverse" : "qty");
});
sortWrapper.append(sortQtyButton);
container.insertBefore(sortWrapper, container.childNodes[1]);
};
highlightFavoritedItems = () => {
const itemsToPin = /* @__PURE__ */ new Set([
getSetting("send-supplies-pinned-items-0", "SUPER|brie+"),
getSetting("send-supplies-pinned-items-1", "Empowered SUPER|b..."),
getSetting("send-supplies-pinned-items-2", "Rift Cherries"),
getSetting("send-supplies-pinned-items-3", "Rift-torn Roots"),
getSetting("send-supplies-pinned-items-4", "Sap-filled Thorns")
]);
for (const item of items) {
const details = item.querySelector(".details");
if (itemsToPin.has(details.textContent)) {
item.classList.add("pinned");
}
}
};
addQuickQuantityButtons = () => {
const inputVal = document.querySelector("#supplytransfer-confirm-text input");
if (!inputVal) {
return;
}
const maxquantity = document.querySelector("#supplytransfer-confirm-text .userQuantity");
if (!maxquantity) {
return;
}
const existing = document.querySelector(".mhui-supply-quick-quantity-wrapper");
if (existing) {
existing.remove();
}
const maxAmount = Number.parseInt(maxquantity.textContent.split("You can send up to: ")[1].split(" ")[0].replace(",", ""));
const wrapper = makeElement("div", "mhui-supply-quick-quantity-wrapper");
const buttons = [
1,
5,
10,
100
];
for (const button of buttons) {
const btn = makeElement("button", ["mousehuntActionButton", "tiny", "mhui-supply-quick-quantity"]);
makeElement("span", "", `+${button}`, btn);
btn.addEventListener("click", () => {
const value = Number.parseInt(inputVal.value || 0);
inputVal.value = value + button;
const event = new Event("keyup");
inputVal.dispatchEvent(event);
});
wrapper.append(btn);
}
const max = makeElement("button", ["mousehuntActionButton", "tiny", "mhui-supply-quick-quantity"]);
makeElement("span", "", "All", max);
max.addEventListener("click", () => {
inputVal.value = maxAmount;
const event = new Event("keyup");
inputVal.dispatchEvent(event);
});
wrapper.append(max);
inputVal.parentNode.insertBefore(wrapper, inputVal.nextSibling);
};
items = [];
currentSort = null;
upgradeSendSupplies = (initial = false) => {
const sendTo = document.querySelector("#supplytransfer .drawer .tabContent.recipient");
const isChoosingUser = sendTo && sendTo.style.display !== "none";
const sending = document.querySelector("#supplytransfer .drawer .tabContent.item");
const isChoosingItem = sending && sending.style.display !== "none";
if (isChoosingUser) {
const users = document.querySelectorAll("#supplytransfer .friendList .element.recipient");
for (const user2 of users) {
user2.addEventListener("click", () => {
upgradeSendSupplies();
}, { once: true });
const search = document.querySelector(".searchContainer input");
if (search) {
search.focus();
}
}
} else if (isChoosingItem) {
items = document.querySelectorAll("#supplytransfer .tabContent.item .listContainer .item");
highlightFavoritedItems();
if (initial || !hasSorted) {
hasSorted = true;
resortItems("alpha");
}
addSortButtons();
const itemSearch = document.querySelector(".mhui-supply-search-input");
if (itemSearch) {
itemSearch.focus();
}
} else {
addQuickQuantityButtons();
const inputVal = document.querySelector("#supplytransfer-confirm-text input");
if (inputVal) {
inputVal.focus();
}
}
sendTo.addEventListener("click", () => {
upgradeSendSupplies();
}, { once: true });
sending.addEventListener("click", () => {
upgradeSendSupplies();
}, { once: true });
};
hasSorted = false;
main10 = () => {
addSearch();
upgradeSendSupplies(true);
};
init11 = () => __async(void 0, null, function* () {
addStyles(styles_default10);
onNavigation(main10, {
page: "supplytransfer"
});
});
better_send_supplies_default = {
id: "better-send-supplies",
name: "Better Send Supplies",
type: "better",
default: true,
description: "Adds pinned items, search, and sorting to the Send Supplies page.",
load: init11,
settings: settings_default6
};
}
});
// src/modules/better-shops/styles.css
var styles_default11;
var init_styles12 = __esm({
"src/modules/better-shops/styles.css"() {
styles_default11 = '.shopsPage-header-container,.itemPurchaseView-container.kingsCartItem .itemPurchaseView-content-accordion,.itemPurchaseView-action-itemCost.required .itemPurchaseView-action-itemCost-table-cell.owned,.itemPurchaseView-container.flaming_spice_crafting_item.kingsCartItem,.itemPurchaseView-container.dragonshard_sparkling_nest_convertible.kingsCartItem,.itemPurchaseView-container.kingsCartItem .itemPurchaseView-action-itemCost-description,.itemPurchaseView-container.kingsCartItem .itemPurchaseView-action-itemCost-title,.hasShop .itemPurchaseView-container.super_brie_cheese,.hasShop .itemPurchaseView-container.donation{display:none!important}.itemPurchaseView-action-form.clear-block,.itemPurchaseView-container.kingsCartItem .itemPurchaseView-action-form{display:flex;justify-content:center;margin:1em 0}.itemPurchaseView-container.own_max:hover,.itemPurchaseView-container.own_max:focus{opacity:1}.itemPurchaseView-container.own_max .itemPurchaseView-content-container .itemPurchaseView-content-description{overflow-y:auto}.itemPurchaseView-action-quantity span,.itemPurchaseView-action-purchaseHelper-maxPurchases-container,.itemPurchaseView-content-accordion,.itemPurchaseView-action-kingsCreditCostContainer,.itemPurchaseView-container.own_max .itemPurchaseView-action-purchaseHelper-maxPurchasesLimitReached,.shopCustomization .itemPurchaseView-container.own_max .itemPurchaseView-content-container .itemViewStatBlock,.shopCustomization .itemPurchaseView-container.own_max .itemViewStatBlock-stat.title,.shopCustomization .itemPurchaseView-container.own_max .itemViewStatBlock-stat.powerType,.itemPurchaseView-content-skin b,a.itemPurchaseView-image-trapPreview-link,.itemPurchaseView-action-itemCost-title,.itemPurchaseView-action-itemCost-description{display:none}.itemPurchaseView-content-skin{margin-top:-10px;margin-bottom:5px}.itemPurchaseView-content-description{max-height:173px;padding-bottom:10px;margin-top:0;margin-bottom:0;overflow-y:auto;color:#626262}.itemPurchaseView-action-itemCost-table{width:252px;padding:0 5px;margin-right:-11px;margin-left:-11px;background:#f9f9f9;border-left:none}.itemPurchaseView-action-itemCost-table-cell.cost{width:45px;padding-left:10px;background-size:contain}.itemPurchaseView-action-itemCost-table-row.error{background-color:#ffadad8c}.mh-dark-mode .itemPurchaseView-action-itemCost-table-row.error{background-color:#802d2d8c}.mh-dark-mode .itemPurchaseView-action-itemCost-table-row.error .itemPurchaseView-action-itemCost-table-cell.cost{color:#f66060}.itemPurchaseView-action-itemCost-table-row{display:grid;grid-template-columns:1fr 15fr 1fr;place-items:center stretch;width:100%;padding:5px;margin:0 -5px}.itemPurchaseView-action-goldGost{padding:5px 5px 5px 25px;font-size:1.3em;font-weight:400;text-align:left;background:#f9f9f9;border:1px solid #ccc;border-right:none;border-left:none}.itemPurchaseView-content-container{padding:0;border-right:1px solid #ccc}.mh-dark-mode .itemPurchaseView-content-container{border-color:#242424}.itemPurchaseView-image-container,.itemPurchaseView-content-container{background-color:#fff}.itemPurchaseView-action-quantity{width:auto;margin:0 5px 0 10px}.itemPurchaseView-action-quantity input{width:100%;padding:3px;margin:0}a.itemPurchaseView-action-form-button.buy,a.itemPurchaseView-action-form-button.sell{width:auto;height:21px;margin-top:0;font-weight:400;line-height:21px}a.itemPurchaseView-action-form-button.buy{height:21px;margin-left:7px;background:#f4e830}a.itemPurchaseView-action-form-button.sell{margin-left:7px;background:#b3edff}.itemPurchaseView-container.cannot_sell .itemPurchaseView-action-form-button.sell,.itemPurchaseView-container.cannot_buy .itemPurchaseView-action-form-button.buy{filter:grayscale(1) opacity(.75)}.itemPurchaseView-action-purchaseHelper{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;margin:0}.itemPurchaseView-container.no_gold_cost .itemPurchaseView-action-goldGost{display:block}.itemPurchaseView-content-name{display:flex;align-items:center;justify-content:space-between;margin-top:6px;margin-bottom:4px}.itemPurchaseView-action-purchaseHelper-owned{padding:4px;margin-right:10px;font-size:11px;white-space:nowrap;background-color:#f9f9f9;border:1px solid #ccc;border-radius:5px}.itemPurchaseView-action-purchaseHelper-error{height:auto}.itemPurchaseView-container.own_max .itemPurchaseView-action-container{display:none}.itemPurchaseView-action-container{padding:10px 0 0;border:none}#overlayPopup .marketplaceView input.button:first-child{position:absolute;top:-3px!important;right:-10px!important;display:block;width:28px;height:27px;padding:0;overflow:hidden;text-align:center;text-indent:34px;background-image:url(https://www.mousehuntgame.com/images/ui/backgrounds/jsDialogCloseButton.png?asset_cache_version=2);background-repeat:no-repeat;border:none;border-bottom:0;border-left:0;box-shadow:none}#overlayPopup .marketplaceView input.button:first-child:hover,#overlayPopup .marketplaceView input.button:first-child:focus{background-color:transparent;background-image:url(https://www.mousehuntgame.com/images/ui/backgrounds/jsDialogCloseButton.png?asset_cache_version=2);background-repeat:no-repeat;background-position:0 -27px;border-bottom:none;border-left:none}a.itemPurchaseView-content-skin-link{padding-left:26px;background-size:23px}#overlayPopup.marketplaceViewPopup .suffix{display:none}.kings_cart .hasShop .cannot_buy.super_dragonbane_trinket,.kings_cart .hasShop .cannot_buy.extrme_dragonbane_trinket,.kings_cart .hasShop .cannot_buy.wild_tonic_remote_pumping_trinket,.kings_cart .hasShop .cannot_buy.hot_spice_crafting_item,.kings_cart .hasShop .cannot_buy.flaming_spice_crafting_item,.kings_cart .hasShop .cannot_buy.dragonshard_sparkling_nest_convertible,.itemPurchaseView-container.eggstra_trinket.cannot_buy.no_gold_cost,.itemPurchaseView-container.eggstra_charge_trinket.cannot_buy.no_gold_cost{display:none!important}.shopCustomization .itemViewStatBlock-padding{display:flex;align-items:center}.shopCustomization .itemViewStatBlock,.shopCustomization .itemViewStatBlock-stat{margin-top:10px;border:none}.shopCustomization .itemViewStatBlock-stat{padding:2px 4px 2px 2px;margin-top:3px;margin-right:5px;border:1px solid #ccc;border-radius:5px}.shopCustomization .itemViewStatBlock-stat-helper{right:unset;left:unset;white-space:nowrap}.shopCustomization .itemViewStatBlock-stat-label{margin-right:0;background:none}.shopCustomization .itemViewStatBlock-stat-value{max-width:unset;background:none;border-radius:0}.shopCustomization .itemPurchaseView-container .itemViewStatBlock-stat.cheeseEffect{width:auto;border-bottom:1px solid #ccc}.shopCustomization .itemPurchaseView-container .itemViewStatBlock-stat.cheeseEffect .itemViewStatBlock-stat-value{width:auto;max-width:150px}.item_set,.mh-dark-mode .item_set{background-color:#eeab2a45;border:none}.shopCustomization .itemViewStatBlock.horizontal .itemViewStatBlock-padding{display:flex;flex-flow:row wrap;row-gap:5px;align-items:center;justify-content:flex-start}.shopCustomization .itemPurchaseView-container .itemViewStatBlock.horizontal .itemViewStatBlock-stat.title,.shopCustomization .itemPurchaseView-container .itemViewStatBlock.horizontal .itemViewStatBlock-stat.cheeseEffect{width:60px}.shopCustomization .itemPurchaseView-container .itemViewStatBlock-stat.title,.itemPurchaseView-container .itemViewStatBlock-stat.powerType{display:flex;align-items:center;justify-content:space-around;width:auto;line-height:14px;border:1px solid #ccc}.shopCustomization .itemViewStatBlock.horizontal .itemViewStatBlock-stat-label{display:inline-block;padding:0}.shopCustomization .itemViewStatBlock.horizontal .itemViewStatBlock-stat-value{display:inline-flex;align-items:center;justify-content:center;margin-right:3px}.shopCustomization .itemViewStatBlock.horizontal .itemViewStatBlock-stat{display:flex;align-items:center;min-width:55px;padding:2px;margin:0 5px 0 0;background-color:#f9f9f9;border:1px solid #ccc;border-radius:5px}.mh-dark-mode.shopCustomization .itemViewStatBlock.horizontal .itemViewStatBlock-stat{background-color:#333;border-color:#606060}.mh-dark-mode.shopCustomization .pageFrameView .itemViewStatBlock .itemViewStatBlock-stat-value{background-color:transparent}.shopCustomization .itemViewStatBlock.horizontal .itemViewStatBlock-stat-value span{display:inline-block;padding:0}.shopCustomization .itemViewStatBlock.horizontal .itemViewStatBlock-stat.cheeseEffect .itemViewStatBlock-stat-value{font-size:9px}.itemPurchaseView-container.kingsCartItem{cursor:initial}.itemPurchaseView-container.kingsCartItem .itemPurchaseView-action-container{display:table-cell;width:250px;min-height:unset;color:#000;background:#eee;box-shadow:none}.mh-dark-mode .itemPurchaseView-container.kingsCartItem .itemPurchaseView-action-container{color:#fff;background-color:#242424}.itemPurchaseView-container .itemPurchaseView-content-details,.itemPurchaseView-container.kingsCartItem .itemPurchaseView-content-details{height:100%;overflow:visible}.itemPurchaseView-container.kingsCartItem .itemPurchaseView-action-state.view{padding-top:unset}.itemPurchaseView-container.kingsCartItem .itemPurchaseView-action-itemCost.consumed,.itemPurchaseView-container.kingsCartItem .itemPurchaseView-action-goldGost,.itemPurchaseView-container.kingsCartItem .itemPurchaseView-action-marketplace,.itemPurchaseView-container.kingsCartItem .itemPurchaseView-action-confirm-refund-container{display:block!important}.itemPurchaseView-container.kingsCartItem .itemPurchaseView-action-goldGost{opacity:.4}.itemPurchaseView-container.kingsCartItem .itemPurchaseView-action-quantity{display:block;width:auto}.itemPurchaseView-container.kingsCartItem .itemPurchaseView-action-quantity input{width:100%;margin-top:0}.itemPurchaseView-container.kingsCartItem .itemPurchaseView-content-details:after{display:none}.itemPurchaseView-container.kingsCartItem .itemPurchaseView-action-confirm-button-row a,.itemPurchaseView-container.kingsCartItem .itemPurchaseView-action-complete-title{color:#3b5998}span.itemPurchaseView-action-confirm-refund.noRefund{position:relative;display:block;color:transparent}span.itemPurchaseView-action-confirm-refund.noRefund:after{position:absolute;top:10px;right:0;left:0;height:10px;color:#000;content:"Cannot be refunded."}.itemPurchaseView-container.has_refund_value .itemPurchaseView-action-confirm-refund.hasRefund{margin-top:20px}.itemPurchaseView-action-confirm-title{margin-bottom:10px;font-style:normal;font-weight:400}.itemPurchaseView-container.kingsCartItem .itemPurchaseView-action-complete-title,.itemPurchaseView-container .itemPurchaseView-action-complete-title,.itemPurchaseView-action-complete-title,.itemPurchaseView-action-armed-title{margin:10px;font-weight:400;color:#000}.itemPurchaseView-container .itemPurchaseView-action-state.complete a.itemPurchaseView-action-complete-return{position:relative;display:block;float:none;margin:0;color:transparent}.itemPurchaseView-container .itemPurchaseView-action-state.complete a.itemPurchaseView-action-complete-return:after{position:absolute;top:10px;right:78px;left:78px;padding:10px 15px;line-height:10px;color:#000;text-shadow:0 0 1px #fff;content:"Continue";background-color:#fff600;border:1px solid #000;border-radius:5px;box-shadow:inset 0 0 5px #fff,1px 1px 1px #fff}.itemPurchaseView-container.marketplace_buy_regal_stool_collectible.kingsCartItem.cannot_sell.own_max,.itemPurchaseView-container.marketplace_sell_regal_display_case_collectible.kingsCartItem.cannot_sell.own_max,.itemPurchaseView-container.kings_calibrator_message_item.kingsCartItem.cannot_sell.own_max{display:none!important}.itemPurchaseView-action-itemCost-table-row.error .itemPurchaseView-action-itemCost-table-cell.cost{color:#a21010}.mh-dark-mode .itemPurchaseView-action-goldGost{background-color:#0e0e0e;border-color:#242424}.itemPurchaseView-content-details{display:flex;flex-direction:column;align-items:stretch;padding-bottom:10px}.itemPurchaseView-content-container .itemViewStatBlock.horizontal.base,.itemPurchaseView-content-container .itemViewStatBlock.horizontal.weapon{width:auto;margin-bottom:10px;margin-left:0}.title .itemViewStatBlock-stat-value span a{max-width:60px;text-overflow:ellipsis;word-wrap:break-word;white-space:unset}a.itemPurchaseView-image{width:100px;height:100px}a.shopsPage-kingsCalibratorPromo{display:flex;align-items:center;justify-content:center;padding:0;font-size:12px}.shopsPage-kingsCalibratorPromo-button{top:unset}.shopsPage-kingsCalibratorPromo br{display:none}.shopsPage-compareEquipment-stats{width:auto}.shopsPage-compareEquipment-stats .itemViewStatBlock.horizontal.weapon{float:none;width:auto;margin-left:0}.shopsPage-compareEquipment-stats .itemPurchaseView-content-name{display:flex;gap:5px;justify-content:flex-start}.shopsPage-compareEquipment{background-color:#dbe9ff}.itemPurchaseView-container.own_max{display:block!important;height:25px;overflow-y:hidden;opacity:.3;transition:.4s}.mh-dark-mode .itemPurchaseView-container.own_max{background-color:#000}.itemPurchaseView-container.own_max:hover{display:table!important;height:unset;overflow-y:visible}.itemPurchaseView-container.own_max:hover .itemPurchaseView-action-container{display:table-cell}.mh-dark-mode .itemPurchaseView-container.own_max .itemPurchaseView-content-container{border-color:transparent}.itemPurchaseView-container.own_max .itemPurchaseView-content-name b:after{font-size:10px;content:" (maximum owned)"}.mh-dark-mode .shopCustomization .itemPurchaseView-container .itemViewStatBlock-stat.cheeseEffect,.mh-dark-mode .shopCustomization .itemPurchaseView-container .itemViewStatBlock-stat{background-color:#3d3d3d;border-color:#606060}.shopCustomization .shopCustomization .itemViewStatBlock-stat.powerType{position:absolute;color:#000;background-color:#e6e6e6}.shopCustomization .itemViewStatBlock-stat.powerType .itemViewStatBlock-stat-value{display:none}.shopCustomization .itemViewStatBlock-stat.title{bottom:5px;left:5px}.mh-dark-mode .itemPurchaseView-container .itemViewStatBlock-stat.title,.mh-dark-mode .itemPurchaseView-container .itemViewStatBlock-stat.powerType{background-color:#3d3d3d;border-color:#606060}.itemPurchaseView-container .itemViewStatBlock-stat.powerType{top:-4px;left:-1px;padding:4px;border-radius:0 0 11px}.mh-dark-mode .itemPurchaseView-container .itemPurchaseView-image-container .itemViewStatBlock-stat.powerType{background-color:transparent;border:none}.itemPurchaseView-container.new .itemPurchaseView-margin:after{top:5px}\n';
}
});
// src/modules/better-shops/index.js
var updatePlaceholderText, main11, init12, better_shops_default;
var init_better_shops = __esm({
"src/modules/better-shops/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
init_styles12();
updatePlaceholderText = () => {
const purchaseBlocks = document.querySelectorAll(".itemPurchaseView-action-state.view");
if (purchaseBlocks) {
purchaseBlocks.forEach((block) => {
const qty = block.querySelector(".itemPurchaseView-action-maxPurchases");
if (!qty) {
return;
}
let maxQty = qty.innerText;
if (maxQty.includes("Inventory max")) {
maxQty = 0;
}
const input = block.querySelector("input");
if (!input) {
return;
}
input.setAttribute("placeholder", maxQty);
});
}
};
main11 = () => {
const body = document.querySelector("body");
if (!body) {
return;
}
if ("item" === getCurrentPage()) {
body.classList.remove("shopCustomization");
return;
}
body.classList.add("shopCustomization");
const golds = document.querySelectorAll(".itemPurchaseView-action-goldGost");
if (golds) {
golds.forEach((gold) => {
gold.innerText = gold.innerText.replace("Cost:", "");
});
}
const buyBtns = document.querySelectorAll(".itemPurchaseView-action-form-button.buy");
if (buyBtns) {
buyBtns.forEach((btn) => {
btn.classList.add("mousehuntActionButton");
btn.innerHTML = "<span>Buy</span>";
});
}
const sellBtns = document.querySelectorAll(".itemPurchaseView-action-form-button.sell");
if (sellBtns) {
sellBtns.forEach((btn) => {
btn.classList.add("mousehuntActionButton");
btn.classList.add("lightBlue");
btn.innerHTML = "<span>Sell</span>";
});
}
updatePlaceholderText();
const owned = document.querySelectorAll(".itemPurchaseView-action-purchaseHelper-owned");
if (owned) {
owned.forEach((ownedItem) => {
if (ownedItem.getAttribute("moved-to-title")) {
return;
}
const container = ownedItem.parentNode.parentNode.parentNode.parentNode.parentNode;
const nameEl = container.querySelector(".itemPurchaseView-content-name");
ownedItem.setAttribute("moved-to-title", "true");
nameEl.append(ownedItem);
});
}
const kingsCart = document.querySelectorAll(".itemPurchaseView-container.kingsCartItem");
if (kingsCart) {
kingsCart.forEach((cart) => {
cart.querySelector("input").value = "";
});
}
const shopQty = document.querySelectorAll(".itemPurchaseView-action-quantity input");
if (!shopQty) {
return;
}
shopQty.forEach((qty) => {
qty.setAttribute("maxlength", "100");
});
const itemStats = document.querySelectorAll(".itemViewStatBlock");
if (itemStats) {
itemStats.forEach((stat) => {
if (stat.classList.contains("horizontal")) {
return;
}
const contentSection = stat.parentNode.parentNode.querySelector(".itemPurchaseView-content-container");
if (contentSection) {
contentSection.append(stat);
}
});
}
const itemStatsTitle = document.querySelectorAll(".itemViewStatBlock.horizontal .itemViewStatBlock-stat");
if (itemStatsTitle) {
itemStatsTitle.forEach((title) => {
if (title.classList.contains("title") || title.classList.contains("powerType")) {
const imageContainer = title.parentNode.parentNode.parentNode.parentNode.parentNode.querySelector(".itemPurchaseView-image-container");
if (imageContainer) {
imageContainer.append(title);
}
}
});
}
};
init12 = () => __async(void 0, null, function* () {
addStyles(styles_default11);
onNavigation(main11, {
page: "shops"
});
onRequest(updatePlaceholderText, "managers/ajax/purchases/itempurchase.php");
});
better_shops_default = {
id: "better-shops",
name: "Better Shops",
type: "better",
default: true,
description: "Updates the Shop layout and appearance, minimizes owned items that have an inventory limit of 1, and more.",
load: init12
};
}
});
// src/modules/better-tournaments/settings/index.js
function settings_default7(module) {
addMhuiSetting(
"better-tournaments-tournament-time-display-inline",
"Display localized times inline",
false,
"Display localized tournament times are inline, rather than on hover.",
module
);
}
var init_settings8 = __esm({
"src/modules/better-tournaments/settings/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
}
});
// src/modules/better-tournaments/styles.css
var styles_default12;
var init_styles13 = __esm({
"src/modules/better-tournaments/styles.css"() {
styles_default12 = '.teamPage-memberRow-identity .teamPage-member-nameContainer{width:auto}.tournamentPage-tournamentContainer-customPrizes{display:none}.tournamentPage-tournamentContainer-name{margin-bottom:5px;font-size:13px}.tournamentPage-tournamentContainer-description{padding-top:2px;font-size:9px}.train .tournamentPage-tournamentContainer-description{max-height:35px;padding-right:10px;font-size:9px;line-height:10px}.tournamentPage-tournamentRow .tournamentPage-tournamentContainer-icon{display:none}.tournamentPage-tournament-column.label{text-align:center}.tournamentPage-tournament-column.label.nameIcon{text-align:left}.tournamentPage-tournamentContainer-labels .tournamentPage-tournament-column:nth-child(6){display:none}.tournamentPage-tournament-column.members_5 .tournamentPage-tournament-teamMember{display:block;width:19.6px;height:19.6px}.tournamentPage-tournament-column.value.teamMembers.members_5{display:flex;flex-flow:row wrap;align-items:center}.tournamentPage-tournament-column.members_5 .tournamentPage-tournament-teamMember.empty:after{margin-top:4px;margin-left:-5px}.tournamentPage-tournamentContainer-labels{display:grid;grid-template-columns:305px 100px 80px 55px;justify-items:stretch;margin-left:15px}.tournamentPage-tournament-column .tournamentPage-tournament-teamMember:is(.empty){color:transparent}.tournamentPage-tournament-column .tournamentPage-tournament-teamMember.empty:before{content:counter(team);counter-increment:team}.tournamentPage-tournament-column.value.teamMembers{counter-reset:team}.tournamentPage-tournament-column .tournamentPage-tournament-teamMember.empty:last-child:before{position:absolute;top:4px;right:-1px;display:inline-block;width:22px;height:22px;font-size:18px;line-height:22px;color:#474747;background-color:#e5e5e5;border-radius:50%;box-shadow:1px 1px 1px #c7c7c7}.tournamentPage-tournament-column.members_5 .tournamentPage-tournament-teamMember.empty:last-child:before{top:-2px;right:-4px;width:21px;height:21px;font-size:17px;line-height:20px}.tournamentPage-tournament-column.label,a.tournamentPage-tournament-column.icon,a.tournamentPage-tournament-column.name,.tournamentPage-tournament-column.value,.tournamentPage-tournament-column.actions{width:auto}.tournamentPage-tournamentRow{display:grid;grid-template-columns:0 300px 1fr 1fr 20px 100px 70px;gap:10px;place-items:center stretch;padding:5px 10px 5px 0;border:1px solid #d7d7d7;border-radius:4px}.tournamentPage-tournament-column.label.teamMembers{display:none;text-align:center}.tournamentPage-tournamentRow.train .tournamentPage-tournamentContainer-icon,.tournamentPage-tournamentContainer-icon{width:30px;height:30px;margin:0;background-repeat:no-repeat;background-position:unset;background-size:contain}.tournamentPage-profile-summaryContainer{min-height:100px;padding-left:130px;margin-right:20px;margin-left:20px;background-size:120px}.tournamentPage-profile-description{display:grid;grid-template-columns:1fr 125px;place-items:center end;font-size:13px;line-height:20px}.tournamentPage-profile-action{display:block;order:2;float:none;font-size:14px}.tournamentPage-profile-prizeWaiting{display:grid;grid-template-columns:1fr 100px;align-items:center;justify-content:center;padding:10px 20px;margin:20px 0;font-size:18px;font-weight:400}.tournamentPage-tournamentHeader,.tournamentPage-viewState .mousehuntTabContentContainer{background:#efe9df;border:1px solid #af9969;box-shadow:inset 1px 1px 1px #e2d6b5}.tournamentPage-profile-details-rules h2:first-of-type{display:none}img.tournamentPage-profile-details-rules-icon{display:none}.tournamentPage-profile-details-rules br:first-of-type:after,.tournamentPage-profile-details-rules br:first-of-type:before{display:block}.tournamentPage-profile-details-generalRules ul li:nth-of-type(2),.tournamentPage-profile-details-generalRules ul li:nth-of-type(3){display:none}.tournamentPage-profile-details-generalRules ul{margin:0 0 0 15px;list-style:disc}.tournamentPage-profile-details-generalRules-title{display:none}.tournamentPage-profile-summary{height:auto;min-height:200px;background-color:#f6f3eb;border:1px solid #cbc6bb;border-radius:5px;box-shadow:inset -1px -1px 1px #d3cecb}.tournamentPage-tournamentHeader,.tournamentPage-viewState .mousehuntTabContentContainer{background-color:#f6f3eb;border:1px solid #cbc6bb;border-radius:5px;box-shadow:inset -1px -1px 1px #d3cecb}.tournamentPage-viewState .mousehuntTabHeader span{margin-bottom:1px;background:#f6f3eb;border:1px solid #cbc6bb;box-shadow:none}.tournamentPage-viewState .mousehuntTabHeader.active span,.tournamentPage-viewState .mousehuntTabHeader span:hover,.tournamentPage-viewState .mousehuntTabHeader span:focus{border-bottom:none}.tournamentPage-viewState .mousehuntTabHeader:before{background:none;box-shadow:none}.tournamentPage-viewState .mousehuntTabHeader.active span,.tournamentPage-viewState .mousehuntTabHeader:hover span,.tournamentPage-viewState .mousehuntTabHeader:focus span{border-bottom:1px solid #f6f3eb}.tournamentPage-profile-details-rewardContainer h2{display:none}.tournamentPage-profile-details-rewardContainer>div:last-child{display:none}.tournamentPage-profile-details-rewardContainer{background-color:transparent}.tournamentPage-profile-details-padding{position:relative;background-color:#f6f3eb}.tournamentPage-profile-details-reward-name{padding-bottom:20px;margin-left:30px;font-weight:400}.tournamentPage-profile-details-padding div:nth-child(2){position:absolute;top:5px;left:5px;width:30px;height:30px;margin-left:0;color:transparent;background-size:contain}.tournamentPage-profile-details-reward-item{margin-left:5px;mix-blend-mode:multiply}.tournamentPage-profile-details-environmentContainer{position:absolute;right:0;bottom:-10px;display:flex;flex-flow:row wrap;place-content:center center;align-items:stretch;width:290px;padding-top:10px;background-color:#f6f3eb;border:1px solid #cbc6bb;border-radius:5px;box-shadow:inset -1px -1px 1px #d3cecb}.tournamentPage-profile-details-rules h2{display:none;padding-bottom:11px}.tournamentPage-profile-details-generalRules{width:270px;font-size:11px;background-color:#f6f3eb;border:1px solid #cbc6bb;border-radius:5px;box-shadow:inset -1px -1px 1px #d3cecb}.tournamentPage-profile-details-environmentWarning{display:none}.tournamentPage-profile-details-rules{display:flex;flex-direction:column;justify-content:flex-start;font-size:12px}.tournamentPage-profile-details-mouseGroup{width:auto;padding:10px;margin:0;background-color:#f6f3eb;border:1px solid #cbc6bb;border-radius:5px;box-shadow:inset -1px -1px 1px #d3cecb}h2.tournamentPage-profile-details-mouseGroup-name{padding-left:32px;margin-bottom:10px;font-size:14px;font-weight:900}.tournamentPage-profile-details-mouseGroup-miceContainer{display:flex;flex-flow:column wrap;margin:0}.tournamentPage-profile-details-mice{display:grid;grid-template-columns:1fr 1fr 1fr;gap:10px}.tournamentHelp.clear-block img{display:none}.tournamentPage-profile-details-mouseGroup-mouse{width:100%}.tournamentStatusHud .score,.tournamentStatusHud .rank{padding:15px;margin:-15px}.teamMembers:hover .memberHover,.rank:hover .scoreHover{display:block}.score:hover .pointsHover{display:grid}.memberHover,.scoreHover,.pointsHover{position:absolute;top:90%;left:-50%;z-index:31;display:none;width:275px;color:#4e300b;background-color:#f6f3eb;border:1px solid #cbc6bb;border-radius:5px;box-shadow:inset -1px -1px 1px #d3cecb,1px 3px 3px #939393}.pointsHover{left:-130%;grid-template-columns:1fr 1fr 1fr;place-items:stretch stretch;width:auto}.scoreRow{display:grid;grid-template-columns:25px 1fr 25px;place-items:center start;padding:5px;margin-bottom:5px}.pointsTotal{text-align:center}img.memberImage{width:20px;height:20px;padding:5px}.memberRow{display:flex;padding:2px}.memberHover{left:0;width:auto;min-width:120px;padding:5px}.memberRow:nth-child(2n){background-color:#e8e4d6}.scoreRow:nth-child(2n){background-color:#e5e0de}.scoreIcon{position:relative;width:20px;height:20px;margin-right:5px;overflow:hidden;border-radius:7px}.scoreIcon div{position:absolute;top:0;left:0;width:20px;height:20px;background-repeat:no-repeat;background-size:contain}.teamWrapper{display:flex;align-items:center}.scorePoints{justify-self:end}.pointsRow{width:150px;border:1px solid #cbc6bb}img.pointsMouseIcon{width:15px;height:15px;margin-right:4px;margin-bottom:3px}.pointsMouseWrapper{display:flex;align-items:center;justify-content:flex-start;overflow:hidden}.pointsMouseName{font-size:11px;font-weight:400;text-overflow:ellipsis;white-space:nowrap}.pointsMice{padding:5px}.pointsTitle{padding:5px 0;font-size:12px;text-align:center}.tournamentStatusHud .rank span,.tournamentStatusHud .score span{display:inline-block;font-size:13px;line-height:12px}.tournamentStatusHud a.name,.tournamentStatusHud a.name:visited,.tournamentStatusHud a.name:hover,.tournamentStatusHud a.name:focus{left:33px;font-size:12px}.tournamentStatusHud .timer,.tournamentStatusHud.pending .timer{top:0;left:241px;width:auto;padding-top:3px;padding-right:10px;font-size:11px;line-height:initial;color:#000;background:linear-gradient(166deg,#b4d3da,#acc3ca 50%,#b4d3da 96%);background-color:#acc3ca;border-top-right-radius:15px}.tournamentStatusHud .title{display:none}.tournament-normal-time.tournament-time-display-hover{position:absolute;inset:0 -30px;z-index:6;display:none;padding:5px;text-align:center;white-space:nowrap;background-color:#eee;border:1px solid #3d3d3d;border-radius:5px;box-shadow:1px 1px 3px #191919,0 0 5px 5px #fff}.tournamentPage-tournament-column.value:hover .tournament-time-display-hover{display:block}.tournamentPage-tournamentRow.tournamentPage-tournamentData .tournamentPage-tournament-column.value:nth-child(3),.tournamentPage-tournamentRow.tournamentPage-tournamentData .tournamentPage-tournament-column.value:nth-child(4){height:auto;min-height:25px}.tournament-normal-time.tournament-time-display-inline{margin-top:4px}.tournamentPage-tournamentRow:hover:before{box-shadow:none}.tournamentPage-tournamentRow:hover{background-color:#eee}.tournamentPage-tournamentRow.signed_up:before{background-color:transparent;box-shadow:none}.tournamentPage-tournamentRow.tournamentPage-tournamentData.signed_up{background-color:#feff8d}.tournamentPage-tournamentRow.tournamentPage-tournamentData.signed_up:hover{background-color:#ffda2f}.tournamentPage-tournamentRow.empty .tournamentPage-tournament-empty{white-space:nowrap}.tournamentPage-tournamentButton{padding:2px 15px;line-height:18px;color:#000;text-shadow:0 0 1px #fff;background-color:#f4e830;border:1px solid #000;border-radius:4px;box-shadow:0 -5px 8px -2px #ffae00 inset,1px 1px 1px #b9b9b9}.tournamentPage-tournamentButton:hover,.tournamentPage-tournamentButton:focus{background-color:#e4d50c}.tournamentPage-tournamentHeader a{margin:0;font-size:12px;color:#000;text-shadow:0 0 1px #fff;background-color:#f6f3eb;border:1px solid #000;border-radius:4px}.tournamentPage-tournamentHeader a:hover,.tournamentPage-tournamentHeader a:focus{background-color:#fff;border-color:#000}.tournament-team-rank{background-color:#0d7d3a}.tournament-team-rank.rank_1{color:#000}tbody tr.scoreboardTableView-row-separator:nth-child(5){display:none}tr.scoreboardTableView-row.viewer,tr.scoreboardTableView-row.highlight{background-color:#fdfbcc;border-radius:10px;outline:2px solid #fc6;box-shadow:none}.viewer .tournament-team-rank.updated:hover:after{position:absolute;inset:14px 20px 14px 10px;display:flex;align-items:center;justify-content:center;font-size:11px;color:#000;text-align:center;content:"Page " attr(data-rank-page);background-color:#fdfbcce5;border:1px #aaa9a9;border-radius:5px}.scoreboardTableView-row-rank{position:relative}\n';
}
});
// src/modules/better-tournaments/index.js
var updateTournamentHud, updateTournamentList, updateScoreboard, init13, better_tournaments_default;
var init_better_tournaments = __esm({
"src/modules/better-tournaments/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
init_settings8();
init_styles13();
updateTournamentHud = () => __async(void 0, null, function* () {
var _a, _b;
const activeTourney = document.querySelector("#tournamentStatusHud > a.name");
if (!activeTourney) {
return;
}
const tourneyId = activeTourney.href.split("=")[1];
if (!tourneyId) {
return;
}
const tourneyData = yield doRequest(
"managers/ajax/pages/page.php",
{
page_class: "Tournament",
"page_arguments[tournament_id]": tourneyId
}
);
if (!(tourneyData == null ? void 0 : tourneyData.page)) {
return;
}
if ((_a = tourneyData.page) == null ? void 0 : _a.is_active) {
const name = (_b = tourneyData == null ? void 0 : tourneyData.page) == null ? void 0 : _b.name;
if (name) {
activeTourney.innerText = name;
}
const rank = document.querySelector(".tournamentStatusHud .rank");
if (rank) {
const scoreHover = document.createElement("div");
scoreHover.classList.add("scoreHover");
tourneyData.page.scoreboard.rows.forEach((scoreboard) => {
const scoreRow = makeElement("div", "scoreRow");
makeElement("div", "scoreRank", scoreboard.rank, scoreRow);
const teamWrapper = makeElement("a", "teamWrapper");
teamWrapper.href = `https://www.mousehuntgame.com/team.php?team_id=${scoreboard.team_id}`;
const icon = makeElement("div", "scoreIcon");
const iconLayer1 = makeElement("div", "scoreIconLayer1");
iconLayer1.style.backgroundImage = `url(${scoreboard.emblem.layers[0].image})`;
icon.append(iconLayer1);
const iconLayer2 = makeElement("div", "scoreIconLayer2");
iconLayer2.style.backgroundImage = `url(${scoreboard.emblem.layers[1].image})`;
icon.append(iconLayer2);
const iconLayer3 = makeElement("div", "scoreIconLayer3");
iconLayer3.style.backgroundImage = `url(${scoreboard.emblem.layers[2].image})`;
icon.append(iconLayer3);
teamWrapper.append(icon);
makeElement("div", "scoreName", scoreboard.name, teamWrapper);
scoreRow.append(teamWrapper);
makeElement("div", "scorePoints", scoreboard.points, scoreRow);
scoreHover.append(scoreRow);
});
rank.append(scoreHover);
}
const points = document.querySelector(".tournamentStatusHud .score");
if (points) {
const pointsHover = document.createElement("div");
pointsHover.classList.add("pointsHover");
tourneyData.page.mouse_groups.reverse().forEach((mouseGroup) => {
const pointsRow = makeElement("div", "pointsRow");
makeElement("div", "pointsTotal", mouseGroup.name, pointsRow);
const groupMice = document.createElement("div");
groupMice.classList.add("pointsMice");
mouseGroup.mice.forEach((mouse) => {
const mouseWrapper = makeElement("div", "pointsMouseWrapper");
const mouseIcon = makeElement("img", "pointsMouseIcon");
mouseIcon.src = mouse.thumb;
mouseWrapper.append(mouseIcon);
makeElement("div", "pointsMouseName", mouse.name, mouseWrapper);
groupMice.append(mouseWrapper);
});
pointsRow.append(groupMice);
pointsHover.append(pointsRow);
});
points.append(pointsHover);
}
} else {
const members = document.querySelector(".tournamentStatusHud a.teamMembers");
if (members) {
const memberHover = makeElement("div", "memberHover");
tourneyData.page.members.forEach((member) => {
var _a2, _b2;
const memberRow = makeElement("div", "memberRow");
if (member.is_empty) {
makeElement("div", "memberEmpty", "Empty", memberRow);
memberRow.classList.add("empty");
} else {
const image = makeElement("img", "memberImage");
image.src = (_a2 = member.profile_pic) != null ? _a2 : "https://www.mousehuntgame.com//images/ui/friends/anonymous_user.png";
memberRow.append(image);
makeElement("div", "memberName", (_b2 = member.name) != null ? _b2 : "", memberRow);
}
memberHover.append(memberRow);
});
members.append(memberHover);
}
}
});
updateTournamentList = () => __async(void 0, null, function* () {
const beginsRows = document.querySelectorAll(".tournamentPage-tournamentRow.tournamentPage-tournamentData .tournamentPage-tournament-column.value:nth-child(3)");
if (!beginsRows.length) {
return;
}
const durationRows = document.querySelectorAll(".tournamentPage-tournamentRow.tournamentPage-tournamentData .tournamentPage-tournament-column.value:nth-child(4)");
if (!durationRows.length) {
return;
}
const now = /* @__PURE__ */ new Date();
const nowTime = now.getTime();
const dateOptions = {
weekday: "short",
month: "short",
day: "numeric",
hour: "numeric",
minute: "numeric"
};
beginsRows.forEach((beginsRow, i) => {
const beginsText = beginsRow.innerText;
const beginsParts = beginsText.split(" ");
const beginsMinutes = beginsParts.reduce((acc, part) => {
if (part === "minutes" || part === "minute") {
return acc + Number.parseInt(beginsParts[beginsParts.indexOf(part) - 1], 10);
}
if (part === "hours" || part === "hour") {
return acc + Number.parseInt(beginsParts[beginsParts.indexOf(part) - 1], 10) * 60;
}
return acc;
}, 0);
const inlineOrHover = getSetting("better-tournaments-tournament-time-display-inline") ? "tournament-time-display-inline" : "tournament-time-display-hover";
const beginsDate = new Date(nowTime + beginsMinutes * 6e4);
const beginsDateString = beginsDate.toLocaleString("en-US", dateOptions);
const beginsDateEl = makeElement("div", ["tournament-normal-time", "tournament-begins-date", inlineOrHover], beginsDateString);
beginsRow.append(beginsDateEl);
const durationText = durationRows[i].innerText;
const durationParts = durationText.split(" ");
const durationMinutes = durationParts.reduce((acc, part) => {
if (part === "minutes" || part === "minute") {
return acc + Number.parseInt(durationParts[durationParts.indexOf(part) - 1], 10);
}
if (part === "hours" || part === "hour") {
return acc + Number.parseInt(durationParts[durationParts.indexOf(part) - 1], 10) * 60;
}
return acc;
}, 0);
const durationDate = new Date(beginsDate.getTime() + durationMinutes * 6e4);
const durationDateString = durationDate.toLocaleString("en-US", dateOptions);
const durationDateEl = makeElement("div", ["tournament-normal-time", "tournament-end-date", inlineOrHover], durationDateString);
durationRows[i].append(durationDateEl);
});
});
updateScoreboard = () => {
const getRanks = document.querySelectorAll(".tournament-team-rank:not(.updated)");
getRanks.forEach((rank) => {
rank.classList.add("updated");
const rankParts = rank.innerText.split(/(\d+)/);
if (rankParts.length !== 3) {
return;
}
const rankNum = Number.parseInt(rankParts[1], 10);
if (rankNum <= 25) {
rank.classList.add("rank-first-page");
}
rank.setAttribute("data-rank", rankNum);
rank.setAttribute("data-rank-page", Math.ceil(rankNum / 25));
rank.innerText = rankNum.toLocaleString("en-US") + rankParts[2];
});
};
init13 = () => __async(void 0, null, function* () {
addStyles(styles_default12);
updateTournamentHud();
onEvent("tournament_status_change", updateTournamentHud);
onNavigation(updateTournamentList, {
page: "tournament"
});
onNavigation(updateScoreboard, {
page: "scoreboards"
});
onRequest(updateScoreboard, "managers/ajax/pages/scoreboards.php");
});
better_tournaments_default = {
id: "better-tournaments",
name: "Better Tournaments",
type: "better",
default: true,
description: "Updates the Tournaments UI to show information on hover and a variety of small interface tweaks.",
load: init13,
settings: settings_default7
};
}
});
// src/modules/better-travel/travel-utils.js
var getTravelSettings, getTravelSetting, saveTravelSetting;
var init_travel_utils = __esm({
"src/modules/better-travel/travel-utils.js"() {
init_sentry_release_injection_stub();
init_utils4();
getTravelSettings = () => {
return getSetting("better-travel", {});
};
getTravelSetting = (settingName, defaultValue) => {
const settings = getTravelSettings();
return settings[settingName] || defaultValue;
};
saveTravelSetting = (settingName, value) => {
const settings = getTravelSettings();
settings[settingName] = value;
saveSetting("better-travel", settings);
};
}
});
// src/modules/better-travel/reminders.js
var addReminders, reminders_default;
var init_reminders = __esm({
"src/modules/better-travel/reminders.js"() {
init_sentry_release_injection_stub();
init_utils4();
addReminders = () => {
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E;
const reminderOpts = {
title: "Travel Reminder",
dismiss: 4e3
};
switch (getCurrentLocation()) {
case "rift_valour":
if ((_b = (_a = user.quests) == null ? void 0 : _a.QuestRiftValour) == null ? void 0 : _b.is_fuel_enabled) {
reminderOpts.text = "Champion's Fire is active.";
reminderOpts.image = "https://www.mousehuntgame.com/images/items/stats/transparent_thumb/6622efd1db7028b30f48b15771138720.png?cv=2";
reminderOpts.button = "Deactivate";
reminderOpts.action = () => {
const button = document.querySelector(".valourRiftHUD-fuelContainer-armButton");
if (button) {
button.click();
}
};
}
break;
case "queso_river":
case "queso_plains":
case "queso_quarry":
case "queso_geyser":
if (((_d = (_c = user.quests) == null ? void 0 : _c.QuestQuesoCanyon) == null ? void 0 : _d.is_wild_tonic_active) || ((_f = (_e = user.quests) == null ? void 0 : _e.QuestQuesoGeyser) == null ? void 0 : _f.is_wild_tonic_enabled)) {
reminderOpts.text = "Wild Tonic is active.";
reminderOpts.image = "https://www.mousehuntgame.com/images/items/stats/transparent_thumb/b6b9f97a1ee3692fdff0b5a206adf7e1.png?cv=2";
reminderOpts.button = "Deactivate";
reminderOpts.action = () => {
const button = document.querySelector(".quesoHUD-wildTonic-button");
if (button) {
button.click();
}
};
}
break;
case "floating_islands":
if ("launch_pad_island" === ((_i = (_h = (_g = user.quests) == null ? void 0 : _g.QuestFloatingIslands) == null ? void 0 : _h.hunting_site_atts) == null ? void 0 : _i.island_power_type)) {
break;
}
if (!((_l = (_k = (_j = user.quests) == null ? void 0 : _j.QuestFloatingIslands) == null ? void 0 : _k.hunting_site_atts) == null ? void 0 : _l.is_fuel_enabled) && // BW not active.
!(((_o = (_n = (_m = user.quests) == null ? void 0 : _m.QuestFloatingIslands) == null ? void 0 : _n.hunting_site_atts) == null ? void 0 : _o.is_vault_island) && // is SP.
((_s = (_r = (_q = (_p = user.quests) == null ? void 0 : _p.QuestFloatingIslands) == null ? void 0 : _q.hunting_site_atts) == null ? void 0 : _r.island_mod_panels[2]) == null ? void 0 : _s.is_complete))) {
reminderOpts.text = "Bottled Wind is <strong>not</strong> active.";
reminderOpts.image = "https://www.mousehuntgame.com/images/ui/hud/floating_islands/items/bottled_wind_stat_item.png?asset_cache_version=2";
reminderOpts.button = "Activate";
reminderOpts.action = () => {
const button = document.querySelector(".floatingIslandsHUD-fuel-button");
if (button) {
button.click();
}
};
}
break;
case "foreword_farm":
case "prologue_pond":
case "table_of_contents":
if (((_u = (_t = user.quests) == null ? void 0 : _t.QuestProloguePond) == null ? void 0 : _u.is_fuel_enabled) || ((_w = (_v = user.quests) == null ? void 0 : _v.QuestForewordFarm) == null ? void 0 : _w.is_fuel_enabled) || ((_y = (_x = user.quests) == null ? void 0 : _x.QuestTableOfContents) == null ? void 0 : _y.is_fuel_enabled)) {
reminderOpts.text = "Condensed Creativity is active.";
reminderOpts.button = "Deactivate";
} else {
reminderOpts.text = "Condensed Creativity is <strong>not</strong> active.";
reminderOpts.button = "Activate";
}
reminderOpts.image = "https://www.mousehuntgame.com/images/items/stats/transparent_thumb/4f5d55c1eff77474c7363f0e52d03e49.png?cv=2";
reminderOpts.action = hg.views.HeadsUpDisplayFolkloreForestRegionView.toggleFuel;
break;
case "winter_hunt_grove":
case "winter_hunt_workshop":
case "winter_hunt_fortress":
if (((_A = (_z = user.quests) == null ? void 0 : _z.QuestCinnamonTreeGrove) == null ? void 0 : _A.is_fuel_enabled) || ((_C = (_B = user.quests) == null ? void 0 : _B.QuestGolemWorkshop) == null ? void 0 : _C.is_fuel_enabled) || ((_E = (_D = user.quests) == null ? void 0 : _D.QuestIceFortress) == null ? void 0 : _E.is_fuel_enabled)) {
reminderOpts.text = "Festive Spirit is active.";
reminderOpts.button = "Deactivate";
} else if ("winter_hunt_forest" === getCurrentLocation()) {
reminderOpts.text = "Festive Spirit is <strong>not</strong> active.";
reminderOpts.button = "Activate";
}
reminderOpts.image = "https://www.mousehuntgame.com/images/items/stats/large/cda292833fce3b65b7a6a38c000e8620.png?cv=2";
reminderOpts.action = () => {
const toggle = document.querySelector(".headsUpDisplayWinterHuntRegionView__fuelButton");
if (toggle) {
toggle.click();
}
};
}
if (reminderOpts.text) {
showHornMessage(reminderOpts);
}
};
reminders_default = addReminders;
}
});
// src/data/environments-events.json
var environments_events_default;
var init_environments_events = __esm({
"src/data/environments-events.json"() {
environments_events_default = [
{
id: "winter_hunt_grove",
name: "Cinnamon Hill",
image: "https://www.mousehuntgame.com/images/environments/9116f87ec4f9ef3be13a1a833a61aec4.jpg?cv=2",
region: "events"
},
{
id: "winter_hunt_workshop",
name: "Golem Workshop",
image: "https://www.mousehuntgame.com/images/environments/bbd5eeca404e57ec2ffb9d9a108361a2.jpg?cv=2",
region: "events"
},
{
id: "winter_hunt_fortress",
name: "Ice Fortress",
image: "https://www.mousehuntgame.com/images/environments/15d8d9d837b22b31707d06f412b78e0d.jpg?cv=2",
region: "events"
}
];
}
});
// src/modules/better-travel/travel-menu.css
var travel_menu_default;
var init_travel_menu = __esm({
"src/modules/better-travel/travel-menu.css"() {
travel_menu_default = ".mh-improved-travel-window.greatWinterHuntGolemDestinationView{padding:10px 0}.mh-improved-travel-window .greatWinterHuntGolemDestinationView__content{align-items:flex-start;margin-right:5px;background-color:transparent}.mh-improved-travel-window .greatWinterHuntGolemDestinationView__environmentsScroller{height:auto;min-height:425px;max-height:50vh;padding:0 0 10px 5px;margin-right:-5px}.mh-improved-travel-window .greatWinterHuntGolemDestinationView__regionEnvironments{gap:15px 6px;justify-content:space-between}.mh-improved-travel-window .greatWinterHuntGolemDestinationView__regionsContainer{display:none}.mh-improved-travel-window .greatWinterHuntGolemDestinationView__regionName{margin:10px 0;font-size:16px;text-align:center;border:none}.mh-improved-travel-window .greatWinterHuntGolemDestinationView__environment{width:150px;overflow:hidden;border:1px solid #b4a481;box-shadow:0 2px 2px #7e7e7e}.mh-improved-travel-window .greatWinterHuntGolemDestinationView__regionGroup{margin:0}.mh-improved-travel-window .greatWinterHuntGolemDestinationView__environmentName{position:absolute;right:0;left:0;z-index:2;height:20px;background-color:#ffffffe5;border-radius:0;transition:all .2s ease-in-out}.mh-improved-travel-window .greatWinterHuntGolemDestinationView__environmentName span{padding:5px;text-align:center}.mh-improved-travel-window .greatWinterHuntGolemDestinationView__environmentImage{border-radius:0;transition:all .2s ease-in-out}.mh-improved-travel-window .greatWinterHuntGolemDestinationView__environment:hover .greatWinterHuntGolemDestinationView__environmentImage,.mh-improved-travel-window .greatWinterHuntGolemDestinationView__environment:focus .greatWinterHuntGolemDestinationView__environmentImage{background-position-y:30%}.mh-improved-travel-window .greatWinterHuntGolemDestinationView__environment:hover .greatWinterHuntGolemDestinationView__environmentName,.mh-improved-travel-window .greatWinterHuntGolemDestinationView__environment:focus .greatWinterHuntGolemDestinationView__environmentName{background-color:#fff}.mh-improved-travel-window .greatWinterHuntGolemDestinationView__environment[data-environment-type=train_station] .greatWinterHuntGolemDestinationView__environmentName span{font-size:10px}.mh-improved-travel-window-footer{position:absolute;bottom:20px;display:flex;gap:10px;align-items:center;width:330px}.mh-improved-travel-window-edit{padding:0 15px;font-weight:400;line-height:24px}.mh-improved-travel-window--editing{border-radius:5px;outline:3px solid #f37c7c}.mh-improved-travel-window-description,.mh-improved-travel-window-hidden{display:none}.mh-improved-travel-window--editing .mh-improved-travel-window-hidden{display:block;filter:grayscale(1);opacity:.4}.mh-improved-travel-window--editing .mh-improved-travel-window-description{display:inline-block}\n";
}
});
// src/modules/better-travel/travel-window.js
var getHiddenLocations, toggleLocation, hideLocation, unhideLocation, isLocationHidden, openTravelWindow, isEditing, environments2, makeMenuItem2, addEnvironmentIconListener, travel_window_default;
var init_travel_window = __esm({
"src/modules/better-travel/travel-window.js"() {
init_sentry_release_injection_stub();
init_utils4();
init_utils4();
init_environments_events();
init_travel_utils();
init_travel_menu();
getHiddenLocations = () => {
return getTravelSetting("travel-window-hidden-locations", []);
};
toggleLocation = (location) => {
if (isLocationHidden(location)) {
unhideLocation(location);
} else {
hideLocation(location);
}
};
hideLocation = (location) => {
const hiddenLocations = getHiddenLocations();
if (hiddenLocations.includes(location)) {
return;
}
hiddenLocations.push(location);
saveTravelSetting("travel-window-hidden-locations", hiddenLocations);
};
unhideLocation = (location) => {
const hiddenLocations = getHiddenLocations();
if (!hiddenLocations.includes(location)) {
return;
}
hiddenLocations.splice(hiddenLocations.indexOf(location), 1);
saveTravelSetting("travel-window-hidden-locations", hiddenLocations);
};
isLocationHidden = (location) => {
const hiddenLocations = getHiddenLocations();
return hiddenLocations.includes(location);
};
openTravelWindow = () => __async(void 0, null, function* () {
debug("Opening travel window");
const regions2 = [
{ type: "gnawnia", name: "Gnawnia" },
{ type: "valour", name: "Valour" },
{ type: "whisker_woods", name: "Whisker Woods" },
{ type: "burroughs", name: "Burroughs" },
{ type: "furoma", name: "Furoma" },
{ type: "bristle_woods", name: "Bristle Woods" },
{ type: "tribal_isles", name: "Tribal Isles" },
{ type: "varmint_valley", name: "Varmint Valley" },
{ type: "desert", name: "Sandtail Desert" },
{ type: "rodentia", name: "Rodentia" },
{ type: "queso_canyon", name: "Queso Canyon" },
{ type: "zokor_zone", name: "Hollow Heights" },
{ type: "folklore_forest", name: "Folklore Forest" },
{ type: "riftopia", name: "Rift Plane" }
];
environments2 = yield getData("environments");
environments2 = [...environments2, ...environments_events_default];
const currentEnvironment = environments2.find((e) => e.id === getCurrentLocation());
const locationsToRemove = [
"forbidden_grove"
];
environments2 = environments2.map((env) => {
if (!isUserTitleAtLeast(env.title)) {
locationsToRemove.push(env.id);
}
return env;
});
environments2 = environments2.filter((env) => !locationsToRemove.includes(env.id));
let content = '<div class="mh-improved-travel-window greatWinterHuntGolemDestinationView"><div class="greatWinterHuntGolemDestinationView__content">';
content += '<div class="greatWinterHuntGolemDestinationView__regionsContainer">';
for (const region of regions2) {
let buttonClass = "greatWinterHuntGolemDestinationView__regionButton";
if (currentEnvironment.region === region.type) {
buttonClass += " greatWinterHuntGolemDestinationView__regionButton--active";
}
content += `<button class="${buttonClass}" data-region-type="${region.type}">${region.name}</button>`;
}
content += "</div>";
const hasTitles = false;
content += '<div class="greatWinterHuntGolemDestinationView__environmentsContainer"><div class="greatWinterHuntGolemDestinationView__environmentsScroller"><div class="greatWinterHuntGolemDestinationView__regionList">';
if (!hasTitles) {
content += `<div class="greatWinterHuntGolemDestinationView__regionGroup" data-region-type="all">
<div class="greatWinterHuntGolemDestinationView__regionEnvironments">`;
}
for (const region of regions2) {
if (hasTitles) {
content += `<div class="greatWinterHuntGolemDestinationView__regionGroup" data-region-type="${region.type}">
<div class="greatWinterHuntGolemDestinationView__regionName">${region.name}</div>
<div class="greatWinterHuntGolemDestinationView__regionEnvironments">`;
}
const regionEnvironments = environments2.filter((e) => e.region === region.type);
regionEnvironments.forEach((environment) => {
let envButtonClass = "greatWinterHuntGolemDestinationView__environment";
if (currentEnvironment.id === environment.id) {
envButtonClass += " greatWinterHuntGolemDestinationView__environment--active";
}
if (isLocationHidden(environment.id)) {
envButtonClass += " mh-improved-travel-window-hidden";
}
content += `<button class="${envButtonClass}" data-environment-type="${environment.id}">
<div class="greatWinterHuntGolemDestinationView__environmentName">
<span>${environment.name}</span>
</div>
<div class="greatWinterHuntGolemDestinationView__environmentImage" style="background-image:url(${environment.headerImage});" data-environment-type="${environment.id}"></div>
</button>`;
});
if (hasTitles) {
content += "</div></div>";
}
}
if (!hasTitles) {
content += "</div></div>";
}
content += "</div></div></div>";
content += "</div>";
content += `<div class="mh-improved-travel-window-footer">
<div class="mh-improved-travel-window-edit mousehuntActionButton"><span>Edit</span></div>
<div class="mh-improved-travel-window-description">Click on a location to toggle the visibility.</div>
</div>`;
content += "</div>";
const popup = createPopup({
id: "mh-improved-travel-window",
title: "",
content,
className: "mh-improved-travel-window-popup jsDialogFixed",
show: false
});
popup.setOffsetHeight(0);
popup.setPersistentOffsetHeight(0);
popup.setIsModal(false);
popup.show();
const travelWindow = document.querySelector(".mh-improved-travel-window");
if (!travelWindow) {
return;
}
const editButton = document.querySelector(".mh-improved-travel-window-edit");
if (!editButton) {
return;
}
const editButtonSpan = editButton.querySelector("span");
if (!editButtonSpan) {
return;
}
const environmentButtons = document.querySelectorAll(".greatWinterHuntGolemDestinationView__environment");
if (!environmentButtons) {
return;
}
editButton.addEventListener("click", () => {
isEditing = !isEditing;
if (isEditing) {
travelWindow.classList.add("mh-improved-travel-window--editing");
editButtonSpan.textContent = "Save";
editButton.classList.add("active");
} else {
travelWindow.classList.remove("mh-improved-travel-window--editing");
editButtonSpan.textContent = "Edit";
editButton.classList.remove("active");
}
});
environmentButtons.forEach((button) => {
const environmentType = button.getAttribute("data-environment-type");
button.addEventListener("click", () => {
if (isEditing) {
toggleLocation(environmentType);
button.classList.toggle("mh-improved-travel-window-hidden");
} else {
debug(`Traveling to ${environmentType}`);
app.pages.TravelPage.travel(environmentType);
hg.utils.PageUtil.setPage("Camp");
popup.hide();
}
});
});
onDialogHide(() => {
isEditing = false;
});
});
isEditing = false;
environments2 = [];
makeMenuItem2 = () => {
addSubmenuItem({
id: "mh-improved-travel-window",
menu: "travel",
label: "Travel Window",
icon: "https://www.mousehuntgame.com/images/ui/hud/menu/special.png?asset_cache_version=2",
callback: () => {
openTravelWindow();
}
});
};
addEnvironmentIconListener = () => {
const environmentIcon = document.querySelector(".mousehuntHud-environmentIcon");
if (!environmentIcon) {
return;
}
environmentIcon.addEventListener("click", () => {
openTravelWindow();
});
};
travel_window_default = () => __async(void 0, null, function* () {
addStyles(travel_menu_default);
makeMenuItem2();
if (getSetting("better-travel-travel-window-environment-icon", true)) {
addEnvironmentIconListener();
}
onEvent("mh-improved-open-travel-window", openTravelWindow);
environments2 = yield getData("environments");
});
}
});
// src/modules/better-travel/settings/index.js
function settings_default8(module) {
addMhuiSetting(
"better-travel-default-to-simple-travel",
"Show Simple Travel tab by default",
false,
"Show the Simple Travel tab by default instead of the map when going to the Travel page.",
module
);
addMhuiSetting(
"better-travel-show-alphabetized-list",
"Show Alphabetized List",
false,
"Show an alphabetized list of locations on the top of the Simple Travel page.",
module
);
addMhuiSetting(
"better-travel-show-reminders",
"Show Travel Reminders",
true,
"Show reminders about active resources when visiting certain locations.",
module
);
addMhuiSetting(
"better-travel-travel-window",
"Travel Window",
true,
"Open the travel window to browse locations to travel to.",
module
);
addMhuiSetting(
"better-travel-travel-window-environment-icon",
"Environment icon opens Travel Window",
true,
"Clicking on the environment icon will open the Travel Window.",
module
);
}
var init_settings9 = __esm({
"src/modules/better-travel/settings/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
}
});
// src/modules/better-travel/styles.css
var styles_default13;
var init_styles14 = __esm({
"src/modules/better-travel/styles.css"() {
styles_default13 = '.travelPage-map-spacer,.travelPage-map-simpleToggle,.mousehuntHud-page-tabContent.map.full .travelPage-map-simpleToggle.full,.mousehuntHud-page-tabContent.map.full .travelPage-map-prefix.full{display:none}.travelPage-regionMenu{width:22%;overflow:scroll}.travelPage-map-environment-detailContainer{left:22%;width:78%}.travelPage-regionMenu-environmentLink.active{color:#000;background:#a4cafc}.travelPage-regionMenu-stats{color:#4d4d4d;background-color:#d8d8d8}.travelPage-regionMenu-numFriends{padding:0;background:none}.travelPage-mapContainer.full{height:auto;min-height:800px;max-height:900px;border:none}.travelPage-map-imageContainer{width:78%}.travelPage-map-zoomContainer{bottom:300px;transform:scale(1.5)}.travelPage-map-image-environment-name{top:70px;z-index:15;font-size:22px;font-variant:none;text-shadow:1px 1px #000,0 0 10px #000,8px 12px 9px #000}.travelPage-map-image-environment.locked .travelPage-map-image-environment-status{z-index:1;opacity:.5}.travelPage-map-image-environment-star{z-index:10}.travelPage-map-image-environment-button{top:100px;transform:scale(1.2)}.travelPage-regionMenu-environmentLink.mystery{display:inline-block;color:#9e9e9e;pointer-events:none}.travelPage-regionMenu-item[data-region=riftopia],.travelPage-regionMenu-item[data-region=riftopia] .travelPage-regionMenu-item-contents{display:block!important}.travelPage-regionMenu-regionLink:hover,.travelPage-regionMenu-regionLink:focus{cursor:unset}#mh-simple-travel-page .travelPage-map-prefix{display:block}#mh-simple-travel-page .travelPage-regionMenu{display:grid;grid-template-columns:repeat(5,1fr);width:100%;margin-bottom:10px;overflow:visible;background-color:transparent}#mh-simple-travel-page .travelPage-regionMenu-item{box-sizing:border-box;margin:1px;background-color:#e2e2e2;border:1px solid #4c71b4}#mh-simple-travel-page .travelPage-regionMenu-item[data-region=gnawnia],#mh-simple-travel-page .travelPage-regionMenu-item[data-region=valour],#mh-simple-travel-page .travelPage-regionMenu-item[data-region=whisker_woods],#mh-simple-travel-page .travelPage-regionMenu-item[data-region=burroughs],#mh-simple-travel-page .travelPage-regionMenu-item[data-region=furoma]{min-height:215px}#mh-simple-travel-page .travelPage-regionMenu-item[data-region=riftopia]{min-height:250px}#mh-simple-travel-page .travelPage-regionMenu-environments{width:145px;padding-left:2px;box-shadow:none}#mh-simple-travel-page .travelPage-regionMenu-item-contents{overflow:visible!important}#mh-simple-travel-page .travelPage-regionMenu-environmentLink.active{color:#4e6081}#mh-simple-travel-page .travelPage-regionMenu-environmentLink:hover,#mh-simple-travel-page .travelPage-regionMenu-environmentLink:focus{color:#fff;background-color:#6383bf}.huntersHornView__messageContent strong{font-weight:900}#mh-simple-travel-page .travelPage-alpha-wrapper .travelPage-regionMenu{display:block;width:100%}#mh-simple-travel-page .travelPage-alpha-wrapper .travelPage-regionMenu-environments{display:flex;flex-flow:column wrap;align-items:stretch;justify-content:flex-start;width:754px;height:425px;padding:4px 1px}#mh-simple-travel-page .travelPage-alpha-wrapper a.travelPage-regionMenu-environmentLink{width:112px;margin-left:1px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mhui-region-travel-item .icon{border-radius:5px}.mousehuntHud-menu ul li ul li.mhui-region-travel-item a .icon{top:6px;left:3px;width:22px;height:22px}#mh-simple-travel-page .travelPage-regionMenu .travelPage-regionMenu-environmentLink.active.highlight{margin-right:-3px;border-right:1px solid #4c71b4}#mh-simple-travel-page .travelPage-alpha-wrapper .travelPage-regionMenu-environmentLink.active.highlight{margin-right:0;border-right:none;border-radius:3px}.travelPage-regionMenu-environmentLink.relic-hunter-is-here:after{position:absolute;top:5px;right:5px;display:none;width:20px;height:20px;content:"";background-image:url(https://www.mousehuntgame.com/images/mice/thumb/d6980f1b00ff8ec688804706cba9370c.gif?cv=2);background-repeat:no-repeat;background-size:contain;border-radius:5px}.travelPage-regionMenu-environments:hover .travelPage-regionMenu-environmentLink.relic-hunter-is-here:after,.travelPage-regionMenu-environments:focus .travelPage-regionMenu-environmentLink.relic-hunter-is-here:after,.travelPage-regionMenu-environmentLink.relic-hunter-is-here:hover:after,.travelPage-regionMenu-environmentLink.relic-hunter-is-here:focus:after{display:block}.travelPage-regionMenu-environmentLink.relic-hunter-is-here{background-color:#e0f2d5}.mousehuntHud-page-tabContent.simple-travel .travelPage-regionMenu-environmentLink.relic-hunter-is-here{margin:0;border:none;border-radius:6px;outline:1px solid #ccc}.travelPage-alpha-wrapper .relic-hunter-is-here .travelPage-regionMenu-environmentLink-image{margin-left:0}.travelPage-map-image-environment .map-relic-hunter-is-here-image{position:absolute;top:5px;left:5px;width:60px;height:60px;overflow:hidden;background:url(https://www.mousehuntgame.com/images/mice/thumb/d6980f1b00ff8ec688804706cba9370c.gif?cv=2);filter:hue-rotate(-326deg);background-repeat:no-repeat;background-size:contain;border-radius:50%;transform:rotate(-70deg)}.map-relic-hunter-is-here.travelPage-map-image-environment-pointer{top:41px;left:86px;z-index:9;filter:hue-rotate(326deg);transform:rotate(70deg)}#mh-simple-travel-page .first-letter:first-letter{font-size:12px;font-weight:900}#mh-simple-travel-page .travelPage-alpha-wrapper:hover .first-letter:first-letter{border-bottom:1px solid #4e6081}#mh-simple-travel-page .travelPage-regionMenu .travelPage-regionMenu-environmentLink.active.highlight.event-location,#mh-simple-travel-page .travelPage-regionMenu .travelPage-regionMenu-environmentLink.event-location{color:#c01dff}#mh-simple-travel-page .travelPage-regionMenu .travelPage-regionMenu-environmentLink.active.highlight.event-location:after,#mh-simple-travel-page .travelPage-regionMenu .travelPage-regionMenu-environmentLink.event-location:after{position:absolute;top:1px;left:4px;width:15px;height:15px;content:"";background-image:url(https://www.mousehuntgame.com/images/ui/camp/trap/star_favorite.png?asset_cache_version=2);filter:drop-shadow(0 0 1px #fff);background-repeat:no-repeat;background-size:contain}.travelPage-map-environment-detail-title .custom-favorite-button{margin-top:-1px;margin-left:10px}.mousehuntHud-menu ul li ul li.mh-improved-better-travel-favorites-divider{height:1px;pointer-events:none;background-color:#6c3d0e7f}.mh-improved-better-travel-favorite-location:after{position:absolute;top:6px;right:4px;bottom:0;display:block;width:20px;height:20px;content:"";background:url(https://www.mousehuntgame.com/images/ui/map/star_gold_320.png?asset_cache_version=2);background-size:contain;opacity:.3}.mh-improved-better-travel-favorite-location:hover:after,.mh-improved-better-travel-favorite-location:focus:after{opacity:.1}.mh-improved-better-travel-menu-item .name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mousehuntHud-environmentName{padding-top:0;margin-top:29px}\n';
}
});
// src/modules/better-travel/travel-menu-hiding.css
var travel_menu_hiding_default;
var init_travel_menu_hiding = __esm({
"src/modules/better-travel/travel-menu-hiding.css"() {
travel_menu_hiding_default = "ul.fast-travel-list>li:not(.custom-submenu-item){display:none}\n";
}
});
// src/modules/better-travel/index.js
var expandTravelRegions, travelClickHandler, cloneRegionMenu, addTab, addPage, addAlphabetizedList, addSimpleTravelPage, addSimpleTravel, getPreviousLocation, goToPreviousLocation, addToTravelDropdown, onTravelComplete, initSimpleTab, maybeSetTab, addRhToSimpleTravel, addRhToMap, maybeDoMapView, _tabHandler, listenTabChange, saveTravelLocation, getLocationFavorites, isLocationFavorite, saveLocationFavorites, addToLocationFavorites, removeFromLocationFavorites, addFavoriteButtonsToTravelPage, main12, environments3, init14, better_travel_default;
var init_better_travel = __esm({
"src/modules/better-travel/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
init_utils4();
init_travel_utils();
init_reminders();
init_travel_window();
init_environments_events();
init_settings9();
init_styles14();
init_travel_menu_hiding();
expandTravelRegions = () => {
if ("travel" !== getCurrentPage()) {
return;
}
const hud10 = document.querySelector("#mousehuntHud");
if (hud10) {
const hudHeight = hud10.offsetHeight + 30;
const map = document.querySelector(".travelPage-mapContainer.full");
if (map) {
map.style.height = `calc(100vh - ${hudHeight}px)`;
}
}
const regionHeaders = document.querySelectorAll(".travelPage-regionMenu-regionLink");
if (regionHeaders) {
regionHeaders.forEach((regionHeader) => {
regionHeader.setAttribute("onclick", "return false;");
});
}
const travelAreas = document.querySelectorAll(".travelPage-regionMenu-item");
if (travelAreas && travelAreas.length > 0) {
travelAreas.forEach((area) => {
area.classList.add("active");
area.classList.remove("contracted");
});
}
const locations = document.querySelectorAll(".travelPage-map-image-environment.active");
if (locations && locations.length > 0) {
locations.forEach((location) => {
location.addEventListener("mouseover", () => {
location.classList.add("highlight");
});
location.addEventListener("mouseout", () => {
setTimeout(() => {
location.classList.remove("highlight");
}, 1e3);
});
});
}
setTimeout(() => {
app.pages.TravelPage.zoomOut();
}, 500);
};
travelClickHandler = (event) => {
app.pages.TravelPage.travel(event.target.getAttribute("data-environment"));
hg.utils.PageUtil.setPage("Camp");
};
cloneRegionMenu = () => {
const regionMenu = document.querySelector(".travelPage-regionMenu");
if (!regionMenu) {
return;
}
const regionMenuClone = regionMenu.cloneNode(true);
const travelLinks = regionMenuClone.querySelectorAll(".travelPage-regionMenu-environmentLink");
if (travelLinks && travelLinks.length > 0) {
travelLinks.forEach((link) => {
link.setAttribute("onclick", "return false;");
link.addEventListener("click", travelClickHandler);
});
}
return regionMenuClone;
};
addTab = (id, label) => {
if ("travel" !== getCurrentPage()) {
return;
}
const exists = document.querySelector(`#mh-${id}-tab`);
if (exists) {
return;
}
const tabContainer = document.querySelector(".mousehuntHud-page-tabHeader-container");
if (!tabContainer) {
return;
}
const tab = makeElement("a", "mousehuntHud-page-tabHeader");
tab.id = `mh-${id}-tab`;
tab.setAttribute("data-tab", id);
tab.setAttribute("onclick", "hg.utils.PageUtil.onclickPageTabHandler(this); return false;");
makeElement("span", "", label, tab);
tabContainer.append(tab);
};
addPage = (id, content) => {
if ("travel" !== getCurrentPage()) {
return;
}
const exists = document.querySelector(`#mh-${id}-page`);
if (exists) {
return;
}
const pageContainer = document.querySelector(".mousehuntHud-page-tabContentContainer");
if (!pageContainer) {
return;
}
const page = makeElement("div", ["mousehuntHud-page-tabContent", id]);
page.id = `mh-${id}-page`;
page.setAttribute("data-tab", id);
if (content) {
page.append(content);
} else {
const blank = makeElement("div");
page.append(blank);
}
pageContainer.append(page);
};
addAlphabetizedList = (regionMenu) => {
const alphaWrapper = makeElement("div", "travelPage-alpha-wrapper");
const alphaContent = makeElement("div", "travelPage-regionMenu");
const alphaHeader = makeElement("div", ["travelPage-regionMenu-item", "active"]);
const alphaList = makeElement("div", "travelPage-regionMenu-item-contents");
const alphaListContent = makeElement("div", "travelPage-regionMenu-environments");
const links = regionMenu.querySelectorAll(".travelPage-regionMenu-environmentLink");
const sortedLinks = [...links].sort((a, b) => {
const aName = a.innerText;
const bName = b.innerText;
if (aName < bName) {
return -1;
}
if (aName > bName) {
return 1;
}
return 0;
});
let lastLetter = "";
sortedLinks.forEach((link) => {
const linkClone = link.cloneNode(true);
alphaListContent.append(linkClone);
linkClone.addEventListener("click", travelClickHandler);
const firstLetter = linkClone.innerText.charAt(0).toLowerCase();
if (firstLetter !== lastLetter) {
linkClone.classList.add("first-letter");
}
lastLetter = firstLetter;
const environment = environments3.find((env) => {
return env.id === link.getAttribute("data-environment");
});
if (!environment) {
linkClone.classList.add("event-location");
}
});
alphaList.append(alphaListContent);
alphaHeader.append(alphaList);
alphaContent.append(alphaHeader);
alphaWrapper.append(alphaContent);
return alphaWrapper;
};
addSimpleTravelPage = () => {
expandTravelRegions();
const wrapper = makeElement("div", "travelPage-wrapper");
if ("not-set" === getSetting("better-travel-default-to-simple-travel", "not-set")) {
const settingTip = makeElement("div", ["travelPage-map-prefix", "simple-travel-tip"], 'You can set this as the default travel tab in the <a href="https://www.mousehuntgame.com/preferences.php?tab=mousehunt-improved-settings">MouseHunt Improved settings</a>.');
wrapper.append(settingTip);
}
const regionMenu = cloneRegionMenu();
if (getSetting("better-travel-show-alphabetized-list", false)) {
wrapper.append(addAlphabetizedList(regionMenu));
}
wrapper.append(regionMenu);
addPage("simple-travel", wrapper);
};
addSimpleTravel = () => {
if ("travel" !== getCurrentPage()) {
return;
}
addTab("simple-travel", "Simple Travel");
addSimpleTravelPage();
};
getPreviousLocation = () => {
const previousLocation = getTravelSetting("previous-location", false);
if (previousLocation && previousLocation !== getCurrentLocation()) {
return environments3.find((environment) => {
return environment.id === previousLocation;
});
}
return false;
};
goToPreviousLocation = () => {
const previousLocation = getPreviousLocation();
if (previousLocation) {
app.pages.TravelPage.travel(previousLocation.id);
}
};
addToTravelDropdown = () => {
const currentLocation = getCurrentLocation();
environments3.push(...environments_events_default);
let currentRegion = environments3.find((environment) => {
return environment.id === currentLocation;
});
if (!currentRegion) {
currentRegion = environments_events_default.find((environment) => {
return environment.id === currentLocation;
});
if (!currentRegion) {
return;
}
}
const otherRegions = environments3.filter((environment) => {
if (!(environment == null ? void 0 : environment.region) || !(currentRegion == null ? void 0 : currentRegion.region)) {
return false;
}
return environment.region === currentRegion.region;
});
otherRegions.splice(otherRegions.findIndex((environment) => {
return environment.id === currentLocation;
}), 1);
const existingCustomSubmenuItems = document.querySelectorAll(".mh-improved-better-travel-menu-item");
if (existingCustomSubmenuItems) {
existingCustomSubmenuItems.forEach((item) => {
item.remove();
});
}
const previousLocation = getPreviousLocation();
if (previousLocation) {
addSubmenuItem({
menu: "travel",
label: `Back to ${previousLocation.name}`,
icon: "https://www.mousehuntgame.com/images/ui/puzzle/refresh.png",
callback: goToPreviousLocation,
class: "mh-improved-better-travel-menu-item mh-improved-better-travel-previous-location"
});
}
otherRegions.forEach((region) => {
if (region.id === currentLocation) {
return;
}
addSubmenuItem({
menu: "travel",
label: region.name,
icon: region.image,
callback: () => {
app.pages.TravelPage.travel(region.id);
},
class: "mh-improved-better-travel-menu-item mh-improved-better-travel-region-location"
});
});
const favorites = getLocationFavorites();
if (favorites && favorites.length > 0) {
addSubmenuDivider("travel", "mh-improved-better-travel-favorites-divider");
favorites.forEach((favorite) => {
const favoriteRegion = environments3.find((environment) => {
return environment.id === favorite;
});
if (favoriteRegion) {
addSubmenuItem({
menu: "travel",
label: favoriteRegion.name,
icon: favoriteRegion.image,
callback: () => {
app.pages.TravelPage.travel(favoriteRegion.id);
},
class: "mh-improved-better-travel-menu-item mh-improved-better-travel-favorite-location"
});
}
});
}
};
onTravelComplete = () => {
onEvent("travel_complete", () => {
saveTravelLocation();
setTimeout(() => {
if (getSetting("better-travel-show-reminders", true)) {
reminders_default();
}
addToTravelDropdown();
}, 250);
});
};
initSimpleTab = () => {
if ("simple-travel" === getCurrentTab()) {
const isActive = document.querySelector(".mousehuntHud-page-tabContent.simple-travel");
if (!isActive || isActive && isActive.classList.contains("active")) {
return;
}
hg.utils.PageUtil.setPageTab("simple-travel");
}
};
maybeSetTab = () => {
if ("travel" !== getCurrentPage()) {
return;
}
initSimpleTab();
if ("map" !== getCurrentTab()) {
return;
}
if (!getSetting("better-travel-default-to-simple-travel", false)) {
return;
}
hg.utils.PageUtil.setPageTab("simple-travel");
};
addRhToSimpleTravel = () => __async(void 0, null, function* () {
const location = yield getRelicHunterLocation();
if (!location) {
return;
}
const travelLink = document.querySelectorAll(`.travelPage-regionMenu-environmentLink[data-environment="${location.id}"]`);
if (!travelLink.length) {
return;
}
travelLink.forEach((link) => {
link.classList.add("relic-hunter-is-here");
});
});
addRhToMap = () => __async(void 0, null, function* () {
const location = yield getRelicHunterLocation();
if (!location) {
return;
}
const mapLocation = document.querySelector(`.travelPage-map-image-environment[data-environment-type="${location.id}"]`);
if (!mapLocation) {
return;
}
const rh = makeElement("div", ["map-relic-hunter-is-here", "travelPage-map-image-environment-pointer"]);
makeElement("div", ["map-relic-hunter-is-here-image", "travelPage-map-image-environment-pointer-image"], "", rh);
mapLocation.append(rh);
});
maybeDoMapView = () => {
if ("travel" !== getCurrentPage()) {
return;
}
if ("map" !== getCurrentTab()) {
return;
}
expandTravelRegions();
addRhToMap();
};
_tabHandler = null;
listenTabChange = () => {
if (_tabHandler) {
return;
}
_tabHandler = hg.utils.PageUtil.onclickPageTabHandler;
hg.utils.PageUtil.onclickPageTabHandler = (tab) => {
_tabHandler(tab);
maybeDoMapView();
};
};
saveTravelLocation = () => {
const isLocationDashboardRefreshing = sessionGet("doing-location-refresh");
if (isLocationDashboardRefreshing === "true") {
return;
}
const previousLocation = getTravelSetting("current-location", "not-set");
const currentLocation = getCurrentLocation();
if (currentLocation === previousLocation) {
return;
}
saveTravelSetting("previous-location", previousLocation);
saveTravelSetting("current-location", currentLocation);
};
getLocationFavorites = () => {
const faves = getTravelSetting("favorites", []);
const hasMigratedFaves = getTravelSetting("has-migrated-favorites", false);
if (!hasMigratedFaves) {
const lvFavesSettings = JSON.parse(localStorage.getItem("fast-travel-cache"));
const lvFaves = (lvFavesSettings == null ? void 0 : lvFavesSettings.locationList) || [];
if (lvFaves) {
const lvKeys = Object.keys(lvFaves);
lvKeys.forEach((key) => {
faves.push(key);
});
if (faves.length > 0) {
const uniqueFaves = [...new Set(faves)];
saveLocationFavorites(uniqueFaves);
}
getTravelSetting("has-migrated-favorites", true);
}
}
return faves;
};
isLocationFavorite = (type) => {
return getLocationFavorites().includes(type);
};
saveLocationFavorites = (favorites) => {
getTravelSetting("favorites", favorites);
};
addToLocationFavorites = (type) => {
if (!isLocationFavorite(type)) {
const faves = getLocationFavorites();
faves.push(type);
saveLocationFavorites(faves);
}
};
removeFromLocationFavorites = (type) => {
if (getLocationFavorites()) {
const faves = getLocationFavorites();
faves.splice(faves.indexOf(type), 1);
saveLocationFavorites(faves);
}
};
addFavoriteButtonsToTravelPage = () => __async(void 0, null, function* () {
const locations = document.querySelectorAll(".travelPage-map-environment-detailContainer .travelPage-map-environment-detail");
if (!locations) {
return;
}
const locationFavorites = getLocationFavorites();
locations.forEach((location) => {
const type = location.getAttribute("data-environment-type");
if (!type) {
return;
}
const isFavorite2 = locationFavorites.includes(type);
makeFavoriteButton({
id: `better-travel-favorite-${type}`,
target: location.querySelector(".travelPage-map-environment-detail-title"),
size: "small",
state: isFavorite2,
isSetting: false,
defaultState: false,
onActivate: () => {
addToLocationFavorites(type);
addToTravelDropdown();
},
onDeactivate: () => {
removeFromLocationFavorites(type);
removeSubmenuItem(type);
}
});
});
});
main12 = () => {
if (getSetting("better-travel-travel-window", true)) {
travel_window_default();
}
onNavigation(() => {
addSimpleTravel();
addRhToSimpleTravel();
addFavoriteButtonsToTravelPage();
}, {
page: "travel"
});
onPageChange({
travel: { show: maybeSetTab }
});
listenTabChange();
initSimpleTab();
maybeDoMapView();
onTravelComplete();
saveTravelLocation();
addToTravelDropdown();
onEvent("mh-improved-goto-previous-location", goToPreviousLocation);
};
environments3 = [];
init14 = () => __async(void 0, null, function* () {
const stylesJoined = [styles_default13];
if (!getFlag("no-travel-menu-hiding")) {
stylesJoined.push(travel_menu_hiding_default);
}
addStyles(stylesJoined);
environments3 = yield getData("environments");
main12();
});
better_travel_default = {
id: "better-travel",
name: "Better Travel",
type: "better",
default: true,
description: 'Adds locations in the current region to the Travel dropdown menu, a "Simple Travel" tab with a grid of locations, an optional alphabetized list, an indicator for where the Relic Hunter is.',
load: init14,
settings: settings_default8
};
}
});
// src/modules/better-ui/friends.js
var reorderBlocks, autofocusIdSearch, friends_default;
var init_friends = __esm({
"src/modules/better-ui/friends.js"() {
init_sentry_release_injection_stub();
init_utils4();
reorderBlocks = () => {
if ("friends" !== getCurrentPage()) {
return;
}
const reordered = document.querySelector(".mousehuntHud-page-subTabContent.community");
if (!reordered || reordered.getAttribute("data-reordered")) {
return;
}
const blocks = document.querySelectorAll(".friendsPage-community-channel");
if (!blocks || blocks.length < 3) {
return;
}
const block = blocks[2];
const parent = block.parentNode;
block.remove();
parent.insertBefore(block, parent.firstChild);
block.classList.add("friends-page-id-search");
const input = block.querySelector("input");
if (input) {
input.setAttribute("data-1p-ignore", "true");
}
reordered.setAttribute("data-reordered", "true");
};
autofocusIdSearch = () => {
const input = document.querySelector(".friendsPage-community-hunterIdForm-input");
if (!input) {
return;
}
input.focus();
};
friends_default = () => __async(void 0, null, function* () {
onNavigation(reorderBlocks, {
page: "friends"
});
onNavigation(autofocusIdSearch, {
page: "friends",
tab: "requests",
subtab: "community"
});
});
}
});
// src/modules/better-ui/hud.js
var showFullTitlePercent, replaceInboxClose, replaceKingdomLink, hud_default;
var init_hud = __esm({
"src/modules/better-ui/hud.js"() {
init_sentry_release_injection_stub();
showFullTitlePercent = () => __async(void 0, null, function* () {
const title = document.querySelector(".mousehuntHud-userStat.title");
if (!title) {
return;
}
const percent = title.getAttribute("title");
if (!percent) {
return;
}
const target = title.querySelector(".hud_titlePercentage");
if (!target) {
return;
}
const originalText = target.innerText;
title.addEventListener("mouseover", () => {
target.innerText = percent.includes("%") ? percent.split("%")[0] : percent;
});
title.addEventListener("mouseout", () => {
target.innerText = originalText;
});
});
replaceInboxClose = () => __async(void 0, null, function* () {
const template = hg.utils.TemplateUtil.getTemplate("ViewMousehuntHeader_inbox").replace('<a class="messengerUINotificationClose" href="#">X', '<a class="messengerUINotificationClose" href="#">\u2715');
hg.utils.TemplateUtil.addTemplate("ViewMousehuntHeader_inbox", template);
});
replaceKingdomLink = () => __async(void 0, null, function* () {
const kingdomLink = document.querySelector('.mousehuntHud-menu .kingdom a[href="https://www.mousehuntgame.com/forum.php"]');
if (!kingdomLink) {
return;
}
kingdomLink.href = "https://www.mousehuntgame.com/news.php";
kingdomLink.setAttribute("data-page", "News");
});
hud_default = () => __async(void 0, null, function* () {
showFullTitlePercent();
replaceInboxClose();
replaceKingdomLink();
});
}
});
// src/modules/better-ui/skins.js
var addSkinImages, addQuickLinksToTrap, skins_default;
var init_skins = __esm({
"src/modules/better-ui/skins.js"() {
init_sentry_release_injection_stub();
init_utils4();
addSkinImages = () => {
const items2 = document.querySelectorAll(".skin .campPage-trap-itemBrowser-items .campPage-trap-itemBrowser-item");
if (!items2) {
return;
}
items2.forEach((item) => __async(void 0, null, function* () {
if (item.getAttribute("data-rendered-image")) {
return;
}
const id = item.getAttribute("data-item-id");
if (!id) {
return;
}
item.setAttribute("data-rendered-image", true);
const hasItemData = sessionGet(`mh-ui-cache-item-${id}`);
let itemData = null;
if (hasItemData) {
itemData = JSON.parse(hasItemData);
} else {
itemData = yield getUserItems([id]);
if (!itemData || !itemData[0]) {
return;
}
sessionSet(`mh-ui-cache-item-${id}`, JSON.stringify(itemData));
}
const imageWrapper = document.createElement("div");
imageWrapper.classList.add("itembrowser-skin-image-wrapper");
const image = document.createElement("img");
image.classList.add("itembrowser-skin-image");
image.setAttribute("src", itemData[0].image_trap);
image.setAttribute("data-item-classification", "skin");
image.setAttribute("data-item-id", id);
image.addEventListener("click", (e) => {
e.preventDefault();
app.pages.CampPage.armItem(e.target);
});
imageWrapper.append(image);
item.insertBefore(imageWrapper, item.firstChild);
}));
};
addQuickLinksToTrap = () => {
const itemBrowser = document.querySelector(".campPage-trap-itemBrowser");
if (!itemBrowser) {
return;
}
const type = itemBrowser.classList.value.replace("campPage-trap-itemBrowser", "").trim();
if (!type) {
return;
}
if ("skin" === type) {
addSkinImages();
}
};
skins_default = () => __async(void 0, null, function* () {
onRequest(addQuickLinksToTrap, "ajax/users/gettrapcomponents.php");
onEvent("camp_page_toggle_blueprint", addQuickLinksToTrap);
onRequest(addSkinImages, "managers/ajax/users/changetrap.php", true);
});
}
});
// src/modules/better-ui/styles/adventure.css
var adventure_default;
var init_adventure = __esm({
"src/modules/better-ui/styles/adventure.css"() {
adventure_default = '.adventureBookBanner-container{padding-bottom:5px;margin-bottom:20px;overflow:hidden;line-height:16px;background-color:#fbf8f6;border:1px solid #d3cecb;border-radius:3px;box-shadow:inset -1px 1px 3px #d3cecb}.adventureBookBanner-adventureName,.mh-dark-mode .pageFrameView #mousehuntContainer.PageCamp .adventureBookBanner-adventureName{padding:15px 5px 0;margin-left:75px;font-size:15px;font-style:italic;font-weight:400;line-height:15px;color:#333;background:transparent;border-radius:0}.mh-dark-mode .adventureBookBanner-container{color:#000;background-color:#999;border:1px solid #d3cecb;border-radius:3px;box-shadow:inset -1px 1px 3px #888}.adventureBookBanner-adventureName span{display:none}.adventureBookBanner-goalContainer{right:0;left:0;display:flex;align-items:flex-start;justify-content:space-between;background:none;box-shadow:none}.adventureBookPopup-adventureContainer.highlight{box-shadow:none}.adventureBookBanner-adventureImage{background-image:none!important}.adventureBookBanner-goalPadding{margin-left:75px}.adventureBookBanner-goalImage{position:absolute;top:-25px;left:10px;width:60px;height:60px;outline:1px solid #ccc}.adventureBookBanner-goalName{width:auto;height:auto}.adventureBookBanner-goalEnvironment{display:inline}.adventureBookBanner-goalName-padding .adventureBookBanner-goalEnvironment:before{content:". "}.adventureBookBanner-moreInfo{position:absolute;right:5px;bottom:-6px;display:inline-block;width:auto;height:auto;padding:1px 1px 1px 10px;font-size:9px;color:#3b5998;background:none;box-shadow:none}.adventureBookBanner-goalName-padding{display:block;width:auto;height:auto}.adventureBookBanner-goalName-padding span{display:block}.adventureBookBanner-moreInfo:after{content:" \\2192"}.adventureBookBanner-container:hover .adventureBookBanner-moreInfo{color:#3b5998;text-decoration:underline;text-shadow:none;background:none;box-shadow:none}.adventureBookBanner-goalWrapper.multi_choice.spacer{min-width:30px}.adventureBookPopup-adventure-details-block.requirements .adventureBookPopup-adventure-details-block-step.incomplete{box-shadow:0 1px 2px 1px #5c1c1c}\n';
}
});
// src/modules/better-ui/styles/better-lucky-catch-icon.css
var better_lucky_catch_icon_default;
var init_better_lucky_catch_icon = __esm({
"src/modules/better-ui/styles/better-lucky-catch-icon.css"() {
better_lucky_catch_icon_default = ".journal .entry.luckycatchsuccess .journalimage:after{top:-5px;left:-5px;width:20px;height:20px;background:url(https://www.mousehuntgame.com/images/ui/camp/trap/stat_luck.png?asset_cache_version=2);background-repeat:no-repeat;background-size:cover}.journaltext .lucky:after{position:relative;top:3px;width:13px;height:13px;margin:0;background:url(https://www.mousehuntgame.com/images/ui/camp/trap/stat_luck.png?asset_cache_version=2);background-repeat:no-repeat;background-size:contain}\n";
}
});
// src/modules/better-ui/styles/corkboard.css
var corkboard_default;
var init_corkboard = __esm({
"src/modules/better-ui/styles/corkboard.css"() {
corkboard_default = '.treasureMapRootView .messageBoardView .messageBoardView-message-container-padding,.teamPage-messageBoard-corkboard .messageBoardView-message-container-padding,.PageHunterProfile .messageBoardView-message-container-padding{background:none}.treasureMapRootView .messageBoardView div.messageBoardView-message-container,.teamPage-messageBoard-corkboard div.messageBoardView-message-container,.hunterInfoView-wrapper div.messageBoardView-message-container{margin:0;background:#e9e1c6;border:1px solid #985f42;border-radius:10px;box-shadow:-1px 2px 1px #a59f8e}.teamPage-messageBoard-corkboard div.messageBoardView-message-container{background:#e2d6b5;border-color:#af9969;box-shadow:1px 1px 1px #e2d6b5 inset}.treasureMapRootView .messageBoardView div.messageBoardView-message-container,.teamPage-messageBoard-corkboard .messageBoardView-message-container{background:#eee;border-color:#ccc;border-radius:0;box-shadow:none}.mh-dark-mode .treasureMapRootView .messageBoardView div.messageBoardView-message-container,.mh-dark-mode .teamPage-messageBoard-corkboard .messageBoardView-message-container{background:#333;border-color:#0c0c0c}.treasureMapRootView .messageBoardView .messageBoardView-message,.teamPage-messageBoard-corkboard .messageBoardView-message,.hunterInfoView-corkBoardBlock .messageBoardView-message{background:#fff;border:1px solid #bea87b;border-radius:8px;box-shadow:none}.teamPage-messageBoard-corkboard .messageBoardView-message.new,.hunterInfoView-corkBoardBlock div.messageBoardView-message.new{border:1px solid #bea87b!important}.treasureMapRootView .messageBoardView div.messageBoardView-message.new{border:1px solid #ccc!important}.mh-dark-mode .treasureMapRootView .messageBoardView div.messageBoardView-message.new{background-color:#191919;border-color:#2c2c2c!important}.treasureMapRootView .messageBoardView input.messageBoardView-message-submit,.teamPage-messageBoard-corkboard input.messageBoardView-message-submit,.hunterInfoView-corkBoardBlock input.messageBoardView-message-submit{margin:6px 0}input.messageBoardView-message-submit,input.messageBoardView-message-submit[type=submit]{padding:2px 15px;line-height:18px;color:#000;text-shadow:0 0 1px #fff;background-color:#f4e830;border:1px solid #000;border-radius:4px;box-shadow:0 -5px 8px -2px #ffae00 inset,1px 1px 1px #eee}input.messageBoardView-message-submit:hover,input.messageBoardView-message-submit[type=submit]:hover,input.messageBoardView-message-submit:focus,input.messageBoardView-message-submit[type=submit]:focus{background-color:#fff600;box-shadow:inset 0 0 16px 2px #fffaab}.treasureMapRootView .messageBoardView .messageBoardView-message-description,.teamPage-messageBoard-corkboard .messageBoardView-message-description,.hunterInfoView-corkBoardBlock .messageBoardView-message-description{padding-top:12px}.treasureMapRootView .messageBoardView a.messageBoardView-message-image,.teamPage-messageBoard-corkboard a.messageBoardView-message-image,.hunterInfoView-corkBoardBlock a.messageBoardView-message-image{border:1px solid #ccc;box-shadow:none}.treasureMapRootView .messageBoardView a.messageBoardView-message-name,.teamPage-messageBoard-corkboard a.messageBoardView-message-name,.hunterInfoView-corkBoardBlock a.messageBoardView-message-name{display:block;padding-bottom:5px}.treasureMapRootView .messageBoardView .messageBoardView-message-submitted,.teamPage-messageBoard-corkboard .messageBoardView-message-submitted,.hunterInfoView-corkBoardBlock .messageBoardView-message-submitted{color:#767676}.treasureMapRootView .messageBoardView .messageBoardView-message-body,.teamPage-messageBoard-corkboard .messageBoardView-message-body,.hunterInfoView-corkBoardBlock .messageBoardView-message-body{font-size:11px;font-weight:400;line-height:16px;color:#454545}.treasureMapRootView .messageBoardView .messageBoardView-message:after,.teamPage-messageBoard-corkboard .messageBoardView-message:after,.hunterInfoView-corkBoardBlock .messageBoardView-message:after{display:none}.treasureMapRootView .messageBoardView .pagerView-section.previous .pagerView-link,.teamPage-messageBoard-corkboard .pagerView-section.previous .pagerView-link,.hunterInfoView-corkBoardBlock .pagerView-section.previous .pagerView-link{color:#525252}a.messageBoardView-message-image{background-position:center;background-size:cover}a.messageBoardView-message-delete{right:10px;color:transparent}a.messageBoardView-message-delete:after{font-size:16px;color:#e03a3a;content:"\\2715"}a.messageBoardView-message-delete:hover:after,a.messageBoardView-message-delete:focus:after{color:#b72929}.friendsProfileView-selfStats{padding-top:15px}.mh-dark-mode .pageFrameView .hunterInfoView-wrapper .hunterInfoView-left a.friendsProfileView-randomFriend,.mh-dark-mode .pageFrameView .hunterInfoView-wrapper .messageBoardView-title{color:#242424}.mh-dark-mode .treasureMapRootView .messageBoardView .messageBoardView-message-body,.mh-dark-mode .teamPage-messageBoard-corkboard .messageBoardView-message-body,.mh-dark-mode .hunterInfoView-corkBoardBlock .messageBoardView-message-body{background:#2e2e2e;border:1px solid #181818}.mh-dark-mode .treasureMapView .messageBoardView-message{background:#333}.mh-dark-mode .messageBoardView-message-submitted{color:#ccc}.mh-dark-mode.PageHunterProfile .pageFrameView .hunterInfoView-wrapper .hunterInfoView-left a.messageBoardView-message-delete{color:transparent}\n';
}
});
// src/modules/better-ui/styles/daily-draw.css
var daily_draw_default;
var init_daily_draw = __esm({
"src/modules/better-ui/styles/daily-draw.css"() {
daily_draw_default = '.dailydraw{display:grid;grid-template-columns:1fr 1fr;gap:10px;place-content:space-evenly center;place-items:stretch stretch;margin:0 auto}.drawPage-ballot{display:inline-flex;flex-direction:column;align-items:center;justify-content:center;float:none;margin:0}.drawPage-ballot .entries{background-color:#ffe8aa;border-radius:10px}.ballotEntry{display:flex;flex-direction:column;align-items:center;float:none;padding:0;margin:0;background-color:#ffe8aa}.dailydraw div[style="clear: both; padding-top: 10px;"],.dailydraw div[style="clear: both; padding-top: 20px;"]{display:none}.ballotEntry .prizeHeader{width:100%;padding:0;margin:0}.dailydraw h2,.ballotEntry .prizeHeader h3{width:auto;padding:10px;margin:0;font-size:15px;font-weight:400;background-color:transparent}.recentWinners,.socialBallots,.drawPage-ballot,.ballotEntry{border:1px solid #fc6}.drawPage-ballot img{width:150px}.recentWinners .draw{display:flex;float:none;width:auto;padding:10px}.recentWinners .draw img{width:60px}.prizeContent{display:flex;align-items:center;padding:10px}.ballotEntry .prizeContent .prizeDesc{float:none;line-height:20px}.ballotEntry .entryForm span,.ballotEntry .entryForm br{display:none}form#ballotPurchaseForm{position:relative;display:flex;flex-wrap:wrap;align-items:center;justify-content:center;width:a}.ballotEntry .entryForm .confirmTotal{margin:10px}div#ballotPurchase input{padding:2px 15px;margin-left:10px;color:#000;text-shadow:0 0 1px #fff;background-color:#f4e830;border:1px solid #000;border-radius:4px;box-shadow:0 -5px 8px -2px #ffae00 inset,1px 1px 1px #eee}div#ballotPurchase input:hover,div#ballotPurchase input:focus{background-color:#e4d50c}div#ballotConfirm input{height:25px;margin-left:10px!important}div#ballotConfirm{position:relative}div#ballotConfirm a{position:absolute;top:5px;right:-25px}div#ballotPurchase,div#ballotConfirm{width:110px;height:21px}.socialBallots p{padding:0 10px;line-height:16px}.recentWinners .draw:last-child{border-bottom:none}.PageDraw .flexibleDialogWarmBrown.shopDescription{height:25px;visibility:hidden}.flexibleDialogWarmBrown.shopDescription img{float:none}.flexibleDialogWarmBrown.shopDescription b{position:absolute;top:-40px;right:0;left:0;display:block;font-size:19px;color:#261900;text-align:center;text-shadow:0 1px 1px #fc6;visibility:visible}.recentWinners .draw .drawContent{display:flex;flex-direction:column;align-items:stretch;justify-content:space-around;float:none}.ballot_qty{text-align:center}div#ballotTotal:after{content:" gold"}div#ballotTotal.error:after{content:""}\n';
}
});
// src/modules/better-ui/styles/events.css
var events_default;
var init_events2 = __esm({
"src/modules/better-ui/styles/events.css"() {
events_default = ".MiniEventGiveawayCampHUD-popup-content-prize-name span{font-size:11px}.MiniEventGiveawayCampHud-popup-recruit-info{padding:10px;color:#939393}\n";
}
});
// src/modules/better-ui/styles/footer.css
var footer_default;
var init_footer = __esm({
"src/modules/better-ui/styles/footer.css"() {
footer_default = '.pageFrameView-footer{position:relative;display:flex;flex-flow:row wrap;align-items:center;justify-content:flex-start;margin:-40px 55px 0 70px;line-height:17px}.pageFrameView-footer a img{width:auto;max-height:25px;margin:5px 10px 0 0;opacity:.2;transition:.2s}.pageFrameView-footer a:nth-child(4){margin-right:auto}.pageFrameView-footer a:nth-child(4) img{filter:sepia(1);opacity:.7}.pageFrameView-footer:hover a img,.pageFrameView-footer:hover a:nth-child(4) img{filter:none;opacity:1}.pageFrameView-footer-linksContainer{display:block;width:auto;margin-right:auto;font-weight:900}.pageFrameView-footer br{display:none}.pageFrameView-footer-ad{position:absolute;right:-40px;bottom:-160px;left:-60px}.mousehuntFooter{position:relative;margin-top:0;border-top:none}.pageFrameView-content{border-bottom-right-radius:4px;border-bottom-left-radius:4px}.mousehuntFooter-image{display:flex;flex-direction:row-reverse;color:transparent;background:url(https://i.mouse.rip/footer.png?1) no-repeat top center;border-top:none;border-bottom:none;border-radius:5px}.mousehuntFooter-image:before{position:absolute;top:0;right:0;left:0;width:100%;height:44px;content:"";box-shadow:inset 0 -4px 7px -6px #755e40}.mousehuntFooter-toggleMobile{position:absolute;display:flex;align-items:center;width:0;height:0;color:transparent;opacity:.4;transition:.3s;transform-origin:center}.mousehuntFooter-toggleMobile:hover{opacity:1}.mousehuntFooter-toggleMobile:after{position:absolute;inset:-15px 0 0 -30px;display:block;width:28px;height:28px;padding:8px;margin:0;font-size:11px;font-weight:100;line-height:10px;color:#000;text-align:center;content:"";background-image:url(https://www.mousehuntgame.com/images/ui/hud/menu/camp.png?asset_cache_version=2);filter:grayscale(1);background-repeat:no-repeat;background-position:center;background-size:50%}\n';
}
});
// src/modules/better-ui/styles/friends.css
var friends_default2;
var init_friends2 = __esm({
"src/modules/better-ui/styles/friends.css"() {
friends_default2 = ".sendMapInvite .userInteractionButtonsView-button-buttonOptionContainer .userInteractionButtonsView-button-buttonOption-name{padding:3px 3px 8px;margin:-3px;font-size:10px;line-height:11px}.sendMapInvite .userInteractionButtonsView-button-buttonOptionContainer .userInteractionButtonsView-button-buttonOption-image{padding-top:2px;margin-top:2px}.sendMapInvite .mousehuntTooltip.top.tight.hasBuffer{font-size:11px}.sendMapInvite .userInteractionButtonsView-button-buttonOptionContainer .userInteractionButtonsView-button-buttonOption:before{background:none}.sendMapInvite .userInteractionButtonsView-button-buttonOptionContainer:hover .userInteractionButtonsView-button-buttonOption:hover .userInteractionButtonsView-button-buttonOption-image,.sendMapInvite .userInteractionButtonsView-button-buttonOptionContainer:hover .userInteractionButtonsView-button-buttonOption:hover .userInteractionButtonsView-button-buttonOption-name{background-color:#eaf6ea}.friendsPage-community-channel.friends-page-id-search{display:flex;align-items:center;justify-content:space-between;background-color:#dcf7ff;border:1px solid #a1a1a1;box-shadow:0 1px 2px -1px #b5b5b5}.friends-page-id-search .friendsPage-community-channel-text{display:none}.friends-page-id-search .friendsPage-community-channel-action{position:relative;right:0;margin:0}.friends-page-id-search input.friendsPage-community-hunterIdForm-input{width:175px;padding:5px;border:1px solid #767676}.friends-page-id-search .friendsPage-community-channel-hunterId{display:none}.friends-page-id-search label{padding:0}.friends-page-id-search form.friendsPage-community-hunterIdForm{display:flex;flex-direction:row;align-items:center;justify-content:flex-end}.friendsPage-friendRow-stat-label{display:none}.friendsPage-friendRow-stat.online .friendsPage-friendRow-stat-label{display:inline-block}.friendsPage-friendRow-stat.map span{width:180px}.friendsPage-friendRow-stat.points,.friendsPage-friendRow-stat.gold{width:16%}.friendsPage-friendRow-stat.map{width:28%}\n";
}
});
// src/modules/better-ui/styles/general.css
var general_default3;
var init_general3 = __esm({
"src/modules/better-ui/styles/general.css"() {
general_default3 = "#mousehuntContainer.PageCamp{background:url(https://i.mouse.rip/bg-wood.png);box-shadow:inset 0 0 8px #755e40}.campPage-trap-friendList.full,.campPage-trap-itemStats,.campPage-trap-trapEffectiveness,.campPage-trap-armedItem,.campPage-trap-armedItem.bait.active,.campPage-trap-armedItem.bait,.campPage-trap-armedItem.skin,.campPage-trap-armedItem.mh-favorite-setups-button{border:1px solid #d3cecb;border-radius:3px;box-shadow:-1px 1px 3px #d3cecb inset}.campPage-trap-itemStats{background-color:transparent}.campPage-trap-armedItem.bait.active{box-shadow:-1px -1px 1px #d3cecb inset}.campPage-trap-armedItem:hover,.campPage-trap-armedItem:focus,.campPage-trap-armedItem.inactive:hover,.campPage-trap-armedItem.inactive:focus,.campPage-trap-armedItem.active:hover,.campPage-trap-armedItem.active:focus{background-color:#e9e6df}.campPage-trap-armedItem.active,.campPage-trap-armedItem.skin.active{top:0}.mh-favorite-setups-button.campPage-trap-armedItem.active,.campPage-trap-armedItem.active{background-color:#e9e6df}.campPage-trap-friendList.full{background-color:#fbf8f6}.campPage-trap-armedItem.weapon .campPage-trap-armedItem-image,.campPage-trap-armedItem.base .campPage-trap-armedItem-image{background-position:-1px -1px;background-size:72px}span.campPage-trap-baitQuantity{right:-1px;bottom:-1px;border-color:#d3cecb;border-right:none;border-bottom:none}.mousehuntHud-page-tabContent.crafting .mousehuntHud-page-subTabContent{padding:none;background:none;border:none;box-shadow:none}.mousehuntHud-page-tabContent.crafting .mousehuntHud-page-subTabContent-margin{padding:0;border:none;box-shadow:none}.mousehuntHud-page-subTabContent-prefix-filter-options{border:1px solid #8595b0;border-radius:10px}.active.mousehuntHud-page-subTabContent-prefix-filter-option:first-child{border-top-left-radius:7px;border-bottom-left-radius:7px}.active.mousehuntHud-page-subTabContent-prefix-filter-option:last-child{border-top-right-radius:7px;border-bottom-right-radius:7px}a.mousehuntHud-page-subTabContent-prefix-filter-option{border:1px solid #8595b0;border-top:none;border-bottom:none}.mousehuntHud-page-subTabContent-prefix-filter-option:first-child,.mousehuntHud-page-subTabContent-prefix-filter-option:last-child{border:none}.mousehuntHud-page-subTabHeader.active span,.mousehuntHud-page-subTabHeader:hover span,.mousehuntHud-page-subTabHeader:focus span{color:#fff;background-color:#8595b0;box-shadow:none}.mousehuntHud-page-subTabHeader span{color:#3b5998;background:none;border-color:#3b5998}.mousehuntHud-page-subTabHeader-prefix,.mousehuntHud-page-subTabContent-prefix-filter span:first-child{display:none}.mousehuntHud-page-subTabHeader-container{text-align:center}.mousehuntHud-page-subTabContent-prefix.clear-block{margin-left:30px}.mouseCrownsView-group-mice.favourites>.empty~.empty{display:none}.scoreboardTableView-availableScoreboards{width:180px}.giftSelectorView-content-subtitle{padding:10px 0}.teamPage-memberRow-identity .teamPage-member-nameContainer{width:auto}.mousehuntArmNowButton.active{filter:hue-rotate(104deg)}.mousehuntArmNowButton.active:hover{filter:hue-rotate(104deg) brightness(1.2)}.mousehuntArmNowButton{filter:brightness(1)}.mousehuntArmNowButton:hover{filter:brightness(1.2)}.mousehuntHeaderView a.superBrie .quantity{font-weight:600}a.huntersHornView__horn.huntersHornView__horn--default.huntersHornView__horn--ready{will-change:transform;transition:all .2s .15s;transform-origin:left}a.huntersHornView__horn.huntersHornView__horn--default.huntersHornView__horn--ready:hover{transform:scale(1.1) rotate(359deg)}a.huntersHornView__horn.huntersHornView__horn--default.huntersHornView__horn--ready .huntersHornView__hornBannerImage{transition:all .6s}a.huntersHornView__horn.huntersHornView__horn--default.huntersHornView__horn--ready:hover .huntersHornView__hornBannerImage{filter:saturate(1.8)}.huntersHornView__hornImage{filter:drop-shadow(1px 1px 0 #fff) drop-shadow(-1px 1px 0 #fff) drop-shadow(1px -1px 0 #fff) drop-shadow(-1px -1px 0 #fff) drop-shadow(1px 4px 3px #6b6b6b)}.mousehuntHud-menu ul li ul li a .icon{top:5px;left:2px;width:22px;height:22px}.MiniEventRonzaChromeBitCampHUD-completeQuantity.MiniEventRonzaChromeBitCampHUD-chromeBitQuantity{padding:2px 3px;font-size:13px}.trapImageView-layer.limitedEdition{top:unset;bottom:-270px;left:-135px;background-size:200px}.trapImageView-layer.limitedEdition,.trapImageView-trapAura,.trapImageView-trapAura.active,.trapImageView-trapAura.inactive,.trapImageView-zoomButton{opacity:0;transition:opacity .2s ease-in-out}.trapImageView:hover .trapImageView-layer.limitedEdition,.trapImageView:hover .trapImageView-trapAura,.trapImageView:hover .trapImageView-trapAura.active,.trapImageView:hover .trapImageView-trapAura.inactive,.trapImageView:hover .trapImageView-zoomButton{opacity:1}a.trapImageView-zoomButton{top:85%}.mousehuntHud-page-subTabContent.group .header .mouseListView-categoryContent-subgroup-mouse-stats.catches,.mousehuntHud-page-subTabContent.group .header .mouseListView-categoryContent-subgroup-mouse-stats.misses{width:12%}.mousehuntHud-page-subTabContent.group .header .mouseListView-categoryContent-subgroup-mouse-stats.name{width:36%}.mousehuntHud-page-subTabContent.group .header .mouseListView-categoryContent-subgroup-mouse-stats.average_weight,.mousehuntHud-page-subTabContent.group .header .mouseListView-categoryContent-subgroup-mouse-stats.heaviest_catch{width:20%}.mousehuntHud-page-subTabContent.location .header .mouseListView-categoryContent-subgroup-mouse-stats.catches,.mousehuntHud-page-subTabContent.location .header .mouseListView-categoryContent-subgroup-mouse-stats.misses{width:13%}.mousehuntHud-page-subTabContent.location .header .mouseListView-categoryContent-subgroup-mouse-stats.average_weight,.mousehuntHud-page-subTabContent.location .header .mouseListView-categoryContent-subgroup-mouse-stats.heaviest_catch{width:15%;text-align:center}.hunterInfoView-idCardTooltipBox-content{min-width:80px;text-align:center}.journalThemeSelectorView-preview{min-height:785px}a.inventoryPage-tagDirectory-tag{border:1px solid #ccc;border-right:none}.inventoryPage-tagDirectory-tag:hover{background-color:#dfdcdc;box-shadow:0 0 1px #354661}.claimGiftPage{margin-top:0}.notificationMessageList .message img.profilePic{width:30px;height:30px}#OnboardArrow.onboardPopup.celebrationPopup .firstCatch .introPopupImage img{margin-top:0}#OnboardArrow.onboardPopup.celebrationPopup .firstCatch .content{padding-top:30px}#OnboardArrow.onboardPopup.celebrationPopup .firstCatch .introPopupContent h2{padding-bottom:30px}#OnboardArrow.onboardPopup.celebrationPopup .firstCatch .introPopupContent{font-size:14px}#OnboardArrow.onboardPopup.celebrationPopup .introPopupContent .clear-block img{float:none;margin-top:-10px;margin-left:-10px}#OnboardArrow.onboardPopup.celebrationPopup .closeButton{background:url(https://www.mousehuntgame.com/images/ui/buttons/continue.png?asset_cache_version=2) 0 0 no-repeat}@media only screen and (max-width: 1000px){body.hasSidebar .pageFrameView-column{background-color:#bad4ed!important}}.campPage-trap-blueprintContainer{border-color:#315871;border-width:1px;box-shadow:none}.campPage-trap-itemBrowser-item-description.shortDescription{margin-top:5px}.campPage-trap-itemBrowser-item-image:after{border-color:#ccc;box-shadow:2px 2px 3px -1px #cdc9c6 inset}.itemView-action-convertForm{font-size:13px}input.itemView-action-convert-quantity{padding:2px 5px;text-align:left}.menuItem.myProfile{display:none}.mousehuntHeaderView .menuItem.freeGifts,.mousehuntHeaderView-gameTabs.small .menuItem.freeGifts{padding-right:12px;padding-left:12px}.mousehuntHeaderView a.superBrie .getMore{top:4px}.mousehuntPage-loading{position:absolute;right:0;left:0;z-index:51;box-shadow:2px 2px 10px #999,-1px -1px 1px #ccc inset,0 0 25px 25px #ffffff7f}.mousehuntPage-content.hidden{display:block;margin-top:35px}.journalThemeSelectorView-preview .journalThemeSelectorView-preview-details{display:none}.journalThemeSelectorView-preview .journal>.content{padding:5px 10px!important}.mousehuntHud-page-subTabContent.trinket .mousehuntHud-page-subTabContent-prefix{display:none}\n";
}
});
// src/modules/better-ui/styles/gifts.css
var gifts_default;
var init_gifts = __esm({
"src/modules/better-ui/styles/gifts.css"() {
gifts_default = ".giftSelectorView-friendRow-returnImage{width:40px;height:40px;margin-top:-10px;margin-right:10px;background-color:transparent;background-size:cover;border:none;outline:none;box-shadow:none}.giftSelectorView-friendRow-action.disabled .giftSelectorView-friendRow-returnImage{box-shadow:none}.giftSelectorView-content-title{padding-bottom:5px 0}.giftSelectorView-claimWarning{padding:10px}#overlayPopup.dailyRewardPopup .todaysRewards .reward{width:100px;font-size:13px;transition:all .25s ease-in-out}.dailyRewardPopup .todaysRewards .reward img{width:100%;height:100%}.dailyRewardPopup .todaysRewards .reward .quantity{display:none}.dailyRewardPopup .progress .chest .image{transition:.2s}#overlayPopup.dailyRewardPopup .todaysRewards .reward:hover{margin-top:-15px;margin-bottom:15px;transform:scale(1.2)}.dailyRewardPopup .progress .chest:hover .image{transform:scale(1.1);transform-origin:bottom}.dailyRewardPopup .chest.active .image{filter:drop-shadow(0 3px 3px #faae4c)}.dailyRewardPopup h2:last-of-type{padding-top:0;margin-top:-15px}#overlayPopup.dailyRewardPopup .todaysRewards.day_1{padding-left:190px;background-image:url(https://i.mouse.rip/popup_todays_reward_day1_chest.png)}#overlayPopup.dailyRewardPopup .todaysRewards.day_2{background-image:url(https://i.mouse.rip/popup_todays_reward_day2_chest.png)}#overlayPopup.dailyRewardPopup .todaysRewards.day_5{background-image:url(https://i.mouse.rip/popup_todays_reward_day5_chest.png);background-size:222px 221px}#overlayPopup.dailyRewardPopup .progress .chest_1.open .image{background-image:url(https://i.mouse.rip/popup_todays_reward_day1_chest.png);background-size:cover}#overlayPopup.dailyRewardPopup .progress .chest_2.open .image{margin-left:-10px;background-image:url(https://i.mouse.rip/popup_todays_reward_day2_chest.png);background-size:cover}#overlayPopup.dailyRewardPopup .closed .status{filter:opacity(.5)}\n";
}
});
// src/modules/better-ui/styles/hud.css
var hud_default2;
var init_hud2 = __esm({
"src/modules/better-ui/styles/hud.css"() {
hud_default2 = ".mousehuntHud-userStat.bait:hover .label,.mousehuntHud-userStat.trinket:hover .label,.mousehuntHud-userStat.treasureMap:hover .label{position:absolute;top:7px;z-index:11;width:auto;padding:3px 10px 2px 0;background-image:url(https://www.mousehuntgame.com/images/ui/backgrounds/hud_bg_blue_repeating.png?asset_cache_version=2);border-radius:5px}.mousehuntHud-userStat.treasureMap:hover .label{padding-right:3px}.mousehuntHud-userStat.bait:hover .value,.mousehuntHud-userStat.trinket:hover .value,.mousehuntHud-userStat.treasureMap:hover .value{margin-top:14px}.mousehuntHud-environmentName{width:auto;overflow:visible;text-shadow:1px -2px 4px #d6c8a2,-1px 2px 4px #d6c8a2,1px -2px 4px #d6c8a2,-1px -1px 4px #d6c8a2;filter:drop-shadow(0 1px 1px #d6c8a2) drop-shadow(0 2px 1px #d6c8a2)}.mousehuntHud-userStatBar .profileImage{box-shadow:0 2px 2px 1px #0e2c4f}.mousehuntHud-userStat.title .shield{width:19px;height:19px;margin-top:-4px}.mousehuntHud-userStat .title-container span.label{position:absolute;top:2px;left:25px}.mousehuntHud-userStat .title-container{position:relative;min-height:15px}.mousehuntHud-titleProgressBar .dot,.mousehuntHud-titleProgressBar .wrapper .bar{opacity:.8;transition:all .4s ease-out}.mousehuntHud-userStat.title:hover .mousehuntHud-titleProgressBar .dot,.mousehuntHud-userStat.title:hover .mousehuntHud-titleProgressBar .wrapper .bar{opacity:1}.mousehuntHud-userStat.empty .icon{box-shadow:none}.mousehuntHud-page-tabHeader-container{margin-bottom:-1.5px}\n";
}
});
// src/modules/better-ui/styles/inbox.css
var inbox_default;
var init_inbox = __esm({
"src/modules/better-ui/styles/inbox.css"() {
inbox_default = '.notificationMessageList .message{padding:5px 10px}.notificationMessageList .message .clear-block{padding-top:5px}.notificationMessageList .message.ballot .clear-block{display:flex;flex-direction:row;align-items:center;order:5}.notificationMessageList .message.ballot img.item{height:25px;margin:-5px 5px 0 -5px}.notificationMessageList .message.ballot .date{flex-grow:1;order:2;font-size:9px;text-align:right;white-space:nowrap}.notificationMessageList .message.ballot.new .date{font-size:8px}.notificationMessageList .message.friend_invite_pending .clear-block{display:flex;align-items:center}.notificationMessageList .message .messageText{padding:5px 0}.message.notification.ballot,.message.notification.ballot.new{display:flex;flex-direction:row-reverse;align-items:center;justify-content:space-between;padding:10px 10px 10px 20px}.message.notification .actions.ballot{float:none}.notificationMessageList .message .actions.friendRequest,.notificationMessageList .message .actions.friendRequestAccepted{margin-top:10px}#messengerUINotification .tabs{display:flex;flex-direction:column}#messengerUINotification .tabs a[data-tab=general]{order:-500}#messengerUINotification .tabs a[data-tab=daily_draw]{order:-400}#messengerUINotification .tabs a[data-tab=friend_requests]{order:-300}#messengerUINotification .tabs a[data-tab=marketplace]{order:-200}#messengerUINotification .tabs a[data-tab=news]{order:-100}#messengerUINotification .notificationMessageList .tab{min-height:55vh;background-color:#f9f9f9}.mh-dark-mode #messengerUINotification .notificationMessageList .tab{background-color:#242424}div#messengerUINotification{background-color:#f9f9f9!important}#messengerUINotification .tabs a:hover{background-color:#eee}#messengerUINotification .tabs a .counter{background-color:#e33f3f;box-shadow:inset 0 0 5px 1px #a90000}#messengerUINotification .messengerUINotificationClose{top:-15px;right:-5px;box-sizing:border-box;display:flex;align-items:center;justify-content:center;width:25px;height:25px;padding:5px;font-size:14px;line-height:unset;color:#e03a3a;text-align:center;border-color:#d1d0cf}#messengerUINotification .messengerUINotificationClose:hover{color:#fff;background-color:#e03a3a}.journal.jsingle .close{float:none;padding:0;margin:0;background-color:transparent;border:none}.journal.jsingle .close a:after{position:absolute;top:5px;right:5px;z-index:15;box-sizing:border-box;display:flex;align-items:center;justify-content:center;width:25px;height:25px;padding:5px;font-size:14px;font-weight:700;line-height:unset;color:#e03a3a;text-align:center;content:"\\2715";background:#fff;border:1px solid #ccc;border-color:#d1d0cf;border-radius:20px}.giftSelectorView-inboxHeader-closeButton{position:absolute;top:3px;right:5px;z-index:15;box-sizing:border-box;display:flex;align-items:center;justify-content:center;width:23px;height:23px;padding:5px;font-size:12px;font-weight:700;line-height:unset;color:#e03a3a;text-align:center;content:"\\2715";background:#fff;border:1px solid #d1d0cf;border-color:#d1d0cf;border-radius:20px;box-shadow:inset 0 0 3px -1px #d1d0cf}.journal.jsingle .close a{display:block;width:0;height:0;color:transparent}.giftSelectorView-inboxHeader-closeButton:hover,.giftSelectorView-inboxHeader-closeButton:focus,.journal.jsingle .close a:hover:after,.journal.jsingle .close a:focus:after{color:#fff;background-color:#e03a3a}.giftSelectorView-inbox-footer-label{margin-top:-30px;text-align:left}#messengerUINotification .notificationMessageList .tab[data-tab=marketplace] .message .clear-block{order:1}#messengerUINotification .notificationMessageList .tab[data-tab=marketplace] .message .date{order:3;margin:10px}\n';
}
});
// src/modules/better-ui/styles/login.css
var login_default;
var init_login = __esm({
"src/modules/better-ui/styles/login.css"() {
login_default = ".loginPageContainer .loginFormContainer .scrollContainer .scrollingContainer .backButton{position:absolute;top:145px;left:30px;filter:hue-rotate(321deg)}.PageLogin .loginPageContainer .loginFormContainer .scrollContainer .scrollingContainer{position:relative}.PageLogin .pageFrameView-column.left,.PageLogin .pageFrameView-column.right{margin-bottom:0}.loginPageContainer .loginFormContainer .scrollContainer .scrollingContainer .fb-login-button div{margin-top:10px;margin-left:50px}\n";
}
});
// src/modules/better-ui/styles/overlays.css
var overlays_default;
var init_overlays = __esm({
"src/modules/better-ui/styles/overlays.css"() {
overlays_default = '#overlayPopup .imgArray{overflow:visible}#overlayPopup .button,.notificationMessageList .message .actions input[type=button],.notificationMessageList .message .actions input[value="View Profile"],.notificationMessageList .message .actions input[value="View Profile"].ignoreRequest.ignoreRequest{padding:2px 15px;line-height:18px;color:#000;text-shadow:0 0 1px #fff;background-color:#f4e830;border:1px solid #000;border-radius:4px;box-shadow:0 -5px 8px -2px #ffae00 inset,1px 1px 1px #eee}#overlayPopup .button:hover,#overlayPopup .button:focus,.notificationMessageList .message .actions input[type=button]:hover,.notificationMessageList .message .actions input[type=button]:focus,.notificationMessageList .message .actions input[value="View Profile"]:hover,.notificationMessageList .message .actions input[value="View Profile"]:focus,.notificationMessageList .message .actions input[value="View Profile"].ignoreRequest.ignoreRequest:hover,.notificationMessageList .message .actions input[value="View Profile"].ignoreRequest.ignoreRequest:focus{background-color:#e4d50c}#overlayPopup .button:hover,#overlayPopup .button:focus,.notificationMessageList .message .actions input[type=button]:hover,.notificationMessageList .message .actions input[type=button]:focus,.notificationMessageList .message .actions input[value="View Profile"]:hover,.notificationMessageList .message .actions input[value="View Profile"]:focus,.notificationMessageList .message .actions input[value="View Profile"].ignoreRequest:hover,.notificationMessageList .message .actions input[value="View Profile"].ignoreRequest:focus{background-color:#fff600;box-shadow:inset 0 0 16px 2px #fffaab}.notificationMessageList .message .actions input[type=button]{padding:1px 10px;font-size:12px;line-height:14px}.notificationMessageList .message .actions input[type=button].delete{position:absolute;left:-60px}.notificationMessageList .message input[type=button].delete,.notificationMessageList .message .actions input[type=button].ignoreRequest{padding:1px 10px;color:#000;text-shadow:0 0 1px #fff;background-color:#ffa5a5;border:1px solid #000;border-radius:4px;box-shadow:0 -5px 8px -2px #f27b6a inset,1px 1px 1px #eee}.notificationMessageList .message .actions input[type=button].delete:hover,.notificationMessageList .message .actions input[type=button].delete:focus,.notificationMessageList .message .actions input[type=button].ignoreRequest:hover,.notificationMessageList .message .actions input[type=button].ignoreRequest:focus{background-color:#f48686}.mouseView-categoryContent-subgroup-mouse-weaknesses-label{border-color:#33333357}#messengerUINotification .notificationMessageList .tab{max-height:75vh;overflow:auto}#overlayPopup .jsDialogContainer a.shopsPage-kingsCalibratorPromo-button{margin-top:20px;margin-left:10px}#overlayPopup .jsDialogContainer .content .itemImage[style="background-image:url(https://www.mousehuntgame.com/images/items/message_items/c6fa46d329c1c7436acad084773c05c6.jpg);"]{margin-right:10px}.kingsGiveawayCalibratorPopup-upgradeContainer{display:flex;flex-wrap:wrap;justify-content:center;margin:0 6px;box-shadow:none}.kingsGiveawayCalibratorPopup-upgrade.unlocked{background-color:#c8d2f2}.kingsGiveawayCalibratorPopup-tabHeaderContainer{margin:0 1px}.kingsGiveawayCalibratorPopup-tabHeader span{box-shadow:none}.kingsGiveawayCalibratorPopup-upgrade-day-name{padding-bottom:10px;margin-top:10px;font-size:14px;border-bottom:1px solid #ccc}.kingsGiveawayCalibratorPopup-upgrade-day-itemContainer:after{box-shadow:none}.kingsGiveawayCalibratorPopup-upgrade-day-item .itemImage{width:100px;height:100px;background-size:cover}.kingsGiveawayCalibratorPopup-upgrade-day-item-name{width:100%;margin-top:7px;font-size:13px;text-align:center}.kingsGiveawayCalibratorPopup-numCreditsContainer{position:absolute;top:30px;right:50px;float:none;margin-right:-10px;margin-left:10px;visibility:visible}.kingsGiveawayCalibratorPopup-numCredits{padding:7px}.kingsGiveawayCalibratorPopup-header{position:absolute;top:0;right:0;display:inline;visibility:hidden}span.kingsGiveawayCalibratorPopup-upgrade-action-cost{font-size:14px;vertical-align:middle}.kingsGiveawayCalibratorPopup-upgrade-action-kingsCredits{width:21px;height:21px;margin:0 4px;background-color:#fff;background-position:center;background-size:18px;box-shadow:none;opacity:.9}.kingsGiveawayCalibratorPopup-upgrade.locked .kingsGiveawayCalibratorPopup-upgrade-action.locked{display:flex;justify-content:space-evenly}.kingsGiveawayCalibratorPopup-upgrade.active{background-color:#a6d392;border:1px solid #55913b}.kingsGiveawayCalibratorPopup-upgrade.active .kingsGiveawayCalibratorPopup-upgrade-actionContainer{border-top:1px solid #55913b}.kingsGiveawayCalibratorPopup-upgrade-image{height:85px}.kingsGiveawayCalibratorPopup-upgrade.locked .kingsGiveawayCalibratorPopup-upgrade-image{filter:saturate(.3);opacity:.6}.kingsGiveawayCalibratorPopup-upgrade:hover .kingsGiveawayCalibratorPopup-upgrade-image{filter:none;opacity:1}.kingsGiveawayCalibratorPopup-upgrade{box-sizing:border-box;border:1px solid #ccc;box-shadow:none}.kingsGiveawayCalibratorPopup-upgrade-name{display:block;width:auto;margin:5px 0;text-align:center}.kingsGiveawayCalibratorPopup-upgrade-name span{display:inline-block;font-size:12px}.upgrade_gifts .kingsGiveawayCalibratorPopup-upgrade-description{font-size:14px}\n';
}
});
// src/modules/better-ui/styles/profile.css
var profile_default;
var init_profile = __esm({
"src/modules/better-ui/styles/profile.css"() {
profile_default = ".PageHunterProfile .campPage-trap-trapStat.power .icon{display:none}.PageHunterProfile .campPage-trap-trapStat.cheese_effect .value span{width:10px;font-size:11px}.hunterInfoView-wrapper .messageBoardView-title{height:30px;margin-bottom:-1px;font-size:14px;font-weight:700;line-height:30px;color:#772b0a;text-align:center;background:linear-gradient(#fff9dc 45%,#f1dc8a 55%);border:1px solid #985f42;border-bottom:1px solid #e9be6c;border-radius:10px 10px 0 0;box-shadow:-1px 2px 1px #a59f8e}.hunterInfoView-achievementsBlock .mousehuntTabHeaderContainer .mousehuntTabHeader{height:33px;margin-top:1px;margin-bottom:2px;font-size:14px;font-weight:700;line-height:30px;color:#ab755d;text-align:center;background:linear-gradient(#f6f3e2 45%,#fdf3cb 55%);border:1px solid #985f42;border-bottom:none;border-radius:10px 10px 0 0;box-shadow:-1px 1px 1px #a59f8e}.hunterInfoView-wrapper div.messageBoardView-message-container{border-bottom:0;border-top-left-radius:0;border-top-right-radius:0}.hunterInfoView-wrapper .hunterInfoView-achievementsBlock .mousehuntTabHeader span{margin:0;line-height:23px;background:none;border:none;box-shadow:none}.hunterInfoView-wrapper .hunterInfoView-achievementsBlock .mousehuntTabHeader:before{background:none;box-shadow:none}.hunterInfoView-achievementsBlock .mousehuntTabHeaderContainer .mousehuntTabHeader:first-child{margin-right:5px;margin-left:-10px}.hunterInfoView-achievementsBlock .mousehuntTabHeaderContainer .mousehuntTabHeader:last-child{margin-right:-10px;margin-left:5px}.hunterInfoView-wrapper .hunterInfoView-achievementsBlock .mousehuntTabContentContainer{background:#e9e1c6;border:1px solid #985f42;border-top-color:#e9be6c;border-radius:0 0 10px 10px;box-shadow:-1px 2px 1px #a59f8e}.hunterInfoView-achievementsBlock .mousehuntTabHeaderContainer .mousehuntTabHeader.active{color:#772b0a;background:linear-gradient(#fff9dc 45%,#f1dc8a 55%)}.hunterInfoView-achievementsBlock .mousehuntTabHeaderContainer .mousehuntTabHeader:hover,.hunterInfoView-achievementsBlock .mousehuntTabHeaderContainer .mousehuntTabHeader:focus{color:#772b0a;background:linear-gradient(#fff9dc 45%,#f1dc8a 55%)}.hunterInfoView-wrapper .hunterInfoView-achievementsBlock .mousehuntTabHeader:hover span{background:none}.hunterInfoView-achievementsBlock .mousehuntTabContentContainer-padding{background:#e9e1c6;border:none;box-shadow:none}.hunterInfoView-wrapper .hunterInfoView-treasureMaps-left-currentMap-image{width:55px;height:55px;border:none}.hunterInfoView-treasureMaps-left{vertical-align:middle}.hunterInfoView-wrapper .hunterInfoView-treasureMaps-left-currentMap-content{display:flex;flex-direction:row;align-items:center;height:50px}.hunterInfoView-wrapper .hunterInfoView-treasureMaps-right-cluesFound-ranking{width:110px;margin-top:10px;margin-bottom:-5px;font-size:11px;color:#772b0a}.hunterInfoView-treasureMaps-right{display:flex;flex-direction:column;align-items:center;margin-top:-10px;margin-right:-5px}.hunterInfoView-wrapper .hunterInfoView-treasureMaps-right-cluesFound{font-size:17px}.hunterInfoView-wrapper .hunterInfoView-treasureMaps-right-cluesFound-label{font-size:11px}.hunterInfoView-wrapper .hunterInfoView-achievementsBlock .itemImage{width:45px;height:45px;box-shadow:none}.hunterInfoView-wrapper .hunterInfoView-achievementsBlock .itemImage-container{display:block;padding:3px;background-color:#fff;border:1px solid #625d43}.hunterInfoView-wrapper .hunterInfoView-achievementsBlock .hunterInfoView-teamTab-content-wrapper{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-around;width:338px}.hunterInfoView-wrapper .hunterInfoView-achievementsBlock .hunterInfoView-teamTab-content .quantity{right:0;bottom:0;background-color:#fff}.hunterInfoView-wrapper .hunterInfoView-favoritesBlock .hunterInfoView-favoritesBlock-body{background:#e9e1c6}.hunterInfoView-wrapper .hunterInfoView-favoritesBlock-content-mouseImage.empty{background-color:#e9e1c6;border:1px solid #a0a0a0;box-shadow:none;opacity:.75}.hunterInfoView-wrapper .hunterInfoView-favoritesBlock-content-mouseImage{border-width:2px}.mouseCrownsView-group-mouse-catches{padding:2px 6px;margin-top:-5px;margin-bottom:5px;font-size:14px}.mouseCrownsView-group-mouse-name{font-size:11px}.mouseCrownsView-group-mouse.empty.highlight{display:none}.mouseCrownsView-group-mouse.highlight .mouseCrownsView-group-mouse-image{width:auto;height:200px}.mouseCrownsView-group-mouse.highlight .mouseCrownsView-group-mouse-image .mouseCrownsView-crown{top:0}.mouseCrownsView-group-mouse:hover .mouseCrownsView-group-mouse-image{background-size:120%}.mouseCrownsView-group-mouse.landscape .mouseCrownsView-group-mouse-image{background-size:cover;transition:.4s}.mouseCrownsView-group-mouse.landscape:hover .mouseCrownsView-group-mouse-image{background-size:auto 120%}.mouseCrownsView-group-mouse.highlight .mouseCrownsView-group-mouse-padding{padding:0;margin:0;border-radius:0}.highlight a.mouseCrownsView-group-mouse-favouriteButton.active{top:0;right:0}.mouseCrownsView-group-mouse-padding{padding:0;overflow:hidden}.mouseCrownsView-group-mice{display:grid;grid-template-columns:repeat(5,1fr);align-items:stretch;justify-content:start;max-width:720px}.mouseCrownsView-group-mice.favourites{gap:5px}.mouseCrownsView-group-header b{font-size:13px}.mouseCrownsView-group-header-subtitle{margin-left:10px}.mouseCrownsView-group-mouse{width:auto}.mouseCrownsView-group-mouse-image{width:100%;height:150px;border:none!important;border-bottom-right-radius:0;border-bottom-left-radius:0;transition:.2s}.bronze .mouseCrownsView-group-mouse{width:95px}.bronze .mouseCrownsView-group-mouse-image{height:130px}.none .mouseCrownsView-group-mouse-catches{font-size:12px}.none .mouseCrownsView-group-mouse{width:76px}.none .mouseCrownsView-group-mouse-image{height:102px}.mouseCrownsView-group{padding:10px;margin:10px;background-color:#f5f5f5;border-radius:5px;box-shadow:0 0 1px 1px #a7a7a7}.mouseCrownsView-group.platinum{background-color:#d6d6fb;box-shadow:0 0 1px 1px #7e6af9}.mouseCrownsView-group.gold{background-color:#fbf5ce;box-shadow:0 0 1px 1px #cfc791}.mouseCrownsView-group.silver{background-color:#d2e7fe;box-shadow:0 0 1px 1px #8fb9e6}.mouseCrownsView-group.bronze{background-color:#ffe6d4;box-shadow:0 0 1px 1px #d8af91}.mouseCrownsView-group-header{display:flex;align-items:center;padding-left:5px;border:none!important}.mouseCrownsView-group .mouseCrownsView-group-mouse-padding{background-color:#fff}.mouseCrownsView-group-mouse.highlight.favourite{width:auto;background-color:#fff;border:1px solid #ccc;border-radius:5px}.mouseCrownsView-group.favourite .mouseCrownsView-group-header .mouseCrownsView-crown,.mouseCrownsView-group.favourite .mouseCrownsView-group-header-name{display:none}.favourite .mouseCrownsView-group-header{padding:0;margin:0}.mouseCrownsView .toolBar{position:absolute;right:0;bottom:-28px;display:flex;gap:2px;align-items:center;justify-content:flex-end;float:none!important;padding:1px;background-color:#eaeaea;border:1px solid #a7a7a7;border-radius:5px}.mouseCrownsView .pt.event{border-radius:50%}.mouseCrownsView #copyCrownsButton{width:16px!important;height:16px!important;border:none}.mouseCrownsView .pt{position:absolute;top:3px;right:3px;padding:2px;background-color:#eee;border:1px solid #ccc;border-radius:50%}.mouseCrownsView button.ptbtn{font-size:13px!important;background-color:#9fcad8!important;border:1px solid #008cba}.mouseCrownsView button.ptbtn img{width:20px!important;height:20px!important}.mouseCrownsView #powerTypeBtns{display:flex;flex-direction:row;gap:5px}.mouseCrownsView-crown.powerCrown{background-size:contain!important}.hideLeContainer{position:absolute;top:-7px;right:35px;display:flex;align-items:center;width:auto!important}.hideLeContainer #hideLeCb{width:auto!important}.hideLeContainer label{font-size:10px!important}a.friendsProfileView-randomFriend{float:right;width:120px;margin-top:-25px;text-align:center;background-color:#e9e1c6;border:1px solid #a0a0a0}.friendsProfileView-selfStats{font-size:11px}.friendsProfileView-randomFriend:hover{background-color:#c7bfa3}.eggMasterIcon{position:absolute;top:0;right:-10px;float:none!important;width:40px!important;height:40px!important;filter:drop-shadow(2px 2px 2px #e9e1c6);background-size:cover!important}.mh-dark-mode.PageHunterProfile .pageFrameView .mouseCrownsView-group-mouse.highlight .mouseCrownsView-group-mouse-name,.mh-dark-mode.PageHunterProfile .pageFrameView .mouseCrownsView-group-mouse:not(.favourite) .mouseCrownsView-group-mouse-name,.mh-dark-mode.PageHunterProfile .pageFrameView .mouseCrownsView-group{color:#333}.hunterInfoView-wrapper .hunterInfoView-trapBlock-setup-trap-slot-noBait{display:flex;align-items:center;width:100%;height:100%;border:none;box-shadow:none}.hunterProfileItemsView-categoryContent-item-padding{height:auto;padding:0}.hunterProfileItemsView-categoryContent-item-name{padding:0 1px 3px}.hunterProfileItemsView-categoryContent-item .itemImage{width:90px;height:100px;background-repeat:no-repeat;background-position:center}.hunterProfileItemsView-categoryContent[data-category=map_piece] .hunterProfileItemsView-categoryContent-item .itemImage,.hunterProfileItemsView-categoryContent[data-category=collectible] .hunterProfileItemsView-categoryContent-item .itemImage{padding-top:10px;background-position-y:5px}.hunterProfileItemsView-categoryContent-item.uncollected .itemImage{opacity:.3}.hunterProfileItemsView-categoryContent-item.uncollected .hunterProfileItemsView-categoryContent-item-padding{background-color:#eee}.hunterInfoView-wrapper .hunterInfoView-idCardBlock-teamName{width:89px;margin-left:-3px}.hunterInfoView-wrapper .hunterInfoView-idCardBlock-teamName span{top:0;right:0;left:0;transform:none}.loyaltyBadgeView .loyaltyBadgeView-years-text{top:6px;right:0;left:0;font-size:22px;text-align:center;filter:drop-shadow(0 0 2px #fff);transform:none}.loyaltyBadgeView{width:50px;height:50px}.loyaltyBadgeView.badgeLevel15 .loyaltyBadgeView-years-text{top:14px}.hunterInfoView-verifiedUserImage{width:14.5px;height:17.5px}.hunterInfoView-wrapper .hunterInfoView-favoritesBlock-content-container{padding-top:15px}.hunterInfoView-wrapper .hunterInfoView-idCardBlock-goldenShield-image{left:-5px;width:26px;height:26px}.hunterInfoView-wrapper .hunterInfoView-idCardBlock-goldenShield-text{width:auto;padding:2px 7px 3px 20px;font-size:12px;white-space:nowrap}\n";
}
});
// src/modules/better-ui/styles/recipes.css
var recipes_default2;
var init_recipes2 = __esm({
"src/modules/better-ui/styles/recipes.css"() {
recipes_default2 = ".inventoryPage-item.full.recipe.known.reordered .inventoryPage-item-contentContainer,.inventoryPage-item.full.recipe.known.reordered .inventoryPage-item-imageContainer{display:none}.inventoryPage-item.full.recipe.known.reordered .inventoryPage-item-name{padding:5px 0 0 5px}.inventoryPage-item.full.recipe.known.reordered:hover .inventoryPage-item-contentContainer,.inventoryPage-item.full.recipe.known.reordered:hover .inventoryPage-item-imageContainer{display:block}.inventoryPage-item.full.recipe.known.reordered:hover .inventoryPage-item-name{padding:10px}\n";
}
});
// src/modules/better-ui/styles/scoreboards.css
var scoreboards_default;
var init_scoreboards = __esm({
"src/modules/better-ui/styles/scoreboards.css"() {
scoreboards_default = ".scoreboardRelativeRankingTableView table{border:1px solid #ddedff}.scoreboardRelativeRankingTableView th{display:flex;grid-column:1 / 6;align-items:center;justify-content:space-around;font-size:10px;font-weight:400;background-color:#dbecff;border-bottom:1px solid #b7c4d2}.scoreboardRelativeRankingTableView td:nth-of-type(3){overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.scoreboardRelativeRankingTableView tr{display:grid;grid-template-columns:25px 20px auto 68px;overflow:hidden}\n";
}
});
// src/modules/better-ui/styles/select2.css
var select2_default;
var init_select2 = __esm({
"src/modules/better-ui/styles/select2.css"() {
select2_default = ".select2-result-sub .select2-result-label{display:grid;grid-template-columns:1fr 4fr 1fr;place-items:center start}.select2-results li.select2-result-with-children>.select2-result-label{padding:3px;font-size:12px}.friendsPage-filter-environment-quantity{min-width:25px;text-align:center;vertical-align:middle}.PageAdversaries #select2-drop li,.PageFriends #select2-drop li{padding:3px;font-size:12px}.PageAdversaries #select2-drop li:nth-child(2n){background-color:#eae9e9}.PageAdversaries #select2-drop li:nth-child(2n).select2-highlighted{background-color:#3875d7}.select2-search input{padding:6px 0 6px 5px;font-size:15px;vertical-align:middle;background:url(https://www.mousehuntgame.com/images/select2/select2.png?asset_cache_version=2) no-repeat 100% -26px,linear-gradient(to bottom,#fff 85%,#eee 99%) 0 0;background-size:70px}.friendsPage-list-filter-select .select2-drop ul.select2-results li:first-of-type{display:none}.friendsPage-list-filter-select .select2-drop ul.select2-result-sub li:first-of-type{display:grid}\n";
}
});
// src/modules/better-ui/styles/sidebar.css
var sidebar_default2;
var init_sidebar2 = __esm({
"src/modules/better-ui/styles/sidebar.css"() {
sidebar_default2 = ".pageSidebarView-user{border-bottom:none}\n";
}
});
// src/modules/better-ui/styles/skins.css
var skins_default2;
var init_skins2 = __esm({
"src/modules/better-ui/styles/skins.css"() {
skins_default2 = ".skin .campPage-trap-itemBrowser-items{top:50px}.skin .campPage-trap-itemBrowser-item-image,.skin .campPage-trap-itemBrowser-item-description.shortDescription{display:none}.skin .campPage-trap-itemBrowser-item-content .campPage-trap-itemBrowser-item-name{margin-top:11px}\n";
}
});
// src/modules/better-ui/styles/tabs.css
var tabs_default;
var init_tabs = __esm({
"src/modules/better-ui/styles/tabs.css"() {
tabs_default = '.campPage-tabs-tabContentContainer{margin-bottom:10px;background-color:#f6f3eb;border:1px solid #cbc6bb;border-radius:5px;box-shadow:-1px -1px 1px #d3cecb inset}.campPage-tabs-tabRow:hover .campPage-tabs-tabHeader span,.campPage-tabs-tabRow:focus .campPage-tabs-tabHeader span,.campPage-tabs-tabHeader span{border-bottom:1px solid #cbc6bb}.campPage-tabs-tabHeader.active span,.campPage-tabs-tabRow a.campPage-tabs-tabHeader:hover span,.campPage-tabs-tabRow a.campPage-tabs-tabHeader:focus span{border:1px solid #cbc6bb;border-bottom:none}.campPage-tabs-tabContent[data-tab=quests],.campPage-tabs-tabContent[data-tab=journal]{background:none}a.campPage-daily-chest-info,.campPage-daily-chest-label,.campPage-daily-tomorrow-title,.campPage-daily-tomorrow-availableIn,.campPage-daily-today,.campPage-daily-progress.clear-block,.campPage-daily-draw-details,.shopsPage-kingsCalibratorPromo b{display:none}.campPage-daily-tomorrow{position:relative;height:140px;overflow:hidden;background-position:center;border:1px solid #7d3a08;box-shadow:-1px -1px 2px #d3cecb inset}.campPage-daily-tomorrow-reward{display:inline-block;width:100%;padding:5px 0;margin-top:0;font-size:12px;font-weight:900;color:#87430d;text-shadow:0 0 2px #ffcd6f;background-color:#ffffff57}.campPage-daily-draw-prize-description{margin:10px 20px}div#dailyRewardTimer{position:absolute;right:0;bottom:1px;display:block;width:100%;padding:3px 0;font-size:13px;font-weight:400;color:#904811;text-align:center;background-color:#ffd8987f;border-top:10px}.campPage-tabs-tabContent.active[data-tab=daily]{margin:5px;background:#f6f3eb;border-radius:3px;box-shadow:inset 0 0 5px #707070}.campPage-daily-container{padding:15px;margin:0;background:none;border:none;box-shadow:none}.campPage-daily-container.draw{margin-top:-15px;background:none;border:none;box-shadow:none}.campPage-daily-container.draw .campPage-daily-content{height:230px;padding-top:0;background:url(https://www.mousehuntgame.com/images/ui/daily/next_day_bkg.png?asset_cache_version=2);background-position-x:center;background-position-y:7px;background-size:cover;border:1px solid #7d3a08;border-radius:0;box-shadow:-1px -1px 2px #d3cecb inset}.campPage-daily-draw-title,.campPage-daily-draw-prize-name{display:inline-block;width:100%;padding:5px 0;margin-top:0;font-size:12px;font-weight:900;color:#87430d;text-shadow:0 0 2px #ffcd6f}.campPage-daily-draw-prize-name{font-size:12px}img.campPage-daily-draw-prize-image{padding:0;background:none}.shopsPage-kingsCalibratorPromo:after{top:5px;width:45px;height:45px;background-image:url(https://i.mouse.rip/mh-improved/kings-calibrator.png);filter:drop-shadow(0 1px 1px #7d3a08)}div#dailyRewardTimer:before{content:"Available in "}.shopsPage-kingsCalibratorPromo{height:55px;padding:0 55px;margin-top:2px;line-height:13px;color:#412814;text-align:center;background:#ffe8aa;border:1px solid #7d3a08;border-radius:0;box-shadow:inset -1px -1px 2px #d3cecb}.campPage-daily-container .shopsPage-kingsCalibratorPromo-button{margin:0;background:#2a98ff;border-radius:5px;box-shadow:inset 0 -1px 1px 1px #2d76ba}.campPage-daily-container .shopsPage-kingsCalibratorPromo-button:hover,.campPage-daily-container .shopsPage-kingsCalibratorPromo-button:active,.campPage-daily-container .shopsPage-kingsCalibratorPromo-button:focus{background:#2d76ba}.campPage-tabs-tabContent.active[data-tab=daily],.campPage-tabs-tabContent-larryTip-container,.campPage-quests-container{line-height:16px;background-color:#fbf8f6;border:1px solid #d3cecb;border-radius:3px;box-shadow:-1px 1px 3px #d3cecb inset}.campPage-daily-container.daily .campPage-daily-content{margin-top:15px}.campPage-tabs-tabContent-larryTip-container a.campPage-tabs-tabContent-larryTip-byLine,img.campPage-larryTip-external-link-icon{display:none}.campPage-tabs-tabContent-larryTip-environment{padding-bottom:1em}.campPage-tabs-tabContent-larryTip-container p:last-of-type a{display:block;padding:1em 0 0;text-align:right}.campPage-tabs-tabContent-larryTip-container p:last-of-type a:after{content:"\\2192"}.campPage-daily-container .shopsPage-kingsCalibratorPromo{display:flex;align-items:center}\n';
}
});
// src/modules/better-ui/styles/team.css
var team_default;
var init_team = __esm({
"src/modules/better-ui/styles/team.css"() {
team_default = '.teamPage-container .userInteractionButtonsView.small_buttons .userInteractionButtonsView-button{width:33px!important;height:33px!important;background-size:cover!important}.teamPage-container .teamPage-memberRow-actions .mousehuntTooltip{right:-40px;left:-40px}.teamPage-container .userInteractionButtonsView-unfriendLink{display:none}.teamPage-profile-header-controls{top:0;bottom:0;display:flex;align-items:center}.teamPage-profile-header-controls br{content:""}.teamPage-profile-header-controls br:after{content:" "}.teamPageConfirm-dialog input.userSelectorView-filter-input{width:600px;padding:10px;margin:0 10px}.teamPageConfirm-dialog .userSelectorView-filterContainer{width:100%;padding:0 0 10px}.teamPageConfirm-dialog a.userSelectorView-filter-clear.active{top:15px;right:15px;font-size:14px;color:transparent}.teamPageConfirm-dialog a.userSelectorView-filter-clear.active:hover:after{color:#f55}.teamPageConfirm-dialog a.userSelectorView-filter-clear.active:after{font-size:16px;color:#b72929;content:"\\2715"}.teamPage-memberJournal-empty{line-height:30px;color:#575757}.teamPage-memberJournal-list{height:unset;min-height:30px}.teamPage-memberJournals{display:grid;grid-template-columns:1fr 1fr 1fr}.teamPage-memberJournalContainer{width:auto}.tournamentPage-tournamentContainer-prizeInfo,.teamPage-memberJournal-trapSetup b{display:none}.teamPage-memberJournal-trapSetup i{margin-left:9px;font-size:12px;line-height:17px}.teamPage-memberJournal-identity a.teamPage-member-image.online:before{position:absolute;top:0;right:-180px;width:10px;height:10px;content:"";background-color:#8ff309;border:1px solid #355c1d;border-radius:50%}.teamPage-profile-awardContainer-awardList{position:relative}.teamPage-profile-awardContainerInfo{position:absolute;top:-32px;right:0;display:block;width:250px;font-size:10px;color:#451e00;text-shadow:1px 1px 1px #eee;opacity:0;transition:.2s}.teamPage-profile-awardContainer-awardList:hover .teamPage-profile-awardContainerInfo{opacity:1}\n';
}
});
// src/modules/better-ui/styles/traps.css
var traps_default;
var init_traps = __esm({
"src/modules/better-ui/styles/traps.css"() {
traps_default = ".campPage-trap-baitLabel{display:none}.campPage-trap-armedItem.bait{display:flex;align-items:center;justify-content:flex-start}.campPage-trap-armedItem.bait.active{top:338px}.campPage-trap-baitDetails{color:transparent!important;text-shadow:none}.campPage-trap-baitName,.campPage-trap-baitQuantity{color:#926944;text-shadow:0 0 1px #ae9b6d,1px 1px #fff}.mh-dark-mode .campPage-trap-baitName,.mh-dark-mode .campPage-trap-baitQuantity{color:#ffe6d0;text-shadow:0 0 1px #ae9b6d,1px 1px #000}.campPage-trap-baitQuantity{position:absolute;right:0;bottom:0;box-sizing:border-box;padding:5px;font-size:16px;font-weight:400;line-height:11px;text-align:right;background-color:#ffffffb3;border:1px solid #9d917f;border-right:none;border-bottom:none;border-bottom-right-radius:3px;box-shadow:-1px -1px 1px #d3cecb inset}.campPage-trap-armedItem.bait .campPage-trap-armedItem-image{left:-3px;width:60px;margin-right:0;background-repeat:no-repeat;background-position:center;background-size:100%}.mh-dark-mode .campPage-trap-baitQuantity,.mh-dark-mode .campPage-trap-armedItem .quantity span{color:#ffe6d0;background-color:#5f5f5fb3}.campPage-trap-armedItem .quantity span{position:absolute;right:-6px;bottom:3px;padding:3px;text-align:right;background-color:#fffc;border:1px solid #d3cecb;border-right:none;border-bottom:none;border-radius:0 0 5px;box-shadow:-1px -1px 1px #d3cecb inset}.campPage-trap-statsContainer{background:transparent;box-shadow:none}.campPage-trap .trapImageView{width:352px;height:352px;margin-top:0;margin-left:0;background:transparent;border:none;border-bottom:1px solid #ceb7a6;border-radius:0}.campPage-trap{border:1px solid #9d917f;border-top-left-radius:5px;border-top-right-radius:5px}.hunterInfoView-wrapper .hunterInfoView-trapBlock-header-container,.hunterInfoView-wrapper .hunterInfoView-trapBlock-footer{border-width:1px;box-shadow:none}.hunterInfoView-wrapper .hunterInfoView-trapBlock-setup-container{margin-right:-9px;margin-left:-9px;border-bottom:1px solid #ceb7a6;box-shadow:none}.hunterInfoView-wrapper .hunterInfoView-trapBlock-footer-stats{padding-top:35px;margin-right:-9px;margin-left:-9px;box-shadow:none}.hunterInfoView-wrapper .trapImageView{width:368px;height:368px;margin:0 auto}.hunterInfoView-wrapper a.trapImageView-zoomButton{top:80%}.hunterInfoView-wrapper .hunterInfoView-trapBlock-header-title-container{left:1px;border-width:1px;border-bottom:none}.hunterInfoView-wrapper .hunterInfoView-trapBlock-setup-items{background:none;border:none}.hunterInfoView-wrapper .hunterInfoView-trapBlock-footer{background:#f6f3eb;border-top:0;box-shadow:none}.hunterInfoView-wrapper .hunterInfoView-trapBlock-setup-trap-slot-quantity{bottom:0;width:100%;background-color:#ffffffe5;border-color:#d3cecb;border-right:none;border-bottom:none;border-left:none;border-radius:0}.hunterInfoView-wrapper .hunterInfoView-trapBlock-setup-trap-slot,.hunterInfoView-wrapper .hunterInfoView-trapBlock-setup-trap-slot.middle{width:60px;height:60px;margin:0;background-position:-1px;background-size:61px;border:1px solid #000;box-shadow:none}.hunterInfoView-wrapper .campPage-trap-trapStat{display:flex;background:#fff;border:1px solid #e2d3c8;border-radius:3px}.hunterInfoView-wrapper .campPage-trap-itemStats{display:flex;padding-bottom:0;margin:0 5px}.hunterInfoView-wrapper .campPage-trap-trapStat .value{background:transparent;border:none}.trapImageView-trapAura{opacity:.9}.largerTrapView-popup-name,span.campPage-trap-armedItem-skin-description-content b,span.campPage-trap-armedItem-skin-description-content br{display:none}.campPage-trap-trapEffectivenessBar{height:12px;margin-top:-1px;background:#c6bea8;border:1px solid #9c938e}.campPage-trap-trapEffectivenessBar.easy:after,.campPage-trap-trapEffectivenessBar.effortless:after,.campPage-trap-trapEffectivenessBar.strong:after,.campPage-trap-trapEffectivenessBar.excellent:after{background:#5ccd5e}.campPage-trap-trapEffectivenessBar.near_impossible:after,.campPage-trap-trapEffectivenessBar.very_poor:after,.campPage-trap-trapEffectivenessBar.overpowering:after{background:#dc7878}.campPage-trap-trapEffectivenessBar.difficult:after,.campPage-trap-trapEffectivenessBar.challenging:after,.campPage-trap-trapEffectivenessBar.mild:after,.campPage-trap-trapEffectivenessBar.moderate:after,.campPage-trap-trapEffectivenessBar.medium:after{background:#e6cd66}.campPage-trap-trapEffectivenessBar.impossible:after{width:100%;background:#a83030}.campPage-trap-trapEffectiveness-header{color:transparent}.campPage-trap-trapEffectiveness-header b{color:#926944}.campPage-trap-trapEffectiveness-content{top:50px}.campPage-trap-trapEffectiveness-difficultyGroup{background:#f6f3eb;border-color:#e3dbd5;border-radius:3px;box-shadow:inset 0 0 1px #755e40}.campPage-trap-trapEffectiveness-difficultyGroup-label{grid-column:span 2;font-weight:400;text-align:center;border:none}.campPage-trap-armedItem.skin .campPage-trap-armedItem-skin-description-content span{font-size:12px;vertical-align:middle}.campPage-trap-blueprintContainer .campPage-trap-trapEffectivenessBar{display:none}.campPage-trap-armedItem.inactive{background:#f6f3eb}.campPage-trap-trapStat.power .value b{line-height:15px}.itembrowser-skin-image-wrapper{background-image:url(https://www.mousehuntgame.com/images/items/bases/trap_small/a44d6a59ca9c0d11224bb36fd4e16378.png?cv=2);background-position:center}img.itembrowser-skin-image{width:332px}.campPage-trap-trapStat-mathRow{font-size:13px;line-height:23px}.campPage-trap-trapStat-mathRow.label{font-size:17px}.campPage-trap-trapStat .math{bottom:90px;left:-18px;width:337px}.campPage-trap-trapStat .math .arrow{display:none}.campPage-trap-trapStat .value span{font-size:14px}.campPage-trap-trapStat.cheese_effect .value span{font-size:12px}.campPage-trap-itemBrowser-armed-item-image-frame{background:none;border:none;box-shadow:none}.campPage-trap-armedItem.empty .quantity{display:none}.empty .campPage-trap-armedItem-empty{top:11px;right:2px;bottom:10px;display:flex;align-items:center;justify-content:center;width:auto;height:auto;font-size:12px;color:#671d1d;border-radius:10px;box-shadow:none}.campPage-trap-itemBrowser-armed-item.empty.clear-block{display:flex;align-items:center;background-color:#e3d4d1}.campPage-trap-itemBrowser-armed-item.empty.clear-block .campPage-trap-itemBrowser-armed-item-content{display:flex;flex-direction:column;gap:10px;align-items:stretch}.campPage-trap-itemBrowser-armed-item.empty.clear-block .campPage-trap-itemBrowser-armed-item-content .campPage-trap-itemBrowser-item-name{font-size:18px;font-variant:none;color:#671d1d;background:#e3d4d1}.campPage-trap-itemBrowser-item-disarmButton{width:100px;margin-top:10px;color:#000;background-color:#ffbfbf;box-shadow:0 -20px 5px #ffbfbf inset,1px 1px 1px #671d1d}a.campPage-trap-itemBrowser-item-disarmButton:hover{box-shadow:0 -20px 5px #cc8b8b inset,1px 1px 1px #671d1d}.campPage-trap-armedItem.bait.empty .campPage-trap-armedItem-image{background-image:url(https://www.mousehuntgame.com/images/ui/hunters_horn/sandwich_board/icons/bait_empty.png)}.campPage-trap-baitDetails .campPage-trap-baitName{position:absolute;inset:0 0 0 60px;display:flex;align-items:center}.campPage-trap-trapStat-mathRow-name{padding-right:1px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.campPage-trap-itemBrowser-item-description-consumeMethod{white-space:nowrap}\n";
}
});
// src/modules/better-ui/styles/tutorial.css
var tutorial_default;
var init_tutorial = __esm({
"src/modules/better-ui/styles/tutorial.css"() {
tutorial_default = "#overlayPopup.chooseTrap .weapon .trapDamageType{display:none}#overlayPopup.chooseTrap .weapon .trapDetails{display:flex;flex-direction:column;gap:10px}#OnboardArrow.larryCircle .whiteboard .action{bottom:-25px}#OnboardArrow.larryCircle .whiteboard .action:after{font-size:12px}@keyframes bait-scale-new{0%{transform:scale(1)}50%{transform:scale(2.7)}to{transform:scale(1)}}.campPage-trap-baitQuantity.highlight{transform-origin:bottom right;animation:bait-scale-new .6s ease-in-out}@media screen and (prefers-reduced-motion: reduce){.campPage-trap-baitQuantity{animation:none}}#OnboardArrow.larryCircle .whiteboard{line-height:20px}.guideArrowView.animated.show.topLeft{margin-top:-30px;margin-left:-100px}.onboarding .mousehuntHud-marketPlace.disabled,.onboarding .mousehuntHud-marketPlace.disabled:hover,.onboarding .mousehuntHud-premiumShop.premium_items{opacity:.6}.onboarding .mousehuntHud-shield{display:block}.onboarding.hide_favorites .campPage-trap-itemBrowser-items{top:60px}a.mousehuntHud-userStat.trap.base.hidden,a.mousehuntHud-userStat.trap.weapon.hidden{display:inline-block;visibility:visible}.onboarding.hide_favorites .campPage-trap-itemBrowser-quickLinks.campPage-trap-itemBrowser-quickLinks-power{display:none}\n";
}
});
// src/modules/better-ui/styles/userscripts.css
var userscripts_default2;
var init_userscripts2 = __esm({
"src/modules/better-ui/styles/userscripts.css"() {
userscripts_default2 = '#tsitu-supply-search{position:absolute;top:-2px;right:0;display:flex;align-items:center;vertical-align:middle;border:none!important}#tsitu-supply-search label{display:none}#tsitu-supply-search button{height:20px;padding:0 10px;line-height:19px;color:#000;text-shadow:0 0 1px #fff;background-color:#fff600;border:1px solid #000;border-radius:5px;box-shadow:inset 0 0 5px #fff,1px 1px 1px #fff}#tsitu-supply-search input{padding:2px;margin-right:2px;font-size:12px!important}#tsitu-hunter-id-nav-ui input{flex:none!important;width:75px!important;margin:3px;border:1px solid #000!important;border-radius:2px}#tsitu-hunter-id-nav-ui button{padding:2px!important;margin:3px 1px!important;background-color:#d8e3f1;border:1px solid #000!important;border-radius:3px!important}#tsitu-hunter-id-nav-ui{display:inline-flex!important;align-items:center;border:none}span.shieldDurationText,span.shieldDurationText[data-near-expiry=true]{bottom:-2px;z-index:1;font-size:15px;font-weight:900;text-shadow:0 0 1px #000,0 0 2px #000,0 0 3px #000}span.shieldDurationText[data-near-expiry=true]{color:#f12e2e}#mhhh_flash_message_div{position:fixed!important;top:unset!important;right:10px;bottom:10px;left:unset!important;width:auto!important;font-weight:400!important;white-space:nowrap;background-color:#bff890!important;border-radius:10px;box-shadow:0 1px 3px -1px #000!important;opacity:1!important}#tsitu-fave-setups{z-index:100}.journalContainer .top:hover .journalContainer-selectTheme[style="position: initial;transform: none;flex: 1 1 auto;height: 20px;background: none rgb(119, 221, 119);padding: 0px 0px 0px 5px;"]:last-child{background-image:none}.journalContainer .top:hover .journalContainer-selectTheme[style="position: initial;transform: none;flex: 1 1 auto;height: 20px;background: none rgb(119, 221, 119);padding: 0px 0px 0px 5px;"]{display:inline-flex;justify-content:center;padding:0!important}.journalContainer .top:hover .journalContainer-selectTheme[style="position: initial;transform: none;flex: 1 1 auto;height: 20px;background: none rgb(119, 221, 119);padding: 0px 0px 0px 5px;"]:hover{background-color:#5dd55d!important}.mousehuntHud-userStat-row.wisdom a{display:block;margin-bottom:5px}.mousehuntHud-userStat.goldPoints .wisdom .value{vertical-align:top}\n';
}
});
// src/modules/better-ui/styles/index.js
var main13, styles_default14;
var init_styles15 = __esm({
"src/modules/better-ui/styles/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
init_adventure();
init_better_lucky_catch_icon();
init_corkboard();
init_daily_draw();
init_events2();
init_footer();
init_friends2();
init_general3();
init_gifts();
init_hud2();
init_inbox();
init_login();
init_overlays();
init_profile();
init_recipes2();
init_scoreboards();
init_select2();
init_sidebar2();
init_skins2();
init_tabs();
init_team();
init_traps();
init_tutorial();
init_userscripts2();
main13 = () => {
addStyles([
adventure_default,
general_default3,
better_lucky_catch_icon_default,
corkboard_default,
daily_draw_default,
events_default,
footer_default,
friends_default2,
gifts_default,
hud_default2,
inbox_default,
login_default,
overlays_default,
profile_default,
recipes_default2,
scoreboards_default,
select2_default,
sidebar_default2,
skins_default2,
tabs_default,
team_default,
traps_default,
tutorial_default,
userscripts_default2
]);
};
styles_default14 = main13;
}
});
// src/modules/better-ui/index.js
var init15, better_ui_default;
var init_better_ui = __esm({
"src/modules/better-ui/index.js"() {
init_sentry_release_injection_stub();
init_friends();
init_hud();
init_skins();
init_styles15();
init15 = () => __async(void 0, null, function* () {
styles_default14();
friends_default();
hud_default();
skins_default();
});
better_ui_default = {
id: "better-ui",
name: "Better UI",
type: "better",
default: true,
description: "Updates the MH interface with a variety of UI and style changes.",
load: init15
};
}
});
// src/modules/catch-rate-estimate/styles.css
var styles_default15;
var init_styles16 = __esm({
"src/modules/catch-rate-estimate/styles.css"() {
styles_default15 = "#mh-improved-cre{margin:10px 0}#mh-improved-cre table{width:100%}#mh-improved-cre thead{box-shadow:0 -1px #d3cecb inset}#mh-improved-cre table th{font-weight:700;text-align:center}#mh-improved-cre table th.name,#mh-improved-cre table:first-child{text-align:left}.mh-improved-cre-data{min-width:70px;text-align:center}.mh-improved-cre-data-good{color:#138f13}.mh-improved-cre-data-bad{color:#bb4646}\n";
}
});
// src/modules/catch-rate-estimate/data.js
var miceEffs, hasGottenEffs, getMiceEffectivness, getMouse, getMousePower, getMouseEffectiveness, getMinluck, getPercent, getCatchRate;
var init_data2 = __esm({
"src/modules/catch-rate-estimate/data.js"() {
init_sentry_release_injection_stub();
init_utils4();
init_utils4();
hasGottenEffs = false;
getMiceEffectivness = () => __async(void 0, null, function* () {
if (!hasGottenEffs) {
miceEffs = yield getData("effs");
hasGottenEffs = true;
}
const response = yield doRequest("managers/ajax/users/getmiceeffectiveness.php");
if (!(response == null ? void 0 : response.success)) {
return false;
}
return response == null ? void 0 : response.effectiveness;
});
getMouse = (mouseId) => __async(void 0, null, function* () {
if (!miceEffs || !hasGottenEffs) {
miceEffs = yield getData("effs");
hasGottenEffs = true;
}
const mouse = miceEffs.find((m) => m.type === mouseId);
return mouse;
});
getMousePower = (mouseId) => __async(void 0, null, function* () {
const mouse = yield getMouse(mouseId);
return mouse.effectivenesses.power;
});
getMouseEffectiveness = (mouseId) => __async(void 0, null, function* () {
const mouse = yield getMouse(mouseId);
return mouse.effectivenesses[user.trap_power_type_name.toLowerCase()];
});
getMinluck = (mousePower, effectiveness) => __async(void 0, null, function* () {
if (effectiveness === 0) {
return "\u221E";
}
const minluck = Math.ceil(
Math.ceil(Math.sqrt(mousePower / 2)) / Math.min(effectiveness / 100, 1.4)
);
const checkCatchRate = getCatchRate(mousePower, effectiveness, 0, minluck);
return checkCatchRate.rate === 1 ? minluck : minluck + 1;
});
getPercent = (rate) => {
if (rate === 1) {
return "100%";
}
const percent = (rate * 100).toFixed(2);
return `${percent}%`;
};
getCatchRate = (mousePower, effectiveness, power = null, luck = null) => {
effectiveness = effectiveness / 100;
if (null === power) {
power = user.trap_power;
}
if (null === luck) {
luck = user.trap_luck;
}
const rate = Math.min(
1,
(effectiveness * power + 2 * Math.pow(Math.floor(Math.min(effectiveness, 1.4) * luck), 2)) / (effectiveness * power + mousePower)
);
return {
rate,
percent: getPercent(rate)
};
};
}
});
// src/modules/catch-rate-estimate/index.js
var updateMinLucks, renderList, main14, init16, catch_rate_estimate_default;
var init_catch_rate_estimate = __esm({
"src/modules/catch-rate-estimate/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
init_styles16();
init_data2();
updateMinLucks = () => __async(void 0, null, function* () {
if ("camp" !== getCurrentPage()) {
return;
}
const effectiveness = yield getMiceEffectivness();
if (!effectiveness || !Object.keys(effectiveness).length) {
return;
}
const miceIds = Object.values(effectiveness).flatMap(({ mice }) => mice).map((mouse) => {
return {
name: mouse.name,
type: mouse.type
};
});
yield renderList(miceIds);
});
renderList = (list) => __async(void 0, null, function* () {
let minluckList = document.querySelector("#mh-improved-cre");
if (!minluckList) {
minluckList = makeElement("div", "campPage-trap-trapEffectiveness");
minluckList.id = "mh-improved-cre";
const statsContainer = document.querySelector(".campPage-trap-statsContainer");
if (!statsContainer) {
return;
}
statsContainer.append(minluckList);
}
const existing = document.querySelector("#mh-improved-cre-table");
if (existing) {
existing.remove();
}
const table = makeElement("table");
table.id = "mh-improved-cre-table";
const tableheader = makeElement("thead");
makeElement("th", "name", "Mouse", tableheader);
makeElement("th", "", "Minluck", tableheader);
makeElement("th", "", "Catch Rate", tableheader);
table.append(tableheader);
const rows = [];
for (const mouse of list) {
const mousePower = yield getMousePower(mouse.type);
const mouseEffectiveness = yield getMouseEffectiveness(mouse.type);
const minluck = yield getMinluck(mousePower, mouseEffectiveness);
const catchRate = yield getCatchRate(mousePower, mouseEffectiveness);
const crClass = ["mh-improved-cre-data"];
if (catchRate.rate * 100 >= 100) {
crClass.push("mh-improved-cre-data-good");
} else if (catchRate.rate * 100 <= 60) {
crClass.push("mh-improved-cre-data-bad");
}
if (user.trap_luck >= minluck) {
crClass.push("mh-improved-cre-data-minlucked");
}
rows.push({
mouse: mouse.name,
minluck,
catchRateValue: catchRate.rate,
catchRate: catchRate.percent,
crClass
});
}
rows.sort((a, b) => {
if (a.catchRateValue !== b.catchRateValue) {
return a.catchRateValue - b.catchRateValue;
}
return b.minluck - a.minluck;
});
rows.forEach(({ mouse, minluck, catchRate, crClass }) => {
const row = makeElement("tr", "mh-improved-cre-row");
makeElement("td", "mh-improved-cre-name", mouse, row);
makeElement("td", crClass, minluck, row);
makeElement("td", crClass, catchRate, row);
table.append(row);
});
minluckList.append(table);
});
main14 = () => __async(void 0, null, function* () {
if ("camp" === getCurrentPage()) {
yield updateMinLucks();
}
onPageChange({ camp: { show: updateMinLucks } });
onRequest(updateMinLucks, "/managers/ajax/users/changetrap.php");
});
init16 = () => __async(void 0, null, function* () {
addStyles(styles_default15);
main14();
});
catch_rate_estimate_default = {
id: "catch-rate-estimate",
name: "Catch Rate Estimator & Minluck",
type: "feature",
default: true,
description: "Minluck and catch rate estimates.",
load: init16
};
}
});
// src/modules/copy-id/styles.css
var styles_default16;
var init_styles17 = __esm({
"src/modules/copy-id/styles.css"() {
styles_default16 = ".mousehuntHud-userStatBar .profileImage{position:relative}.mh-copy-id-button{position:absolute;top:30px;left:3px;z-index:10;display:none;cursor:pointer}.mh-copy-id-success-message{position:absolute;top:32px;left:60px;z-index:10;font-weight:900;color:#fff;text-shadow:1px 1px 1px #000;opacity:0;transition:opacity .2s ease-in-out}\n";
}
});
// src/modules/copy-id/index.js
var main15, init17, copy_id_default;
var init_copy_id = __esm({
"src/modules/copy-id/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
init_styles17();
main15 = () => {
const profilePic = document.querySelector(".mousehuntHud-userStatBar .mousehuntHud-profilePic");
if (!profilePic) {
return;
}
const copyIdButton = makeElement("div", ["mh-copy-id-button", "mousehuntActionButton", "tiny"]);
makeElement("span", "mh-copy-id-button-text", "Copy ID", copyIdButton);
profilePic.parentNode.insertBefore(copyIdButton, profilePic.nextSibling);
const successMessage = makeElement("div", "mh-copy-id-success-message", "Copied!");
successMessage.style.opacity = 0;
copyIdButton.parentNode.insertBefore(successMessage, copyIdButton.nextSibling);
copyIdButton.addEventListener("click", () => {
const Id = user.user_id;
navigator.clipboard.writeText(Id);
successMessage.style.opacity = 1;
setTimeout(() => {
successMessage.style.opacity = 0;
}, 1e3);
});
profilePic.addEventListener("mouseenter", () => {
copyIdButton.style.display = "block";
});
profilePic.addEventListener("mouseleave", () => {
copyIdButton.style.display = "none";
});
copyIdButton.addEventListener("mouseenter", () => {
copyIdButton.style.display = "block";
});
copyIdButton.addEventListener("mouseleave", () => {
copyIdButton.style.display = "none";
});
};
init17 = () => __async(void 0, null, function* () {
addStyles(styles_default16);
main15();
});
copy_id_default = {
id: "copy-id",
name: "Copy ID",
type: "feature",
default: true,
description: "Hover over your profile picture in the HUD for a quick 'Copy ID to clipboard' button.",
load: init17
};
}
});
// src/modules/dark-mode/styles.css
var styles_default17;
var init_styles18 = __esm({
"src/modules/dark-mode/styles.css"() {
styles_default17 = ".mh-dark-mode .pageFrameView #mousehuntContainer.PageCamp .adventureBookBanner-goalPadding{background-color:transparent}.mh-dark-mode .pageFrameView #mousehuntContainer.PageCamp .adventureBookBanner-adventureName{color:#000}.mh-dark-mode .mousehuntActionButton{box-shadow:1px 1px 1px #535151}.mh-dark-mode .journal .relicHunter_complete,.mh-dark-mode .journal .relicHunter_start,.mh-dark-mode .journal .content .catchsuccessloot{color:#fff!important;background-color:#2e2e2e}.mh-dark-mode .journal a{color:#009adf}.entry.short.supplytransferitem{background:url(https://i.mouse.rip/upscaled/item-add.png) no-repeat 10px center;background-color:var(--mhdm-dark7)}.entry.short.supplytransferitem a{color:#0c5271}.mh-dark-mode .itemPurchaseView-action-goldGost{background-color:#0e0e0e;border-color:#242424}.mh-dark-mode .itemPurchaseView-container.kingsCartItem .itemPurchaseView-action-container{color:#fff;background-color:#242424}.mh-dark-mode .inventoryPage-item-recipeOptions li{color:#2c2c2c}.mh-dark-mode .treasureMapView-environment.active .treasureMapView-environment-title{background-color:#38727b}.mh-dark-mode #overlayPopup.treasureMapPopup .treasureMapView-environment.active .treasureMapView-environment-title a,.mh-dark-mode #overlayPopup.treasureMapPopup .treasureMapView-environment.wrong .treasureMapView-environment-title a,.mh-dark-mode .treasureMapView-environment-progress{color:#fff}.mh-dark-mode .treasureMapView-environment.wrong .treasureMapView-environment-title{background-color:#862f2f}.mh-dark-mode .pageFrameView #overlayPopup.treasureMapPopup .treasureMapRootView-content a.messageBoardView-message-delete{color:transparent}.mh-dark-mode .itemPurchaseView-image-container,.mh-dark-mode .itemPurchaseView-content-container{background-color:#000}.mh-dark-mode .itemPurchaseView-action-purchaseHelper-owned{background-color:#3d3d3d;border-color:#606060}.mh-dark-mode .entry.short.misc.custom.unstable_charm_trigger{background:#7ae4ff}.mh-dark-mode .journal .entry.winterTaiga,.mh-dark-mode .entry.short.misc.custom.winter_hunt_2021.instantReturnGolem.jhMisc,.mh-dark-mode .entry.short.misc.custom.winter_hunt_2021.claimGolemReward.jhMisc,.mh-dark-mode .winter_hunt_2021.sendGolem{background-color:#7ae4ff}.mh-dark-mode #jhButton{color:#3b5998}.mh-dark-mode .pageFrameView #overlayPopup.treasureMapPopup .treasureMapRootView-content a.treasureMapView-block-search-clear{color:#ccc;border-left:none}.mh-dark-mode .treasureMapView-block-search-text{color:#fff;background-color:#636363;border:1px solid #2c2c2c}.mh-dark-mode #tsitu-hunter-id-nav-ui input{color:#fff;background-color:#636363;border-color:#2c2c2c!important}.mh-dark-mode #tsitu-hunter-id-nav-ui input::placeholder{color:#ccc}.mh-dark-mode .marketplaceView-listing-progressLabel{color:#fff;text-shadow:0 1px #000}.mh-dark-mode .marketplaceView-listing-progressBar-padding{background-color:#424140}.marketplaceView-listing-progressBar span{background-color:#956ab4}.mh-dark-mode .marketplaceMyListings s{color:#969696}.mh-dark-mode .pageFrameView .itemViewStatBlock .itemViewStatBlock-stat-label{background-color:transparent}.mh-dark-mode.shopCustomization .itemViewStatBlock-stat{border-color:#404040}.mh-dark-mode .journal .entry.larryGift{background:#deffc7}.mh-dark-mode .pageFrameView .mousehuntHeaderView .menuItem:hover{background-color:#000}.mh-dark-mode .pageFrameView .mousehuntHeaderView .menuItem.dropdown:hover .arrow{border-bottom-color:#666}\n";
}
});
// src/modules/dark-mode/index.js
var isDarkMode, checkForDarkModeAndAddBodyClass, addDarkModeBodyClass, init18, dark_mode_default;
var init_dark_mode = __esm({
"src/modules/dark-mode/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
init_styles18();
isDarkMode = () => {
return !!getComputedStyle(document.documentElement).getPropertyValue("--mhdm-white");
};
checkForDarkModeAndAddBodyClass = () => {
if (!isDarkMode()) {
return false;
}
document.body.classList.add("mh-dark-mode");
return true;
};
addDarkModeBodyClass = () => {
let added = checkForDarkModeAndAddBodyClass();
if (!added) {
setTimeout(() => {
added = checkForDarkModeAndAddBodyClass();
if (!added) {
setTimeout(() => {
checkForDarkModeAndAddBodyClass();
}, 1e3);
}
}, 500);
}
};
init18 = () => __async(void 0, null, function* () {
addStyles(styles_default17);
addDarkModeBodyClass();
onNavigation(addDarkModeBodyClass);
onRequest(addDarkModeBodyClass);
});
dark_mode_default = {
id: "dark-mode",
name: "Dark Mode Updates & Tweaks",
type: "feature",
default: true,
description: "Improves and tweaks dark mode, either the standalone extension or the MHCT version.",
load: init18
};
}
});
// src/modules/data-exporters/exporter.js
var recursiveFetch, addDownloadToButton, addJsonDownloadToButton, addCsvDownloadToButton, getFormattedDate, addDownloadButtons, resultReducer, updateSingleTotalEl, exportPopup;
var init_exporter = __esm({
"src/modules/data-exporters/exporter.js"() {
init_sentry_release_injection_stub();
init_utils4();
recursiveFetch = (data, callbackToRun) => {
return data.reduce((promiseChain, item) => {
return promiseChain.then((chainResults) => {
return new Promise((resolve) => {
callbackToRun(item).then((currentResult) => {
chainResults.push(currentResult);
resolve(chainResults);
});
});
});
}, Promise.resolve([]));
};
addDownloadToButton = (opts, callback) => {
let { buttonSelector, results, filename, beforeDownload } = opts;
const exportButton = document.querySelector(buttonSelector);
exportButton.classList.remove("disabled");
exportButton.addEventListener("click", () => {
if (beforeDownload) {
results = opts.beforeDownload();
}
callback(results, filename);
});
};
addJsonDownloadToButton = (opts) => {
addDownloadToButton(opts, (results, filename) => {
const data = JSON.stringify({
type: opts.type,
generated: (/* @__PURE__ */ new Date()).toISOString(),
data: results
});
const blob = new Blob([data], { type: "application/json" });
const url = URL.createObjectURL(blob);
const link = document.createElement("a");
link.download = `${filename}.json`;
link.href = url;
link.click();
URL.revokeObjectURL(url);
});
};
addCsvDownloadToButton = (opts) => {
addDownloadToButton(opts, (results, filename) => {
if (opts.reduceResults) {
results = resultReducer(results);
}
let csv = results.map((row) => {
return Object.values(row).map((value) => `"${value}"`).join(",");
}).join("\n");
if (opts.headers) {
csv = `${opts.headers.join(",")}
${csv}`;
}
const blob = new Blob([csv], { type: "text/csv" });
const url = URL.createObjectURL(blob);
const link = document.createElement("a");
link.download = `${filename}.csv`;
link.href = url;
link.click();
URL.revokeObjectURL(url);
});
};
getFormattedDate = () => {
const date = /* @__PURE__ */ new Date();
return `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()}`;
};
addDownloadButtons = (opts) => {
const { type, results, headers, reduceResults } = opts;
const filename = `${type}-${getFormattedDate()}`;
const buttonSelector = `#export-${type}`;
addJsonDownloadToButton({
buttonSelector,
type,
results,
filename
});
addCsvDownloadToButton({
buttonSelector: `${buttonSelector}-csv`,
results,
filename,
headers,
reduceResults
});
};
resultReducer = (results) => {
return results.reduce((acc, { category, items: items2 }) => {
items2.forEach((data) => {
acc.push(__spreadValues({
region: category
}, data));
});
return acc;
}, []);
};
updateSingleTotalEl = (results) => {
const totalItemsEl = document.querySelector(".export-items-footer .total-items");
if (!totalItemsEl) {
return;
}
const totalItems = results.reduce((acc, { items: items2 }) => {
return acc + items2.length;
}, 0);
totalItemsEl.textContent = totalItems.toLocaleString();
};
exportPopup = (opts) => {
const {
type,
text,
headerMarkup,
itemsMarkup,
footerMarkup,
fetch: fetch4,
afterFetch: afterFetch3,
download,
updateSingleTotal,
dataIsAvailable
} = opts;
createPopup({
title: `Export ${text}`,
content: `
<div class="export-wrapper ${type}">
<div class="export-items-header item-wrapper ${headerMarkup ? "" : "hidden"}">
${headerMarkup || ""}
</div>
<div class="export-items-wrapper ${itemsMarkup ? "" : "hidden"}">
${itemsMarkup || ""}
</div>
<div class="export-items-footer item-wrapper ${footerMarkup ? "" : "hidden"}">
${footerMarkup || ""}
</div>
<div class="actions-wrapper">
<div class="mousehuntActionButton tiny lightBlue" id="export-back">
<span>Back</span>
</div>
<div class="mousehuntActionButton tiny fetch-data ${dataIsAvailable ? "hidden" : ""}" id="fetch-${type}">
<span>Fetch ${text}</span>
</div>
<div class="mousehuntActionButton tiny ${dataIsAvailable ? "" : "disabled"} export-json" id="export-${type}">
<span>Export as JSON</span>
</div>
<div class="mousehuntActionButton tiny ${dataIsAvailable ? "" : "disabled"} export-csv" id="export-${type}-csv">
<span>Export as CSV</span>
</div>
</div>
</div>`
});
const exportBackButton = document.querySelector("#export-back");
if (!exportBackButton) {
return;
}
exportBackButton.addEventListener("click", () => {
eventRegistry.doEvent("show-export-data");
});
const fetchButton = document.querySelector(`#fetch-${type}`);
if (!fetchButton) {
return;
}
fetchButton.addEventListener("click", () => {
fetchButton.classList.add("disabled");
fetch4().then((results) => {
if (afterFetch3) {
afterFetch3(results);
}
if (updateSingleTotal) {
updateSingleTotalEl(results);
}
addDownloadButtons(__spreadValues({
results,
type
}, download));
fetchButton.classList.remove("disabled");
});
});
if (dataIsAvailable) {
fetchButton.click();
}
};
}
});
// src/modules/data-exporters/export-favorite-setups.js
var hasFavoriteSetups, fetch2, afterFetch, exportFavoriteSetups;
var init_export_favorite_setups = __esm({
"src/modules/data-exporters/export-favorite-setups.js"() {
init_sentry_release_injection_stub();
init_exporter();
hasFavoriteSetups = () => {
return localStorage.getItem("favorite-setups-saved");
};
fetch2 = () => __async(void 0, null, function* () {
const setups = JSON.parse(localStorage.getItem("favorite-setups-saved"));
const flattenedSetups = [];
for (const setupName in setups) {
const setup = setups[setupName];
flattenedSetups.push({
name: setupName,
bait: setup.bait,
base: setup.base,
weapon: setup.weapon,
trinket: setup.trinket,
skin: setup.skin,
location: setup.location,
sort: setup.sort
});
}
return flattenedSetups;
});
afterFetch = (data) => {
const totalItemsEl = document.querySelector(".export-items-footer .total-items");
totalItemsEl.textContent = data.length.toLocaleString();
};
exportFavoriteSetups = () => {
exportPopup({
type: "favorite-setups-saved",
text: "Favorite Setups",
footerMarkup: '<div class="region-name">Total Values</div><div class="total-items">-</div>',
fetch: fetch2,
afterFetch,
dataIsAvailable: true,
download: {
headers: [
"Name",
"Bait",
"Base",
"Weapon",
"Trinket",
"Skin",
"Location",
"Sort"
]
}
});
};
}
});
// src/modules/data-exporters/export-rankup-forecaster.js
var hasRankupForecaster, fetch3, afterFetch2, exportRankupForecaster;
var init_export_rankup_forecaster = __esm({
"src/modules/data-exporters/export-rankup-forecaster.js"() {
init_sentry_release_injection_stub();
init_exporter();
hasRankupForecaster = () => {
return localStorage.getItem("Chro-forecaster-time");
};
fetch3 = () => __async(void 0, null, function* () {
return JSON.parse(localStorage.getItem("Chro-forecaster-time"));
});
afterFetch2 = (data) => {
const totalItemsEl = document.querySelector(".export-items-footer .total-items");
totalItemsEl.textContent = data.length.toLocaleString();
};
exportRankupForecaster = () => {
exportPopup({
type: "rankup-forecaster-history",
text: "Rankup Forecaster History",
footerMarkup: '<div class="region-name">Total Values</div><div class="total-items">-</div>',
fetch: fetch3,
afterFetch: afterFetch2,
dataIsAvailable: true,
download: {
headers: [
"Date",
"Wisdom"
]
}
});
};
}
});
// src/modules/data-exporters/export-inventory.js
var itemCategories, getData2, exportInventory, export_inventory_default;
var init_export_inventory = __esm({
"src/modules/data-exporters/export-inventory.js"() {
init_sentry_release_injection_stub();
init_utils4();
init_exporter();
itemCategories = [
{ id: "weapon", name: "Weapons" },
{ id: "base", name: "Bases" },
{ id: "trinket", name: "Charms" },
{ id: "bait", name: "Cheeses" },
{ id: "skin", name: "Skins" },
{ id: "crafting_item", name: "Crafting Items" },
{ id: "convertible", name: "Convertible Items" },
{ id: "potion", name: "Potions" },
{ id: "stat", name: "Misc. Items" },
{ id: "collectible", name: "Collectibles" },
{ id: "map_piece", name: "Map Pieces" },
{ id: "adventure", name: "Adventure Items" }
];
getData2 = (classification) => __async(void 0, null, function* () {
const regionEl = document.querySelector(`.item-wrapper[data-region="${classification.id}"]`);
const totalItemsEl = regionEl.querySelector(".total-items");
totalItemsEl.textContent = "...";
totalItemsEl.scrollIntoView({
behavior: "smooth",
block: "nearest"
});
const response = yield doRequest("managers/ajax/users/userInventory.php", {
action: "get_items_by_classification",
"classifications[]": classification.id
});
const items2 = [];
response.items.forEach((item) => {
const itemData = {
item_id: item.item_id || 0,
type: item.type || "",
name: item.name || "",
classification: item.classification || classification.id,
quantity: item.quantity || 0,
thumbnail: item.thumbnail || "",
limited_edition: item.limited_edition || false,
is_tradable: item.is_tradable || false,
is_givable: item.is_givable || false
};
items2.push(itemData);
totalItemsEl.textContent = items2.length.toLocaleString();
});
return {
category: classification.name,
items: items2
};
});
exportInventory = () => {
let inventoryMarkup = "";
itemCategories.forEach((region) => {
inventoryMarkup += `<div class="item-wrapper inventory" data-region="${region.id}">
<div class="region-name">${region.name}</div>
<div class="total-items">-</div>
</div>`;
});
exportPopup({
type: "inventory",
text: "Inventory",
headerMarkup: '<div class="region-name">Category</div><div class="total-items">Items</div>',
itemsMarkup: inventoryMarkup,
footerMarkup: '<div class="region-name">Total</div><div class="total-items">0</div>',
fetch: () => recursiveFetch(itemCategories, getData2),
updateSingleTotal: true,
download: {
headers: [
"Category",
"Item ID",
"Item Type",
"Item Name",
"Classification",
"Quantity",
"Thumbnail",
"Limited Edition",
"Tradable",
"Givable"
],
reduceResults: true
}
});
};
export_inventory_default = exportInventory;
}
});
// src/modules/data-exporters/export-marketplace.js
var fetchPage, fetchTransactions, exportMarketplace, export_marketplace_default;
var init_export_marketplace = __esm({
"src/modules/data-exporters/export-marketplace.js"() {
init_sentry_release_injection_stub();
init_utils4();
init_utils4();
init_exporter();
fetchPage = (page) => __async(void 0, null, function* () {
const response = yield doRequest("managers/ajax/users/marketplace.php", {
action: "get_my_history",
page
});
return (response == null ? void 0 : response.marketplace_history) || [];
});
fetchTransactions = () => __async(void 0, null, function* () {
var _a;
const totalItemsEl = document.querySelector(".export-items-footer .total-items");
totalItemsEl.textContent = "...";
totalItemsEl.scrollIntoView({
behavior: "smooth",
block: "nearest"
});
let page = 1;
let response;
let transactions = [];
page = Number.parseInt(sessionGet("export-marketplace-page"), 10) || 1;
transactions = sessionGet("export-marketplace-transactions", []);
const tradableItems = yield getData("items-tradable");
do {
response = yield fetchPage(page);
for (const item of response) {
transactions.push({
listing_id: item.listing_id,
listing_type: item.listing_type,
item_id: item.item_id,
item_name: ((_a = tradableItems.find(({ id }) => id === item.item_id)) == null ? void 0 : _a.name) || "",
initial_quantity: item.initial_quantity,
remaining_quantity: item.remaining_quantity,
unit_price: item.unit_price,
unit_price_without_tariff: item.unit_price_without_tariff,
total_price: item.total_price,
total_price_without_tariff: item.total_price_without_tariff,
average: item.average,
is_active: item.is_active === "1",
date_updated: item.date_updated,
date_closed: item.date_closed
});
}
yield new Promise((resolve) => setTimeout(resolve, 100));
page++;
sessionSet("export-marketplace-page", page);
sessionSet("export-marketplace-transactions", transactions);
totalItemsEl.textContent = transactions.length.toLocaleString();
} while (response.length > 0);
return transactions;
});
exportMarketplace = () => {
exportPopup({
type: "marketplace-transactions",
text: "Marketplace Transactions",
footerMarkup: '<div class="region-name">Total Transactions</div><div class="total-items">0</div>',
fetch: fetchTransactions,
download: {
headers: [
"Listing ID",
"Listing Type",
"Item ID",
"Item Name",
"Initial Quantity",
"Remaining Quantity",
"Unit Price",
"Unit Price Without Tariff",
"Total Price",
"Total Price Without Tariff",
"Average",
"Is Active",
"Date Updated",
"Date Closed"
]
}
});
};
export_marketplace_default = exportMarketplace;
}
});
// src/modules/data-exporters/export-mice.js
var seenMice, getWeight, getWeightFormatted, getDataForRegion, processWeights, groups, regions, exportMicePopup, exportType, exportMice, export_mice_default;
var init_export_mice = __esm({
"src/modules/data-exporters/export-mice.js"() {
init_sentry_release_injection_stub();
init_utils4();
init_utils4();
init_exporter();
seenMice = [];
getWeight = (weight) => {
weight = weight.toString().replaceAll(",", "").trim();
const ozSplit = weight.split(" oz.");
const lbSplit = weight.split(" lb.");
let weightOz = 0;
if (ozSplit.length === 1 && lbSplit.length === 1) {
weightOz = Number.parseFloat(weight);
}
if (ozSplit.length > 1) {
weightOz = Number.parseFloat(ozSplit[0].trim());
} else if (lbSplit.length > 1) {
const lb = Number.parseInt(lbSplit[0].trim(), 10);
const oz = Number.parseFloat(lbSplit[1].trim());
weightOz = lb * 16 + oz;
}
return weightOz;
};
getWeightFormatted = (weight) => {
const weightOz = getWeight(weight);
const weightLbs = Math.floor(weightOz / 16);
const weightOzRemainder = weightOz % 16;
if (weightLbs > 0) {
return `${weightLbs.toLocaleString()} lb. ${weightOzRemainder} oz.`;
}
return `${weightOzRemainder} oz.`;
};
getDataForRegion = (region) => __async(void 0, null, function* () {
const regionEl = document.querySelector(`.item-wrapper[data-region="${region.id}"]`);
regionEl.scrollIntoView({
behavior: "smooth",
block: "nearest"
});
const miceCaughtEl = regionEl.querySelector(".mice-caught");
const totalCatchesEl = regionEl.querySelector(".total-catches");
const totalWeightEl = regionEl.querySelector(".total-weight");
miceCaughtEl.textContent = "...";
totalCatchesEl.textContent = "...";
totalWeightEl.textContent = "...";
let action;
let view;
if ("group" === exportType) {
action = "get_group";
view = "ViewMouseListGroups";
} else {
action = "get_environment";
view = "ViewMouseListEnvironments";
}
const miceData2 = yield doRequest("managers/ajax/mice/mouse_list.php", {
action,
category: region.id,
user_id: user.user_id,
display_mode: "stats",
view
});
const mice = miceData2.mouse_list_category.subgroups.reduce((acc, cur) => {
return [...acc, ...cur.mice];
}, []);
const weights = [];
let totalCatches = 0;
let totalWeight = 0;
let regionSubtract = 0;
mice.forEach((mouse) => {
if ("region" === exportType && seenMice.includes(mouse.type)) {
regionSubtract++;
return;
}
seenMice.push(mouse.type);
mouse.num_catches = Number.parseInt(mouse.num_catches.toString().replace(",", ""), 10);
const avgWeight = getWeight(mouse.avg_weight);
totalCatches += mouse.num_catches;
totalWeight += avgWeight * mouse.num_catches;
const mouseWeight = {
name: mouse.name,
type: mouse.type,
crown: mouse.crown,
catches: mouse.num_catches,
misses: mouse.num_misses,
avgWeight,
avgWeightFormatted: getWeightFormatted(mouse.avg_weight),
heaviest: getWeight(mouse.heaviest_catch),
heaviestFormatted: getWeightFormatted(mouse.heaviest_catch)
};
weights.push(mouseWeight);
miceCaughtEl.textContent = `${miceData2.mouse_list_category.caught}/${miceData2.mouse_list_category.total}`;
const totalCatchesFormatted = totalCatches.toLocaleString();
totalCatchesEl.textContent = totalCatchesFormatted;
const totalWeightLbs = Math.floor(totalWeight / 16);
const totalWeightOz = totalWeight % 16;
const totalWeightLbsFormatted = totalWeightLbs.toLocaleString();
totalWeightEl.textContent = totalWeightLbs > 0 ? `${totalWeightLbsFormatted} lb. ${totalWeightOz} oz` : `${totalWeightOz} oz`;
});
return {
category: region.id,
regionName: region.name,
caughtMice: miceData2.mouse_list_category.caught - regionSubtract,
uniqueMice: miceData2.mouse_list_category.total - regionSubtract,
totalCatches,
totalWeight,
items: weights
};
});
processWeights = (results) => {
seenMice = [];
const totalUniqueMiceEl = document.querySelector(".export-items-footer .mice-caught");
const totalCatchesEl = document.querySelector(".export-items-footer .total-catches");
const totalWeightEl = document.querySelector(".export-items-footer .total-weight");
if (!totalUniqueMiceEl || !totalCatchesEl || !totalWeightEl) {
return;
}
const totals = results.reduce((acc, { caughtMice, uniqueMice, totalCatches, totalWeight }) => {
acc.caughtMice += caughtMice;
acc.uniqueMice += uniqueMice;
acc.totalCatches += totalCatches;
acc.totalWeight += totalWeight;
return acc;
}, {
caughtMice: 0,
uniqueMice: 0,
totalCatches: 0,
totalWeight: 0
});
totalUniqueMiceEl.textContent = `${totals.caughtMice}/${totals.uniqueMice}`;
totalCatchesEl.textContent = totals.totalCatches.toLocaleString();
totalWeightEl.textContent = getWeightFormatted(totals.totalWeight);
};
groups = [];
regions = [];
exportMicePopup = () => {
let itemTypes;
let title;
if ("group" === exportType) {
title = "Group";
itemTypes = groups;
} else if ("region" === exportType) {
title = "Region";
itemTypes = regions;
} else {
title = "Location";
itemTypes = environments;
}
let itemsMarkup = "";
itemTypes.forEach((region) => {
itemsMarkup += `<div class="item-wrapper" data-region="${region.id}">
<div class="region-name">${region.name}</div>
<div class="mice-caught">0/0</div>
<div class="total-catches">0</div>
<div class="total-weight">0</div>
</div>`;
});
exportPopup({
type: `mouse-stats_${exportType}`,
text: `Mouse Stats by ${exportType === "group" ? "Group" : "Region"}`,
headerMarkup: `<div class="region-name">Group</div>
<div class="mice-caught">Unique Mice</div>
<div class="total-catches">Total Catches</div>
<div class="total-weight">Total Weight</div>`,
itemsMarkup,
footerMarkup: `<div class="region-name">Total</div>
<div class="mice-caught">0/0</div>
<div class="total-catches">0</div>
<div class="total-weight">0</div>`,
fetch: () => recursiveFetch(itemTypes, getDataForRegion),
afterFetch: processWeights,
download: {
headers: [
title,
"Name",
"Type",
"Crown",
"Catches",
"Misses",
"Avg. Weight (oz)",
"Avg. Weight",
"Heaviest (oz)",
"Heaviest"
],
reduceResults: true
}
});
};
exportMice = (type) => __async(void 0, null, function* () {
exportType = type;
regions = yield getData("mice-regions");
groups = yield getData("mice-groups");
environments = yield getData("environments");
exportMicePopup();
});
export_mice_default = exportMice;
}
});
// src/modules/data-exporters/export-scoreboards.js
var getScoreboardData, exportScoreboards, export_scoreboards_default;
var init_export_scoreboards = __esm({
"src/modules/data-exporters/export-scoreboards.js"() {
init_sentry_release_injection_stub();
init_utils4();
init_utils4();
init_exporter();
getScoreboardData = (scoreboard, useWeekly = false, useFriendsOnly = false) => __async(void 0, null, function* () {
var _a;
const totalItemsEl = document.querySelector(`.item-wrapper[data-region="${scoreboard.id}"] .total-items`);
totalItemsEl.textContent = "...";
totalItemsEl.scrollIntoView({
behavior: "smooth",
block: "nearest"
});
const response = yield doRequest("managers/ajax/pages/scoreboards.php", {
action: "get_page",
category: "main",
scoreboard: scoreboard.id,
page: 1,
weekly: useWeekly ? 1 : 0,
friends_only: useFriendsOnly ? 1 : 0,
search: ""
});
if (null === ((_a = response.scoreboard_page) == null ? void 0 : _a.viewer_row)) {
totalItemsEl.textContent = "-";
return {
scoreboard: scoreboard.name,
rank: "",
value: ""
};
}
const entry = {
rank: response.scoreboard_page.viewer_row.rank,
points: response.scoreboard_page.viewer_row.points
};
const rankSuffix = response.scoreboard_page.viewer_row.rank_formatted.replaceAll(/[\d\s]+/g, "");
totalItemsEl.textContent = `${entry.rank.toLocaleString()}${rankSuffix}`;
return {
scoreboard: scoreboard.name,
rank: entry.rank,
value: entry.points
};
});
exportScoreboards = (..._0) => __async(void 0, [..._0], function* ({ useWeekly = false, useFriendsOnly = false } = {}) {
let inventoryMarkup = "";
let scoreboardsToUse = yield getData("scoreboards");
if (useWeekly) {
scoreboardsToUse = scoreboards.filter((scoreboard) => scoreboard.weekly);
}
for (const region of scoreboardsToUse) {
inventoryMarkup += `<div class="item-wrapper scoreboard" data-region="${region.id}">
<div class="region-name">${region.name}</div>
<div class="total-items">-</div>
</div>`;
}
exportPopup({
type: `scoreboard-rankings${useWeekly ? "-weekly" : ""}${useFriendsOnly ? "-friends" : ""}`,
text: `Scoreboard Rankings${useWeekly ? useFriendsOnly ? " (Weekly, Friends)" : " (Weekly)" : useFriendsOnly ? " (Friends)" : ""}`,
headerMarkup: '<div class="region-name">Scoreboard</div><div class="total-items">Place</div>',
itemsMarkup: inventoryMarkup,
fetch: () => recursiveFetch(scoreboardsToUse, (scoreboard) => getScoreboardData(scoreboard, useWeekly, useFriendsOnly)),
download: {
headers: [
"Scoreboard",
"Rank",
"Value"
]
}
});
});
export_scoreboards_default = exportScoreboards;
}
});
// src/modules/data-exporters/styles.css
var styles_default18;
var init_styles19 = __esm({
"src/modules/data-exporters/styles.css"() {
styles_default18 = "#custom-submenu-item-export-data .icon{filter:sepia(1) brightness(.7)}.export-wrapper{display:flex;flex-direction:column;justify-content:space-around}.export-items-wrapper{max-height:70vh;overflow:auto;border:1px solid #7e7e7e}.item-wrapper{display:grid;grid-template-columns:2fr repeat(3,1fr);padding:3px 5px;margin-bottom:2px;font-size:11px}.inventory .item-wrapper,.scoreboard-rankings .item-wrapper,.rankup-forecaster-history .item-wrapper,.marketplace-transactions .item-wrapper{grid-template-columns:2fr 1fr}.item-wrapper .total-items{text-align:right}.item-wrapper:nth-child(odd){background-color:#e2e2e2}.item-wrapper.hidden{display:none}.item-wrapper.export-items-header,.item-wrapper.export-items-footer{padding:5px;margin-bottom:0;font-size:12px;text-align:center;background-color:#bcbcbc;border:1px solid #7e7e7e}.item-wrapper.export-items-header{border-bottom:none}.item-wrapper.export-items-footer{border-top:none}.rankup-forecaster-history .item-wrapper,.marketplace-transactions .item-wrapper{border-top:1px solid #7e7e7e}.export-items-header .region-name,.export-items-footer .region-name{text-align:left}.item-wrapper:nth-last-child(2){margin-bottom:0}.actions-wrapper{display:grid;grid-template-columns:1fr 3fr 1fr 1fr;place-items:center end;margin-top:10px}.actions-wrapper .hidden{display:block;visibility:hidden}.actions-wrapper #export-back{justify-self:start}.actions-wrapper .fetch-data{justify-self:center}.mh-improved-export-data-landing{margin-left:20px;line-height:2;list-style:disc}.item-wrapper .mice-caught,.item-wrapper .total-catches{text-align:center}.item-wrapper .total-weight{text-align:right}\n";
}
});
// src/modules/data-exporters/index.js
var exportDataPopup, main16, init19, data_exporters_default;
var init_data_exporters = __esm({
"src/modules/data-exporters/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
init_export_favorite_setups();
init_export_rankup_forecaster();
init_export_inventory();
init_export_marketplace();
init_export_mice();
init_export_scoreboards();
init_styles19();
exportDataPopup = () => {
const exporters = [
{
id: "mouse-stats-by-group",
name: "Mouse Stats by Group",
callback: () => export_mice_default("group")
},
{
id: "mouse-stats-by-region",
name: "Mouse Stats by Region",
callback: () => export_mice_default("region")
},
{
id: "mouse-stats-by-location",
name: "Mouse Stats by Location",
callback: () => export_mice_default("location")
},
{
id: "inventory",
name: "Inventory",
callback: export_inventory_default
},
{
id: "marketplace-transactions",
name: "Marketplace Transactions",
callback: export_marketplace_default
},
{
id: "scoreboard-rankings",
name: "Scoreboard Rankings",
callback: () => export_scoreboards_default()
},
{
id: "scoreboard-rankings-weekly",
name: "Scoreboard Rankings (Weekly)",
callback: () => export_scoreboards_default({ useWeekly: true })
},
{
id: "scoreboard-rankings-friends",
name: "Scoreboard Rankings (Friends)",
callback: () => export_scoreboards_default({ useFriendsOnly: true })
},
{
id: "scoreboard-rankings-weekly-friends",
name: "Scoreboard Rankings (Weekly, Friends)",
callback: () => export_scoreboards_default({ useWeekly: true, useFriendsOnly: true })
}
];
if (hasFavoriteSetups()) {
exporters.push({
id: "favorite-setups",
name: "Favorite Setups",
callback: exportFavoriteSetups
});
}
if (hasRankupForecaster()) {
exporters.push({
id: "rankup-forecaster-history",
name: "Rankup Forecaster History",
callback: exportRankupForecaster
});
}
let exporterList = "";
exporters.forEach(({ id, name }) => {
exporterList += `<li><a href="#" id="export-${id}">${name}</a></li>`;
});
createPopup({
title: "Export Data",
content: `<ul class="mh-improved-export-data-landing">${exporterList}</ul>`
});
exporters.forEach(({ id, callback }) => {
const button = document.querySelector(`#export-${id}`);
if (button) {
button.addEventListener("click", (e) => {
e.preventDefault();
callback();
});
}
});
};
main16 = () => {
addSubmenuItem({
menu: "kingdom",
label: "Export Data",
icon: "https://www.mousehuntgame.com/images/items/crafting_items/transparent_thumb/c6f39c2b522f114c788f5fb65e3ab8d7.png",
class: "export-data",
callback: exportDataPopup
});
};
init19 = () => __async(void 0, null, function* () {
addStyles(styles_default18);
main16();
onEvent("show-export-data", exportDataPopup);
});
data_exporters_default = {
id: "data-exporters",
name: "Data Exporters",
type: "feature",
default: true,
description: "Export data from the game.",
load: init19
};
}
});
// src/modules/delayed-tooltips/styles.css
var styles_default19;
var init_styles20 = __esm({
"src/modules/delayed-tooltips/styles.css"() {
styles_default19 = ".mousehuntTooltipParent:hover>.mousehuntTooltip{opacity:1}.mousehuntTooltip{opacity:0;transition:opacity 1s linear .4s}.PageHunterProfile .userInteractionButtonsView-button .mousehuntTooltip,.no-delayed-tooltips .mousehuntTooltip{display:none;opacity:unset;transition:unset}\n";
}
});
// src/modules/delayed-tooltips/index.js
var init20, delayed_tooltips_default;
var init_delayed_tooltips = __esm({
"src/modules/delayed-tooltips/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
init_styles20();
init20 = () => __async(void 0, null, function* () {
addStyles(styles_default19);
document.addEventListener("keydown", (e) => {
if (e.shiftKey) {
document.body.classList.add("no-delayed-tooltips");
}
});
document.addEventListener("keyup", (e) => {
if (!e.shiftKey) {
document.body.classList.remove("no-delayed-tooltips");
}
});
});
delayed_tooltips_default = {
id: "delayed-tooltips",
name: "Delayed Tooltips",
type: "feature",
default: false,
description: "Delays the display of tooltips when you mouse over something. If you hold down the shift key, the tooltips will be displayed immediately.",
load: init20
};
}
});
// src/modules/favorite-setups/styles.css
var styles_default20;
var init_styles21 = __esm({
"src/modules/favorite-setups/styles.css"() {
styles_default20 = `.mh-improved-favorite-setups-button{margin:10px 0}.mh-improved-favorite-setups-button-label{position:absolute;top:0;right:10px;bottom:0;display:flex;align-items:center;font-size:13px;font-weight:100;color:#926944;vertical-align:bottom}.mh-improved-favorite-setups-blueprint-container{position:absolute;inset:10px;padding:5px 6px;margin-left:10px;color:#4e300b;background:#f6f3eb;border:1px solid #534022;border-radius:3px;box-shadow:-1px -1px 2px #d3cecb inset}.mh-improved-favorite-setups-blueprint-container .header{margin:10px 0;font-size:13px;color:#926944;text-align:center}.mh-improved-favorite-setups-blueprint-container .content{position:absolute;inset:50px 5px 10px;overflow-y:auto}.mh-improved-favorite-setups-blueprint-container .row{display:grid;grid-template-columns:1fr repeat(4,50px);padding:3px;margin-bottom:15px;background:#fff;border:1px solid #ceb7a6;border-radius:5px}.mh-improved-favorite-setups-blueprint-container .controls{display:flex;flex-direction:column;gap:10px;align-items:center;justify-content:center}.mh-improved-favorite-setups-blueprint-container .button-wrapper{display:flex;gap:10px;align-items:center;justify-content:center}.mh-improved-favorite-setups-blueprint-container .campPage-trap-itemBrowser-favorite-item{width:100%}.mh-improved-favorite-setups-blueprint-container .controls .label{font-size:13px;text-align:center}.mh-improved-favorite-setups-blueprint-container .controls .action{padding:4px 6px;font-size:11px;font-weight:400;line-height:inherit}.mh-improved-favorite-setups-blueprint-container .edit{position:absolute;right:10px}.mh-improved-favorite-setups-blueprint-container .controls .delete,.mh-improved-favorite-setups-blueprint-container .editing .controls .delete,.mh-improved-favorite-setups-blueprint-container .editing .controls .edit-setup,.mh-improved-favorite-setups-blueprint-container.editing .controls .edit-setup,.mh-improved-favorite-setups-blueprint-container .controls .save-setup,.mh-improved-favorite-setups-blueprint-container .controls .cancel-setup,.mh-improved-favorite-setups-blueprint-container.editing .controls .arm,.mh-improved-favorite-setups-blueprint-container .editing .controls .arm{display:none}.mh-improved-favorite-setups-blueprint-container.editing .controls .delete,.mh-improved-favorite-setups-blueprint-container .editing .controls .save-setup,.mh-improved-favorite-setups-blueprint-container .editing .controls .cancel-setup{display:block}.mh-improved-favorite-setups-blueprint-container .row.flash{background-color:#b9ffb9}.mh-improved-favorite-setups-blueprint-container .controls input{width:115px}.row.editing .campPage-trap-itemBrowser-favorite-item:after{position:absolute;right:5px;bottom:0;left:5px;display:flex;align-items:center;justify-content:center;padding:2px 0;content:"edit";background-color:#eeeeeeed;border:1px solid #585858}.row.editing .campPage-trap-itemBrowser-favorite-item:hover:after{background-color:#ddd}.mh-improved-favorite-setups-component-picker-popup-body-items{display:grid;grid-template-columns:1fr 1fr;gap:10px}.mh-improved-favorite-setups-component-picker .prefix,.mh-improved-favorite-setups-component-picker .content{background-color:#f6f3eb}.mh-improved-favorite-setups-component-picker .content .content{max-height:90vh;overflow:auto}.mh-improved-favorite-setups-component-picker .campPage-trap-itemBrowser-item{width:auto;max-width:300px}.mh-improved-favorite-setups-component-picker-popup-search{display:flex;align-items:center;justify-content:center;margin-bottom:20px}.mh-improved-favorite-setups-component-picker-popup-search input{width:350px;padding:10px}.mh-improved-favorite-setups-component-picker .campPage-trap-itemBrowser-item-description{margin-left:0}.mh-improved-favorite-setups-component-picker .trinket .campPage-trap-itemBrowser-item-content{width:80%}a.random-title:after{position:absolute;top:4px;right:-19px;display:block;width:12px;height:12px;padding:2px;content:"";background:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99" /></svg>');background-color:#fff;border-radius:50%}a.random-title:hover:after{background-color:#ddd}@keyframes mh-improved-favorite-setups-component-picker-popup-search-loading{0%{transform:rotate(0)}to{transform:rotate(360deg)}}a.random-title.loading:after{animation:mh-improved-favorite-setups-component-picker-popup-search-loading 1s linear infinite}.mh-improved-favorite-setups-blueprint-container .editing .controls .label{position:relative;place-self:self-start}
`;
}
});
// src/modules/favorite-setups/index.js
var getFavoriteSetups, saveFavoriteSetup, normalizeSetup, getCurrentSetup, makeImage, makeButton2, getCheeseEffect, makeImagePicker, armItem, makeBlueprintRow, makeBlueprintContainer, getNameOfCurrentSetup, updateFavoriteSetupName, addFavoriteSetupsButton, isFavoriteSetupsShowing, hideFavoriteSetups, showFavoriteSetups, replaceCloseBlueprintDrawer, init21, favorite_setups_default;
var init_favorite_setups = __esm({
"src/modules/favorite-setups/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
init_styles21();
getFavoriteSetups = () => {
return getSetting("favorite-setups", []);
};
saveFavoriteSetup = (setup) => __async(void 0, null, function* () {
const setups = getFavoriteSetups();
const normalizedSetup = normalizeSetup(setup);
const setupName = yield fetch("https://setup-namer.mouse.rip", {
method: "POST",
headers: getHeaders(),
body: JSON.stringify([
normalizedSetup.bait_id,
normalizedSetup.base_id,
normalizedSetup.weapon_id,
normalizedSetup.trinket_id
])
});
const setupNameData = yield setupName.json();
if (setupNameData.name) {
normalizedSetup.name = setupNameData.name;
}
setups.push(normalizedSetup);
saveSetting("favorite-setups", setups);
return normalizedSetup;
});
normalizeSetup = (setup) => {
return Object.keys(setup).reduce((acc, key) => {
acc[key] = setup[key] ? setup[key].toString() : "";
return acc;
}, {});
};
getCurrentSetup = () => {
return normalizeSetup({
id: "current",
name: "Current Setup",
bait_id: user.bait_item_id,
base_id: user.base_item_id,
weapon_id: user.weapon_item_id,
trinket_id: user.trinket_item_id
});
};
makeImage = (type, id, thumbnail) => {
const wrapper = makeElement("div", "campPage-trap-itemBrowser-favorite-item");
wrapper.setAttribute("data-item-id", id);
wrapper.setAttribute("data-item-type", type);
const item = makeElement("div", ["campPage-trap-itemBrowser-favorite-item-image"]);
item.style.backgroundImage = `url(${thumbnail})`;
makeElement("div", "campPage-trap-itemBrowser-favorite-item-frame", "", item);
wrapper.append(item);
return wrapper;
};
makeButton2 = (button) => {
const buttonElement = makeElement("a", ["mousehuntActionButton", "action", ...button.className]);
makeElement("span", "", button.text, buttonElement);
buttonElement.addEventListener("click", button.callback);
return buttonElement;
};
getCheeseEffect = (textValue) => {
const data = {
"Uber Fresh": 13,
"Ultimately Fresh": 12,
"Insanely Fresh": 11,
"Extremely Fresh": 10,
"Very Fresh": 9,
Fresh: 8,
"No Effect": 7,
Stale: 6,
"Very Stale": 5,
"Extremely Stale": 4,
"Insanely Stale": 3,
"Ultimately Stale": 2,
"Uber Stale": 1
};
return data[textValue];
};
makeImagePicker = (setupId, type, currentId, callback) => __async(void 0, null, function* () {
const response = yield doRequest("managers/ajax/users/gettrapcomponents.php", {
classification: type
});
const items2 = (response == null ? void 0 : response.components) || [];
items2.sort((a, b) => {
if (a.name < b.name) {
return -1;
}
if (a.name > b.name) {
return 1;
}
return 0;
});
let content = '<div class="mh-improved-favorite-setups-component-picker-popup">';
content += '<div class="mh-improved-favorite-setups-component-picker-popup-body">';
content += '<div class="mh-improved-favorite-setups-component-picker-popup-search">';
content += '<input type="text" placeholder="Search" id="mh-improved-favorite-setups-component-picker-popup-search-input" />';
content += "</div>";
content += '<div class="mh-improved-favorite-setups-component-picker-popup-body-items">';
for (const item of items2) {
const getStatRow = (stat, title, formatted, compare) => {
let compareStat = item[stat];
if ("cheese_effect" === stat) {
compareStat = getCheeseEffect(item);
compare = getCheeseEffect(compare);
}
const compareClass = compare === compareStat ? "" : compare > compareStat ? "better" : "worse";
return `<div class="campPage-trap-itemBrowser-item-stat ${stat} ${compareClass}" title="${title}">
<div class="value"><span>${formatted}</span></div>
</div>`;
};
content += `<div class="campPage-trap-itemBrowser-item loaded ${type}" data-item-id="${item.item_id}">`;
content += ' <div class="campPage-trap-itemBrowser-item-leftBar">';
content += ` <a href="#"><div class="campPage-trap-itemBrowser-item-image" style="background-image:url(${item.thumbnail});"></div></a>`;
content += ` <a href="#" class="campPage-trap-itemBrowser-item-armButton save-button" data-item-id="${item.item_id}" data-item-classification="${type}" data-item-image="${item.thumbnail}">Select</a>`;
content += " </div>";
content += ' <div class="campPage-trap-itemBrowser-item-content">';
content += ` <div class="campPage-trap-itemBrowser-item-name">${item.name}</div>`;
if ("bait" === type || "trinket" === type) {
const quantityFormatted = item.quantity.toLocaleString();
content += `<div class="campPage-trap-itemBrowser-item-quantity"><span class="quantity">${quantityFormatted}</span><span class="label">Quantity</span></div>`;
}
if (item.has_stats) {
content += '<div class="campPage-trap-itemBrowser-item-statContainer">';
content += item.has_power ? getStatRow("power", "Power", item.power_formatted, user.trap_power) : "";
content += item.has_power_bonus ? getStatRow("power_bonus", "Power Bonus", item.power_bonus_formatted, user.trap_power_bonus) : "";
content += item.has_attraction_bonus ? getStatRow("attraction_bonus", "Attraction Bonus", item.attraction_bonus_formatted, user.trap_attraction_bonus) : "";
content += item.has_luck ? getStatRow("luck", "Luck", item.luck_formatted, user.trap_luck) : "";
content += getStatRow("cheese_effect", "Cheese Effect", item.cheese_effect, user.trap_cheese_effect);
content += "</div>";
}
content += '<div class="campPage-trap-itemBrowser-item-description shortDescription">';
content += item.consume_method ? `<div class="campPage-trap-itemBrowser-item-description-consumeMethod"><b>Consumed on:</b> ${item.consume_method}</div>` : "";
if ("bait" === type) {
let description = item.description.replaceAll(/<\/?[^>]+(>|$)/g, "");
description = description.slice(0, 200);
if (item.description.length > 150) {
description += "\u2026";
}
content += `<div class="campPage-trap-itemBrowser-item-description-text">${description}</div>`;
}
content += "</div>";
content += "</div>";
content += "</div>";
}
content += "</div>";
content += "</div>";
content += "</div>";
const popup = createPopup({
id: "mh-improved-favorite-setups-component-picker",
title: "",
content,
className: "mh-improved-favorite-setups-component-picker"
});
popup.setIsModal(true);
popup.show();
const saveButtons = document.querySelectorAll(".campPage-trap-itemBrowser-item-armButton.save-button");
saveButtons.forEach((saveButton) => {
saveButton.addEventListener("click", (event) => __async(void 0, null, function* () {
event.preventDefault();
event.stopPropagation();
callback(
saveButton.getAttribute("data-item-id"),
saveButton.getAttribute("data-item-classification"),
saveButton.getAttribute("data-item-image")
);
popup.hide();
}));
});
const searchInput = document.querySelector("#mh-improved-favorite-setups-component-picker-popup-search-input");
if (!searchInput) {
return;
}
searchInput.focus();
searchInput.addEventListener("keyup", () => {
const filter = searchInput.value.toLowerCase();
const searchItems = document.querySelectorAll(".campPage-trap-itemBrowser-item");
searchItems.forEach((item) => {
const name = item.querySelector(".campPage-trap-itemBrowser-item-name");
if (name.textContent.toLowerCase().includes(filter)) {
item.classList.remove("hidden");
} else {
item.classList.add("hidden");
}
});
});
});
armItem = (itemId, itemType) => __async(void 0, null, function* () {
return new Promise((resolve, reject) => {
hg.utils.TrapControl.armItem(itemId, itemType).go(resolve, reject);
});
});
makeBlueprintRow = (setup, isCurrent = false) => __async(void 0, null, function* () {
const setupContainer = makeElement("div", ["row"]);
const controls = makeElement("div", ["controls"]);
makeElement("div", ["label"], setup.name, controls);
const buttonWrapper = makeElement("div", ["button-wrapper"]);
if (isCurrent) {
buttonWrapper.append(makeButton2({
text: "Save",
className: ["save", "lightBlue"],
callback: () => __async(void 0, null, function* () {
let currentSetup = getCurrentSetup();
currentSetup.id = `${setup.bait_id}-${setup.base_id}-${setup.weapon_id}-${setup.trinket_id}`;
const setups = getFavoriteSetups();
if (setups.length) {
const existingSetup = setups.find((s) => s.id === currentSetup.id);
if (existingSetup) {
const row = document.querySelector(`.mh-improved-favorite-setups-blueprint-container .row[data-setup-id="${currentSetup.id}"]`);
row.classList.add("flash");
setTimeout(() => {
row.classList.remove("flash");
}, 1e3);
return;
}
}
currentSetup = yield saveFavoriteSetup(currentSetup);
const setupRow = yield makeBlueprintRow(currentSetup);
setupRow.setAttribute("data-setup-id", currentSetup.id);
const body = document.querySelector(".mh-improved-favorite-setups-blueprint-container .content");
body.append(setupRow);
updateFavoriteSetupName();
})
}));
} else {
buttonWrapper.append(makeButton2({
text: "Arm",
className: ["arm"],
callback: () => __async(void 0, null, function* () {
const setupId = setupContainer.getAttribute("data-setup-id");
debuglog("favorite-setups", `Arming setup ${setupId}`);
const setups = getFavoriteSetups();
if (!setups.length) {
return;
}
const index = setups.findIndex((s) => s.id === setupId);
const thisSetup = setups[index];
if (thisSetup.bait_id && thisSetup.bait_id != user.bait_id) {
yield armItem(thisSetup.bait_id, "bait");
}
if (thisSetup.base_id && thisSetup.base_id != user.base_id) {
yield armItem(thisSetup.base_id, "base");
}
if (thisSetup.weapon_id && thisSetup.weapon_id != user.weapon_id) {
yield armItem(thisSetup.weapon_id, "weapon");
}
if (thisSetup.trinket_id && thisSetup.trinket_id != user.trinket_id) {
yield armItem(thisSetup.trinket_id, "trinket");
}
updateFavoriteSetupName();
})
}));
buttonWrapper.append(makeButton2({
text: "Edit",
className: ["edit-setup"],
callback: () => {
const setupId = setupContainer.getAttribute("data-setup-id");
debuglog("favorite-setups", `Editing setup ${setupId}`);
setupContainer.classList.add("editing");
const title = setupContainer.querySelector(".label");
const randomTitleButton = makeElement("a", "random-title");
randomTitleButton.setAttribute("title", "Generate a random name for this setup");
randomTitleButton.addEventListener("click", (e) => __async(void 0, null, function* () {
e.preventDefault();
e.target.classList.add("loading");
const response = yield fetch("https://setup-namer.mouse.rip", {
method: "POST",
headers: getHeaders(),
body: JSON.stringify([
setup.bait_id,
setup.base_id,
setup.weapon_id,
setup.trinket_id
])
});
const setupNameData = yield response.json();
if (setupNameData.name) {
title.querySelector("input").value = setupNameData.name;
}
e.target.classList.remove("loading");
}));
const titleInput = document.createElement("input");
titleInput.value = title.textContent;
title.textContent = "";
title.append(titleInput);
title.prepend(randomTitleButton);
const images = setupContainer.querySelectorAll(".campPage-trap-itemBrowser-favorite-item");
images.forEach((image) => {
image.classList.add("clickable");
image.addEventListener("click", () => __async(void 0, null, function* () {
const itemType = image.getAttribute("data-item-type");
const itemId = image.getAttribute("data-item-id");
const imageDisplay = image.querySelector(".campPage-trap-itemBrowser-favorite-item-image");
yield makeImagePicker(setupId, itemType, itemId, (newItemId, newItemType, newItemImageUrl) => {
if (itemType !== newItemType) {
return;
}
if (itemId === newItemId) {
return;
}
image.setAttribute("data-new-item-id", newItemId);
image.setAttribute("data-new-item-image", newItemImageUrl);
image.setAttribute("data-old-image-url", imageDisplay.style.backgroundImage);
imageDisplay.style.backgroundImage = `url(${newItemImageUrl})`;
});
}));
});
}
}));
buttonWrapper.append(makeButton2({
text: "Save",
className: ["save-setup"],
callback: () => {
const setupId = setupContainer.getAttribute("data-setup-id");
debuglog("favorite-setups", `Saving setup ${setupId}`);
setupContainer.classList.remove("editing");
const title = setupContainer.querySelector(".label");
const titleInput = title.querySelector("input");
const newSetup = __spreadProps(__spreadValues({}, setup), {
name: titleInput.value
});
const images = setupContainer.querySelectorAll(".campPage-trap-itemBrowser-favorite-item");
images.forEach((image) => {
const newItemId = image.getAttribute("data-new-item-id");
if (!newItemId) {
return;
}
const itemType = image.getAttribute("data-item-type");
newSetup[`${itemType}_id`] = newItemId;
image.removeAttribute("data-new-item-id");
image.removeAttribute("data-new-item-image");
image.removeAttribute("data-old-image-url");
});
let setups = getFavoriteSetups();
if (!setups.length) {
setups = [];
}
const index = setups.findIndex((s) => s.id === setupId);
newSetup.id = Math.random().toString(36).slice(2, 15) + Math.random().toString(36).slice(2, 15);
setups[index] = newSetup;
saveSetting("favorite-setups", setups);
title.textContent = newSetup.name;
titleInput.remove();
updateFavoriteSetupName();
}
}));
buttonWrapper.append(makeButton2({
text: "Cancel",
className: ["cancel-setup"],
callback: () => {
setupContainer.classList.remove("editing");
const titleInput = setupContainer.querySelector(".label input");
const title = setupContainer.querySelector(".label");
title.textContent = setup.name;
titleInput.remove();
const images = setupContainer.querySelectorAll(".campPage-trap-itemBrowser-favorite-item");
images.forEach((image) => {
const newItemId = image.getAttribute("data-new-item-id");
if (!newItemId) {
return;
}
const imageDisplay = image.querySelector(".campPage-trap-itemBrowser-favorite-item-image");
imageDisplay.style.backgroundImage = image.getAttribute("data-old-image-url");
image.removeAttribute("data-new-item-id");
image.removeAttribute("data-new-item-image");
image.removeAttribute("data-old-image-url");
});
}
}));
buttonWrapper.append(makeButton2({
text: "Delete",
className: ["delete", "danger"],
callback: () => {
const setupId = setupContainer.getAttribute("data-setup-id");
debuglog("favorite-setups", `Deleting setup ${setupId}`);
const confirmed = confirm("Are you sure you want to delete this setup?");
if (!confirmed) {
return;
}
let setups = getFavoriteSetups();
if (!setups.length) {
setups = [];
}
const index = setups.findIndex((s) => s.id === setupId);
setups.splice(index, 1);
saveSetting("favorite-setups", setups);
setupContainer.remove();
}
}));
}
controls.append(buttonWrapper);
setupContainer.append(controls);
let cachedThumbnails = sessionGet("favorite-setups-thumbnails", {});
const needThumbnails = [];
const items2 = [
setup.bait_id,
setup.base_id,
setup.weapon_id,
setup.trinket_id
];
for (const item of items2) {
if (!cachedThumbnails[item]) {
needThumbnails.push(item);
}
}
if (needThumbnails.length) {
const grabbedThumbnailsReq = yield fetch("https://images.mouse.rip", {
method: "POST",
headers: getHeaders(),
body: JSON.stringify(needThumbnails)
});
const grabbedThumbnails = yield grabbedThumbnailsReq.json();
const thumbnails = __spreadValues(__spreadValues({}, cachedThumbnails), grabbedThumbnails);
sessionSet("favorite-setups-thumbnails", thumbnails);
cachedThumbnails = thumbnails;
}
setupContainer.append(makeImage("bait", setup.bait_id, cachedThumbnails[setup.bait_id]));
setupContainer.append(makeImage("base", setup.base_id, cachedThumbnails[setup.base_id]));
setupContainer.append(makeImage("weapon", setup.weapon_id, cachedThumbnails[setup.weapon_id]));
setupContainer.append(makeImage("trinket", setup.trinket_id, cachedThumbnails[setup.trinket_id]));
return setupContainer;
});
makeBlueprintContainer = () => __async(void 0, null, function* () {
const existing = document.querySelector(".mh-improved-favorite-setups-blueprint-container");
if (existing) {
existing.remove();
}
const container = makeElement("div", "mh-improved-favorite-setups-blueprint-container");
const header = makeElement("div", ["header"]);
makeElement("b", ["title"], "Favorite Setups", header);
const editLink = makeElement("a", ["mousehuntActionButton", "tiny", "edit"]);
const editLinkText = makeElement("span", "", "Edit");
editLink.append(editLinkText);
let isEditing3 = false;
editLink.addEventListener("click", () => {
isEditing3 = !isEditing3;
if (isEditing3) {
editLinkText.innerHTML = "Done";
container.classList.add("editing");
} else {
editLinkText.innerHTML = "Edit";
container.classList.remove("editing");
}
});
header.append(editLink);
container.append(header);
const body = makeElement("div", ["content"]);
const currentSetupRow = yield makeBlueprintRow(getCurrentSetup(), true);
currentSetupRow.classList.add("current-setup");
body.append(currentSetupRow);
const setups = getFavoriteSetups();
if (setups.length) {
for (const setup of setups) {
const setupContainer = yield makeBlueprintRow(setup);
setupContainer.setAttribute("data-setup-id", setup.id);
body.append(setupContainer);
}
}
container.append(body);
const appendTo = document.querySelector(".campPage-trap-blueprintContainer");
if (!appendTo) {
return false;
}
appendTo.append(container);
return container;
});
getNameOfCurrentSetup = () => {
const setups = getFavoriteSetups();
if (!setups.length) {
return "";
}
const currentSetup = getCurrentSetup();
const setup = setups.find((s) => {
return s.bait_id === currentSetup.bait_id && s.base_id === currentSetup.base_id && s.weapon_id === currentSetup.weapon_id && s.trinket_id === currentSetup.trinket_id;
});
if (setup) {
return setup.name;
}
return "";
};
updateFavoriteSetupName = () => {
const label = document.querySelector(".mh-improved-favorite-setups-button-label");
if (!label) {
return;
}
label.innerHTML = getNameOfCurrentSetup();
};
addFavoriteSetupsButton = () => {
if ("camp" !== getCurrentPage()) {
return;
}
const existingButton = document.querySelector(".mh-improved-favorite-setups-button");
if (existingButton) {
return;
}
const appendTo = document.querySelector(".campPage-trap-itemStats");
if (!appendTo) {
return;
}
const button = makeElement("a", ["mh-improved-favorite-setups-button", "campPage-trap-trapEffectiveness"]);
makeElement("div", ["mh-improved-favorite-setups-button-text"], "Favorite Setups", button);
const label = makeElement("div", ["mh-improved-favorite-setups-button-label"]);
label.innerHTML = getNameOfCurrentSetup();
button.append(label);
button.addEventListener("click", () => __async(void 0, null, function* () {
if (isFavoriteSetupsShowing()) {
hideFavoriteSetups();
} else {
yield makeBlueprintContainer();
showFavoriteSetups();
}
}));
appendTo.parentNode.insertBefore(button, appendTo.nextSibling);
};
isFavoriteSetupsShowing = () => {
const pageContainer = document.querySelector("#mousehuntContainer");
if (!pageContainer) {
return false;
}
return pageContainer.classList.contains("showFavoriteSetups");
};
hideFavoriteSetups = () => {
const pageContainer = document.querySelector("#mousehuntContainer");
if (!pageContainer) {
return;
}
pageContainer.classList.remove("showBlueprint", "showFavoriteSetups");
const container = document.querySelector(".mh-improved-favorite-setups-blueprint-container");
if (container) {
container.classList.add("hidden");
}
};
showFavoriteSetups = () => {
const pageContainer = document.querySelector("#mousehuntContainer");
if (!pageContainer) {
return;
}
pageContainer.classList.remove("editTrap", "showTrapEffectiveness");
pageContainer.classList.add("showBlueprint", "showFavoriteSetups");
const container = document.querySelector(".mh-improved-favorite-setups-blueprint-container");
if (container) {
container.classList.remove("hidden");
}
};
replaceCloseBlueprintDrawer = () => {
const _closeBlueprintDrawer = app.pages.CampPage.closeBlueprintDrawer;
app.pages.CampPage.closeBlueprintDrawer = (...args) => {
if (isFavoriteSetupsShowing()) {
hideFavoriteSetups();
}
_closeBlueprintDrawer(...args);
};
const _toggleItemBrowser = app.pages.CampPage.toggleItemBrowser;
app.pages.CampPage.toggleItemBrowser = (...args) => {
if (isFavoriteSetupsShowing()) {
hideFavoriteSetups();
}
_toggleItemBrowser(...args);
};
const _toggleTrapEffectiveness = app.pages.CampPage.toggleTrapEffectiveness;
app.pages.CampPage.toggleTrapEffectiveness = (...args) => {
if (isFavoriteSetupsShowing()) {
hideFavoriteSetups();
}
_toggleTrapEffectiveness(...args);
};
};
init21 = () => __async(void 0, null, function* () {
addStyles(styles_default20);
onNavigation(addFavoriteSetupsButton, {
page: "camp"
});
let timeoutId;
onEvent("camp_page_arm_item", () => {
if (timeoutId) {
clearTimeout(timeoutId);
}
timeoutId = setTimeout(updateFavoriteSetupName, 500);
});
replaceCloseBlueprintDrawer();
});
favorite_setups_default = {
id: "favorite-setups",
name: "Favorite Setups",
type: "feature",
default: false,
description: "Save your favorite setups and arm them with a single click.",
load: init21
};
}
});
// src/modules/flrt-helper/styles.css
var styles_default21;
var init_styles22 = __esm({
"src/modules/flrt-helper/styles.css"() {
styles_default21 = '.mh-improved-flrt-helper-popup{display:grid;grid-template-columns:1fr 1fr;justify-items:center}.mh-improved-flrt-helper-popup .flrt-search-form{display:flex;align-items:center;justify-content:space-around;padding:10px;background-color:#dcf7ff;border:1px solid #a1a1a1;border-radius:5px;box-shadow:0 1px 2px -1px #b5b5b5}.mh-improved-flrt-helper-popup .flrt-friend-finder{display:flex;flex-direction:column}.mh-improved-flrt-helper-popup .friendsPage-friendRow.friendsPage-requestRow{border-radius:5px;box-shadow:1px 1px 4px #cdb495}.mh-improved-flrt-helper-popup .friendsPage-friendRow-imageContainer{width:75px;height:75px;margin-left:3px}.mh-improved-flrt-helper-popup .friendsPage-friendRow-content{max-width:226px;min-height:75px}.mh-improved-flrt-helper-popup .friendsPage-friendRow-titleBar-icon{top:-10px;left:0;height:35px}.mh-improved-flrt-helper-popup .friendsPage-friendRow-titleBar-name{padding-left:15px;font-size:14px}.mh-improved-flrt-helper-popup .friendsPage-friendRow-titleBar{padding-left:20px}.mh-improved-flrt-helper-popup .friendsPage-friendRow-titleBar-titleDetail{left:7px}.mh-improved-flrt-helper-popup .friendsPage-friendRow-environment{position:relative;margin-left:-10px}.mh-improved-flrt-helper-popup .friendsPage-friendRow-environment-icon{position:absolute;top:-5px;left:0;width:20px;height:20px}.mh-improved-flrt-helper-popup .friendsPage-friendRow-environment-name{position:absolute;left:25px;font-size:10px;vertical-align:top}.mh-improved-flrt-helper-popup .friendsPage-friendRow .friendsPage-friendRow-actions{top:40px;right:0}.mh-improved-flrt-helper-popup .friendsPage-friendRow-actions-interactionButtons{padding-right:0}.mh-improved-flrt-helper-popup .friendsPage-friendRow-actions .mousehuntTooltip,.mh-improved-flrt-helper-popup .friendsPage-requestRow-actionStatus.accepted,.mh-improved-flrt-helper-popup .userInteractionButtonsView-action[data-action=send_daily_gift],.mh-improved-flrt-helper-popup .userInteractionButtonsView-action[data-action=send_draw_ballot]{display:none!important}.mh-improved-flrt-helper-popup .userInteractionButtonsView-button{width:45px;height:45px;background-size:45px}.mh-improved-flrt-helper-popup .friendsPage-friendRow-statsContainer{border-radius:0}.mh-improved-flrt-helper-popup .friendsPage-friendRow-stat.map,.mh-improved-flrt-helper-popup .friendsPage-friendRow-stat.team,.mh-improved-flrt-helper-popup .friendsPage-friendRow-stat-label{display:none!important}.mh-improved-flrt-helper-popup .friendsPage-friendRow-stat.online span{width:auto}.mh-improved-flrt-helper-popup .friendsPage-friendRow-stat{width:auto;margin-right:10px}.mh-improved-flrt-helper-popup .instructions{padding:10px;margin-top:auto;font-style:italic}.mh-improved-flrt-helper-popup .flrt-items-to-send{min-width:80%}.mh-improved-flrt-helper-popup .flrt-item{display:flex;flex-direction:row;align-items:center;width:100%;padding:5px;margin-bottom:5px;cursor:pointer;background-color:#eee;border:1px solid #ddd;border-radius:5px;box-shadow:0 1px 2px -1px #b5b5b5}.mh-improved-flrt-helper-popup .flrt-item .itemImage,.mh-improved-flrt-helper-popup .flrt-item .itemImage img{width:45px;height:45px}.mh-improved-flrt-helper-popup .flrt-item-info{display:flex;align-items:center;margin-left:5px}.mh-improved-flrt-helper-popup .flrt-item-name{font-weight:900;vertical-align:top}.mh-improved-flrt-helper-popup .flrt-item-disabled .itemImage{filter:grayscale(1);opacity:.5}.mh-improved-flrt-helper-popup .flrt-item-info input[type=checkbox]:disabled{opacity:0}.mh-improved-flrt-helper-popup .flrt-item.flrt-item-sending{background-color:#f3c019}.mh-improved-flrt-helper-popup .flrt-item.flrt-item-sent{position:relative;background-color:#3fcd84}.mh-improved-flrt-helper-popup .flrt-item.flrt-item-sent:after{position:absolute;right:0;display:inline-block;width:25px;height:25px;margin-right:5px;margin-bottom:-2px;vertical-align:middle;content:"";background-image:url(https://www.mousehuntgame.com/images/ui/events/winter_hunt_2013/checkmark.png?asset_cache_version=2);background-repeat:no-repeat;background-size:100%}\n';
}
});
// src/modules/flrt-helper/index.js
var addFlrtButtonToConvertible, sendItemsToMaptain, flrtPopup, init22, flrt_helper_default;
var init_flrt_helper = __esm({
"src/modules/flrt-helper/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
init_utils4();
init_styles22();
addFlrtButtonToConvertible = (response) => __async(void 0, null, function* () {
if (!(response.convertible_open && response.convertible_open.name && response.convertible_open.items)) {
return;
}
const items2 = [];
const tradableItems = yield getData("type");
for (const element of response.convertible_open.items) {
const itemData = {
type: element.type,
name: element.name,
image: element.thumb,
quantity: element.quantity
};
if (tradableItems) {
const tradable = tradableItems.find((tradableItem) => {
return tradableItem.type === element.type;
});
if (tradable) {
items2.push(itemData);
}
} else {
items2.push(itemData);
}
}
const buttons = document.querySelector(".jsDialogContainer .suffix");
if (!buttons) {
return;
}
const flrtBtn = makeElement("button", ["mousehuntActionButton", "small", "button"]);
makeElement("span", [], "Return to Maptain", flrtBtn);
flrtBtn.addEventListener("click", () => {
flrtPopup(items2);
});
buttons.prepend(flrtBtn);
});
sendItemsToMaptain = (snuid, items2) => __async(void 0, null, function* () {
for (const item of items2) {
item.element.classList.add("flrt-item-sending");
yield doRequest("managers/ajax/users/supplytransfer.php", {
item: item.type,
item_quantity: item.quantity,
receiver: snuid
});
item.element.classList.remove("flrt-item-sending");
item.element.classList.add("flrt-item-sent");
}
const sendButton = document.querySelector(".flrt-send-items");
if (sendButton) {
sendButton.outerHTML = '<input type="submit" value="Continue" class="jsDialogClose button">';
}
});
flrtPopup = (items2) => {
const lastMaptain = getLastMaptain();
let itemContent = "";
items2.forEach((item) => {
itemContent += `<div class="flrt-item" data-item-type="${item.type}" data-item-quantity="${item.quantity}">
<div class="itemImage">
<img src="${item.image}">
<div class="quantity">${item.quantity}</div>
</div>
<div class="flrt-item-info">
<input type="checkbox" checked data-item-type="${item.type}">
<span class="flrt-item-name">${item.name}</span>
</div>
</div>`;
});
const popup = createPopup({
template: "ajax",
title: "Send tradables to Maptain",
content: `<div class="mh-improved-flrt-helper-popup">
<div class="flrt-friend-finder">
<form action="https://www.mousehuntgame.com/friends.php?tab=requests&sub_tab=community" method="post" class="flrt-search-form friends-page-id-search friendsPage-community-hunterIdForm" onsubmit="app.pages.FriendsPage.submitHunterIdForm(this); return false;">
<input type="number" value="${lastMaptain || ""}" name="user_id" maxlength="10" class="friendsPage-community-hunterIdForm-input">
<a class="mousehuntActionButton small search-for-hunter" href="#" onclick="app.pages.FriendsPage.triggerHunterForm(this); return false;"><span>Search</span></a>
</form>
<div class="friendsPage-community-hunterResult"></div>
<div class="instructions">
Select the tradable items you want to send.
</div>
</div>
<div class="flrt-items-to-send">
${itemContent}
</div>
</div>`
});
popup.addToken("{*prefix*}", '<h2 class="title">Send tradable items</h2>');
popup.addToken("{*suffix*}", '<div class="mousehuntActionButton flrt-send-items"><span>Send items to Maptain</span></div>');
popup.show();
const flrtItems = document.querySelectorAll(".flrt-item");
flrtItems.forEach((item) => {
const checkbox = item.querySelector('input[type="checkbox"]');
const toggle = () => {
checkbox.checked = !checkbox.checked;
item.classList.toggle("flrt-item-disabled", !checkbox.checked);
};
item.addEventListener("click", toggle);
});
if (lastMaptain) {
const search = document.querySelector(".search-for-hunter");
if (search) {
app.pages.FriendsPage.triggerHunterForm(search);
}
}
const sendBtn = document.querySelector(".flrt-send-items");
if (!sendBtn) {
return;
}
sendBtn.addEventListener("click", () => {
sendBtn.disabled = true;
sendBtn.classList.add("disabled");
const id = document.querySelector(".friendsPage-community-hunterIdForm-input");
if (!id) {
return;
}
const sendingItems = document.querySelectorAll(".flrt-item");
const itemsToSend = [];
sendingItems.forEach((item) => {
const checkbox = item.querySelector('input[type="checkbox"]');
if (!checkbox) {
return;
}
if (checkbox.checked) {
const itemData = {
type: item.getAttribute("data-item-type"),
quantity: Number.parseInt(item.getAttribute("data-item-quantity"), 10),
element: item
};
itemsToSend.push(itemData);
}
checkbox.disabled = true;
});
const row = document.querySelector(".friendsPage-friendRow.friendsPage-requestRow");
if (!row) {
return;
}
const snuid = row.getAttribute("data-snuid") || id.value;
sendItemsToMaptain(snuid, itemsToSend);
});
};
init22 = () => __async(void 0, null, function* () {
addStyles(styles_default21);
onDialogShow(cacheFinishedMap, "treasureMapPopup");
onRequest(addFlrtButtonToConvertible, "managers/ajax/users/useconvertible.php");
});
flrt_helper_default = {
id: "flrt-helper",
name: "FLRT Helper",
type: "feature",
default: false,
description: 'When opening a chest from a map, adds a "Return to Maptain" button that will let you choose which tradable items to send directly to the Maptain.',
load: init22
};
}
});
// src/modules/hover-profiles/styles.css
var styles_default22;
var init_styles23 = __esm({
"src/modules/hover-profiles/styles.css"() {
styles_default22 = ".message .messageText,.journal .entry .journalbody{position:relative}#friend-data-wrapper{position:absolute;top:-125px;z-index:999999;box-sizing:border-box;display:none;width:325px;height:125px;border:1px solid #9a8872;border-radius:10px;box-shadow:0 1px 5px -1px #5e5e5e}.treasureMapTooltipView #friend-data-wrapper{display:none}[data-friend-hover]:hover #friend-data-wrapper,[data-friend-hover]:focus #friend-data-wrapper,#friend-data-wrapper:hover,#friend-data-wrapper:focus{display:block}#friend-data-wrapper .friendsPage-friendRow{position:relative;box-sizing:border-box;height:100%;padding-top:3px;margin:0;border:none}#friend-data-wrapper .friendsPage-friendRow-imageContainer{position:relative;display:inline-block;width:65px;height:65px;margin-left:5px;vertical-align:top}#friend-data-wrapper .friendsPage-friendRow-content{box-sizing:border-box;width:245px}#friend-data-wrapper .friendsPage-friendRow-titleBar{position:relative;box-sizing:border-box;padding-left:20px;margin-right:-8px;margin-bottom:5px;margin-left:-15px;line-height:20px}#friend-data-wrapper .friendsPage-friendRow-titleBar-titleDetail{display:none}#friend-data-wrapper .friendsPage-friendRow-titleBar-icon{left:0;width:35px;height:35px}#friend-data-wrapper .friendsPage-friendRow-titleBar-name{display:block;margin-left:20px;overflow:hidden;font-size:14px;color:#000;text-overflow:ellipsis;white-space:nowrap;vertical-align:middle}#friend-data-wrapper .friendsPage-friendRow-environment-icon{width:25px;height:25px;margin-right:3px}#friend-data-wrapper .friendsPage-friendRow-environment-name{width:100px;font-size:11px;line-height:14px}#friend-data-wrapper .friendsPage-friendRow .friendsPage-friendRow-actions{position:absolute;top:35px;right:2px}#friend-data-wrapper .friendsPage-friendRow-actionsContainer{top:0}#friend-data-wrapper .friendsPage-friendRow-actions-interactionButtons{padding-right:0}#friend-data-wrapper .userInteractionButtonsView-button{width:38px;height:38px;background-size:38px}#friend-data-wrapper .userInteractionButtonsView-button.sendTicket,#friend-data-wrapper .userInteractionButtonsView-button.sendTournamentInvite{display:none}#friend-data-wrapper .mousehuntTooltip{position:absolute;left:-20px;width:auto;height:auto;background:#fff}#friend-data-wrapper .friendsPage-friendRow-environment{box-sizing:border-box;display:flex;align-items:center;width:145px;height:40px;padding-right:10px;margin-left:-10px}#friend-data-wrapper .friendsPage-friendRow-statsContainer{position:relative;box-sizing:border-box;display:grid;grid-template-columns:repeat(3,1fr);place-items:center center;align-content:stretch;width:100%;height:auto;padding:2px;margin:0}#friend-data-wrapper .friendsPage-friendRow-stat{display:flex!important;align-items:center;width:auto;margin:0;font-size:10px}#friend-data-wrapper .friendsPage-friendRow-stat-icon{width:15px;height:15px;margin-left:5px}#friend-data-wrapper .friendsPage-friendRow-stat.map .friendsPage-friendRow-stat-icon,#friend-data-wrapper .friendsPage-friendRow-stat.team .friendsPage-friendRow-stat-icon{margin-right:3px}#friend-data-wrapper .friendsPage-friendRow-stat-value{font-size:10px;font-weight:400}#friend-data-wrapper .friendsPage-friendRow-stat-label{display:none}#friend-data-wrapper .friendsPage-friendRow-stat.map{grid-column:span 2}#friend-data-wrapper .friendsPage-friendRow-stat.map .friendsPage-friendRow-stat-value span,#friend-data-wrapper .friendsPage-friendRow-stat.online span{width:auto;max-width:190px}#friend-data-wrapper .friendsPage-friendRow-stat.team .friendsPage-friendRow-stat-value a{width:auto;max-width:70px}#friend-data-wrapper .friendsPage-friendRow-stat:hover .friendsPage-friendRow-stat-fullValue{display:none}#friend-data-wrapper .friendsPage-friendRow-stat.hasHover:hover{text-decoration:underline;background:unset}.mh-dark-mode #friend-data-wrapper .friendsPage-friendRow{color:#87270e;background:linear-gradient(#decebb 5%,#f0eddf 50%)}.mh-dark-mode #friend-data-wrapper .friendsPage-friendRow-statsContainer{color:#87270e;box-shadow:0 10px 30px #cdb495 inset}.mh-dark-mode #friend-data-wrapper .friendsPage-friendRow-stat-value a{color:#87270e}\n";
}
});
// src/modules/hover-profiles/index.js
var getFriendId, makeFriendMarkup, onFriendLinkHover, addFriendLinkEventListener, onTabChangeCallback, onTabChange, onInboxOpen, main17, init23, hover_profiles_default;
var init_hover_profiles = __esm({
"src/modules/hover-profiles/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
init_styles23();
getFriendId = (target) => __async(void 0, null, function* () {
if (target.getAttribute("data-snuid")) {
return target.getAttribute("data-snuid");
}
if (target.href) {
let href = target.href;
const hrefMatch = target.href.match(/(.+?)&/);
if (hrefMatch && hrefMatch.length) {
href = hrefMatch[1];
}
const urlMatch = href.replace("https://www.mousehuntgame.com/hunterprofile.php?snuid=", "").replace("https://www.mousehuntgame.com/profile.php?snuid=", "");
if (urlMatch && urlMatch !== href) {
return urlMatch;
}
const pMatch = href.replace("https://www.mousehuntgame.com/p.php?id=", "");
if (pMatch && pMatch !== href) {
const snuid = yield doRequest("managers/ajax/pages/friends.php", {
action: "community_search_by_id",
user_id: pMatch
});
if (snuid.friend.sn_user_id) {
return snuid.friend.sn_user_id;
}
}
}
if (target.onclick) {
const giftMatch = target.onclick.toString().match(/show\('(.+)'\)/);
if (giftMatch && giftMatch.length) {
return giftMatch[1];
}
}
return false;
});
makeFriendMarkup = (friendId, data, skipCache = false, e) => {
if (!data || !data.length || !data[0].user_interactions.relationship) {
return;
}
if (!skipCache) {
sessionSet(`mh-improved-cache-friend-${friendId}`, data);
sessionSet(`mh-improved-cache-friend-${friendId}-timestamp`, Date.now());
}
const templateType = data[0].user_interactions.relationship.is_stranger ? "PageFriends_request_row" : "PageFriends_view_friend_row";
const content = hg.utils.TemplateUtil.render(templateType, data[0]);
const friendDataWrapper = document.createElement("div", "friend-data-wrapper");
friendDataWrapper.id = "friend-data-wrapper";
friendDataWrapper.innerHTML = content;
const friendLinkParent = e.target.parentElement;
if (friendLinkParent) {
friendLinkParent.append(friendDataWrapper);
} else {
e.target.append(friendDataWrapper);
}
eventRegistry.doEvent("profile_hover");
};
onFriendLinkHover = (e) => __async(void 0, null, function* () {
const friendId = yield getFriendId(e.target);
if (!friendId || friendId == user.sn_user_id) {
return;
}
e.target.setAttribute("data-snuid", friendId);
const parent = e.target.parentElement;
if (!parent) {
return;
}
parent.setAttribute("data-friend-hover", true);
const existing = document.querySelectorAll("#friend-data-wrapper");
if (existing && existing.length) {
existing.forEach((el) => {
el.remove();
});
}
const cached = sessionGet(`mh-improved-cache-friend-${friendId}`);
const cachedTimestamp = sessionGet(`mh-improved-cache-friend-${friendId}-timestamp`);
if (cached && cachedTimestamp && Date.now() - cachedTimestamp < 15e4) {
makeFriendMarkup(friendId, cached, true, e);
} else {
app.pages.FriendsPage.getFriendDataBySnuids([friendId], (data) => {
if (!data || !data.length) {
return;
}
makeFriendMarkup(friendId, data, false, e);
});
}
});
addFriendLinkEventListener = (selector) => {
const friendLinks = document.querySelectorAll(selector);
if (!friendLinks || !friendLinks.length) {
return;
}
friendLinks.forEach((friendLink) => {
if (friendLink.classList.contains("friendsPage-friendRow-image")) {
return;
}
friendLink.addEventListener("mouseenter", onFriendLinkHover);
});
};
onTabChangeCallback = (callback, attempts = 0) => {
const tabs = document.querySelectorAll(".notificationHeader .tabs a");
if (!tabs || tabs.length === 0) {
if (attempts > 2) {
return;
}
setTimeout(() => {
onTabChangeCallback(callback, attempts + 1);
}, 250);
return;
}
tabs.forEach((tab) => {
tab.addEventListener("click", () => {
callback();
});
});
};
onTabChange = (callback) => {
onEvent("ajax_response", () => {
onTabChangeCallback(callback);
});
};
onInboxOpen = (callback) => {
const inboxBtn = document.querySelector("#hgbar_messages");
if (!inboxBtn) {
return;
}
inboxBtn.addEventListener("click", () => {
onTabChange(callback);
});
};
main17 = () => {
const selectors = [
'a[href*="https://www.mousehuntgame.com/hunterprofile.php"]',
'a[href*="https://www.mousehuntgame.com/profile.php"]',
".entry.socialGift .journaltext a",
'.notificationMessageList .messageText a[href*="https://www.mousehuntgame.com/p"]',
'tr.teamPage-memberRow-identity a[href*="https://www.mousehuntgame.com/profile.php"]'
];
selectors.forEach((selector) => {
addFriendLinkEventListener(selector);
});
};
init23 = () => __async(void 0, null, function* () {
addStyles(styles_default22);
setTimeout(main17, 500);
onRequest(() => {
setTimeout(main17, 1e3);
});
onInboxOpen(main17);
});
hover_profiles_default = {
id: "hover-profiles",
name: "Hover Profiles",
type: "feature",
default: true,
description: "Hover over a friend's name in your journal, inbox, or elsewhere and get a mini-profile popup.",
load: init23
};
}
});
// src/data/upscaled-images-to-skip.json
var upscaled_images_to_skip_default;
var init_upscaled_images_to_skip = __esm({
"src/data/upscaled-images-to-skip.json"() {
upscaled_images_to_skip_default = [
"mice/*",
"ui/auras/*",
"ui/hud/menu/*",
"ui/crowns/*",
"ui/camp/*",
"ui/hunters_horn/*",
"items/skins/*",
"items/weapons/*",
"powertypes/*",
"teams/*",
"environments/*",
"folklore_forest_upgrades/*",
"promo/page_banners/*",
"grouplogos/*",
"ui/adventure_book/*",
"map/dynamic/*",
"io_appstore_button.png",
"google-play-badge.png",
"icons/externalLink.png",
"buttons/discord.png",
"hg_logo.png",
"payment/thumb/logo_paypal.png"
];
}
});
// src/modules/image-upscaling/journal-themes.css
var journal_themes_default;
var init_journal_themes = __esm({
"src/modules/image-upscaling/journal-themes.css"() {
journal_themes_default = ".journal.theme_living_garden .top{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_living_garden_wide_top.png?asset_cache_version=2) no-repeat scroll left bottom}.journal.theme_living_garden .content{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_living_garden_wide_middle.png?asset_cache_version=2) repeat-y scroll left bottom}.journal.theme_living_garden .bottom{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_living_garden_wide_bottom.png?asset_cache_version=2) no-repeat scroll left bottom}.journal.theme_halloween_2013 .top{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_halloween_2013_wide_top.png?asset_cache_version=2) no-repeat scroll left bottom}.journal.theme_halloween_2013 .content{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_halloween_2013_wide_middle.png?asset_cache_version=2) repeat-y scroll left bottom}.journal.theme_halloween_2013 .bottom{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_halloween_2013_wide_bottom.png?asset_cache_version=2) no-repeat scroll right bottom}.journal.theme_halloween_2014 .top{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_halloween_2014_wide_top.png?asset_cache_version=2) no-repeat scroll left bottom}.journal.theme_halloween_2014 .content{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_halloween_2014_wide_middle.png?asset_cache_version=2) repeat-y scroll left bottom}.journal.theme_halloween_2014 .bottom{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_halloween_2014_wide_bottom.png?asset_cache_version=2) no-repeat scroll right bottom}.journal.theme_winter_hunt_2012 .top{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_winter_hunt_2012_wide_top.png?asset_cache_version=2) no-repeat scroll left bottom}.journal.theme_winter_hunt_2012 .content{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_winter_hunt_2012_wide_middle.png?asset_cache_version=2) repeat-y scroll left bottom}.journal.theme_winter_hunt_2012 .bottom{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_winter_hunt_2012_wide_bottom.png?asset_cache_version=2) no-repeat scroll left bottom}.journal.theme_winter_hunt_2013 .top{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_winter_hunt_2013_wide_top.png?asset_cache_version=2) no-repeat scroll left bottom}.journal.theme_winter_hunt_2013 .content{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_winter_hunt_2013_wide_middle.png?asset_cache_version=2) repeat-y scroll left bottom}.journal.theme_winter_hunt_2013 .bottom{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_winter_hunt_2013_wide_bottom.png?asset_cache_version=2) no-repeat scroll left bottom}.journal.theme_western .top{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_western_wide_top.png?asset_cache_version=2) no-repeat scroll left bottom}.journal.theme_western .content{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_western_wide_middle.png?asset_cache_version=2) repeat-y scroll left bottom}.journal.theme_western .bottom{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_western_wide_bottom.png?asset_cache_version=2) no-repeat scroll left bottom}.journal.theme_regal .top{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_regal_wide_top.png?asset_cache_version=2) no-repeat scroll left bottom}.journal.theme_regal .content{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_regal_wide_middle.png?asset_cache_version=2) repeat-y scroll left bottom}.journal.theme_regal .bottom{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_regal_wide_bottom.png?asset_cache_version=2) no-repeat scroll left bottom}.journal.theme_polluted .top{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_polluted_wide_top.png?asset_cache_version=2) no-repeat scroll left bottom}.journal.theme_polluted .content{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_polluted_wide_middle.png?asset_cache_version=2) repeat-y scroll left bottom}.journal.theme_polluted .bottom{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_polluted_wide_bottom.png?asset_cache_version=2) no-repeat scroll center bottom}.journal.theme_birthday_six .top{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_birthday_six_wide_top.png?asset_cache_version=2) no-repeat scroll left bottom}.journal.theme_birthday_six .content{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_birthday_six_wide_middle.png?asset_cache_version=2) repeat-y scroll left bottom}.journal.theme_birthday_six .bottom{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_birthday_six_wide_bottom.png?asset_cache_version=2) no-repeat scroll center bottom}.journal.theme_birthday_seven .top{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_birthday_seven_wide_top.png?asset_cache_version=2) no-repeat scroll left bottom}.journal.theme_birthday_seven .content{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_birthday_seven_wide_middle.png?asset_cache_version=2) repeat-y scroll left bottom}.journal.theme_birthday_seven .bottom{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_birthday_seven_wide_bottom.png?asset_cache_version=2) no-repeat scroll center bottom}.journal.theme_birthday_eight .top{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_birthday_eight_wide_top.png?asset_cache_version=2) no-repeat scroll left bottom}.journal.theme_birthday_eight .content{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_birthday_eight_wide_middle.png?asset_cache_version=2) repeat-y scroll left bottom}.journal.theme_birthday_eight .bottom{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_birthday_eight_wide_bottom.png?asset_cache_version=2) no-repeat scroll center bottom}.journal.theme_birthday_nine .top{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_birthday_nine_wide_top.png?asset_cache_version=2) no-repeat scroll left bottom}.journal.theme_birthday_nine .content{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_birthday_nine_wide_middle.png?asset_cache_version=2) repeat-y scroll left bottom}.journal.theme_birthday_nine .bottom{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_birthday_nine_wide_bottom.png?asset_cache_version=2) no-repeat scroll center bottom}.journal.theme_airship .top{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_airship_wide_top.png?asset_cache_version=2) no-repeat scroll left bottom}.journal.theme_airship .content{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_airship_wide_middle.png?asset_cache_version=2) repeat-y scroll left bottom}.journal.theme_airship .bottom{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_airship_wide_bottom.png?asset_cache_version=2) no-repeat scroll center bottom}.journal.theme_chrome .top{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_chrome_wide_top.png?asset_cache_version=2) no-repeat scroll left bottom}.journal.theme_chrome .content{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_chrome_wide_middle.png?asset_cache_version=2) repeat-y scroll left bottom}.journal.theme_chrome .bottom{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_chrome_wide_bottom.png?asset_cache_version=2) no-repeat scroll center bottom}.journal.theme_football .top{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_football_wide_top.png?v=2&asset_cache_version=2) no-repeat scroll left bottom}.journal.theme_football .content{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_football_wide_middle.png?v=2&asset_cache_version=2) repeat-y scroll left bottom}.journal.theme_football .bottom{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_football_wide_bottom.png?v=2&asset_cache_version=2) no-repeat scroll center bottom}.journal.theme_mega_tournament .top{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_mega_tournament_wide_top.png?v=2&asset_cache_version=2) no-repeat scroll left bottom}.journal.theme_mega_tournament .content{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_mega_tournament_wide_middle.png?v=2&asset_cache_version=2) repeat-y scroll left bottom}.journal.theme_mega_tournament .bottom{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_mega_tournament_wide_bottom.png?v=2&asset_cache_version=2) no-repeat scroll center bottom}.journal.theme_burroughs_rift .top{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_burroughs_rift_wide_top.png?v=2&asset_cache_version=2) no-repeat scroll left bottom}.journal.theme_burroughs_rift .content{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_burroughs_rift_wide_middle.png?v=2&asset_cache_version=2) repeat-y scroll left bottom}.journal.theme_burroughs_rift .bottom{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_burroughs_rift_wide_bottom.png?v=2&asset_cache_version=2) no-repeat scroll center bottom}.journal.theme_bristle_woods_rift .top{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_bristle_woods_rift_wide_top.png?v=2&asset_cache_version=2) no-repeat scroll left bottom}.journal.theme_bristle_woods_rift .content{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_bristle_woods_rift_wide_middle.png?v=2&asset_cache_version=2) repeat-y scroll left bottom}.journal.theme_bristle_woods_rift .bottom{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_bristle_woods_rift_wide_bottom.png?v=2&asset_cache_version=2) no-repeat scroll center bottom}.journal.theme_winter_hunt_2014 .top{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_winter_hunt_2014_wide_top.png?v=2&asset_cache_version=2) no-repeat scroll left bottom}.journal.theme_winter_hunt_2014 .content{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_winter_hunt_2014_wide_middle.png?v=2&asset_cache_version=2) repeat-y scroll left bottom}.journal.theme_winter_hunt_2014 .bottom{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_winter_hunt_2014_wide_bottom.png?v=2&asset_cache_version=2) no-repeat scroll center bottom}.journal.theme_fungal .top{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_fungal_wide_top.png?v=2&asset_cache_version=2) no-repeat scroll left bottom}.journal.theme_fungal .content{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_fungal_wide_middle.png?v=2&asset_cache_version=2) repeat-y scroll left bottom}.journal.theme_fungal .bottom{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_fungal_wide_bottom.png?v=2&asset_cache_version=2) no-repeat scroll center bottom}.journal.theme_relic_hunter .top{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_relic_hunter_wide_top.png?v=2&asset_cache_version=2) no-repeat scroll left bottom}.journal.theme_relic_hunter .content{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_relic_hunter_wide_middle.png?v=2&asset_cache_version=2) repeat-y scroll left bottom}.journal.theme_relic_hunter .bottom{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_relic_hunter_wide_bottom.png?v=2&asset_cache_version=2) no-repeat scroll center bottom}.journal.theme_labyrinth .top{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_labyrinth_wide_top.png?v=2&asset_cache_version=2) no-repeat scroll left bottom}.journal.theme_labyrinth .content{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_labyrinth_wide_middle.png?v=2&asset_cache_version=2) repeat-y scroll left bottom}.journal.theme_labyrinth .bottom{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_labyrinth_wide_bottom.png?v=2&asset_cache_version=2) no-repeat scroll center bottom}.journal.theme_rift_hallowen .top{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_rift_halloween_wide_top.png?v=2&asset_cache_version=2) no-repeat scroll left bottom}.journal.theme_rift_hallowen .content{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_rift_halloween_wide_middle.png?v=2&asset_cache_version=2) repeat-y scroll left bottom}.journal.theme_rift_hallowen .bottom{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_rift_halloween_wide_bottom.png?v=2&asset_cache_version=2) no-repeat scroll center bottom}.journal.theme_winter_hunt_2015 .top{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_winter_hunt_2015_wide_top.png?v=2&asset_cache_version=2) no-repeat scroll left bottom}.journal.theme_winter_hunt_2015 .content{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_winter_hunt_2015_wide_middle.png?v=2&asset_cache_version=2) repeat-y scroll left bottom}.journal.theme_winter_hunt_2015 .bottom{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_winter_hunt_2015_wide_bottom.png?v=2&asset_cache_version=2) no-repeat scroll center bottom}.journal.theme_gnawnian_games .top{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_gnawnian_games_wide_top.png?asset_cache_version=2) no-repeat scroll left bottom}.journal.theme_gnawnian_games .content{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_gnawnian_games_wide_middle.png?asset_cache_version=2) repeat-y scroll left bottom}.journal.theme_gnawnian_games .bottom{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_gnawnian_games_wide_bottom.png?asset_cache_version=2) no-repeat scroll left bottom}.journal.theme_pillowcase .top{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_pillowcase_wide_top.png?asset_cache_version=2) no-repeat scroll left bottom}.journal.theme_pillowcase .content{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_pillowcase_wide_middle.png?asset_cache_version=2) repeat-y scroll left bottom}.journal.theme_pillowcase .bottom{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_pillowcase_wide_bottom.png?asset_cache_version=2) no-repeat scroll left bottom}.journal.theme_ghostship .top{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_ghostship_wide_top.png?asset_cache_version=2) no-repeat scroll left bottom}.journal.theme_ghostship .content{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_ghostship_wide_middle.png?asset_cache_version=2) repeat-y scroll left bottom}.journal.theme_ghostship .bottom{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_ghostship_wide_bottom.png?asset_cache_version=2) no-repeat scroll left bottom}.journal.theme_moussu_picchu .top{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_moussu_picchu_wide_top.png?asset_cache_version=2) no-repeat scroll left bottom}.journal.theme_moussu_picchu .content{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_moussu_picchu_wide_middle.png?asset_cache_version=2) repeat-y scroll left bottom}.journal.theme_moussu_picchu .bottom{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_moussu_picchu_wide_bottom.png?asset_cache_version=2) no-repeat scroll left bottom}.journal.theme_lightning_slayer .top{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_lightning_slayer_wide_top.png?asset_cache_version=2) no-repeat scroll left bottom}.journal.theme_lightning_slayer .content{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_lightning_slayer_wide_middle.png?asset_cache_version=2) repeat-y scroll left bottom}.journal.theme_lightning_slayer .bottom{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_lightning_slayer_wide_bottom.png?asset_cache_version=2) no-repeat scroll left bottom}.journal.theme_winter_hunt_2016 .top{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_winter_hunt_2016_wide_top.png?v=2&asset_cache_version=2) no-repeat scroll left bottom}.journal.theme_winter_hunt_2016 .content{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_winter_hunt_2016_wide_middle.png?v=2&asset_cache_version=2) repeat-y scroll left bottom}.journal.theme_winter_hunt_2016 .bottom{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_winter_hunt_2016_wide_bottom.png?v=2&asset_cache_version=2) no-repeat scroll center bottom}.journal.theme_snow_golem .top{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_snow_golem_wide_top.png?v=2&asset_cache_version=2) no-repeat scroll left bottom}.journal.theme_snow_golem .content{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_snow_golem_wide_middle.png?v=2&asset_cache_version=2) repeat-y scroll left bottom}.journal.theme_snow_golem .bottom{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_snow_golem_wide_bottom.png?v=2&asset_cache_version=2) no-repeat scroll center bottom}.journal.theme_birthday_ten .top{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_birthday_ten_wide_top.png?v=2&asset_cache_version=2) no-repeat scroll left bottom}.journal.theme_birthday_ten .content{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_birthday_ten_wide_middle.png?v=2&asset_cache_version=2) repeat-y scroll left bottom}.journal.theme_birthday_ten .bottom{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_birthday_ten_wide_bottom.png?v=2&asset_cache_version=2) no-repeat scroll center bottom}.journal.theme_queso_canyon .top{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_queso_canyon_wide_top.png?v=2&asset_cache_version=2) no-repeat scroll left bottom}.journal.theme_queso_canyon .content{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_queso_canyon_wide_middle.png?v=2&asset_cache_version=2) repeat-y scroll left bottom}.journal.theme_queso_canyon .bottom{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_queso_canyon_wide_bottom.png?v=2&asset_cache_version=2) no-repeat scroll center bottom}.journal.theme_admirals_ship .top{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_admirals_ship_wide_top.png?v=2&asset_cache_version=2) no-repeat scroll left bottom}.journal.theme_admirals_ship .content{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_admirals_ship_wide_middle.png?v=2&asset_cache_version=2) repeat-y scroll left bottom}.journal.theme_admirals_ship .bottom{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_admirals_ship_wide_bottom.png?v=2&asset_cache_version=2) no-repeat scroll center bottom}.journal.theme_winter_hunt_2018 .top{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_winter_hunt_2018_wide_top.png?v=2&asset_cache_version=2) no-repeat scroll left bottom}.journal.theme_winter_hunt_2018 .content{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_winter_hunt_2018_wide_middle.png?v=2&asset_cache_version=2) repeat-y scroll left bottom}.journal.theme_winter_hunt_2018 .bottom{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_winter_hunt_2018_wide_bottom.png?v=2&asset_cache_version=2) no-repeat scroll center bottom}.journal.theme_lny_2019 .top{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_lny_2019_wide_top.png?v=2&asset_cache_version=2) no-repeat scroll left bottom}.journal.theme_lny_2019 .content{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_lny_2019_wide_middle.png?v=2&asset_cache_version=2) repeat-y scroll left bottom}.journal.theme_lny_2019 .bottom{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_lny_2019_wide_bottom.png?v=2&asset_cache_version=2) no-repeat scroll center bottom}.journal.theme_lny_2020 .top{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_lny_2020_wide_top.png?v=2&asset_cache_version=2) no-repeat scroll left bottom}.journal.theme_lny_2020 .content{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_lny_2020_wide_middle.png?v=2&asset_cache_version=2) repeat-y scroll left bottom}.journal.theme_lny_2020 .bottom{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_lny_2020_wide_bottom.png?v=2&asset_cache_version=2) no-repeat scroll center bottom}.journal.theme_lny_2021 .top{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_lny_2021_wide_top.png?v=2&asset_cache_version=2) no-repeat scroll left bottom}.journal.theme_lny_2021 .content{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_lny_2021_wide_middle.png?v=2&asset_cache_version=2) repeat-y scroll left bottom}.journal.theme_lny_2021 .bottom{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_lny_2021_wide_bottom.png?v=2&asset_cache_version=2) no-repeat scroll center bottom}.journal.theme_lny_2022 .top{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_lny_2022_wide_top.png?v=2&asset_cache_version=2) no-repeat scroll left bottom}.journal.theme_lny_2022 .content{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_lny_2022_wide_middle.png?v=2&asset_cache_version=2) repeat-y scroll left bottom}.journal.theme_lny_2022 .bottom{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_lny_2022_wide_bottom.png?v=2&asset_cache_version=2) no-repeat scroll center bottom}.journal.theme_lny_2023 .top{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_lny_2023_wide_top.png?v=2&asset_cache_version=2) no-repeat scroll left bottom}.journal.theme_lny_2023 .content{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_lny_2023_wide_middle.png?v=2&asset_cache_version=2) repeat-y scroll left bottom}.journal.theme_lny_2023 .bottom{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_lny_2023_wide_bottom.png?v=2&asset_cache_version=2) no-repeat scroll center bottom}.journal.theme_super_brie_factory .top{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_super_brie_factory_wide_top.png?v=2&asset_cache_version=2) no-repeat scroll left bottom}.journal.theme_super_brie_factory .content{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_super_brie_factory_wide_middle.png?v=2&asset_cache_version=2) repeat-y scroll left bottom}.journal.theme_super_brie_factory .bottom{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_super_brie_factory_wide_bottom.png?v=2&asset_cache_version=2) no-repeat scroll center bottom}.journal.theme_party_charm .top{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_party_charm_wide_top.png?v=2&asset_cache_version=2) no-repeat scroll left bottom}.journal.theme_party_charm .content{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_party_charm_wide_middle.png?v=2&asset_cache_version=2) repeat-y scroll left bottom}.journal.theme_party_charm .bottom{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_party_charm_wide_bottom.png?v=2&asset_cache_version=2) no-repeat scroll center bottom}.journal.theme_halloween_2019 .top{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_halloween_2019_wide_top.png?v=2&asset_cache_version=2) no-repeat scroll left bottom}.journal.theme_halloween_2019 .content{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_halloween_2019_wide_middle.png?v=2&asset_cache_version=2) repeat-y scroll left bottom}.journal.theme_halloween_2019 .bottom{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_halloween_2019_wide_bottom.png?v=2&asset_cache_version=2) no-repeat scroll center bottom}.journal.theme_winter_hunt_2019 .top{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_winter_hunt_2019_wide_top.png?asset_cache_version=2) no-repeat scroll left bottom}.journal.theme_winter_hunt_2019 .content{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_winter_hunt_2019_wide_middle.png?asset_cache_version=2) repeat-y scroll left bottom}.journal.theme_winter_hunt_2019 .bottom{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_winter_hunt_2019_wide_bottom.png?asset_cache_version=2) no-repeat scroll center bottom}.journal.theme_winter_hunt_2020 .top{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_winter_hunt_2020_wide_top.png?asset_cache_version=2) no-repeat scroll left bottom}.journal.theme_winter_hunt_2020 .content{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_winter_hunt_2020_wide_middle.png?asset_cache_version=2) repeat-y scroll left bottom}.journal.theme_winter_hunt_2020 .bottom{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_winter_hunt_2020_wide_bottom.png?asset_cache_version=2) no-repeat scroll center bottom}.journal.theme_winter_hunt_2021 .top{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_winter_hunt_2021_wide_top.png?asset_cache_version=2) no-repeat scroll left bottom}.journal.theme_winter_hunt_2021 .content{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_winter_hunt_2021_wide_middle.png?asset_cache_version=2) repeat-y scroll left bottom}.journal.theme_winter_hunt_2021 .bottom{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_winter_hunt_2021_wide_bottom.png?asset_cache_version=2) no-repeat scroll center bottom}.journal.theme_winter_hunt_2022 .top{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_winter_hunt_2022_wide_top.png?asset_cache_version=2) no-repeat scroll left bottom}.journal.theme_winter_hunt_2022 .content{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_winter_hunt_2022_wide_middle.png?asset_cache_version=2) repeat-y scroll left bottom}.journal.theme_winter_hunt_2022 .bottom{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_winter_hunt_2022_wide_bottom.png?asset_cache_version=2) no-repeat scroll center bottom}.journal.theme_pumpkin_patch .top{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_pumpkin_patch_wide_top.png?asset_cache_version=2) no-repeat scroll left bottom}.journal.theme_pumpkin_patch .content{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_pumpkin_patch_wide_middle.png?asset_cache_version=2) repeat-y scroll left bottom}.journal.theme_pumpkin_patch .bottom{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_pumpkin_patch_wide_bottom.png?asset_cache_version=2) no-repeat scroll center bottom}.journal.theme_spring_hunt_2021 .top{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_spring_hunt_2021_wide_top.png?asset_cache_version=2) no-repeat scroll left bottom}.journal.theme_spring_hunt_2021 .content{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_spring_hunt_2021_wide_middle.png?asset_cache_version=2) repeat-y scroll left bottom}.journal.theme_spring_hunt_2021 .bottom{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_spring_hunt_2021_wide_bottom.png?asset_cache_version=2) no-repeat scroll center bottom}.journal.theme_gloomy_greenwood .top{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_gloomy_greenwood_wide_top.png?asset_cache_version=2) no-repeat scroll left bottom}.journal.theme_gloomy_greenwood .content{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_gloomy_greenwood_wide_middle.png?asset_cache_version=2) repeat-y scroll left bottom}.journal.theme_gloomy_greenwood .bottom{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_gloomy_greenwood_wide_bottom.png?asset_cache_version=2) no-repeat scroll center bottom}.journal.theme_birthday_thirteen .top{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_birthday_thirteen_wide_top.png?asset_cache_version=2) no-repeat scroll left bottom}.journal.theme_birthday_thirteen .content{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_birthday_thirteen_wide_middle.png?asset_cache_version=2) repeat-y scroll left bottom}.journal.theme_birthday_thirteen .bottom{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_birthday_thirteen_wide_bottom.png?asset_cache_version=2) no-repeat scroll left top}.journal.theme_birthday_fourteen .top{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_birthday_fourteen_wide_top.png?v=2&asset_cache_version=2) no-repeat scroll left bottom}.journal.theme_birthday_fourteen .content{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_birthday_fourteen_wide_middle.png?v=2&asset_cache_version=2) repeat-y scroll left bottom}.journal.theme_birthday_fourteen .bottom{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_birthday_fourteen_wide_bottom.png?v=2&asset_cache_version=2) no-repeat scroll left top}.journal.theme_birthday_fifteen .top{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_birthday_fifteen_wide_top.png?asset_cache_version=2) no-repeat scroll left bottom}.journal.theme_birthday_fifteen .content{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_birthday_fifteen_wide_middle.png?asset_cache_version=2) repeat-y scroll left bottom}.journal.theme_birthday_fifteen .bottom{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_birthday_fifteen_bottom.png?asset_cache_version=2) no-repeat scroll left top}.journal.theme_table_of_contents .top{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_table_of_contents_wide_top.png?asset_cache_version=2) no-repeat scroll left bottom}.journal.theme_table_of_contents .content{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_table_of_contents_wide_middle.png?asset_cache_version=2) repeat-y scroll left bottom}.journal.theme_table_of_contents .bottom{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_table_of_contents_wide_bottom.png?asset_cache_version=2) no-repeat scroll center bottom}.journal.theme_bountiful_beanstalk .top{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_bountiful_beanstalk_wide_top.png?asset_cache_version=2) no-repeat scroll left bottom}.journal.theme_bountiful_beanstalk .content{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_bountiful_beanstalk_wide_middle.png?asset_cache_version=2) repeat-y scroll left bottom}.journal.theme_bountiful_beanstalk .bottom{background:url(https://www.mousehuntgame.com/images/ui/journal/themes/journal_bountiful_beanstalk_wide_bottom.png?asset_cache_version=2) no-repeat scroll 100% 0}.journal.theme_halloween .top{background:url(https://i.mouse.rip/upscaled-themes/journal_halloween_wide_top.png) no-repeat scroll left bottom}.journal.theme_halloween .content{background:url(https://i.mouse.rip/upscaled-themes/journal_halloween_wide_middle.png) repeat-y scroll left bottom}.journal.theme_halloween .bottom{background:url(https://i.mouse.rip/upscaled-themes/journal_halloween_wide_bottom.png) no-repeat scroll left bottom}.journal.theme_halloween_2013 .top,.journal.theme_halloween_2014 .top,.journal.theme_winter_hunt_2013 .top,.journal.theme_regal .top,.journal.theme_polluted .top,.journal.theme_birthday_six .top,.journal.theme_birthday_seven .top,.journal.theme_birthday_eight .top,.journal.theme_birthday_nine .top,.journal.theme_airship .top,.journal.theme_chrome .top,.journal.theme_football .top,.journal.theme_mega_tournament .top,.journal.theme_burroughs_rift .top,.journal.theme_bristle_woods_rift .top,.journal.theme_winter_hunt_2014 .top,.journal.theme_fungal .top,.journal.theme_relic_hunter .top,.journal.theme_labyrinth .top,.journal.theme_rift_hallowen .top,.journal.theme_winter_hunt_2015 .top,.journal.theme_gnawnian_games .top,.journal.theme_pillowcase .top,.journal.theme_ghostship .top,.journal.theme_moussu_picchu .top,.journal.theme_lightning_slayer .top,.journal.theme_winter_hunt_2016 .top,.journal.theme_snow_golem .top,.journal.theme_birthday_ten .top,.journal.theme_queso_canyon .top,.journal.theme_admirals_ship .top,.journal.theme_winter_hunt_2018 .top,.journal.theme_lny_2019 .top,.journal.theme_lny_2020 .top,.journal.theme_lny_2021 .top,.journal.theme_lny_2022 .top,.journal.theme_lny_2023 .top,.journal.theme_super_brie_factory .top,.journal.theme_party_charm .top,.journal.theme_halloween_2019 .top,.journal.theme_winter_hunt_2019 .top,.journal.theme_winter_hunt_2020 .top,.journal.theme_winter_hunt_2021 .top,.journal.theme_winter_hunt_2022 .top,.journal.theme_pumpkin_patch .top,.journal.theme_spring_hunt_2021 .top,.journal.theme_gloomy_greenwood .top,.journal.theme_birthday_thirteen .top,.journal.theme_birthday_fourteen .top,.journal.theme_birthday_fifteen .top,.journal.theme_table_of_contents .top,.journal.theme_bountiful_beanstalk .top,.journal.theme_halloween .bottom,.journal.theme_halloween_2013 .bottom,.journal.theme_halloween_2014 .bottom,.journal.theme_winter_hunt_2013 .bottom,.journal.theme_regal .bottom,.journal.theme_polluted .bottom,.journal.theme_birthday_six .bottom,.journal.theme_birthday_seven .bottom,.journal.theme_birthday_eight .bottom,.journal.theme_birthday_nine .bottom,.journal.theme_airship .bottom,.journal.theme_chrome .bottom,.journal.theme_football .bottom,.journal.theme_mega_tournament .bottom,.journal.theme_burroughs_rift .bottom,.journal.theme_bristle_woods_rift .bottom,.journal.theme_winter_hunt_2014 .bottom,.journal.theme_fungal .bottom,.journal.theme_relic_hunter .bottom,.journal.theme_labyrinth .bottom,.journal.theme_rift_hallowen .bottom,.journal.theme_winter_hunt_2015 .bottom,.journal.theme_gnawnian_games .bottom,.journal.theme_pillowcase .bottom,.journal.theme_ghostship .bottom,.journal.theme_moussu_picchu .bottom,.journal.theme_lightning_slayer .bottom,.journal.theme_winter_hunt_2016 .bottom,.journal.theme_snow_golem .bottom,.journal.theme_birthday_ten .bottom,.journal.theme_queso_canyon .bottom,.journal.theme_admirals_ship .bottom,.journal.theme_winter_hunt_2018 .bottom,.journal.theme_lny_2019 .bottom,.journal.theme_lny_2020 .bottom,.journal.theme_lny_2021 .bottom,.journal.theme_lny_2022 .bottom,.journal.theme_lny_2023 .bottom,.journal.theme_super_brie_factory .bottom,.journal.theme_party_charm .bottom,.journal.theme_halloween_2019 .bottom,.journal.theme_winter_hunt_2019 .bottom,.journal.theme_winter_hunt_2020 .bottom,.journal.theme_winter_hunt_2021 .bottom,.journal.theme_winter_hunt_2022 .bottom,.journal.theme_pumpkin_patch .bottom,.journal.theme_spring_hunt_2021 .bottom,.journal.theme_gloomy_greenwood .bottom,.journal.theme_birthday_fourteen .bottom,.journal.theme_birthday_fifteen .bottom,.journal.theme_table_of_contents .bottom,.journal.theme_bountiful_beanstalk .bottom,.journal.theme_birthday_thirteen .bottom{background-size:cover}.journal.theme_living_garden .top,.journal.theme_western .top,.journal.theme_halloween .top,.journal.theme_winter_hunt_2012 .top{background-size:contain}.journal.theme_living_garden .bottom,.journal.theme_western .bottom,.journal.theme_halloween .bottom,.journal.theme_winter_hunt_2012 .top{background-position:top center;background-size:contain}.journal.theme_halloween .content,.journal.theme_halloween_2013 .content,.journal.theme_halloween_2014 .content,.journal.theme_winter_hunt_2012 .content,.journal.theme_winter_hunt_2013 .content,.journal.theme_regal .content,.journal.theme_polluted .content,.journal.theme_birthday_six .content,.journal.theme_birthday_seven .content,.journal.theme_birthday_eight .content,.journal.theme_birthday_nine .content,.journal.theme_airship .content,.journal.theme_chrome .content,.journal.theme_football .content,.journal.theme_mega_tournament .content,.journal.theme_burroughs_rift .content,.journal.theme_bristle_woods_rift .content,.journal.theme_winter_hunt_2014 .content,.journal.theme_fungal .content,.journal.theme_relic_hunter .content,.journal.theme_labyrinth .content,.journal.theme_rift_hallowen .content,.journal.theme_winter_hunt_2015 .content,.journal.theme_gnawnian_games .content,.journal.theme_pillowcase .content,.journal.theme_ghostship .content,.journal.theme_moussu_picchu .content,.journal.theme_lightning_slayer .content,.journal.theme_winter_hunt_2016 .content,.journal.theme_snow_golem .content,.journal.theme_birthday_ten .content,.journal.theme_queso_canyon .content,.journal.theme_admirals_ship .content,.journal.theme_winter_hunt_2018 .content,.journal.theme_lny_2019 .content,.journal.theme_lny_2020 .content,.journal.theme_lny_2021 .content,.journal.theme_lny_2022 .content,.journal.theme_lny_2023 .content,.journal.theme_super_brie_factory .content,.journal.theme_party_charm .content,.journal.theme_halloween_2019 .content,.journal.theme_winter_hunt_2019 .content,.journal.theme_winter_hunt_2020 .content,.journal.theme_winter_hunt_2021 .content,.journal.theme_winter_hunt_2022 .content,.journal.theme_pumpkin_patch .content,.journal.theme_spring_hunt_2021 .content,.journal.theme_gloomy_greenwood .content,.journal.theme_birthday_fourteen .content,.journal.theme_birthday_fifteen .content,.journal.theme_table_of_contents .content,.journal.theme_bountiful_beanstalk .content,.journal.theme_birthday_thirteen .content{background-size:contain}\n";
}
});
// src/modules/image-upscaling/styles.css
var styles_default23;
var init_styles24 = __esm({
"src/modules/image-upscaling/styles.css"() {
styles_default23 = ".giftSelectorView-inbox-gift-thumb .itemImage,.giftSelectorView-inbox-giftRow.paidgift .giftSelectorView-inbox-gift-thumb .itemImage,.giftSelectorView-claimableGift-itemContainer .itemImage,.adventureBookPopup-adventure-details-block-step-thumb,.valourRiftPopupClaim-lootLog .itemImage,.valourRiftPopupClaim-cacheLoot-image,.MHCheckoutCartTableView-reward-image,.MHCheckoutCartTableView .trapImageView,.labyrinthHUD-confirmItem,.travelPage-map-pieces-detail-image img,.halloweenBoilingCauldronRecipeView-thumb,.forewordFarmHarvestBin-itemImage.itemImage,.campPage-trap-armedItem-empty{box-shadow:none}.springHuntHUD-dialog-item-image .itemImage.large,.springHuntHUD-dialog-item-image .floatingIslandsAirship,.MiniEventBigJackPopup-block-item-image,.forewordFarmHarvestBin-itemImage.itemImage,.marketplaceView-itemImage,.mousehuntHud-userStat.bait .icon,.itemView-thumbnail{background-color:transparent}.springHuntHUD-dialog-item-image,.journal .entry.convertible_open img,.MiniEventGiveawayCampHUD-dialog-item .itemImage,.journal .entry.craft.item img,.itemPurchaseView-container.apothecary .itemPurchaseView-image,.marketplaceView-itemImage,.itemView-thumbnail,.campPage-trap-armedItem.bait .campPage-trap-armedItem-image,.campPage-trap-armedItem-image{border:none}.notificationMessageList .message img.item{border:none!important}.campPage-trap-armedItem-empty{background:none}.treasureMapDialogView.acknowledge .treasureMapDialogView-highlightItem .itemImage,.convertibleOpenView-item-image{background-size:cover}.marketplaceView-item-image,.itemImage,.campPage-trap-armedItem.bait .campPage-trap-armedItem-image,.campPage-trap-armedItem-image{background-size:100%}.MHCheckout-featuredItem-image.large{background-size:100px}.campPage-trap-armedItem.skin .campPage-trap-armedItem-empty{color:transparent}.mousehuntHud-userStat .icon{width:27px;height:27px;border:none;box-shadow:none}.inventoryPage-confirmPopup-itemRow-image .itemImage img{width:80px;height:80px}.treasureMapView-allyCell{padding:6px 3px}.treasureMapView-allyCell .treasureMapView-componentContainer{width:170px;background:none}.treasureMapView-allyCell .treasureMapView-componentThumb{width:40px;height:40px}.treasureMapRootView-footer-item-thumb{background-color:#fff}.mousehuntHud-userStat:hover .icon,.mousehuntHud-userStat:focus .icon,.mousehuntHud-userStat.active .icon{filter:drop-shadow(0 0 3px #ffde00);box-shadow:none}.springEggHuntCampHUD-charm-thumb.active{background-color:#79a32c87}.springEggHuntCampHUD-charm-thumb{padding:1px;border:none}.marketplaceView-itemImage img{border-radius:0}.travelPage-map-pieces-detail-environment-title img{width:auto;height:20px}.travelPage-map-pieces-detail-environment-title{display:inline-flex;align-items:center;justify-content:flex-start}.travelPage-map-pieces-detail-environment-title-name{margin-left:5px}.travelPage-map-pieces-detail-environments-label{margin-bottom:10px}.travelPage-map-environment-detail-title img{max-width:25px}.gift-padding img{width:75px}.itemImage img{width:auto;max-width:80px}.journal .relicHunter_slayer_aura_relic_bonus{background-image:url(https://www.mousehuntgame.com/images/items/collectibles/large/a6e804d0d9eeb22ff01660a144521ff1.png?cv=2)}.adventureBookPopup-title-icon{top:5px;width:auto;height:25px}.adventureBookPopup-title.active .adventureBookPopup-title-icon{left:5px}\n";
}
});
// src/modules/image-upscaling/views.css
var views_default;
var init_views = __esm({
"src/modules/image-upscaling/views.css"() {
views_default = ".mousehuntHud-page-tabContent.kings_cart .shopsPage-header-icon{background-image:url(https://www.mousehuntgame.com/images/items/stats/large/7340a24e5bf4defcc5d855bdb56776c3.png)}.shopsPage-kingsCalibratorPromo:after{background-image:url(https://i.mouse.rip/upscaled/c6fa46d329c1c7436acad084773c05c6.png)}.dragonSlayerTeaser{background-image:url(https://www.mousehuntgame.com/images/items/crafting_items/large/d513d3d88b83e0cbce3be1ca70f8c6c0.png)}.fortRoxHUD-dialog-requiredItem.fort_rox_lair_cheese .itemImage{background-image:url(https://www.mousehuntgame.com/images/items/bait/large/da61a59109bfc60c1d9db20f54c75e63.png)}.fortRoxHUD-dialog-requiredItem.fort_rox_lair_key_stat_item .itemImage{background-image:url(https://www.mousehuntgame.com/images/items/stats/large/312d0ec2cf4e4cc10a223ef1ed7eb1cf.png)}.giftSelectorView-gift-cost-name{background-image:url(https://www.mousehuntgame.com/images/items/stats/large/f659a8a07d3877df4165b188f13bb0db.png)}.greatWinterHuntClaimRewardDialogView__item--hat:after{background-image:url(https://www.mousehuntgame.com/images/items/stats/large/f2ec13c0297687cbe50c7c35312966b7.png)}.greatWinterHuntClaimRewardDialogView__item--scarf:after{background-image:url(https://www.mousehuntgame.com/images/items/stats/large/b07954771f93d36f125caab617573edf.png)}.headsUpDisplayWinterHuntRegionView__golemUpgradeCost:after{background-image:url(https://www.mousehuntgame.com/images/items/stats/large/a9f0d6cba3beb00ad97a543b5e3ec8f9.png)}.headsUpDisplayWinterHuntRegionView__hailstoneImage{background-image:url(https://www.mousehuntgame.com/images/items/stats/large/972937f8febcda1ed8e6f592ce34d1eb.png)}.journal .entry.aurora_base_trigger{background-image:url(https://i.mouse.rip/upscaled/bases/20ffa4c4c656ac931e4881d98bda5713.png)}.journal .entry.burroughs_rift.regulator_base_trigger{background-image:url(https://i.mouse.rip/upscaled/bases/aeeb39277ee5bb21bffd2d8e5eb91203.png)}.journal .entry.christmas_crystalabra_trigger{background-image:url(https://www.mousehuntgame.com/images/items/crafting_items/large/54e6ff0e1a145b4ae1a702dae67f302c.png)}.journal .entry.electromagnetic_base_trigger{background-image:url(https://i.mouse.rip/upscaled/af1aa7a2f55acbce605abc65be1d22e1.png)}.journal .entry.living_grove_base_trigger.cavern_fungus{background-image:url(https://www.mousehuntgame.com/images/items/crafting_items/large/6b849e20a0a0e8034697dfc0034f20e0.png)}.journal .entry.living_grove_base_trigger.nightshade{background-image:url(https://www.mousehuntgame.com/images/items/crafting_items/large/075a2bbef9d263b41822be1c318e9ee0.png)}.journal .entry.mousehunt_birthday_cake_claim{background-image:url(https://i.mouse.rip/upscaled/8e4f8ee414643d3dcb39e5bb7df429ed.png)}.journal .entry.rift_mist_diffuser_trigger{background-image:url(https://i.mouse.rip/upscaled/bases/40b591abddca5fa4b1cefb1d1a5c0116.png)}.journal .entry.valour_rift_map_quest_entry{background-image:url(https://www.mousehuntgame.com/images/items/stats/large/b88046add58f39243c14740d7179446e.png)}.journal .entry.vegetation_base_trigger.blue{background-image:url(https://i.mouse.rip/upscaled/12adb0973256a6f3f7061925940593e9.png)}.journal .entry.vegetation_base_trigger.red{background-image:url(https://i.mouse.rip/upscaled/8dff0d6bc2e6d9be450da9bc0d3ab678.png)}.journal .entry.vegetation_base_trigger.yellow{background-image:url(https://i.mouse.rip/upscaled/1a0063f4d3a1995dc23105c4e6db85aa.png)}.journal .halloween-candy{background-image:url(https://i.mouse.rip/upscaled/1682084bc7d5208b582b66476c090a3b.png)}.journal .relicHunter_slayer_aura_relic_bonus{background-image:url(https://i.mouse.rip/upscaled/f21a0fde04887958de39f9e40b8f588e.png)}.kingsGiveawayCalibratorPopup-upgrade-action-kingsCredits{background-image:url(https://www.mousehuntgame.com/images/items/stats/large/7340a24e5bf4defcc5d855bdb56776c3.png)}.labyrinthHUD-confirmItem.labyrinth_scramble_clues_stat_item{background-image:url(https://www.mousehuntgame.com/images/items/stats/large/4af4321a64beff9406d1931e5ea79855.png)}.labyrinthHUD-confirmItem.labyrinth_scramble_doors_stat_item{background-image:url(https://www.mousehuntgame.com/images/items/stats/large/3f408cc3012bf15bd07d9bce8a6eec75.png)}.MiniEventGiveawayCampHUD:before{background-image:url(https://www.mousehuntgame.com/images/items/stats/large/6391b886b424174996329aa1eb186a10.png)}.mountainHUD-conduit-purchase .mousehuntItem-image.charm_level_1_trinket_slot{background-image:url(https://i.mouse.rip/upscaled/06e0b1849d75003231f4cbd8eab65a1a.png)}.mountainHUD-conduit-suggestions .mousehuntItem-image.power_trinket{background-image:url(https://www.mousehuntgame.com/images/items/trinkets/large/b0fb665f8649eb72432c66b0575c9516.png)}.mountainHUD-conduit-suggestions .mousehuntItem-image.super_power_trinket{background-image:url(trinkets/625bef6da38dc44ddcd70d0da47244ae)}.mountainHUD-conduit-suggestions .mousehuntItem-image.weak_power_trinket{background-image:url(https://i.mouse.rip/upscaled/625bef6da38dc44ddcd70d0da47244ae.png)}.mountainHUD-footer-item .mousehuntItem-image.abominable_asiago_cheese,.mountainHUD-craftDialog .mousehuntItem-image.abominable_asiago_cheese{background-image:url(https://www.mousehuntgame.com/images/items/bait/large/7a83faafedc2d9e81cdf7aec4f1eb9a2.png)}.mountainHUD-footer-item .mousehuntItem-image.cheddore_cheese,.mountainHUD-craftDialog .mousehuntItem-image.cheddore_cheese{background-image:url(https://www.mousehuntgame.com/images/items/bait/large/b5dde0c4643e52b8bee8b5d35529bc6e.png)}.mountainHUD-footer-item .mousehuntItem-image.faceted_sugar_crafting_item,.mountainHUD-craftDialog .mousehuntItem-image.faceted_sugar_crafting_item{background-image:url(https://i.mouse.rip/upscaled/faceted_sugar_crafting_item.png)}.mountainHUD-footer-item .mousehuntItem-image.ice_curd_crafting_item,.mountainHUD-craftDialog .mousehuntItem-image.ice_curd_crafting_item{background-image:url(https://i.mouse.rip/upscaled/ice_curd_crafting_item.png)}.mountainHUD-footer-item .mousehuntItem-image.magic_essence_craft_item,.mountainHUD-craftDialog .mousehuntItem-image.magic_essence_craft_item{background-image:url(https://www.mousehuntgame.com/images/items/crafting_items/large/1a5559b59d141e76dec3fe4b8780e5e3.png)}.mountainHUD-phaseContainer.bait .mousehuntItem-image.cheddore_cheese{background-image:url(https://www.mousehuntgame.com/images/items/bait/large/b5dde0c4643e52b8bee8b5d35529bc6e.png)}.mountainHUD-phaseContainer.boss .mousehuntItem-image.abominable_asiago_cheese{background-image:url(https://www.mousehuntgame.com/images/items/bait/large/7a83faafedc2d9e81cdf7aec4f1eb9a2.png)}.mountainHUD-phaseContainer.boulder .mousehuntItem-image.brie_cheese{background-image:url(https://www.mousehuntgame.com/images/items/bait/large/9a8d8cd30ea217263779c4bbef463d69.png)}.mountainHUD-phaseContainer.boulder .mousehuntItem-image.super_brie_cheese{background-image:url(https://www.mousehuntgame.com/images/items/bait/large/32b20c3984d2f03b132c295ea3b99e7e.png)}.mousoleumHUD-crafting-recipe-result-image{background-image:url(https://www.mousehuntgame.com/images/items/bait/large/c2300f93eaaff7c48a78c1520b53ac12.png)}.riftBristleWoodsHUD-portalEquipment.acolyteHourglass .riftBristleWoodsHUD-portalEquipment-image{background-image:url(https://www.mousehuntgame.com/images/items/stats/large/ee5ef616058313371f7779297bce4524.png)}.riftBristleWoodsHUD-portalEquipment.portalScrambler .riftBristleWoodsHUD-portalEquipment-image{background-image:url(https://www.mousehuntgame.com/images/items/stats/large/092ff4aa80863a405073ee9685c4710f.png)}.riftBristleWoodsHUD-portalEquipment.portalWarmer .riftBristleWoodsHUD-portalEquipment-image{background-image:url(https://www.mousehuntgame.com/images/items/stats/large/81e3257baf10421af2fb22d9beeaf89c.png)}.riftFuromaHUD-craftingPopup-recipe-action-magicEssence:after{background-image:url(https://www.mousehuntgame.com/images/items/crafting_items/large/1a5559b59d141e76dec3fe4b8780e5e3.png)}.springEggHuntCampHUD-missingDetector-cost{background-image:url(https://www.mousehuntgame.com/images/items/stats/large/f659a8a07d3877df4165b188f13bb0db.png)}.springHuntHUD-interfaceEgg.century_egg_convertible:after{background-image:url(https://www.mousehuntgame.com/images/items/convertibles/large/d64fc795e30b46f5f8a92f0949ab6988.png)}.springHuntHUD-interfaceEgg.explorers_egg_convertible:after{background-image:url(https://www.mousehuntgame.com/images/items/convertibles/large/fadab13dcd382ee0eb1876ca0c08abd6.png)}.springHuntHUD-interfaceEgg.freshly_painted_egg_convertible:after{background-image:url(https://www.mousehuntgame.com/images/items/convertibles/large/ce737544556d685e1f874c4fd87501ab.png)}.springHuntHUD-interfaceEgg.market_mogul_egg_convertible:after{background-image:url(https://www.mousehuntgame.com/images/items/convertibles/large/6af4279a524e8981a4f77e6cd0c1a8fb.png)}.springHuntHUD-interfaceEgg.workshop_egg_convertible:after{background-image:url(https://www.mousehuntgame.com/images/items/convertibles/large/215cb37ca633fed6e55b1014a371acd6.png)}.townOfGnawniaHUD-bountyRewardContainer{background-image:url(https://www.mousehuntgame.com/images/items/stats/large/f659a8a07d3877df4165b188f13bb0db.png)}.valourRiftHUD-towerUpgradeLevel-costIcon.rift_gaunt_upgrade_a_stat_item{background-image:url(https://www.mousehuntgame.com/images/items/stats/large/6b1ff750750b9c48dd330bdb9861ed7e.png)}.valourRiftHUD-towerUpgradeLevel-costIcon.rift_gaunt_upgrade_b_stat_item{background-image:url(https://www.mousehuntgame.com/images/items/stats/large/d4d052ac03c581e15699333f61618e9d.png)}.valourRiftHUD-towerUpgradeLevel-costIcon.shade_eclipse_resource_stat_item{background-image:url(https://www.mousehuntgame.com/images/items/stats/large/e987c0769410db8389c1b299af66710d.png)}.valourRiftHUD-towerUpgradeLevel-costIcon.total_eclipse_resource_stat_item{background-image:url(https://www.mousehuntgame.com/images/items/stats/large/150c36547680239500d7f75221c5cfac.png)}.warpathHUD-dialog-state.clearWave .warpathHUD-dialog-image .itemImage{background-image:url(https://www.mousehuntgame.com/images/items/stats/large/ef8fb33edf7ca54d7ddfc91a215e4845.png)}.warpathHUD-dialog-state.enterPortal .warpathHUD-dialog-image .itemImage{background-image:url(https://www.mousehuntgame.com/images/items/stats/large/26383ddab530a128c32fb2cc5e9e7405.png)}\n";
}
});
// src/modules/image-upscaling/index.js
var stripUrl, getMappedUrl, shouldSkipUpdate, shouldSkipUrl, upscaleImageElements, upscaleBackgroundImages, upscaleImages, unupscaledImages, upscaledImages, lastCheck, isUpscaling, observerOptions, mapping, init24, image_upscaling_default;
var init_image_upscaling = __esm({
"src/modules/image-upscaling/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
init_utils4();
init_upscaled_images_to_skip();
init_journal_themes();
init_styles24();
init_views();
stripUrl = (url) => {
return url.replaceAll("//images", "/images").replace("https://www.mousehuntgame.com/images/", "").replaceAll("cv=1", "").replaceAll("cv=2", "").replaceAll("asset_cache_version=1", "").replaceAll("asset_cache_version=2", "").replaceAll("?", "").replaceAll("&", "");
};
getMappedUrl = (strippedUrl) => {
if (!strippedUrl) {
return;
}
const mappedUrl = mapping[strippedUrl];
if (!mappedUrl) {
return;
}
if (mappedUrl.includes("https://")) {
return mappedUrl;
}
if (mappedUrl) {
upscaledImages.push(mappedUrl);
}
return `https://www.mousehuntgame.com/images/${mappedUrl}`;
};
shouldSkipUpdate = (type, attribute, items2) => {
const itemHash = [...items2].map((item) => {
const itemAttribute = item.getAttribute(attribute);
if (!itemAttribute) {
return "";
}
return itemAttribute;
}).join(",");
if (lastCheck[type] && lastCheck[type] === itemHash) {
return true;
}
lastCheck[type] = itemHash;
return false;
};
shouldSkipUrl = (url) => {
if (unupscaledImages.includes(url) || // Don't re-upscale images that have already been upscaled.
upscaledImages.includes(url) || url.startsWith("https://www.gravatar.com") || // Skip some external images.
url.startsWith("https://graph.facebook.com") || url.startsWith("https://i.mouse.rip")) {
return true;
}
const skip = upscaled_images_to_skip_default.some((path) => {
if (path.includes("*")) {
return url.startsWith(path.replace("*", ""));
}
return url === path;
});
return skip;
};
upscaleImageElements = () => __async(void 0, null, function* () {
const images = document.querySelectorAll("img");
if (!images) {
return;
}
if (shouldSkipUpdate("images", "src", images)) {
return;
}
images.forEach((image) => {
const source = image.getAttribute("src");
if (!source) {
return;
}
const url = stripUrl(source);
if (shouldSkipUrl(url)) {
return;
}
const mappedUrl = getMappedUrl(url);
if (mappedUrl && mappedUrl !== url) {
image.setAttribute("src", mappedUrl);
} else {
unupscaledImages.push(url);
}
});
});
upscaleBackgroundImages = () => __async(void 0, null, function* () {
const backgrounds = document.querySelectorAll('[style*="background-image"]');
if (!backgrounds) {
return;
}
if (shouldSkipUpdate("backgrounds", "style", backgrounds)) {
return;
}
backgrounds.forEach((background) => {
const style = background.getAttribute("style");
if (!style || !style.includes("background-image")) {
return;
}
const urls = style.match(/url\((.*?)\)/);
if (!urls || !urls[1]) {
return;
}
const url = stripUrl(urls[1].replaceAll(/["']+/g, ""));
if (shouldSkipUrl(url)) {
return;
}
const mappedUrl = getMappedUrl(url);
if (mappedUrl && mappedUrl !== url) {
background.setAttribute("style", style.replace(urls[1], mappedUrl));
} else {
unupscaledImages.push(url);
}
});
});
upscaleImages = (observer) => __async(void 0, null, function* () {
if (isUpscaling) {
return;
}
if (observer) {
observer.disconnect();
}
isUpscaling = true;
yield upscaleImages();
yield upscaleBackgroundImages();
if (observer) {
observer.observe(document, observerOptions);
}
isUpscaling = false;
return Promise.all([
upscaleImageElements(),
upscaleBackgroundImages()
]);
});
unupscaledImages = [];
upscaledImages = [];
lastCheck = { backgrounds: "", images: "" };
isUpscaling = false;
observerOptions = {
attributes: true,
attributeFilter: ["style"],
childList: true,
subtree: true
};
mapping = [];
init24 = () => __async(void 0, null, function* () {
addStyles([styles_default23, journal_themes_default, views_default]);
mapping = yield getData("upscaled-images");
const observer = new MutationObserver((mutations) => __async(void 0, null, function* () {
for (const mutation of mutations) {
if (mutation.type === "childList" && mutation.target.classList.contains("huntersHornView__timerState")) {
continue;
}
if (mutation.type === "attributes" && mutation.target.classList.contains("ticker")) {
continue;
}
observer.disconnect();
upscaleImages(observer);
}
}));
observer.observe(document, observerOptions);
onDialogShow(() => {
setTimeout(() => {
upscaleImages();
}, 500);
});
});
image_upscaling_default = {
id: "image-upscaling",
name: "Image Upscaling & Transparency",
type: "feature",
default: true,
description: "Updates all images to use higher resolution versions with transparent backgrounds.",
load: init24
};
}
});
// src/modules/inline-wiki/styles.css
var styles_default24;
var init_styles25 = __esm({
"src/modules/inline-wiki/styles.css"() {
styles_default24 = "#wiki-iframe{width:100%;height:100%;min-height:100vh}.mousehuntHud-menu .wiki .external_icon{display:none}\n";
}
});
// src/modules/inline-wiki/index.js
var openWiki, addMenuListener, main18, init25, inline_wiki_default;
var init_inline_wiki = __esm({
"src/modules/inline-wiki/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
init_styles25();
openWiki = () => {
const iframe = document.createElement("iframe");
iframe.id = "wiki-iframe";
iframe.src = "https://mhwiki.hitgrab.com/wiki/index.php/MouseHunt_Wiki";
makePage(iframe);
};
addMenuListener = () => {
const wikiLink = document.querySelector(".mousehuntHud-menu ul li ul li.wiki a");
if (!wikiLink) {
return;
}
wikiLink.addEventListener("click", (e) => {
e.preventDefault();
openWiki();
});
};
main18 = () => {
addStyles(styles_default24);
addMenuListener();
onEvent("mh-improved-open-wiki", () => {
const wikiLink = document.querySelector(".mousehuntHud-menu ul li ul li.wiki a");
if (wikiLink) {
wikiLink.click();
}
return true;
});
};
init25 = () => __async(void 0, null, function* () {
main18();
});
inline_wiki_default = {
id: "inline-wiki",
name: "Inline Wiki",
type: "feature",
default: true,
description: "Clicking 'Wiki' in the menu will load it right in the page, rather than opening a new tab.",
load: init25
};
}
});
// src/modules/inventory-lock-and-hide/styles.css
var styles_default25;
var init_styles26 = __esm({
"src/modules/inventory-lock-and-hide/styles.css"() {
styles_default25 = ".mhui-inventory-lock-and-hide-controls-wrapper{position:absolute;top:0;right:10px;display:flex;gap:10px}.mousehuntHud-page-tabContent.traps .mhui-inventory-lock-and-hide-controls-wrapper{top:-30px}.mhui-inventory-lock-and-hide-bulk-controls{display:none;gap:10px;margin-left:10px}.mhui-inventory-lock-and-hide-controls-active .mhui-inventory-lock-and-hide-bulk-controls{display:inline-flex}.inventoryPage-tagContent.mhui-inventory-lock-and-hide-controls-active{border-radius:5px;outline:3px solid #f37c7c}.mhui-inventory-lock-and-hide-item-controls{position:absolute;inset:0;display:none;flex-flow:row nowrap;align-items:flex-start;justify-content:space-evenly;background-color:#ffffff7f}.mhui-inventory-lock-and-hide-controls-active .mhui-inventory-lock-and-hide-item-controls{display:flex}.mhui-inventory-lock-and-hide-controls-active .inventoryPage-item.hidden{display:inline-block}.mhui-inventory-lock-and-hide-controls-active .inventoryPage-item.hidden .inventoryPage-item-margin{background-color:#939393}.mhui-inventory-lock-and-hide-controls-active .inventoryPage-item.locked{display:inline-block}.mhui-inventory-lock-and-hide-controls-active .inventoryPage-item.locked .inventoryPage-item-margin{background-color:#ff7b00}.mhui-inventory-lock-and-hide-controls-active .tooltip{display:none;visibility:hidden;opacity:0}.locked .inventoryPage-item-content-action{pointer-events:none;filter:grayscale(1)}.mousehuntHud-page-subTabContent.trinket .mousehuntHud-page-subTabContent-prefix{display:none}.inventoryPage-tagContent-tagTitle{display:flex;align-items:center;padding:0 5px 10px;margin:0;font-size:1.4em;border:none}span.inventoryPage-tagContent-tagTitle.tsitu-lock-convertible{top:-6px;right:110px;font-size:.75em}span.inventoryPage-tagContent-tagTitle.tsitu-lock-convertible button{padding:2px;font-size:1em}\n";
}
});
// src/modules/inventory-lock-and-hide/index.js
var saveSettings, getSettings2, shouldAddLocks, addControlsToItems, updateGroupTitles, maybeLockOrHideItems, addBulkControls, getCurrentTabContainer, addLockAndHideControls, hideItemsInTrapBrowser, itemSettings, main19, init26, inventory_lock_and_hide_default;
var init_inventory_lock_and_hide = __esm({
"src/modules/inventory-lock-and-hide/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
init_styles26();
saveSettings = (shouldUpdateTitles = true) => {
saveSetting("inventory-lock-and-hide", itemSettings);
if (shouldUpdateTitles) {
updateGroupTitles();
}
};
getSettings2 = () => {
return getSetting("inventory-lock-and-hide", {
locked: [],
hidden: []
});
};
shouldAddLocks = (currentTab) => {
return "collectibles" !== currentTab || "bait" !== currentTab;
};
addControlsToItems = () => __async(void 0, null, function* () {
const items2 = document.querySelectorAll(".inventoryPage-item");
if (!items2) {
return;
}
const currentTab = getCurrentTab();
items2.forEach((item) => {
let id = item.getAttribute("data-item-id");
id = Number.parseInt(id, 10);
if (!id) {
return;
}
const hasControls = item.querySelector(".mhui-inventory-lock-and-hide-item-controls");
if (hasControls) {
return;
}
let isLocked = (itemSettings == null ? void 0 : itemSettings.locked) ? itemSettings.locked.includes(id) : false;
let isHidden2 = (itemSettings == null ? void 0 : itemSettings.hidden) ? itemSettings.hidden.includes(id) : false;
const controls = makeElement("div", "mhui-inventory-lock-and-hide-item-controls");
if (shouldAddLocks(currentTab)) {
const lock = makeElement("div", ["mousehuntActionButton", "tiny", "mhui-inventory-lock-and-hide-controls-lock"]);
const lockText = makeElement("span", "", isLocked ? "Unlock" : "Lock");
lock.append(lockText);
lock.addEventListener("click", (e) => {
e.preventDefault();
e.stopPropagation();
if (isLocked) {
itemSettings.locked = itemSettings.locked.filter((i) => i !== id);
lockText.innerText = "Lock";
isLocked = false;
item.classList.remove("locked");
} else {
itemSettings.locked.push(id);
lockText.innerText = "Unlock";
isLocked = true;
item.classList.add("locked");
}
saveSettings();
});
controls.append(lock);
}
const hide = makeElement("div", ["mousehuntActionButton", "tiny", "mhui-inventory-lock-and-hide-controls-hide"]);
const hideText = makeElement("span", "", isHidden2 ? "Show" : "Hide");
hide.append(hideText);
hide.addEventListener("click", (e) => {
e.preventDefault();
e.stopPropagation();
if (isHidden2) {
itemSettings.hidden = itemSettings.hidden.filter((i) => i !== id);
hideText.innerText = "Hide";
isHidden2 = false;
item.classList.remove("hidden");
} else {
itemSettings.hidden.push(id);
hideText.innerText = "Show";
isHidden2 = true;
item.classList.add("hidden");
}
saveSettings();
});
controls.append(hide);
item.append(controls);
});
});
updateGroupTitles = () => {
const container = getCurrentTabContainer();
if (!container) {
return;
}
const groups2 = container.querySelectorAll(".inventoryPage-tagContent-tagGroup");
if (!groups2) {
return;
}
groups2.forEach((group) => {
const title = group.querySelector(".inventoryPage-tagContent-tagTitle");
if (!title) {
return;
}
const hiddenItems = group.querySelectorAll(".inventoryPage-item.hidden");
if (!hiddenItems) {
return;
}
const existingCount = title.querySelector(".mhui-inventory-lock-and-hide-hidden-count");
if (existingCount) {
existingCount.remove();
}
if (0 === hiddenItems.length) {
return;
}
makeElement("span", "mhui-inventory-lock-and-hide-hidden-count", ` (${hiddenItems.length} hidden)`, title);
});
};
maybeLockOrHideItems = () => __async(void 0, null, function* () {
const items2 = document.querySelectorAll(".inventoryPage-item");
if (!items2) {
return;
}
for (const item of items2) {
const id = item.getAttribute("data-item-id");
if (!id) {
return;
}
if (itemSettings.locked.includes(id)) {
item.classList.add("locked");
}
if (itemSettings.hidden.includes(id)) {
item.classList.add("hidden");
}
}
updateGroupTitles();
});
addBulkControls = () => {
if (!shouldAddLocks(getCurrentTab())) {
return;
}
const container = getCurrentTabContainer();
if (!container) {
return;
}
const groups2 = container.querySelectorAll(".inventoryPage-tagContent-tagGroup");
if (!groups2) {
return;
}
groups2.forEach((group) => {
const title = group.querySelector(".inventoryPage-tagContent-tagTitle");
if (!title) {
return;
}
const existingControls = title.querySelector(".mhui-inventory-lock-and-hide-bulk-controls");
if (existingControls) {
return;
}
const controls = makeElement("div", "mhui-inventory-lock-and-hide-bulk-controls");
const lock = makeElement("div", ["mousehuntActionButton", "tiny", "mhui-inventory-lock-and-hide-controls-lock"]);
const lockText = makeElement("span", "", "Lock All");
lock.append(lockText);
lock.addEventListener("click", (e) => {
e.preventDefault();
e.stopPropagation();
const items2 = group.querySelectorAll(".inventoryPage-item");
if (!items2) {
return;
}
items2.forEach((item) => {
const id = item.getAttribute("data-item-id");
if (!id) {
return;
}
if (itemSettings.locked.includes(id)) {
return;
}
itemSettings.locked.push(id);
item.classList.add("locked");
const lockButtonText = item.querySelector(".mhui-inventory-lock-and-hide-controls-lock span");
if (lockButtonText) {
lockButtonText.innerText = "Unlock";
}
});
saveSettings(false);
});
controls.append(lock);
const unlock = makeElement("div", ["mousehuntActionButton", "tiny", "mhui-inventory-lock-and-hide-controls-lock"]);
const unlockText = makeElement("span", "", "Unlock All");
unlock.append(unlockText);
unlock.addEventListener("click", (e) => {
e.preventDefault();
e.stopPropagation();
const items2 = group.querySelectorAll(".inventoryPage-item");
if (!items2) {
return;
}
items2.forEach((item) => {
const id = item.getAttribute("data-item-id");
if (!id) {
return;
}
if (!itemSettings.locked.includes(id)) {
return;
}
itemSettings.locked = itemSettings.locked.filter((i) => i !== id);
item.classList.remove("locked");
const lockButtonText = item.querySelector(".mhui-inventory-lock-and-hide-controls-lock span");
if (lockButtonText) {
lockButtonText.innerText = "Lock";
}
});
saveSettings();
});
controls.append(unlock);
title.append(controls);
});
};
getCurrentTabContainer = () => {
let currentTab = getCurrentTab();
if (!currentTab || "inventory" === currentTab) {
currentTab = "cheese";
}
return document.querySelector(`.mousehuntHud-page-tabContent.${currentTab} .mousehuntHud-page-subTabContent.active`);
};
addLockAndHideControls = () => {
if ("inventory" !== getCurrentPage()) {
return;
}
let currentTab = getCurrentTab();
if (!currentTab || "inventory" === currentTab) {
currentTab = "cheese";
}
if ("crafting" === currentTab || "plankrun" === currentTab) {
return;
}
const container = getCurrentTabContainer();
if (!container) {
return;
}
if (container.hasAttribute("mh-improved-inventory-lock-and-hide")) {
return;
}
container.setAttribute("mh-improved-inventory-lock-and-hide", true);
const controlsWrapper = makeElement("div", "mhui-inventory-lock-and-hide-controls-wrapper");
const controls = makeElement("div", ["mousehuntActionButton", "tiny", "mhui-inventory-lock-and-hide-controls"]);
const text = makeElement("span", "", "Toggle Lock/Hide");
controls.append(text);
let isEditing3 = false;
controls.addEventListener("click", (e) => {
e.preventDefault();
e.stopPropagation();
addBulkControls();
addControlsToItems();
isEditing3 = !isEditing3;
container.setAttribute("mhui-inventory-lock-and-hide-controls-active", isEditing3);
container.classList.toggle("mhui-inventory-lock-and-hide-controls-active");
});
controlsWrapper.append(controls);
container.prepend(controlsWrapper);
};
hideItemsInTrapBrowser = () => __async(void 0, null, function* () {
const items2 = document.querySelectorAll(".campPage-trap-itemBrowser-item");
if (!items2) {
return;
}
itemSettings = getSettings2();
items2.forEach((item) => {
let id = item.getAttribute("data-item-id");
id = Number.parseInt(id, 10);
if (!id) {
return;
}
if (itemSettings.hidden.includes(id)) {
item.classList.add("hidden");
}
if (itemSettings.locked.includes(id)) {
item.classList.add("locked");
}
});
});
main19 = () => __async(void 0, null, function* () {
itemSettings = getSettings2();
maybeLockOrHideItems();
addLockAndHideControls();
});
init26 = () => __async(void 0, null, function* () {
addStyles(styles_default25);
onNavigation(main19, {
page: "inventory"
});
onEvent("camp_page_toggle_blueprint", hideItemsInTrapBrowser);
});
inventory_lock_and_hide_default = {
id: "inventory-lock-and-hide",
name: "Inventory Lock and Hide",
type: "feature",
default: true,
description: "Lock and hide items in your inventory. Will also hide items in the trap browser.",
load: init26
};
}
});
// src/modules/keyboard-shortcuts/actions.js
var clickMinLuck, gotoPage, openBlueprint, openMap, openMapInvites, openMarketplace, showTem, openInbox, openGifts, disarmCheese, disarmCharm, openTravelWindow2, travelToPreviousLocation;
var init_actions = __esm({
"src/modules/keyboard-shortcuts/actions.js"() {
init_sentry_release_injection_stub();
init_utils4();
clickMinLuck = () => {
const minluckButton = document.querySelector(".min-luck-button");
if (minluckButton) {
minluckButton.click();
} else {
app.pages.CampPage.toggleTrapEffectiveness(true);
}
};
gotoPage = (page) => {
if ("wiki" === page.toLowerCase()) {
eventRegistry.doEvent("mh-improved-open-wiki");
return;
}
hg.utils.PageUtil.setPage(page);
};
openBlueprint = (type) => {
const open = app.pages.CampPage.toggleItemBrowser;
if ("camp" === getCurrentPage()) {
open(type);
return;
}
hg.utils.PageUtil.setPage("Camp");
setTimeout(() => {
open(type);
}, 500);
};
openMap = () => {
hg.controllers.TreasureMapController.show();
};
openMapInvites = () => {
hg.controllers.TreasureMapController.showCommunity();
};
openMarketplace = () => {
hg.views.MarketplaceView.show();
};
showTem = () => {
app.pages.CampPage.toggleTrapEffectiveness(true);
};
openInbox = () => {
messenger.UI.notification.togglePopup();
};
openGifts = () => {
hg.views.GiftSelectorView.show();
};
disarmCheese = () => {
hg.utils.TrapControl.disarmBait().go();
};
disarmCharm = () => {
hg.utils.TrapControl.disarmTrinket().go();
};
openTravelWindow2 = () => {
eventRegistry.doEvent("mh-improved-open-travel-window");
};
travelToPreviousLocation = () => {
eventRegistry.doEvent("mh-improved-goto-previous-location");
};
}
});
// src/modules/keyboard-shortcuts/styles.css
var styles_default26;
var init_styles27 = __esm({
"src/modules/keyboard-shortcuts/styles.css"() {
styles_default26 = ".mh-ui-keyboard-shortcuts-popup-content h2{margin-bottom:10px}.mh-ui-keyboard-shortcut{display:flex;align-items:center;justify-content:space-between;padding:5px;font-size:12px;border-bottom:1px solid #ccc}.mh-ui-keyboard-shortcut:last-child{border-bottom:none}.mh-ui-keyboard-shortcut .description{flex-grow:1;font-size:11px}.mh-ui-keyboard-shortcut kbd{width:175px;height:11px;padding:3px;font-family:monospace;font-size:12px;text-align:center;white-space:nowrap;background-color:#f9f9f9;border:1px solid #ccc;border-radius:4px;box-shadow:0 1px #0003,0 0 0 2px #fff inset}.mh-ui-keyboard-shortcut .edit-controls{margin-right:10px}.mh-ui-keyboard-shortcut .edit-controls a{display:none}.mh-ui-keyboard-shortcut .edit-controls .edit,.mh-ui-keyboard-shortcuts-popup-content.editing .mh-ui-keyboard-shortcut.editing .edit-controls a,.mh-ui-keyboard-shortcut:focus .edit-controls .reset,.mh-ui-keyboard-shortcut:active .edit-controls .reset,.mh-ui-keyboard-shortcut:focus .edit-controls .edit,.mh-ui-keyboard-shortcut:active .edit-controls .edit,.mh-ui-keyboard-shortcut:focus .edit-controls .clear,.mh-ui-keyboard-shortcut:active .edit-controls .clear,.mh-ui-keyboard-shortcut.editing .edit-controls .edit{display:inline-block;margin-left:10px}.mh-ui-keyboard-shortcuts-popup-content.editing .mh-ui-keyboard-shortcut .edit-controls a{display:none}.mh-ui-keyboard-shortcut.saved kbd{background-color:#baf3ba;box-shadow:0 1px #0003,0 0 0 2px #daffda inset}.mh-ui-keyboard-shortcut.error kbd{background-color:#fda0a0;box-shadow:0 1px #0003,0 0 0 2px #ff8e8e inset}.mh-ui-keyboard-shortcut.editing kbd{background-color:#cce8ff;box-shadow:0 1px #0003,0 0 0 2px #acd9ff inset}.mh-ui-keyboard-shortcut.editing .description{color:#3b5998}.mh-ui-keyboard-shortcut.editing{background-color:#eff8ff}.mh-ui-keyboard-shortcuts-popup-content-category summary{padding:10px;font-size:14px;background-color:#eee}.mh-ui-keyboard-shortcuts-popup-content-category{margin:10px 0;border:1px solid #929292}.mh-ui-keyboard-shortcut:nth-child(2n){background-color:#eee}.mh-ui-keyboard-shortcuts-popup-content-category-list{border-top:1px solid #929292}\n";
}
});
// src/modules/keyboard-shortcuts/index.js
var getBaseShortcuts, getShortcuts, saveShortcut, getKeyForDisplay, isHelpPopupOpen, showHelpPopup, isEditing2, listenForKeypresses, openFromSettings, init27, keyboard_shortcuts_default;
var init_keyboard_shortcuts = __esm({
"src/modules/keyboard-shortcuts/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
init_actions();
init_styles27();
getBaseShortcuts = () => {
const shortcuts = [
{
id: "help",
key: "?",
shiftKey: true,
description: "Help",
action: showHelpPopup,
category: "hidden"
},
{
id: "goto-travel",
key: "t",
description: "Travel",
action: () => gotoPage("Travel"),
category: "navigation"
},
{
id: "goto-camp",
key: "j",
description: "Camp",
action: () => gotoPage("Camp"),
category: "navigation"
},
{
id: "goto-friends",
key: "f",
description: "Friends",
action: () => gotoPage("Friends"),
category: "navigation"
},
{
id: "goto-shops",
key: "s",
description: "Shops",
action: () => gotoPage("Shops"),
category: "navigation"
},
{
id: "goto-profile",
key: "p",
description: "Your Hunter Profile",
action: () => gotoPage("HunterProfile"),
category: "navigation"
},
{
id: "goto-send-supplies",
description: "Send Supplies",
action: () => gotoPage("SupplyTransfer"),
category: "navigation"
},
{
id: "goto-scoreboards",
description: "Scoreboards",
action: () => gotoPage("Scoreboards"),
category: "navigation"
},
{
id: "goto-team",
description: "Team",
action: () => gotoPage("Team"),
category: "navigation"
},
{
id: "goto-tournaments",
description: "Tournaments",
action: () => gotoPage("Tournament"),
category: "navigation"
},
{
id: "goto-wiki",
description: "Wiki",
action: () => gotoPage("Wiki"),
category: "navigation"
},
{
id: "goto-marketplace",
description: "Open the Marketplace",
action: openMarketplace,
category: "open-dialog"
},
{
id: "open-inbox",
description: "Open the Inbox",
action: openInbox,
category: "open-dialog"
},
{
id: "open-gifts",
description: "Open the Gifts popup",
action: openGifts,
category: "open-dialog"
},
{
id: "open-map",
key: "m",
description: "Open your Map",
action: openMap,
category: "open-dialog"
},
{
id: "open-map-invites",
key: "i",
description: "Open your Map Invites",
action: openMapInvites,
category: "open-dialog"
},
{
id: "open-travel-window",
description: "Open the Travel Window",
action: openTravelWindow2,
category: "open-dialog"
},
{
id: "change-weapon",
key: "w",
description: "Change Weapon",
action: () => openBlueprint("weapon"),
category: "trap-setup"
},
{
id: "change-base",
key: "b",
description: "Change Base",
action: () => openBlueprint("base"),
category: "trap-setup"
},
{
id: "change-charm",
key: "r",
description: "Change Charm",
action: () => openBlueprint("trinket"),
category: "trap-setup"
},
{
id: "change-cheese",
key: "c",
description: "Change Cheese",
action: () => openBlueprint("bait"),
category: "trap-setup"
},
{
id: "change-skin",
description: "Change Trap Skin",
action: () => openBlueprint("skin"),
category: "trap-setup"
},
{
id: "show-tem",
key: "e",
description: 'Show the <abbr title="Trap Effectiveness Meter">TEM</abbr>',
action: showTem,
category: "trap-setup"
},
{
id: "disarm-cheese",
description: "Disarm your Cheese",
action: disarmCheese,
category: "trap-setup"
},
{
id: "disarm-charm",
description: "Disarm your Charm",
action: disarmCharm,
category: "trap-setup"
},
{
id: "travel-to-previous-location",
description: "Travel to previous location",
action: travelToPreviousLocation,
category: "misc"
}
];
if (hasMiniCRE()) {
shortcuts.push({
id: "show-mini-cre",
key: "l",
description: "Open Mini CRE",
action: clickMinLuck,
category: "misc"
});
}
return shortcuts;
};
getShortcuts = () => {
const shortcuts = getBaseShortcuts();
const saved = getSetting("keyboard-shortcuts", []);
if (!saved || !saved.length) {
return shortcuts;
}
saved.forEach((savedShortcut) => {
const shortcut = shortcuts.find((s) => s.id === savedShortcut.id);
if (!shortcut) {
return;
}
shortcut.key = savedShortcut.key;
shortcut.ctrlKey = savedShortcut.ctrlKey;
shortcut.metaKey = savedShortcut.metaKey;
shortcut.altKey = savedShortcut.altKey;
shortcut.shiftKey = savedShortcut.shiftKey;
});
return shortcuts;
};
saveShortcut = (shortcutId, shortcutKey) => {
let saved = getSetting("keyboard-shortcuts", []);
if (!saved || !saved.length) {
saved = [];
}
const toSave = {
id: shortcutId,
key: shortcutKey.key,
ctrlKey: shortcutKey.ctrlKey,
metaKey: shortcutKey.metaKey,
altKey: shortcutKey.altKey,
shiftKey: shortcutKey.shiftKey
};
const existingShortcut = saved.find((s) => s.id === shortcutId);
if (existingShortcut) {
saved = saved.filter((s) => s.id !== shortcutId);
}
if (toSave.key !== "Backspace" && toSave.key !== "Delete" && toSave.key !== " ") {
saved.push(toSave);
}
saveSetting("keyboard-shortcuts", saved);
const savedElement = document.querySelector(`.mh-ui-keyboard-shortcut[data-shortcut-id="${shortcutId}"]`);
if (savedElement) {
savedElement.classList.add("saved");
setTimeout(() => {
savedElement.classList.remove("saved");
}, 300);
}
};
getKeyForDisplay = (keyEvent) => {
let keyString = "";
const keysToShow = [];
if (keyEvent.metaKey) {
keysToShow.push(isAppleOS() ? "\u2318" : "\u229E");
}
if (keyEvent.ctrlKey) {
keysToShow.push(isAppleOS() ? "\u2303" : "Ctrl");
}
if (keyEvent.altKey) {
keysToShow.push(isAppleOS() ? "\u2325" : "Alt");
}
if (keyEvent.shiftKey) {
keysToShow.push("Shift");
}
switch (keyEvent.key) {
case " ":
keysToShow.push("Space");
break;
case "ArrowUp":
keysToShow.push("\u2191");
break;
case "ArrowDown":
keysToShow.push("\u2193");
break;
case "ArrowLeft":
keysToShow.push("\u2190");
break;
case "ArrowRight":
keysToShow.push("\u2192");
break;
case "Backspace":
keysToShow.push("");
break;
default:
if (keyEvent.key && keyEvent.key.length === 1) {
keysToShow.push(keyEvent.key.toUpperCase());
} else {
keysToShow.push(keyEvent.key);
}
break;
}
keyString = keysToShow.join('<span class="connector"> + </span>');
return keyString;
};
isHelpPopupOpen = () => {
const overlay = getCurrentDialog();
if (!overlay) {
return false;
}
return "mh-ui-keyboard-shortcuts-popup" === overlay;
};
showHelpPopup = () => {
if (activejsDialog && activejsDialog.hide) {
if (isHelpPopupOpen()) {
activejsDialog.hide();
return;
}
activejsDialog.hide();
}
const shortcuts = getShortcuts();
let innerContent = "";
const categories = [
{
id: "navigation",
name: "Page Navigation",
startOpen: true
},
{
id: "open-dialog",
name: "Open Dialogs/Popups",
startOpen: true
},
{
id: "trap-setup",
name: "Modify Trap Setup",
startOpen: false
},
{
id: "misc",
name: "Miscellaneous",
startOpen: false
}
];
categories.forEach((category) => {
innerContent += `<details class="mh-ui-keyboard-shortcuts-popup-content-category" ${category.startOpen ? "open" : ""}>
<summary>${category.name}</summary>
<div class="mh-ui-keyboard-shortcuts-popup-content-category-description">
${category.description || ""}
</div>
<div class="mh-ui-keyboard-shortcuts-popup-content-category-list">`;
const categoryShortcuts = shortcuts.filter((s) => s.category === category.id);
categoryShortcuts.sort((a, b) => {
if (a.description < b.description) {
return -1;
}
if (a.description > b.description) {
return 1;
}
return 0;
});
categoryShortcuts.forEach((shortcut) => {
if ("hidden" === shortcut.category) {
return;
}
innerContent += `<div class="mh-ui-keyboard-shortcut" data-shortcut-id="${shortcut.id}">
<div class="description">${shortcut.description}</div>
<div class="edit-controls">
<a class="clear">Clear</a>
<a class="reset">Reset</a>
<a class="edit">Edit</a>
</div>
<kbd>${getKeyForDisplay(shortcut)}</kbd>
</div>`;
});
innerContent += "</div></details>";
});
const content = `<div class="mh-ui-keyboard-shortcuts-popup-content">
<h2 class="mh-ui-keyboard-shortcuts-edit-content">
To edit a shortcut, click on <em>Edit</em> on the shortcut, then press the key combination you want to use.
</h2>
<div class="mh-ui-keyboard-shortcuts-popup-content-list">
${innerContent}
</div>
</div>`;
createPopup({
title: "MouseHunt Improved Keyboard Shortcuts",
content,
hasCloseButton: true,
show: true,
className: "mh-ui-keyboard-shortcuts-popup"
});
const shortcutsWrapper = document.querySelector(".mh-ui-keyboard-shortcuts-popup-content");
const shortcutButtons = document.querySelectorAll(".mh-ui-keyboard-shortcuts-popup-content-list .mh-ui-keyboard-shortcut");
shortcutButtons.forEach((shortcut) => {
const shortcutId = shortcut.getAttribute("data-shortcut-id");
const editButton = shortcut.querySelector(".edit");
const resetButton = shortcut.querySelector(".reset");
const clearButton = shortcut.querySelector(".clear");
const kbd = shortcut.querySelector("kbd");
const startEditing = () => {
isEditing2 = true;
editButton.innerText = "Cancel";
shortcut.classList.add("editing");
shortcutsWrapper.classList.add("editing");
document.addEventListener("keydown", keypressListener);
};
const finishEditing = (id = false, key = false) => {
isEditing2 = false;
editButton.innerText = "Edit";
shortcut.classList.remove("editing");
shortcutsWrapper.classList.remove("editing");
document.removeEventListener("keydown", keypressListener);
if (!id || !key) {
return;
}
saveShortcut(id, key);
kbd.innerHTML = getKeyForDisplay(key);
};
const keypressListener = (event) => {
if (["Alt", "Shift", "Control", "Meta"].includes(event.key)) {
return;
}
const theShortcut = getShortcuts().find((s) => {
return s.key === event.key && event.ctrlKey === (s.ctrlKey || false) && event.metaKey === (s.metaKey || false) && event.altKey === (s.altKey || false) && event.shiftKey === (s.shiftKey || false);
});
if (theShortcut) {
const matchingShortcut = document.querySelector(`.mh-ui-keyboard-shortcut[data-shortcut-id="${theShortcut.id}"]`);
if (!matchingShortcut) {
return;
}
if (shortcutId === theShortcut.id) {
finishEditing(shortcutId, event);
return;
}
matchingShortcut.classList.add("error");
shortcut.classList.add("error");
setTimeout(() => {
matchingShortcut.classList.remove("error");
shortcut.classList.remove("error");
}, 300);
return;
}
finishEditing(shortcutId, event);
};
editButton.addEventListener("click", () => {
if (isEditing2) {
finishEditing();
} else {
startEditing();
}
});
resetButton.addEventListener("click", () => {
const defaultShortcut = getBaseShortcuts().find((s) => s.id === shortcutId);
if (!defaultShortcut) {
return;
}
finishEditing(shortcutId, defaultShortcut);
});
clearButton.addEventListener("click", () => {
finishEditing(shortcutId, {
key: "",
ctrlKey: false,
metaKey: false,
altKey: false,
shiftKey: false
});
});
});
};
isEditing2 = false;
listenForKeypresses = () => {
document.addEventListener("keydown", (event) => {
if (isHelpPopupOpen() || isEditing2 || user.has_puzzle) {
return;
}
const tagName = event.target.tagName.toLowerCase();
if ("input" === tagName || "textarea" === tagName || "select" === tagName) {
return;
}
const shortcuts = getShortcuts();
const shortcut = shortcuts.find((s) => {
s.ctrlKey = s.ctrlKey || false;
s.metaKey = s.metaKey || false;
s.altKey = s.altKey || false;
s.shiftKey = s.shiftKey || false;
return s.key === event.key && s.ctrlKey === event.ctrlKey && s.metaKey === event.metaKey && s.altKey === event.altKey && s.shiftKey === event.shiftKey;
});
if (shortcut && shortcut.action) {
event.preventDefault();
event.stopPropagation();
shortcut.action();
}
});
};
openFromSettings = () => {
if ("preferences" !== getCurrentPage()) {
return;
}
const openLink = document.querySelector(".mh-ui-keyboard-shortcuts-edit");
if (!openLink) {
return;
}
openLink.addEventListener("click", (event) => {
event.preventDefault();
showHelpPopup();
});
};
init27 = () => __async(void 0, null, function* () {
addStyles(styles_default26);
listenForKeypresses();
onNavigation(hasMiniCRE, {
page: "camp"
});
onNavigation(openFromSettings, {
page: "preferences",
tab: "mousehunt-improved-settings"
});
});
keyboard_shortcuts_default = {
id: "keyboard-shortcuts",
name: "Keyboard Shortcuts",
type: "feature",
default: true,
description: `Press '?' to see and edit the keyboard shortcuts. You can also <a href="#" class="mh-ui-keyboard-shortcuts-edit">edit them here</a>.`,
load: init27
};
}
});
// node_modules/humanize-duration/humanize-duration.js
var require_humanize_duration = __commonJS({
"node_modules/humanize-duration/humanize-duration.js"(exports, module) {
init_sentry_release_injection_stub();
(function() {
var GREEK = language(
function(c) {
return c === 1 ? "\u03C7\u03C1\u03CC\u03BD\u03BF\u03C2" : "\u03C7\u03C1\u03CC\u03BD\u03B9\u03B1";
},
function(c) {
return c === 1 ? "\u03BC\u03AE\u03BD\u03B1\u03C2" : "\u03BC\u03AE\u03BD\u03B5\u03C2";
},
function(c) {
return c === 1 ? "\u03B5\u03B2\u03B4\u03BF\u03BC\u03AC\u03B4\u03B1" : "\u03B5\u03B2\u03B4\u03BF\u03BC\u03AC\u03B4\u03B5\u03C2";
},
function(c) {
return c === 1 ? "\u03BC\u03AD\u03C1\u03B1" : "\u03BC\u03AD\u03C1\u03B5\u03C2";
},
function(c) {
return c === 1 ? "\u03CE\u03C1\u03B1" : "\u03CE\u03C1\u03B5\u03C2";
},
function(c) {
return c === 1 ? "\u03BB\u03B5\u03C0\u03C4\u03CC" : "\u03BB\u03B5\u03C0\u03C4\u03AC";
},
function(c) {
return c === 1 ? "\u03B4\u03B5\u03C5\u03C4\u03B5\u03C1\u03CC\u03BB\u03B5\u03C0\u03C4\u03BF" : "\u03B4\u03B5\u03C5\u03C4\u03B5\u03C1\u03CC\u03BB\u03B5\u03C0\u03C4\u03B1";
},
function(c) {
return (c === 1 ? "\u03C7\u03B9\u03BB\u03B9\u03BF\u03C3\u03C4\u03CC" : "\u03C7\u03B9\u03BB\u03B9\u03BF\u03C3\u03C4\u03AC") + " \u03C4\u03BF\u03C5 \u03B4\u03B5\u03C5\u03C4\u03B5\u03C1\u03BF\u03BB\u03AD\u03C0\u03C4\u03BF\u03C5";
},
","
);
var LANGUAGES = {
af: language(
"jaar",
function(c) {
return "maand" + (c === 1 ? "" : "e");
},
function(c) {
return c === 1 ? "week" : "weke";
},
function(c) {
return c === 1 ? "dag" : "dae";
},
function(c) {
return c === 1 ? "uur" : "ure";
},
function(c) {
return c === 1 ? "minuut" : "minute";
},
function(c) {
return "sekonde" + (c === 1 ? "" : "s");
},
function(c) {
return "millisekonde" + (c === 1 ? "" : "s");
},
","
),
ar: assign(
language(
function(c) {
return ["\u0633\u0646\u0629", "\u0633\u0646\u062A\u0627\u0646", "\u0633\u0646\u0648\u0627\u062A"][getArabicForm(c)];
},
function(c) {
return ["\u0634\u0647\u0631", "\u0634\u0647\u0631\u0627\u0646", "\u0623\u0634\u0647\u0631"][getArabicForm(c)];
},
function(c) {
return ["\u0623\u0633\u0628\u0648\u0639", "\u0623\u0633\u0628\u0648\u0639\u064A\u0646", "\u0623\u0633\u0627\u0628\u064A\u0639"][getArabicForm(c)];
},
function(c) {
return ["\u064A\u0648\u0645", "\u064A\u0648\u0645\u064A\u0646", "\u0623\u064A\u0627\u0645"][getArabicForm(c)];
},
function(c) {
return ["\u0633\u0627\u0639\u0629", "\u0633\u0627\u0639\u062A\u064A\u0646", "\u0633\u0627\u0639\u0627\u062A"][getArabicForm(c)];
},
function(c) {
return ["\u062F\u0642\u064A\u0642\u0629", "\u062F\u0642\u064A\u0642\u062A\u0627\u0646", "\u062F\u0642\u0627\u0626\u0642"][getArabicForm(c)];
},
function(c) {
return ["\u062B\u0627\u0646\u064A\u0629", "\u062B\u0627\u0646\u064A\u062A\u0627\u0646", "\u062B\u0648\u0627\u0646\u064A"][getArabicForm(c)];
},
function(c) {
return ["\u062C\u0632\u0621 \u0645\u0646 \u0627\u0644\u062B\u0627\u0646\u064A\u0629", "\u062C\u0632\u0622\u0646 \u0645\u0646 \u0627\u0644\u062B\u0627\u0646\u064A\u0629", "\u0623\u062C\u0632\u0627\u0621 \u0645\u0646 \u0627\u0644\u062B\u0627\u0646\u064A\u0629"][getArabicForm(c)];
},
","
),
{
delimiter: " \uFEED ",
_digitReplacements: ["\u06F0", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"]
}
),
bg: language(
function(c) {
return ["\u0433\u043E\u0434\u0438\u043D\u0438", "\u0433\u043E\u0434\u0438\u043D\u0430", "\u0433\u043E\u0434\u0438\u043D\u0438"][getSlavicForm(c)];
},
function(c) {
return ["\u043C\u0435\u0441\u0435\u0446\u0430", "\u043C\u0435\u0441\u0435\u0446", "\u043C\u0435\u0441\u0435\u0446\u0430"][getSlavicForm(c)];
},
function(c) {
return ["\u0441\u0435\u0434\u043C\u0438\u0446\u0438", "\u0441\u0435\u0434\u043C\u0438\u0446\u0430", "\u0441\u0435\u0434\u043C\u0438\u0446\u0438"][getSlavicForm(c)];
},
function(c) {
return ["\u0434\u043D\u0438", "\u0434\u0435\u043D", "\u0434\u043D\u0438"][getSlavicForm(c)];
},
function(c) {
return ["\u0447\u0430\u0441\u0430", "\u0447\u0430\u0441", "\u0447\u0430\u0441\u0430"][getSlavicForm(c)];
},
function(c) {
return ["\u043C\u0438\u043D\u0443\u0442\u0438", "\u043C\u0438\u043D\u0443\u0442\u0430", "\u043C\u0438\u043D\u0443\u0442\u0438"][getSlavicForm(c)];
},
function(c) {
return ["\u0441\u0435\u043A\u0443\u043D\u0434\u0438", "\u0441\u0435\u043A\u0443\u043D\u0434\u0430", "\u0441\u0435\u043A\u0443\u043D\u0434\u0438"][getSlavicForm(c)];
},
function(c) {
return ["\u043C\u0438\u043B\u0438\u0441\u0435\u043A\u0443\u043D\u0434\u0438", "\u043C\u0438\u043B\u0438\u0441\u0435\u043A\u0443\u043D\u0434\u0430", "\u043C\u0438\u043B\u0438\u0441\u0435\u043A\u0443\u043D\u0434\u0438"][getSlavicForm(c)];
},
","
),
bn: language(
"\u09AC\u099B\u09B0",
"\u09AE\u09BE\u09B8",
"\u09B8\u09AA\u09CD\u09A4\u09BE\u09B9",
"\u09A6\u09BF\u09A8",
"\u0998\u09A8\u09CD\u099F\u09BE",
"\u09AE\u09BF\u09A8\u09BF\u099F",
"\u09B8\u09C7\u0995\u09C7\u09A8\u09CD\u09A1",
"\u09AE\u09BF\u09B2\u09BF\u09B8\u09C7\u0995\u09C7\u09A8\u09CD\u09A1"
),
ca: language(
function(c) {
return "any" + (c === 1 ? "" : "s");
},
function(c) {
return "mes" + (c === 1 ? "" : "os");
},
function(c) {
return "setman" + (c === 1 ? "a" : "es");
},
function(c) {
return "di" + (c === 1 ? "a" : "es");
},
function(c) {
return "hor" + (c === 1 ? "a" : "es");
},
function(c) {
return "minut" + (c === 1 ? "" : "s");
},
function(c) {
return "segon" + (c === 1 ? "" : "s");
},
function(c) {
return "milisegon" + (c === 1 ? "" : "s");
},
","
),
ckb: language(
"\u0633\u0627\u06B5",
"\u0645\u0627\u0646\u06AF",
"\u0647\u06D5\u0641\u062A\u06D5",
"\u0695\u06C6\u0698",
"\u06A9\u0627\u0698\u06CE\u0631",
"\u062E\u0648\u0644\u06D5\u06A9",
"\u0686\u0631\u06A9\u06D5",
"\u0645\u06CC\u0644\u06CC \u0686\u0631\u06A9\u06D5",
"."
),
cs: language(
function(c) {
return ["rok", "roku", "roky", "let"][getCzechOrSlovakForm(c)];
},
function(c) {
return ["m\u011Bs\xEDc", "m\u011Bs\xEDce", "m\u011Bs\xEDce", "m\u011Bs\xEDc\u016F"][getCzechOrSlovakForm(c)];
},
function(c) {
return ["t\xFDden", "t\xFDdne", "t\xFDdny", "t\xFDdn\u016F"][getCzechOrSlovakForm(c)];
},
function(c) {
return ["den", "dne", "dny", "dn\xED"][getCzechOrSlovakForm(c)];
},
function(c) {
return ["hodina", "hodiny", "hodiny", "hodin"][getCzechOrSlovakForm(c)];
},
function(c) {
return ["minuta", "minuty", "minuty", "minut"][getCzechOrSlovakForm(c)];
},
function(c) {
return ["sekunda", "sekundy", "sekundy", "sekund"][getCzechOrSlovakForm(c)];
},
function(c) {
return ["milisekunda", "milisekundy", "milisekundy", "milisekund"][getCzechOrSlovakForm(c)];
},
","
),
cy: language(
"flwyddyn",
"mis",
"wythnos",
"diwrnod",
"awr",
"munud",
"eiliad",
"milieiliad"
),
da: language(
"\xE5r",
function(c) {
return "m\xE5ned" + (c === 1 ? "" : "er");
},
function(c) {
return "uge" + (c === 1 ? "" : "r");
},
function(c) {
return "dag" + (c === 1 ? "" : "e");
},
function(c) {
return "time" + (c === 1 ? "" : "r");
},
function(c) {
return "minut" + (c === 1 ? "" : "ter");
},
function(c) {
return "sekund" + (c === 1 ? "" : "er");
},
function(c) {
return "millisekund" + (c === 1 ? "" : "er");
},
","
),
de: language(
function(c) {
return "Jahr" + (c === 1 ? "" : "e");
},
function(c) {
return "Monat" + (c === 1 ? "" : "e");
},
function(c) {
return "Woche" + (c === 1 ? "" : "n");
},
function(c) {
return "Tag" + (c === 1 ? "" : "e");
},
function(c) {
return "Stunde" + (c === 1 ? "" : "n");
},
function(c) {
return "Minute" + (c === 1 ? "" : "n");
},
function(c) {
return "Sekunde" + (c === 1 ? "" : "n");
},
function(c) {
return "Millisekunde" + (c === 1 ? "" : "n");
},
","
),
el: GREEK,
en: language(
function(c) {
return "year" + (c === 1 ? "" : "s");
},
function(c) {
return "month" + (c === 1 ? "" : "s");
},
function(c) {
return "week" + (c === 1 ? "" : "s");
},
function(c) {
return "day" + (c === 1 ? "" : "s");
},
function(c) {
return "hour" + (c === 1 ? "" : "s");
},
function(c) {
return "minute" + (c === 1 ? "" : "s");
},
function(c) {
return "second" + (c === 1 ? "" : "s");
},
function(c) {
return "millisecond" + (c === 1 ? "" : "s");
}
),
eo: language(
function(c) {
return "jaro" + (c === 1 ? "" : "j");
},
function(c) {
return "monato" + (c === 1 ? "" : "j");
},
function(c) {
return "semajno" + (c === 1 ? "" : "j");
},
function(c) {
return "tago" + (c === 1 ? "" : "j");
},
function(c) {
return "horo" + (c === 1 ? "" : "j");
},
function(c) {
return "minuto" + (c === 1 ? "" : "j");
},
function(c) {
return "sekundo" + (c === 1 ? "" : "j");
},
function(c) {
return "milisekundo" + (c === 1 ? "" : "j");
},
","
),
es: language(
function(c) {
return "a\xF1o" + (c === 1 ? "" : "s");
},
function(c) {
return "mes" + (c === 1 ? "" : "es");
},
function(c) {
return "semana" + (c === 1 ? "" : "s");
},
function(c) {
return "d\xEDa" + (c === 1 ? "" : "s");
},
function(c) {
return "hora" + (c === 1 ? "" : "s");
},
function(c) {
return "minuto" + (c === 1 ? "" : "s");
},
function(c) {
return "segundo" + (c === 1 ? "" : "s");
},
function(c) {
return "milisegundo" + (c === 1 ? "" : "s");
},
","
),
et: language(
function(c) {
return "aasta" + (c === 1 ? "" : "t");
},
function(c) {
return "kuu" + (c === 1 ? "" : "d");
},
function(c) {
return "n\xE4dal" + (c === 1 ? "" : "at");
},
function(c) {
return "p\xE4ev" + (c === 1 ? "" : "a");
},
function(c) {
return "tund" + (c === 1 ? "" : "i");
},
function(c) {
return "minut" + (c === 1 ? "" : "it");
},
function(c) {
return "sekund" + (c === 1 ? "" : "it");
},
function(c) {
return "millisekund" + (c === 1 ? "" : "it");
},
","
),
eu: language(
"urte",
"hilabete",
"aste",
"egun",
"ordu",
"minutu",
"segundo",
"milisegundo",
","
),
fa: language(
"\u0633\u0627\u0644",
"\u0645\u0627\u0647",
"\u0647\u0641\u062A\u0647",
"\u0631\u0648\u0632",
"\u0633\u0627\u0639\u062A",
"\u062F\u0642\u06CC\u0642\u0647",
"\u062B\u0627\u0646\u06CC\u0647",
"\u0645\u06CC\u0644\u06CC \u062B\u0627\u0646\u06CC\u0647"
),
fi: language(
function(c) {
return c === 1 ? "vuosi" : "vuotta";
},
function(c) {
return c === 1 ? "kuukausi" : "kuukautta";
},
function(c) {
return "viikko" + (c === 1 ? "" : "a");
},
function(c) {
return "p\xE4iv\xE4" + (c === 1 ? "" : "\xE4");
},
function(c) {
return "tunti" + (c === 1 ? "" : "a");
},
function(c) {
return "minuutti" + (c === 1 ? "" : "a");
},
function(c) {
return "sekunti" + (c === 1 ? "" : "a");
},
function(c) {
return "millisekunti" + (c === 1 ? "" : "a");
},
","
),
fo: language(
"\xE1r",
function(c) {
return c === 1 ? "m\xE1na\xF0ur" : "m\xE1na\xF0ir";
},
function(c) {
return c === 1 ? "vika" : "vikur";
},
function(c) {
return c === 1 ? "dagur" : "dagar";
},
function(c) {
return c === 1 ? "t\xEDmi" : "t\xEDmar";
},
function(c) {
return c === 1 ? "minuttur" : "minuttir";
},
"sekund",
"millisekund",
","
),
fr: language(
function(c) {
return "an" + (c >= 2 ? "s" : "");
},
"mois",
function(c) {
return "semaine" + (c >= 2 ? "s" : "");
},
function(c) {
return "jour" + (c >= 2 ? "s" : "");
},
function(c) {
return "heure" + (c >= 2 ? "s" : "");
},
function(c) {
return "minute" + (c >= 2 ? "s" : "");
},
function(c) {
return "seconde" + (c >= 2 ? "s" : "");
},
function(c) {
return "milliseconde" + (c >= 2 ? "s" : "");
},
","
),
gr: GREEK,
he: language(
function(c) {
return c === 1 ? "\u05E9\u05E0\u05D4" : "\u05E9\u05E0\u05D9\u05DD";
},
function(c) {
return c === 1 ? "\u05D7\u05D5\u05D3\u05E9" : "\u05D7\u05D5\u05D3\u05E9\u05D9\u05DD";
},
function(c) {
return c === 1 ? "\u05E9\u05D1\u05D5\u05E2" : "\u05E9\u05D1\u05D5\u05E2\u05D5\u05EA";
},
function(c) {
return c === 1 ? "\u05D9\u05D5\u05DD" : "\u05D9\u05DE\u05D9\u05DD";
},
function(c) {
return c === 1 ? "\u05E9\u05E2\u05D4" : "\u05E9\u05E2\u05D5\u05EA";
},
function(c) {
return c === 1 ? "\u05D3\u05E7\u05D4" : "\u05D3\u05E7\u05D5\u05EA";
},
function(c) {
return c === 1 ? "\u05E9\u05E0\u05D9\u05D4" : "\u05E9\u05E0\u05D9\u05D5\u05EA";
},
function(c) {
return c === 1 ? "\u05DE\u05D9\u05DC\u05D9\u05E9\u05E0\u05D9\u05D9\u05D4" : "\u05DE\u05D9\u05DC\u05D9\u05E9\u05E0\u05D9\u05D5\u05EA";
}
),
hr: language(
function(c) {
if (c % 10 === 2 || c % 10 === 3 || c % 10 === 4) {
return "godine";
}
return "godina";
},
function(c) {
if (c === 1) {
return "mjesec";
} else if (c === 2 || c === 3 || c === 4) {
return "mjeseca";
}
return "mjeseci";
},
function(c) {
if (c % 10 === 1 && c !== 11) {
return "tjedan";
}
return "tjedna";
},
function(c) {
return c === 1 ? "dan" : "dana";
},
function(c) {
if (c === 1) {
return "sat";
} else if (c === 2 || c === 3 || c === 4) {
return "sata";
}
return "sati";
},
function(c) {
var mod10 = c % 10;
if ((mod10 === 2 || mod10 === 3 || mod10 === 4) && (c < 10 || c > 14)) {
return "minute";
}
return "minuta";
},
function(c) {
var mod10 = c % 10;
if (mod10 === 5 || Math.floor(c) === c && c >= 10 && c <= 19) {
return "sekundi";
} else if (mod10 === 1) {
return "sekunda";
} else if (mod10 === 2 || mod10 === 3 || mod10 === 4) {
return "sekunde";
}
return "sekundi";
},
function(c) {
if (c === 1) {
return "milisekunda";
} else if (c % 10 === 2 || c % 10 === 3 || c % 10 === 4) {
return "milisekunde";
}
return "milisekundi";
},
","
),
hi: language(
"\u0938\u093E\u0932",
function(c) {
return c === 1 ? "\u092E\u0939\u0940\u0928\u093E" : "\u092E\u0939\u0940\u0928\u0947";
},
function(c) {
return c === 1 ? "\u0939\u095E\u094D\u0924\u093E" : "\u0939\u092B\u094D\u0924\u0947";
},
"\u0926\u093F\u0928",
function(c) {
return c === 1 ? "\u0918\u0902\u091F\u093E" : "\u0918\u0902\u091F\u0947";
},
"\u092E\u093F\u0928\u091F",
"\u0938\u0947\u0915\u0902\u0921",
"\u092E\u093F\u0932\u0940\u0938\u0947\u0915\u0902\u0921"
),
hu: language(
"\xE9v",
"h\xF3nap",
"h\xE9t",
"nap",
"\xF3ra",
"perc",
"m\xE1sodperc",
"ezredm\xE1sodperc",
","
),
id: language(
"tahun",
"bulan",
"minggu",
"hari",
"jam",
"menit",
"detik",
"milidetik"
),
is: language(
"\xE1r",
function(c) {
return "m\xE1nu\xF0" + (c === 1 ? "ur" : "ir");
},
function(c) {
return "vik" + (c === 1 ? "a" : "ur");
},
function(c) {
return "dag" + (c === 1 ? "ur" : "ar");
},
function(c) {
return "klukkut\xEDm" + (c === 1 ? "i" : "ar");
},
function(c) {
return "m\xEDn\xFAt" + (c === 1 ? "a" : "ur");
},
function(c) {
return "sek\xFAnd" + (c === 1 ? "a" : "ur");
},
function(c) {
return "millisek\xFAnd" + (c === 1 ? "a" : "ur");
}
),
it: language(
function(c) {
return "ann" + (c === 1 ? "o" : "i");
},
function(c) {
return "mes" + (c === 1 ? "e" : "i");
},
function(c) {
return "settiman" + (c === 1 ? "a" : "e");
},
function(c) {
return "giorn" + (c === 1 ? "o" : "i");
},
function(c) {
return "or" + (c === 1 ? "a" : "e");
},
function(c) {
return "minut" + (c === 1 ? "o" : "i");
},
function(c) {
return "second" + (c === 1 ? "o" : "i");
},
function(c) {
return "millisecond" + (c === 1 ? "o" : "i");
},
","
),
ja: language("\u5E74", "\u30F6\u6708", "\u9031", "\u65E5", "\u6642\u9593", "\u5206", "\u79D2", "\u30DF\u30EA\u79D2"),
km: language(
"\u1786\u17D2\u1793\u17B6\u17C6",
"\u1781\u17C2",
"\u179F\u1794\u17D2\u178F\u17B6\u17A0\u17CD",
"\u1790\u17D2\u1784\u17C3",
"\u1798\u17C9\u17C4\u1784",
"\u1793\u17B6\u1791\u17B8",
"\u179C\u17B7\u1793\u17B6\u1791\u17B8",
"\u1798\u17B7\u179B\u17D2\u179B\u17B8\u179C\u17B7\u1793\u17B6\u1791\u17B8"
),
kn: language(
function(c) {
return c === 1 ? "\u0CB5\u0CB0\u0CCD\u0CB7" : "\u0CB5\u0CB0\u0CCD\u0CB7\u0C97\u0CB3\u0CC1";
},
function(c) {
return c === 1 ? "\u0CA4\u0CBF\u0C82\u0C97\u0CB3\u0CC1" : "\u0CA4\u0CBF\u0C82\u0C97\u0CB3\u0CC1\u0C97\u0CB3\u0CC1";
},
function(c) {
return c === 1 ? "\u0CB5\u0CBE\u0CB0" : "\u0CB5\u0CBE\u0CB0\u0C97\u0CB3\u0CC1";
},
function(c) {
return c === 1 ? "\u0CA6\u0CBF\u0CA8" : "\u0CA6\u0CBF\u0CA8\u0C97\u0CB3\u0CC1";
},
function(c) {
return c === 1 ? "\u0C97\u0C82\u0C9F\u0CC6" : "\u0C97\u0C82\u0C9F\u0CC6\u0C97\u0CB3\u0CC1";
},
function(c) {
return c === 1 ? "\u0CA8\u0CBF\u0CAE\u0CBF\u0CB7" : "\u0CA8\u0CBF\u0CAE\u0CBF\u0CB7\u0C97\u0CB3\u0CC1";
},
function(c) {
return c === 1 ? "\u0CB8\u0CC6\u0C95\u0CC6\u0C82\u0CA1\u0CCD" : "\u0CB8\u0CC6\u0C95\u0CC6\u0C82\u0CA1\u0CC1\u0C97\u0CB3\u0CC1";
},
function(c) {
return c === 1 ? "\u0CAE\u0CBF\u0CB2\u0CBF\u0CB8\u0CC6\u0C95\u0CC6\u0C82\u0CA1\u0CCD" : "\u0CAE\u0CBF\u0CB2\u0CBF\u0CB8\u0CC6\u0C95\u0CC6\u0C82\u0CA1\u0CC1\u0C97\u0CB3\u0CC1";
}
),
ko: language("\uB144", "\uAC1C\uC6D4", "\uC8FC\uC77C", "\uC77C", "\uC2DC\uAC04", "\uBD84", "\uCD08", "\uBC00\uB9AC \uCD08"),
ku: language(
"sal",
"meh",
"hefte",
"roj",
"seet",
"deqe",
"saniye",
"m\xEEl\xEE\xE7irk",
","
),
lo: language(
"\u0E9B\u0EB5",
"\u0EC0\u0E94\u0EB7\u0EAD\u0E99",
"\u0EAD\u0EB2\u0E97\u0EB4\u0E94",
"\u0EA1\u0EB7\u0EC9",
"\u0E8A\u0EBB\u0EC8\u0EA7\u0EC2\u0EA1\u0E87",
"\u0E99\u0EB2\u0E97\u0EB5",
"\u0EA7\u0EB4\u0E99\u0EB2\u0E97\u0EB5",
"\u0EA1\u0EB4\u0E99\u0EA5\u0EB4\u0EA7\u0EB4\u0E99\u0EB2\u0E97\u0EB5",
","
),
lt: language(
function(c) {
return c % 10 === 0 || c % 100 >= 10 && c % 100 <= 20 ? "met\u0173" : "metai";
},
function(c) {
return ["m\u0117nuo", "m\u0117nesiai", "m\u0117nesi\u0173"][getLithuanianForm(c)];
},
function(c) {
return ["savait\u0117", "savait\u0117s", "savai\u010Di\u0173"][getLithuanianForm(c)];
},
function(c) {
return ["diena", "dienos", "dien\u0173"][getLithuanianForm(c)];
},
function(c) {
return ["valanda", "valandos", "valand\u0173"][getLithuanianForm(c)];
},
function(c) {
return ["minut\u0117", "minut\u0117s", "minu\u010Di\u0173"][getLithuanianForm(c)];
},
function(c) {
return ["sekund\u0117", "sekund\u0117s", "sekund\u017Ei\u0173"][getLithuanianForm(c)];
},
function(c) {
return ["milisekund\u0117", "milisekund\u0117s", "milisekund\u017Ei\u0173"][getLithuanianForm(c)];
},
","
),
lv: language(
function(c) {
return getLatvianForm(c) ? "gads" : "gadi";
},
function(c) {
return getLatvianForm(c) ? "m\u0113nesis" : "m\u0113ne\u0161i";
},
function(c) {
return getLatvianForm(c) ? "ned\u0113\u013Ca" : "ned\u0113\u013Cas";
},
function(c) {
return getLatvianForm(c) ? "diena" : "dienas";
},
function(c) {
return getLatvianForm(c) ? "stunda" : "stundas";
},
function(c) {
return getLatvianForm(c) ? "min\u016Bte" : "min\u016Btes";
},
function(c) {
return getLatvianForm(c) ? "sekunde" : "sekundes";
},
function(c) {
return getLatvianForm(c) ? "milisekunde" : "milisekundes";
},
","
),
mk: language(
function(c) {
return c === 1 ? "\u0433\u043E\u0434\u0438\u043D\u0430" : "\u0433\u043E\u0434\u0438\u043D\u0438";
},
function(c) {
return c === 1 ? "\u043C\u0435\u0441\u0435\u0446" : "\u043C\u0435\u0441\u0435\u0446\u0438";
},
function(c) {
return c === 1 ? "\u043D\u0435\u0434\u0435\u043B\u0430" : "\u043D\u0435\u0434\u0435\u043B\u0438";
},
function(c) {
return c === 1 ? "\u0434\u0435\u043D" : "\u0434\u0435\u043D\u0430";
},
function(c) {
return c === 1 ? "\u0447\u0430\u0441" : "\u0447\u0430\u0441\u0430";
},
function(c) {
return c === 1 ? "\u043C\u0438\u043D\u0443\u0442\u0430" : "\u043C\u0438\u043D\u0443\u0442\u0438";
},
function(c) {
return c === 1 ? "\u0441\u0435\u043A\u0443\u043D\u0434\u0430" : "\u0441\u0435\u043A\u0443\u043D\u0434\u0438";
},
function(c) {
return c === 1 ? "\u043C\u0438\u043B\u0438\u0441\u0435\u043A\u0443\u043D\u0434\u0430" : "\u043C\u0438\u043B\u0438\u0441\u0435\u043A\u0443\u043D\u0434\u0438";
},
","
),
mn: language(
"\u0436\u0438\u043B",
"\u0441\u0430\u0440",
"\u0434\u043E\u043B\u043E\u043E \u0445\u043E\u043D\u043E\u0433",
"\u04E9\u0434\u04E9\u0440",
"\u0446\u0430\u0433",
"\u043C\u0438\u043D\u0443\u0442",
"\u0441\u0435\u043A\u0443\u043D\u0434",
"\u043C\u0438\u043B\u043B\u0438\u0441\u0435\u043A\u0443\u043D\u0434"
),
mr: language(
function(c) {
return c === 1 ? "\u0935\u0930\u094D\u0937" : "\u0935\u0930\u094D\u0937\u0947";
},
function(c) {
return c === 1 ? "\u092E\u0939\u093F\u0928\u093E" : "\u092E\u0939\u093F\u0928\u0947";
},
function(c) {
return c === 1 ? "\u0906\u0920\u0935\u0921\u093E" : "\u0906\u0920\u0935\u0921\u0947";
},
"\u0926\u093F\u0935\u0938",
"\u0924\u093E\u0938",
function(c) {
return c === 1 ? "\u092E\u093F\u0928\u093F\u091F" : "\u092E\u093F\u0928\u093F\u091F\u0947";
},
"\u0938\u0947\u0915\u0902\u0926",
"\u092E\u093F\u0932\u093F\u0938\u0947\u0915\u0902\u0926"
),
ms: language(
"tahun",
"bulan",
"minggu",
"hari",
"jam",
"minit",
"saat",
"milisaat"
),
nl: language(
"jaar",
function(c) {
return c === 1 ? "maand" : "maanden";
},
function(c) {
return c === 1 ? "week" : "weken";
},
function(c) {
return c === 1 ? "dag" : "dagen";
},
"uur",
function(c) {
return c === 1 ? "minuut" : "minuten";
},
function(c) {
return c === 1 ? "seconde" : "seconden";
},
function(c) {
return c === 1 ? "milliseconde" : "milliseconden";
},
","
),
no: language(
"\xE5r",
function(c) {
return "m\xE5ned" + (c === 1 ? "" : "er");
},
function(c) {
return "uke" + (c === 1 ? "" : "r");
},
function(c) {
return "dag" + (c === 1 ? "" : "er");
},
function(c) {
return "time" + (c === 1 ? "" : "r");
},
function(c) {
return "minutt" + (c === 1 ? "" : "er");
},
function(c) {
return "sekund" + (c === 1 ? "" : "er");
},
function(c) {
return "millisekund" + (c === 1 ? "" : "er");
},
","
),
pl: language(
function(c) {
return ["rok", "roku", "lata", "lat"][getPolishForm(c)];
},
function(c) {
return ["miesi\u0105c", "miesi\u0105ca", "miesi\u0105ce", "miesi\u0119cy"][getPolishForm(c)];
},
function(c) {
return ["tydzie\u0144", "tygodnia", "tygodnie", "tygodni"][getPolishForm(c)];
},
function(c) {
return ["dzie\u0144", "dnia", "dni", "dni"][getPolishForm(c)];
},
function(c) {
return ["godzina", "godziny", "godziny", "godzin"][getPolishForm(c)];
},
function(c) {
return ["minuta", "minuty", "minuty", "minut"][getPolishForm(c)];
},
function(c) {
return ["sekunda", "sekundy", "sekundy", "sekund"][getPolishForm(c)];
},
function(c) {
return ["milisekunda", "milisekundy", "milisekundy", "milisekund"][getPolishForm(c)];
},
","
),
pt: language(
function(c) {
return "ano" + (c === 1 ? "" : "s");
},
function(c) {
return c === 1 ? "m\xEAs" : "meses";
},
function(c) {
return "semana" + (c === 1 ? "" : "s");
},
function(c) {
return "dia" + (c === 1 ? "" : "s");
},
function(c) {
return "hora" + (c === 1 ? "" : "s");
},
function(c) {
return "minuto" + (c === 1 ? "" : "s");
},
function(c) {
return "segundo" + (c === 1 ? "" : "s");
},
function(c) {
return "milissegundo" + (c === 1 ? "" : "s");
},
","
),
ro: language(
function(c) {
return c === 1 ? "an" : "ani";
},
function(c) {
return c === 1 ? "lun\u0103" : "luni";
},
function(c) {
return c === 1 ? "s\u0103pt\u0103m\xE2n\u0103" : "s\u0103pt\u0103m\xE2ni";
},
function(c) {
return c === 1 ? "zi" : "zile";
},
function(c) {
return c === 1 ? "or\u0103" : "ore";
},
function(c) {
return c === 1 ? "minut" : "minute";
},
function(c) {
return c === 1 ? "secund\u0103" : "secunde";
},
function(c) {
return c === 1 ? "milisecund\u0103" : "milisecunde";
},
","
),
ru: language(
function(c) {
return ["\u043B\u0435\u0442", "\u0433\u043E\u0434", "\u0433\u043E\u0434\u0430"][getSlavicForm(c)];
},
function(c) {
return ["\u043C\u0435\u0441\u044F\u0446\u0435\u0432", "\u043C\u0435\u0441\u044F\u0446", "\u043C\u0435\u0441\u044F\u0446\u0430"][getSlavicForm(c)];
},
function(c) {
return ["\u043D\u0435\u0434\u0435\u043B\u044C", "\u043D\u0435\u0434\u0435\u043B\u044F", "\u043D\u0435\u0434\u0435\u043B\u0438"][getSlavicForm(c)];
},
function(c) {
return ["\u0434\u043D\u0435\u0439", "\u0434\u0435\u043D\u044C", "\u0434\u043D\u044F"][getSlavicForm(c)];
},
function(c) {
return ["\u0447\u0430\u0441\u043E\u0432", "\u0447\u0430\u0441", "\u0447\u0430\u0441\u0430"][getSlavicForm(c)];
},
function(c) {
return ["\u043C\u0438\u043D\u0443\u0442", "\u043C\u0438\u043D\u0443\u0442\u0430", "\u043C\u0438\u043D\u0443\u0442\u044B"][getSlavicForm(c)];
},
function(c) {
return ["\u0441\u0435\u043A\u0443\u043D\u0434", "\u0441\u0435\u043A\u0443\u043D\u0434\u0430", "\u0441\u0435\u043A\u0443\u043D\u0434\u044B"][getSlavicForm(c)];
},
function(c) {
return ["\u043C\u0438\u043B\u043B\u0438\u0441\u0435\u043A\u0443\u043D\u0434", "\u043C\u0438\u043B\u043B\u0438\u0441\u0435\u043A\u0443\u043D\u0434\u0430", "\u043C\u0438\u043B\u043B\u0438\u0441\u0435\u043A\u0443\u043D\u0434\u044B"][getSlavicForm(c)];
},
","
),
sq: language(
function(c) {
return c === 1 ? "vit" : "vjet";
},
"muaj",
"jav\xEB",
"dit\xEB",
"or\xEB",
function(c) {
return "minut" + (c === 1 ? "\xEB" : "a");
},
function(c) {
return "sekond" + (c === 1 ? "\xEB" : "a");
},
function(c) {
return "milisekond" + (c === 1 ? "\xEB" : "a");
},
","
),
sr: language(
function(c) {
return ["\u0433\u043E\u0434\u0438\u043D\u0438", "\u0433\u043E\u0434\u0438\u043D\u0430", "\u0433\u043E\u0434\u0438\u043D\u0435"][getSlavicForm(c)];
},
function(c) {
return ["\u043C\u0435\u0441\u0435\u0446\u0438", "\u043C\u0435\u0441\u0435\u0446", "\u043C\u0435\u0441\u0435\u0446\u0430"][getSlavicForm(c)];
},
function(c) {
return ["\u043D\u0435\u0434\u0435\u0459\u0438", "\u043D\u0435\u0434\u0435\u0459\u0430", "\u043D\u0435\u0434\u0435\u0459\u0435"][getSlavicForm(c)];
},
function(c) {
return ["\u0434\u0430\u043D\u0438", "\u0434\u0430\u043D", "\u0434\u0430\u043D\u0430"][getSlavicForm(c)];
},
function(c) {
return ["\u0441\u0430\u0442\u0438", "\u0441\u0430\u0442", "\u0441\u0430\u0442\u0430"][getSlavicForm(c)];
},
function(c) {
return ["\u043C\u0438\u043D\u0443\u0442\u0430", "\u043C\u0438\u043D\u0443\u0442", "\u043C\u0438\u043D\u0443\u0442\u0430"][getSlavicForm(c)];
},
function(c) {
return ["\u0441\u0435\u043A\u0443\u043D\u0434\u0438", "\u0441\u0435\u043A\u0443\u043D\u0434\u0430", "\u0441\u0435\u043A\u0443\u043D\u0434\u0435"][getSlavicForm(c)];
},
function(c) {
return ["\u043C\u0438\u043B\u0438\u0441\u0435\u043A\u0443\u043D\u0434\u0438", "\u043C\u0438\u043B\u0438\u0441\u0435\u043A\u0443\u043D\u0434\u0430", "\u043C\u0438\u043B\u0438\u0441\u0435\u043A\u0443\u043D\u0434\u0435"][getSlavicForm(c)];
},
","
),
ta: language(
function(c) {
return c === 1 ? "\u0BB5\u0BB0\u0BC1\u0B9F\u0BAE\u0BCD" : "\u0B86\u0BA3\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD";
},
function(c) {
return c === 1 ? "\u0BAE\u0BBE\u0BA4\u0BAE\u0BCD" : "\u0BAE\u0BBE\u0BA4\u0B99\u0BCD\u0B95\u0BB3\u0BCD";
},
function(c) {
return c === 1 ? "\u0BB5\u0BBE\u0BB0\u0BAE\u0BCD" : "\u0BB5\u0BBE\u0BB0\u0B99\u0BCD\u0B95\u0BB3\u0BCD";
},
function(c) {
return c === 1 ? "\u0BA8\u0BBE\u0BB3\u0BCD" : "\u0BA8\u0BBE\u0B9F\u0BCD\u0B95\u0BB3\u0BCD";
},
function(c) {
return c === 1 ? "\u0BAE\u0BA3\u0BBF" : "\u0BAE\u0BA3\u0BBF\u0BA8\u0BC7\u0BB0\u0BAE\u0BCD";
},
function(c) {
return "\u0BA8\u0BBF\u0BAE\u0BBF\u0B9F" + (c === 1 ? "\u0BAE\u0BCD" : "\u0B99\u0BCD\u0B95\u0BB3\u0BCD");
},
function(c) {
return "\u0BB5\u0BBF\u0BA9\u0BBE\u0B9F\u0BBF" + (c === 1 ? "" : "\u0B95\u0BB3\u0BCD");
},
function(c) {
return "\u0BAE\u0BBF\u0BB2\u0BCD\u0BB2\u0BBF \u0BB5\u0BBF\u0BA8\u0BBE\u0B9F\u0BBF" + (c === 1 ? "" : "\u0B95\u0BB3\u0BCD");
}
),
te: language(
function(c) {
return "\u0C38\u0C02\u0C35\u0C24\u0C4D\u0C38" + (c === 1 ? "\u0C30\u0C02" : "\u0C30\u0C3E\u0C32");
},
function(c) {
return "\u0C28\u0C46\u0C32" + (c === 1 ? "" : "\u0C32");
},
function(c) {
return c === 1 ? "\u0C35\u0C3E\u0C30\u0C02" : "\u0C35\u0C3E\u0C30\u0C3E\u0C32\u0C41";
},
function(c) {
return "\u0C30\u0C4B\u0C1C\u0C41" + (c === 1 ? "" : "\u0C32\u0C41");
},
function(c) {
return "\u0C17\u0C02\u0C1F" + (c === 1 ? "" : "\u0C32\u0C41");
},
function(c) {
return c === 1 ? "\u0C28\u0C3F\u0C2E\u0C3F\u0C37\u0C02" : "\u0C28\u0C3F\u0C2E\u0C3F\u0C37\u0C3E\u0C32\u0C41";
},
function(c) {
return c === 1 ? "\u0C38\u0C46\u0C15\u0C28\u0C41" : "\u0C38\u0C46\u0C15\u0C28\u0C4D\u0C32\u0C41";
},
function(c) {
return c === 1 ? "\u0C2E\u0C3F\u0C32\u0C4D\u0C32\u0C40\u0C38\u0C46\u0C15\u0C28\u0C4D" : "\u0C2E\u0C3F\u0C32\u0C4D\u0C32\u0C40\u0C38\u0C46\u0C15\u0C28\u0C4D\u0C32\u0C41";
}
),
uk: language(
function(c) {
return ["\u0440\u043E\u043A\u0456\u0432", "\u0440\u0456\u043A", "\u0440\u043E\u043A\u0438"][getSlavicForm(c)];
},
function(c) {
return ["\u043C\u0456\u0441\u044F\u0446\u0456\u0432", "\u043C\u0456\u0441\u044F\u0446\u044C", "\u043C\u0456\u0441\u044F\u0446\u0456"][getSlavicForm(c)];
},
function(c) {
return ["\u0442\u0438\u0436\u043D\u0456\u0432", "\u0442\u0438\u0436\u0434\u0435\u043D\u044C", "\u0442\u0438\u0436\u043D\u0456"][getSlavicForm(c)];
},
function(c) {
return ["\u0434\u043D\u0456\u0432", "\u0434\u0435\u043D\u044C", "\u0434\u043D\u0456"][getSlavicForm(c)];
},
function(c) {
return ["\u0433\u043E\u0434\u0438\u043D", "\u0433\u043E\u0434\u0438\u043D\u0430", "\u0433\u043E\u0434\u0438\u043D\u0438"][getSlavicForm(c)];
},
function(c) {
return ["\u0445\u0432\u0438\u043B\u0438\u043D", "\u0445\u0432\u0438\u043B\u0438\u043D\u0430", "\u0445\u0432\u0438\u043B\u0438\u043D\u0438"][getSlavicForm(c)];
},
function(c) {
return ["\u0441\u0435\u043A\u0443\u043D\u0434", "\u0441\u0435\u043A\u0443\u043D\u0434\u0430", "\u0441\u0435\u043A\u0443\u043D\u0434\u0438"][getSlavicForm(c)];
},
function(c) {
return ["\u043C\u0456\u043B\u0456\u0441\u0435\u043A\u0443\u043D\u0434", "\u043C\u0456\u043B\u0456\u0441\u0435\u043A\u0443\u043D\u0434\u0430", "\u043C\u0456\u043B\u0456\u0441\u0435\u043A\u0443\u043D\u0434\u0438"][getSlavicForm(c)];
},
","
),
ur: language(
"\u0633\u0627\u0644",
function(c) {
return c === 1 ? "\u0645\u06C1\u06CC\u0646\u06C1" : "\u0645\u06C1\u06CC\u0646\u06D2";
},
function(c) {
return c === 1 ? "\u06C1\u0641\u062A\u06C1" : "\u06C1\u0641\u062A\u06D2";
},
"\u062F\u0646",
function(c) {
return c === 1 ? "\u06AF\u06BE\u0646\u0679\u06C1" : "\u06AF\u06BE\u0646\u0679\u06D2";
},
"\u0645\u0646\u0679",
"\u0633\u06CC\u06A9\u0646\u0688",
"\u0645\u0644\u06CC \u0633\u06CC\u06A9\u0646\u0688"
),
sk: language(
function(c) {
return ["rok", "roky", "roky", "rokov"][getCzechOrSlovakForm(c)];
},
function(c) {
return ["mesiac", "mesiace", "mesiace", "mesiacov"][getCzechOrSlovakForm(c)];
},
function(c) {
return ["t\xFD\u017Ede\u0148", "t\xFD\u017Edne", "t\xFD\u017Edne", "t\xFD\u017Ed\u0148ov"][getCzechOrSlovakForm(c)];
},
function(c) {
return ["de\u0148", "dni", "dni", "dn\xED"][getCzechOrSlovakForm(c)];
},
function(c) {
return ["hodina", "hodiny", "hodiny", "hod\xEDn"][getCzechOrSlovakForm(c)];
},
function(c) {
return ["min\xFAta", "min\xFAty", "min\xFAty", "min\xFAt"][getCzechOrSlovakForm(c)];
},
function(c) {
return ["sekunda", "sekundy", "sekundy", "sek\xFAnd"][getCzechOrSlovakForm(c)];
},
function(c) {
return ["milisekunda", "milisekundy", "milisekundy", "milisek\xFAnd"][getCzechOrSlovakForm(c)];
},
","
),
sl: language(
function(c) {
if (c % 10 === 1) {
return "leto";
} else if (c % 100 === 2) {
return "leti";
} else if (c % 100 === 3 || c % 100 === 4 || Math.floor(c) !== c && c % 100 <= 5) {
return "leta";
} else {
return "let";
}
},
function(c) {
if (c % 10 === 1) {
return "mesec";
} else if (c % 100 === 2 || Math.floor(c) !== c && c % 100 <= 5) {
return "meseca";
} else if (c % 10 === 3 || c % 10 === 4) {
return "mesece";
} else {
return "mesecev";
}
},
function(c) {
if (c % 10 === 1) {
return "teden";
} else if (c % 10 === 2 || Math.floor(c) !== c && c % 100 <= 4) {
return "tedna";
} else if (c % 10 === 3 || c % 10 === 4) {
return "tedne";
} else {
return "tednov";
}
},
function(c) {
return c % 100 === 1 ? "dan" : "dni";
},
function(c) {
if (c % 10 === 1) {
return "ura";
} else if (c % 100 === 2) {
return "uri";
} else if (c % 10 === 3 || c % 10 === 4 || Math.floor(c) !== c) {
return "ure";
} else {
return "ur";
}
},
function(c) {
if (c % 10 === 1) {
return "minuta";
} else if (c % 10 === 2) {
return "minuti";
} else if (c % 10 === 3 || c % 10 === 4 || Math.floor(c) !== c && c % 100 <= 4) {
return "minute";
} else {
return "minut";
}
},
function(c) {
if (c % 10 === 1) {
return "sekunda";
} else if (c % 100 === 2) {
return "sekundi";
} else if (c % 100 === 3 || c % 100 === 4 || Math.floor(c) !== c) {
return "sekunde";
} else {
return "sekund";
}
},
function(c) {
if (c % 10 === 1) {
return "milisekunda";
} else if (c % 100 === 2) {
return "milisekundi";
} else if (c % 100 === 3 || c % 100 === 4 || Math.floor(c) !== c) {
return "milisekunde";
} else {
return "milisekund";
}
},
","
),
sv: language(
"\xE5r",
function(c) {
return "m\xE5nad" + (c === 1 ? "" : "er");
},
function(c) {
return "veck" + (c === 1 ? "a" : "or");
},
function(c) {
return "dag" + (c === 1 ? "" : "ar");
},
function(c) {
return "timm" + (c === 1 ? "e" : "ar");
},
function(c) {
return "minut" + (c === 1 ? "" : "er");
},
function(c) {
return "sekund" + (c === 1 ? "" : "er");
},
function(c) {
return "millisekund" + (c === 1 ? "" : "er");
},
","
),
sw: assign(
language(
function(c) {
return c === 1 ? "mwaka" : "miaka";
},
function(c) {
return c === 1 ? "mwezi" : "miezi";
},
"wiki",
function(c) {
return c === 1 ? "siku" : "masiku";
},
function(c) {
return c === 1 ? "saa" : "masaa";
},
"dakika",
"sekunde",
"milisekunde"
),
{ _numberFirst: true }
),
tr: language(
"y\u0131l",
"ay",
"hafta",
"g\xFCn",
"saat",
"dakika",
"saniye",
"milisaniye",
","
),
th: language(
"\u0E1B\u0E35",
"\u0E40\u0E14\u0E37\u0E2D\u0E19",
"\u0E2A\u0E31\u0E1B\u0E14\u0E32\u0E2B\u0E4C",
"\u0E27\u0E31\u0E19",
"\u0E0A\u0E31\u0E48\u0E27\u0E42\u0E21\u0E07",
"\u0E19\u0E32\u0E17\u0E35",
"\u0E27\u0E34\u0E19\u0E32\u0E17\u0E35",
"\u0E21\u0E34\u0E25\u0E25\u0E34\u0E27\u0E34\u0E19\u0E32\u0E17\u0E35"
),
uz: language(
"yil",
"oy",
"hafta",
"kun",
"soat",
"minut",
"sekund",
"millisekund"
),
uz_CYR: language(
"\u0439\u0438\u043B",
"\u043E\u0439",
"\u04B3\u0430\u0444\u0442\u0430",
"\u043A\u0443\u043D",
"\u0441\u043E\u0430\u0442",
"\u043C\u0438\u043D\u0443\u0442",
"\u0441\u0435\u043A\u0443\u043D\u0434",
"\u043C\u0438\u043B\u043B\u0438\u0441\u0435\u043A\u0443\u043D\u0434"
),
vi: language(
"n\u0103m",
"th\xE1ng",
"tu\u1EA7n",
"ng\xE0y",
"gi\u1EDD",
"ph\xFAt",
"gi\xE2y",
"mili gi\xE2y",
","
),
zh_CN: language("\u5E74", "\u4E2A\u6708", "\u5468", "\u5929", "\u5C0F\u65F6", "\u5206\u949F", "\u79D2", "\u6BEB\u79D2"),
zh_TW: language("\u5E74", "\u500B\u6708", "\u5468", "\u5929", "\u5C0F\u6642", "\u5206\u9418", "\u79D2", "\u6BEB\u79D2")
};
function language(y, mo, w, d, h, m, s, ms, decimal) {
var result = { y, mo, w, d, h, m, s, ms };
if (typeof decimal !== "undefined") {
result.decimal = decimal;
}
return result;
}
function getArabicForm(c) {
if (c === 2) {
return 1;
}
if (c > 2 && c < 11) {
return 2;
}
return 0;
}
function getPolishForm(c) {
if (c === 1) {
return 0;
}
if (Math.floor(c) !== c) {
return 1;
}
if (c % 10 >= 2 && c % 10 <= 4 && !(c % 100 > 10 && c % 100 < 20)) {
return 2;
}
return 3;
}
function getSlavicForm(c) {
if (Math.floor(c) !== c) {
return 2;
}
if (c % 100 >= 5 && c % 100 <= 20 || c % 10 >= 5 && c % 10 <= 9 || c % 10 === 0) {
return 0;
}
if (c % 10 === 1) {
return 1;
}
if (c > 1) {
return 2;
}
return 0;
}
function getCzechOrSlovakForm(c) {
if (c === 1) {
return 0;
}
if (Math.floor(c) !== c) {
return 1;
}
if (c % 10 >= 2 && c % 10 <= 4 && c % 100 < 10) {
return 2;
}
return 3;
}
function getLithuanianForm(c) {
if (c === 1 || c % 10 === 1 && c % 100 > 20) {
return 0;
}
if (Math.floor(c) !== c || c % 10 >= 2 && c % 100 > 20 || c % 10 >= 2 && c % 100 < 10) {
return 1;
}
return 2;
}
function getLatvianForm(c) {
return c % 10 === 1 && c % 100 !== 11;
}
function assign(destination) {
var source;
for (var i = 1; i < arguments.length; i++) {
source = arguments[i];
for (var prop in source) {
if (has(source, prop)) {
destination[prop] = source[prop];
}
}
}
return destination;
}
var isArray = Array.isArray || function(arg) {
return Object.prototype.toString.call(arg) === "[object Array]";
};
function has(obj, key) {
return Object.prototype.hasOwnProperty.call(obj, key);
}
function getLanguage(options) {
var possibleLanguages = [options.language];
if (has(options, "fallbacks")) {
if (isArray(options.fallbacks) && options.fallbacks.length) {
possibleLanguages = possibleLanguages.concat(options.fallbacks);
} else {
throw new Error("fallbacks must be an array with at least one element");
}
}
for (var i = 0; i < possibleLanguages.length; i++) {
var languageToTry = possibleLanguages[i];
if (has(options.languages, languageToTry)) {
return options.languages[languageToTry];
}
if (has(LANGUAGES, languageToTry)) {
return LANGUAGES[languageToTry];
}
}
throw new Error("No language found.");
}
function renderPiece(piece, language2, options) {
var unitName = piece.unitName;
var unitCount = piece.unitCount;
var spacer = options.spacer;
var maxDecimalPoints = options.maxDecimalPoints;
var decimal;
if (has(options, "decimal")) {
decimal = options.decimal;
} else if (has(language2, "decimal")) {
decimal = language2.decimal;
} else {
decimal = ".";
}
var digitReplacements;
if ("digitReplacements" in options) {
digitReplacements = options.digitReplacements;
} else if ("_digitReplacements" in language2) {
digitReplacements = language2._digitReplacements;
}
var formattedCount;
var normalizedUnitCount = maxDecimalPoints === void 0 ? unitCount : Math.floor(unitCount * Math.pow(10, maxDecimalPoints)) / Math.pow(10, maxDecimalPoints);
var countStr = normalizedUnitCount.toString();
if (digitReplacements) {
formattedCount = "";
for (var i = 0; i < countStr.length; i++) {
var char = countStr[i];
if (char === ".") {
formattedCount += decimal;
} else {
formattedCount += digitReplacements[char];
}
}
} else {
formattedCount = countStr.replace(".", decimal);
}
var languageWord = language2[unitName];
var word;
if (typeof languageWord === "function") {
word = languageWord(unitCount);
} else {
word = languageWord;
}
if (language2._numberFirst) {
return word + spacer + formattedCount;
}
return formattedCount + spacer + word;
}
function getPieces(ms, options) {
var unitName;
var i;
var unitCount;
var msRemaining;
var units = options.units;
var unitMeasures = options.unitMeasures;
var largest = "largest" in options ? options.largest : Infinity;
if (!units.length)
return [];
var unitCounts = {};
msRemaining = ms;
for (i = 0; i < units.length; i++) {
unitName = units[i];
var unitMs = unitMeasures[unitName];
var isLast = i === units.length - 1;
unitCount = isLast ? msRemaining / unitMs : Math.floor(msRemaining / unitMs);
unitCounts[unitName] = unitCount;
msRemaining -= unitCount * unitMs;
}
if (options.round) {
var unitsRemainingBeforeRound = largest;
for (i = 0; i < units.length; i++) {
unitName = units[i];
unitCount = unitCounts[unitName];
if (unitCount === 0)
continue;
unitsRemainingBeforeRound--;
if (unitsRemainingBeforeRound === 0) {
for (var j = i + 1; j < units.length; j++) {
var smallerUnitName = units[j];
var smallerUnitCount = unitCounts[smallerUnitName];
unitCounts[unitName] += smallerUnitCount * unitMeasures[smallerUnitName] / unitMeasures[unitName];
unitCounts[smallerUnitName] = 0;
}
break;
}
}
for (i = units.length - 1; i >= 0; i--) {
unitName = units[i];
unitCount = unitCounts[unitName];
if (unitCount === 0)
continue;
var rounded = Math.round(unitCount);
unitCounts[unitName] = rounded;
if (i === 0)
break;
var previousUnitName = units[i - 1];
var previousUnitMs = unitMeasures[previousUnitName];
var amountOfPreviousUnit = Math.floor(
rounded * unitMeasures[unitName] / previousUnitMs
);
if (amountOfPreviousUnit) {
unitCounts[previousUnitName] += amountOfPreviousUnit;
unitCounts[unitName] = 0;
} else {
break;
}
}
}
var result = [];
for (i = 0; i < units.length && result.length < largest; i++) {
unitName = units[i];
unitCount = unitCounts[unitName];
if (unitCount) {
result.push({ unitName, unitCount });
}
}
return result;
}
function formatPieces(pieces, options) {
var language2 = getLanguage(options);
if (!pieces.length) {
var units = options.units;
var smallestUnitName = units[units.length - 1];
return renderPiece(
{ unitName: smallestUnitName, unitCount: 0 },
language2,
options
);
}
var conjunction = options.conjunction;
var serialComma = options.serialComma;
var delimiter;
if (has(options, "delimiter")) {
delimiter = options.delimiter;
} else if (has(language2, "delimiter")) {
delimiter = language2.delimiter;
} else {
delimiter = ", ";
}
var renderedPieces = [];
for (var i = 0; i < pieces.length; i++) {
renderedPieces.push(renderPiece(pieces[i], language2, options));
}
if (!conjunction || pieces.length === 1) {
return renderedPieces.join(delimiter);
}
if (pieces.length === 2) {
return renderedPieces.join(conjunction);
}
return renderedPieces.slice(0, -1).join(delimiter) + (serialComma ? "," : "") + conjunction + renderedPieces.slice(-1);
}
function humanizer2(passedOptions) {
var result = function humanizer3(ms, humanizerOptions) {
ms = Math.abs(ms);
var options = assign({}, result, humanizerOptions || {});
var pieces = getPieces(ms, options);
return formatPieces(pieces, options);
};
return assign(
result,
{
language: "en",
spacer: " ",
conjunction: "",
serialComma: true,
units: ["y", "mo", "w", "d", "h", "m", "s"],
languages: {},
round: false,
unitMeasures: {
y: 315576e5,
mo: 26298e5,
w: 6048e5,
d: 864e5,
h: 36e5,
m: 6e4,
s: 1e3,
ms: 1
}
},
passedOptions
);
}
var humanizeDuration2 = humanizer2({});
humanizeDuration2.getSupportedLanguages = function getSupportedLanguages() {
var result = [];
for (var language2 in LANGUAGES) {
if (has(LANGUAGES, language2) && language2 !== "gr") {
result.push(language2);
}
}
return result;
};
humanizeDuration2.humanizer = humanizer2;
if (typeof define === "function" && define.amd) {
define(function() {
return humanizeDuration2;
});
} else if (typeof module !== "undefined" && module.exports) {
module.exports = humanizeDuration2;
} else {
this.humanizeDuration = humanizeDuration2;
}
})();
}
});
// src/modules/lgs-reminder/styles.css
var styles_default27;
var init_styles28 = __esm({
"src/modules/lgs-reminder/styles.css"() {
styles_default27 = ".mousehunt-improved-lgs-reminder{position:absolute;right:12px;bottom:1px;left:-6px;font-size:12px;color:#83543f;text-align:center;background-color:#ddcda2c9;border:1px solid #9d9a91;border-radius:11px}.mousehunt-improved-lgs-reminder.exact{right:5px;left:-15px}.mhui-custom-shield .mousehunt-improved-lgs-reminder{right:20px;left:0}.mhui-custom-shield .mousehunt-improved-lgs-reminder.exact{right:5px;left:-12px}.mousehunt-improved-lgs-reminder.lgs-warning{font-weight:900;background-color:#ffbfbf}.mousehunt-improved-lgs-reminder.lgs-danger{font-weight:900;color:#f1d7d7;background-color:#b32d26;border-color:#af8080;transition:1.75s;animation:mh-improved-slight-fade 1.75s infinite}@media (prefers-reduced-motion: reduce){.mousehunt-improved-lgs-reminder.lgs-danger{animation:none}}\n";
}
});
// src/modules/lgs-reminder/index.js
var import_humanize_duration, humanizer, isExact, getShieldTime, getShieldTimeFormattted, updateLgsReminder, main20, init28, lgs_reminder_default;
var init_lgs_reminder = __esm({
"src/modules/lgs-reminder/index.js"() {
init_sentry_release_injection_stub();
import_humanize_duration = __toESM(require_humanize_duration());
init_utils4();
init_styles28();
humanizer = import_humanize_duration.default.humanizer({
language: "shortEn",
languages: {
shortEn: {
y: () => "y",
mo: () => "mo",
w: () => "w",
d: () => "d",
h: () => "h",
m: () => "m",
s: () => "s",
ms: () => "ms"
}
}
});
isExact = () => {
return getFlag("lgs-reminder-exact");
};
getShieldTime = () => {
return user.shield_seconds * 1e3;
};
getShieldTimeFormattted = (time) => {
const units = ["y", "mo", "w", "d", "h", "m"];
if (isExact()) {
units.push("s");
}
const duration = humanizer(time, {
round: true,
units,
spacer: "",
delimiter: " "
});
return duration;
};
updateLgsReminder = (el) => {
const time = getShieldTime();
if (!time) {
return;
}
const timeFmt = getShieldTimeFormattted(time);
if (time <= 60 * 60 * 24 * 2) {
el.classList.add("lgs-warning");
}
if (time <= 60 * 60) {
el.classList.add("lgs-danger");
}
el.innerText = timeFmt;
};
main20 = () => {
const shieldEl = document.querySelector(".mousehuntHud-shield.golden");
if (!shieldEl) {
return;
}
const reminder = makeElement("div", "mousehunt-improved-lgs-reminder");
const exact = isExact();
if (exact) {
reminder.classList.add("exact");
}
shieldEl.append(reminder);
updateLgsReminder(reminder);
const interval = exact ? 1e3 : 60 * 1e3;
setTimeout(() => {
setInterval(() => {
user.shield_seconds -= interval / 1e3;
updateLgsReminder(reminder);
}, interval);
}, 750);
};
init28 = () => __async(void 0, null, function* () {
if (user.has_shield) {
addStyles(styles_default27);
main20();
}
});
lgs_reminder_default = {
id: "lgs-reminder",
name: "Lucky Golden Shield Duration & Reminder",
type: "feature",
description: "Show your LGS duration in the HUD and warn you when it's about to expire.",
default: false,
load: init28
};
}
});
// src/modules/location-catch-stats/styles.css
var styles_default28;
var init_styles29 = __esm({
"src/modules/location-catch-stats/styles.css"() {
styles_default28 = "#mh-catch-stats{position:absolute;top:25px;left:25px;z-index:50}@media screen and (prefers-reduced-motion: reduce){.mh-catch-stats-wrapper{transition:none}}.mh-catch-stats-wrapper{width:275px;background:#f6f3eb;border:1px solid #534022;box-shadow:1px 1px 1px #9d917f,1px 3px 5px #6a6969;transition:box-shadow .25s}.mh-is-dragging .mh-catch-stats-wrapper{box-shadow:1px 1px 1px #9d917f,0 7px 9px 2px #6a6969}.mh-catch-stats-header{display:flex;align-items:center;justify-content:space-between;padding:10px;color:#f6f3eb;cursor:grab;background-color:#926944;border-bottom:1px solid #ceb7a6}.mh-catch-stats-header h1{color:#f6f3eb}.mh-catch-stats-close{cursor:pointer}.mh-catch-stats-close:hover,.mh-catch-stats-close:focus{color:#926944;background-color:#eee;border-radius:50%;outline:1px solid #ccc}.mh-catch-stats-body{max-height:90vh;overflow:hidden auto}.mh-catch-stats-wrapper .mh-catch-stats:nth-child(odd){background-color:#e8e3d7}.mh-catch-stats{display:flex;align-items:center;justify-content:space-between;padding:10px;color:#000}.mh-catch-stats:hover,.mh-catch-stats-wrapper .mh-catch-stats:nth-child(odd):hover,.mh-catch-stats:focus,.mh-catch-stats-wrapper .mh-catch-stats:nth-child(odd):focus{color:#665f5f;text-decoration:none;background-color:#eee;outline:1px solid #ccc}.mh-catch-stats-image{position:relative;display:inline-block;width:40px;height:40px;vertical-align:middle;background-repeat:no-repeat;background-size:contain;border-radius:2px;box-shadow:1px 1px 1px #999}.mh-catch-stats-crown{position:absolute;right:-5px;bottom:-5px;width:20px;height:20px;background-color:#fff;background-repeat:no-repeat;background-position:50% 50%;background-size:80%;border:1px solid #333;border-radius:50%}.mh-catch-stats-name{display:inline-block;padding-left:10px;vertical-align:middle}.mh-catch-stats-catches{padding-right:5px}\n";
}
});
// src/modules/location-catch-stats/index.js
var getMouseStats, buildMouseMarkup, showModal, init29, location_catch_stats_default;
var init_location_catch_stats = __esm({
"src/modules/location-catch-stats/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
init_styles29();
getMouseStats = () => __async(void 0, null, function* () {
var _a, _b;
const data = yield doRequest("managers/ajax/mice/mouse_list.php", {
action: "get_environment",
category: user.environment_type,
user_id: user.user_id,
display_mode: "stats",
view: "ViewMouseListEnvironments"
});
const mouseData = (_b = (_a = data == null ? void 0 : data.mouse_list_category) == null ? void 0 : _a.subgroups[0]) == null ? void 0 : _b.mice;
mouseData.sort((a, b) => {
return b.num_catches - a.num_catches;
});
return mouseData != null ? mouseData : [];
});
buildMouseMarkup = (mouseData) => {
const mouse = Object.assign({}, {
name: "",
type: "",
image: "",
crown: "none",
num_catches: 0
}, mouseData);
const mouseEl = document.createElement("a");
mouseEl.classList.add("mh-catch-stats");
mouseEl.title = mouse.name;
mouseEl.addEventListener("click", () => {
var _a, _b;
if ("undefined" !== ((_b = (_a = hg == null ? void 0 : hg.views) == null ? void 0 : _a.MouseView) == null ? void 0 : _b.show)) {
hg.views.MouseView.show(mouse.type);
}
});
const image = document.createElement("div");
image.classList.add("mh-catch-stats-image");
image.style.backgroundImage = `url('${mouse.image}')`;
if (mouse.crown && "none" !== mouse.crown) {
const crown = document.createElement("div");
crown.classList.add("mh-catch-stats-crown");
crown.style.backgroundImage = `url('https://www.mousehuntgame.com/images/ui/crowns/crown_${mouse.crown}.png')`;
image.append(crown);
}
const name = document.createElement("div");
name.classList.add("mh-catch-stats-name");
name.innerText = mouse.name;
const imageNameContainer = document.createElement("div");
imageNameContainer.append(image);
imageNameContainer.append(name);
const catches = document.createElement("div");
catches.classList.add("mh-catch-stats-catches");
catches.innerText = mouse.num_catches;
mouseEl.append(imageNameContainer);
mouseEl.append(catches);
return mouseEl;
};
showModal = () => __async(void 0, null, function* () {
const existing = document.querySelector("#mh-catch-stats");
if (existing) {
existing.remove();
}
const modalWrapper = document.createElement("div");
modalWrapper.id = "mh-catch-stats";
const modal = document.createElement("div");
modal.classList.add("mh-catch-stats-wrapper");
const header = document.createElement("div");
header.classList.add("mh-catch-stats-header");
const title = document.createElement("h1");
title.innerText = "Location Catch Stats";
header.append(title);
const closeIcon = document.createElementNS("http://www.w3.org/2000/svg", "svg");
closeIcon.classList.add("mh-catch-stats-close");
closeIcon.setAttribute("viewBox", "0 0 24 24");
closeIcon.setAttribute("width", "18");
closeIcon.setAttribute("height", "18");
closeIcon.setAttribute("fill", "none");
closeIcon.setAttribute("stroke", "currentColor");
closeIcon.setAttribute("stroke-width", "1.5");
const closePath = document.createElementNS("http://www.w3.org/2000/svg", "path");
closePath.setAttribute("d", "M18 6L6 18M6 6l12 12");
closeIcon.append(closePath);
closeIcon.addEventListener("click", () => {
modalWrapper.remove();
});
header.append(closeIcon);
modal.append(header);
const mouseBody = document.createElement("div");
mouseBody.classList.add("mh-catch-stats-body");
const mouseStats2 = yield getMouseStats();
mouseStats2.forEach((mouseData) => {
mouseBody.append(buildMouseMarkup(mouseData, mouseBody));
});
modal.append(mouseBody);
modalWrapper.append(modal);
document.body.append(modalWrapper);
makeElementDraggable("#mh-catch-stats", ".mh-catch-stats-header", 25, 25, "mh-catch-stats-position");
});
init29 = () => __async(void 0, null, function* () {
addStyles(styles_default28);
addSubmenuItem({
menu: "mice",
label: "Location Catch Stats",
icon: "https://www.mousehuntgame.com/images/ui/hud/menu/prize_shoppe.png?",
callback: showModal
});
});
location_catch_stats_default = {
id: "location-catch-stats",
name: "Location Catch Stats",
type: "feature",
default: true,
description: 'Adds a "Location Catch Stats" to the Mice menu to see your catch stats for the current location.',
load: init29
};
}
});
// src/modules/location-dashboard/styles.css
var styles_default29;
var init_styles30 = __esm({
"src/modules/location-dashboard/styles.css"() {
styles_default29 = '.mousehuntHeaderView-gameTabs .menuItem.chat,.mousehuntHeaderView-gameTabs .community{display:none}.mousehuntHeaderView .menuItem.dropdown.dashboard{cursor:initial}.mousehuntHeaderView .dashboard .dropdownContent{width:420px}.dashboardWrapper{max-height:60vh;padding:5px;overflow:hidden auto;border:1px solid #d7e2f1;box-shadow:0 5px 10px #8f8f8f}.dashboardRefresh{display:block;margin:10px auto}.regionWrapper{margin-bottom:5px;border:1px solid #c6c6c6}.regionName{padding:3px 0 2px 5px;margin-top:10px;font-size:12px;font-weight:900;background-color:#f4f7fc;border-bottom:1px solid #c6c6c6}.regionName:first-child{margin-top:0}.locationWrapper{display:flex;flex-direction:row;align-items:center;justify-content:space-between;height:26px;padding:9px 5px;background-color:#fff}.locationWrapper.locationWrapper-rift_valour{height:35px}.locationWrapper:nth-child(2n){background-color:#eee}.locationImageWrapper{display:inline-flex;flex:0}img.locationImage{width:28px;height:28px;border-radius:3px;outline:1px solid #838282}.locationName{position:relative;flex-grow:1;min-width:105px;padding-left:10px;font-size:12px}.locationProgress p{margin:0;line-height:1;text-align:right}.locationProgress{font-size:11px;line-height:17px;text-align:right;white-space:pre-line}.locationProgress .stats{text-align:right}.noLocationData{font-size:12px;text-align:center}.dashboard-fi-tiles span{display:inline-block;width:18px;height:24px;color:transparent;background-image:url(https://www.mousehuntgame.com/images/ui/hud/floating_islands/mods.png?v=1&asset_cache_version=2);background-position-x:354px;background-size:354px}.dashboard-fi-tiles .inactive{background-position-y:51px}.dashboard-fi-tiles .glass{background-position-x:354px}.dashboard-fi-tiles .ore,.dashboard-fi-tiles .ore_bonus{background-position-x:330px}.dashboard-fi-tiles .sky_cheese,.dashboard-fi-tiles .curd{background-position-x:308px}.dashboard-fi-tiles .pirate,.dashboard-fi-tiles .sky_pirate{background-position-x:286px}.dashboard-fi-tiles .key{background-position-x:263px}.dashboard-fi-tiles .warden-wind,.dashboard-fi-tiles .wind_shrine{background-position-x:240px}.dashboard-fi-tiles .warden-rain,.dashboard-fi-tiles .rain_shrine{background-position-x:217px}.dashboard-fi-tiles .warden-frost,.dashboard-fi-tiles .frost_shrine{background-position-x:196px}.dashboard-fi-tiles .warden-fog,.dashboard-fi-tiles .fog_shrine{background-position-x:173px}.dashboard-fi-tiles .sprocket{background-position-x:151px}.dashboard-fi-tiles .bangle{background-position-x:129px}.dashboard-fi-tiles .wing{background-position-x:106px}.dashboard-fi-tiles .silk{background-position-x:84px}.dashboard-fi-tiles .glore{background-position-x:65px}.dashboard-fi-tiles .seal{background-position-x:43px}.dashboard-fi-tiles .jade{background-position-x:20px}.location-refresh-item{display:flex;align-items:stretch;border:1px solid #ccc;border-radius:5px;box-shadow:0 1px 1px -1px #7e7e7e}.mh-improved-location-refresh-popup-progress{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.location-refresh-item.done{background-color:#3fcd84;border-color:#adadad}.location-refresh-item .locationName{position:relative;display:flex;align-items:center;overflow:hidden}.location-refresh-item .locationName .name{z-index:1}@keyframes moving-background{0%{right:100%}to{right:0}}.location-refresh-item.traveling .locationName .progress:after{position:absolute;top:0;right:100%;bottom:0;width:100%;content:"";background:#f3c019;animation:moving-background 1s linear forwards}.mh-improved-location-refresh-confirm-popup #overlayPopup .jsDialogContainer .suffix{display:none}.mh-improved-location-refresh-confirm-popup-buttons{display:flex;align-items:center;justify-content:space-around;margin-top:30px}\n';
}
});
// src/modules/location-dashboard/location/fiery-warpath.js
var getFieryWarpathText, setFieryWarpathData;
var init_fiery_warpath = __esm({
"src/modules/location-dashboard/location/fiery-warpath.js"() {
init_sentry_release_injection_stub();
init_utils4();
getFieryWarpathText = (quests) => {
var _a, _b, _c, _d;
if (!quests.QuestFieryWarpath) {
return "";
}
const quest = {
wave: ((_a = quests == null ? void 0 : quests.QuestFieryWarpath) == null ? void 0 : _a.wave) || 0,
streak: ((_b = quests == null ? void 0 : quests.QuestFieryWarpath) == null ? void 0 : _b.streak) || 0,
remaining: ((_c = quests == null ? void 0 : quests.QuestFieryWarpath) == null ? void 0 : _c.remaining) || 0,
percent: ((_d = quests == null ? void 0 : quests.QuestFieryWarpath) == null ? void 0 : _d.percent) || 100
};
let streakText = "";
if (quest.streak !== 0) {
streakText = `, ${quest.streak} streak`;
}
return `Wave ${quest.wave}: ${quest.percent}% remaining${streakText} `;
};
setFieryWarpathData = () => {
if ("desert_warpath" !== getCurrentLocation()) {
return false;
}
let wave = 0;
let streak = "No Streak";
let remaining = 0;
let percent = 100;
const waveEl = document.querySelector(".warpathHUD.showPortal");
if (waveEl) {
const waveClass = [...waveEl.classList].find((className) => className.startsWith("wave"));
wave = Number.parseInt(waveClass.replace("wave", "").replace("_", ""));
}
const streakEl = document.querySelector(".warpathHUD-streakBoundingBox");
if (streakEl) {
streak = Number.parseInt(streakEl.innerText.replaceAll("\n", " ").replace(" 0", "").trim());
}
const remaininEl = document.querySelectorAll(".warpathHUD-wave-mouse-population");
if (remaininEl.length) {
remaining = [...remaininEl].reduce((sum, el) => {
if (el.innerText) {
sum += Number.parseInt(el.innerText);
}
return sum;
}, 0);
remaining = remaining - 2;
}
const percentEl = document.querySelector(".warpathHUD-moraleBar span");
if (percentEl) {
const style = percentEl.getAttribute("style");
if (style) {
percent = Number.parseInt(style.replace("width:", "").replace("%;", ""));
}
}
return {
wave,
streak,
remaining,
percent
};
};
}
});
// src/modules/location-dashboard/location/seasonal-garden.js
var getSeasonalGardenText, setSeasonalGardenData;
var init_seasonal_garden = __esm({
"src/modules/location-dashboard/location/seasonal-garden.js"() {
init_sentry_release_injection_stub();
getSeasonalGardenText = (quests) => {
var _a, _b;
if (!quests.QuestSeasonalGarden) {
return "";
}
const quest = {
amp: ((_a = quests == null ? void 0 : quests.QuestSeasonalGarden) == null ? void 0 : _a.amp) || 0,
max: ((_b = quests == null ? void 0 : quests.QuestSeasonalGarden) == null ? void 0 : _b.max) || 0
};
return `Amp: ${quest.amp}% / ${quest.max}%`;
};
setSeasonalGardenData = () => {
const quest = {
amp: 0,
max: 0
};
const amp = document.querySelector(".seasonalGardenHUD-currentAmplifier-value");
if (amp) {
quest.amp = Number.parseInt(amp.textContent, 10);
}
const max = document.querySelector(".seasonalGardenHUD-maxAmplifier-value");
if (max) {
quest.max = Number.parseInt(max.textContent, 10);
}
return quest;
};
}
});
// src/modules/location-dashboard/location/zugzwang-tower.js
var getChessProgress, getZugzwangTowerText, setZugzwangTowerData;
var init_zugzwang_tower = __esm({
"src/modules/location-dashboard/location/zugzwang-tower.js"() {
init_sentry_release_injection_stub();
getChessProgress = (pieces) => {
if (pieces <= 8) {
return "Pawns";
}
if (pieces <= 10) {
return "Knights";
}
if (pieces <= 12) {
return "Bishops";
}
if (pieces <= 14) {
return "Rooks";
}
if (pieces <= 15) {
return "Queen";
}
return "King";
};
getZugzwangTowerText = (quests) => {
if (!quests.QuestZugzwangTower) {
return;
}
const returnText = `${quests.QuestZugzwangTower.amp || 0}%`;
const techProgress = quests.QuestZugzwangTower.tech_progress || 0;
const mythProgress = quests.QuestZugzwangTower.myth_progress || 0;
if (techProgress >= 16 && mythProgress >= 16) {
return `${returnText} Amp, Chessmaster`;
}
return `${returnText} Amp, Technic: ${getChessProgress(techProgress)}, Mystic: ${getChessProgress(mythProgress)}`;
};
setZugzwangTowerData = () => {
const ampEl = document.querySelector(".zuzwangsTowerHUD-currentAmplifier span");
const amp = ampEl ? Number.parseInt(ampEl.innerText, 10) : 0;
const techProgressEl = document.querySelectorAll(".zuzwangsTowerHUD-progress.tech img");
const techProgress = techProgressEl ? techProgressEl.length : 0;
const mythProgressEl = document.querySelectorAll(".zuzwangsTowerHUD-progress.magic img");
const mythProgress = mythProgressEl ? mythProgressEl.length : 0;
return {
amp,
techProgress,
mythProgress
};
};
}
});
// src/modules/location-dashboard/location/bristle-woods-rift.js
var bristle_woods_rift_default;
var init_bristle_woods_rift = __esm({
"src/modules/location-dashboard/location/bristle-woods-rift.js"() {
init_sentry_release_injection_stub();
bristle_woods_rift_default = (quests) => {
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
if (!quests.QuestRiftBristleWoods) {
return "";
}
const quest = {
progress_goal: ((_a = quests == null ? void 0 : quests.QuestRiftBristleWoods) == null ? void 0 : _a.progress_goal) || null,
progress_remaining: ((_b = quests == null ? void 0 : quests.QuestRiftBristleWoods) == null ? void 0 : _b.progress_remaining) || null,
chamber_name: ((_c = quests == null ? void 0 : quests.QuestRiftBristleWoods) == null ? void 0 : _c.chamber_name) || null,
chamber_type: ((_d = quests == null ? void 0 : quests.QuestRiftBristleWoods) == null ? void 0 : _d.chamber_type) || null,
obelisk_percent: ((_e = quests == null ? void 0 : quests.QuestRiftBristleWoods) == null ? void 0 : _e.obelisk_percent) || null,
aco_sand: ((_f = quests == null ? void 0 : quests.QuestRiftBristleWoods) == null ? void 0 : _f.acolyte_sand) || 0,
time_sand: ((_i = (_h = (_g = quests == null ? void 0 : quests.QuestRiftBristleWoods) == null ? void 0 : _g.items) == null ? void 0 : _h.rift_hourglass_sand_stat_item) == null ? void 0 : _i.quantity) || 0
};
if ("acolyte_chamber" === quest.chamber_type) {
return `Acolyte chamber: ${quest.obelisk_percent}% charged \xB7 <div class="stats">${quest.aco_sand} Acolyte sand \xB7 ${quest.time_sand} time sand</div>`;
}
return `${quest.chamber_name} \xB7 ${quest.progress_goal - quest.progress_remaining} / ${quest.progress_goal} loot`;
};
}
});
// src/modules/location-dashboard/location/burroughs-rift.js
var burroughs_rift_default;
var init_burroughs_rift = __esm({
"src/modules/location-dashboard/location/burroughs-rift.js"() {
init_sentry_release_injection_stub();
burroughs_rift_default = (quests) => {
var _a;
if (!quests.QuestRiftBurroughs) {
return "";
}
const quest = {
mist_released: ((_a = quests == null ? void 0 : quests.QuestRiftBurroughs) == null ? void 0 : _a.mist_released) || null
};
return `Mist: ${quest.mist_released} / 20`;
};
}
});
// src/modules/location-dashboard/location/floating-islands.js
var floating_islands_default;
var init_floating_islands = __esm({
"src/modules/location-dashboard/location/floating-islands.js"() {
init_sentry_release_injection_stub();
floating_islands_default = (quests) => {
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
if (!quests.QuestFloatingIslands || !quests.QuestFloatingIslands.hunting_site_atts) {
return "";
}
const powerTypes = {
arcn: "Arcane",
frgttn: "Forgotten",
hdr: "Hydro",
shdw: "Shadow",
drcnc: "Draconic",
law: "Law",
phscl: "Physical",
tctcl: "Tactical",
launch_pad_island: "Launch Pad"
};
const quest = {
activated_island_mod_types: ((_b = (_a = quests == null ? void 0 : quests.QuestFloatingIslands) == null ? void 0 : _a.hunting_site_atts) == null ? void 0 : _b.activated_island_mod_types) || null,
island_mod_panels: ((_d = (_c = quests == null ? void 0 : quests.QuestFloatingIslands) == null ? void 0 : _c.hunting_site_atts) == null ? void 0 : _d.island_mod_panels) || null,
island_power_type: ((_f = (_e = quests == null ? void 0 : quests.QuestFloatingIslands) == null ? void 0 : _e.hunting_site_atts) == null ? void 0 : _f.island_power_type) || null,
isHai: ((_h = (_g = quests == null ? void 0 : quests.QuestFloatingIslands) == null ? void 0 : _g.hunting_site_atts) == null ? void 0 : _h.is_high_tier_island) || false,
isSp: ((_j = (_i = quests == null ? void 0 : quests.QuestFloatingIslands) == null ? void 0 : _i.hunting_site_atts) == null ? void 0 : _j.is_vault_island) || false,
isLai: false,
hunts_remaining: ((_l = (_k = quests == null ? void 0 : quests.QuestFloatingIslands) == null ? void 0 : _k.hunting_site_atts) == null ? void 0 : _l.hunts_remaining) || null,
wardens_caught: ((_n = (_m = quests == null ? void 0 : quests.QuestFloatingIslands) == null ? void 0 : _m.hunting_site_atts) == null ? void 0 : _n.sky_wardens_caught) || 0
};
quest.isLai = !quest.isHai && !quest.isSp;
const isLaunchPad = quest.island_power_type === "launch_pad_island";
if (isLaunchPad) {
return `Launch Pad \xB7 <p>${quest.wardens_caught} wardens caught`;
}
let type = "LAI";
if (quest.isHai) {
type = "HAI";
} else if (quest.isSp) {
type = "SP";
}
let tileText = "";
quest.island_mod_panels.forEach((panel) => {
const panelType = panel.type.toLowerCase().replaceAll("loot_cache", "key").replaceAll("charm_bonus", "J");
const complete = panel.is_complete ? "complete" : "incomplete";
tileText += `<span class="tile ${panelType} ${complete}">${panelType}</span>`;
});
const powerType = powerTypes[quest.island_power_type];
let returnText = `<span class='dashboard-fi-tiles'>${tileText}</span> ${powerType} ${type}`;
if (quest.isLai) {
returnText += `<div class="stats">${quest.hunts_remaining} hunts left, ${quest.wardens_caught} wardens caught</div>`;
} else {
return returnText += ` \xB7 ${quest.hunts_remaining} hunts left`;
}
return returnText;
};
}
});
// src/modules/location-dashboard/location/foreword-farm.js
var foreword_farm_default;
var init_foreword_farm = __esm({
"src/modules/location-dashboard/location/foreword-farm.js"() {
init_sentry_release_injection_stub();
foreword_farm_default = (quests) => {
if (!quests.QuestForewordFarm) {
return;
}
const plants = {
empty: 0,
ordinary_farm_plant: 0,
legendary_farm_plant: 0,
twisted_legendary_magic_farm_plant: 0
};
quests.QuestForewordFarm.plots.forEach((plot) => {
const name = plot.is_growing ? plot.plant.type : "empty";
plants[name] += 1;
});
if (plants.empty === 3) {
return "No plants growing";
}
let returnText = "";
if (plants.ordinary_farm_plant > 0) {
returnText += `${plants.ordinary_farm_plant} Mulch, `;
}
if (plants.legendary_farm_plant > 0) {
returnText += `${plants.legendary_farm_plant} Papyrus, `;
}
if (plants.twisted_legendary_magic_farm_plant > 0) {
returnText += `${plants.twisted_legendary_magic_farm_plant} Twisted Papyrus, `;
}
returnText = returnText.slice(0, -2);
return `Growing ${returnText}`;
};
}
});
// src/modules/location-dashboard/location/fort-rox.js
var fort_rox_default;
var init_fort_rox = __esm({
"src/modules/location-dashboard/location/fort-rox.js"() {
init_sentry_release_injection_stub();
fort_rox_default = (quests) => {
if (!quests.QuestFortRox) {
return "";
}
const quest = {
stage: quests.QuestFortRox.current_stage || "stage_none",
hp: quests.QuestFortRox.hp || 0,
max_hp: quests.QuestFortRox.max_hp || 0,
is_dawn: quests.QuestFortRox.is_dawn || false
};
let phase = "Day";
const phases = {
stage_none: "Day",
stage_one: "Twilight",
stage_two: "Midnight",
stage_three: "Pitch",
stage_four: "Utter Darkness",
stage_five: "First Light"
};
phase = quest.is_dawn ? "Dawn" : phases[quest.stage];
return `${phase}: ${quest.hp}/${quest.max_hp} HP`;
};
}
});
// src/modules/location-dashboard/location/furoma-rift.js
var furoma_rift_default;
var init_furoma_rift = __esm({
"src/modules/location-dashboard/location/furoma-rift.js"() {
init_sentry_release_injection_stub();
furoma_rift_default = (quests) => {
if (!quests.QuestRiftFuroma) {
return "";
}
const q = quests.QuestRiftFuroma;
const map = {
one: 1,
two: 2,
three: 3,
four: 4,
five: 5,
six: 6,
seven: 7,
eight: 8,
nine: 9,
ten: 10
};
const location = q.view_state.includes("pagoda") ? "inside" : "outside";
if ("inside" === location) {
const droidLevel = map[q.droid.charge_level.split("_")[2]];
const batteryPercent = Math.floor(q.batteries[q.droid.charge_level].percent);
return `Pagoda \xB7 Battery ${droidLevel} (${batteryPercent}%) \xB7 ${q.droid.remaining_energy} Enerchi`;
}
const unlockedBatteries = Object.keys(q.batteries).filter((battery) => {
return q.batteries[battery].status.includes("unlocked");
});
const highestBattery = unlockedBatteries.reduce((highest, battery) => {
const batteryLevel = map[battery.split("_")[2]];
return batteryLevel > highest ? batteryLevel : highest;
}, 0);
return `Outside \xB7 Battery ${highestBattery} \xB7 ${q.items.combat_energy_stat_item.quantity} Enerchi`;
};
}
});
// src/modules/location-dashboard/location/iceberg.js
var iceberg_default;
var init_iceberg = __esm({
"src/modules/location-dashboard/location/iceberg.js"() {
init_sentry_release_injection_stub();
iceberg_default = (quests) => {
if (!quests.QuestIceberg) {
return "";
}
const quest = {
phase: quests.QuestIceberg.current_phase || "Iceberg",
progress: quests.QuestIceberg.user_progress || 0,
hunts: quests.QuestIceberg.turns_taken || 0
};
return `${quest.phase}: ${quest.progress} ft - Hunt #${quest.hunts}`;
};
}
});
// src/modules/location-dashboard/location/labyrinth.js
var labyrinth_default2;
var init_labyrinth2 = __esm({
"src/modules/location-dashboard/location/labyrinth.js"() {
init_sentry_release_injection_stub();
labyrinth_default2 = (quests) => {
var _a, _b, _c;
if (!quests.QuestLabyrinth) {
return "";
}
const quest = {
clues: ((_a = quests == null ? void 0 : quests.QuestLabyrinth) == null ? void 0 : _a.clues) || 0,
hallway_name: ((_b = quests == null ? void 0 : quests.QuestLabyrinth) == null ? void 0 : _b.hallway_name) || "",
status: ((_c = quests == null ? void 0 : quests.QuestLabyrinth) == null ? void 0 : _c.status) || null
};
let clueText = "";
if (quest.clues) {
const clueTexts = [];
quest.clues.forEach((clue) => {
const clueName = clue.name.replace("Farming", "Farm").replace("Dead End", "DEC");
clueTexts.push(`${clue.quantity} ${clueName}`);
});
if (clueTexts.length > 0) {
clueText = `: ${clueTexts.join(", ")} clues`;
}
}
const hallwayName = quest.hallway_name.replace(" Hallway", "");
const currentLocation = quest.status === "intersection" ? "Intersection" : hallwayName;
return `${currentLocation}${clueText}`;
};
}
});
// src/modules/location-dashboard/location/living-garden.js
var living_garden_default;
var init_living_garden = __esm({
"src/modules/location-dashboard/location/living-garden.js"() {
init_sentry_release_injection_stub();
living_garden_default = (quests) => {
var _a, _b, _c, _d;
if (!quests.QuestLivingGarden) {
return "";
}
const twistedText = quests.QuestLivingGarden.is_normal ? "Not twisted" : "Twisted";
let minigameText = "";
if ("drops" === ((_a = quests.QuestLivingGarden.minigame) == null ? void 0 : _a.type)) {
minigameText = `: Thirsty mice for ${(_b = quests.QuestLivingGarden.minigame) == null ? void 0 : _b.estimate} hunts`;
} else if ("hunts" === ((_c = quests.QuestLivingGarden.minigame) == null ? void 0 : _c.bucket_state)) {
minigameText = `: ${(_d = quests.QuestLivingGarden.minigame) == null ? void 0 : _d.bucket_state} bucket`;
}
return `${twistedText}${minigameText}`;
};
}
});
// src/modules/location-dashboard/location/lost-city.js
var lost_city_default;
var init_lost_city = __esm({
"src/modules/location-dashboard/location/lost-city.js"() {
init_sentry_release_injection_stub();
lost_city_default = (quests) => {
var _a, _b, _c, _d;
if (!quests.QuestLostCity) {
return "";
}
if (!((_b = (_a = quests.QuestLostCity) == null ? void 0 : _a.minigame) == null ? void 0 : _b.is_cursed)) {
return "Not cursed";
}
const curses = (_d = (_c = quests.QuestLostCity) == null ? void 0 : _c.minigame) == null ? void 0 : _d.curses;
const cursesText = curses.map((curse) => curse.name).join(", ").replaceAll("!", "").replace(/,([^,]*)$/, "$1");
return `Cursed with ${cursesText}`;
};
}
});
// src/modules/location-dashboard/location/mousoleum.js
var mousoleum_default;
var init_mousoleum = __esm({
"src/modules/location-dashboard/location/mousoleum.js"() {
init_sentry_release_injection_stub();
mousoleum_default = (quests) => {
var _a, _b, _c, _d;
if (!quests.QuestMousoleum) {
return "";
}
const quest = {
has_wall: ((_a = quests == null ? void 0 : quests.QuestMousoleum) == null ? void 0 : _a.has_wall) || false,
wall_health: ((_b = quests == null ? void 0 : quests.QuestMousoleum) == null ? void 0 : _b.wall_health) || 0,
max_wall_health: ((_c = quests == null ? void 0 : quests.QuestMousoleum) == null ? void 0 : _c.max_wall_health) || 0,
planks: ((_d = quests == null ? void 0 : quests.QuestMousoleum) == null ? void 0 : _d.wall_materials) || 0
};
if (quest.has_wall) {
return `Wall, ${quest.wall_health}/${quest.max_wall_health} HP`;
}
return `No Wall, ${quest.planks} planks`;
};
}
});
// src/modules/location-dashboard/location/moussu-picchu.js
var uppercaseFirst, moussu_picchu_default;
var init_moussu_picchu = __esm({
"src/modules/location-dashboard/location/moussu-picchu.js"() {
init_sentry_release_injection_stub();
uppercaseFirst = (string) => {
return string.charAt(0).toUpperCase() + string.slice(1);
};
moussu_picchu_default = (quests) => {
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r;
if (!(quests.QuestMoussuPicchu && quests.QuestMoussuPicchu.elements)) {
return "";
}
const quest = {
rainPercent: ((_c = (_b = (_a = quests == null ? void 0 : quests.QuestMoussuPicchu) == null ? void 0 : _a.elements) == null ? void 0 : _b.rain) == null ? void 0 : _c.percent) || 0,
rainLevel: ((_f = (_e = (_d = quests == null ? void 0 : quests.QuestMoussuPicchu) == null ? void 0 : _d.elements) == null ? void 0 : _e.rain) == null ? void 0 : _f.level) || null,
stormPercent: ((_i = (_h = (_g = quests == null ? void 0 : quests.QuestMoussuPicchu) == null ? void 0 : _g.elements) == null ? void 0 : _h.storm) == null ? void 0 : _i.percent) || 0,
stormLevel: ((_l = (_k = (_j = quests == null ? void 0 : quests.QuestMoussuPicchu) == null ? void 0 : _j.elements) == null ? void 0 : _k.storm) == null ? void 0 : _l.level) || null,
windPercent: ((_o = (_n = (_m = quests == null ? void 0 : quests.QuestMoussuPicchu) == null ? void 0 : _m.elements) == null ? void 0 : _n.wind) == null ? void 0 : _o.percent) || 0,
windLevel: ((_r = (_q = (_p = quests == null ? void 0 : quests.QuestMoussuPicchu) == null ? void 0 : _p.elements) == null ? void 0 : _q.wind) == null ? void 0 : _r.level) || null
};
let level = quest.stormLevel;
level = level.charAt(0).toUpperCase() + level.slice(1);
if ("none" !== quest.stormLevel) {
return `${level} Storm`;
}
return `${uppercaseFirst(quest.windLevel)} Wind (${quest.windPercent}%), ${uppercaseFirst(quest.rainLevel)} Rain (${quest.rainPercent}%)`;
};
}
});
// src/modules/location-dashboard/location/queso-geyser.js
var queso_geyser_default;
var init_queso_geyser = __esm({
"src/modules/location-dashboard/location/queso-geyser.js"() {
init_sentry_release_injection_stub();
queso_geyser_default = (quests) => {
var _a, _b;
if (!quests.QuestQuesoGeyser) {
return "";
}
const quest = {
state_name: ((_a = quests == null ? void 0 : quests.QuestQuesoGeyser) == null ? void 0 : _a.state_name) || "Cork Gathering",
// add check for pressure building here
hunts_remaining: ((_b = quests == null ? void 0 : quests.QuestQuesoGeyser) == null ? void 0 : _b.hunts_remaining) || 0
};
return `${quest.state_name}: ${quest.hunts_remaining} hunts remaining`;
};
}
});
// src/modules/location-dashboard/location/sand-dunes.js
var sand_dunes_default;
var init_sand_dunes = __esm({
"src/modules/location-dashboard/location/sand-dunes.js"() {
init_sentry_release_injection_stub();
sand_dunes_default = (quests) => {
var _a;
if (!quests.QuestSandDunes) {
return "";
}
return ((_a = quests.QuestSandDunes.minigame) == null ? void 0 : _a.has_stampede) ? "Stampeding" : "Not stampeding";
};
}
});
// src/modules/location-dashboard/location/sunken-city.js
var sunken_city_default;
var init_sunken_city = __esm({
"src/modules/location-dashboard/location/sunken-city.js"() {
init_sentry_release_injection_stub();
sunken_city_default = (quests) => {
var _a;
if (!quests.QuestSunkenCity) {
return;
}
const oxygen = ((_a = quests.QuestSunkenCity.items) == null ? void 0 : _a.oxygen_stat_item) || 0;
if (!quests.QuestSunkenCity.is_diving) {
const canDive = quests.QuestSunkenCity.can_dive ? "can dive" : "cannot dive";
return `Docked (${canDive}), ${oxygen} O\u2082`;
}
const zone = quests.QuestSunkenCity.zone_name;
const depth = quests.QuestSunkenCity.distance;
return `${zone}, ${depth}m, ${oxygen} O\u2082`;
};
}
});
// src/modules/location-dashboard/location/table-of-contents.js
var table_of_contents_default;
var init_table_of_contents = __esm({
"src/modules/location-dashboard/location/table-of-contents.js"() {
init_sentry_release_injection_stub();
table_of_contents_default = (quests) => {
if (!quests.QuestTableOfContents) {
return "";
}
const q = quests.QuestTableOfContents;
if (!q.is_writing) {
return "Not writing";
}
return `Writing: ${q.current_book.name} (${q.current_book.percent}%) <div class="stats">${q.current_book.word_count_formatted} words \xB7 ${q.current_book.hunts_remaining} hunts remaining</div>`;
};
}
});
// src/modules/location-dashboard/location/toxic-spill.js
var toxic_spill_default2;
var init_toxic_spill2 = __esm({
"src/modules/location-dashboard/location/toxic-spill.js"() {
init_sentry_release_injection_stub();
toxic_spill_default2 = (quests) => {
if (!quests.QuestPollutionOutbreak) {
return "";
}
const q = quests.QuestPollutionOutbreak;
return `${q.items.crude_pollutinum_stat_item.quantity}/${q.max_pollutinum} Pollutinum, ${q.refined_pollutinum} refined`;
};
}
});
// src/modules/location-dashboard/location/valour-rift.js
var valour_rift_default;
var init_valour_rift = __esm({
"src/modules/location-dashboard/location/valour-rift.js"() {
init_sentry_release_injection_stub();
valour_rift_default = (quests) => {
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
if (!quests.QuestRiftValour) {
return;
}
const quest = {
floor: ((_a = quests == null ? void 0 : quests.QuestRiftValour) == null ? void 0 : _a.floor) || 0,
floor_name: ((_b = quests == null ? void 0 : quests.QuestRiftValour) == null ? void 0 : _b.floor_name) || "Outside",
floor_steps: ((_c = quests == null ? void 0 : quests.QuestRiftValour) == null ? void 0 : _c.floor_steps) || 0,
hunts_remaining: ((_d = quests == null ? void 0 : quests.QuestRiftValour) == null ? void 0 : _d.hunts_remaining) || 0,
current_step_formatted: ((_e = quests == null ? void 0 : quests.QuestRiftValour) == null ? void 0 : _e.current_step_formatted) || "0",
speed: ((_h = (_g = (_f = quests == null ? void 0 : quests.QuestRiftValour) == null ? void 0 : _f.power_up_data) == null ? void 0 : _g.long_stride) == null ? void 0 : _h.current_level) + 1 || 1,
sync: ((_k = (_j = (_i = quests == null ? void 0 : quests.QuestRiftValour) == null ? void 0 : _i.power_up_data) == null ? void 0 : _j.hunt_limit) == null ? void 0 : _k.current_level) + 1 || 1,
siphon: ((_n = (_m = (_l = quests == null ? void 0 : quests.QuestRiftValour) == null ? void 0 : _l.power_up_data) == null ? void 0 : _m.boss_extension) == null ? void 0 : _n.current_level) + 1 || 1
};
let text = "";
text = quest.floor === 0 ? "Outside" : `Floor ${quest.floor} (${quest.floor_name}) ${quest.hunts_remaining} hunts remaining`;
return `${text} <div class="stats">Speed ${quest.speed} \xB7 Sync ${quest.sync} \xB7 Siphon ${quest.siphon}</div>`;
};
}
});
// src/modules/location-dashboard/location/whisker-woods-rift.js
var whisker_woods_rift_default;
var init_whisker_woods_rift = __esm({
"src/modules/location-dashboard/location/whisker-woods-rift.js"() {
init_sentry_release_injection_stub();
whisker_woods_rift_default = (quests) => {
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
if (!(quests.QuestRiftWhiskerWoods && quests.QuestRiftWhiskerWoods.zones)) {
return "";
}
const quest = {
clearing: ((_c = (_b = (_a = quests == null ? void 0 : quests.QuestRiftWhiskerWoods) == null ? void 0 : _a.zones) == null ? void 0 : _b.clearing) == null ? void 0 : _c.level) || 0,
lagoon: ((_f = (_e = (_d = quests == null ? void 0 : quests.QuestRiftWhiskerWoods) == null ? void 0 : _d.zones) == null ? void 0 : _e.lagoon) == null ? void 0 : _f.level) || 0,
tree: ((_i = (_h = (_g = quests == null ? void 0 : quests.QuestRiftWhiskerWoods) == null ? void 0 : _g.zones) == null ? void 0 : _h.tree) == null ? void 0 : _i.level) || 0
};
return `Rage: ${quest.clearing} / ${quest.lagoon} / ${quest.tree}`;
};
}
});
// src/modules/location-dashboard/location/zokor.js
var zokor_default;
var init_zokor = __esm({
"src/modules/location-dashboard/location/zokor.js"() {
init_sentry_release_injection_stub();
zokor_default = (quests) => {
var _a, _b;
if (!quests.QuestAncientCity) {
return "";
}
const quest = {
district_name: ((_a = quests == null ? void 0 : quests.QuestAncientCity) == null ? void 0 : _a.district_name) || null,
remaining: ((_b = quests == null ? void 0 : quests.QuestAncientCity) == null ? void 0 : _b.remaining) || null
};
if (!quest.district_name || !quest.remaining) {
return "";
}
return `${quest.district_name.replace("The ", "")}, ${quest.remaining} stealth`;
};
}
});
// src/modules/location-dashboard/index.js
var cacheLocationData, waitForTravel, doLocationRefresh, makeDashboardTab, makeRegionMarkup, makeLocationMarkup, getDashboardContents, environments4, init30, location_dashboard_default;
var init_location_dashboard = __esm({
"src/modules/location-dashboard/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
init_utils4();
init_styles30();
init_environments_events();
init_fiery_warpath();
init_seasonal_garden();
init_zugzwang_tower();
init_bristle_woods_rift();
init_burroughs_rift();
init_floating_islands();
init_foreword_farm();
init_fort_rox();
init_furoma_rift();
init_iceberg();
init_labyrinth2();
init_living_garden();
init_lost_city();
init_mousoleum();
init_moussu_picchu();
init_queso_geyser();
init_sand_dunes();
init_sunken_city();
init_table_of_contents();
init_toxic_spill2();
init_valour_rift();
init_whisker_woods_rift();
init_zokor();
cacheLocationData = () => __async(void 0, null, function* () {
return new Promise((resolve) => {
if (!user.environment_type || !user.quests) {
resolve();
return;
}
if (user.environment_type === "desert_warpath") {
const fwQuestData = setFieryWarpathData();
if (fwQuestData) {
user.quests.QuestFieryWarpath = fwQuestData;
}
} else if (user.environment_type === "zugzwang_tower") {
const ztQuestData = setZugzwangTowerData();
if (ztQuestData) {
user.quests.QuestZugzwangTower = ztQuestData;
}
} else if (user.environment_type === "seasonal_garden") {
const sgQuestData = setSeasonalGardenData();
if (sgQuestData) {
user.quests.QuestSeasonalGarden = sgQuestData;
}
}
const questsCached = JSON.parse(localStorage.getItem("mh-improved-cache-quests")) || {};
const questsCombined = Object.assign({}, questsCached, user.quests);
if (user.environment_type === "labyrinth") {
questsCombined.QuestAncientCity = {};
} else if (user.environment_type === "ancient_city") {
questsCombined.QuestLabyrinth = {};
} else if (user.environment_type === "zugzwang_tower") {
questsCombined.QuestSeasonalGarden = {};
} else if (user.environment_type === "seasonal_garden") {
questsCombined.QuestZugzwangTower = {};
}
localStorage.setItem("mh-improved-cache-quests", JSON.stringify(questsCombined));
resolve();
});
});
waitForTravel = (environment) => __async(void 0, null, function* () {
return new Promise((resolve) => {
hg.utils.User.travel(environment, (success) => {
debug(`Travel success: ${success}`);
resolve();
}, (error) => {
debug(`Travel error: ${error}`);
resolve();
});
debug(`Traveled to ${environment}.`);
});
});
doLocationRefresh = () => __async(void 0, null, function* () {
sessionSet("doing-location-refresh", "true");
const locationProgress = [];
const environmentsToTravel = environments4.filter((env) => {
const locationsToRemove = [
user.environment_type,
"forbidden_grove",
...environments_events_default.map((eenv) => eenv.id)
];
if (!isUserTitleAtLeast(env.title)) {
locationsToRemove.push(env.id);
}
debug(`Environments to remove: ${locationsToRemove.join(", ")}`);
return !locationsToRemove.includes(env.id);
});
debug(`Environments to travel: ${environmentsToTravel.map((env) => env.name).join(", ")}`);
environmentsToTravel.sort((a, b) => {
return a.order - b.order;
});
debug(`Sorted environments to travel: ${environmentsToTravel.map((env) => env.name).join(", ")}`);
let locationProgressMarkup = "";
environmentsToTravel.forEach((env) => {
locationProgressMarkup += `<div class="location-refresh-item" data-environment-type="${env.id}">
<div class="locationImageWrapper">
<img class="locationImage" src="${env.image}">
</div>
<div class="locationName">
<div class="name">${env.name}</div>
<div class="progress"></div>
</div>
</div>`;
locationProgress.push(env.id);
debug(`Adding ${env.name} to the to-travel list.`);
});
const popup = createPopup({
title: "Refreshing Location Data",
content: `<div class="mh-improved-location-refresh-popup">
<div class="mh-improved-location-refresh-popup-progress">${locationProgressMarkup}</div>
</div>`,
hasCloseButton: false,
show: true
});
const originalLocation = user.environment_type;
debug(`Original location: ${user.environment_type}.`);
const equippedbait = user.bait_item_id || "disarmed";
debug(`Equipped bait: ${equippedbait}.`);
hg.utils.TrapControl.disarmBait().go();
for (const location of locationProgress) {
const locationData = environments4.find((env) => env.id === location);
if (!locationData) {
continue;
}
debug(`Traveling to ${locationData.name}.`);
const progressItem = document.querySelector(`.location-refresh-item[data-environment-type="${location}"]`);
if (!progressItem) {
continue;
}
progressItem.classList.add("traveling");
yield waitForTravel(location);
yield cacheLocationData();
progressItem.classList.remove("traveling");
progressItem.classList.add("done");
debug(`Traveled to ${locationData.name}.`);
}
yield waitForTravel(originalLocation);
debug(`Traveled back to ${user.environment_type}.`);
hg.utils.TrapControl.setBait(equippedbait).go();
debug(`Re-equipped bait: ${equippedbait}.`);
popup.hide();
const dashboardMenu = document.querySelector(".mousehuntHeaderView .menuItem.dropdown.dashboard");
if (dashboardMenu) {
dashboardMenu.classList.add("expanded");
const existing = document.querySelector(".dashboardContents");
if (existing) {
const refreshedContents = getDashboardContents();
existing.replaceWith(refreshedContents);
}
const wrapper = document.querySelector(".dashboardWrapper");
if (wrapper) {
wrapper.scrollTop = 0;
}
}
sessionSet("doing-location-refresh", "false");
});
makeDashboardTab = () => {
const tabsContainer = document.querySelector(".mousehuntHeaderView-dropdownContainer");
if (!tabsContainer) {
return;
}
const menuTab = document.createElement("div");
menuTab.classList.add("menuItem");
menuTab.classList.add("dropdown");
menuTab.classList.add("dashboard");
menuTab.addEventListener("click", () => {
menuTab.classList.toggle("expanded");
const existing = document.querySelector(".dashboardContents");
if (existing) {
const refreshedContents = getDashboardContents();
existing.replaceWith(refreshedContents);
}
sessionSet("doing-location-refresh", "false");
});
makeElement("span", "", "Dashboard", menuTab);
makeElement("div", "arrow", "", menuTab);
const dropdownContent = makeElement("div", "dropdownContent");
const dashboardWrapper = makeElement("div", "dashboardWrapper");
makeElement("div", "dashboardContents", "", dashboardWrapper);
const refreshWrapper = makeElement("div", "refreshWrapper");
const refreshButton = makeElement("button", ["mousehuntActionButton", "dashboardRefresh"]);
makeElement("span", "", "Refresh", refreshButton);
refreshButton.addEventListener("click", () => {
const confirmPopup = createPopup({
title: "Refresh Location Data",
content: `<div class="mh-improved-location-refresh-confirm-popup">
<div class="mh-improved-location-refresh-confirm-popup-content">
<p>This will refresh the location data for all locations by traveling to each location and caching the data.</p>
<div class="mh-improved-location-refresh-confirm-popup-buttons">
<div class="mousehuntActionButton mh-improved-location-refresh-confirm-popup-button mh-improved-location-refresh-confirm-popup-button-cancel"><span>Cancel</span></div>
<div class="mousehuntActionButton mh-improved-location-refresh-confirm-popup-button mh-improved-location-refresh-confirm-popup-button-confirm"><span>Confirm</span></div>
</div>
</div>
</div>`,
className: "mh-improved-location-refresh-confirm-popup",
hasCloseButton: false,
show: true
});
const cancelButton = document.querySelector(".mh-improved-location-refresh-confirm-popup-button-cancel");
if (cancelButton) {
cancelButton.addEventListener("click", () => {
confirmPopup.hide();
});
}
const confirmButton = document.querySelector(".mh-improved-location-refresh-confirm-popup-button-confirm");
if (confirmButton) {
confirmButton.addEventListener("click", () => {
confirmPopup.hide();
doLocationRefresh();
});
}
doLocationRefresh();
});
refreshWrapper.append(refreshButton);
dashboardWrapper.append(refreshWrapper);
dropdownContent.append(dashboardWrapper);
menuTab.append(dropdownContent);
tabsContainer.insertBefore(menuTab, tabsContainer.lastChild);
};
makeRegionMarkup = (name, childContent, appendTo) => {
const firstChild = childContent.firstChild;
if (!firstChild) {
return;
}
const regionWrapper = makeElement("div", "regionWrapper");
makeElement("div", "regionName", name, regionWrapper);
regionWrapper.append(childContent);
appendTo.append(regionWrapper);
};
makeLocationMarkup = (id, name, progress, appendTo, quests) => {
const markup = progress(quests);
if (!markup) {
return;
}
const locationWrapper = makeElement("div", "locationWrapper");
locationWrapper.setAttribute("data-location", id);
locationWrapper.classList.add(`locationWrapper-${id}`);
const locationImageWrapper = makeElement("div", "locationImageWrapper");
const image = environments4.find((env) => env.id === id);
if (image.image) {
const locationImage = makeElement("img", "locationImage");
locationImage.setAttribute("src", image.image);
locationImageWrapper.append(locationImage);
}
locationWrapper.append(locationImageWrapper);
makeElement("div", "locationName", name, locationWrapper);
makeElement("div", "locationProgress", markup, locationWrapper);
appendTo.append(locationWrapper);
};
getDashboardContents = () => {
const quests = JSON.parse(localStorage.getItem("mh-improved-cache-quests")) || {};
const contentsWrapper = document.createElement("div");
contentsWrapper.classList.add("dashboardContents");
const burroughs = document.createElement("div");
makeLocationMarkup("mousoleum", "Mousoleum", mousoleum_default, burroughs, quests);
makeLocationMarkup("pollution_outbreak", "Toxic Spill", toxic_spill_default2, burroughs, quests);
makeRegionMarkup("Burroughs", burroughs, contentsWrapper);
const varmintValley = document.createElement("div");
makeLocationMarkup("fort_rox", "Fort Rox", fort_rox_default, varmintValley, quests);
makeRegionMarkup("Varmint Valley", varmintValley, contentsWrapper);
const sandtailDesert = document.createElement("div");
makeLocationMarkup("desert_warpath", "Fiery Warpath", getFieryWarpathText, sandtailDesert, quests);
makeLocationMarkup("desert_oasis", "Living Garden", living_garden_default, sandtailDesert, quests);
makeLocationMarkup("lost_city", "Lost City", lost_city_default, sandtailDesert, quests);
makeLocationMarkup("sand_dunes", "Sand Dunes", sand_dunes_default, sandtailDesert, quests);
makeRegionMarkup("Sandtail Desert", sandtailDesert, contentsWrapper);
const rodentia = document.createElement("div");
makeLocationMarkup("seasonal_garden", "Seasonal Garden", getSeasonalGardenText, rodentia, quests);
makeLocationMarkup("zugzwang_tower", "Zugzwang's Tower", getZugzwangTowerText, rodentia, quests);
makeLocationMarkup("iceberg", "Iceberg", iceberg_default, rodentia, quests);
makeLocationMarkup("sunken_city", "Sunken City", sunken_city_default, rodentia, quests);
makeRegionMarkup("Rodentia", rodentia, contentsWrapper);
const quesoCanyon = document.createElement("div");
makeLocationMarkup("queso_geyser", "Queso Geyser", queso_geyser_default, quesoCanyon, quests);
makeRegionMarkup("Queso Canyon", quesoCanyon, contentsWrapper);
const hollowHeights = document.createElement("div");
makeLocationMarkup("labyrinth", "Labyrinth", labyrinth_default2, hollowHeights, quests);
makeLocationMarkup("ancient_city", "Zokor", zokor_default, hollowHeights, quests);
makeLocationMarkup("moussu_picchu", "Moussu Picchu", moussu_picchu_default, hollowHeights, quests);
makeLocationMarkup("floating_islands", "Floating Islands", floating_islands_default, hollowHeights, quests);
makeRegionMarkup("Hollow Heights", hollowHeights, contentsWrapper);
const folkloreForest = document.createElement("div");
makeLocationMarkup("foreword_farm", "Foreword Farm", foreword_farm_default, folkloreForest, quests);
makeLocationMarkup("table_of_contents", "Table of Contents", table_of_contents_default, folkloreForest, quests);
makeRegionMarkup("Folklore Forest", folkloreForest, contentsWrapper);
const rift = document.createElement("div");
makeLocationMarkup("rift_burroughs", "Burroughs Rift", burroughs_rift_default, rift, quests);
makeLocationMarkup("rift_whisker_woods", "Whisker Woods Rift", whisker_woods_rift_default, rift, quests);
makeLocationMarkup("rift_furoma", "Furoma Rift", furoma_rift_default, rift, quests);
makeLocationMarkup("rift_bristle_woods", "Bristle Woods Rift", bristle_woods_rift_default, rift, quests);
makeLocationMarkup("rift_valour", "Valour Rift", valour_rift_default, rift, quests);
makeRegionMarkup("Rift", rift, contentsWrapper);
if (burroughs.children.length === 0 && varmintValley.children.length === 0 && sandtailDesert.children.length === 0 && rodentia.children.length === 0 && quesoCanyon.children.length === 0 && hollowHeights.children.length === 0 && folkloreForest.children.length === 0 && rift.children.length === 0) {
const noLocation = makeElement("div", "noLocationDataWrapper");
makeElement("div", "noLocationData", "No location data found. Refresh data to populate the dashboard.", noLocation);
contentsWrapper.append(noLocation);
}
return contentsWrapper;
};
environments4 = [];
init30 = () => __async(void 0, null, function* () {
environments4 = yield getData("environments");
sessionSet("doing-location-refresh", "false");
cacheLocationData();
onEvent("travel_complete", cacheLocationData);
onRequest(cacheLocationData);
makeDashboardTab();
addStyles(styles_default29);
});
location_dashboard_default = {
id: "location-dashboard",
name: "Location Dashboard",
type: "feature",
default: true,
description: "See location HUD information in a dashboard available in the top dropdown menu.",
load: init30
};
}
});
// src/modules/metric/index.js
var imperialToMetric, convertInDialog, replaceInJournal, replaceOnMousePage, convertOnPage, init31, metric_default;
var init_metric = __esm({
"src/modules/metric/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
imperialToMetric = (text) => {
const lb = text.match(/(\d+? )lb./i);
const oz = text.match(/(\d+? )oz./i);
if (!(lb || oz)) {
return;
}
const lbValue = lb ? lb[1] : 0;
const ozValue = oz ? oz[1] : 0;
const totalWeight = Number.parseInt(lbValue) + Number.parseInt(ozValue) / 16;
const totalWeightMetric = (Math.round(totalWeight * 0.45359237 * 100) / 100).toString();
return text.replace(/(\d+? lb.\s)?(\d+? oz.)/i, totalWeightMetric + " kg. ");
};
convertInDialog = () => {
const mouseViewWeights = document.querySelectorAll(".mouseView-statsContainer .mouseView-statsContainer-block-padding table tbody tr");
if (mouseViewWeights.length) {
mouseViewWeights.forEach((row) => {
const firstCell = row.querySelector("td");
const secondCell = firstCell.nextSibling;
if (firstCell.innerText === "Avg. Weight:" || firstCell.innerText === "Heaviest:") {
const converted = imperialToMetric(secondCell.innerText);
if (converted) {
secondCell.innerText = converted;
}
}
});
}
};
replaceInJournal = () => {
const entries = document.querySelectorAll(".journal .entry .journalbody .journaltext");
if (!entries.length) {
return;
}
entries.forEach((entry) => {
const converted = imperialToMetric(entry.innerHTML);
if (converted) {
entry.innerHTML = converted;
}
});
};
replaceOnMousePage = () => {
const mouseWeightsStats = document.querySelectorAll(".mouseListView-categoryContent-subgroupContainer .mouseListView-categoryContent-subgroup-mouse-stats");
if (!mouseWeightsStats.length) {
return;
}
mouseWeightsStats.forEach((stat) => {
if (stat.classList.contains("average_weight") || stat.classList.contains("heaviest_catch")) {
const converted = imperialToMetric(stat.innerText);
if (converted) {
stat.innerText = converted;
}
}
});
};
convertOnPage = () => {
replaceOnMousePage();
replaceInJournal();
};
init31 = () => __async(void 0, null, function* () {
onDialogShow(convertInDialog);
onRequest(convertOnPage);
convertOnPage();
});
metric_default = {
id: "metric",
name: "Metric Units",
type: "feature",
default: false,
description: "Use metric units instead of imperial units.",
load: init31
};
}
});
// src/modules/only-open-multiple/styles.css
var styles_default30;
var init_styles31 = __esm({
"src/modules/only-open-multiple/styles.css"() {
styles_default30 = ".inventoryPage-item.convertible .inventoryPage-item-content-action input:first-of-type:not(:only-of-type){pointer-events:all;filter:grayscale(0)}.inventoryPage-item.convertible .inventoryPage-item-content-action input[data-item-action=all]{pointer-events:none;filter:grayscale(1)}.inventoryPage-item.convertible .inventoryPage-item-content-action input.allButOne{pointer-events:all;filter:none}\n";
}
});
// src/modules/only-open-multiple/index.js
var init32, only_open_multiple_default;
var init_only_open_multiple = __esm({
"src/modules/only-open-multiple/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
init_styles31();
init32 = () => __async(void 0, null, function* () {
addStyles(styles_default30);
});
only_open_multiple_default = {
id: "only-open-multiple",
name: "Inventory - Only Open multiple",
type: "feature",
default: false,
description: "Lock opening things in your inventory unless you have multiple of them.",
load: init32
};
}
});
// src/modules/open-all-but-one/styles.css
var styles_default31;
var init_styles32 = __esm({
"src/modules/open-all-but-one/styles.css"() {
styles_default31 = "";
}
});
// src/modules/open-all-but-one/index.js
var getQuantityInput, replaceOpenAction, addOpenAllButOneButton, init33, open_all_but_one_default;
var init_open_all_but_one = __esm({
"src/modules/open-all-but-one/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
init_styles32();
getQuantityInput = () => {
const quantity = document.querySelector(".itemView-action-convert-quantity");
if (!quantity) {
return false;
}
return quantity;
};
replaceOpenAction = () => {
const _original2 = app.pages.InventoryPage.useConvertible;
app.pages.InventoryPage.useConvertible = (element) => {
if (element.getAttribute("data-item-action") === "all-but-one") {
const itemType = element.getAttribute("data-item-type");
hg.views.ItemView.show(itemType);
const interval = setInterval(() => {
const quantityEl = document.querySelector(".itemView-action-convertForm");
const maxQuantity = quantityEl ? Number.parseInt(quantityEl.innerText.split("/")[1].trim(), 10) : 0;
const quantity = maxQuantity - 1;
const quantityInput = getQuantityInput();
if (quantityInput) {
clearInterval(interval);
quantityInput.value = quantity;
const useButton = document.querySelector(".itemView-action-convert-actionButton");
if (useButton) {
useButton.click();
}
}
}, 100);
} else {
_original2(element);
}
};
};
addOpenAllButOneButton = () => {
const convertibleItems = document.querySelectorAll('.inventoryPage-item.convertible[data-item-classification="convertible"]');
if (!convertibleItems.length) {
return;
}
const existingButtons = document.querySelectorAll(".open-all-but-one");
existingButtons.forEach((button) => {
button.remove();
});
convertibleItems.forEach((item) => {
const button = item.querySelector('.inventoryPage-item-button[data-item-action="all"]');
if (!button) {
return;
}
const newButton = button.cloneNode(true);
newButton.classList.add("open-all-but-one");
newButton.textContent = "All but One";
newButton.value = "All but One";
newButton.setAttribute("data-item-action", "all-but-one");
button.parentNode.insertBefore(newButton, button.nextSibling);
});
};
init33 = () => __async(void 0, null, function* () {
addStyles(styles_default31);
replaceOpenAction();
addOpenAllButOneButton();
onNavigation(() => {
addOpenAllButOneButton();
}, {
page: "inventory"
});
});
open_all_but_one_default = {
id: "open-all-but-one",
name: "Inventory - Open All But One buttons",
type: "feature",
default: true,
description: "Adds 'Open All But One' buttons to convertible items in your inventory.",
load: init33
};
}
});
// src/modules/paste-hunter-id/index.js
var maybeRedirectToHunterProfile, listenForIDPaste, init34, paste_hunter_id_default;
var init_paste_hunter_id = __esm({
"src/modules/paste-hunter-id/index.js"() {
init_sentry_release_injection_stub();
maybeRedirectToHunterProfile = (text) => {
const url = text.match(/https:\/\/www.mousehuntgame.com/);
if (url) {
window.location.href = text;
return;
}
const id = text.match(/\d+/);
if (!id) {
return;
}
hg.utils.PageUtil.setPage("HunterProfile", {
id: id[0]
}, (data) => {
const snuid = data.tabs.profile.subtabs[0].snuid;
if (snuid) {
hg.utils.PageUtil.showHunterProfile(snuid);
}
});
};
listenForIDPaste = () => {
window.addEventListener("paste", (e) => {
if (
/* eslint-disable @wordpress/no-global-active-element */
document.activeElement instanceof HTMLInputElement || document.activeElement instanceof HTMLTextAreaElement || document.activeElement instanceof HTMLSelectElement
) {
return;
}
maybeRedirectToHunterProfile(e.clipboardData.getData("text"));
});
};
init34 = () => __async(void 0, null, function* () {
listenForIDPaste();
});
paste_hunter_id_default = {
id: "paste-hunter-id",
name: "Paste Hunter ID",
type: "feature",
default: true,
description: "Copy a Hunter ID to your clipboard and then press Ctrl/Cmd+v anywhere to go directly to that hunter's profile.",
load: init34
};
}
});
// src/modules/prestige-base-stats/index.js
var setPrestigeStats, modifyPB, savePbStats, init35, prestige_base_stats_default;
var init_prestige_base_stats = __esm({
"src/modules/prestige-base-stats/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
setPrestigeStats = () => {
const prestige = document.querySelector(".campPage-trap-itemBrowser-item.base.valour_rift_prestige_base");
if (!prestige) {
return;
}
const savedStats = sessionGet("pb-stats") || false;
if (!savedStats) {
return;
}
const stats = prestige.querySelector(".campPage-trap-itemBrowser-item-statContainer");
if (!stats) {
return;
}
const setup = getUserSetupDetails();
const power = stats.querySelector(".campPage-trap-itemBrowser-item-stat.power");
if (power) {
const powerValue = power.querySelector(".value span");
if (powerValue) {
powerValue.innerText = savedStats.power;
if (setup.power < savedStats.power) {
power.classList.add("better");
} else if (setup.power > savedStats.power) {
power.classList.add("worse");
}
}
}
const luck = stats.querySelector(".campPage-trap-itemBrowser-item-stat.luck");
if (luck) {
const luckValue = luck.querySelector(".value span");
if (luckValue) {
luckValue.innerText = savedStats.luck;
if (setup.luck < savedStats.luck) {
luck.classList.add("better");
} else if (setup.luck > savedStats.luck) {
luck.classList.add("worse");
}
}
}
};
modifyPB = (retry = false) => {
const prestige = document.querySelector(".campPage-trap-itemBrowser-item.base.valour_rift_prestige_base");
if (!prestige) {
if (!retry) {
setTimeout(() => {
modifyPB(true);
}, 500);
}
return;
}
if (prestige.getAttribute("data-pinned")) {
return;
}
const recomended = document.querySelector(".campPage-trap-itemBrowser.base .campPage-trap-itemBrowser-tagGroup.recommended");
if (!recomended) {
return;
}
prestige.setAttribute("data-pinned", true);
const header = recomended.querySelector(".campPage-trap-itemBrowser-tagGroup-name");
if (!header) {
return;
}
header.after(prestige);
setPrestigeStats();
};
savePbStats = () => {
const setup = getUserSetupDetails();
if (setup.base.id !== 2904) {
return;
}
const trapMath = document.querySelectorAll(".campPage-trap-trapStat-mathRow");
if (!trapMath.length) {
return;
}
const stats = {};
trapMath.forEach((row) => {
const stat = row.querySelector(".campPage-trap-trapStat-mathRow-name");
if (!stat) {
return;
}
if (!stat.innerText.includes("Prestige Base")) {
return;
}
const value = row.querySelector(".campPage-trap-trapStat-mathRow-value");
if (!value) {
return;
}
let parsedValue = Number.parseInt(value.innerText.replaceAll(",", ""), 10);
const type = row.parentElement.parentElement;
const typeClass = type.className.replace("campPage-trap-trapStat", "").trim();
if (typeClass === "power") {
parsedValue = parsedValue + 490;
} else if (typeClass === "luck") {
parsedValue = parsedValue + 5;
}
stats[typeClass] = parsedValue;
});
if (!stats.power || !stats.luck) {
return;
}
sessionSet("pb-stats", stats);
};
init35 = () => __async(void 0, null, function* () {
onPageChange({ blueprint: { show: () => {
savePbStats();
setTimeout(modifyPB, 500);
} } });
onRequest(() => {
savePbStats();
setPrestigeStats();
}, "managers/ajax/users/changetrap.php");
onRequest(() => {
savePbStats();
setPrestigeStats();
}, "managers/ajax/users/gettrapcomponents.php");
});
prestige_base_stats_default = {
id: "prestige-base-stats",
name: "Prestige Base Stats",
type: "feature",
default: true,
description: "Shows the correct stats for the Prestige Base in the base selector.",
load: init35
};
}
});
// src/modules/quick-filters-and-sort/styles.css
var styles_default32;
var init_styles33 = __esm({
"src/modules/quick-filters-and-sort/styles.css"() {
styles_default32 = ".campPage-trap-itemBrowser-filter input[data-filter=search]{width:322px;padding:10px}.campPage-trap-itemBrowser-filter:first-child{flex:0 0 100%;margin-bottom:5px}.campPage-trap-itemBrowser-filterContainer{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-evenly}.campPage-trap-itemBrowser-favorites{margin-top:10px}.campPage-trap-itemBrowser .campPage-trap-itemBrowser-filter select{width:100px}.campPage-trap-itemBrowser.weapon .campPage-trap-itemBrowser-filter select{width:75px}.campPage-trap-itemBrowser-quickLinks{z-index:1;display:flex;justify-content:space-evenly;padding:5px 10px;background-color:#f6f3eb}.mh-dark-mode .campPage-trap-itemBrowser-quickLinks{background-color:#242424}.campPage-trap-itemBrowser-quickLinks-power{padding:10px 15px}.campPage-trap-itemBrowser-quickLinks-header{position:absolute;left:0;padding:5px;margin-top:10px;color:var(--mhdm-brown, #96704b);text-align:center;transform:rotate(-90deg)}.campPage-trap-itemBrowser-quickLinks-header.filter-header{left:-2px;margin-top:5px}.campPage-trap-itemBrowser-quickLinks .campPage-trap-itemBrowser-favorite-item-image{width:41px;height:41px;background-position:center}.campPage-trap-itemBrowser-quickLinks .campPage-trap-itemBrowser-favorite-item-image-frame{width:40px;height:40px}.campPage-trap-itemBrowser-quickLinks-power .campPage-trap-itemBrowser-favorite-item-image{width:31px;height:30px;background-position:50%;background-size:25px}.campPage-trap-itemBrowser-quickLinks-power .campPage-trap-itemBrowser-favorite-item-image-frame{width:29px;height:29px}.campPage-trap-itemBrowser-quickLinks .campPage-trap-itemBrowser-favorite-item-image:hover,.campPage-trap-itemBrowser-quickLinks .campPage-trap-itemBrowser-favorite-item-image:focus{background-color:#cac0b2}.campPage-trap-itemBrowser-quickLinks .campPage-trap-itemBrowser-favorite-item-image:hover .campPage-trap-itemBrowser-favorite-item-image-frame,.campPage-trap-itemBrowser-quickLinks .campPage-trap-itemBrowser-favorite-item-image:focus .campPage-trap-itemBrowser-favorite-item-image-frame{box-shadow:none}.campPage-trap-itemBrowser-quickLinks .campPage-trap-itemBrowser-favorite-item{width:auto}.campPage-trap-itemBrowser-quickLinks-power .campPage-trap-itemBrowser-favorite-item{margin:0 2px}.campPage-trap-itemBrowser-quickLinks-power .campPage-trap-itemBrowser-favorite-item:first-child{margin-left:0}.campPage-trap-itemBrowser-quickLinks-power .campPage-trap-itemBrowser-favorite-item:last-child{margin-right:0}.quicklinks-filter-sortBy-name .campPage-trap-itemBrowser-favorite-item-image{background-position:center;background-size:30px}.weapon .campPage-trap-itemBrowser-items{top:250px}.campPage-trap-itemBrowser-items{top:200px}.campPage-wrapper[data-blueprint-type=weapon] .campPage-trap-itemBrowser-itemDescriptionHover.mousehuntTooltip.tight.left.noEvents,.campPage-wrapper[data-blueprint-type=base] .campPage-trap-itemBrowser-itemDescriptionHover.mousehuntTooltip.tight.left.noEvents{margin-top:170px}.campPage-trap-itemBrowser-itemDescriptionHover.mousehuntTooltip.tight.left.noEvents{margin-top:125px}.mh-dark-mode .quicklinks-filter-sortBy-name a,.mh-dark-mode .quicklinks-filter-sortBy-quantity a{filter:invert(1) contrast(.5)}\n";
}
});
// src/modules/quick-filters-and-sort/index.js
var addItemToQuickLinks, addQuickLinksToTrap2, main21, init36, quick_filters_and_sort_default;
var init_quick_filters_and_sort = __esm({
"src/modules/quick-filters-and-sort/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
init_styles33();
addItemToQuickLinks = (link, appendTo, filter, sortDropdown) => {
const item = document.createElement("div");
item.classList.add("campPage-trap-itemBrowser-favorite-item", "quicklinks-filter", `quicklinks-filter-${filter}-${link.id}`);
const itemAnchor = document.createElement("a");
itemAnchor.classList.add("campPage-trap-itemBrowser-favorite-item-image");
itemAnchor.setAttribute("href", "#");
itemAnchor.setAttribute("title", filter === "sortBy" ? `Sort by ${link.name}` : `Filter by ${link.name}`);
itemAnchor.style.backgroundImage = `url(${link.image})`;
const frame = document.createElement("div");
frame.classList.add("campPage-trap-itemBrowser-favorite-item-image-frame");
itemAnchor.append(frame);
const hiddenInput = document.createElement("input");
hiddenInput.setAttribute("type", "hidden");
hiddenInput.setAttribute("data-filter", filter);
hiddenInput.setAttribute("value", link.id);
item.append(itemAnchor);
item.append(hiddenInput);
item.addEventListener("click", (e) => {
e.preventDefault();
if (e.target.classList.contains("active")) {
hiddenInput.value = "sortBy" === filter ? "default" : "no_tag_selected";
e.target.classList.remove("active");
} else {
hiddenInput.value = link.id;
e.target.classList.add("active");
}
app.pages.CampPage.updateFilter(hiddenInput);
if (sortDropdown) {
sortDropdown.value = link.id;
}
});
appendTo.append(item);
};
addQuickLinksToTrap2 = () => {
const itemBrowser = document.querySelector(".campPage-trap-itemBrowser");
if (!itemBrowser) {
return;
}
const type = itemBrowser.classList.value.replace("campPage-trap-itemBrowser", "").trim();
if (!type) {
return;
}
itemBrowser.parentNode.parentNode.setAttribute("data-blueprint-type", type);
const favorites = document.querySelector(".campPage-trap-itemBrowser-favorites");
if (!favorites) {
return;
}
const existing = document.querySelector(".campPage-trap-itemBrowser-quickLinks");
if (existing) {
existing.remove();
}
const existingPower = document.querySelector(".campPage-trap-itemBrowser-quickLinks-power");
if (existingPower) {
existingPower.remove();
}
const quickLinks = document.createElement("div");
quickLinks.classList.add("campPage-trap-itemBrowser-quickLinks");
makeElement("div", "campPage-trap-itemBrowser-quickLinks-header", "Sort", quickLinks);
const links = [
{ id: "power", name: "Power", image: "https://www.mousehuntgame.com/images/ui/camp/trap/stat_power.png?asset_cache_version=2" },
{ id: "power_bonus", name: "Power Bonus", image: "https://www.mousehuntgame.com/images/ui/camp/trap/stat_power_bonus.png?asset_cache_version=2" },
{ id: "luck", name: "Luck", image: "https://www.mousehuntgame.com/images/ui/camp/trap/stat_luck.png?asset_cache_version=2" },
{ id: "attraction_bonus", name: "Attraction Bonus", image: "https://www.mousehuntgame.com/images/ui/camp/trap/stat_attraction_bonus.png?asset_cache_version=2" },
{ id: "name", name: "Name", image: "https://i.mouse.rip/sort-a-z-icon.png" }
];
if ("bait" === type || "trinket" === type) {
links.push({ id: "quantity", name: "Quantity", image: "https://i.mouse.rip/sort-qty-icon.png" });
}
const sortByInput = document.querySelector(".campPage-trap-itemBrowser-filter.sortBy select");
links.forEach((link) => {
addItemToQuickLinks(link, quickLinks, "sortBy", sortByInput);
});
favorites.parentNode.insertBefore(quickLinks, favorites.nextSibling);
if ("weapon" === type) {
const powerQuickLinks = document.createElement("div");
powerQuickLinks.classList.add("campPage-trap-itemBrowser-quickLinks", "campPage-trap-itemBrowser-quickLinks-power");
makeElement("div", ["campPage-trap-itemBrowser-quickLinks-header", "filter-header"], "Filter", powerQuickLinks);
const powerLinks = [
{ id: "arcane", name: "Arcane", image: "https://www.mousehuntgame.com/images/powertypes/arcane.png?asset_cache_version=2" },
{ id: "draconic", name: "Draconic", image: "https://www.mousehuntgame.com/images/powertypes/draconic.png?asset_cache_version=2" },
{ id: "forgotten", name: "Forgotten", image: "https://www.mousehuntgame.com/images/powertypes/forgotten.png?asset_cache_version=2" },
{ id: "hydro", name: "Hydro", image: "https://www.mousehuntgame.com/images/powertypes/hydro.png?asset_cache_version=2" },
{ id: "law", name: "Law", image: "https://www.mousehuntgame.com/images/powertypes/law.png?asset_cache_version=2" },
{ id: "physical", name: "Physical", image: "https://www.mousehuntgame.com/images/powertypes/physical.png?asset_cache_version=2" },
{ id: "rift", name: "Rift", image: "https://www.mousehuntgame.com/images/powertypes/rift.png?asset_cache_version=2" },
{ id: "shadow", name: "Shadow", image: "https://www.mousehuntgame.com/images/powertypes/shadow.png?asset_cache_version=2" },
{ id: "tactical", name: "Tactical", image: "https://www.mousehuntgame.com/images/powertypes/tactical.png?asset_cache_version=2" }
];
const powerInput = document.querySelector(".campPage-trap-itemBrowser-filter.powerType select");
powerLinks.forEach((link) => {
addItemToQuickLinks(link, powerQuickLinks, "powerType", powerInput);
});
quickLinks.parentNode.insertBefore(powerQuickLinks, quickLinks.nextSibling);
} else {
const powerQuickLinks = document.querySelector(".campPage-trap-itemBrowser-quickLinks-power");
if (powerQuickLinks) {
powerQuickLinks.remove();
}
}
};
main21 = () => {
addQuickLinksToTrap2();
};
init36 = () => __async(void 0, null, function* () {
addStyles(styles_default32);
onRequest(main21, "ajax/users/gettrapcomponents.php");
onEvent("camp_page_toggle_blueprint", main21);
});
quick_filters_and_sort_default = {
id: "quick-filters-and-sort",
name: "Quick Filters and Sort",
type: "feature",
default: true,
description: "Add quick filters and sorting to the trap, base, charm, and cheese selectors.",
load: init36
};
}
});
// src/modules/quick-send-supplies/settings/index.js
function settings_default9(module) {
return __async(this, null, function* () {
addMhuiSetting(
"quick-send-supplies-items",
"Quick Send Supplies Items",
[
{
name: "SUPER|brie+",
value: "super_brie_cheese"
},
{
name: "Rare Map Dust",
value: "rare_map_dust_stat_item"
},
{
name: "Adorned Empyrean Jewel",
value: "floating_trap_upgrade_stat_item"
},
{
name: "Rift-torn Roots",
value: "rift_torn_roots_crafting_item"
}
],
"Items to make available in the Quick Send Supplies popup.",
module,
{
type: "multi-select",
number: 4,
options: yield getTradableItems("type")
}
);
});
}
var init_settings10 = __esm({
"src/modules/quick-send-supplies/settings/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
}
});
// src/modules/quick-send-supplies/styles.css
var styles_default33;
var init_styles34 = __esm({
"src/modules/quick-send-supplies/styles.css"() {
styles_default33 = ".userInteractionButtonsView-buttonGroup{position:relative}.quickSendWrapper{position:absolute;top:-50px;left:60px;z-index:10;display:none;min-width:130px;padding:7px 4px;font-size:10px;color:#000;text-align:center;background:#fff;border:2px solid #000;border-radius:10px;box-shadow:2px 3px 4px #666;transform:translate(-50%)}.userInteractionButtonsView-buttonGroup:hover .quickSendWrapper,.quickSendWrapper:hover{display:block}.treasureMapView-hunter-wrapper:hover .quickSendWrapper{top:30px;display:block}.journal .entry .journaltext input.quickSendInput,.mousehuntPage-content input.quickSendInput,.quickSendInput{width:65px;padding:1px;font-size:12px}.quickSendButton{cursor:pointer}.journal .entry a .quickSendWrapper img,.quickSendWrapper img{width:25px;height:auto;border:none}.quickSendGoWrapper{display:flex;align-items:center;justify-content:space-evenly}.itemsWrapper{display:flex;align-items:center;justify-content:center;margin-bottom:5px}.quickSendItemRadio{display:none}.quickSendItem{margin:0 2px;cursor:pointer;opacity:.5}.quickSendItem.selected{border-radius:10px;box-shadow:0 0 0 2px #fff,0 0 2px 4px #7dea7d;opacity:1}.quickSendItem:hover,.quickSendItem:focus{opacity:1}.quickSendItem:focus,.quickSendItem:hover img{transform:scale(1.3)}.quickSendItem.selected:focus,.quickSendItem.selected:hover img,.quickSendItem.selected:focus img{transform:scale(1)}.quickSendmessage{position:absolute;bottom:30px;display:inline-flex;align-items:center;padding:10px;pointer-events:none;background-color:#ffa;border-radius:3px;box-shadow:1px 1px 3px #000;opacity:0;transition:opacity .5s}.teamPage-memberRow-actions .quickSendButton.mousehuntActionButton.tiny{max-width:30px!important;margin:0}.mh-ui-quick-send-error,.mh-ui-quick-send-success{position:absolute;bottom:-30px}.friendsPage-community-hunterResult .quickSendWrapper{top:-55px;left:35px}\n";
}
});
// src/modules/quick-send-supplies/index.js
var makeItem, makeSendSuppliesButton, main22, addToMapUsers, init37, quick_send_supplies_default;
var init_quick_send_supplies = __esm({
"src/modules/quick-send-supplies/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
init_settings10();
init_styles34();
makeItem = (name, type, image, appendTo) => {
const item = makeElement("div", "quickSendItem");
item.title = name;
const itemImage = document.createElement("img");
itemImage.setAttribute("src", image);
itemImage.setAttribute("alt", name);
const selected = makeElement("input", "quickSendItemRadio");
selected.setAttribute("type", "radio");
selected.setAttribute("name", "item");
selected.setAttribute("value", type);
selected.setAttribute("data-name", name);
item.addEventListener("click", () => {
selected.checked = true;
const items2 = document.querySelectorAll(".quickSendItem");
items2.forEach((i) => {
i.classList.remove("selected");
});
item.classList.add("selected");
});
item.append(selected);
item.append(itemImage);
appendTo.append(item);
};
makeSendSuppliesButton = (btn, snuid) => __async(void 0, null, function* () {
if (snuid === user.sn_user_id) {
return false;
}
btn.setAttribute("data-quick-send", "true");
const quickSendLinkWrapper = makeElement("form", ["quickSendWrapper", "hidden"]);
const itemsWrapper = makeElement("div", "itemsWrapper");
const itemOptions = [
getSetting("quick-send-supplies-items-0", "super_brie_cheese"),
getSetting("quick-send-supplies-items-1", "rare_map_dust_stat_item"),
getSetting("quick-send-supplies-items-2", "floating_trap_upgrade_stat_item"),
getSetting("quick-send-supplies-items-3", "rift_torn_roots_crafting_item")
];
const allTradableItems = yield getTradableItems("all");
for (const item of itemOptions) {
const tradableItem = allTradableItems.find((i) => i.type === item);
if (tradableItem) {
makeItem(tradableItem.name, tradableItem.type, tradableItem.image, itemsWrapper);
}
}
quickSendLinkWrapper.append(itemsWrapper);
const quickSendGoWrapper = makeElement("div", "quickSendGoWrapper");
const quickSendInput = makeElement("input", "quickSendInput");
quickSendInput.setAttribute("type", "number");
quickSendInput.setAttribute("placeholder", "Quantity");
const quickSendButton = makeElement("div", ["quickSendButton", "mousehuntActionButton", "tiny"], "<span>Send</span>");
quickSendButton.addEventListener("click", () => {
if (quickSendButton.classList.contains("disabled")) {
return;
}
const qty = quickSendInput.value;
if (!qty) {
showErrorMessage("Please enter a quantity", quickSendGoWrapper, "mh-ui-quick-send-error");
return;
}
const selected = document.querySelector(".quickSendItem.selected");
if (!selected) {
showErrorMessage("Please select an item", quickSendGoWrapper, "mh-ui-quick-send-error");
return;
}
const item = selected.querySelector(".quickSendItemRadio");
if (!item) {
showErrorMessage("Please select an item", quickSendGoWrapper, "mh-ui-quick-send-error");
return;
}
quickSendButton.classList.add("disabled");
const itemType = item.getAttribute("value");
const itemName = item.getAttribute("data-name");
const url = `https://www.mousehuntgame.com/managers/ajax/users/supplytransfer.php?sn=Hitgrab&hg_is_ajax=1&receiver=${snuid}&uh=${user.unique_hash}&item=${itemType}&item_quantity=${qty}`;
fetch(url, {
method: "POST"
}).then((response) => {
if (response.status === 200) {
quickSendInput.value = "";
quickSendButton.classList.remove("disabled");
showSuccessMessage(`Sent ${qty} ${itemName}!`, quickSendGoWrapper, "mh-ui-quick-send-success");
}
}).catch(() => {
quickSendButton.classList.remove("disabled");
showErrorMessage("There was an error sending supplies", quickSendGoWrapper, "mh-ui-quick-send-error");
});
});
quickSendGoWrapper.append(quickSendInput);
quickSendGoWrapper.append(quickSendButton);
quickSendLinkWrapper.append(quickSendGoWrapper);
return quickSendLinkWrapper;
});
main22 = () => __async(void 0, null, function* () {
const sendSupplies = document.querySelectorAll(".userInteractionButtonsView-button.sendSupplies");
if (!sendSupplies) {
return;
}
for (const btn of sendSupplies) {
if (btn.classList.contains("disabled")) {
return;
}
const existing = btn.getAttribute("data-quick-send");
if (existing) {
return;
}
const snuid = btn.parentNode.parentNode.getAttribute("data-recipient-snuid");
if (!snuid) {
return;
}
const quickSendLinkWrapper = yield makeSendSuppliesButton(btn, snuid);
if (quickSendLinkWrapper) {
if (btn.parentNode) {
if (btn.nextSibling) {
btn.parentNode.insertBefore(quickSendLinkWrapper, btn.nextSibling);
} else {
btn.parentNode.append(quickSendLinkWrapper);
}
} else {
btn.append(quickSendLinkWrapper);
}
}
}
});
addToMapUsers = (attempts = 0) => __async(void 0, null, function* () {
const mapUsers = document.querySelectorAll(".treasureMapView-hunter-wrapper.mousehuntTooltipParent");
if (!mapUsers || !mapUsers.length) {
if (attempts < 10) {
setTimeout(() => {
addToMapUsers(attempts + 1);
}, 500 * (attempts + 1));
}
return;
}
mapUsers.forEach((btn) => __async(void 0, null, function* () {
const existing = btn.getAttribute("data-quick-send");
if (existing) {
return;
}
const snuid = btn.getAttribute("data-snuid");
if (!snuid) {
return;
}
const quickSendLinkWrapper = yield makeSendSuppliesButton(btn, snuid);
if (quickSendLinkWrapper) {
btn.append(quickSendLinkWrapper);
}
}));
});
init37 = () => __async(void 0, null, function* () {
addStyles(styles_default33);
main22();
onNavigation(main22);
onRequest(() => {
setTimeout(main22, 500);
});
onEvent("profile_hover", main22);
onDialogShow(addToMapUsers, "map");
});
quick_send_supplies_default = {
id: "quick-send-supplies",
name: "Quick Send Supplies",
type: "feature",
default: true,
description: "Hover over the Send Supplies button on someone's profile or hover-profile to easily send any quantity an item.",
load: init37,
settings: settings_default9
};
}
});
// src/modules/taller-windows/styles.css
var styles_default34;
var init_styles35 = __esm({
"src/modules/taller-windows/styles.css"() {
styles_default34 = ".adventureBookPopup-titleContent,.convertibleOpenView-itemContainer,.marketplaceView-browse-content,.MHCheckoutAllRewardsPageView,.treasureMapListingsView-tableView,.treasureMapView-block-content,.treasureMapView-block-content.halfHeight,.treasureMapView-block-content.tall,.treasureMapView-blockWrapper.tall .treasureMapView-block-content,#messengerUINotification .notificationHeader,#messengerUINotification .notificationMessageList,#supplytransfer .drawer .listContainer,#supplytransfer .drawer .tabContent,#supplytransfer .drawer{height:auto;max-height:75vh}#supplytransfer .drawer{padding-bottom:75px}.adventureBookPopup-titleContent{max-height:unset}.treasureMapDialogView.limitHeight .treasureMapView-block-content,.treasureMapDialogView.limitHeight .treasureMapDialogView-content{max-height:75vh}.treasureMapDialogView.wide.limitHeight{transform:translate(-50%,-100px)}.giftSelectorView-inbox-giftContainer,#overlayPopup .giftSelectorView-scroller{height:auto;min-height:300px;max-height:65vh}#overlayPopup.giftSelectorViewPopup{top:50px!important}.springHuntHUD-popup-regionContainer{display:contents}#overlayPopup .imgArray{min-height:105px;max-height:500px}.floatingIslandsWorkshop-parts-content{height:auto;background:linear-gradient(255deg,#fbf3b0 75%,#fdfcc7);border-bottom-right-radius:10px;border-bottom-left-radius:10px;outline:10px solid #fbf3ae;box-shadow:0 2px 1px 11px #b9570e,0 3px 2px 12px #985316,0 4px 1px 13px #84420f,0 5px 1px 14px #c47728,0 6px 1px 15px #cd7f2c,0 7px 1px 16px #e19439}.floatingIslandsWorkshop-stabilizer{top:325px;right:78px;left:unset;border:none;transform:rotate(90deg)}.floatingIslandsWorkshop-stabilizer label{color:#848383}.floatingIslandsWorkshop-part-name{position:absolute;top:0;right:10px;left:0}.floatingIslandsWorkshop-part-border{margin-top:18px;border-top-left-radius:0;border-top-right-radius:0}.floatingIslandsWorkshop-part-state a.mousehuntActionButton.tiny.lightBlue{font-size:9px;background:#fefad7;box-shadow:none}.floatingIslandsWorkshop-part-state a.mousehuntActionButton.tiny.lightBlue:before{background:#fff9c3;box-shadow:0 0 10px #f3ecb2 inset}.floatingIslandsWorkshop-parts-total{margin-right:15px}.floatingIslandsWorkshop-partsContainer{background-color:#fbf3ae;border-radius:5px}.floatingIslandsWorkshop-part.active .floatingIslandsWorkshop-part-border{background-color:#90cefa}.floatingIslandsWorkshop-part-state .mousehuntActionButton.tiny.selected{box-shadow:none}.floatingIslandsWorkshop-part-actions{background-color:#c48648}.floatingIslandsWorkshop-part.active .floatingIslandsWorkshop-part-border:after{border:none}.select2-results{max-height:50vh}.treasureMapDialogView.limitHeight .treasureMapDialogView-content{max-height:unset}.giftSelectorView-scroller{height:auto}.mh-gift-buttons-clone-wrapper{max-height:calc(75vh - 65px)}\n";
}
});
// src/modules/taller-windows/index.js
var init38, taller_windows_default;
var init_taller_windows = __esm({
"src/modules/taller-windows/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
init_styles35();
init38 = () => __async(void 0, null, function* () {
addStyles(styles_default34);
});
taller_windows_default = {
id: "taller-windows",
name: "Taller Windows",
type: "feature",
default: true,
description: "Make popup and dialog windows taller.",
load: init38
};
}
});
// src/modules/tem-crowns/styles.css
var styles_default35;
var init_styles36 = __esm({
"src/modules/tem-crowns/styles.css"() {
styles_default35 = ".campPage-trap-trapEffectiveness-mouse-name{display:inline-flex;flex-flow:column wrap;place-content:flex-start space-around;align-items:flex-start;width:95px;padding-left:5px}.campPage-trap-trapEffectiveness-mouse:hover,.campPage-trap-trapEffectiveness-mouse:focus,.campPage-trap-trapEffectiveness-mouse:active{border:none;outline:1px solid #ccc}.campPage-trap-trapEffectiveness-content{overflow:visible}.mh-ui-tem-crown.mousebox{position:relative;float:none;margin:0;border:none}img.mh-ui-tem-crown-icon{position:absolute;top:-1px;right:-3px;z-index:2;width:22px;height:22px;vertical-align:middle;background-color:#fdfdfa;border:1px solid #929292;border-radius:50%}span.mh-ui-tem-crown-text{position:absolute;top:-1px;left:1px;z-index:1;box-sizing:border-box;display:inline-block;width:auto;height:24px;padding:4px 10px 2px 15px;font-size:12px;font-weight:900;color:#926944;background-color:#f4f4f4;border:1px solid #8d8282}.mh-ui-tem-crown-wrapper{margin-top:5px;margin-left:10px}.campPage-trap-trapEffectiveness-mouse-chance{display:block;margin-top:5px;color:#628ea9}.campPage-trap-trapEffectiveness-mouse-powerType{right:25px;bottom:-10px;background-size:70%}.campPage-trap-trapEffectiveness span{font-size:14px;vertical-align:bottom}.campPage-trap-trapEffectiveness-difficultyGroup.clear-block{display:grid;grid-template-columns:1fr 1fr;place-items:center stretch;padding-left:10px}.campPage-trap-trapEffectiveness-mouse{width:unset;margin:10px 0;overflow:visible;border:none}.campPage-trap-trapEffectiveness-difficultyGroup-label{grid-column:span 2;font-weight:400;text-align:center;border:none}\n";
}
});
// src/modules/tem-crowns/index.js
var getCrownType, addCrownsToTEM, init39, tem_crowns_default;
var init_tem_crowns = __esm({
"src/modules/tem-crowns/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
init_styles36();
getCrownType = (catches) => {
if (catches < 10) {
return "none";
}
if (catches < 100) {
return "bronze";
}
if (catches < 500) {
return "silver";
}
if (catches < 1e3) {
return "gold";
}
if (catches < 2500) {
return "platinum";
}
return "diamond";
};
addCrownsToTEM = (..._0) => __async(void 0, [..._0], function* (huntingStats = [], attempts = 0) {
if (huntingStats.length === 0) {
const crowns = yield doRequest("managers/ajax/mice/getstat.php", { action: "get_hunting_stats" });
if (!(crowns.hunting_stats && crowns.hunting_stats.length > 0)) {
return;
}
huntingStats = crowns.hunting_stats;
}
const temMice = document.querySelectorAll(".campPage-trap-trapEffectiveness-mouse");
if (!temMice || temMice.length === 0) {
if (attempts > 10) {
return;
}
attempts++;
setTimeout(() => addCrownsToTEM(huntingStats, attempts), 250 * attempts);
return;
}
temMice.forEach((mouse) => __async(void 0, null, function* () {
const hasCrown = mouse.getAttribute("data-mh-ui-tem-crown");
if (hasCrown) {
return;
}
const type = mouse.getAttribute("data-mouse");
if (!type) {
return;
}
mouse.setAttribute("data-mh-ui-tem-crown", true);
const mouseStats2 = huntingStats.find((m) => m.type === type);
if (!mouseStats2) {
return;
}
const name = mouse.querySelector(".campPage-trap-trapEffectiveness-mouse-name");
if (!name) {
return;
}
const catches = mouseStats2.num_catches;
const crownType = getCrownType(catches);
const crownWrapper = makeElement("div", "mh-ui-tem-crown-wrapper");
const crown = document.createElement("span");
crown.classList.add("mh-ui-tem-crown", "mousebox");
const crownIcon = document.createElement("img");
crownIcon.classList.add("mh-ui-tem-crown-icon");
crownIcon.src = `https://www.mousehuntgame.com/images/ui/crowns/crown_${crownType}.png`;
crown.append(crownIcon);
makeElement("span", "mh-ui-tem-crown-text", catches, crown);
crownWrapper.append(crown);
name.append(crownWrapper);
}));
});
init39 = () => __async(void 0, null, function* () {
addStyles(styles_default35);
onPageChange({ tem: { show: addCrownsToTEM } });
});
tem_crowns_default = {
id: "tem-crowns",
name: "TEM Crowns",
type: "feature",
default: true,
description: "Adds crowns and catches to the the Trap Effectiveness Meter.",
load: init39
};
}
});
// src/data/ultimate-checkmark.json
var ultimate_checkmark_default;
var init_ultimate_checkmark = __esm({
"src/data/ultimate-checkmark.json"() {
ultimate_checkmark_default = [
{
id: "treasure_chests",
name: "Treasure Chests",
items: [
{
item_id: "1802",
type: "zugzwang_treasure_chest_convertible",
name: "Zugzwang Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/4e1b506a260466747f6238dc57ac38c3.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/5b32126dbda195a644b3e2b630843870.jpg?cv=2"
},
{
item_id: "3278",
type: "sky_palace_treasure_chest_convertible",
name: "Empyrean Sky Palace Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/4deb109ea8159ae1af831d1dac44e694.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/15e5ad2a708db20fd4e92510d247bb03.jpg?cv=2"
},
{
item_id: "2823",
type: "queso_canyon_tour_treasure_chest_convertible",
name: "Queso Canyon Grand Tour Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/d21bb8fb6540a240318cec11f7238b04.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/fdcf47fc4de9dec045fe5280b7bfcb5b.jpg?cv=2"
},
{
item_id: "1798",
type: "valour_treasure_chest_convertible",
name: "Valour Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/6dc1151ce637e84e975ea779a2956e5f.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/fd27e6652f1a5dedc8c2d9d3253dbd0b.jpg?cv=2"
},
{
item_id: "1976",
type: "rare_large_rainbow_treasure_chest_convertible",
name: "Rare Large Rainbow Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/dcf0c6d1cc0f84010e26188d317e12a6.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/1553c56646365f9b7d176303097f9d1a.jpg?cv=2"
},
{
item_id: "2819",
type: "geyser_dweller_treasure_chest_convertible",
name: "Queso Geyser Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/33128f6d1885d3f083ba1865666bfc8a.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/a46c362782352a4fecd7b179f56b1eb3.jpg?cv=2"
},
{
item_id: "2376",
type: "chrome_hard_treasure_chest_convertible",
name: "Hard Chrome Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/24e0f3c863d32e23948bd618a06ca0c9.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/e62b78aaac7fc0e723afa5be250cdf34.jpg?cv=2"
},
{
item_id: "2859",
type: "rare_c_boss_hard_treasure_chest_convertible",
name: "Rare Hard Chrome Slayer Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/bc1a3664133e69d3df57bcdc5a4a733a.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/4e10f96e7dd5b8f0d67557be6de02742.jpg?cv=2"
},
{
item_id: "1776",
type: "rare_icebreaker_treasure_chest_convertible",
name: "Rare Icebreaker Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/df9b1518eb19569bc704c50f35978be2.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/76bf061f77ce6f10cdb627ca03d6ee0b.jpg?cv=2"
},
{
item_id: "3194",
type: "rare_valour_rift_treasure_chest_convertible",
name: "Rare Valour Rift Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/1fa9a63667395a35e7399a4579e8707c.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/667082607cf28f1313dfd5d01e6d9fc3.jpg?cv=2"
},
{
item_id: "2148",
type: "boss_easy_treasure_chest_convertible",
name: "Easy Slayer Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/6ee5c376bb53b3f50371c07d773be674.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/96d394df66247f51145322a5eb86fae7.jpg?cv=2"
},
{
item_id: "1949",
type: "rare_toxic_elite_treasure_chest_convertible",
name: "Rare Archduke/Archduchess Toxic Spill Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/cbede8a58f086591c6122869e7ff738b.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/19c012edc76502d75228cb633a949d02.jpg?cv=2"
},
{
item_id: "2373",
type: "chrome_easy_treasure_chest_convertible",
name: "Easy Chrome Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/8745db010060d4deae9d42a640a0bd4b.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/fb12dc3170960e6c374b6b7bfb4ebf75.jpg?cv=2"
},
{
item_id: "3276",
type: "rare_sky_palace_treasure_chest_convertible",
name: "Rare Empyrean Sky Palace Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/4ed290f8c15f451921e8084ebaf9ff08.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/04e6d16c5257fccdb2188078115d06c1.jpg?cv=2"
},
{
item_id: "2164",
type: "rare_boss_elaborate_treasure_chest_convertible",
name: "Rare Elaborate Slayer Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/e009b0db601a9e199d549f3bcc22f85a.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/76866c878d18ba12d821848df2e05367.jpg?cv=2"
},
{
item_id: "1787",
type: "rare_zugzwang_treasure_chest_convertible",
name: "Rare Zugzwang Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/299e49c33014eb9c42ae39bdde528802.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/01e64d5be7ecc17ffe63726dd934bb78.jpg?cv=2"
},
{
item_id: "1768",
type: "rare_catacombs_treasure_chest_convertible",
name: "Rare Acolyte Realm Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/a597670e02750645cf3ebd3027b8187c.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/97bd863de77c17ef63a8af60d7be17cc.jpg?cv=2"
},
{
item_id: "2113",
type: "rare_gnawnia_rift_treasure_chest_convertible",
name: "Rare Gnawnia Rift Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/5bb5447be9208c22cc9d93a20a02c74b.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/4c4e635b30c9b03f0af860af6fbe7abe.jpg?cv=2"
},
{
item_id: "1953",
type: "toxic_arduous_treasure_chest_convertible",
name: "Grand Duke/Duchess Toxic Spill Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/d184b60491f2541983768386562c48e8.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/fe0b2e5860b2eb9acf04b95e0ae5cd4b.jpg?cv=2"
},
{
item_id: "1800",
type: "whisker_woods_treasure_chest_convertible",
name: "Whisker Woods Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/8a077d726e1f0c212c791f1ecbf815b7.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/c1e651781cd9cc44a5123df59f51c777.jpg?cv=2"
},
{
item_id: "1791",
type: "shelder_treasure_chest_convertible",
name: "Shelder Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/c7e0328ce7eedcdba4079f50d2757641.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/80860865777e437c19e510b0023a6782.jpg?cv=2"
},
{
item_id: "2851",
type: "chrome_boss_elite_treasure_chest_convertible",
name: "Elite Chrome Slayer Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/2011f0ca921c9a08c08ec85f70302e7d.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/5f6a43f7c61dccfa62f6dbea15692e37.jpg?cv=2"
},
{
item_id: "2152",
type: "boss_medium_treasure_chest_convertible",
name: "Medium Slayer Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/19729f80ffa2ac4e028fe1d751069cbd.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/eadd614bf7533e48dc636b4189a9310b.jpg?cv=2"
},
{
item_id: "2294",
type: "rare_fort_rox_treasure_chest_convertible",
name: "Rare Fort Rox Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/9c89170d8c02b024d6dd30f6e357cdd1.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/e6c58b81a7d3f4eca4de122736603e52.jpg?cv=2"
},
{
item_id: "2129",
type: "rare_relic_treasure_chest_convertible",
name: "Rare Golden Jade Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/a981a23aacf4b9a240594d2577085333.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/c4ad1d432036e2de5dc1343a0aa88ec2.jpg?cv=2"
},
{
item_id: "3329",
type: "rare_boss_elite_2021_treasure_chest_convertible",
name: "Rare Elite Slayer Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/f1c2fc451efa4d6b722c0631eb0ef22f.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/a4dfa0c872880dd6f578868d2a3733ad.jpg?cv=2"
},
{
item_id: "2353",
type: "bristle_woods_rift_treasure_chest_convertible",
name: "Bristle Woods Rift Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/958c089bb5d7d2cbc397696456cae621.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/2267b2011bbb4a4c509e924eebbbf882.jpg?cv=2"
},
{
item_id: "2850",
type: "chrome_boss_elaborate_treasure_chest_convertible",
name: "Elaborate Chrome Slayer Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/381f3ec8ae981e36255e01a4287c4a54.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/adbe2eb86a9b5e6531987dc57f28008c.jpg?cv=2"
},
{
item_id: "2112",
type: "rare_furoma_rift_treasure_chest_convertible",
name: "Rare Furoma Rift Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/c88837d24724b719572cd3c11781c504.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/7283dd87f67193f258c523260167368b.jpg?cv=2"
},
{
item_id: "1786",
type: "rare_whisker_woods_treasure_chest_convertible",
name: "Rare Whisker Woods Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/fa20a6be718d88b28b47df6b6c5ae7ac.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/b4307f0b9f02aa4e8641a64475e313b7.jpg?cv=2"
},
{
item_id: "1769",
type: "rare_digby_treasure_chest_convertible",
name: "Rare Digby Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/680784952415b493592238b287007028.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/73d1569a239a8afb27870f443bd5e91d.jpg?cv=2"
},
{
item_id: "1749",
type: "digby_treasure_chest_convertible",
name: "Digby Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/6905bfdaa16b360bf992171a7f3dd9cf.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/49d836d43555f7759c9e43582ad7e202.jpg?cv=2"
},
{
item_id: "1925",
type: "rare_labyrinth_treasure_chest_convertible",
name: "Rare Labyrinth Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/282954a6ffd085428ec3acf62272b25f.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/ddaaba37490bba81f2d2f8637b56f9d3.jpg?cv=2"
},
{
item_id: "2827",
type: "rare_geyser_dweller_treasure_chest_convertible",
name: "Rare Queso Geyser Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/8bf68b531d56b5aec061ff87c3985733.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/545c7f57c37a9f50c2fe562b44336285.jpg?cv=2"
},
{
item_id: "1972",
type: "large_rainbow_treasure_chest_convertible",
name: "Large Rainbow Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/ef598ac876bf945a8b1e59b6496a0f51.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/5db48a3288624b94dfdfdf45a3fd9f72.jpg?cv=2"
},
{
item_id: "1773",
type: "rare_fungal_cavern_treasure_chest_convertible",
name: "Rare Fungal Cavern Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/9a4299da908db8f4651a41eea9a473dd.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/329f7d538c61ab085c8ce8b39bba054f.jpg?cv=2"
},
{
item_id: "2108",
type: "furoma_rift_treasure_chest_convertible",
name: "Furoma Rift Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/5c9f5d466ccc7486bd00d424f03d93cb.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/91dcc7e1c71f8a5c5b7cbab104011daf.jpg?cv=2"
},
{
item_id: "1948",
type: "rare_toxic_elaborate_treasure_chest_convertible",
name: "Rare Duke/Duchess Toxic Spill Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/a1dd8cb4b65cd66a262d51c3da9a21a7.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/e2df6d2bf6f07e4e3cf1b114a70baf52.jpg?cv=2"
},
{
item_id: "2372",
type: "chrome_arduous_treasure_chest_convertible",
name: "Arduous Chrome Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/182c8a6dca3c7568d969e80e8eb82538.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/dc65a626643ac4d63b2e910128d00632.jpg?cv=2"
},
{
item_id: "1765",
type: "muridae_treasure_chest_convertible",
name: "Muridae Protector's Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/327f73b66cd3a91af6a47dc23e499144.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/87be3fbcc3a11e942ab96f0fb65268ee.jpg?cv=2"
},
{
item_id: "2149",
type: "boss_elaborate_treasure_chest_convertible",
name: "Elaborate Slayer Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/642693091427aed5e29dc63a4022fbba.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/ce1cb595714964e5878e4d987ed05c31.jpg?cv=2"
},
{
item_id: "1781",
type: "rare_riftwalker_treasure_chest_convertible",
name: "Rare Rift Walker Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/7135f3bc2abbf882fe7468689573e73a.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/689929bc0f7a5691cc9a1f18817e6134.jpg?cv=2"
},
{
item_id: "2379",
type: "rare_chrome_arduous_treasure_chest_convertible",
name: "Rare Arduous Chrome Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/1b5d03ed3e506c5db96c67fa2cbb4f81.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/c40c899d87d88b5e9d533ed970a04c32.jpg?cv=2"
},
{
item_id: "2380",
type: "rare_chrome_easy_treasure_chest_convertible",
name: "Rare Easy Chrome Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/1fa6faae6bc6141a4a4c61144bf3fc2d.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/033f0ba772a33b150c54345377ffda35.jpg?cv=2"
},
{
item_id: "1955",
type: "toxic_elaborate_treasure_chest_convertible",
name: "Duke/Duchess Toxic Spill Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/0a518304c12fc87d0bef55a5d7f111f7.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/9dfb8bd90ee165ec80f744010fa6c821.jpg?cv=2"
},
{
item_id: "2857",
type: "rare_c_boss_elaborate_treasure_chest_convertible",
name: "Rare Elaborate Chrome Slayer Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/2d720871e7bac45e2646f268256059e0.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/34ba3dc86de10ab86e7d9e147b266426.jpg?cv=2"
},
{
item_id: "1778",
type: "rare_living_garden_treasure_chest_f_convertible",
name: "Rare Living Garden Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/7e1c427975ae52f3b34a2a0ba2e8e99b.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/3ce4c751391237a25d60b90a77594e4d.jpg?cv=2"
},
{
item_id: "2292",
type: "fort_rox_treasure_chest_convertible",
name: "Fort Rox Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/6d365b0ead9a46e2b6569c4840530c98.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/7ca6ce519ef350d6ff88449e8dea8552.jpg?cv=2"
},
{
item_id: "1754",
type: "fungal_cavern_treasure_chest_convertible",
name: "Fungal Cavern Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/15624b2a37a6dacf3d7248ec503d9634.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/c49a0137beb33fe0ddf4b554d814a8c6.jpg?cv=2"
},
{
item_id: "2355",
type: "rare_bristle_woods_rift_treasure_chest_convertible",
name: "Rare Bristle Woods Rift Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/b8cf984566b240c11dcfac21c48eecb7.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/a01e3f040f7d085806bd7eafff1d16f6.jpg?cv=2"
},
{
item_id: "1762",
type: "living_garden_treasure_chest_f_convertible",
name: "Living Garden Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/8daa67ef7fba125eaa0b098d682bb7a8.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/f23dc73c1dd1f563c602f477c0a480ed.jpg?cv=2"
},
{
item_id: "2375",
type: "chrome_elite_treasure_chest_convertible",
name: "Elite Chrome Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/043d5183550d5b643f3ebdda5ef3a7e0.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/313df1e311b4f82a4bc06e488c73a8d3.jpg?cv=2"
},
{
item_id: "1774",
type: "rare_gnawnia_treasure_chest_convertible",
name: "Rare Gnawnia Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/23ba20f4e3efa129697f87b3fd776500.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/23e02c08a04bf8b1b8a724b36c1056a0.jpg?cv=2"
},
{
item_id: "1975",
type: "rare_giant_rainbow_treasure_chest_convertible",
name: "Rare Giant Rainbow Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/bcefcda9a9ab1b732c4b56cf76ab3de3.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/04a6fcdc06c6d40049395ac8d9182fe3.jpg?cv=2"
},
{
item_id: "2162",
type: "rare_boss_arduous_treasure_chest_convertible",
name: "Rare Arduous Slayer Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/ca01cc66c88804ff9845e1aeef252463.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/ae1ada8763456ee4ede9bc22b84ce80d.jpg?cv=2"
},
{
item_id: "2477",
type: "moussu_picchu_treasure_chest_convertible",
name: "Moussu Picchu Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/088e09fad53ce7138f2b4298774ca9d4.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/3f9645e5d302f8846da008d0dee260bc.jpg?cv=2"
},
{
item_id: "2358",
type: "riftstalker_treasure_chest_convertible",
name: "Rift Stalker Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/97a2f51f59db3317183c7492d4789d7a.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/726987d7ea120ffe4be72ade6fa09655.jpg?cv=2"
},
{
item_id: "2860",
type: "rare_c_boss_medium_treasure_chest_convertible",
name: "Rare Medium Chrome Slayer Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/b902e5f1c766e08b5538e8d3842ded3e.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/6770592940531649d5f6e4138f9cf70b.jpg?cv=2"
},
{
item_id: "3322",
type: "boss_elite_2021_treasure_chest_convertible",
name: "Elite Slayer Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/c2aaaecd4fcf5302401e91a36624403a.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/181b01c3b4443ae1d2df1d9c858dd8ab.jpg?cv=2"
},
{
item_id: "2163",
type: "rare_boss_easy_treasure_chest_convertible",
name: "Rare Easy Slayer Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/3522c5618238a73270dccf79bb8b1df7.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/83037b98d73b44592ba5d70997e47db2.jpg?cv=2"
},
{
item_id: "1759",
type: "icebreaker_treasure_chest_convertible",
name: "Icebreaker Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/d87ffbef4f6b290b18ba6c16ca8d3194.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/b7ef8bdc6382be947f679184fd0df03d.jpg?cv=2"
},
{
item_id: "2933",
type: "rare_gilded_coin_treasure_chest_convertible",
name: "Rare Gilded Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/6f31b4f515d7bb9342c5a5f073b6754a.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/7e3548546b45be03b9f0340b4cf8d2bd.jpg?cv=2"
},
{
item_id: "1923",
type: "labyrinth_treasure_chest_convertible",
name: "Labyrinth Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/5cc3f59a329f8bf57c01a1e3af552aff.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/6cee63fe4b6d18edcaf18c22f77e1a9c.jpg?cv=2"
},
{
item_id: "3174",
type: "birthday_2021_treasure_chest_convertible",
name: "Birthday Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/862be2f2a3844f0fe1b5f5447bb1f091.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/2e91c3cfe8d3a14f552b062199188f90.jpg?cv=2"
},
{
item_id: "1958",
type: "toxic_medium_treasure_chest_convertible",
name: "Lord/Lady Toxic Spill Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/3b471f8bb66ae0ef2804f2469652d192.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/0764347f9e94b89bda029fcf5d6dd73f.jpg?cv=2"
},
{
item_id: "2118",
type: "whisker_woods_rift_treasure_chest_convertible",
name: "Whisker Woods Rift Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/85ad1965de705b29d9a9e3ed14096492.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/c2584592958202e3e96d01f69b3462e8.jpg?cv=2"
},
{
item_id: "2374",
type: "chrome_elaborate_treasure_chest_convertible",
name: "Elaborate Chrome Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/e74dc938da94654d14ab0c88cb0f1bf8.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/5161475c9c72ef3c92e87f01490fdd27.jpg?cv=2"
},
{
item_id: "2636",
type: "rare_queso_canyoneer_treasure_chest_convertible",
name: "Rare Queso Canyoneer Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/f16128354a4aaed4c66f918a61ecb0dd.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/09dbb9a25b055498270f4179f34b6093.jpg?cv=2"
},
{
item_id: "3046",
type: "sky_pirate_treasure_chest_convertible",
name: "Sky Pirate Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/6b9e32b50d97f1ea83ab62cc59385494.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/7aabd8d90647265e59d6b97f14eafb52.jpg?cv=2"
},
{
item_id: "1978",
type: "small_rainbow_treasure_chest_convertible",
name: "Small Rainbow Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/f7b0e361a29f85abd9a416cf1e60580f.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/6c8be7aa2522e226e9f3248e8da364a0.jpg?cv=2"
},
{
item_id: "3197",
type: "valour_rift_treasure_chest_convertible",
name: "Valour Rift Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/5ed09417864c04bd7545d14d6d43d5fe.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/ef95ed0d16d556a6a39c860792dc1cd6.jpg?cv=2"
},
{
item_id: "1796",
type: "undead_treasure_chest_convertible",
name: "Mousoleum Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/4ed7ce8f5fe67e4da9a6900c3e31e514.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/8991784adaba59aac2fbdd7986541d5a.jpg?cv=2"
},
{
item_id: "2856",
type: "rare_c_boss_easy_treasure_chest_convertible",
name: "Rare Easy Chrome Slayer Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/73a8268e9618dc163130c885cf1cac54.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/4380d9c3245297a5e3db793914aff2de.jpg?cv=2"
},
{
item_id: "1954",
type: "toxic_easy_treasure_chest_convertible",
name: "Hero Toxic Spill Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/daaa65c5afcaf64ab5b2fce4fcb8d01f.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/0c4abba98aefafab7330096441f80990.jpg?cv=2"
},
{
item_id: "2381",
type: "rare_chrome_elaborate_treasure_chest_convertible",
name: "Rare Elaborate Chrome Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/2ab88ba49e87c596c9f709d5cd95f1be.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/8026ef28b7b96bf4b974a07bfff3712e.jpg?cv=2"
},
{
item_id: "2417",
type: "rare_warpath_treasure_chest_convertible",
name: "Rare Warpath Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/b08fb5a5cf8282507702f53612618691.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/3421aa2c2043e4b8e2bf7de69f898c9d.jpg?cv=2"
},
{
item_id: "2114",
type: "rare_whisker_woods_rift_treasure_chest_convertible",
name: "Rare Whisker Woods Rift Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/3f03fb40819702bfff6b73b8f1cf583d.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/ca6439f88816352c9083e34c4b06b2b8.jpg?cv=2"
},
{
item_id: "1780",
type: "rare_muridae_treasure_chest_convertible",
name: "Rare Muridae Protector's Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/bcc138eb54022f2c548862d301b73e62.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/e76916ab5798ea92775ca73445e70fb5.jpg?cv=2"
},
{
item_id: "2479",
type: "rare_lightning_slayer_chest_convertible",
name: "Rare Lightning Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/fc05f87911e737e2576147b68be4e59b.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/6059d6d3234ef000bec1c413f67e4443.jpg?cv=2"
},
{
item_id: "2480",
type: "rare_moussu_picchu_treasure_chest_convertible",
name: "Rare Moussu Picchu Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/33e20a4bb9def45cc4508519ae0c169f.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/08e3dff02d620d4039826633f3758913.jpg?cv=2"
},
{
item_id: "1756",
type: "gnawnia_treasure_chest_convertible",
name: "Gnawnia Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/0e7e2f3a82543bf9a38c3fc0fa1b7012.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/016a15a5e300a79e65a7f463f5a237c1.jpg?cv=2"
},
{
item_id: "2855",
type: "rare_c_boss_arduous_treasure_chest_convertible",
name: "Rare Arduous Chrome Slayer Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/64c1dab2d2a07b3ef1e04758c92d45ae.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/a3b923245e160fba257b79ddbb8fa063.jpg?cv=2"
},
{
item_id: "2382",
type: "rare_chrome_elite_treasure_chest_convertible",
name: "Rare Elite Chrome Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/95d2bd396f02d15a7edd3c438d23d71b.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/11372bb85135a2e37c5a0f5af7be55c7.jpg?cv=2"
},
{
item_id: "1957",
type: "toxic_hard_treasure_chest_convertible",
name: "Count/Countess Toxic Spill Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/d6c71f5c98951c2a8e6436fc85405c3f.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/0a0217b4010707b6b7aaee374d3e9151.jpg?cv=2"
},
{
item_id: "1783",
type: "rare_sunken_city_treasure_chest_convertible",
name: "Rare Sunken City Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/c5c6e22e9b5fa3fd351c48abd1c63b2e.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/f061b094c20ae962b096393071a9868c.jpg?cv=2"
},
{
item_id: "2926",
type: "gilded_coin_treasure_chest_convertible",
name: "Gilded Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/a4b0939e2b28aec5585cb0046ffda21f.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/a4d4c5610d5e47029d273a1998aa6130.jpg?cv=2"
},
{
item_id: "1977",
type: "rare_small_rainbow_treasure_chest_convertible",
name: "Rare Small Rainbow Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/97226888c57c11c94ce41ec04350ff76.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/d710f5692a6e18e3fde2718e13e4f514.jpg?cv=2"
},
{
item_id: "2377",
type: "chrome_medium_treasure_chest_convertible",
name: "Medium Chrome Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/b3433b218620f18ea8c8c787ab386095.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/d00c0cba1abc043412784ad72a8d6380.jpg?cv=2"
},
{
item_id: "1760",
type: "isles_treasure_chest_convertible",
name: "Tribal Isles Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/81bbeec4071518f10825aa152bc2ab6d.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/1c08475b861e27b1b3f26942ee594844.jpg?cv=2"
},
{
item_id: "2635",
type: "queso_canyoneer_treasure_chest_convertible",
name: "Queso Canyoneer Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/1fbe8f68e8085247e86ce50c92311e29.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/09850b379da18eefe098b42d8b3dc18c.jpg?cv=2"
},
{
item_id: "2419",
type: "warpath_treasure_chest_convertible",
name: "Warpath Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/8f3702e1c3e771deb13cd0ad13e903fb.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/a853f2e29fb37db6b0f191e766b1bc3d.jpg?cv=2"
},
{
item_id: "1777",
type: "rare_isles_treasure_chest_convertible",
name: "Rare Tribal Isles Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/9e3ee93888c30530d4adb81d243ca0ea.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/d222b32f01a3619d9924897e64fe2a51.jpg?cv=2"
},
{
item_id: "2858",
type: "rare_c_boss_elite_treasure_chest_convertible",
name: "Rare Elite Chrome Slayer Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/d92d923e382c2f85c11a53805f839b42.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/69994204e187a4f6d6e881643dc83ec8.jpg?cv=2"
},
{
item_id: "2474",
type: "lightning_slayer_chest_convertible",
name: "Lightning Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/9260cc3d492d7cf2b4d830da86a1077a.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/7d61f3fb6f9770ce5580e89eff70cff1.jpg?cv=2"
},
{
item_id: "1782",
type: "rare_shelder_treasure_chest_convertible",
name: "Rare Shelder Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/909703f7914acf4f56619f00ea8f34f6.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/94b0d33a8835b13e1015717bdd53cac4.jpg?cv=2"
},
{
item_id: "2383",
type: "rare_chrome_hard_treasure_chest_convertible",
name: "Rare Hard Chrome Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/f85036b673ae33160b0a01ceaa119bba.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/71671923917fefe6289bb843ad05f627.jpg?cv=2"
},
{
item_id: "1956",
type: "toxic_elite_treasure_chest_convertible",
name: "Archduke/Archduchess Toxic Spill Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/48096c7093a4f162430fa19b92b9ed56.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/6a4fc748d42dd5d80d5c35c7bda576ff.jpg?cv=2"
},
{
item_id: "2356",
type: "rare_riftstalker_treasure_chest_convertible",
name: "Rare Rift Stalker Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/ef6e0087c73c07973c6669acab55470c.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/f34429c2dcf9beedf462be2de096a0e2.jpg?cv=2"
},
{
item_id: "2131",
type: "relic_treasure_chest_convertible",
name: "Golden Jade Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/6c1cc6a113fc47a18201139d464e84f1.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/a1ad68b8ad8d59dd0e232cf346723379.jpg?cv=2"
},
{
item_id: "2166",
type: "rare_boss_hard_treasure_chest_convertible",
name: "Rare Hard Slayer Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/cf9d338aa3cfe8fcc1961cdbf062d823.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/6d65ef05808af3bc199e64fa46fe9f42.jpg?cv=2"
},
{
item_id: "2849",
type: "chrome_boss_easy_treasure_chest_convertible",
name: "Easy Chrome Slayer Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/1894cf461080f21acb640c5146a3b1ce.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/3145835514d0db0614eb94144d2df9db.jpg?cv=2"
},
{
item_id: "1789",
type: "riftwalker_treasure_chest_convertible",
name: "Rift Walker Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/d3622b73b90054dd5fb0d79e43bb88e1.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/4456c640bc6a4cc79b54c124f2d94cbd.jpg?cv=2"
},
{
item_id: "3472",
type: "rare_farming_fishing_treasure_chest_convertible",
name: "Rare Farming and Fishing Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/111553d708150018f3ebe2a60363f6bf.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/7873d5525d8170bf804b1336b277cc66.jpg?cv=2"
},
{
item_id: "3517",
type: "rare_new_years_chest_convertible",
name: "Rare New Year's Party Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/e50dc39ef893ab503e994e4723463e7f.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/bf309a584f3cb8681492af76c49fa2a5.jpg?cv=2"
},
{
item_id: "3043",
type: "rare_sky_pirate_treasure_chest_convertible",
name: "Rare Sky Pirate Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/0cd3a219671a97faa46b926d8f089330.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/f5139940f118e037d425e635dd50d0f2.jpg?cv=2"
},
{
item_id: "2828",
type: "rare_queso_canyon_tour_treasure_chest_convertible",
name: "Rare Queso Canyon Grand Tour Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/4847329e0bd4d88d10a1b08a015e7b3d.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/b0c2ed598a4123b76559951000473176.jpg?cv=2"
},
{
item_id: "3468",
type: "farming_fishing_treasure_chest_convertible",
name: "Farming and Fishing Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/430088aea6927ab9b335229ff4e0856c.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/d40fa4c45af0d4298d4319b0df1259ce.jpg?cv=2"
},
{
item_id: "2853",
type: "chrome_boss_medium_treasure_chest_convertible",
name: "Medium Chrome Slayer Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/0592875b8fb8b7311296a6746afbb610.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/20df0e9352bdf1aa354536013dc34963.jpg?cv=2"
},
{
item_id: "1793",
type: "sunken_city_treasure_chest_convertible",
name: "Sunken City Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/d94d60342c05c03a047276e4fd00aa30.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/6d4918bf73cc4f3561049f9c3e7c7c0c.jpg?cv=2"
},
{
item_id: "1951",
type: "rare_toxic_medium_treasure_chest_convertible",
name: "Rare Lord/Lady Toxic Spill Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/3610d5273f5428915096c7546808ccf1.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/32ffd81dff542f965fd85d22d6b14a9c.jpg?cv=2"
},
{
item_id: "2384",
type: "rare_chrome_medium_treasure_chest_convertible",
name: "Rare Medium Chrome Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/24d6d439aec4a34b14dd60b27e6bf97b.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/6f81f6c744d85317769c67b60f492348.jpg?cv=2"
},
{
item_id: "1947",
type: "rare_toxic_easy_treasure_chest_convertible",
name: "Rare Hero Toxic Spill Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/ac00f2faa54365b2844765b340d22574.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/d506ac1f4a24ab4ad9e90f2462bfbe18.jpg?cv=2"
},
{
item_id: "2111",
type: "rare_burroughs_rift_treasure_chest_convertible",
name: "Rare Burroughs Rift Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/600a69dfa799e167463de668ab713f80.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/59987be8273a66108b4b5fb3eb4e9ddf.jpg?cv=2"
},
{
item_id: "1785",
type: "rare_valour_treasure_chest_convertible",
name: "Rare Valour Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/d8a4463e21792d21596fe37ef17bd23c.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/990ad9ab18067afb3598a6fca0b0ac53.jpg?cv=2"
},
{
item_id: "2147",
type: "boss_arduous_treasure_chest_convertible",
name: "Arduous Slayer Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/b1c40db4112d3478c4b8ab6be5a0f9c0.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/8445676f5354b53d555c06dc3a67c27c.jpg?cv=2"
},
{
item_id: "2110",
type: "gnawnia_rift_treasure_chest_convertible",
name: "Gnawnia Rift Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/72f1761037bfb96c23e41567c96da7bc.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/07b0392d1782e7fe235d6ef4d1019cea.jpg?cv=2"
},
{
item_id: "1946",
type: "rare_toxic_arduous_treasure_chest_convertible",
name: "Rare Grand Duke/Duchess Toxic Spill Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/addea463ca49c1c8991531ee11e17224.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/3a9701ca93f3390c79bfe88c827e8350.jpg?cv=2"
},
{
item_id: "2106",
type: "burroughs_rift_treasure_chest_convertible",
name: "Burroughs Rift Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/32e1b893dc71a5ac7b19c5202b9ea4f8.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/26079e8d8f05be68976f48b66f59675d.jpg?cv=2"
},
{
item_id: "1950",
type: "rare_toxic_hard_treasure_chest_convertible",
name: "Rare Count/Countess Toxic Spill Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/9e589f272f2a6bedf43445515b290dd0.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/e2e21e083b3e62ebc95be860dd04ba5b.jpg?cv=2"
},
{
item_id: "2151",
type: "boss_hard_treasure_chest_convertible",
name: "Hard Slayer Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/998b5e419e5b167a3abaa721708157b2.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/ddb687ceec6569747d99f1b1adae4fba.jpg?cv=2"
},
{
item_id: "2852",
type: "chrome_boss_hard_treasure_chest_convertible",
name: "Hard Chrome Slayer Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/b74213db1ce254a85700e00a9b1ad340.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/b16ba5255436c78859709f3e789d1e3f.jpg?cv=2"
},
{
item_id: "3469",
type: "ff_prelude_treasure_chest_convertible",
name: "Folklore Forest Prelude Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/8fd531683344af8df0c807626fff0863.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/32a66ea1a7b190c7a990c0ce47ebbec3.jpg?cv=2"
},
{
item_id: "1747",
type: "catacombs_treasure_chest_convertible",
name: "Acolyte Realm Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/dd23459ac9209c88b525a3694feda9ac.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/c7eb8cb864c71fb8d815f66fb42e27a2.jpg?cv=2"
},
{
item_id: "3473",
type: "rare_ff_prelude_treasure_chest_convertible",
name: "Rare Folklore Forest Prelude Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/984f054080de530c62f25fff4e82933a.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/4f80b51f850693185675102c87451003.jpg?cv=2"
},
{
item_id: "2848",
type: "chrome_boss_arduous_treasure_chest_convertible",
name: "Arduous Chrome Slayer Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/d06b348388d1d5dbff28690b9d944ab1.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/c63bd45290e57fb85e883e7b23a941ea.jpg?cv=2"
},
{
item_id: "1970",
type: "giant_rainbow_treasure_chest_convertible",
name: "Giant Rainbow Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/377eb3e27b0bfad86f883ed17060d329.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/a4c42ef4d0f03c942f7eb1dfce2ad055.jpg?cv=2"
},
{
item_id: "2167",
type: "rare_boss_medium_treasure_chest_convertible",
name: "Rare Medium Slayer Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/9194420f8a885441b90421b068da9e72.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/447a696fda55a61e713b77c88cc21682.jpg?cv=2"
},
{
item_id: "3611",
type: "beanstalk_treasure_chest_convertible",
name: "Bountiful Beanstalk Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/3faa925e04006aa7cc7aad7f1d24008d.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/f2af11cf591b11dbf571c14cb415cc48.jpg?cv=2"
},
{
item_id: "3614",
type: "rare_beanstalk_treasure_chest_convertible",
name: "Rare Bountiful Beanstalk Treasure Chest",
thumbnail: "https://www.mousehuntgame.com/images/items/convertibles/69339eb720246c6bdb52c9ed69c61153.gif?cv=2",
thumbnail_gray: "https://www.mousehuntgame.com/images/items/collectibles/gray/fcabbb74823de7e0550767d7b19aab64.jpg?cv=2"
}
],
type: "special",
subtype: "treasure_chests",
key: "chests"
},
{
id: "airships",
name: "Airships",
items: [
{
item_id: "3166",
type: "airship_balloon_lny_ox_stat_item",
name: "Year of the Ox Airship Balloon",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/c631a6dcdfc4658481e0c771237e0cc5.gif?cv=2"
},
{
item_id: "3280",
type: "airship_hull_empyrean_stat_item",
name: "Empyrean Airship Hull",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/0d97f641bfe5e3d6cd8673d386c186f2.gif?cv=2"
},
{
item_id: "3253",
type: "airship_hull_chrome_stat_item",
name: "Chrome Cutter Airship Hull",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/c573c1b55d5e4f2a77c8c050ec6df78c.gif?cv=2"
},
{
item_id: "3396",
type: "airship_sail_factory_stat_item",
name: "Factory Airship Sail",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/abc0e9b0f068ac75646ed3dff82de698.gif?cv=2"
},
{
item_id: "3066",
type: "airship_sail_mineral_stat_item",
name: "Glistening Galleon Airship Sail",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/859f3f05821afdfcd48e7510c361e222.gif?cv=2"
},
{
item_id: "3125",
type: "airship_hull_gilded_stat_item",
name: "Gilded Airship Hull",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/01e14f125640e9e7071e61b8b42c3f8b.gif?cv=2"
},
{
item_id: "3061",
type: "airship_hull_plant_stat_item",
name: "Skyflower Felucca Airship Hull",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/3ba754923204e55cf9a841d782f1d542.gif?cv=2"
},
{
item_id: "3124",
type: "airship_balloon_gilded_stat_item",
name: "Gilded Airship Balloon",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/a4d1ad7b0440a43d900e885b6a530541.gif?cv=2"
},
{
item_id: "3348",
type: "airship_hull_holiday_express_stat_item",
name: "Holiday Express Airship Hull",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/323554ef5854f708d6cdb81fefbc2d8a.gif?cv=2"
},
{
item_id: "3411",
type: "airship_sail_marzipan_stat_item",
name: "Marzipan Airship Sail",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/57fc7c5d110d4f9ab2dd8eb6b752f6d2.gif?cv=2"
},
{
item_id: "3295",
type: "airship_sail_gloomy_galleon_stat_item",
name: "Gloomy Galleon Airship Sail",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/f83c5e17e96171ab20b468945c9224f5.gif?cv=2"
},
{
item_id: "3542",
type: "airship_hull_lny_stat_item",
name: "Lunar New Year Airship Hull",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/1fddb43dbd9a7af7d963530146b3c88f.gif?cv=2"
},
{
item_id: "3543",
type: "airship_sail_lny_stat_item",
name: "Lunar New Year Airship Sail",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/77bffba0748f44880c010867f980e522.gif?cv=2"
},
{
item_id: "3057",
type: "airship_hull_cloud_stat_item",
name: "Cloud Cruiser Airship Hull",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/ef53b3cae4e48723b3707ea4e358f267.gif?cv=2"
},
{
item_id: "3056",
type: "airship_hull_astral_stat_item",
name: "Astral Airship Hull",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/190ea1502ce4aed0a63c20eacad8cb73.gif?cv=2"
},
{
item_id: "3294",
type: "airship_hull_gloomy_galleon_stat_item",
name: "Gloomy Galleon Airship Hull",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/140e5be397888b8b624eb5268fa3c6e4.gif?cv=2"
},
{
item_id: "3410",
type: "airship_hull_marzipan_stat_item",
name: "Marzipan Airship Hull",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/e3e3075e8abd726c7e125a4a3b6cb7c7.gif?cv=2"
},
{
item_id: "3386",
type: "airship_sail_tiger_stat_item",
name: "Year of the Tiger Airship Sail",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/58d18cd3d2106e8d90de45ace9373bd6.gif?cv=2"
},
{
item_id: "3200",
type: "airship_sail_vrift_stat_item",
name: "Valorous Airship Sail",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/5e7068ab6c24c149dda5ed1a2a3cc1ae.gif?cv=2"
},
{
item_id: "3168",
type: "airship_sail_lny_ox_stat_item",
name: "Year of the Ox Airship Sail",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/772c8ef043b1b153c38f689f3824db22.gif?cv=2"
},
{
item_id: "3236",
type: "airship_sail_spring_stat_item",
name: "Springtime Schooner Airship Sail",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/937534f6df9364643aafee7637f0b80b.gif?cv=2"
},
{
item_id: "3349",
type: "airship_hull_new_years_stat_item",
name: "New Year's Airship Hull",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/98476dfa8674251722e50ac1988089d5.gif?cv=2"
},
{
item_id: "3060",
type: "airship_hull_pirate_stat_item",
name: "Pirate Airship Hull",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/5b789dfb29ef7cdc8c91f648968f9bf3.gif?cv=2"
},
{
item_id: "3102",
type: "airship_hull_ghost_ship_stat_item",
name: "Ghost Galleon Airship Hull",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/91b711c897e9279d407527b724e12ec8.gif?cv=2"
},
{
item_id: "3293",
type: "airship_balloon_gloomy_galleon_stat_item",
name: "Gloomy Galleon Airship Balloon",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/c71c21ad769cd8ff952857933f4bf1ee.gif?cv=2"
},
{
item_id: "3051",
type: "airship_balloon_deluxe_stat_item",
name: "Richard's Sky Yacht Airship Balloon",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/e7995da95153f271a9f805ccf091209d.gif?cv=2"
},
{
item_id: "3067",
type: "airship_sail_pirate_stat_item",
name: "Pirate Airship Sail",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/c08491148a6248cf8eab86b86e6b59a8.gif?cv=2"
},
{
item_id: "3477",
type: "airship_balloon_bookmobile_stat_item",
name: "Floating Bookmobile Airship Balloon",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/d1815355fde25669991ea0e540556aa7.gif?cv=2"
},
{
item_id: "3050",
type: "airship_balloon_cloud_stat_item",
name: "Cloud Cruiser Airship Balloon",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/2a8ab5854a005d7a0b190a4016bea2bf.gif?cv=2"
},
{
item_id: "3103",
type: "airship_sail_ghost_ship_stat_item",
name: "Ghost Galleon Airship Sail",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/42a5213167d9b971eeb7b683565f8804.gif?cv=2"
},
{
item_id: "3139",
type: "airship_balloon_winter_stat_item",
name: "Great Winter Hunt Airship Balloon",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/aafcb84ee6624b253852cd98c2cf8ca1.gif?cv=2"
},
{
item_id: "3053",
type: "airship_balloon_pirate_stat_item",
name: "Pirate Airship Balloon",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/171cc0836694ec8817d64670e32fb731.gif?cv=2"
},
{
item_id: "3395",
type: "airship_hull_factory_stat_item",
name: "Factory Airship Hull",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/b0f3a7b98d66837f65c93a24a6af914b.gif?cv=2"
},
{
item_id: "3141",
type: "airship_sail_winter_stat_item",
name: "Great Winter Hunt Airship Sail",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/cb630358ffb2127adb572b97f5611ffa.gif?cv=2"
},
{
item_id: "3252",
type: "airship_balloon_chrome_stat_item",
name: "Chrome Cutter Airship Balloon",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/5b20a2033a06303114906e1b0554aa76.gif?cv=2"
},
{
item_id: "3069",
type: "airship_sail_porcelain_stat_item",
name: "Porcelain Airship Sail",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/b8664cb88b1b843a4f8b47ea14b09fa2.gif?cv=2"
},
{
item_id: "3182",
type: "airship_balloon_birthday_stat_item",
name: "Birthday Airship Balloon",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/3959c1ca24cf7d4e9e14600659fa9fa0.gif?cv=2"
},
{
item_id: "3478",
type: "airship_hull_bookmobile_stat_item",
name: "Floating Bookmobile Airship Hull",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/324ca9aef77d4608bc80515269d9a757.gif?cv=2"
},
{
item_id: "3049",
type: "airship_balloon_astral_stat_item",
name: "Astral Airship Balloon",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/240d099894c054a13faf9d484400a1e2.gif?cv=2"
},
{
item_id: "3198",
type: "airship_balloon_vrift_stat_item",
name: "Valorous Airship Balloon",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/d34a86534f842e9bcfdca6d187f1acf4.gif?cv=2"
},
{
item_id: "3065",
type: "airship_sail_deluxe_stat_item",
name: "Richard's Sky Yacht Airship Sail",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/fa3cfc16fa247962aefb02c2df50571b.gif?cv=2"
},
{
item_id: "3064",
type: "airship_sail_cloud_stat_item",
name: "Cloud Cruiser Airship Sail",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/89a6bdcaddfad8275fa2dbdf9e25e3cf.gif?cv=2"
},
{
item_id: "3199",
type: "airship_hull_vrift_stat_item",
name: "Valorous Airship Hull",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/93d043519f1f00bb9e79404f4190940b.gif?cv=2"
},
{
item_id: "3479",
type: "airship_sail_bookmobile_stat_item",
name: "Floating Bookmobile Airship Sail",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/5f52e0cd80d56a95d40dd61761dfd8c3.gif?cv=2"
},
{
item_id: "3183",
type: "airship_hull_birthday_stat_item",
name: "Birthday Airship Hull",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/815e445a5be74bd5918f442906d43b17.gif?cv=2"
},
{
item_id: "3068",
type: "airship_sail_plant_stat_item",
name: "Skyflower Felucca Airship Sail",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/f601a95675e59f03e5bae97157578a2e.gif?cv=2"
},
{
item_id: "3101",
type: "airship_balloon_ghost_ship_stat_item",
name: "Ghost Galleon Airship Balloon",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/97203a9e9dfe5a5749e3ac4e3a43e391.gif?cv=2"
},
{
item_id: "3140",
type: "airship_hull_winter_stat_item",
name: "Great Winter Hunt Airship Hull",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/5abf49c5b748faf3aaf8bd8794b485a2.gif?cv=2"
},
{
item_id: "3394",
type: "airship_balloon_factory_stat_item",
name: "Factory Airship Balloon",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/98469a65b4bfb6b841a7fc765900c76e.gif?cv=2"
},
{
item_id: "3052",
type: "airship_balloon_mineral_stat_item",
name: "Glistening Galleon Airship Balloon",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/116b83104790fcc05ae53c6d0df69dc3.gif?cv=2"
},
{
item_id: "3235",
type: "airship_hull_spring_stat_item",
name: "Springtime Schooner Airship Hull",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/e66cadfb6a95d2d5f35f8498a219508c.gif?cv=2"
},
{
item_id: "3409",
type: "airship_balloon_marzipan_stat_item",
name: "Marzipan Airship Balloon",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/f4e1878d9a2f4b6088e1f37c4eafd392.gif?cv=2"
},
{
item_id: "3059",
type: "airship_hull_mineral_stat_item",
name: "Glistening Galleon Airship Hull",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/431e75c6b6cc816f70802446fd487d8b.gif?cv=2"
},
{
item_id: "3126",
type: "airship_sail_gilded_stat_item",
name: "Gilded Airship Sail",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/ba27e2efa74496338abea6a290abda8c.gif?cv=2"
},
{
item_id: "3063",
type: "airship_sail_astral_stat_item",
name: "Astral Airship Sail",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/b08ead747835f19a092527fdedc04777.gif?cv=2"
},
{
item_id: "3167",
type: "airship_hull_lny_ox_stat_item",
name: "Year of the Ox Airship Hull",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/01a725bf08f068133586d4521a30dfd9.gif?cv=2"
},
{
item_id: "3055",
type: "airship_balloon_porcelain_stat_item",
name: "Porcelain Airship Balloon",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/1891a607247ec408aabd4d9ce31860c5.gif?cv=2"
},
{
item_id: "3281",
type: "airship_sail_empyrean_stat_item",
name: "Empyrean Airship Sail",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/b8b31f4c9f8a83787bb7d1b7b39c962d.gif?cv=2"
},
{
item_id: "3385",
type: "airship_hull_tiger_stat_item",
name: "Year of the Tiger Airship Hull",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/2ce6a3c200b7fd83fba46d724448cef7.gif?cv=2"
},
{
item_id: "3254",
type: "airship_sail_chrome_stat_item",
name: "Chrome Cutter Airship Sail",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/f45f922e97b11fe21ef74c08dd8185ce.gif?cv=2"
},
{
item_id: "3346",
type: "airship_balloon_holiday_express_stat_item",
name: "Holiday Express Airship Balloon",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/6cff3b93bf28f0e106c31158b29e8e86.gif?cv=2"
},
{
item_id: "3350",
type: "airship_sail_holiday_express_stat_item",
name: "Holiday Express Airship Sail",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/f3b4fb5462c68292d8e4982474cbc002.gif?cv=2"
},
{
item_id: "3184",
type: "airship_sail_birthday_stat_item",
name: "Birthday Airship Sail",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/34dfcc7a7b54618b4c53dac570ac77b0.gif?cv=2"
},
{
item_id: "3351",
type: "airship_sail_new_years_stat_item",
name: "New Year's Airship Sail",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/d4b65ce6df9c52bbfbc60afb55faeff2.gif?cv=2"
},
{
item_id: "3347",
type: "airship_balloon_new_years_stat_item",
name: "New Year's Airship Balloon",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/24788599d5fbaad605b4c9aa0c5c1bcc.gif?cv=2"
},
{
item_id: "3384",
type: "airship_balloon_tiger_stat_item",
name: "Year of the Tiger Airship Balloon",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/d9446e7c07e608a74a7d1587c9cbc189.gif?cv=2"
},
{
item_id: "3279",
type: "airship_balloon_empyrean_stat_item",
name: "Empyrean Airship Balloon",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/9d5d981c7904a86e0ab86418822fe129.gif?cv=2"
},
{
item_id: "3054",
type: "airship_balloon_plant_stat_item",
name: "Skyflower Felucca Airship Balloon",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/138073c593badfb9bcae7dee6a81689a.gif?cv=2"
},
{
item_id: "3541",
type: "airship_balloon_lny_stat_item",
name: "Lunar New Year Airship Balloon",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/4c3e247cdff0e3890a160d038b7cb4f6.gif?cv=2"
},
{
item_id: "3062",
type: "airship_hull_porcelain_stat_item",
name: "Porcelain Airship Hull",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/c4eae7d60189722e1d67bdc59f17fa38.gif?cv=2"
},
{
item_id: "3058",
type: "airship_hull_deluxe_stat_item",
name: "Richard's Sky Yacht Airship Hull",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/4a6f8e097cd8f835d5e10910f2225783.gif?cv=2"
},
{
item_id: "3234",
type: "airship_balloon_spring_stat_item",
name: "Springtime Schooner Airship Balloon",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/951f009629deb210f74ab3127ddfb2ab.gif?cv=2"
}
],
type: "special",
subtype: "cosmetics",
key: "airships"
},
{
id: "equipment",
name: "Equipment",
items: [
{
item_id: 3418,
type: "chrome_codex_stat_item",
name: "Chrome Codex",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/transparent_thumb/9e93cfb618d3bfd87661d8ff8f099052.png?cv=2"
},
{
item_id: 2888,
type: "codex_of_valor_bard_page_stat_item",
name: "Codex of Valour: Bard Page",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/transparent_thumb/3c483f6680a30026e7107df802d1f4ce.png?cv=2"
},
{
item_id: 2889,
type: "codex_of_valor_dust_page_stat_item",
name: "Codex of Valour: Dusty Page",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/transparent_thumb/c983a0437e2409b0a2296cb5f9809ef3.png?cv=2"
},
{
item_id: 2890,
type: "codex_of_valor_eclipse_page_stat_item",
name: "Codex of Valour: Eclipse Page",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/transparent_thumb/5dde79954a905480572d954a3bff3208.png?cv=2"
},
{
item_id: 2891,
type: "codex_of_valor_magic_page_stat_item",
name: "Codex of Valour: Magic Page",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/transparent_thumb/79f69339aa1bca5c678ea754424052fe.png?cv=2"
},
{
item_id: 2892,
type: "codex_of_valor_melee_page_stat_item",
name: "Codex of Valour: Melee Page",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/transparent_thumb/648da7cd68ec4cdebaa4244df0716c7f.png?cv=2"
},
{
item_id: 2893,
type: "codex_of_valor_nobility_page_stat_item",
name: "Codex of Valour: Noble Page",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/transparent_thumb/8d0b3fe7261c8d121c302992ebe8ebae.png?cv=2"
},
{
item_id: 2894,
type: "codex_of_valor_puppetry_page_stat_item",
name: "Codex of Valour: Puppetry Page",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/transparent_thumb/cff33d01270826ccd4e619b6e969184e.png?cv=2"
},
{
item_id: 2895,
type: "codex_of_valor_thievery_page_stat_item",
name: "Codex of Valour: Thievery Page",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/transparent_thumb/5acc2cc5a1594204bf91fda1b2e416cb.png?cv=2"
},
{
item_id: 2426,
type: "moussu_picchu_fealty_stat_item",
name: "Climbing Boots of Fealty",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/transparent_thumb/95fb3ea7e1ed68bea4393b968279ea4b.png?cv=2"
},
{
item_id: 2428,
type: "moussu_picchu_tech_stat_item",
name: "Climbing Grapnel of Tech",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/transparent_thumb/01db012fdbc68b151f913c29133d77ca.png?cv=2"
},
{
item_id: 2427,
type: "moussu_picchu_scholar_stat_item",
name: "Climbing Vine of Scholars",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/transparent_thumb/a708b8b126f67a55f509dba142aef998.png?cv=2"
},
{
item_id: 889,
type: "iceberg_drill_level_four_stat_item",
name: "Diamond Ice Drill",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/7ae345b6f2bde9a47e662b6a750d627c.gif?cv=2"
},
{
item_id: 3271,
type: "empyrean_codex_stat_item",
name: "Empyrean Codex",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/transparent_thumb/5392f862aaed731800d8bee0c8094395.png?cv=2"
},
{
item_id: 3255,
type: "high_altitude_license_stat_item",
name: "High Altitude Flight License",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/transparent_thumb/a672ac78ebc5db9c51a0aa356fc6b3c0.png?cv=2"
},
{
item_id: 890,
type: "iceberg_drill_level_one_stat_item",
name: "Ice Drill Mk. I",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/61e2718c5a6f5e092c89bb9620d1c6e9.gif?cv=2"
},
{
item_id: 892,
type: "iceberg_drill_level_two_stat_item",
name: "Ice Drill Mk. II",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/e703b61f46f71e7823c11d883aa2b887.gif?cv=2"
},
{
item_id: 891,
type: "iceberg_drill_level_three_stat_item",
name: "Ice Drill Mk. III",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/01ef6c31b2cd160f1bf49868cae51d02.gif?cv=2"
},
{
item_id: 1912,
type: "labyrinth_lantern",
name: "Labyrinth Lantern",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/transparent_thumb/d1c4774c7afebe379bef83d30b81f069.png?cv=2"
},
{
item_id: 1334,
type: "large_waste_barrel_stat_item",
name: "Large Refining Barrel",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/transparent_thumb/fc76ba2c71538601379542e747e2e581.png?cv=2"
},
{
item_id: 1546,
type: "null_gauntlet_stat_item",
name: "Null Gauntlet",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/transparent_thumb/31165dbf6b6db915f6973f44b251f866.png?cv=2"
},
{
item_id: 1525,
type: "marketplace_sell_regal_display_case_collectible",
name: "Regal Marketplace Display Case",
thumbnail: "https://www.mousehuntgame.com/images/items/collectibles/762c3b06c27fc0469728e200a66a4ecf.jpg?cv=2"
},
{
item_id: 1524,
type: "marketplace_buy_regal_stool_collectible",
name: "Regal Marketplace Stool",
thumbnail: "https://www.mousehuntgame.com/images/items/collectibles/c85a2f3dee19e25eb27e1cbba052e256.jpg?cv=2"
},
{
item_id: 2880,
type: "rift_chronometer_stat_item",
name: "Rift Chronometer",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/transparent_thumb/210796b9e766d0c2e3f5133446b3f874.png?cv=2"
},
{
item_id: 2335,
type: "rift_luck_codex_stat_item",
name: "Riftstalker Codex",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/transparent_thumb/5aac08c099e23916f710c99f7817c89a.png?cv=2"
},
{
item_id: 528,
type: "desert_warpath_victory_stat_item",
name: "Warpath Victory",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/85fdfa73d10ab54dd0ff5262502a0ebc.gif?cv=2"
}
],
type: "special",
subtype: "equipment",
key: "equipment"
},
{
id: "currency",
name: "Currency",
items: [
{
item_id: 2837,
type: "amber_queso_stat_item",
name: "Solidified Amber Queso",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/transparent_thumb/2c9ee9d04b52417619c801bbd739d8bd.png?cv=2"
},
{
item_id: 2217,
type: "blood_stone_stat_item",
name: "Bloodstone",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/transparent_thumb/0d56bbd0ac94ef0889eacd7c527981cd.png?cv=2"
},
{
item_id: 3071,
type: "cloudstone_bangle_stat_item",
name: "Cloudstone Bangle",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/transparent_thumb/8d1699fd300627b4915408b8c8fae60f.png?cv=2"
},
{
item_id: 3448,
type: "crop_coin_stat_item",
name: "Crop Coin",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/transparent_thumb/d684728c0097e077c32ea0ecb211a542.png?cv=2"
},
{
item_id: 2459,
type: "cursed_gold_stat_item",
name: "Cursed Gold",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/transparent_thumb/5954fd7a6c2d880ba4e533c35223b2cf.png?cv=2"
},
{
item_id: 2218,
type: "dawn_dust_stat_item",
name: "Dawn Dust",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/transparent_thumb/2f8b7e0490ccb116b0a12598314705c0.png?cv=2"
},
{
item_id: 887,
type: "diamond_ice_drill_tip_stat_item",
name: "Diamond Drill Bits",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/2aa7b95c589e5c0deacc3d225a592d61.gif?cv=2"
},
{
item_id: 2219,
type: "droid_bird_stat_item",
name: "Animatronic Bird",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/transparent_thumb/a6daf326f639ef94cbde88c13fda5945.png?cv=2"
},
{
item_id: 3272,
type: "empyrean_seal_stat_item",
name: "Empyrean Seal",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/transparent_thumb/a53a5b3c32ff2c56ad8b5b0dba86a48e.png?cv=2"
},
{
item_id: 3072,
type: "enchanted_wing_stat_item",
name: "Enchanted Wing",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/transparent_thumb/1de12fa4180e565837d6195988c79dfc.png?cv=2"
},
{
item_id: 3075,
type: "floating_trap_upgrade_stat_item",
name: "Adorned Empyrean Jewel",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/transparent_thumb/2f116b49f7aebb66942a4785c86ec984.png?cv=2"
},
{
item_id: 1528,
type: "flour_stat_item",
name: "Packet of Flour",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/transparent_thumb/4df00c7d4fb8f7e8dab472b7d58e412a.png?cv=2"
},
{
item_id: 1175,
type: "fools_gold_stat_item",
name: "Fool's Gold",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/transparent_thumb/f5d48b654963d5ec7e843343f6ea3848.png?cv=2"
},
{
item_id: 2897,
type: "gauntlet_elixir_stat_item",
name: "Gauntlet Elixir",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/transparent_thumb/cea165ab2742a404d120ea18da067d90.png?cv=2"
},
{
item_id: 2936,
type: "gilded_coin_stat_item",
name: "Gilded Coin",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/transparent_thumb/227dd930ce5f7e2f0990bfc1c37564af.png?cv=2"
},
{
item_id: 3449,
type: "gnawbel_prize_stat_item",
name: "Gnawbel Prize for Literature",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/transparent_thumb/8767d5e6f8ed5f4d2a66ae605b545a3f.png?cv=2"
},
{
item_id: 2221,
type: "howlite_stat_item",
name: "Howlite",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/transparent_thumb/c80c6c321bf149e24dfd21a95524270a.png?cv=2"
},
{
item_id: 2838,
type: "hydro_geyser_trap_stat_item",
name: "Queso Thermal Spring",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/transparent_thumb/209ca347c42ff56071ddd50f087a5bb8.png?cv=2"
},
{
item_id: 2839,
type: "magic_cork_dust_stat_item",
name: "Magic Nest Dust",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/transparent_thumb/064127d4a56d4bc22901fed58ea9e58f.png?cv=2"
},
{
item_id: 2618,
type: "nachore_stat_item",
name: "Nachore",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/transparent_thumb/2df50ade4901b247c3a7dc53decc6c02.png?cv=2"
},
{
item_id: 2840,
type: "physical_geyser_trap_stat_item",
name: "Geyser Smolder Stone",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/transparent_thumb/d9e49c728a60992e07a576fb228153d4.png?cv=2"
},
{
item_id: 3453,
type: "pond_penny_stat_item",
name: "Pond Penny",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/transparent_thumb/0d9c27478f6e2a38f683da6ff0d274bd.png?cv=2"
},
{
item_id: 420,
type: "prize_credit_stat_item",
name: "King's Credit",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/transparent_thumb/3409eacfb04b14c822cc263137fe1a6b.png?cv=2"
},
{
item_id: 3273,
type: "raw_ancient_jade_stat_item",
name: "Raw Ancient Jade",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/transparent_thumb/9ada7e603f735bfe5aa0831d98a05828.png?cv=2"
},
{
item_id: 1421,
type: "raw_rift_crystal_stat_item",
name: "Raw Rift Crystal",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/transparent_thumb/e0119c38af3e1fb9b11f7bf2c9fe5e9b.png?cv=2"
},
{
item_id: 1547,
type: "rift_circuitry_stat_item",
name: "Rift Circuitry",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/transparent_thumb/c4a04d04f282d818a9d63c4c9b7e3c02.png?cv=2"
},
{
item_id: 2332,
type: "rift_clockwork_cog_stat_item",
name: "Clockwork Cog",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/transparent_thumb/21f96481feb237aca6c2b326b0b935f3.png?cv=2"
},
{
item_id: 2898,
type: "rift_gaunt_upgrade_a_stat_item",
name: "Tower Sigil",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/transparent_thumb/162bc786237b82ee70fb42c254a8ce33.png?cv=2"
},
{
item_id: 2899,
type: "rift_gaunt_upgrade_b_stat_item",
name: "Tower Secrets",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/transparent_thumb/b177168eeec7d2c8c510b56f969cd8a4.png?cv=2"
},
{
item_id: 2339,
type: "rift_sprocket_stat_item",
name: "Tiny Sprocket",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/transparent_thumb/ca9ef31f3109d810916b5fbf0f70271a.png?cv=2"
},
{
item_id: 1511,
type: "sand_dollar_stat_item",
name: "Sand Dollar",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/transparent_thumb/8bac8cfe92d6d835428639e1720b40dd.png?cv=2"
},
{
item_id: 2901,
type: "shade_eclipse_resource_stat_item",
name: "Fragment of the Eclipse",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/transparent_thumb/8337f28a7c4a1e6d6dc5d43c55b4075f.png?cv=2"
},
{
item_id: 2222,
type: "silver_bolt_stat_item",
name: "Silver Bolt",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/transparent_thumb/b9be730eb5bc9e9dd3e6d9c2143511f2.png?cv=2"
},
{
item_id: 3076,
type: "sky_pirate_seal_stat_item",
name: "Sky Pirate Seal",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/transparent_thumb/e6734b18dcb823ab8799d7a794094048.png?cv=2"
},
{
item_id: 3078,
type: "sky_sprocket_stat_item",
name: "Sky Sprocket",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/transparent_thumb/8f8b74266abe018c969275d019d87603.png?cv=2"
},
{
item_id: 3079,
type: "skysoft_silk_stat_item",
name: "Skysoft Silk",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/transparent_thumb/f00a417b8dc3330a07d43a420b7e8cbc.png?cv=2"
},
{
item_id: 2841,
type: "tactical_geyser_trap_stat_item",
name: "Thermal Chisel",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/transparent_thumb/180ffc5a84b80a5fc0f954244dfcca34.png?cv=2"
},
{
item_id: 2902,
type: "tattered_celestial_skin_pattern_stat_item",
name: "Tattered Celestial Skin Pattern",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/transparent_thumb/222dda35ce2389c414b409e3c9a18f3c.png?cv=2"
},
{
item_id: 2340,
type: "temporal_rune_stat_item",
name: "Timesplit Rune",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/transparent_thumb/817a5d8a4a8977d5fd2d6bfa8cfa3ffa.png?cv=2"
},
{
item_id: 2903,
type: "total_eclipse_resource_stat_item",
name: "Core of the Eclipse",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/transparent_thumb/5867a5e073b34417aa0a85435f322782.png?cv=2"
},
{
item_id: 1247,
type: "tournament_token_mega_stat_item",
name: "MEGA Tournament Token",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/transparent_thumb/7d7fede08c84c3d2f6b9216d8ec188e4.png?cv=2"
},
{
item_id: 686,
type: "tournament_token_stat_item",
name: "Tournament Token",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/3f9a85833d0bd665ecfa7a611b4001c3.gif?cv=2"
},
{
item_id: 854,
type: "war_scrap_stat_item",
name: "War Scrap",
thumbnail: "https://www.mousehuntgame.com/images/items/stats/931a03134475b7df6350a2b059b5c8e7.gif?cv=2"
}
],
type: "special",
subtype: "currency",
key: "currency"
},
{
id: "plankrun",
name: "Plankrun Pages",
items: [
{
item_id: "1078",
type: "rift_notes_1_torn_page",
name: "Plankrun's Rift Notes 1",
thumbnail: "https://www.mousehuntgame.com/images/items/torn_pages/21bbdce538747cef71d28e4e07510231.gif?cv=2"
},
{
item_id: "161",
type: "dojo_torn_page",
name: "Plankrun's Dojo Notes",
thumbnail: "https://www.mousehuntgame.com/images/items/torn_pages/5cb229d483050b5b1f80ec920b59adbb.gif?cv=2"
},
{
item_id: "160",
type: "back_cover_torn_page",
name: "Plankrun's Journal Back Cover",
thumbnail: "https://www.mousehuntgame.com/images/items/torn_pages/f35e6a4a74552b97bc0e43319187a57d.gif?cv=2"
},
{
item_id: "1076",
type: "dark_magi_torn_page",
name: "Plankrun's Dark Magi Notes",
thumbnail: "https://www.mousehuntgame.com/images/items/torn_pages/f9f9d8271d716103c55926c06dcf01dd.gif?cv=2"
},
{
item_id: "900",
type: "deep_mouse_torn_page",
name: "Plankrun's Iceberg Notes",
thumbnail: "https://www.mousehuntgame.com/images/items/torn_pages/8c1b907bb3959747419aa45402482cc4.gif?cv=2"
},
{
item_id: "1077",
type: "king_scarab_torn_page",
name: "Plankrun's King Scarab Notes",
thumbnail: "https://www.mousehuntgame.com/images/items/torn_pages/23cd00781604e05a6805e16ee963a9af.gif?cv=2"
},
{
item_id: "1082",
type: "shattered_carmine_2_torn_page",
name: "Plankrun's Shattered Carmine Notes 2",
thumbnail: "https://www.mousehuntgame.com/images/items/torn_pages/8e41de778a3c92a32e869f1e144ad00f.gif?cv=2"
},
{
item_id: "1081",
type: "shattered_carmine_1_torn_page",
name: "Plankrun's Shattered Carmine Notes 1",
thumbnail: "https://www.mousehuntgame.com/images/items/torn_pages/5b80b091ed0dac56f56c472b25fb1b9c.gif?cv=2"
},
{
item_id: "1079",
type: "rift_notes_2_torn_page",
name: "Plankrun's Rift Notes 2",
thumbnail: "https://www.mousehuntgame.com/images/items/torn_pages/f1db0869f17c675712df29f184583b32.gif?cv=2"
},
{
item_id: "1653",
type: "whisker_woods_rift_torn_page",
name: "Plankrun's Whisker Woods Rift Notes",
thumbnail: "https://www.mousehuntgame.com/images/items/torn_pages/76c971eb29ba746121ecaaa10c7defb6.gif?cv=2"
},
{
item_id: "1080",
type: "rift_notes_3_torn_page",
name: "Plankrun's Rift Notes 3",
thumbnail: "https://www.mousehuntgame.com/images/items/torn_pages/c7d17dcb03c82e224517cc916b2c971a.gif?cv=2"
},
{
item_id: "163",
type: "gnawnia_torn_page",
name: "Plankrun's Gnawnia Notes",
thumbnail: "https://www.mousehuntgame.com/images/items/torn_pages/12db753b4cb0fdcdc2cfbbb6b6f9bd06.gif?cv=2"
},
{
item_id: "162",
type: "front_cover_torn_page",
name: "Plankrun's Journal Cover",
thumbnail: "https://www.mousehuntgame.com/images/items/torn_pages/bf51e70097f2a8a25d71bc714582a9bd.gif?cv=2"
}
],
type: "plankrun",
subtype: "general",
key: "plankrun"
}
];
}
});
// src/modules/ultimate-checkmark/settings/index.js
function settings_default10(module) {
const options = [];
ultimate_checkmark_default.sort((a, b) => {
if (a.name < b.name) {
return -1;
}
return 1;
});
ultimate_checkmark_default.forEach((category) => {
options.push({
id: category.id,
name: category.name,
value: getSetting(`ultimate-checkmark-${category.id}`, true)
});
});
addMhuiSetting(
"ultimate-checkmark-categories",
"Ultimate Checkmark",
[],
"Adds more things collect on your Hunter profile.",
module,
{
type: "multi-toggle",
options
}
);
}
var init_settings11 = __esm({
"src/modules/ultimate-checkmark/settings/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
init_ultimate_checkmark();
}
});
// src/modules/ultimate-checkmark/styles.css
var styles_default36;
var init_styles37 = __esm({
"src/modules/ultimate-checkmark/styles.css"() {
styles_default36 = ".hunterProfileItemsView-categoryContent[data-category=chest] .hunterProfileItemsView-categoryContent-item.uncollected,.hunterProfileItemsView-categoryContent[data-category=airships] .hunterProfileItemsView-categoryContent-item.uncollected,.hunterProfileItemsView-categoryContent[data-category=currency] .hunterProfileItemsView-categoryContent-item.uncollected,.hunterProfileItemsView-categoryContent[data-category=equipment] .hunterProfileItemsView-categoryContent-item.uncollected,.hunterProfileItemsView-categoryContent[data-category=plankrun] .hunterProfileItemsView-categoryContent-item.uncollected{filter:grayscale(100%)}.hunterProfileItemsView-categoryContent[data-category=chest] .hunterProfileItemsView-categoryContent-item-padding .itemImage{background-size:contain}\n";
}
});
// src/modules/ultimate-checkmark/index.js
var getItems, getProgress, makeProgressString, makeCategory, makeItem2, makeContent, sendToApi, getItemsFromApi, addCategoryAndItems, isOwnProfile, run, syncWithServer, init40, ultimate_checkmark_default2;
var init_ultimate_checkmark2 = __esm({
"src/modules/ultimate-checkmark/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
init_ultimate_checkmark();
init_settings11();
init_styles37();
getItems = (_0, _1, _2, ..._3) => __async(void 0, [_0, _1, _2, ..._3], function* (required, queryTab, queryTag, allItems = []) {
var _a, _b;
if (!allItems.length) {
const cachedData = sessionGet("ultimate-checkmark") || "{}";
let inventoryData = ((_a = cachedData[queryTab]) == null ? void 0 : _a.data) || null;
const lastCachedTime = ((_b = cachedData[queryTab]) == null ? void 0 : _b.time) || 0;
if (!inventoryData || Date.now() - lastCachedTime > 5 * 60 * 1e3) {
inventoryData = yield doRequest(
"managers/ajax/pages/page.php",
{
page_class: "Inventory",
"page_arguments[legacyMode]": "",
"page_arguments[tab]": queryTab,
"page_arguments[sub_tab]": "false"
}
);
cachedData[queryTab] = {
data: inventoryData,
time: Date.now()
};
sessionSet("ultimate-checkmark", cachedData);
}
const specialTab = inventoryData.page.tabs.find((tab) => queryTab === tab.type);
if (!specialTab || !specialTab.subtabs || !specialTab.subtabs.length || !specialTab.subtabs[0].tags) {
return [];
}
const owned = specialTab.subtabs[0].tags.filter((tag) => queryTag === tag.type);
if (!owned || !owned.length || !owned[0].items) {
return [];
}
allItems = owned[0].items;
}
required.forEach((requiredItem) => {
const ownedItem = allItems.find((i) => i.type === requiredItem.type);
if (!ownedItem) {
allItems.push(requiredItem);
}
});
allItems = allItems.map((item) => {
const requiredItem = required.find((i) => i.type === item.type);
return {
item_id: item.item_id,
// eslint-disable-line camelcase
type: item.type,
name: item.name,
thumbnail: item.thumbnail_gray || item.thumbnail,
// eslint-disable-line camelcase
quantity: item.quantity || 0,
quantity_formatted: item.quantity_formatted || "0",
// eslint-disable-line camelcase
le: !requiredItem
};
});
allItems.sort((a, b) => {
if (a.name < b.name) {
return -1;
}
if (a.name > b.name) {
return 1;
}
return 0;
});
return allItems;
});
getProgress = (items2, required) => {
let le = 0;
let requiredCompleted = 0;
items2.forEach((item) => {
if (item.quantity <= 0) {
return;
}
if (!item.le) {
requiredCompleted++;
} else if (item.le) {
le++;
}
});
return {
checkmark: required.total >= requiredCompleted,
completed: requiredCompleted,
required: required.length,
le
};
};
makeProgressString = (progress) => {
const { completed, required, le } = progress;
let text = `${completed} of ${required}`;
if (le && le > 0) {
text += ` (+${le} LE)`;
}
return text;
};
makeCategory = (category, name, progress) => {
const exists = document.querySelector(`.hunterProfileItemsView-category[data-category="${category}"]`);
if (exists) {
return;
}
const sidebar = document.querySelector(".hunterProfileItemsView-directory");
if (!sidebar) {
return;
}
const catSidebarCategory = makeElement("a", "hunterProfileItemsView-category");
if (progress.completed === progress.required) {
catSidebarCategory.classList.add("complete");
}
catSidebarCategory.title = name;
catSidebarCategory.href = "#";
catSidebarCategory.setAttribute("data-category", category);
catSidebarCategory.addEventListener("click", () => {
hg.views.HunterProfileItemsView.showCategory(category);
return false;
});
const catSidebarCategoryMargin = makeElement("div", "hunterProfileItemsView-category-margin");
makeElement("div", "hunterProfileItemsView-category-name", name, catSidebarCategoryMargin);
makeElement("div", "hunterProfileItemsView-category-progress", makeProgressString(progress), catSidebarCategoryMargin);
makeElement("div", "hunterProfileItemsView-category-status", "", catSidebarCategoryMargin);
catSidebarCategory.append(catSidebarCategoryMargin);
sidebar.append(catSidebarCategory);
};
makeItem2 = (item) => {
const { item_id, type, name, thumbnail, thumbnail_gray, quantity, quantity_formatted, le } = item;
const itemDiv = makeElement("div", "hunterProfileItemsView-categoryContent-item");
if (quantity > 0) {
itemDiv.classList.add("collected");
if (le) {
itemDiv.classList.add("limited_edition");
}
} else {
itemDiv.classList.add("uncollected");
itemDiv.classList.add("hidden");
}
itemDiv.setAttribute("data-id", item_id);
itemDiv.setAttribute("data-type", type);
const itemPadding = makeElement("div", "hunterProfileItemsView-categoryContent-item-padding");
itemPadding.addEventListener("click", () => {
hg.views.ItemView.show(type);
});
const itemImage = makeElement("div", "itemImage");
itemImage.style.backgroundImage = quantity > 0 && thumbnail_gray ? `url(${thumbnail_gray})` : `url(${thumbnail})`;
if (quantity > 0) {
makeElement("div", "quantity", quantity_formatted, itemImage);
}
const itemName = makeElement("div", "hunterProfileItemsView-categoryContent-item-name");
makeElement("span", "", name, itemName);
itemPadding.append(itemImage);
itemPadding.append(itemName);
itemDiv.append(itemPadding);
return itemDiv;
};
makeContent = (id, name, items2, completed) => {
const content = document.querySelector(".hunterProfileItemsView-content-padding");
if (!content) {
return;
}
const categoryDiv = makeElement("div", "hunterProfileItemsView-categoryContent");
if (completed) {
categoryDiv.classList.add("collected");
}
categoryDiv.setAttribute("data-category", id);
const nameDiv = makeElement("div", "hunterProfileItemsView-categoryContent-name", name);
const itemsDiv = document.createElement("div");
items2.sort((a, b) => {
if (a.name < b.name) {
return -1;
}
if (a.name > b.name) {
return 1;
}
return 0;
});
items2.forEach((item) => {
itemsDiv.append(makeItem2(item));
});
categoryDiv.append(nameDiv);
categoryDiv.append(itemsDiv);
content.append(categoryDiv);
};
sendToApi = (type, subtype, items2) => __async(void 0, null, function* () {
items2 = items2.map((item) => {
return {
item_id: item.item_id,
// eslint-disable-line camelcase
type: item.type,
name: item.name,
thumbnail: item.thumbnail.replaceAll("https://www.mousehuntgame.com/images/", ""),
// eslint-disable-line camelcase
quantity: item.quantity,
quantity_formatted: item.quantity_formatted,
// eslint-disable-line camelcase
le: item.le
};
});
yield fetch("https://ultimate-checkmark.mouse.rip/add", {
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({
snuid: user.sn_user_id,
type,
subtype,
items: items2
})
});
});
getItemsFromApi = (userId, type, subtype) => __async(void 0, null, function* () {
userId = "hg_a07516a70978d1dbaf9e29ce638073d9";
const response = yield fetch(`https://ultimate-checkmark.mouse.rip/get/${userId}/${type}/${subtype}`);
const data = yield response.json();
const items2 = JSON.parse(data.items).map((item) => {
return {
item_id: item.item_id,
// eslint-disable-line camelcase
type: item.type,
name: item.name,
thumbnail: `https://www.mousehuntgame.com/images/${item.thumbnail}`,
// eslint-disable-line camelcase
quantity: item.quantity,
quantity_formatted: item.quantity_formatted,
// eslint-disable-line camelcase
le: item.le
};
});
return items2;
});
addCategoryAndItems = (required, type, subtype, key, name, userId = null) => __async(void 0, null, function* () {
const exists = document.querySelector(`.hunterProfileItemsView-categoryContent[data-category="${key}"]`);
if (exists) {
return;
}
let items2;
if (isOwnProfile()) {
items2 = yield getItems(required, type, subtype);
if (syncWithServer) {
sendToApi(type, subtype, items2);
}
} else {
if (!syncWithServer) {
return;
}
items2 = yield getItemsFromApi(userId, type, subtype);
}
const progress = getProgress(items2, required);
makeCategory(key, name, progress);
makeContent(key, name, items2, progress.completed);
return true;
});
isOwnProfile = () => {
const params = hg.utils.PageUtil.getQueryParams();
if (!params || !params.snuid) {
return false;
}
return params.snuid === user.sn_user_id;
};
run = () => __async(void 0, null, function* () {
if (!("hunterprofile" === getCurrentPage() && "items" === getCurrentTab())) {
return;
}
const params = hg.utils.PageUtil.getQueryParams();
if (!params) {
return;
}
let userId = null;
if (!isOwnProfile()) {
if (!syncWithServer) {
return;
}
userId = params.snuid;
}
for (const category of ultimate_checkmark_default) {
if (!getSetting(`ultimate-checkmark-categories-${category.id}`, true)) {
continue;
}
yield addCategoryAndItems(category.items, category.type, category.subtype, category.key, category.name, userId);
}
});
syncWithServer = false;
init40 = () => __async(void 0, null, function* () {
addStyles(styles_default36);
if (getFlag("ultimate-checkmark-sync")) {
syncWithServer = true;
}
onNavigation(run, {
page: "hunterprofile",
tab: "items"
});
});
ultimate_checkmark_default2 = {
id: "ultimate-checkmark",
name: "Ultimate Checkmark",
type: "feature",
default: true,
description: "Adds more things collect on your Hunter profile.",
load: init40,
alwaysLoad: true,
settings: settings_default10
};
}
});
// src/modules/custom-background/gradients.json
var gradients_default;
var init_gradients = __esm({
"src/modules/custom-background/gradients.json"() {
gradients_default = [
{
id: "midnight",
name: "Midnight",
css: "linear-gradient(220.55deg, #565656 0%, #181818 100%)"
},
{
id: "night-in-salem",
name: "Night in Salem",
css: "linear-gradient(#111827, #581c87, #7c3aed)"
},
{
id: "cosmic-twilight",
name: "Cosmic Twilight",
css: "linear-gradient(to right, #0f172a, #581c87, #0f172a)"
},
{
id: "galactic-dusk",
name: "Galactic Dusk",
css: "linear-gradient(220.55deg, #4063bc 0%, #6b0013 100%)"
},
{
id: "emerald-lagoon",
name: "Emerald Lagoon",
css: "radial-gradient(80.99% 100% at 50% 0%, #00ff0a 0%, #36008e 100%), radial-gradient(50% 123.47% at 50% 50%, #efe7c8 0%, #36008e 100%), linear-gradient(301.28deg, #ff006b 0%, #48dd9e 100%), linear-gradient(294.84deg, #5a60e4 0%, #d30000 100%), linear-gradient(52.29deg, #000000 0%, #00ff85 100%), radial-gradient(100% 138.69% at 100% 0%, #0007a5 0%, #ff7a00 100%), radial-gradient(70.41% 100% at 50% 0%, #d5b300 0%, #2200aa 100%)"
},
{
id: "aurora",
name: "Aurora",
css: "radial-gradient(65% 100% at 50% 0%, #00ff94 0%, rgba(0, 255, 148, 0.25) 100%), linear-gradient(230deg, #000000 25%, #170059 100%), linear-gradient(215deg, #ffebb9 10%, #19004e 80%), radial-gradient(100% 245% at 100% 100%, #ffffff 0%, #000353 100%), linear-gradient(125deg, #1400ff 0%, #3a0000 100%), linear-gradient(225deg, #00ebfc 3.7%, #00f0ff 11.4%, #000b6f 55.3%, #001676 64.1%, #001676 75%, #00e1f6 100%, #00ecfd 100%, #001676 100%), linear-gradient(135deg, #00f0ff 0%, #000b6f 2.4%, #00ebfc 20.5%, #001676 35%, #00e1f6 47.2%, #001676 66.8%, #00ecfd 84.9%, #001676 100%)"
},
{
id: "amber-sunrise",
name: "Amber Sunrise",
css: "radial-gradient(circle at center top, #b45309, #fdba74, #9f1239)"
},
{
id: "warm-glow",
name: "Warm Glow",
css: "radial-gradient(at center top, #d1d5db, #c026d3, #ea580c)"
},
{
id: "aqua-depths",
name: "Aqua Depths",
css: "linear-gradient(220.55deg, #24cfc5 0%, #001c63 100%)"
},
{
id: "cobalt-mist",
name: "Cobalt Mist",
css: "linear-gradient(#3951c6, #8896dd)"
},
{
id: "crimson-blush",
name: "Crimson Blush",
css: "linear-gradient(#b9466c, #e3b5c4)"
},
{
id: "emerald-forest",
name: "Emerald Forest",
css: "linear-gradient(#43ac20, #76df53)"
},
{
id: "flamingo-fling",
name: "Flamingo Fling",
css: "linear-gradient(#e84a8c, #f3a5c5)"
},
{
id: "glacial-gleam",
name: "Glacial Gleam",
css: "linear-gradient(220.55deg, #c5edf5 0%, #4a879a 100%)"
},
{
id: "lavender-lustre",
name: "Lavender Lustre",
css: "linear-gradient(#de97f9, #9157ff)"
},
{
id: "mint-surf",
name: "Mint Surf",
css: "linear-gradient(0deg, #08aeea 0%, #2af598 100%)"
},
{
id: "orange-coral",
name: "Orange Coral",
css: "linear-gradient(to top, #fb923c, #fb7185)"
},
{
id: "radiant-rouge",
name: "Radiant Rouge",
css: "linear-gradient(161.15deg, #ffa492 12.73%, #ff2c55 72.95%)"
},
{
id: "sangria-solstice",
name: "Sangria Solstice",
css: "linear-gradient(181deg, #770738, #ddbb90)"
},
{
id: "sea-sky",
name: "Sea Sky",
css: "linear-gradient(to top, #38bdf8, #312e81)"
},
{
id: "skyline-whisper",
name: "Skyline Whisper",
css: "linear-gradient(#53a5df, #a9d2ef)"
},
{
id: "cotton-candy-shores",
name: "Cotton Candy Shores",
css: "linear-gradient(#32c7e5, #f078d5)"
},
{
id: "canary-shine",
name: "Canary Shine",
css: "linear-gradient(220.55deg, #fff500 0%, #ffb800 100%)"
},
{
id: "oahu-sunset",
name: "Oahu Sunset",
css: "linear-gradient(to top, #fb923c, #38bdf8)"
},
{
id: "polaroid-memories",
name: "Polaroid Memories",
css: "linear-gradient(to top, #040308, #ad4a28, #dd723c, #fc7001, #dcb697, #9ba5ae, #3e5879, #020b1a)"
},
{
id: "neon-nights",
name: "Neon Nights",
css: "linear-gradient(#f3b167, #ec38bc, #7303c0, #03001e)"
},
{
id: "soft-metal",
name: "Soft Metal",
css: "conic-gradient(at right top, rgb(199, 210, 254), rgb(71, 85, 105), rgb(199, 210, 254))"
},
{
id: "frosted-orchid",
name: "Frosted Orchid",
css: "linear-gradient(#ecadaf 0%, #e0b6a5 13.54%, #dc8b9d 30.21%, #c05ac9 44.27%, #b865cf 57.81%, #c3a7d9 71.87%, #c5c1e2 84.9%, #c6d8e4 100%)"
},
{
id: "spectral-summer",
name: "Spectral Summer",
css: "linear-gradient(to top, #3f51b1 0%, #5a55ae 13%, #7b5fac 25%, #8f6aae 38%, #a86aa4 50%, #cc6b8e 62%, #f18271 75%, #f3a469 87%, #f7c978 100%)"
},
{
id: "cold-breeze",
name: "Cold Breeze",
css: "conic-gradient(at center bottom, #ffffff, #0ea5e9, #0ea5e9)"
},
{
id: "cyberpop",
name: "Cyberpop",
css: "linear-gradient(135deg, #0e0220 0%, #000000 6px, #e40475 24.8%, #0e0220 35%, #48e0e4 56.3%, #48e0e4 62.4%, #ff00c8 72.9%, rgba(0, 0, 0, 0.86) 78.5%, #48e0e4 100%)"
},
{
id: "rainbow",
name: "Rainbow",
css: "linear-gradient(#e02020 0%, #fa6400 17%, #f7b500 33%, #6dd400 50%, #0091ff 67%, #6236ff 83%, #b620e0 100%)"
},
{
id: "candy-cane-breeze",
name: "Candy Cane Breeze",
css: "radial-gradient(at 30% -5%, #92f2f2, #d6cff1, rgba(255, 255, 255, 0) 25%), radial-gradient(at 50% 70%, #c4f2e5, rgba(255, 255, 255, 0) 30%), radial-gradient(at 70% 0%, #d6cff1, rgba(255, 255, 255, 0) 20%), linear-gradient(75deg, #92f2f2 5%, rgba(255, 255, 255, 0), #a8d0f0, rgba(255, 255, 255, 0), #eed5f2, rgba(255, 255, 255, 0), #d6cff1, rgba(255, 255, 255, 0), #c4f2e5 90%), radial-gradient(at 30% 50%, #92f2f2, rgba(255, 255, 255, 0) 30%), radial-gradient(at 30% 50%, #9cb9fc, rgba(255, 255, 255, 0) 30%), radial-gradient(at 100% 50%, #92f2f2, #c2dcf2, rgba(255, 255, 255, 0) 50%), linear-gradient(115deg, #92f2f2 5%, #a8d0f0 10%, #d6cff1, #eed5f2 20%, #a8d0f0, #a8d0f0 30%, #d6cff1, #c2dcf2 40%, #92f2f2, #a8d0f0 70%)"
},
{
id: "celestial-dreamscape",
name: "Celestial Dreamscape",
css: "radial-gradient(18% 28% at 24% 50%, #cefaff 7%, rgba(7, 58, 255, 0) 100%), radial-gradient(18% 28% at 18% 71%, rgba(255, 255, 255, 0.35) 6%, rgba(7, 58, 255, 0) 100%), radial-gradient(70% 53% at 36% 76%, #73f2ff 0%, rgba(7, 58, 255, 0) 100%), radial-gradient(42% 53% at 15% 94%, #ffffff 7%, rgba(7, 58, 255, 0) 100%), radial-gradient(42% 53% at 34% 72%, #ffffff 7%, rgba(7, 58, 255, 0) 100%), radial-gradient(18% 28% at 35% 87%, #ffffff 7%, rgba(7, 58, 255, 0) 100%), radial-gradient(31% 43% at 7% 98%, #ffffff 24%, rgba(7, 58, 255, 0) 100%), radial-gradient(21% 37% at 72% 23%, rgba(211, 255, 109, 0.61) 24%, rgba(7, 58, 255, 0) 100%), radial-gradient(35% 56% at 91% 74%, rgba(138, 79, 255, 0.96) 9%, rgba(7, 58, 255, 0) 100%), radial-gradient(74% 86% at 67% 38%, rgba(109, 255, 174, 0.96) 24%, rgba(7, 58, 255, 0) 100%), linear-gradient(125deg, #4eb5ff 1%, #4c00fc 100%)"
},
{
id: "dreamy-hues",
name: "Dreamy Hues",
css: "linear-gradient(97.92deg, #bc97c6 0%, #f6d2c8 6.33%, #f5e2c8 12.2%, #bde8d9 21.5%, #e8dfc6 34.83%, #edc7c6 44.22%, #e6bdcf 52.26%, #c7b2e5 60.55%, #b8bfe7 70.29%, #c3e1d3 79.4%, #eedfc5 89.06%, #e5b0c9 94.93%, #b495c5 100.7%)"
},
{
id: "pastel-daydream",
name: "Pastel Daydream",
css: "radial-gradient(at 40% 20%, #ffb87a 0px, rgba(0, 0, 0, 0) 50%), radial-gradient(at 80% 0%, #1fddff 0px, rgba(0, 0, 0, 0) 50%), radial-gradient(at 0% 50%, #fcdee1 0px, rgba(0, 0, 0, 0) 50%), radial-gradient(at 73% 51%, #ff85ad 0px, rgba(0, 0, 0, 0) 50%), radial-gradient(at 0% 100%, #ffb58a 0px, rgba(0, 0, 0, 0) 50%), radial-gradient(at 80% 100%, #6b66ff 0px, rgba(0, 0, 0, 0) 50%), radial-gradient(at 0% 0%, #ff85a7 0px, rgba(0, 0, 0, 0) 50%)"
},
{
id: "rainbows-embrace",
name: "Rainbow's Embrace",
css: "radial-gradient(50% 100% at left -10% top 80%, #db0072, rgba(0, 0, 0, 0)), radial-gradient(50% 100% at left 25% top 60%, #ffe53e, rgba(0, 0, 0, 0)), radial-gradient(50% 100% at left 55% top 40%, #00ffe4, rgba(0, 0, 0, 0)), radial-gradient(50% 100% at left 90% top 20%, #d150ff, rgba(0, 0, 0, 0))"
}
];
}
});
// src/modules/custom-background/settings/index.js
function settings_default11(module) {
const gradientOptions = gradients_default.map((gradient) => ({
name: gradient.name,
value: gradient.id
}));
const options = [
{ name: "Default", value: "default" },
{ name: "Events", value: "group", options: [
{ name: "Birthday", value: "birthday" },
{ name: "Great Winter Hunt", value: "great_winter_hunt" },
{ name: "Halloween", value: "halloween" },
{ name: "Lunar New Year", value: "lunar_new_year" },
{ name: "Spring Egg Hunt", value: "spring_hunt" },
{ name: "Valentine's", value: "valentines" }
] },
{ name: "Color", value: "group", options: [
{ name: "Blue", value: "background-color-blue" },
{ name: "Cyan", value: "background-color-cyan" },
{ name: "Green", value: "background-color-green" },
{ name: "Pink", value: "background-color-pink" },
{ name: "Purple", value: "background-color-purple" },
{ name: "Red", value: "background-color-red" },
{ name: "Faded", value: "background-color-faded" }
] },
{
name: "Gradients",
value: "group",
options: gradientOptions
}
];
addMhuiSetting(
"custom-background",
'Custom Background <a class="mh-improved-custom-bg-preview hidden">Preview</a>',
[options[0]],
"Change the background to an event background or a color.",
module,
{
type: "multi-select",
number: 1,
options
}
);
}
var init_settings12 = __esm({
"src/modules/custom-background/settings/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
init_gradients();
}
});
// src/modules/custom-background/styles.css
var styles_default37;
var init_styles38 = __esm({
"src/modules/custom-background/styles.css"() {
styles_default37 = ".pageFrameView-column.left{box-shadow:inset -10px 0 10px -10px #333}.pageFrameView-column.right{box-shadow:inset 10px 0 10px -10px #333}.pageFrameView .pageFrameView-column:before{background:transparent}body.mh-improved-bg-background-color-blue .pageFrameView-column.right,body.mh-improved-bg-background-color-blue .pageFrameView-column.left{filter:none}body.mh-improved-bg-background-color-cyan .pageFrameView-column.right,body.mh-improved-bg-background-color-cyan .pageFrameView-column.left{filter:hue-rotate(312deg)}body.mh-improved-bg-background-color-green .pageFrameView-column.right,body.mh-improved-bg-background-color-green .pageFrameView-column.left{filter:hue-rotate(266deg)}body.mh-improved-bg-background-color-pink .pageFrameView-column.right,body.mh-improved-bg-background-color-pink .pageFrameView-column.left{filter:hue-rotate(80deg)}body.mh-improved-bg-background-color-purple .pageFrameView-column.right,body.mh-improved-bg-background-color-purple .pageFrameView-column.left{filter:hue-rotate(51deg)}body.mh-improved-bg-background-color-red .pageFrameView-column.right,body.mh-improved-bg-background-color-red .pageFrameView-column.left{filter:hue-rotate(146deg)}body.mh-improved-bg-background-color-faded .pageFrameView-column.right,body.mh-improved-bg-background-color-faded .pageFrameView-column.left{filter:sepia(1)}#mousehunt-improved-settings-feature-custom-background .PagePreferences__settingLabel{position:relative}.mh-improved-custom-bg-preview{position:absolute;top:0;right:225px;bottom:0;display:flex;align-items:center;font-size:14px}.mh-improved-custom-background-gradient-preview{display:grid;grid-template-columns:1fr 1fr;gap:20px;height:80vh;padding-right:10px;margin-right:-10px;overflow:auto}.mh-improved-custom-background-gradient-preview .gradient{display:flex;flex-direction:column;place-content:center space-between;align-items:center;width:100%;height:200px;padding:10px 0;border:1px solid #626262;border-radius:5px}.mh-improved-custom-background-gradient-preview .name{font-size:22px;font-weight:900;color:#fff;text-shadow:0 1px 2px #000}\n";
}
});
// src/modules/custom-background/index.js
var addedClass, addBodyClass2, listenForPreferenceChanges, addPreview, persistBackground, init41, custom_background_default;
var init_custom_background = __esm({
"src/modules/custom-background/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
init_gradients();
init_settings12();
init_styles38();
addedClass = "";
addBodyClass2 = (preview = false) => {
const body = document.querySelector("body");
if (!body) {
return;
}
let setting = getSetting("custom-background-0", "default");
if (preview) {
setting = preview;
}
if (addedClass) {
body.classList.remove(addedClass);
}
const style = document.querySelector("#mh-improved-custom-background-style");
if (style) {
style.remove();
}
if ("default" === setting) {
return;
}
const background = `mh-improved-bg-${setting}`;
body.classList.add(background);
addedClass = setting;
if (setting.startsWith("background-color-")) {
body.classList.remove(setting);
body.classList.add(background);
addedClass = background;
}
if (!gradients_default) {
return;
}
const gradient = gradients_default.find((g) => g.id === setting);
if (!gradient) {
return;
}
const gradientStyle = document.createElement("style");
gradientStyle.id = "mh-improved-custom-background-style";
gradientStyle.innerHTML = `.mh-improved-custom-background-gradient-preview,
body.${background} .pageFrameView-column.right.right,
body.${background} .pageFrameView-column.left.left {
background-color: transparent !important;
background-image: none !important;
}
@media only screen and (max-width: 1000px) {
body.${background}.hasSidebar .pageFrameView,
body.${background} .pageFrameView-column.right.right,
body.${background} .pageFrameView-column.left.left {
background-color: transparent !important;
background-image: none !important;
}
}
body.${background} {
background: ${gradient.css};
background-attachment: fixed;
}`;
document.head.append(gradientStyle);
};
listenForPreferenceChanges = () => {
const input = document.querySelector("#mousehunt-improved-settings-design-custom-background select");
if (!input) {
return;
}
input.addEventListener("change", () => {
addBodyClass2();
});
};
addPreview = () => {
const previewLink = document.querySelector(".mh-improved-custom-bg-preview");
if (!previewLink) {
return;
}
previewLink.addEventListener("click", (e) => {
e.preventDefault();
let content = "";
gradients_default.forEach((gradient) => {
content += `<div class="gradient" style="background: ${gradient.css}">
<div class="name">${gradient.name}</div>
<div class="controls">
<div class="mousehuntActionButton lightBlue mh-improved-custom-bg-action-button" data-gradient="${gradient.id}" data-action="preview"><span>Preview</span></div>
<div class="mousehuntActionButton mh-improved-custom-bg-action-button" data-gradient="${gradient.id}" data-action="use"><span>Use</span></div>
</div>
</div>`;
});
const popup = createPopup({
title: "",
className: "mh-improved-custom-background-gradient-preview-popup",
content: `<div class="mh-improved-custom-background-gradient-preview">${content}</div>`,
show: false
});
popup.show();
const previewActions = document.querySelectorAll(".mh-improved-custom-bg-action-button");
previewActions.forEach((action) => {
const gradient = action.getAttribute("data-gradient");
const actionType = action.getAttribute("data-action");
action.addEventListener("click", (evt) => {
evt.preventDefault();
if ("preview" === actionType) {
addBodyClass2(gradient);
} else if ("use" === actionType) {
const input = document.querySelector("#mousehunt-improved-settings-design-custom-background select");
if (input) {
input.value = gradient;
input.dispatchEvent(new Event("change"));
}
popup.hide();
}
});
});
});
};
persistBackground = () => {
addBodyClass2();
onNavigation(() => {
addBodyClass2();
setTimeout(addBodyClass2, 250);
setTimeout(addBodyClass2, 500);
});
onNavigation(() => {
listenForPreferenceChanges();
addPreview();
}, {
page: "preferences",
onLoad: true
});
};
init41 = () => __async(void 0, null, function* () {
addStyles(styles_default37);
persistBackground();
});
custom_background_default = {
id: "custom-background",
name: "Custom Background",
type: "design",
default: false,
description: "",
load: init41,
alwaysLoad: true,
settings: settings_default11
};
}
});
// src/modules/custom-horn/settings/index.js
function settings_default12(module) {
const options = [
{ name: "Default", value: "default" },
{ name: "Tournament Horn", value: "huntersHornView__horn--tournament" },
{ name: "Events", value: "group", options: [
{ name: "Birthday", value: "huntersHornView--seasonalEvent-birthday" },
{ name: "Great Winter Hunt", value: "huntersHornView--seasonalEvent-greatWinterHunt" },
{ name: "Halloween", value: "huntersHornView--seasonalEvent-halloween" },
{ name: "Lunar New Year", value: "huntersHornView--seasonalEvent-lunarNewYear" }
] },
{ name: "Color", value: "group", options: [
{ name: "Blue", value: "horn-color-blue" },
{ name: "Cyan", value: "horn-color-cyan" },
{ name: "Green", value: "horn-color-green" },
{ name: "Pink", value: "horn-color-pink" },
{ name: "Purple", value: "horn-color-purple" },
{ name: "Red", value: "horn-color-red" },
{ name: "Faded", value: "horn-color-faded" },
{ name: "Rainbow", value: "horn-color-rainbow" }
] }
];
addMhuiSetting(
"custom-horn",
'Custom Horn <a class="mh-improved-custom-horn-show-horn">Show Horn</a>',
[options[0]],
"Replace the horn.",
module,
{
type: "multi-select",
number: 1,
options
}
);
}
var init_settings13 = __esm({
"src/modules/custom-horn/settings/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
}
});
// src/modules/custom-horn/styles.css
var styles_default38;
var init_styles39 = __esm({
"src/modules/custom-horn/styles.css"() {
styles_default38 = ".huntersHornView.horn-color-blue .huntersHornView__horn{filter:hue-rotate(158deg)}.huntersHornView.horn-color-cyan .huntersHornView__horn{filter:hue-rotate(112deg)}.huntersHornView.horn-color-green .huntersHornView__horn{filter:hue-rotate(66deg)}.huntersHornView.horn-color-pink .huntersHornView__horn{filter:hue-rotate(280deg)}.huntersHornView.horn-color-purple .huntersHornView__horn{filter:hue-rotate(195deg)}.huntersHornView.horn-color-red .huntersHornView__horn{filter:hue-rotate(317deg) saturate(1.6)}.huntersHornView.horn-color-faded .huntersHornView__horn{filter:sepia(1)}@keyframes horn-hue-rotate{0%{filter:hue-rotate(0deg)}50%{filter:hue-rotate(360deg)}to{filter:hue-rotate(0deg)}}.huntersHornView.horn-color-rainbow .huntersHornView__horn{animation:horn-hue-rotate 30s infinite}.mh-improved-custom-horn-show-horn{position:absolute;top:0;right:225px;bottom:0;display:flex;align-items:center;font-size:14px}\n";
}
});
// src/modules/custom-horn/index.js
var addedClass2, addHornClass, listenForPreferenceChanges2, addPreview2, persistHornClass, init42, custom_horn_default;
var init_custom_horn = __esm({
"src/modules/custom-horn/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
init_settings13();
init_styles39();
addedClass2 = "";
addHornClass = (preview = false) => {
const hornView = document.querySelector(".huntersHornView");
if (!hornView) {
return;
}
const horn = document.querySelector(".huntersHornView__horn");
if (!horn) {
return;
}
horn.classList.add("huntersHornView__horn--default");
let setting = getSetting("custom-horn-0", "default");
if (preview) {
setting = preview;
}
hornView.classList.add();
if (addedClass2) {
hornView.classList.remove(addedClass2);
}
if ("default" !== setting) {
hornView.classList.add(setting);
addedClass2 = setting;
}
};
listenForPreferenceChanges2 = () => {
const input = document.querySelector("#mousehunt-improved-settings-design-custom-horn select");
if (!input) {
return;
}
input.addEventListener("change", () => {
addHornClass();
});
};
addPreview2 = () => {
const previewLink = document.querySelector(".mh-improved-custom-horn-show-horn");
if (!previewLink) {
return;
}
let isShowing = false;
let timeout = null;
previewLink.addEventListener("click", (e) => {
e.preventDefault();
const horn = document.querySelector(".huntersHornView__horn");
if (!horn) {
return;
}
const backdrop = document.querySelector(".huntersHornView__backdrop");
if (!backdrop) {
return;
}
if (isShowing) {
isShowing = false;
previewLink.textContent = "Show Horn";
clearTimeout(timeout);
horn.classList.add("huntersHornView__horn--reveal");
horn.classList.remove("huntersHornView__horn--ready");
setTimeout(() => {
backdrop.classList.remove("huntersHornView__backdrop--active");
}, 400);
timeout = setTimeout(() => {
horn.classList.remove("huntersHornView__horn--reveal");
}, 1e3);
return;
}
isShowing = true;
previewLink.textContent = "Hide Horn";
backdrop.classList.add("huntersHornView__backdrop--active");
horn.classList.add("huntersHornView__horn--ready", "huntersHornView__horn--reveal");
clearTimeout(timeout);
});
};
persistHornClass = () => {
addHornClass();
onNavigation(() => {
setTimeout(addHornClass, 1e3);
});
onNavigation(() => {
listenForPreferenceChanges2();
addPreview2();
}, {
page: "preferences",
onLoad: true
});
};
init42 = () => __async(void 0, null, function* () {
addStyles(styles_default38);
persistHornClass();
});
custom_horn_default = {
id: "custom-horn",
name: "Custom Horn",
type: "design",
default: false,
description: "",
load: init42,
alwaysLoad: true,
settings: settings_default12
};
}
});
// src/modules/custom-hud/settings/index.js
function settings_default13(module) {
const options = [
{ name: "Default", value: "default" },
{ name: "Color", value: "group", options: [
{ name: "Cyan", value: "hud-cyan" },
{ name: "Green", value: "hud-green" },
{ name: "Pink", value: "hud-pink" },
{ name: "Purple", value: "hud-purple" },
{ name: "Red", value: "hud-red" },
{ name: "Teal", value: "hud-teal" },
{ name: "Faded", value: "hud-faded" },
{ name: "Gray", value: "hud-gray" },
{ name: "Blueprint", value: "hud-blueprint" }
] }
];
addMhuiSetting(
"custom-hud",
"Custom HUD background",
[options[0]],
"Change the marbled HUD background.",
module,
{
type: "multi-select",
number: 1,
options
}
);
}
var init_settings14 = __esm({
"src/modules/custom-hud/settings/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
}
});
// src/modules/custom-hud/index.js
var addStyleEl, listenForPreferenceChanges3, persistBackground2, init43, custom_hud_default;
var init_custom_hud = __esm({
"src/modules/custom-hud/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
init_settings14();
addStyleEl = () => {
const setting = getSetting("custom-hud-0", "default");
const stylesEl = document.querySelector("#mh-improved-custom-hud-style");
if (stylesEl) {
stylesEl.remove();
}
if ("default" !== setting) {
const style = document.createElement("style");
style.id = "mh-improved-custom-hud-style";
style.innerHTML = `body .mousehuntHud-marbleDrawer {
background:
url(https://www.mousehuntgame.com/images/ui/hud/mousehuntHudPedestal.gif?asset_cache_version=2) -46px 0 no-repeat,
url(https://www.mousehuntgame.com/images/ui/hud/mousehuntHudPedestal.gif?asset_cache_version=2) 731px 0 no-repeat,
url(https://i.mouse.rip/mh-improved/marble-shadow.png) 6px 0 no-repeat,
url(https://i.mouse.rip/mh-improved/custom-hud/${setting}.png) repeat-y top center;
}
.mousehuntHud-titleProgressBar {
mix-blend-mode: luminosity;
}
`;
document.head.append(style);
}
};
listenForPreferenceChanges3 = () => {
const input = document.querySelector("#mousehunt-improved-settings-design-custom-hud select");
if (!input) {
return;
}
input.addEventListener("change", () => {
addStyleEl();
});
};
persistBackground2 = () => {
addStyleEl();
onNavigation(listenForPreferenceChanges3, {
page: "preferences",
onLoad: true
});
};
init43 = () => __async(void 0, null, function* () {
persistBackground2();
});
custom_hud_default = {
id: "custom-hud",
name: "Custom HUD",
type: "design",
default: false,
description: "",
load: init43,
alwaysLoad: true,
settings: settings_default13
};
}
});
// src/modules/custom-shield/settings/index.js
function settings_default14(module) {
let options = [
{ name: "Default", value: "default" },
{ name: "Default (normal resolution)", value: "default-normal" },
{ name: "Events", value: "group", options: [
{ name: "Birthday (Year 10)", value: "birthday.year10" },
{ name: "Birthday (Year 11)", value: "birthday.year11" },
{ name: "Birthday (Year 12)", value: "birthday.year12" },
{ name: "Birthday (Year 13)", value: "birthday.year13" },
{ name: "Birthday (Year 14)", value: "birthday.year14" },
{ name: "Birthday (Year 15)", value: "birthday.year15" },
{ name: "Birthday", value: "birthday" },
{ name: "Great Winter Hunt", value: "winter_hunt" },
{ name: "Halloween", value: "halloween" },
{ name: "Larry's Football Challenge", value: "larrys_football_challenge" },
{ name: "Pride (LGS Required)", value: "pride" },
{ name: "Remembrance Day", value: "remembrance_day" },
{ name: "Spring Egg Hunt (LGS Required)", value: "spring-egg-hunt" },
{ name: "Spring Egg Hunt Alt (LGS Required)", value: "spring-egg-hunt-alt" },
{ name: "Valentine's", value: "valentines" }
] },
{ name: "Color (LGS required)", value: "group", options: [
{ name: "Blue", value: "color-blue" },
{ name: "Blue with matching timer", value: "color-blue-timer" },
{ name: "Cyan", value: "color-cyan" },
{ name: "Cyan with matching timer", value: "color-cyan-timer" },
{ name: "Green", value: "color-green" },
{ name: "Green with matching timer", value: "color-green-timer" },
{ name: "Pink", value: "color-pink" },
{ name: "Pink with matching timer", value: "color-pink-timer" },
{ name: "Purple", value: "color-purple" },
{ name: "Purple with matching timer", value: "color-purple-timer" },
{ name: "Red", value: "color-red" },
{ name: "Red with matching timer", value: "color-red-timer" },
{ name: "Faded", value: "color-faded" },
{ name: "Rainbow", value: "color-rainbow" },
{ name: "Rainbow with matching timer", value: "color-rainbow-timer" },
{ name: "Cotton Candy", value: "color-cotton-candy" }
] },
{ name: "Title Shields", value: "group", options: [
{ name: "Current Title ", value: "title" },
{ name: "Novice", value: "title.novice" },
{ name: "Recruit", value: "title.recruit" },
{ name: "Apprentice", value: "title.apprentice" },
{ name: "Initiate", value: "title.initiate" },
{ name: "Journeyman / Journeywoman", value: "title.journeyman" },
{ name: "Master", value: "title.master" },
{ name: "Grandmaster", value: "title.grandmaster" },
{ name: "Legendary", value: "title.legendary" },
{ name: "Hero", value: "title.hero" },
{ name: "Knight", value: "title.knight" },
{ name: "Lord / Lady", value: "title.lord" },
{ name: "Baron / Baroness", value: "title.baron" },
{ name: "Count / Countess", value: "title.count" },
{ name: "Duke / Duchess", value: "title.duke" },
{ name: "Grand Duke / Duchess", value: "title.grandduke" },
{ name: "Archduke / Archduchess", value: "title.archduke" },
{ name: "Viceroy", value: "title.viceroy" },
{ name: "Elder", value: "title.elder" },
{ name: "Sage", value: "title.sage" },
{ name: "Fabled", value: "title.fabled" }
] },
{ name: "Silly", value: "group", options: [
{ name: "Scrambles ", value: "scrambles" },
{ name: "Jerry ", value: "jerry" },
{ name: "Romeno ", value: "romeno" }
] }
];
if (!user.has_shield) {
const toDisable = /* @__PURE__ */ new Set([
"pride",
"spring-egg-hunt",
"spring-egg-hunt-alt",
"Color (LGS required)"
]);
options = options.map((option) => {
if ("group" === option.value) {
const disabledParent = toDisable.has(option.name) || toDisable.has(option.value);
if (disabledParent) {
option.disabled = true;
}
option.options = option.options.map((groupOption) => {
if (toDisable.has(groupOption.value) || disabledParent) {
groupOption.disabled = true;
}
return groupOption;
});
}
return option;
});
}
addMhuiSetting(
"custom-shield",
"Custom Shield",
[options[0]],
"Replace the default shield with a custom one.",
module,
{
type: "multi-select",
number: 1,
options
}
);
}
var init_settings15 = __esm({
"src/modules/custom-shield/settings/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
}
});
// src/modules/custom-shield/styles.css
var styles_default39;
var init_styles40 = __esm({
"src/modules/custom-shield/styles.css"() {
styles_default39 = '.mousehuntHud-shield.golden.default{top:3px;left:12px;background-image:url(https://www.mousehuntgame.com/images/mousehunt_gold_logo.png?asset_cache_version=2);filter:drop-shadow(0 0 5px #e8dbb8);background-size:contain;transition:opacity .3s ease-in-out}.mousehuntHud-shield.golden.default-normal{top:unset;left:unset;background-image:url(https://www.mousehuntgame.com/images/ui/elements/header_golden_shield.gif?asset_cache_version=2);filter:none}.mousehuntHud-shield.golden.default:hover,.mousehuntHud-shield.golden.default:focus{opacity:.9}.mousehuntHud-shield.mhui-custom-shield.pride,.mousehuntHud-shield.golden.mhui-custom-shield.pride{background:url(https://i.mouse.rip/shield-pride.png) 0 0/105%}.mousehuntHud-shield.scrambles{background-image:url(https://i.mouse.rip/shield-scrambles-bawk.png)}.mousehuntHud-shield.golden.scrambles{background-image:url(https://i.mouse.rip/shield-scrambles-bawk.png),url(https://www.mousehuntgame.com/images/ui/elements/header_golden_shield.gif?cv=2)}.mousehuntHud-shield.jerry{background-image:url(https://i.mouse.rip/shield-jerry.png)}.mousehuntHud-shield.golden.jerry{background-image:url(https://i.mouse.rip/shield-jerry.png),url(https://www.mousehuntgame.com/images/ui/elements/header_golden_shield.gif?cv=2)}.mousehuntHud-shield.golden.spring-egg-hunt{background:url(https://i.mouse.rip/shield-seh.png) 1px 1px/104%}.mousehuntHud-shield.golden.spring-egg-hunt-alt{background:url(https://i.mouse.rip/shield-seh-alt.png) 1px 1px/104%}.mousehuntHud-shield.romeno:after{position:absolute;bottom:0;left:-69px;z-index:1;width:140px;height:140px;content:"";background-image:url(https://i.mouse.rip/shield-romeno.png);filter:drop-shadow(6px 0 14px #fff);background-repeat:no-repeat;background-size:contain}.mousehuntHud-shield.title,.mousehuntHud-shield.golden.title{background:url(https://i.mouse.rip/shield-blank-2.png) 0 0 / contain no-repeat}.mousehuntHud-shield.title:after{position:absolute;inset:0;content:"";filter:drop-shadow(0 0 10px #e8dbb8);background-repeat:no-repeat;background-position:2px 1px;background-size:125px;transition:background-image .5s}.mousehuntHud-shield.title.novice:after,.mousehuntHud-shield.golden.title.novice:after{background-image:url(https://www.mousehuntgame.com/images/titles/84bc1109b5cd7aa8c24d195bc8207c38.png?cv=2)}.mousehuntHud-shield.title.recruit:after,.mousehuntHud-shield.golden.title.recruit:after{background-image:url(https://www.mousehuntgame.com/images/titles/3f1e44bbaa7138da4c326819e9f3f0a8.png?cv=2)}.mousehuntHud-shield.title.apprentice:after,.mousehuntHud-shield.golden.title.apprentice:after{background-image:url(https://www.mousehuntgame.com/images/titles/6f4673dd2d9d1e98b4569667d702a775.png?cv=2)}.mousehuntHud-shield.title.initiate:after,.mousehuntHud-shield.golden.title.initiate:after{background-image:url(https://www.mousehuntgame.com/images/titles/e96387f7261b95c0eeab9291e4e594e1.png?cv=2)}.mousehuntHud-shield.title.journeyman:after,.mousehuntHud-shield.golden.title.journeyman:after{background-image:url(https://www.mousehuntgame.com/images/titles/ad6875955f541159133c6d3798519f81.png?cv=2)}.mousehuntHud-shield.title.master:after,.mousehuntHud-shield.golden.title.master:after{background-image:url(https://www.mousehuntgame.com/images/titles/35ee6056a09037fb13a9195881875045.png?cv=2)}.mousehuntHud-shield.title.grandmaster:after,.mousehuntHud-shield.golden.title.grandmaster:after{background-image:url(https://www.mousehuntgame.com/images/titles/0da3761747914f497c16dc2051ba132d.png?cv=2)}.mousehuntHud-shield.title.legendary:after,.mousehuntHud-shield.golden.title.legendary:after{background-image:url(https://www.mousehuntgame.com/images/titles/fca35751046f4bcc972716ca484b6d61.png?cv=2)}.mousehuntHud-shield.title.hero:after,.mousehuntHud-shield.golden.title.hero:after{background-image:url(https://www.mousehuntgame.com/images/titles/0567284d6e12aaaed35ca5912007e070.png?cv=2)}.mousehuntHud-shield.title.knight:after,.mousehuntHud-shield.golden.title.knight:after{background-image:url(https://www.mousehuntgame.com/images/titles/398dca9a8c7703de969769491622ca32.png?cv=2)}.mousehuntHud-shield.title.lord:after,.mousehuntHud-shield.golden.title.lord:after{background-image:url(https://www.mousehuntgame.com/images/titles/9a6acd429a9a3a4849ed13901288b0b8.png?cv=2)}.mousehuntHud-shield.title.baron:after,.mousehuntHud-shield.golden.title.baron:after{background-image:url(https://www.mousehuntgame.com/images/titles/ea9c0ec2e6d3d81c14e61f5ce924d0e1.png?cv=2)}.mousehuntHud-shield.title.count:after,.mousehuntHud-shield.golden.title.count:after{background-image:url(https://www.mousehuntgame.com/images/titles/dd11711a25b80db90e0306193f2e8d78.png?cv=2)}.mousehuntHud-shield.title.duke:after,.mousehuntHud-shield.golden.title.duke:after{background-image:url(https://www.mousehuntgame.com/images/titles/eb46ac1e8197b13299ab860f07d963db.png?cv=2)}.mousehuntHud-shield.title.grandduke:after,.mousehuntHud-shield.golden.title.grandduke:after{background-image:url(https://www.mousehuntgame.com/images/titles/87937fa96bbb3b2dd3225df883002642.png?cv=2)}.mousehuntHud-shield.title.archduke:after,.mousehuntHud-shield.golden.title.archduke:after{background-image:url(https://www.mousehuntgame.com/images/titles/043efe31de4f0f2e0ddca590fe829032.png?cv=2)}.mousehuntHud-shield.title.viceroy:after,.mousehuntHud-shield.golden.title.viceroy:after{background-image:url(https://www.mousehuntgame.com/images/titles/e2e79f6f9201a4d4e7a89684fbb5356f.png?cv=2)}.mousehuntHud-shield.title.elder:after,.mousehuntHud-shield.golden.title.elder:after{background-image:url(https://www.mousehuntgame.com/images/titles/0f3cf224bf98457f6b5bad91ab1c7bd2.png?cv=2)}.mousehuntHud-shield.title.sage:after,.mousehuntHud-shield.golden.title.sage:after{background-image:url(https://www.mousehuntgame.com/images/titles/cb49e43c5e4460da7c09fe28ca4f44ce.png?cv=2)}.mousehuntHud-shield.title.fabled:after,.mousehuntHud-shield.golden.title.fabled:after{background-image:url(https://www.mousehuntgame.com/images/titles/5daba92a8d609834aa8b789f37544e08.png?cv=2)}.huntersHornView__timer--default.color-blue,.mousehuntHud-shield.golden.color-blue{filter:hue-rotate(158deg) drop-shadow(0 0 5px #e8dbb8)}.huntersHornView__timer--default.color-cyan,.mousehuntHud-shield.golden.color-cyan{filter:hue-rotate(112deg) drop-shadow(0 0 5px #e8dbb8)}.huntersHornView__timer--default.color-green,.mousehuntHud-shield.golden.color-green{filter:hue-rotate(66deg) drop-shadow(0 0 5px #e8dbb8)}.huntersHornView__timer--default.color-pink,.mousehuntHud-shield.golden.color-pink{filter:hue-rotate(280deg) drop-shadow(0 0 5px #e8dbb8)}.huntersHornView__timer--default.color-purple,.mousehuntHud-shield.golden.color-purple{filter:hue-rotate(195deg) drop-shadow(0 0 5px #e8dbb8)}.huntersHornView__timer--default.color-red,.mousehuntHud-shield.golden.color-red{filter:hue-rotate(317deg) saturate(1.6) drop-shadow(0 0 5px #e8dbb8)}.mousehuntHud-shield.golden.color-faded{filter:sepia(1) drop-shadow(0 0 5px #e8dbb8)}@keyframes shield-hue-rotate{0%{filter:hue-rotate(0deg) drop-shadow(0 0 5px #e8dbb8)}50%{filter:hue-rotate(360deg) drop-shadow(0 0 5px #e8dbb8)}to{filter:hue-rotate(0deg) drop-shadow(0 0 5px #e8dbb8)}}.huntersHornView__timer--default.color-rainbow,.mousehuntHud-shield.golden.color-rainbow,.mousehuntHud-shield.golden.color-rainbow2{animation:shield-hue-rotate 30s infinite}\n';
}
});
// src/modules/custom-shield/cotton-candy.css
var cotton_candy_default;
var init_cotton_candy = __esm({
"src/modules/custom-shield/cotton-candy.css"() {
cotton_candy_default = ".huntersHornView__backdrop{filter:hue-rotate(180deg);opacity:1;transition:none}.huntersHornView__horn--ready{filter:hue-rotate(275deg);transition:none}.huntersHornMessageView{filter:hue-rotate(200deg)}.mousehuntHud-menu.default>ul li a{filter:hue-rotate(298deg);backdrop-filter:hue-rotate(245deg)}.mousehuntHud-environmentName{text-shadow:0 0 1px #eab9cd,1px 1px #ffe1f5}.mousehuntHud-environmentIcon{box-shadow:2px 2px 2px #ffe1f5 inset,-2px -2px 2px #eab9cd inset}.mousehuntHud-menu ul li.active .mousehuntHud-menu-item.root,.mousehuntHud-menu ul li:hover .mousehuntHud-menu-item.root{background:url(https://www.mousehuntgame.com/images/ui/hud/menu/menu_seperator.png?asset_cache_version=2) 100% 0 no-repeat;filter:hue-rotate(328deg);backdrop-filter:hue-rotate(292deg)}\n";
}
});
// src/modules/custom-shield/index.js
var doClass, addClass, removeClass, lastShield, changeShield, getTitle, watchForPreferenceChanges, init44, custom_shield_default;
var init_custom_shield = __esm({
"src/modules/custom-shield/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
init_settings15();
init_styles40();
init_cotton_candy();
doClass = (el, shieldClass, verb) => {
const classToAdd = shieldClass.replace(".", " ");
classToAdd.split(" ").forEach((className) => {
el.classList[verb](className);
});
};
addClass = (el, shieldClass) => {
doClass(el, shieldClass, "add");
};
removeClass = (el, shieldClass) => {
doClass(el, shieldClass, "remove");
};
lastShield = "";
changeShield = () => {
const shieldEl = document.querySelector(".mousehuntHud-shield");
if (!shieldEl) {
return;
}
const timer = document.querySelector(".huntersHornView__timer--default");
if (!timer) {
return;
}
if (lastShield) {
const remove = [
"mhui-custom-shield",
lastShield,
`${lastShield}-alt`,
"alt",
"title",
"default"
];
remove.forEach((className) => {
removeClass(shieldEl, className);
});
}
timer.classList.remove(lastShield);
let shield = getSetting("custom-shield-0", "default");
if ("default" === shield) {
shieldEl.classList.add("default");
return;
}
if (shield === "color-cotton-candy") {
makeElement("style", "mh-improved-cotton-candy-style", cotton_candy_default, document.head);
shield = "color-pink-timer";
} else {
const cottonCandyStyle = document.querySelector(".mh-improved-cotton-candy-style");
if (cottonCandyStyle) {
cottonCandyStyle.remove();
}
}
if (shield.startsWith("color-")) {
shieldEl.classList.add("default");
}
if (shield.endsWith("-timer")) {
shield = shield.replace("-timer", "");
timer.classList.add(shield);
}
if (shield.endsWith("-alt")) {
shieldEl.classList.add(shield.replace("-alt", ""), "alt");
}
if (shield.includes("title")) {
shieldEl.classList.add("title");
shield = "title" === shield ? getTitle() : shield;
}
shieldEl.classList.add("mhui-custom-shield");
addClass(shieldEl, shield);
lastShield = shield;
};
getTitle = () => {
let title = user.title_name || "novice";
title = title.toLowerCase();
title.replace("lady", "lord");
title.replace("wo", "");
title.replace("ess", "");
title.replace("duch", "duke");
return title;
};
watchForPreferenceChanges = () => {
const input = document.querySelector("#mousehunt-improved-settings-design-custom-shield select");
if (!input) {
return;
}
input.addEventListener("change", () => {
changeShield();
});
};
init44 = () => __async(void 0, null, function* () {
addStyles(styles_default39);
lastShield = getSetting("custom-shield-0", "default");
changeShield();
onNavigation(watchForPreferenceChanges, {
page: "preferences",
onLoad: true
});
});
custom_shield_default = {
id: "custom-shield",
name: "Custom Shield",
type: "design",
default: false,
description: "Change your shield in the HUD to a variety of different options.",
load: init44,
alwaysLoad: true,
settings: settings_default14
};
}
});
// src/modules/location-hud/settings.js
function settings_default15(module) {
return __async(this, null, function* () {
const locationsToUnset = /* @__PURE__ */ new Set([
"desert_oasis",
"lost_city",
"sand_dunes",
"queso_geyser",
"queso_plains",
"queso_quarry",
"queso_river",
// Don't have HUD changes for these.
"meadow",
"harbour",
"laboratory",
"mousoleum",
"training_grounds",
"zugzwang_library"
]);
const locationsToAdd = [
{
name: "Region: Living Garden",
id: "region-living-garden"
},
{
name: "Region: Queso Canyon",
id: "region-queso"
},
{
name: "Event Locations",
id: "event-locations"
}
];
const options = [];
const environments5 = yield getData("environments");
for (const environment of environments5) {
if (!locationsToUnset.has(environment.id)) {
options.push(environment);
}
}
options.sort((a, b) => {
if (a.name < b.name) {
return -1;
}
if (a.name > b.name) {
return 1;
}
return 0;
});
locationsToAdd.forEach((location) => {
options.push(location);
});
options.forEach((location) => {
addMhuiSetting(
location.id,
location.name,
true,
location.description,
module
);
});
});
}
var init_settings16 = __esm({
"src/modules/location-hud/settings.js"() {
init_sentry_release_injection_stub();
init_utils4();
init_utils4();
}
});
// src/modules/location-hud/styles.css
var styles_default40;
var init_styles41 = __esm({
"src/modules/location-hud/styles.css"() {
styles_default40 = ".mh-ui-cheese-selector-wrapper{margin-top:10px}.mh-ui-cheese-selector.townOfGnawniaHUD-baitContainer{flex-wrap:wrap}.mh-ui-cheese-selector .townOfGnawniaHUD-bait{width:145px;margin:3px 0;cursor:pointer}.mh-ui-cheese-selector .townOfGnawniaHUD-bait-image{left:2px;filter:none;background-repeat:no-repeat;background-size:75%}.mh-ui-cheese-selector .townOfGnawniaHUD-bait-name{margin-left:2px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}\n";
}
});
// src/modules/location-hud/shared/cheese-selectors/index.js
var makeCheeseSelector, getCheeses, replaced, replaceCampShowTab, isProcessing, cheese_selectors_default;
var init_cheese_selectors = __esm({
"src/modules/location-hud/shared/cheese-selectors/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
makeCheeseSelector = (location, cheesesToUse) => __async(void 0, null, function* () {
if (isProcessing) {
return;
}
isProcessing = true;
const hud10 = document.querySelector("#hudLocationContent");
if (!hud10) {
return;
}
hud10.classList.remove("empty");
const wrapper = document.createElement("div");
wrapper.classList.add("townOfGnawniaHUD", "allBountiesComplete", "mh-ui-cheese-selector-wrapper");
const cheesesContainer = document.createElement("div");
cheesesContainer.classList.add("townOfGnawniaHUD-baitContainer", "mh-ui-cheese-selector");
const cheeses = yield getUserItems(cheesesToUse);
for (const cheese of cheeses) {
const cheeseContainer = document.createElement("div");
cheeseContainer.classList.add("townOfGnawniaHUD-bait", `mh-ui-cheese-selector-${cheese.type}`);
if (user.bait_item_id === cheese.item_id) {
cheeseContainer.classList.add("active");
} else {
cheeseContainer.classList.remove("active");
}
const cheeseImage = document.createElement("div");
cheeseImage.classList.add("townOfGnawniaHUD-bait-image");
const thumbnail = cheese.thumbnail_transparent || cheese.thumbnail;
cheeseImage.style.backgroundImage = `url(${thumbnail})`;
const cheeseName = document.createElement("div");
cheeseName.classList.add("townOfGnawniaHUD-bait-name", "quantity");
cheeseName.innerText = cheese.name.replace(" Cheese", "");
const cheeseQuantity = document.createElement("div");
cheeseQuantity.classList.add("townOfGnawniaHUD-bait-quantity", "quantity");
cheeseQuantity.innerText = numberFormat(cheese.quantity);
const tooltipArrow = document.createElement("div");
tooltipArrow.classList.add("mousehuntTooltip-arrow");
cheeseContainer.append(cheeseImage);
cheeseContainer.append(cheeseName);
cheeseContainer.append(cheeseQuantity);
cheeseContainer.setAttribute("data-item-type", cheese.type);
cheeseContainer.setAttribute("data-item-classification", "bait");
cheeseContainer.setAttribute("onclick", "hg.utils.TrapControl.toggleItem(this); return false;");
cheesesContainer.append(cheeseContainer);
}
wrapper.append(cheesesContainer);
const existingCheeseSelector = hud10.querySelector(".mh-ui-cheese-selector-wrapper");
if (existingCheeseSelector) {
existingCheeseSelector.replaceWith(wrapper);
} else {
hud10.append(wrapper);
}
isProcessing = false;
});
getCheeses = (cheeses) => {
const defaultCheeses = [
"cheddar_cheese",
"brie_cheese",
"gouda_cheese",
"super_brie_cheese"
];
while (cheeses.length < 4) {
cheeses.unshift(defaultCheeses.pop());
}
return cheeses;
};
replaced = false;
replaceCampShowTab = () => {
if (replaced) {
return;
}
replaced = true;
const _original2 = app.pages.CampPage.showTab;
app.pages.CampPage.showTab = (...args) => {
_original2(...args);
eventRegistry.doEvent("set_camp_tab", ...args);
};
};
isProcessing = false;
cheese_selectors_default = (location, cheeses) => __async(void 0, null, function* () {
replaceCampShowTab();
const main25 = () => {
makeCheeseSelector(location, getCheeses(cheeses));
};
main25();
onNavigation(main25);
onEvent("ajax_response", main25);
});
}
});
// src/modules/location-hud/acolyte-realm/index.js
var acolyte_realm_default;
var init_acolyte_realm = __esm({
"src/modules/location-hud/acolyte-realm/index.js"() {
init_sentry_release_injection_stub();
init_cheese_selectors();
acolyte_realm_default = () => __async(void 0, null, function* () {
cheese_selectors_default("acolyte-realm", [
"ancient_cheese",
"runic_cheese",
"radioactive_blue_cheese",
"magical_radioactive_blue_cheese"
]);
});
}
});
// src/modules/location-hud/ancient-city/styles.css
var styles_default41;
var init_styles42 = __esm({
"src/modules/location-hud/ancient-city/styles.css"() {
styles_default41 = ".ancientCityHUD-total.mousehuntTooltipParent{top:35px;left:550px;padding:11px 5px;font-size:13px;background:linear-gradient(180deg,#785c3c,#422b14);border-radius:10px}.ancientCityHUD-countDown{top:0;right:10px;font-size:36px;text-shadow:2px 2px 2px #171717}.ancientCityHUD-bossLabel{text-shadow:2px 2px 2px #171717}.ancientCityHUD-tier-number{text-shadow:1px 1px 2px #171717}.ancientCityHUD-progress{background:#cfc634}span.ancientCityHUD-alertLevel{position:absolute;bottom:1px;left:4px;text-shadow:1px 1px 2px #171717}.ancientCityHUD-districtName{font-size:13px;color:#c6c6c6}.ancientCityHUD-item-quantity{position:absolute;top:1px;padding:0 4px;margin-left:3px!important;font-size:11px;line-height:unset;text-align:center;background-color:#000;border-radius:5px}.ancientCityHUD-item:nth-child(1) .ancientCityHUD-item-name,.ancientCityHUD-item:nth-child(2) .ancientCityHUD-item-name,.ancientCityHUD-item:nth-child(3) .ancientCityHUD-item-name,.ancientCityHUD-item:nth-child(4) .ancientCityHUD-item-name,.ancientCityHUD-item:nth-child(5) .ancientCityHUD-item-name{width:96px;margin-left:47px;font-size:11px;font-weight:900;text-align:center;text-shadow:0 0 1px #000;background:linear-gradient(180deg,#70707000,#a8a8a8,#70707000);border-radius:20px}.ancientCityHUD-item:hover .ancientCityHUD-item-location,.ancientCityHUD-item:focus .ancientCityHUD-item-location{position:absolute;top:unset;bottom:-25px;padding:3px;font-size:9px;color:#000;text-align:center;background:#fff;border:2px solid #000;border-radius:10px;box-shadow:2px 3px 4px #666}.ancientCityHUD-item{top:5px}.ancientCityHUD-bossSecretLabel{font-size:13px;text-shadow:0 1px 1px #3d3d3d}\n";
}
});
// src/modules/location-hud/ancient-city/index.js
var ancient_city_default;
var init_ancient_city = __esm({
"src/modules/location-hud/ancient-city/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
init_styles42();
ancient_city_default = () => __async(void 0, null, function* () {
addHudStyles(styles_default41);
});
}
});
// src/modules/location-hud/balacks-cove/styles.css
var styles_default42;
var init_styles43 = __esm({
"src/modules/location-hud/balacks-cove/styles.css"() {
styles_default42 = ".balacksCoveHUD-tideContainer-timeLeft{position:absolute;top:9px;right:55px;padding:3px 10px;font-size:12px;color:#5f463d;background-color:#8ad3d5;border-radius:23% 23% 0 0;box-shadow:0 -.5px 1px 1px #d6f1f2}\n";
}
});
// src/modules/location-hud/balacks-cove/index.js
var getClosingText, updateClosingTime, hud, balacks_cove_default;
var init_balacks_cove = __esm({
"src/modules/location-hud/balacks-cove/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
init_styles43();
init_cheese_selectors();
getClosingText = (closes, stage, nextStageOffsetMinutes, nextStageText) => {
const hours = Math.floor(closes);
const minutes = Math.ceil((closes - Math.floor(closes)) * 60);
let timeLeftText = `${hours}h ${minutes}m until ${stage}`;
if (nextStageOffsetMinutes && nextStageText) {
const totTimeMinutes = hours * 60 + minutes + nextStageOffsetMinutes;
timeLeftText += `, <span class="offset">${Math.floor(totTimeMinutes / 60)}h ${totTimeMinutes % 60}m until ${nextStageText}</span>`;
}
return timeLeftText;
};
updateClosingTime = () => {
let timeLeftText = "";
const today = /* @__PURE__ */ new Date();
const rotationLength = 18.66666;
const rotationsExact = (today.getTime() / 1e3 - 1294680060) / 3600 / rotationLength;
const rotationsInteger = Math.floor(rotationsExact);
const partialrotation = (rotationsExact - rotationsInteger) * rotationLength;
if (partialrotation < 16) {
const closes = 16 - partialrotation;
timeLeftText = getClosingText(closes, "Mid Tide", 60, "High Tide");
} else if (partialrotation >= 16 && partialrotation < 17) {
const closes = 1 - (partialrotation - 16);
timeLeftText = getClosingText(closes, "High Tide", 40, "Low Tide");
} else if (partialrotation >= 17 && partialrotation < 17.66666) {
const closes = 0.66666 - (partialrotation - 17);
timeLeftText = getClosingText(closes, "Low Tide", 60, "Mid Tide");
}
const timeLeftEl = document.createElement("div");
timeLeftEl.classList.add("balacksCoveHUD-tideContainer-timeLeft");
timeLeftEl.innerHTML = timeLeftText;
return timeLeftEl;
};
hud = () => {
const hudBar = document.querySelector(".balacksCoveHUD-tideContainer");
if (!hudBar) {
return;
}
const existing = document.querySelector(".balacksCoveHUD-tideContainer-timeLeft");
if (existing) {
existing.remove();
}
const timeLeftEl = updateClosingTime();
hudBar.append(timeLeftEl);
const timer = setInterval(updateClosingTime, 60 * 1e3);
onEvent("travel_complete", () => {
clearInterval(timer);
});
};
balacks_cove_default = () => __async(void 0, null, function* () {
addHudStyles(styles_default42);
cheese_selectors_default("balacks-cove", [
"vanilla_stilton_cheese",
"vengeful_vanilla_stilton_cheese"
]);
hud();
});
}
});
// src/modules/location-hud/bazaar/index.js
var bazaar_default;
var init_bazaar = __esm({
"src/modules/location-hud/bazaar/index.js"() {
init_sentry_release_injection_stub();
init_cheese_selectors();
bazaar_default = () => __async(void 0, null, function* () {
cheese_selectors_default("bazaar", [
"gilded_cheese"
]);
});
}
});
// src/modules/location-hud/shared/folklore-forest/styles.css
var styles_default43;
var init_styles44 = __esm({
"src/modules/location-hud/shared/folklore-forest/styles.css"() {
styles_default43 = '.folkloreForestRegionView-dialog-help .folkloreForestRegionView-dialog-tabContentContainer{max-width:560px;padding:10px;margin:0 auto;font-size:13px;line-height:1.4}.folkloreForestRegionView-dialog-help h3{font-size:17px;color:#fff5cb}.folkloreForestRegionView-dialog-tabHeaderContainer:before,.folkloreForestRegionView-dialog-tabHeaderContainer:after{background:transparent}.folkloreForestRegionView-dialog-tabHeaderContainer{padding:0 20px;margin-right:-5px;margin-left:-5px;border-bottom-color:#416f2a}a.folkloreForestRegionView-dialog-tabHeader{background-color:#4d3d00;border:1px solid #416f2a;border-bottom:none}#overlayPopup.fabledForestDialog .title{margin-top:-19px}.folkloreForestRegionView-environmentInventory-block-quantity{font-size:12px;font-weight:400}.folkloreForestRegionView-environmentInventory-label{font-size:11px;line-height:18px}a.folkloreForestRegionView-upgradeButton.canUnlock:after{position:absolute;top:3px;right:5px;width:14px;height:14px;content:"";background-image:url(https://www.mousehuntgame.com/images/ui/hud/folklore_forest_region/upgrade_arrow_small.png?asset_cache_version=2);filter:hue-rotate(300deg) brightness(1.1);background-repeat:no-repeat;background-size:contain;border-radius:50%}.mh-location-prologue_pond a.folkloreForestRegionView-upgradeButton.canUnlock:after{filter:hue-rotate(300deg) brightness(1.1)}.mh-location-table_of_contents a.folkloreForestRegionView-upgradeButton.canUnlock:after{filter:none}a.folkloreForestRegionView-upgradeButton{font-size:13px}.folkloreForestRegionView-upgrade{width:25px;height:25px;margin-right:3px;box-shadow:0 0 17px #54290a inset,0 0 2px 1px #999}.folkloreForestRegionView-upgradeContainer{top:3px;left:20px;width:auto}.folkloreForestRegionView-upgrade.active{box-shadow:inset 0 0 2px 1px #b4e2ee}.folkloreForestRegionView-environmentTitle .folkloreForestRegionView-environmentState{font-size:21px}.folkloreForestRegionView-trapWarningContainer{padding:20px;font-size:12px;color:#870808;background-color:#ffbfbf}.folkloreForestRegionView-trapWarningContainer a{color:#870808}.folkloreForestRegionView-warning{border:none}.folkloreForestRegionView-warning:before{display:none}a.folkloreForestRegionView__estimate-button{top:9px!important;right:-7px!important;font-size:20px!important;color:#1a5162!important}a.folkloreForestRegionView__estimate-button:hover{color:#064155!important}.folkloreForestRegionView-dialog-footer{margin-top:5px;margin-bottom:15px}.folkloreForestRegionView-footer-spacer{display:none}.folkloreForestRegionView-dialog-block-cost{border:1px solid #ccc;box-shadow:none}.folkloreForestRegionView-dialog-block-cost-image{height:40px;background-size:contain}.upgrades .folkloreForestRegionView-dialog-block-item-image{margin:4px auto;background-color:transparent;border:none}.upgrades .folkloreForestRegionView-dialog-block-icon{top:1px;left:0;border:none}.upgrades .folkloreForestRegionView-dialog-block-name{margin-left:39px;border-top:1px solid #c6c6c6}.upgrades .folkloreForestRegionView-dialog-block-description{border-width:1px}.upgrades .folkloreForestRegionView-dialog-block{border:1px solid #c6c6c6;border-top:none}.upgrades .folkloreForestRegionView-dialog-block.highlight .folkloreForestRegionView-dialog-block-icon{margin-top:-1px;border-top:1px solid #c6c6c6;border-right:1px solid #c6c6c6}.upgrades .folkloreForestRegionView-dialog-tabHeader-notification{font-size:15px;line-height:25px;background-color:#e94e4e;box-shadow:1px 1px 4px -1px #000}.folkloreForestRegionView-fuelContainer.mousehuntTooltipParent{border-radius:40px 30px 30px}.folkloreForestRegionView-fuelContainer .mousehuntTooltip{display:none!important}.folkloreForestRegionView-dialog-blockContainer.upsellRecipe .upsellItemActionView-cost-image{box-shadow:none}.mhui-folklore-forest-upgrade-toggle{position:absolute;right:25px;bottom:13px}.folkloreForestRegionView-dialog-block.toggle-is-hidden{filter:grayscale(.6);opacity:.8}.folkloreForestRegionView-environmentInventory-blockContainer{width:125px}.upgrades .folkloreForestRegionView-dialog-block .folkloreForestRegionView-dialog-block-icon:after{display:none}.upgrades .highlight .folkloreForestRegionView-dialog-block-name{background-color:#a2723b}.folkloreForestRegionView-dialog-block-cost.error .folkloreForestRegionView-dialog-block-cost-image{box-shadow:0 0 35px #ffa3a3 inset}a.folkloreForestRegionView-warning:hover{background-color:#ffecd9}.folkloreForestRegionView-dialog-blockContainer.upgrades .folkloreForestRegionView-dialog-block-description{overflow:visible;line-height:1.3}.folkloreForestRegionView-dialog-block-costLabel{display:none}\n';
}
});
// src/modules/location-hud/bountiful-beanstalk/styles.css
var styles_default44;
var init_styles45 = __esm({
"src/modules/location-hud/bountiful-beanstalk/styles.css"() {
styles_default44 = ".headsUpDisplayBountifulBeanstalkView__baitQuantity.quantity{display:flex;align-items:center;justify-content:flex-end;font-size:12px}.headsUpDisplayBountifulBeanstalk__inventoryBlockQuantity.quantity{padding:2px;margin-top:-4px;font-size:13px}.bountifulBeanstalkCastleView__noiseLevel,.bountifulBeanstalkCastleView__maxNoiseLevel{padding:0 2px;font-size:17px;vertical-align:middle}.bountifulBeanstalkCastleView__noiseMeterLabel{vertical-align:middle}.headsUpDisplayBountifulBeanstalkView__baitImage{top:0;left:3px;width:35px;height:35px}.headsUpDisplayBountifulBeanstalkView__baitIngredientImage{top:24px;left:28px;width:20px;height:20px}.bountifulBeanstalkCastleView__plinthLootImage .headsUpDisplayBountifulBeanstalkView__loot{top:47px;right:242px;width:45px;height:45px;filter:drop-shadow(0 0 5px #f0e1a4)}.headsUpDisplayBountifulBeanstalkView__lootMultiplierContainer h3{font-size:11px}.headsUpDisplayBountifulBeanstalkView__lootMultiplierContainer h3 span{font-size:17px}.headsUpDisplayBountifulBeanstalkView__lootMultiplierContainer{left:22px}.headsUpDisplayBountifulBeanstalkView__castleNextRoomText.headsUpDisplayBountifulBeanstalkView__castleNextRoomText--nextArrow{font-size:13px}.bountifulBeanstalkCastleView__plinthOverlay .mousehuntTooltip{top:-31px;bottom:unset;left:-60px;width:447px;line-height:1.5;color:#f2e3a6;background:#192518;border:2px solid #85d523;border-top:none;border-top-left-radius:0;border-top-right-radius:0}.bountifulBeanstalkCastleView__plinthOverlay .mousehuntTooltip-arrow{display:none}.bountifulBeanstalkCastleView__currentRoomName{font-size:14px}.bountifulBeanstalkCastleView__currentRoomLoot b{font-size:13px}.bountifulBeanstalkCastleView__plinthOverlay.mousehuntTooltipParent{left:190px;width:330px}.bountifulBeanstalkCastleView__currentRoomLootMultiplier{padding:0 1px;font-size:14px}\n";
}
});
// src/modules/location-hud/bountiful-beanstalk/index.js
var bountiful_beanstalk_default;
var init_bountiful_beanstalk = __esm({
"src/modules/location-hud/bountiful-beanstalk/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
init_styles44();
init_styles45();
bountiful_beanstalk_default = () => __async(void 0, null, function* () {
addHudStyles([styles_default43, styles_default44]);
});
}
});
// src/modules/location-hud/calm-clearing/index.js
var calm_clearing_default;
var init_calm_clearing = __esm({
"src/modules/location-hud/calm-clearing/index.js"() {
init_sentry_release_injection_stub();
init_cheese_selectors();
calm_clearing_default = () => __async(void 0, null, function* () {
cheese_selectors_default("calm-clearing", [
"cherry_cheese"
]);
});
}
});
// src/modules/location-hud/cape-clawed/index.js
var cape_clawed_default;
var init_cape_clawed = __esm({
"src/modules/location-hud/cape-clawed/index.js"() {
init_sentry_release_injection_stub();
init_cheese_selectors();
cape_clawed_default = () => __async(void 0, null, function* () {
cheese_selectors_default("cape-clawed", [
"shell_cheese",
"gumbo_cheese",
"crunchy_cheese"
]);
});
}
});
// src/modules/location-hud/catacombs/index.js
var catacombs_default;
var init_catacombs = __esm({
"src/modules/location-hud/catacombs/index.js"() {
init_sentry_release_injection_stub();
init_cheese_selectors();
catacombs_default = () => __async(void 0, null, function* () {
cheese_selectors_default("catacombs", [
"ancient_cheese",
"undead_emmental_cheese",
"string_undead_emmental_cheese",
"radioactive_blue_cheese",
"super_radioactive_blue_cheese",
"magical_radioactive_blue_cheese",
"moon_cheese",
"crescent_cheese"
]);
});
}
});
// src/modules/location-hud/claw-shot-city/styles.css
var styles_default45;
var init_styles46 = __esm({
"src/modules/location-hud/claw-shot-city/styles.css"() {
styles_default45 = ".clawShotCityHud .gangs_caught,.clawShotCityHud .fools_gold_quantity{font-size:27px;color:#e7c37d}\n";
}
});
// src/modules/location-hud/claw-shot-city/index.js
var claw_shot_city_default;
var init_claw_shot_city = __esm({
"src/modules/location-hud/claw-shot-city/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
init_styles46();
claw_shot_city_default = () => __async(void 0, null, function* () {
addHudStyles(styles_default45);
});
}
});
// src/modules/location-hud/derr-dunes/index.js
var derr_dunes_default;
var init_derr_dunes = __esm({
"src/modules/location-hud/derr-dunes/index.js"() {
init_sentry_release_injection_stub();
init_cheese_selectors();
derr_dunes_default = () => __async(void 0, null, function* () {
cheese_selectors_default("derr-dunes", [
"crunchy_cheese"
]);
});
}
});
// src/modules/location-hud/desert-city/styles.css
var styles_default46;
var init_styles47 = __esm({
"src/modules/location-hud/desert-city/styles.css"() {
styles_default46 = '.muridaeMarketHud .quantity{display:flex;align-items:center;height:16px;margin-top:1px;font-size:14px;color:#e3d0b2;text-shadow:1px 1px 2px #533a20}.muridaeMarketHud .shop .visit{top:0;height:166px}.muridaeMarketHud .shop:hover .visit:after{position:absolute;right:3px;bottom:78px;left:4px;width:unset;font-size:11px;font-weight:700;color:#efdfc4;text-align:center;text-shadow:1px 1px 4px #52381f;text-transform:uppercase;content:"Visit";background-color:#aa855c99;border-bottom-right-radius:7px;border-bottom-left-radius:8px}.muridaeMarketHud .shop:hover{filter:drop-shadow(0 1px 2px #e7d6ba)}\n';
}
});
// src/modules/location-hud/desert-city/index.js
var desert_city_default;
var init_desert_city = __esm({
"src/modules/location-hud/desert-city/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
init_styles47();
desert_city_default = () => __async(void 0, null, function* () {
addHudStyles(styles_default46);
});
}
});
// src/modules/location-hud/desert-warpath/styles.css
var styles_default47;
var init_styles48 = __esm({
"src/modules/location-hud/desert-warpath/styles.css"() {
styles_default47 = '.warpathHUD.wave_1:after,.warpathHUD.wave_2:after,.warpathHUD.wave_3:after,.warpathHUD.wave_4:after{position:absolute;bottom:1px;left:5px;display:flex;align-items:center;width:53px;height:25px;font-size:15px;color:#f5d172;content:"Wave";background-color:#633e29;border-top-left-radius:4px;border-top-right-radius:4px;box-shadow:inset 0 -2px 2px -1px #3e2417}.warpathHUD.wave_1:after{content:"Wave 1"}.warpathHUD.wave_2:after{content:"Wave 2"}.warpathHUD.wave_3:after{content:"Wave 3"}.warpathHUD.wave_4:after{content:"Wave 4"}.warpathHUD-streak-quantity{top:1px;left:60px;width:17px;padding:2px;font-size:17px;color:#f5d172;background-color:#633e29;border-radius:2px;box-shadow:inset -2px 1px 2px #af7756}.warpathHUD-clearWaveQuantity.quantity{top:46px;left:8px;padding:2px;font-size:13px;font-weight:400;background-color:#49362b;border-radius:10px;box-shadow:0 0 1px 1px inset #38281d}.warpathHUD-wave-mouse-population{font-size:13px;line-height:22px}.warpathHUD-wave-mouse.mousehuntTooltipParent.active.laser_targetted{color:#ff824c;filter:drop-shadow(0 -2px 3px #ea4700)}.warpathHUD-wave-mouse-powerType{width:32px;height:32px;margin-top:0;margin-right:10px}.warpathHUD-wave-mouse .mousehuntTooltip.tight.top{height:33px;color:transparent}.warpathHUD-wave-mouse .mousehuntTooltip .warpathHUD-wave-mouse-name{line-height:34px;color:#000}.warpathHUD-wave-mouse .mousehuntTooltip.hasCharms .warpathHUD-wave-mouse-name{line-height:14px}.warpathHUD-wave-mouse.desert_general .mousehuntTooltip .warpathHUD-wave-mouse-name,.warpathHUD-wave-mouse.desert_supply .mousehuntTooltip .warpathHUD-wave-mouse-name{text-align:center}.warpathHUD-wave-mouse.desert_general .mousehuntTooltip .warpathHUD-wave-mouse-name{line-height:28px}.warpathHUD-streakContainer:before{background:linear-gradient(0deg,#2ffd2d 50%,#f7f718,#c32222);filter:brightness(.8)}.warpathHUD-streak-image-empty{font-weight:900;box-shadow:inset 0 0 10px 5px #2f1816}.warpathHUD-wave-mouse.laser_targetted .warpathHUD-wave-mouse-image{box-shadow:inset 0 0 10px 6px #ff824c}\n';
}
});
// src/modules/location-hud/desert-warpath/index.js
var desert_warpath_default;
var init_desert_warpath = __esm({
"src/modules/location-hud/desert-warpath/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
init_styles48();
desert_warpath_default = () => __async(void 0, null, function* () {
addHudStyles(styles_default47);
});
}
});
// src/modules/location-hud/dojo/index.js
var dojo_default;
var init_dojo = __esm({
"src/modules/location-hud/dojo/index.js"() {
init_sentry_release_injection_stub();
init_cheese_selectors();
dojo_default = () => __async(void 0, null, function* () {
cheese_selectors_default("dojo", [
"maki_cheese"
]);
});
}
});
// src/modules/location-hud/dracano/index.js
var dracano_default;
var init_dracano = __esm({
"src/modules/location-hud/dracano/index.js"() {
init_sentry_release_injection_stub();
init_cheese_selectors();
dracano_default = () => __async(void 0, null, function* () {
cheese_selectors_default("dracano", [
"inferno_havarti_cheese"
]);
});
}
});
// src/modules/location-hud/elub-shore/index.js
var elub_shore_default;
var init_elub_shore = __esm({
"src/modules/location-hud/elub-shore/index.js"() {
init_sentry_release_injection_stub();
init_cheese_selectors();
elub_shore_default = () => __async(void 0, null, function* () {
cheese_selectors_default("elub-shore", [
"shell_cheese"
]);
});
}
});
// src/modules/location-hud/floating-islands/styles.css
var styles_default48;
var init_styles49 = __esm({
"src/modules/location-hud/floating-islands/styles.css"() {
styles_default48 = '.floatingIslandsHUD-islandLoot-label{color:transparent}.floatingIslandsHUD-islandLoot-label:before{position:absolute;top:3px;right:3px;width:100px;font-size:13px;font-variant:small-caps;color:#e2d8b6;text-shadow:1px 1px #43311c;content:"Mice can drop"}a.floatingIslandsHUD-islandLoot{font-size:14px}.floatingIslandsAdventureBoardSkyMap-islandMod .floatingIslandsHUD-mod.fog_shrine:first-child,.floatingIslandsAdventureBoardSkyMap-islandMod .floatingIslandsHUD-mod.frost_shrine:first-child,.floatingIslandsAdventureBoardSkyMap-islandMod .floatingIslandsHUD-mod.rain_shrine:first-child,.floatingIslandsAdventureBoardSkyMap-islandMod .floatingIslandsHUD-mod.wind_shrine:first-child,.floatingIslandsAdventureBoardSkyMap-islandMod .floatingIslandsHUD-mod.paragon_cache_a:first-child,.floatingIslandsAdventureBoardSkyMap-islandMod .floatingIslandsHUD-mod.paragon_cache_b:first-child,.floatingIslandsAdventureBoardSkyMap-islandMod .floatingIslandsHUD-mod.paragon_cache_c:first-child,.floatingIslandsAdventureBoardSkyMap-islandMod .floatingIslandsHUD-mod.paragon_cache_d:first-child{background-position-y:0;border-radius:3px;box-shadow:0 0 13px 3px gold inset}.floatingIslandsHUD-modPanel.fog_shrine:hover:before,.floatingIslandsHUD-modPanel.frost_shrine:hover:before,.floatingIslandsHUD-modPanel.rain_shrine:hover:before,.floatingIslandsHUD-modPanel.wind_shrine:hover:before{position:absolute;right:7px;bottom:6px;left:7px;z-index:1;display:flex;justify-content:center;height:auto;padding:1px;font-size:16px;font-variant:small-caps;color:#0c3e0e;text-shadow:none;white-space:nowrap;content:"";background-color:#d1e19d}.floatingIslandsHUD-modPanel.fog_shrine:hover:before{content:"Fog"}.floatingIslandsHUD-modPanel.frost_shrine:hover:before{content:"Frost"}.floatingIslandsHUD-modPanel.rain_shrine:hover:before{content:"Rain"}.floatingIslandsHUD-modPanel.wind_shrine:hover:before{content:"Wind"}span.floatingIslandsHUD-huntsRemaining{position:absolute;top:6px;right:6px;padding:2px 4px;font-size:16px}.floatingIslandsHUD-huntsRemainingContainer{top:-1px}.floatingIslandsHUD-islandTitle{top:-3px;font-size:15px;text-shadow:none}.floatingIslandsHUD-bait-quantity,.floatingIslandsHUD-bait-craftingItem-quantity{padding-right:4px;font-size:12px}.floatingIslandsHUD-statItem-quantity.quantity{font-size:12px}.floatingIslandsHUD-craftingItem-quantity.quantity{font-size:13px}.floatingIslandsHUD-craftingItem.show-progress .floatingIslandsHUD-craftingItem-quantity.quantity{font-size:11px}.floatingIslandsHUD.island .floatingIslandsHUD-airshipContainer{top:70px;left:524px;z-index:3;filter:drop-shadow(0 0 6px #fbe7a4);transform:scale(2)}.floatingIslandsWorkshop-part-name{font-size:11px;text-shadow:none}.floatingIslandsHUD-fuel-quantity.quantity{top:31px;right:0;left:0;width:auto;padding:4px;margin-right:8px;margin-left:7px;font-size:14px;pointer-events:none;background:linear-gradient(218deg,#7baabd,#568295);border-radius:3px;box-shadow:inset 0 0 2px 2px #09577f,0 2px 8px 1px #78aabd}.floatingIslandsHUD-fuel-quantity.quantity:hover,.floatingIslandsHUD-fuel-quantity.quantity:focus{cursor:pointer}.floatingIslandsHUD-fuel-quantity.quantity.active{background:linear-gradient(218deg,#0e8eeb,#28eeff);box-shadow:0 0 2px 2px #09577f inset,0 2px 7px 1px #37feff}.floatingIslandsHUD-retreatButton,.floatingIslandsHUD-retreatButton.disabled,.floatingIslandsHUD.enemyActive .floatingIslandsHUD-retreatButton{margin-top:-1px;color:#b0a06c!important;background-color:transparent;border:none;border-radius:0}.floatingIslandsHUD-retreatButton:hover,.floatingIslandsHUD-retreatButton.disabled:hover,.floatingIslandsHUD.enemyActive .floatingIslandsHUD-retreatButton:hover,.floatingIslandsHUD-retreatButton:focus,.floatingIslandsHUD-retreatButton.disabled:focus,.floatingIslandsHUD.enemyActive .floatingIslandsHUD-retreatButton:focus{color:#fce698!important;background:none}.floatingIslandsHUD-craftingItem-quantity.quantity,.floatingIslandsHUD-islandLoot,.floatingIslandsHUD-modPanel-effect{text-shadow:1px 1px 1px #242424}.floatingIslandsHUD-modPanel.active .floatingIslandsHUD-modPanel-effect,.floatingIslandsHUD-modPanel.complete .floatingIslandsHUD-modPanel-effect{text-shadow:1px 1px 1px #9ab59a}.mh-ui-fi-enemy-countdown{position:absolute;top:3px;bottom:-4px;left:-1px;z-index:4;width:auto;min-width:70px;padding-left:5px;white-space:nowrap;background-color:#51250a;border-radius:8px 8px 8px 0;box-shadow:1px 0 0 1px #7d5430,inset 1px 0 0 1px #9a6f43}.floatingIslandsHUD-goalContainer .floatingIslandsHUD-enemy-state.enemyApproaching{color:transparent}span.mh-ui-fi-enemy-countdown-hunts{font-size:14px;color:#fbe296;text-shadow:1px 1px 1px #000;vertical-align:top}.mh-ui-fi-enemy-name{position:absolute;top:33px;right:24px;left:26px;height:12px;padding:0;margin:0;font-size:12px;font-weight:500;line-height:4px;text-align:center;background:linear-gradient(90deg,#ecc37d,#fde89a 18% 64%,#f2cf86);border:1px solid #b15d18;border-top:none;border-radius:0 0 19px 19px;box-shadow:0 1px 1px #d78c34}.floatingIslandsHUD.enemyActive .floatingIslandsHUD-enemyContainer.hasEnemy .floatingIslandsHUD-enemy-thumb{box-shadow:0 0 4px 3px #fb7660}.floatingIslandsHUD.enemyActive .floatingIslandsHUD-goalContainer .floatingIslandsHUD-enemy-state.enemyActive{color:#fb7660}.floatingIslandsHUD-fuelContainer:hover{filter:brightness(1.2)}.mousehuntTooltip{transition-delay:.5s}.floatingIslandsHUD-craftingItem.show-progress{display:flex;flex-direction:row;justify-content:flex-end;padding-right:3px}.mh-ui-fi-glore-progress{margin-left:2px;font-size:9px;text-shadow:1px 1px 1px #242424}.floatingIslandPaperDoll-mod{pointer-events:none}.floatingIslandsAdventureBoardSkyMap-rerollQuantity.quantity{font-size:13px}.floatingIslandsAdventureBoardSkyPalace-wheel-face.loot_cache.real.active{margin-left:1px;border-radius:5px;box-shadow:0 0 13px 2px gold inset}.floatingIslandsAdventureBoardSkyMap-fuel-quantity{padding:2px;margin-top:-2px;font-size:13px;background-color:#302636}.floatingIslandsAdventureBoard-paragonItem.mousehuntTooltipParent{font-size:14px}a.floatingIslandsHUD-flightLogButton.mousehuntTooltipParent{top:2px;left:490px;background-image:url(https://i.mouse.rip/upscaled/flight_log_button.png?1);background-size:cover;transform:scale(1.2);transform-origin:left}.floatingIslandsHUD.island .floatingIslandsHUD-bait.sky_cheese.skyCheeseWarning:after{top:-10px;left:-9px;width:30px;height:30px}.floatingIslandsHUD.island .floatingIslandsHUD-bait.skyCheeseWarning .floatingIslandsHUD-bait-image.sky_cheese{box-shadow:inset 0 0 10px 3px #ff1b00}.floatingIslandsHUD-enemy-tooltip .floatingIslandsHUD-wardenShrine-status{padding-left:3px;font-size:13px;text-align:center;background-position:10px 20px}a.floatingIslandsHUD-islandLoot:hover,a.floatingIslandsHUD-islandLoot:focus{z-index:5}.floatingIslandsAirship.highlight .floatingIslandsAirship-part{transform:scale(1.1) rotate(2deg)}.floatingIslandsHUD-enemyContainer:hover .floatingIslandsHUD-enemy-thumb{transform:scale(1.2) rotate(3deg) translate(-5px)}.floatingIslandsHUD-enemy-thumbContainer{overflow:hidden}.floatingIslandsHUD-enemyContainer .floatingIslandsHUD-enemy-thumb{transition:.3s;transform-origin:left}\n';
}
});
// src/modules/location-hud/floating-islands/index.js
var toggleFuelClass, toggleFuel, addBossCountdown, addEnemyClass, getNextOcUpgradeCost, showGloreProgress, onSkyMapShow, showBWReminder, hud2, floating_islands_default2;
var init_floating_islands2 = __esm({
"src/modules/location-hud/floating-islands/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
init_styles49();
toggleFuelClass = (fuelCount, isActive) => {
if (isActive) {
fuelCount.classList.remove("active");
} else {
fuelCount.classList.add("active");
}
setTimeout(addBossCountdown, 200);
};
toggleFuel = () => {
var _a, _b, _c;
const fuel = document.querySelector(".floatingIslandsHUD-fuel-button");
if (!fuel) {
return;
}
const fuelCount = document.querySelector(".floatingIslandsHUD-fuel-quantity");
if (!fuelCount) {
return;
}
const enabled = ((_c = (_b = (_a = user == null ? void 0 : user.quests) == null ? void 0 : _a.QuestFloatingIslands) == null ? void 0 : _b.hunting_site_atts) == null ? void 0 : _c.is_fuel_enabled) || false;
if (enabled) {
fuelCount.classList.add("active");
}
fuel.addEventListener("click", (e) => {
toggleFuelClass(fuelCount, e.target.classList.contains("active"));
hg.views.HeadsUpDisplayFloatingIslandsView.toggleFuel(fuel);
});
};
addBossCountdown = () => {
var _a, _b, _c;
const enemyContainer = document.querySelector(".floatingIslandsHUD-goalContainer");
if (!enemyContainer) {
return;
}
const atts = ((_b = (_a = user == null ? void 0 : user.quests) == null ? void 0 : _a.QuestFloatingIslands) == null ? void 0 : _b.hunting_site_atts) || {};
if (!atts.has_enemy) {
return;
}
const isEnemyActiveOrDefeated = atts.has_encountered_enemy || atts.has_defeated_enemy;
if (isEnemyActiveOrDefeated) {
return;
}
let name = ((_c = atts.enemy) == null ? void 0 : _c.abbreviated_name) || "Enemy";
name = name.split(" ")[0];
const huntsRemaining = atts.enemy_encounter_hunts_remaining || 0;
const existing = document.querySelector(".mh-ui-fi-enemy-countdown");
if (existing) {
existing.remove();
}
const bossCountdown = document.createElement("div");
bossCountdown.classList.add("mh-ui-fi-enemy-countdown");
makeElement("span", "mh-ui-fi-enemy-countdown-name", name, bossCountdown);
makeElement("span", "mh-ui-fi-enemy-countdown-in", " in ", bossCountdown);
makeElement("span", "mh-ui-fi-enemy-countdown-hunts", huntsRemaining, bossCountdown);
enemyContainer.append(bossCountdown);
};
addEnemyClass = () => {
var _a, _b, _c, _d, _e, _f, _g, _h;
const container = document.querySelector(".floatingIslandsHUD");
if (!container) {
return;
}
const enemyContainer = document.querySelector(".floatingIslandsHUD-islandTitle");
if (!enemyContainer) {
return;
}
const name = ((_d = (_c = (_b = (_a = user == null ? void 0 : user.quests) == null ? void 0 : _a.QuestFloatingIslands) == null ? void 0 : _b.hunting_site_atts) == null ? void 0 : _c.enemy) == null ? void 0 : _d.name) || false;
const type = ((_h = (_g = (_f = (_e = user == null ? void 0 : user.quests) == null ? void 0 : _e.QuestFloatingIslands) == null ? void 0 : _f.hunting_site_atts) == null ? void 0 : _g.enemy) == null ? void 0 : _h.type) || false;
if (!name || !type) {
return;
}
const exists = document.querySelector(".mh-ui-fi-enemy-name");
if (exists) {
exists.remove();
}
makeElement("div", "mh-ui-fi-enemy-name", name, enemyContainer);
};
getNextOcUpgradeCost = (ocLevel) => {
switch (Number.parseInt(ocLevel, 10)) {
case 1:
return "35";
case 2:
return "150";
case 3:
return "500";
case 4:
return "1.2k";
case 5:
return "2k";
case 6:
return "3.5k";
case 7:
return "8k";
case 8:
return "10k";
default:
return false;
}
};
showGloreProgress = () => __async(void 0, null, function* () {
var _a, _b, _c;
const items2 = yield getUserItems(["floating_islands_cloud_gem_stat_item", "floating_islands_sky_ore_stat_item"]);
if (!(items2 && items2.length)) {
return;
}
const glass = document.querySelector(".floatingIslandsHUD-craftingItem.floating_islands_cloud_gem_stat_item");
const ore = document.querySelector(".floatingIslandsHUD-craftingItem.floating_islands_sky_ore_stat_item");
if (!glass || !ore) {
return;
}
const existing = document.querySelectorAll(".mh-ui-fi-glore-progress");
if (existing && existing.length) {
existing.forEach((el) => {
el.remove();
});
}
const nextUpgrade = getNextOcUpgradeCost(((_c = (_b = (_a = user == null ? void 0 : user.quests) == null ? void 0 : _a.QuestFloatingIslands) == null ? void 0 : _b.airship) == null ? void 0 : _c.oculus_level) || 0);
if (!nextUpgrade) {
return;
}
makeElement("div", "mh-ui-fi-glore-progress", ` / ${nextUpgrade}`, glass);
glass.classList.add("show-progress");
makeElement("div", "mh-ui-fi-glore-progress", ` / ${nextUpgrade}`, ore);
ore.classList.add("show-progress");
});
onSkyMapShow = () => {
const roll = document.querySelector(".floatingIslandsAdventureBoardSkyMap-rerollButton");
if (!roll) {
return;
}
roll.addEventListener("click", () => {
roll.classList.add("disabled");
roll.classList.add("no-click");
setTimeout(() => {
roll.classList.remove("disabled");
roll.classList.remove("no-click");
}, 300);
});
};
showBWReminder = () => {
var _a, _b, _c, _d, _e, _f, _g, _h;
const isStart = ((_b = (_a = user.enviroment_atts) == null ? void 0 : _a.hunting_site_atts) == null ? void 0 : _b.hunts_remaining) === 75 && ((_c = user.enviroment_atts) == null ? void 0 : _c.on_island);
const bwOff = !((_e = (_d = user.enviroment_atts) == null ? void 0 : _d.hunting_site_atts) == null ? void 0 : _e.is_fuel_enabled);
const bw = ((_h = (_g = (_f = user.enviroment_atts) == null ? void 0 : _f.items) == null ? void 0 : _g.bottled_wind_stat_item) == null ? void 0 : _h.quantity) || "0";
const hasBw = Number.parseInt(bw.toString().replaceAll(",", ""), 10) >= 50;
if (isStart && bwOff && hasBw) {
showHornMessage({
title: "Bottled Wind Reminder",
text: "Don't forget to activate your Bottled Wind!",
button: "Activate",
action: () => {
setTimeout(() => {
const button = document.querySelector(".floatingIslandsHUD-fuel-button");
if (button) {
button.click();
}
}, 750);
},
dismiss: 4e3,
image: "https://www.mousehuntgame.com/images/ui/hud/floating_islands/items/bottled_wind_stat_item.png?asset_cache_version=2"
});
}
};
hud2 = () => {
toggleFuel();
addBossCountdown();
setTimeout(addBossCountdown, 300);
setTimeout(addBossCountdown, 500);
setTimeout(addEnemyClass, 1e3);
addEnemyClass();
setTimeout(addEnemyClass, 500);
onRequest(() => {
addBossCountdown();
addEnemyClass();
}, "managers/ajax/environment/floating_islands.php");
showGloreProgress();
onDialogShow(onSkyMapShow, "floatingIslandsAdventureBoard.floatingIslandsDialog.skyPalace");
showBWReminder();
onRequest(showBWReminder);
};
floating_islands_default2 = () => __async(void 0, null, function* () {
addHudStyles(styles_default48);
hud2();
});
}
});
// src/modules/location-hud/forbidden-grove/styles.css
var styles_default49;
var init_styles50 = __esm({
"src/modules/location-hud/forbidden-grove/styles.css"() {
styles_default49 = ".forbiddenGroveHUD-grovebar-timeLeft{position:absolute;top:6px;left:171px;padding:1px 11px;font-size:12px;font-weight:900;color:#5f463d;background-color:#e1d1b7;border-top-right-radius:10px;box-shadow:0 -.5px 1px 1px #e1d1b7}\n";
}
});
// src/modules/location-hud/forbidden-grove/index.js
var updateClosingTime2, hud3, forbidden_grove_default;
var init_forbidden_grove = __esm({
"src/modules/location-hud/forbidden-grove/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
init_styles50();
init_cheese_selectors();
updateClosingTime2 = () => {
let timeLeftText = "";
const today = /* @__PURE__ */ new Date();
const rotationLength = 20;
const rotationsExact = (today.getTime() / 1e3 - 1285704e3) / 3600 / rotationLength;
const rotationsInteger = Math.floor(rotationsExact);
const partialrotation = (rotationsExact - rotationsInteger) * rotationLength;
if (partialrotation < 16) {
const closes = (16 - partialrotation).toFixed(3);
const hours = Math.floor(closes);
const minutes = Math.ceil((closes - Math.floor(closes)) * 60);
timeLeftText = `${hours}h ${minutes}m remaining`;
}
const timeLeftEl = document.createElement("div");
timeLeftEl.classList.add("forbiddenGroveHUD-grovebar-timeLeft");
timeLeftEl.innerText = timeLeftText;
return timeLeftEl;
};
hud3 = () => {
if ("forbidden_grove" !== getCurrentLocation()) {
return;
}
const hudBar = document.querySelector(".forbiddenGroveHUD-grovebar");
if (!hudBar) {
return;
}
const existing = document.querySelector(".forbiddenGroveHUD-grovebar-timeLeft");
if (existing) {
existing.remove();
}
const timeLeftEl = updateClosingTime2();
hudBar.append(timeLeftEl);
const timer = setInterval(updateClosingTime2, 60 * 1e3);
onEvent("travel_complete", () => {
clearInterval(timer);
});
};
forbidden_grove_default = () => __async(void 0, null, function* () {
addHudStyles(styles_default49);
cheese_selectors_default("forbidden-grove", [
"ancient_cheese",
"radioactive_blue_cheese",
"magical_radioactive_blue_cheese",
"moon_cheese",
"crescent_cheese"
]);
hud3();
});
}
});
// src/modules/location-hud/shared/folklore-forest/index.js
var saveHidden, isHidden, getToggleVisibilityMapping, toggleAllVisibility, isUnlocked, hideOrShowBlock, addToggle, addUpgradeVisibilityToggles, hasAddedUpgradeVisibilityToggles, folklore_forest_default2;
var init_folklore_forest2 = __esm({
"src/modules/location-hud/shared/folklore-forest/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
saveHidden = (upgradeId, isHidden2) => {
const upgradeIds = getSetting("visibility-toggles", {});
upgradeIds[upgradeId] = isHidden2;
saveSetting("visibility-toggles", upgradeIds);
};
isHidden = (upgradeId) => {
const setting = getSetting("visibility-toggles", {});
return setting[upgradeId] || false;
};
getToggleVisibilityMapping = () => {
return {
tackle_box: ".prologuePondView-fishingBoat-paperDoll-layer.tackle_box",
fridge_bait_box: ".prologuePondView-fishingBoat-paperDoll-layer.fridge_bait_box",
fishing_rod: ".prologuePondView-fishingBoat-paperDoll-layer.fishing_rod",
fish_net: ".prologuePondView-fishingBoat-paperDoll-layer.fish_net",
fishing_line: ".prologuePondView-fishingBoat-paperDoll-layer.fishing_line",
steam_reel: ".prologuePondView-fishingBoat-paperDoll-layer.steam_reel",
binding_thread: ".tableOfContentsView-bookContainer.active .tableOfContentsView-bookImage-layer.tableOfContentsView-bookImage-paper",
leather_cover: ".tableOfContentsView-bookContainer.active .tableOfContentsView-bookImage-layer.tableOfContentsView-bookImage-binding",
edge_gilding: ".tableOfContentsView-bookContainer.active .tableOfContentsView-bookImage-layer.tableOfContentsView-bookImage-silk",
gold_foil: ".tableOfContentsView-bookContainer.active .tableOfContentsView-bookImage-layer.tableOfContentsView-bookImage-goldFoil",
silver_quill: "",
golden_quill: ""
};
};
toggleAllVisibility = () => {
const mapping2 = getToggleVisibilityMapping();
const upgradeIds = Object.keys(mapping2);
upgradeIds.forEach((upgradeId) => {
hideOrShowBlock(upgradeId, isHidden(upgradeId));
});
};
isUnlocked = (upgradeId) => {
var _a, _b, _c;
let userQuest;
if ((_a = user.quests) == null ? void 0 : _a.QuestTableOfContents) {
userQuest = user.quests.QuestTableOfContents;
} else if ((_b = user.quests) == null ? void 0 : _b.QuestProloguePond) {
userQuest = user.quests.QuestProloguePond;
} else if ((_c = user.quests) == null ? void 0 : _c.QuestForewordFarm) {
userQuest = user.quests.QuestForewordFarm;
} else {
return false;
}
if (!userQuest || !userQuest.upgrades) {
return false;
}
const upgrade = userQuest.upgrades.find((u) => u.type === upgradeId);
if (!upgrade) {
return false;
}
return upgrade.is_unlocked;
};
hideOrShowBlock = (blockId, isBlockToggled) => {
const mapping2 = getToggleVisibilityMapping();
if (!mapping2[blockId]) {
const quill = document.querySelector(".tableOfContentsProgressView-quillContainer");
if (isBlockToggled) {
if ("golden_quill" === blockId) {
quill.classList.remove("quill--gold");
} else if ("silver_quill" === blockId) {
quill.classList.remove("quill--silver");
}
return;
}
if ("golden_quill" === blockId && isUnlocked("golden_quill")) {
quill.classList.add("quill--gold");
} else if ("silver_quill" === blockId && isUnlocked("silver_quill")) {
quill.classList.add("quill--silver");
}
return;
}
const selector = mapping2[blockId];
if (!selector) {
return;
}
const element = document.querySelector(selector);
if (!element) {
return;
}
element.classList.toggle("active", !isBlockToggled);
};
addToggle = (upgradeBlock) => {
if (upgradeBlock.classList.contains("toggle-added")) {
return;
}
const classList = upgradeBlock.classList.value;
const blockId = classList.replace("folkloreForestRegionView-dialog-block", "").replace("active", "").replace("prologue_pond", "").replace("table_of_contents", "").trim();
let isBlockToggled = isHidden(blockId);
const toggle = makeElement("div", ["mhui-folklore-forest-upgrade-toggle", "mousehuntActionButton", "tiny", "lightBlue"]);
const toggleText = makeElement("span", "upgrade-toggle-text", isBlockToggled ? "Show" : "Hide");
toggle.append(toggleText);
toggle.addEventListener("click", () => {
isBlockToggled = !isBlockToggled;
saveHidden(blockId, isBlockToggled);
toggleText.innerText = isBlockToggled ? "Show" : "Hide";
hideOrShowBlock(blockId, isBlockToggled);
upgradeBlock.classList.toggle("toggle-is-hidden", isBlockToggled);
});
const action = upgradeBlock.querySelector(".folkloreForestRegionView-dialog-block-action");
if (action) {
action.append(toggle);
} else {
upgradeBlock.append(toggle);
}
upgradeBlock.classList.add("toggle-added");
upgradeBlock.classList.add(isBlockToggled ? "toggle-is-hidden" : "toggle-is-visible");
};
addUpgradeVisibilityToggles = () => {
if (hasAddedUpgradeVisibilityToggles) {
return;
}
hasAddedUpgradeVisibilityToggles = true;
const pondUpgrades = document.querySelectorAll(".folkloreForestRegionView-dialog-blockContainer.upgrades .folkloreForestRegionView-dialog-block.prologue_pond.active");
const bookUpgrades = document.querySelectorAll(".folkloreForestRegionView-dialog-blockContainer.upgrades .folkloreForestRegionView-dialog-block.table_of_contents.active");
if (!pondUpgrades || !bookUpgrades) {
return;
}
for (const upgrade of pondUpgrades) {
addToggle(upgrade);
}
for (const upgrade of bookUpgrades) {
addToggle(upgrade);
}
};
hasAddedUpgradeVisibilityToggles = false;
folklore_forest_default2 = () => __async(void 0, null, function* () {
onDialogShow(addUpgradeVisibilityToggles, "fabledForestDialog");
onDialogHide(() => hasAddedUpgradeVisibilityToggles = false);
toggleAllVisibility();
onRequest(toggleAllVisibility);
});
}
});
// src/modules/location-hud/foreword-farm/styles.css
var styles_default50;
var init_styles51 = __esm({
"src/modules/location-hud/foreword-farm/styles.css"() {
styles_default50 = ".forewordFarmPlotView-plot-progress-label{font-size:13px;line-height:18px;vertical-align:middle;filter:drop-shadow(0 0 1px #000);-webkit-text-stroke:1px rgb(255 255 255 / 50%)}span.forewordFarmPlotView-plot-progress-catchText{font-size:11px;vertical-align:bottom}.folkloreForestRegionView-basicBait-quantity.quantity{top:13px;font-size:12px}.forewordFarmView-growthRate-value span{margin-right:2px}.forewordFarmView-growthRate-value{font-size:14px;border-radius:4px;box-shadow:0 0 20px #000 inset}.forewordFarmView-growthRate-label{margin-left:2px;font-size:11px;font-variant:all-small-caps}.forewordFarmView-harvestBin-quantity{top:-12px;padding:2px;font-size:23px}.forewordFarmView-harvestBin-claimButton-label{margin-left:64px;font-size:12px;color:#2c4e26!important;text-shadow:1px 1px 1px #d1d0cf}.forewordFarmPlotView-plot-queue-item-spacer{height:15px;background-color:#ccc}.forewordFarmPlotView-plot-queue-name.active{-webkit-line-clamp:3}a.forewordFarmPlotView-plot-queue-cancelButton{top:-12px;right:-4px;padding:2px;background-color:#ffbfbf;box-shadow:0 0 3px -1px #000 inset}.forewordFarmPlotView-plot-progressContainer .mousehuntTooltip{border-width:1px}.forewordFarmPlotView-plot-queue-item:hover .forewordFarmPlotView-plot-queue-cancelButton:hover{z-index:1;color:#000!important;background-color:#eb7c73}.forewordFarmPlotView.showQueues .forewordFarmPlotView-plot-queue-item{width:50%}.forewordFarmPlotView-plot-queue-list:hover{background:none}.forewordFarmPlotView-plot-queue-item:hover a.forewordFarmPlotView-plot-queue-cancelButton{background-color:#ffbfbf}.folkloreForestRegionView-fuel-quantity.quantity{font-size:13px}.forewordFarmPlantDialogView-plant-yieldContainer table{margin-top:5px}.forewordFarmPlantDialogView-plant-yieldContainer{width:45%;padding-top:5px}.forewordFarmPlantDialogView-plant-costContainer.num_items_3{display:flex;flex-flow:row wrap;width:50%}.forewordFarmPlantDialogView .folkloreForestRegionView-dialog-block-item{margin:0}.forewordFarmPlantDialogView-plant-name{width:100%;font-size:12px;text-align:center}.forewordFarmPlantDialogView-plant .folkloreForestRegionView-button.big{width:95px;font-size:12px}#overlayPopup.fabledForestDialog .jsDialog.background{padding:18px 5px 10px}.folkloreForestRegionView-dialog-block.highlight,.folkloreForestRegionView-dialog-block{border-top:none;border-radius:0;box-shadow:none}.forewordFarmPlantDialogView-row{border:1px solid #897225;border-radius:0}.forewordFarmPlantDialogView-plant{border:none}.forewordFarmPlantDialogView-plant-header{border-bottom:1px solid #897225;box-shadow:0 0 6px #134220 inset}.forewordFarmPlantDialogView-row .forewordFarmPlantDialogView-plant:nth-child(2) .forewordFarmPlantDialogView-plant-content{margin-left:-1px;border-left:1px solid #897225}.forewordFarmPlotView-plot-progress-bar{top:-2px;bottom:-1px;border-right:none;border-left:none;box-shadow:0 1px #999,0 -1px #999}.forewordFarmPlotView-plot-progress-plantIcon.current{top:-5px;left:-24px}.forewordFarmPlotView.showQueues .forewordFarmPlotView-plot-progressContainer{width:80px;height:20px;margin-top:114px}.forewordFarmPlotView-plot-progress-plantIcon.queued{top:-1px;right:-17px;width:22px;height:22px}.forewordFarmPlotView.showPlantIconHighlight .forewordFarmPlotView-plot.highlight .forewordFarmPlotView-plot-progress-plantIcon.highlight{box-shadow:0 0 1px 2px #6adf4fd4}.forewordFarmHarvestBin-itemImage .quantity{font-size:16px}\n";
}
});
// src/modules/location-hud/foreword-farm/index.js
var foreword_farm_default2;
var init_foreword_farm2 = __esm({
"src/modules/location-hud/foreword-farm/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
init_folklore_forest2();
init_styles44();
init_styles51();
foreword_farm_default2 = () => __async(void 0, null, function* () {
addHudStyles([styles_default43, styles_default50]);
folklore_forest_default2();
});
}
});
// src/modules/location-hud/fort-rox/styles.css
var styles_default51;
var init_styles52 = __esm({
"src/modules/location-hud/fort-rox/styles.css"() {
styles_default51 = '.fortRoxHUD-timeline{width:693px;box-shadow:0 0 2px 7px #5c3330}.fortRoxHUD-huntsRemaining.mousehuntTooltipParent{top:45px;right:13px;left:unset;background-color:#e2e2e2;box-shadow:inset 0 0 3px #c0b6b3}a.fortRoxHUD-retreat{top:70px}.fortRoxHUD-timeline-phase-name,.fortRoxHUD-timeline-phase-marker.active .fortRoxHUD-timeline-phase-name{font-size:13px;font-variant:normal;text-shadow:0 0 3px #131313;filter:drop-shadow(0 1px 1px 131313)}.fortRoxHUD-timeline-phase-marker.past .fortRoxHUD-timeline-phase-name{text-shadow:0 0 3px #7b7a7a;filter:drop-shadow(0 1px 1px #7b7a7a)}.fortRoxHUD-fort-upgrade-boundingBox-name{z-index:1;background-color:#c0c0ba}.fortRoxHUD-fort-upgrade-boundingBox:hover .fortRoxHUD-fort-upgrade-boundingBox-name{display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:80px;font-size:11px}.fortRoxHUD-timeline-phase-time-tooltip{min-width:75px;margin-top:20px;margin-left:-20px}.fortRoxHUD-timeline-phase-time-tooltip .mousehuntTooltip-content{display:flex;flex-direction:column;align-items:center}.fortRoxHUD-timeline-phase-time-tooltip .mousehuntTooltip-content .tooltip-power{margin-top:5px}.fortRoxHUD-huntsRemaining .mousehuntTooltip{top:35px}.fortRoxHUD-timeline-phase-marker:before{position:absolute;top:-6px;left:-10px;z-index:5;display:inline-block;width:18px;height:18px;vertical-align:middle;content:"";background-image:url(https://www.mousehuntgame.com/images/powertypes/shadow.png?asset_cache_version=2);filter:drop-shadow(0 0 1px #fff);background-repeat:no-repeat;background-size:100%}.fortRoxHUD-timeline-phase-marker{position:relative}.fortRoxHUD-timeline-phase-marker.stage_three:before{background-image:none}.fortRoxHUD-timeline-phase-marker.stage_four:before,.fortRoxHUD-timeline-phase-marker.stage_five:before{background-image:url(https://www.mousehuntgame.com/images/powertypes/arcane.png?asset_cache_version=2)}.fortRoxHUD .quantity{padding:2px;font-size:12px}.fortRoxHUD-dialog-craftingItem-quantity{top:5px}.complete .fortRoxHUD-dialog-upgrade-costContainer{opacity:.6}.fortRoxHUD-bossWarning-hasMultiplier.active b{font-size:12px}.fortRoxHUD-bossWarning{width:auto;padding:5px 30px 5px 40px;font-size:11px}.fortRoxHUD-bossWarning:after{top:3px;left:3px}.frox-has-portal{filter:drop-shadow(0 0 5px #ffde2f) drop-shadow(0 0 15px #ffde2f)}.frox-no-portal{filter:grayscale(1);opacity:.8}.frox-no-portal:hover,.frox-no-portal:focus{filter:grayscale(.2);opacity:1}.fortRoxHUD-spellContainer{top:169px;left:25px}a.fortRoxHUD-upgradeButton.disabled{opacity:.4}a.fortRoxHUD-upgradeButton.disabled:hover,a.fortRoxHUD-upgradeButton.disabled:focus{opacity:1}a.fortRoxHUD-spellTowerButton{margin-left:80px}a.fortRoxHUD-spellTowerButton.normal.inactive{filter:hue-rotate(238deg)}.mh-frox-wall-hp{padding:3px}.fortRoxHUD-hp{top:99px;left:390px;padding-top:2px}.frox-wall-perfect{background-color:#7aff53}.frox-wall-high{background-color:#a9ff53}.frox-wall-medium{background-color:#fff253}.frox-wall-low{background-color:#ff9b53}.frox-wall-very-low{background-color:#ff5353}.fortRoxHUD-dialog-upgrade-name{padding:5px 0}.fortRoxHUD-dialog-upgrade-description{font-size:10px;font-style:italic}.fortRoxHUD-dialog-upgrade-costContainer-title{display:none}.fortRoxHUD-dialog-category-description{padding:10px 0}.fortRoxHUD-dialog-upgrade-costContainer{display:flex;flex-direction:row;align-items:center;justify-content:center;margin-top:10px}.fortRoxHUD-dialog-upgrade-status.complete .mousehuntActionButton{opacity:0}.fortRoxHUD-dialog-upgrade.cannotUpgrade .fortRoxHUD-dialog-upgrade-status.cannotUpgrade{display:flex;flex-direction:column;align-items:center}.complete .fortRoxHUD-dialog-upgrade-costContainer .mousehuntTooltipParent .mousehuntTooltip{display:none}\n';
}
});
// src/modules/location-hud/fort-rox/index.js
var phaseLengths, makeTooltip2, updateNightBar, updateUpgradeTooltips, updateWallHP, addPortalClass, hud4, fort_rox_default2;
var init_fort_rox2 = __esm({
"src/modules/location-hud/fort-rox/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
init_styles52();
phaseLengths = {
stage_one: {
hunts: 35,
powerType: "Shadow"
},
stage_two: {
hunts: 25,
powerType: "Shadow"
},
stage_three: {
hunts: 10,
powerType: "Arcane or Shadow"
},
stage_four: {
hunts: 25,
powerType: "Arcane"
},
stage_five: {
hunts: 35,
powerType: "Arcane"
}
};
makeTooltip2 = (text, direction = "top", customClass = []) => {
const existing = document.querySelectorAll(".added-frox-tooltip");
if (existing.length) {
existing.forEach((tooltip2) => {
tooltip2.remove();
});
}
const tooltip = makeElement("div", ["added-frox-tooltip", "mousehuntTooltip", "tight", direction, ...customClass]);
makeElement("div", "mousehuntTooltip-content", text, tooltip);
makeElement("div", "mousehuntTooltip-arrow", "", tooltip);
return tooltip;
};
updateNightBar = () => {
const bar = document.querySelector(".fortRoxHUD-timeline-phases");
if (!bar) {
return false;
}
const phaseBars = bar.querySelectorAll(".fortRoxHUD-timeline-phase-marker");
if (!phaseBars.length) {
return false;
}
phaseBars.forEach((phaseBar) => {
var _a, _b, _c, _d;
const phaseClass = [...phaseBar.classList].find((className) => {
return className.startsWith("stage_");
});
const phaseLength = phaseLengths[phaseClass];
if (!phaseLength) {
return;
}
const phaseTime = document.createElement("div");
phaseTime.classList.add("fortRoxHUD-timeline-phase-time");
const tooltipText = [];
if (phaseBar.classList.contains("past")) {
tooltipText.push("Phase complete.");
} else if (phaseClass === ((_b = (_a = user == null ? void 0 : user.quests) == null ? void 0 : _a.QuestFortRox) == null ? void 0 : _b.current_stage)) {
tooltipText.push(`${(_d = (_c = user == null ? void 0 : user.quests) == null ? void 0 : _c.QuestFortRox) == null ? void 0 : _d.hunts_until_next_phase} / ${phaseLength.hunts} hunts remaining. <div class='tooltip-power'>Use ${phaseLength.powerType} power type.</div>`);
} else {
tooltipText.push(`${phaseLength.hunts} hunts. <div class='tooltip-power'>Use ${phaseLength.powerType} power type.</div>`);
}
const tooltip = makeTooltip2(tooltipText.join(" "), "bottom", "fortRoxHUD-timeline-phase-time-tooltip");
phaseBar.append(tooltip);
phaseBar.classList.add("mousehuntTooltipParent");
});
};
updateUpgradeTooltips = () => {
const upgradeTooltips = document.querySelectorAll(".fortRoxHUD-fort-upgrade-boundingBox");
if (!upgradeTooltips.length) {
return false;
}
const upgradeInfo = document.querySelectorAll(".fortRoxHUD-fort-upgrade-level-info");
if (upgradeInfo.length) {
upgradeInfo.forEach((info) => {
info.remove();
});
}
upgradeTooltips.forEach((tooltip) => {
var _a, _b;
const type = tooltip.getAttribute("onclick").replace("app.views.HeadsUpDisplayView.hud.fortRoxShowConfirm('upgradeFort', ", "").replace("); return false;", "").replaceAll("'", "");
const upgradeProgress = (_b = (_a = user == null ? void 0 : user.quests) == null ? void 0 : _a.QuestFortRox) == null ? void 0 : _b.upgrades[type];
const upgradeKeys = Object.keys(upgradeProgress);
const completedUpgrades = upgradeKeys.reduce((count2, key) => {
if (upgradeProgress[key].includes("complete")) {
count2++;
}
return count2;
}, 0);
const name = tooltip.querySelector(`.fortRoxHUD-fort-upgrade-boundingBox-level.level_${completedUpgrades}`);
let upgradeText = `(Level ${completedUpgrades}/${upgradeKeys.length - 1})`;
if (completedUpgrades === upgradeKeys.length - 1) {
upgradeText = "(Max Level)";
}
const upgrade = makeElement("div", "fortRoxHUD-fort-upgrade-level-info", upgradeText, name);
upgrade.classList.add("frox-upgrade-level-info");
});
};
updateWallHP = () => {
const exists = document.querySelector(".mh-frox-wall-hp");
if (exists) {
exists.remove();
}
const hpBox = document.querySelector(".fortRoxHUD-hp");
if (!hpBox) {
return false;
}
const wallPercent = user.quests.QuestFortRox.hp_percent.toFixed(0);
const wrapper = makeElement("div", "mh-frox-wall-hp");
makeElement("div", "mh-frox-wall-hp-text", `${wallPercent}%`, wrapper);
hpBox.append(wrapper);
hpBox.classList.remove("frox-wall-very-low", "frox-wall-low", "frox-wall-medium", "frox-wall-high", "frox-wall-perfect");
const hp = Number.parseInt(user.quests.QuestFortRox.hp_percent, 10);
if (hp === 100) {
hpBox.classList.add("frox-wall-perfect");
} else if (hp >= 75) {
hpBox.classList.add("frox-wall-high");
} else if (hp >= 50) {
hpBox.classList.add("frox-wall-medium");
} else if (hp >= 25) {
hpBox.classList.add("frox-wall-low");
} else {
hpBox.classList.add("frox-wall-very-low");
}
};
addPortalClass = () => {
var _a, _b, _c, _d;
const portal = document.querySelector(".fortRoxHUD.dawn .fortRoxHUD-enterLairButton");
if (!portal) {
return false;
}
portal.classList.remove("frox-no-portal", "frox-has-portal");
const hasPortal = Number.parseInt((_d = (_c = (_b = (_a = user == null ? void 0 : user.quests) == null ? void 0 : _a.QuestFortRox) == null ? void 0 : _b.items) == null ? void 0 : _c.fort_rox_lair_key_stat_item) == null ? void 0 : _d.quantity, 10);
portal.classList.add(hasPortal ? "frox-has-portal" : "frox-no-portal");
};
hud4 = () => {
updateNightBar();
updateUpgradeTooltips();
updateWallHP();
addPortalClass();
};
fort_rox_default2 = () => __async(void 0, null, function* () {
addHudStyles(styles_default51);
hud4();
});
}
});
// src/modules/location-hud/fungal-cavern/styles.css
var styles_default52;
var init_styles53 = __esm({
"src/modules/location-hud/fungal-cavern/styles.css"() {
styles_default52 = ".fungalCavernHUD-craftingItem-quantity.quantity{position:absolute;top:1px;left:-7px;width:52px;height:15px;font-size:11px;font-weight:400;background-color:#d7d5d4;border:1px solid #424140;border-radius:4px;box-shadow:1px 0 3px 1px #424140}.fungalCavernHUD-craftingItemContainer{top:-6px;bottom:7px;display:flex;flex-direction:column;justify-content:space-evenly;height:auto}.fungalCavernHUD-craftingItem.on .fungalCavernHUD-craftingItem-status{display:none}.on .fungalCavernHUD-craftingItem-quantity.quantity{background-color:#97df7b}.fungalCavernHUD-bait-quantity.quantity{width:34px;margin-top:-1px;margin-left:-4px;font-size:11px;font-weight:400;background-color:#d7d5d4;border:1px solid #424140;border-radius:3px;box-shadow:1px 0 3px 1px #424140}span.fungalCavernHUD-background-title-zone{padding:2px;font-size:16px;color:#d7d5d4;vertical-align:middle;background-color:#78645a;border:1px solid #9a887e}.fungalCavernHUD-craftingItem.rare .fungalCavernHUD-craftingItem-status{display:none}.rare .fungalCavernHUD-craftingItem-quantity.quantity{background-color:#d3ffc1}.fungalCavernHUD .armNow.active{filter:hue-rotate(131deg)}\n";
}
});
// src/modules/location-hud/fungal-cavern/index.js
var fungal_cavern_default;
var init_fungal_cavern = __esm({
"src/modules/location-hud/fungal-cavern/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
init_styles53();
fungal_cavern_default = () => __async(void 0, null, function* () {
addHudStyles(styles_default52);
});
}
});
// src/modules/location-hud/great-gnarled-tree/index.js
var great_gnarled_tree_default;
var init_great_gnarled_tree = __esm({
"src/modules/location-hud/great-gnarled-tree/index.js"() {
init_sentry_release_injection_stub();
init_cheese_selectors();
great_gnarled_tree_default = () => __async(void 0, null, function* () {
cheese_selectors_default("great-gnarled-tree", [
"gnarled_cheese"
]);
});
}
});
// src/modules/location-hud/iceberg/styles.css
var styles_default53;
var init_styles54 = __esm({
"src/modules/location-hud/iceberg/styles.css"() {
styles_default53 = '.icebergHud.bonus .bonus_timeline .turnsLeft{top:0;display:inline-flex;align-items:center;border-color:#666;border-radius:0}.remaining-distance,.remaining-stage-distance{margin:.25em 0}.icebergStatusTooltip{bottom:-25px;left:calc(100% + 4px);width:320px;margin-left:1em}.icebergStatusTooltip .mousehuntTooltip-content{display:grid;grid-template-columns:2fr 1fr;gap:10px;align-items:center}.icebergStatusTooltip .hunts-wrapper{display:flex;flex-direction:column;align-items:center;justify-content:space-evenly;height:100%}.icebergStatusTooltip .hunts-wrapper .average-hunts{font-size:1.25em}.icebergStatusTooltip .hunts-wrapper div{margin-top:.75em}.icebergStatusTooltip .hunts-wrapper div:first-child{margin-top:0;text-align:center}.icebergStatusTooltip .iceberg-sections{width:190px}.icebergStatusTooltip .iceberg-section{position:relative;display:flex;place-items:center start;justify-content:space-between;width:180px;margin-bottom:.25em;overflow:visible}.icebergStatusTooltip .iceberg-section-name{width:auto;min-width:110px}.icebergStatusTooltip .iceberg-section.complete{color:#989898}.icebergStatusTooltip .iceberg-section.complete:after{position:absolute;top:-2px;right:-15px;width:12px;height:12px;content:"";background:url(https://www.mousehuntgame.com/images/ui/hud/meadow_checkmark.png?asset_cache_version=2) 0 0 no-repeat;background-size:contain;opacity:.6}.icebergStatusTooltip .iceberg-section.incomplete{color:#52969b}.icebergStatusTooltip .iceberg-section.current:before{position:absolute;top:0;left:-7px;font-size:9px;color:#579ca2;vertical-align:middle;content:"\\2022";border-radius:3px}.deep-warning{position:absolute;top:5px;bottom:5px;left:175px;z-index:3;display:flex;align-items:center;justify-content:center;width:300px;padding:1em;color:#000;text-align:center;background-color:#ffbfbf;border-radius:10px;opacity:.8}.deep-warning-text{max-width:250px;font-size:11px;line-height:15px;color:#000;text-align:left}.icebergHud .timeline .resetIceberg{top:10px;right:25px;z-index:4;cursor:pointer}.icebergHud .timeline .resetIceberg:hover,.icebergHud .timeline .resetIceberg:focus{color:#a5cedf;opacity:1}#icebergDrill{z-index:2}.icebergHud .cutaway .wax .quantity,.icebergHud .cutaway .sticky .quantity{width:38px;padding:0;margin-left:3px;font-size:12px;font-weight:400;border-color:#89989e;border-radius:3px 3px 4px 4px}.icebergHud .cutaway .sticky .quantity{margin-top:25px}.icebergHud .cutaway .drill .quantity{top:26px;left:108px;font-size:14px;text-align:left;text-shadow:1px 1px #000}.iceberg-section.current{font-weight:900}\n';
}
});
// src/modules/location-hud/iceberg/index.js
var getSections, addProgressToQuestData, roundProgress, getTooltipText, addDeepWarning, hud5, iceberg_default2;
var init_iceberg2 = __esm({
"src/modules/location-hud/iceberg/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
init_styles54();
getSections = (quest) => {
const sections = [
{
name: "Treacherous Tunnels",
where: "0-300ft",
length: 300,
complete: quest.complete.tunnels
},
{
name: "Brutal Bulwark",
where: "300-600ft",
length: 300,
complete: quest.complete.bulwark
},
{
name: "Bombing Run",
where: "600-1600ft",
length: 1e3,
complete: quest.complete.bombing
},
{
name: "The Mad Depths",
where: "1600-1800ft",
length: 200,
complete: quest.complete.depths
},
{
name: "Icewing's Lair",
where: "1800 ft",
length: 0,
complete: quest.complete.lair
}
];
if (quest.isDeep) {
sections.push({
name: "Hidden Depths",
where: "1800-2100 ft",
length: 300,
complete: false
});
}
return sections;
};
addProgressToQuestData = (data) => {
const depth = data.progress;
const remaining = {
stage: 0,
stagePercent: 0,
total: 1800 - depth,
totalPercent: depth / 1800 * 100,
complete: {
tunnels: false,
bulwark: false,
bombing: false,
depths: false,
lair: false
},
isLair: false
};
if (depth < 300) {
remaining.stage = 300 - depth;
remaining.stagePercent = remaining.stage / 300 * 100;
} else if (depth < 600) {
remaining.stage = 600 - depth;
remaining.stagePercent = remaining.stage / 300 * 100;
remaining.complete.tunnels = true;
} else if (depth < 1600) {
remaining.stage = 1600 - depth;
remaining.stagePercent = remaining.stage / 1e3 * 100;
remaining.complete.tunnels = true;
remaining.complete.bulwark = true;
} else if (depth < 1800) {
remaining.stage = 1800 - depth;
remaining.stagePercent = remaining.totalPercent;
remaining.complete.tunnels = true;
remaining.complete.bulwark = true;
remaining.complete.bombing = true;
} else {
remaining.stage = 0;
remaining.stagePercent = 0;
remaining.isLair = true;
remaining.complete.tunnels = true;
remaining.complete.bulwark = true;
remaining.complete.bombing = true;
remaining.complete.depths = true;
}
if (data.isDeep) {
remaining.stage = 200 - depth;
remaining.stagePercent = depth / 200 * 100;
remaining.totalPercent = remaining.stagePercent;
remaining.progress = depth + 1800;
}
remaining.avg = data.progress / data.hunts;
if (data.isDeep) {
remaining.avg = (depth + 1800) / data.hunts;
}
remaining.stageHunts = Math.ceil(remaining.stage / remaining.avg);
return Object.assign(data, remaining);
};
roundProgress = (progress) => {
if (progress >= 100) {
return 100;
}
if (progress <= 0) {
return 0;
}
const percent = progress.toFixed(2);
if (percent.slice(-2) === "00") {
return percent.slice(0, -2);
}
if (percent.slice(-1) === "0") {
return percent.slice(0, -1);
}
return percent;
};
getTooltipText = (quest) => {
const wrapper = document.createElement("div");
wrapper.classList.add("mousehuntTooltip-content");
const progress = document.createElement("div");
progress.classList.add("hunts-wrapper");
const averageHunts = document.createElement("div");
averageHunts.classList.add("average-hunts");
averageHunts.innerText = `Avg. ${roundProgress(quest.avg)} ft/hunt`;
progress.append(averageHunts);
if (!quest.isLair) {
const stageProgressPercent = document.createElement("div");
stageProgressPercent.classList.add("stage-progress-percent");
stageProgressPercent.innerText = `Stage Progress: ${roundProgress(quest.stagePercent)}%`;
progress.append(stageProgressPercent);
if (!quest.isDeep) {
const totalProgressPercent = document.createElement("div");
totalProgressPercent.classList.add("total-progress-percent");
totalProgressPercent.innerText = `Total Progress: ${roundProgress(quest.totalPercent)}%`;
progress.append(totalProgressPercent);
}
}
wrapper.append(progress);
const sectionsWrapper = document.createElement("div");
sectionsWrapper.classList.add("iceberg-sections");
const sections = getSections(quest);
let currentSection = false;
sections.forEach((sectionData) => {
if (quest.isDeep && sectionData.name !== "Hidden Depths") {
sectionData.complete = true;
}
const section = document.createElement("div");
section.classList.add("iceberg-section", sectionData.complete ? "complete" : "incomplete");
if (!currentSection && !sectionData.complete) {
section.classList.add("current");
currentSection = true;
}
const sectionName = document.createElement("div");
sectionName.classList.add("iceberg-section-name");
sectionName.innerText = sectionData.name;
section.append(sectionName);
const sectionLength = document.createElement("div");
sectionLength.classList.add("iceberg-section-length");
sectionLength.innerText = sectionData.where;
section.append(sectionLength);
sectionsWrapper.append(section);
});
wrapper.append(sectionsWrapper);
return wrapper;
};
addDeepWarning = () => __async(void 0, null, function* () {
const equippedBase = Number.parseInt(user.base_item_id) || 0;
if (equippedBase === 899 || // Deep Freeze Base
equippedBase === 3256 || // Iceberg Boiler Base
equippedBase === 2392) {
return;
}
const bases = yield getUserItems(["deep_freeze_base", "iceberg_boiler_base", "ultimate_iceberg_base"]);
const equippableBases = [];
let hasBase = false;
bases.forEach((base) => {
if (base.quantity > 0) {
hasBase = true;
equippableBases.push({ name: base.name, id: base.item_id });
}
});
if (!hasBase) {
return;
}
const appendTo = document.querySelector(".cutawayClippingMask");
if (!appendTo) {
return;
}
const equippableBasesText = equippableBases.map((base, index) => {
if (index === 0) {
return base.name;
}
if (index === equippableBases.length - 1) {
return `or ${base.name}`;
}
return base.name;
}).join(" ");
const warning = document.createElement("div");
warning.classList.add("deep-warning");
const warningText = document.createElement("div");
warningText.classList.add("deep-warning-text");
warningText.innerText = `To access the Hidden Depths, make sure you equip ${equippableBasesText}.`;
const warningIcon = document.createElement("img");
warningIcon.classList.add("deep-warning-icon");
warningIcon.src = "https://www.mousehuntgame.com/images/ui/journal/pillage.gif?asset_cache_version=2";
warning.append(warningIcon);
warning.append(warningText);
appendTo.append(warning);
});
hud5 = () => __async(void 0, null, function* () {
if ("iceberg" !== getCurrentLocation()) {
return;
}
let quest = {
progress: user.quests.QuestIceberg.user_progress || 0,
hunts: user.quests.QuestIceberg.turns_taken || 0,
chests: user.quests.QuestIceberg.chests || [],
isDeep: user.quests.QuestIceberg.in_bonus || false
};
const huntInfo = document.querySelector(".icebergHud .depth");
if (!huntInfo) {
return;
}
quest = addProgressToQuestData(quest);
const existingStage = huntInfo.querySelector(".remaining-stage-distance");
if (existingStage) {
existingStage.remove();
}
if (!quest.isLair) {
const remainingStageDistance = document.createElement("div");
remainingStageDistance.classList.add("remaining-stage-distance");
const destination = quest.isDeep ? "Deep" : "next stage";
if (quest.stage !== quest.total) {
remainingStageDistance.innerText = `${quest.stage} feet until ${destination}`;
if (quest.stageHunts > 0) {
remainingStageDistance.innerText += ` (~${quest.stageHunts} hunts)`;
}
}
huntInfo.insertBefore(remainingStageDistance, huntInfo.lastChild);
}
const existingDistance = huntInfo.querySelector(".remaining-distance");
if (existingDistance) {
existingDistance.remove();
}
if (!quest.isLair && !quest.isDeep) {
const remainingDistance = document.createElement("div");
remainingDistance.classList.add("remaining-distance");
if (quest.total !== 0) {
remainingDistance.innerText = `${quest.total} feet until Icewing's Lair`;
if (quest.totalHunts > 0) {
remainingDistance.innerText += `(~${quest.totalHunts} hunts)`;
}
}
huntInfo.insertBefore(remainingDistance, huntInfo.lastChild);
}
const existingTooltip = huntInfo.querySelector(".icebergStatusTooltip");
if (existingTooltip) {
existingTooltip.remove();
}
huntInfo.classList.add("mousehuntTooltipParent");
const tooltip = makeElement("div", "icebergStatusTooltip");
tooltip.classList.add("mousehuntTooltip", "right", "noEvents");
const tooltipContent = getTooltipText(quest);
tooltip.append(tooltipContent);
makeElement("div", "mousehuntTooltip-arrow", "", tooltip);
huntInfo.append(tooltip);
if (quest.isLair) {
addDeepWarning();
}
});
iceberg_default2 = () => __async(void 0, null, function* () {
addHudStyles(styles_default53);
hud5();
});
}
});
// src/modules/location-hud/jungle-of-dread/index.js
var jungle_of_dread_default;
var init_jungle_of_dread = __esm({
"src/modules/location-hud/jungle-of-dread/index.js"() {
init_sentry_release_injection_stub();
init_cheese_selectors();
jungle_of_dread_default = () => __async(void 0, null, function* () {
cheese_selectors_default("jungle-of-dread", [
"vanilla_stilton_cheese",
"vengeful_vanilla_stilton_cheese",
"spicy_havarti_cheese",
"pungent_havarti_cheese",
"creamy_havarti_cheese",
"magical_havarti_cheese",
"crunchy_havarti_cheese",
"sweet_havarti_cheese"
]);
});
}
});
// src/modules/location-hud/kings-arms/index.js
var kings_arms_default;
var init_kings_arms = __esm({
"src/modules/location-hud/kings-arms/index.js"() {
init_sentry_release_injection_stub();
init_cheese_selectors();
kings_arms_default = () => __async(void 0, null, function* () {
cheese_selectors_default("kings-arms", [
"gilded_cheese"
]);
});
}
});
// src/modules/location-hud/kings-gauntlet/index.js
var kings_gauntlet_default;
var init_kings_gauntlet = __esm({
"src/modules/location-hud/kings-gauntlet/index.js"() {
init_sentry_release_injection_stub();
init_cheese_selectors();
kings_gauntlet_default = () => __async(void 0, null, function* () {
cheese_selectors_default("kings-gauntlet", [
"super_brie_cheese",
"gauntlet_cheese_2",
"gauntlet_cheese_3",
"gauntlet_cheese_4",
"gauntlet_cheese_5",
"gauntlet_cheese_6",
"gauntlet_cheese_7",
"gauntlet_cheese_8"
]);
});
}
});
// src/modules/location-hud/labyrinth/styles.css
var styles_default54;
var init_styles55 = __esm({
"src/modules/location-hud/labyrinth/styles.css"() {
styles_default54 = '.mh-ui-labyrinth-step-counter{padding-right:5px;margin-left:5px;font-weight:900;background-color:#000}.labyrinthHUD-clueBar-totalContainer{z-index:10;width:auto;padding-left:4px;font-size:12px;border-radius:6px}.labyrinthHUD-clue{display:flex;align-items:center;justify-content:flex-start;font-size:10px}.labyrinthHUD-clue-name{overflow:visible;text-overflow:unset}.mh-ui-labyrinth-clue-count{padding:4px;color:#050505;border-top-right-radius:5px;border-bottom-right-radius:5px}.y .labyrinthHUD-clue-name,.y .mh-ui-labyrinth-clue-count{background-color:#d851ff66}.h .labyrinthHUD-clue-name,.h .mh-ui-labyrinth-clue-count{background-color:#21e2ff66}.s .labyrinthHUD-clue-name,.s .mh-ui-labyrinth-clue-count{background-color:#e9630066}.t .labyrinthHUD-clue-name,.t .mh-ui-labyrinth-clue-count{background-color:#ffe40066}.f .labyrinthHUD-clue-name,.f .mh-ui-labyrinth-clue-count{background-color:#11f40066}.m .labyrinthHUD-clue-name,.m .mh-ui-labyrinth-clue-count{color:#d3c5c5;background-color:#6a6a6a66}.labyrinthHUD-item-quantity,.labyrinthHUD-scrambleDoors-quantity,.labyrinthHUD-scrambleClues-quantity,.labyrinthHUD-toggleLantern-quantity.quantity{position:absolute;top:6px;padding:0 5px;font-size:12px;text-align:center;background-color:#000;border-radius:5px}.labyrinthHUD-item-quantity.quantity{top:6px;left:5px;display:block;width:30px;margin:0!important}.labyrinthHUD-scrambleDoors-quantity,.labyrinthHUD-scrambleClues-quantity,.labyrinthHUD-toggleLantern-quantity.quantity{display:inline-flex;align-items:center;width:auto;height:18px;margin-right:11px}.labyrinthHUD-scrambleClues-quantity.quantity{left:-6px}.labyrinthHUD-toggleLantern-quantity.quantity{right:-5px}.labyrinthHUD-scrambleDoors-quantity.quantity{top:.5px;right:-7px;height:9.5px;padding:4px;pointer-events:none}.labyrinthHUD-scrambleClues:hover .labyrinthHUD-scrambleClues-name,.labyrinthHUD-scrambleClues.disabled .labyrinthHUD-scrambleClues-name,.labyrinthHUD-scrambleClues:focus .labyrinthHUD-scrambleClues-name,.labyrinthHUD-scrambleClues-name{position:relative;left:75px;width:0;color:transparent!important;text-shadow:none;pointer-events:none}.labyrinthHUD-scrambleClues-name:after{position:absolute;top:0;right:-30px;display:block;width:50px;color:#eee;text-align:center;text-shadow:0 0 1px #000;content:"Compass Magnet"}.labyrinthHUD-item:nth-child(1) .labyrinthHUD-item-name,.labyrinthHUD-item:nth-child(2) .labyrinthHUD-item-name,.labyrinthHUD-item:nth-child(3) .labyrinthHUD-item-name,.labyrinthHUD-item:nth-child(4) .labyrinthHUD-item-name,.labyrinthHUD-item:nth-child(5) .labyrinthHUD-item-name{width:96px;margin-left:47px;font-size:11px;font-weight:900;text-align:center;text-shadow:0 0 1px #000;background:linear-gradient(180deg,#70707000,#a8a8a8,#70707000);border-radius:20px}.labyrinthHUD-item:hover .labyrinthHUD-item-location,.labyrinthHUD-item:focus .labyrinthHUD-item-location{position:absolute;top:unset;bottom:-25px;padding:3px;font-size:9px;color:#000;text-align:center;background:#fff;border:2px solid #000;border-radius:10px;box-shadow:2px 3px 4px #666}.mh-ui-labyrinth-door-text{position:absolute;inset:0;display:inline-flex;flex-direction:column;align-items:center;justify-content:center;font-size:11px;color:#fff;opacity:.8}.mh-ui-laby-steps{margin-bottom:3px;font-size:13px}.labyrinthHUD-doorContainer{position:relative}.labyrinthHUD-door.disabled.mystery{filter:brightness(.4)}.labyrinthHUD-door.mh-ui-labyrinth-highlight{filter:brightness(1.1)}.labyrinthHUD-door.mh-ui-labyrinth-highlight:before{position:absolute;top:5px;right:15px;z-index:1;width:25px;height:25px;overflow:hidden;content:"";background:url(https://www.mousehuntgame.com/images/ui/events/winter_hunt_2013/checkmark.png?asset_cache_version=2) no-repeat;background-size:contain}.labyrinthHUD-confirm-padding .labyrinthHUD-door.mh-ui-labyrinth-highlight:after{background:none}.labyrinthHUD-clueDrawer{padding-bottom:11px;font-size:11px}.labyrinthHUD-clueDrawer-description{padding:5px 0 10px;line-height:17px;color:#fafafa;text-align:center}.labyrinthHUD-clueDrawer-clue{margin:10px 0}.labyrinthHUD-clueDrawer-clue.tier-1 .labyrinthHUD-clueDrawer-exit.tier-1:after,.labyrinthHUD-clueDrawer-clue.tier-2 .labyrinthHUD-clueDrawer-exit.tier-2:after,.labyrinthHUD-clueDrawer-clue.tier-3 .labyrinthHUD-clueDrawer-exit.tier-3:after{background:none}.labyrinthHUD-clueDrawer-exit{top:0;bottom:0;width:1px;height:10px;background:#8d8d8d;border-radius:0}.labyrinthHUD-clueDrawer-bar{height:10px;border-radius:0;opacity:.9}.labyrinthHUD-clueDrawer-barFrame{margin-right:3px;border:1px solid #585858;border-radius:0}.y .labyrinthHUD-clueDrawer-name,.y .labyrinthHUD-clueDrawer-quantity{border-bottom:1px solid #d851ff}.h .labyrinthHUD-clueDrawer-name,.h .labyrinthHUD-clueDrawer-quantity{border-bottom:1px solid #21e2ff}.s .labyrinthHUD-clueDrawer-name,.s .labyrinthHUD-clueDrawer-quantity{border-bottom:1px solid #e96300}.t .labyrinthHUD-clueDrawer-name,.t .labyrinthHUD-clueDrawer-quantity{border-bottom:1px solid #ffe400}.f .labyrinthHUD-clueDrawer-name,.f .labyrinthHUD-clueDrawer-quantity{border-bottom:1px solid #11f400}.labyrinthHUD-clueDrawer-name{padding-left:3px;margin-right:-3px}.labyrinthHUD-clueDrawer-quantity{padding-right:3px;margin-left:-3px}.hudLocationContent a.labyrinthHUD-retreatButton{color:#707070!important;background-color:#0000007f}.hudLocationContent a.labyrinthHUD-retreatButton:hover{color:#eee!important}.labyrinthHUD-hallway-padding:hover .labyrinthHUD-hallway-tile.complete:after,.labyrinthHUD-hallway-padding:hover .labyrinthHUD-hallway-tile.complete.bad:after,.labyrinthHUD-hallway-padding:hover .labyrinthHUD-hallway-tile.complete.good_1:after,.labyrinthHUD-hallway-padding:hover .labyrinthHUD-hallway-tile.complete.good_2:after,.labyrinthHUD-hallway-padding:hover .labyrinthHUD-hallway-tile.complete.good_3:after,.labyrinthHUD-hallway-padding:hover .labyrinthHUD-hallway-tile.complete.good_4:after,.labyrinthHUD-hallway-padding:hover .labyrinthHUD-hallway-tile.complete.good_5:after,.labyrinthHUD-hallway-padding:hover .labyrinthHUD-hallway-tile.complete.good_6:after{position:absolute;top:0;right:0;left:0;display:inline-flex;align-items:center;justify-content:center;height:100%;font-size:15px;font-weight:900;color:#000;text-align:center;text-shadow:0 0 4px #c7ffad;content:""}.labyrinthHUD-hallway-padding:hover .labyrinthHUD-hallway-tile.complete:after{color:#0e0e0e;text-shadow:none;content:"0"}.labyrinthHUD-hallway-padding:hover .labyrinthHUD-hallway-tile.complete.bad:after{color:#c69898;text-shadow:none;content:"1"}.labyrinthHUD-hallway-padding:hover .labyrinthHUD-hallway-tile.complete.good_1:after{content:"1"}.labyrinthHUD-hallway-padding:hover .labyrinthHUD-hallway-tile.complete.good_2:after{content:"2"}.labyrinthHUD-hallway-padding:hover .labyrinthHUD-hallway-tile.complete.good_3:after{content:"3"}.labyrinthHUD-hallway-padding:hover .labyrinthHUD-hallway-tile.complete.good_4:after{content:"4"}.labyrinthHUD-hallway-padding:hover .labyrinthHUD-hallway-tile.complete.good_5:after{content:"5"}.labyrinthHUD-hallway-padding:hover .labyrinthHUD-hallway-tile.complete.good_6:after{content:"6"}.mh-ui-labyrinth-lantern-reminder{position:absolute;bottom:0;left:-8px;width:75px;height:75px;background:url(https://www.mousehuntgame.com/images/items/stats/transparent_thumb/d1c4774c7afebe379bef83d30b81f069.png?cv=2) 0 0 no-repeat;filter:drop-shadow(1px 0 8px #f6eac3);background-size:contain;transform-origin:bottom;animation:mh-improved-sway-side-to-side .75s;animation-iteration-count:3}.labyrinthHUD-toggleLantern-name.active{animation:portalPulse 1.5s infinite}@media (prefers-reduced-motion: reduce){.mh-ui-labyrinth-lantern-reminder,.labyrinthHUD-toggleLantern-name.active{animation:none}}.labyrinthHUD-clueDrawer-barPadding{padding:1px 4px 0 1px}.labyrinthHUD-confirmDescription.chooseDoor b{font-size:13px}.labyrinthHUD-scrambleClues.disabled .labyrinthHUD-scrambleClues-name,.labyrinthHUD-scrambleClues.disabled:hover .labyrinthHUD-scrambleClues-name{color:transparent!important;text-shadow:none}a.labyrinthHUD-door.labyrinthHUD-door-category-y:after,a.labyrinthHUD-door.labyrinthHUD-door-category-h:after,a.labyrinthHUD-door.labyrinthHUD-door-category-s:after,a.labyrinthHUD-door.labyrinthHUD-door-category-t:after,a.labyrinthHUD-door.labyrinthHUD-door-category-f:after{position:absolute;right:19px;bottom:4px;left:19px;padding:1px 2px 0;font-size:13px;text-align:center;text-shadow:0 1px 1px #3d3d3d;content:"";background-color:#50306a;border-radius:1px;box-shadow:inset 0 0 4px #636363}a.labyrinthHUD-door.labyrinthHUD-door-category-y:after{content:"Fealty";background-color:#d851ff99}a.labyrinthHUD-door.labyrinthHUD-door-category-h:after{content:"Tech";background-color:#21e2ff99}a.labyrinthHUD-door.labyrinthHUD-door-category-s:after{content:"Scholar";background-color:#e9630099}a.labyrinthHUD-door.labyrinthHUD-door-category-t:after{font-size:11px;content:"Treasury";background-color:#ffe40099}a.labyrinthHUD-door.labyrinthHUD-door-category-f:after{font-size:12px;content:"Farming";background-color:#11f40099}.labyrinthHUD-door-name-padding span{margin-top:-25px}.labyrinthHUD-door-image:after{filter:drop-shadow(0 1px 1px #242424);transform:scale(1.5)}.labyrinthHUD-hallway-background{filter:brightness(1.2)}\n';
}
});
// src/modules/location-hud/labyrinth/index.js
var highlightDoors, scrambleGems, hud6, labyrinth_default3;
var init_labyrinth3 = __esm({
"src/modules/location-hud/labyrinth/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
init_styles55();
highlightDoors = () => {
var _a, _b;
if ("intersection" !== ((_b = (_a = user == null ? void 0 : user.quests) == null ? void 0 : _a.QuestLabyrinth) == null ? void 0 : _b.status)) {
return;
}
const existingHighlight = document.querySelector(".mh-ui-labyrinth-highlight");
if (existingHighlight) {
existingHighlight.classList.remove("mh-ui-labyrinth-highlight");
}
const clues = user.quests.QuestLabyrinth.clues || [];
const clue = clues.reduce((a, b) => a.quantity > b.quantity ? a : b);
if (clue) {
const doors = user.quests.QuestLabyrinth.doors || [];
const matchingDoors = doors.filter((door) => {
if (door.choice && door.choice.length) {
return door.choice.includes(clue.type);
}
return false;
});
if (!matchingDoors.length) {
return;
}
const bestDoor = matchingDoors.reduce((a, b) => a.choice.length > b.choice.length ? a : b);
if (bestDoor) {
const highlight = document.querySelector(`.labyrinthHUD-door.${bestDoor.css_class.replaceAll(" ", ".")}`);
if (highlight) {
highlight.classList.add("mh-ui-labyrinth-highlight");
}
}
}
};
scrambleGems = () => {
const gems = document.querySelectorAll(".labyrinthHUD-scrambleGem");
if (!gems) {
return;
}
gems.forEach((gem) => {
gem.removeAttribute("onclick");
gem.addEventListener("click", () => {
hg.views.HeadsUpDisplayLabyrinthView.labyrinthScrambleGem(gem, 2);
});
});
};
hud6 = () => {
var _a, _b, _c, _d, _e, _f;
if ("labyrinth" !== getCurrentLocation()) {
return;
}
scrambleGems();
const doorTextExisting = document.querySelector(".mh-ui-labyrinth-door-text");
if (doorTextExisting) {
doorTextExisting.remove();
}
const appendTo = document.querySelector(".labyrinthHUD-hallwayDescription");
if (!appendTo) {
return;
}
const existing = document.querySelector(".mh-ui-labyrinth-step-counter");
if (existing) {
existing.remove();
}
const existingStepsToGo = document.querySelector(".mh-ui-labyrinth-steps-to-go");
if (existingStepsToGo) {
existingStepsToGo.remove();
}
const clueProgresses = document.querySelectorAll(".mh-ui-labyrinth-clue-count");
if (clueProgresses) {
clueProgresses.forEach((progress) => {
progress.remove();
});
}
const clueProgress = document.querySelectorAll(".labyrinthHUD-clue");
if (clueProgress) {
clueProgress.forEach((progress) => {
const clueType = progress.classList.value.replace("labyrinthHUD-clue", "").replace("clueFound", "").trim();
const clues = user.quests.QuestLabyrinth.clues || [];
const clue = clues.find((c) => c.type === clueType);
if (clue) {
progress.setAttribute("title", `${clue.quantity} found`);
const text = makeElement("span", "mh-ui-labyrinth-clue-count", `${clue.quantity}`);
progress.append(text);
}
});
}
if ("inactive" === ((_b = (_a = user == null ? void 0 : user.quests) == null ? void 0 : _a.QuestLabyrinth) == null ? void 0 : _b.lantern_status) && ((_d = (_c = user == null ? void 0 : user.quests) == null ? void 0 : _c.QuestLabyrinth) == null ? void 0 : _d.hallway_tier) >= 2) {
setTimeout(() => {
const existingLanternReminder = document.querySelector(".mh-ui-labyrinth-lantern-reminder");
if (existingLanternReminder) {
existingLanternReminder.classList.remove("hidden");
}
const labyHud = document.querySelector(".labyrinthHUD-intersection");
if (labyHud) {
const lanternReminer = document.createElement("div");
lanternReminer.classList.add("mh-ui-labyrinth-lantern-reminder");
labyHud.append(lanternReminer);
}
}, 500);
}
const hallwayLength = user.quests.QuestLabyrinth.hallway_length || 0;
const tiles = user.quests.QuestLabyrinth.tiles || [];
const completed = tiles.filter((tile) => tile.status.includes("complete"));
if (completed.length !== hallwayLength) {
makeElement("span", "mh-ui-labyrinth-step-counter", `${completed.length}/${hallwayLength} steps completed.`, appendTo);
}
const stepsToGo = hallwayLength - completed.length;
const existingIntersectionText = document.querySelector(".mh-ui-labyrinth-door-text");
if (existingIntersectionText) {
existingIntersectionText.remove();
}
const stepsExisting = document.querySelector(".mh-ui-laby-steps");
if (stepsExisting) {
stepsExisting.remove();
}
const cptExisting = document.querySelector(".mh-ui-laby-cpt");
if (cptExisting) {
cptExisting.remove();
}
if (stepsToGo !== 0) {
const intersectionDoors = document.querySelector(".labyrinthHUD-doorContainer");
if (intersectionDoors) {
const tilesWithClues = tiles.filter((tile) => tile.status.includes("good"));
const cluesFound = tilesWithClues.reduce((a, b) => a + Number.parseInt(b.status.replace("complete", "").replace("good_", "").trim()), 0);
const cluesPerTile = (cluesFound / completed.length).toFixed(1).replace(".0", "");
const intersectionText = makeElement("div", "mh-ui-labyrinth-door-text");
let stepsNoun = "hunt";
if (stepsToGo > 1 || stepsToGo < 1) {
stepsNoun = "hunts";
}
makeElement("div", "mh-ui-laby-steps", `${stepsToGo} ${stepsNoun} left in the hallway`, intersectionText);
if (cluesPerTile !== "NaN") {
let clueNoun = "clue";
if (cluesPerTile > 1 || cluesPerTile < 1) {
clueNoun = "clues";
}
makeElement("div", "mh-ui-laby-cpt", `Avg. ${cluesPerTile} ${clueNoun} per tile`, intersectionText);
}
intersectionDoors.append(intersectionText);
}
}
if ("intersection" === ((_f = (_e = user == null ? void 0 : user.quests) == null ? void 0 : _e.QuestLabyrinth) == null ? void 0 : _f.status)) {
highlightDoors();
}
};
labyrinth_default3 = () => __async(void 0, null, function* () {
addHudStyles(styles_default54);
hud6();
onRequest(hud6);
});
}
});
// src/modules/location-hud/lagoon/index.js
var lagoon_default;
var init_lagoon = __esm({
"src/modules/location-hud/lagoon/index.js"() {
init_sentry_release_injection_stub();
init_cheese_selectors();
lagoon_default = () => __async(void 0, null, function* () {
cheese_selectors_default("lagoon", [
"gnarled_cheese",
"wicked_gnarly_cheese"
]);
});
}
});
// src/modules/location-hud/meditation-room/index.js
var meditation_room_default;
var init_meditation_room = __esm({
"src/modules/location-hud/meditation-room/index.js"() {
init_sentry_release_injection_stub();
init_cheese_selectors();
meditation_room_default = () => __async(void 0, null, function* () {
cheese_selectors_default("meditation-room", [
"combat_cheese",
"glutter_cheese",
"susheese_cheese"
]);
});
}
});
// src/modules/location-hud/mountain/styles.css
var styles_default55;
var init_styles56 = __esm({
"src/modules/location-hud/mountain/styles.css"() {
styles_default55 = ".mountainHUD-boulder-health-percent{display:flex;align-items:center;justify-content:space-evenly}.mountainHUD-boulder-health-percent span{font-size:12px}.mountainHUD-boulder-health-progressBar span{top:-2px;bottom:-2px;box-shadow:inset 0 0 2px 1px #000}.mountainHUD-boulder-state,.mousehuntItem.mountainHUD-conduit-charm .mousehuntItem-image{transition:.2s}.mountainHUD-boulder:hover .mountainHUD-boulder-state{filter:brightness(.9);transform:translateY(4px)}.mountainHUD-boulderHelper{top:3px;left:128px;width:76px;font-size:11px}.mountainHUD-conduit-charm .mousehuntItem-image{background-color:#835327;background-size:80px;border-radius:0;box-shadow:-1px -1px #835327}.mountainHUD-conduit-charm .mousehuntItem-image:after{border:none;border-radius:40px}.mountainHUD-conduit-charm:hover .mousehuntItem-image{background-size:100px;transform:rotate(5deg)}.mountainHUD-conduit-power{padding-left:19px;font-size:15px}.mountainHUD-conduit-power:after{top:-2px;width:20px;height:21px;padding-right:5px;background-size:20px}.mountainHUD-conduit-suggestions .mousehuntItem-image{background-color:#855a2c;background-size:33px}.mountainHUD-conduit-suggestions .mousehuntItem-quantity{right:0;bottom:-11px;left:0;font-size:12px;border:1px solid #858585}.mountainHUD-footer-item .mousehuntItem-image{width:25px;height:25px;background-color:transparent}.mountainHUD-footer-item .mousehuntItem-image,.mountainHUD-phaseContainer .mousehuntItem-image,.mountainHUD-conduit-suggestions .mousehuntItem-image{background-color:transparent;background-size:cover;box-shadow:none}.mountainHUD-footer-item .mousehuntItem-image:after,.mountainHUD-phaseContainer .mousehuntItem-image:after{border:none}.mountainHUD-footer-item .mousehuntItem-quantity{bottom:4px;font-size:12px;background-color:#de9c5f;box-shadow:inset 0 0 3px 2px #835327}.mountainHUD-footer-item-name{font-size:10px}.mountainHUD-footer-item:nth-child(1) .mountainHUD-footer-item-name{font-size:10px;line-height:10px}.mountainHUD-footer-item:nth-child(2) .mountainHUD-footer-item-name{width:82px;margin-left:24px;font-size:12px}.mountainHUD-footer-item:nth-child(3) .mountainHUD-footer-item-name{font-size:12px}.mountainHUD-footer-item:nth-child(4) .mountainHUD-footer-item-name{font-size:9px}.mountainHUD-footer-item:nth-child(5) .mountainHUD-footer-item-name{width:80px;margin-left:27px;font-size:11px}.mountainHUD-footer-item .mousehuntItem.disabled .mousehuntItem-image{filter:opacity(.3)}.mountainHUD-phase-description{line-height:10px}.mountainHUD-phase-title span{font-size:10px;font-variant:none;text-shadow:1px 1px 2px #000}.mountainHUD-phaseContainer .mousehuntItem-quantity.quantity{font-size:12px;border:1px solid #858585}.mountainHUD.none .mountainHUD-conduit-charm .mousehuntItem-image{border-radius:50%}.mousehuntItem.mountainHUD-conduit-charm{background-color:#835327}.mountainHUD-conduit .mousehuntItem.disabled{height:auto;background-color:#5f3e1f}.mountainHUD-conduit .mousehuntItem-image.disabled:after{border:none}.mountainHUD-conduit .mousehuntItem.disabled .mousehuntItem-quantity{display:none}.mountainHUD-conduit-suggestion-item .mousehuntTooltip{font-size:12px}\n";
}
});
// src/modules/location-hud/mountain/index.js
var mountain_default;
var init_mountain = __esm({
"src/modules/location-hud/mountain/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
init_styles56();
mountain_default = () => __async(void 0, null, function* () {
addHudStyles(styles_default55);
});
}
});
// src/modules/location-hud/moussu-picchu/styles.css
var styles_default56;
var init_styles57 = __esm({
"src/modules/location-hud/moussu-picchu/styles.css"() {
styles_default56 = ".moussuPicchuHUD-torchQuantity.quantity{font-size:12px;background-color:#fff;border-radius:4px}.moussuPicchuHUD .mousehuntItem-quantity.quantity{right:0;bottom:-8px;left:0;font-size:11px}.moussuPicchuHUD-itemContainer{top:150px;right:7px;left:7px;background-color:#320717;border-radius:5px;box-shadow:0 -7px #320717}a.moussuPicchuHUD-footer-item-action.mousehuntArmNowButton{top:8px;right:-1px;transform:scale(.8)}.moussuPicchuHUD-footer-item-name{width:auto;font-size:9px}.moussuPicchuHUD-footer-item.dragon_scale_crafting_item.mousehuntTooltipParent{width:20%}.moussuPicchuHUD-footer-item.gouda_cheese,.moussuPicchuHUD-footer-item.super_brie_cheese{width:26%}.moussuPicchuHUD-footer-item.glowing_gruyere_cheese{width:28%}.moussuPicchuHUD-itemBlock.mousehuntTooltipParent.dragon_bait{left:310px;display:flex;align-items:flex-end;justify-content:space-evenly;width:120px}.moussuPicchuHUD-powerType.moussuPicchuHUD-powerType{box-shadow:none}.moussuPicchuHUD-footer-item-tooltip-baitRow .mousehuntArmNowButton[data-item-type=swiss_cheese],.moussuPicchuHUD-footer-item-tooltip-baitRow .mousehuntArmNowButton[data-item-type=brie_cheese]{display:block}.moussuPicchuHUD-footer-item.dragon_scale_crafting_item .mousehuntTooltip{text-align:center}.moussuPicchuHUD-footer-item .mousehuntTooltip{bottom:130%}.moussuPicchuHUD-footer-item-image{width:30px;height:30px;background-color:transparent;background-size:cover}.moussuPicchuHUD-footer-item:nth-child(3) .mousehuntTooltip{right:-30px;left:-30px}.moussuPicchuHUD .mousehuntItem-image{width:38px;height:38px}.moussuPicchuHUD .mousehuntItem.active .mousehuntItem-image:after{box-shadow:inset 0 0 9px 2px #74e776}.moussuPicchuHUD-background{border-top-left-radius:25px;border-top-right-radius:25px;box-shadow:inset 0 5px 10px -2px #321c1e}.moussuPicchuHUD-background.wind{top:2px;left:8px}.moussuPicchuHUD-background.storm{top:3px;left:8px}.moussuPicchuHUD-powerTypeWarning.active.useless{right:200px;left:200px;padding:5px;color:#870808;background-color:#ffbfbf;border-color:#ff8a7c}.moussuPicchuHUD-powerType.wind,.moussuPicchuHUD-powerType.wind.active,.moussuPicchuHUD-powerType.rain,.moussuPicchuHUD-powerType.rain.active{filter:hue-rotate(90deg) opacity(.6);background-position:center;box-shadow:none}.moussuPicchuHUD-powerType.rain,.moussuPicchuHUD-powerType.rain.active{background-image:url(https://www.mousehuntgame.com/images/powertypes/shadow.png?asset_cache_version=2)}.moussuPicchuHUD-powerType.wind,.moussuPicchuHUD-powerType.wind.active{background-image:url(https://www.mousehuntgame.com/images/powertypes/arcane.png?asset_cache_version=2)}.moussuPicchuHUD-powerType.wind.active{filter:opacity(.8)}\n";
}
});
// src/modules/location-hud/moussu-picchu/index.js
var moussu_picchu_default2;
var init_moussu_picchu2 = __esm({
"src/modules/location-hud/moussu-picchu/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
init_styles57();
moussu_picchu_default2 = () => __async(void 0, null, function* () {
addHudStyles(styles_default56);
});
}
});
// src/modules/location-hud/nerg-plains/index.js
var nerg_plains_default;
var init_nerg_plains = __esm({
"src/modules/location-hud/nerg-plains/index.js"() {
init_sentry_release_injection_stub();
init_cheese_selectors();
nerg_plains_default = () => __async(void 0, null, function* () {
cheese_selectors_default("nerg-plains", [
"gumbo_cheese"
]);
});
}
});
// src/modules/location-hud/pinnacle-chamber/index.js
var pinnacle_chamber_default;
var init_pinnacle_chamber = __esm({
"src/modules/location-hud/pinnacle-chamber/index.js"() {
init_sentry_release_injection_stub();
init_cheese_selectors();
pinnacle_chamber_default = () => __async(void 0, null, function* () {
cheese_selectors_default("pinnacle-chamber", [
"maki_cheese",
"onyx_gorgonzola_cheese"
]);
});
}
});
// src/modules/location-hud/pollution-outbreak/styles.css
var styles_default57;
var init_styles58 = __esm({
"src/modules/location-hud/pollution-outbreak/styles.css"() {
styles_default57 = '.pollutionOutbreakHUD-item-image{height:29px;padding:2px 0;margin:0;background-position:top;background-size:contain;box-shadow:none}.pollutionOutbreakHUD-timer{top:2px;bottom:unset;left:17px;z-index:29;padding:2px 5px;font-size:14px;background-color:#ffffff59;border-top:1px solid #999;border-radius:5px 0 10px}.pollutionOutbreakHUD-totalPollution-direction-status{max-width:375px}.pollutionOutbreakHUD-hunters{right:144px;left:unset;font-size:12px;border-right:none;border-left:1px solid #999;border-radius:0 5px 0 10px}.pollutionOutbreakHUD-pollution-title-block-icon[style*="https://www.mousehuntgame.com/images/titles/50f10ec5c7bc01cb99af2003b30d400d.png"]{background-image:url(https://www.mousehuntgame.com/images/titles/0567284d6e12aaaed35ca5912007e070.png?cv=2)!important}.pollutionOutbreakHUD-pollution-title-block-icon[style*="https://www.mousehuntgame.com/images/titles/2e17d44079e1538b28409c05da497440.png"]{background-image:url(https://www.mousehuntgame.com/images/titles/398dca9a8c7703de969769491622ca32.png?cv=2)!important}.pollutionOutbreakHUD-pollution-title-block-icon[style*="https://www.mousehuntgame.com/images/titles/322d0b6d9527f1f09c0e213c2fc7abbe.png"]{background-image:url(https://www.mousehuntgame.com/images/titles/9a6acd429a9a3a4849ed13901288b0b8.png?cv=2)!important}.pollutionOutbreakHUD-pollution-title-block-icon[style*="https://www.mousehuntgame.com/images/titles/8ed26547b6ce5606faed7ce7d3494232.png"]{background-image:url(https://www.mousehuntgame.com/images/titles/ea9c0ec2e6d3d81c14e61f5ce924d0e1.png?cv=2)!important}.pollutionOutbreakHUD-pollution-title-block-icon[style*="https://www.mousehuntgame.com/images/titles/53f8ec71d1a26beec6277152afdcc9ba.png"]{background-image:url(https://www.mousehuntgame.com/images/titles/dd11711a25b80db90e0306193f2e8d78.png?cv=2)!important}.pollutionOutbreakHUD-pollution-title-block-icon[style*="https://www.mousehuntgame.com/images/titles/759a709a33a52b2fb70f0d6d994afc16.png"]{background-image:url(https://www.mousehuntgame.com/images/titles/eb46ac1e8197b13299ab860f07d963db.png?cv=2)!important}.pollutionOutbreakHUD-pollution-title-block-icon[style*="https://www.mousehuntgame.com/images/titles/56ff0615bc3f03729b1d2b2bb52693c1.png"]{background-image:url(https://www.mousehuntgame.com/images/titles/87937fa96bbb3b2dd3225df883002642.png?cv=2)!important}.pollutionOutbreakHUD-pollution-title-block-icon[style*="https://www.mousehuntgame.com/images/titles/e258cd2f5606d678cc0bba000b930500.png"]{background-image:url(https://www.mousehuntgame.com/images/titles/043efe31de4f0f2e0ddca590fe829032.png?cv=2)!important}.pollutionOutbreakHUD-pollution-title-block.active .pollutionOutbreakHUD-pollution-title-block-icon,.pollutionOutbreakHUD-pollution-title-block .pollutionOutbreakHUD-pollution-title-block-icon,.pollutionOutbreakHUD-pollution-title-block.complete .pollutionOutbreakHUD-pollution-title-block-icon{top:-1px;left:-1px;width:10px;height:15px;background-color:#9b9d9d;border-radius:0}.pollutionOutbreakHUD-pollution-title-block-name{right:3px;left:16px;font-size:11px;line-height:19px;text-align:center}.pollutionOutbreakHUD-pollution-title-block-icon{top:-2px;left:1px;width:16px;height:15px;background-color:none;background-position:center;background-size:contain}.pollutionOutbreakHUD-layer{z-index:7}.pollutionOutbreakHUD-pollution-title-block-progressBar{background-color:#469d30f2;box-shadow:-3px 2px 1px #6a6969 inset}.pollutionOutbreakHUD-pollution-title-block.active .pollutionOutbreakHUD-pollution-title-block-progressBar:after{border:none}.pollutionOutbreakHUD-pollution-title-block.complete .pollutionOutbreakHUD-pollution-title-block-name{color:#d1d0cf}.pollutionOutbreakHUD-pollution-title-block.active .pollutionOutbreakHUD-pollution-title-block-progressBar{border-right:1px solid #a13427;border-radius:0;box-shadow:-1px 2px 1px #6a6969 inset}.pollutionOutbreakHUD-pollution-title-block.hero,.pollutionOutbreakHUD-pollution-title-block.knight,.pollutionOutbreakHUD-pollution-title-block.lord_lady,.pollutionOutbreakHUD-pollution-title-block.baron_baroness{width:60px!important}.pollutionOutbreakHUD-pollution-title-block.count_countess,.pollutionOutbreakHUD-pollution-title-block.duke_dutchess{width:75px!important}.pollutionOutbreakHUD-pollution-title-block.grand_duke{width:85px!important}.pollutionOutbreakHUD-pollution-title-block.archduke_archduchess{width:80px!important}.pollutionOutbreakHUD-refineQuantityContainer{font-weight:900}.pollutionOutbreakHUD-pollutinumContainer.active .pollutionOutbreakHUD-refineQuantityContainer,.pollutionOutbreakHUD-refineQuantityContainer{display:inline-block;width:21px;margin-right:0;line-height:17px;vertical-align:middle;background:#000;border:none;border-radius:3px;box-shadow:0 0 1px #3fa126 inset}.pollutionOutbreakHUD-scumContainer{padding-right:10px;padding-left:5px;background-color:#2a2a2a}.pollutionOutbreakHUD-scumContainer:after{display:none}.pollutionOutbreakHUD-scumContainer .quantity,.pollutionOutbreakHUD-scumContainer .maxQuantity{font-size:12px}span.pollutionOutbreakHUD-refineQuantity{font-size:12px;font-weight:900}a.pollutionOutbreakHUD-refineButton{top:0;width:52px;height:16px;margin-right:5px;background-position:0 center;background-size:100%;border:1px solid #000;border-radius:3px}a.pollutionOutbreakHUD-refineButton:hover{filter:sepia(1)}.pollutionOutbreakHUD-refineButton:after,.pollutionOutbreakHUD-refineButton.busy:before{position:absolute;inset:0;display:flex;align-items:flex-start;justify-content:center;font-size:12px;color:#494949;content:"Refine";background-color:#95ff7e;border-radius:2px}.pollutionOutbreakHUD-refineButton.busy:after{display:none}.pollutionOutbreakHUD-refineButton.active:after{content:"Refining";background-color:#55edff}.pollutionOutbreakHUD-refineButton.busy{background-color:#d0f4f9}.pollutionOutbreakHUD-refineButton.busy:before{content:"\\b7\\b7\\b7";background-color:#d0f4f9}.pollutionOutbreakHUD-refineButton{background:none}.pollutionOutbreakHUD-pollution-title-block .mousehuntTooltip b.pollutionOutbreakHUD-pollution-title-block-gender{display:none!important}.pollutionOutbreakHUD-pollution-title-block .mousehuntTooltip{font-size:12px;text-align:center}.pollutionOutbreakHUD-layer-fog{display:none}.pollutionOutbreakHUD-totalPollution-direction .mousehuntTooltip{bottom:24px;left:3px;display:block;width:auto;padding:2px 5px;font-size:13px;background:url(https://www.mousehuntgame.com/images/ui/backgrounds/overlay.png?asset_cache_version=2) top right;background-color:#fff;border-top:1px solid #999;border-right:1px solid #999;border-bottom:1px solid #999;border-left:none;border-radius:0 10px 0 2px;box-shadow:none}.pollutionOutbreakHUD-totalPollution-direction .mousehuntTooltip-arrow{display:none}.pollutionOutbreakHUD-totalPollution-direction .mousehuntTooltip b{font-weight:400}.pollutionOutbreakHUD-item-quantity.quantity{margin-top:-1px;font-size:10px;line-height:15px;background-color:#333;border-top:none;border-radius:0 0 3px 3px;box-shadow:none}.pollutionOutbreakHUD-itemContainer{top:3px;right:14px}.pollutionOutbreakHUD-item-padding{margin:0 2px;border:1px solid #000;border-radius:6px}.pollutionOutbreakHUD-item{margin-top:1px}.pollutionOutbreakHUD-item.active .pollutionOutbreakHUD-item-padding:after{display:none}.pollutionOutbreakHUD-item:hover .pollutionOutbreakHUD-item-image,.pollutionOutbreakHUD-item:focus .pollutionOutbreakHUD-item-image{box-shadow:inset 0 0 25px 1px #63c833}.pollutionOutbreakHUD-item.active .pollutionOutbreakHUD-item-image{box-shadow:inset 0 0 25px 1px #8dd06c}.pollutionOutbreakHUD-item.active .pollutionOutbreakHUD-item-quantity.quantity,.pollutionOutbreakHUD-item.focus .pollutionOutbreakHUD-item-quantity.quantity,.pollutionOutbreakHUD-item:hover .pollutionOutbreakHUD-item-quantity.quantity{color:#bcf1a2}.pollutionOutbreakHUD-item:hover .pollutionOutbreakHUD-item-padding:after{border:none}.pollutionOutbreakHUD-pollution-title-block.hero:after{width:44px;content:"30 hrs"}.pollutionOutbreakHUD-pollution-title-block.knight:after{width:44px;content:"16 hrs"}.pollutionOutbreakHUD-pollution-title-block.lord_lady:after{width:44px;content:"18 hrs"}.pollutionOutbreakHUD-pollution-title-block.baron_baroness:after{width:44px;content:"18 hrs"}.pollutionOutbreakHUD-pollution-title-block.count_countess:after{width:59px;content:"1 day"}.pollutionOutbreakHUD-pollution-title-block.duke_dutchess:after{width:59px;content:"1 day"}.pollutionOutbreakHUD-pollution-title-block.grand_duke:after{right:1px;width:69px;content:"1 day"}.pollutionOutbreakHUD-pollution-title-block.archduke_archduchess:after{right:0;width:65px;content:"1 day"}.pollutionOutbreakHUD-pollution-title-block:hover:after{display:flex}.pollutionOutbreakHUD-pollution-title-block.mousehuntTooltipParent:hover .mousehuntTooltip{display:none}.pollutionOutbreakHUD-pollution-title-block:after{position:absolute;top:-22px;right:1px;z-index:10;display:none;align-items:center;justify-content:center;width:20px;height:20px;font-size:12px;color:#ccc;text-align:center;text-shadow:1px 1px 1px #000;vertical-align:middle;content:"";background:linear-gradient(180deg,#1d1d1d,#242424);border-radius:10px 10px 0 0;box-shadow:0 1px #9b9d9d,0 2px #6a6969,0 0 0 2px #9b9d9d,0 1px 1px #6a6969 inset}.complete .pollutionOutbreakHUD-pollution-title-block-progressBar{box-shadow:none}.pollutionOutbreakHUD-pollution-title-block.complete:after,.pollutionOutbreakHUD-pollution-title-block.active:after{box-shadow:0 1px #9b9d9d,0 2px #6a6969,0 0 0 2px #9b9d9d,0 1px 1px #6a6969 inset}.pollutionOutbreakHUD-pollution-title-block.complete:after{background:#449830}.pollutionOutbreakHUD-pollution-title-block.active:after{background:#822515}\n';
}
});
// src/modules/location-hud/pollution-outbreak/index.js
var pollution_outbreak_default;
var init_pollution_outbreak = __esm({
"src/modules/location-hud/pollution-outbreak/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
init_styles58();
pollution_outbreak_default = () => __async(void 0, null, function* () {
addHudStyles(styles_default57);
});
}
});
// src/modules/location-hud/prologue-pond/styles.css
var styles_default58;
var init_styles59 = __esm({
"src/modules/location-hud/prologue-pond/styles.css"() {
styles_default58 = '.prologuePondView-chum-image{width:35px;height:35px;margin-top:-2px;filter:drop-shadow(0 0 2px #f378ff)}.prologuePondView-chum-quantity.quantity{padding:2px;font-size:14px}.prologuePondView-fishingBoat{top:30px;transition:.4s;transform:scale(1.2)}.prologuePondView-fishingBoat:hover{filter:brightness(1.2)}.prologuePondView-background-layer.water{top:19px;filter:brightness(.7);opacity:.6}.prologuePondView-background-layer.shore{top:25px;opacity:.7}.prologuePondView-currentLoot-value{font-size:12px;border-radius:4px;box-shadow:0 0 20px #000 inset}.prologuePondView-currentLoot-label{margin-bottom:3px}.prologuePondView-currentLoot{border:none}.prologuePondView-fishingBoat.forward .prologuePondView-fishingBoat-paperDoll{transform-origin:50% 40%;animation-duration:1.3s;animation-timing-function:ease-in-out}.disarmed .prologuePondView-fishingBoat-paperDoll{background-image:url(https://i.mouse.rip/mh-improved/boat-no-rod.png)}.prologuePondView-fishingBoat-paperDoll-layer.fish_net.active,.prologuePondView-fishingBoat-paperDoll-layer.fishing_rod.active{opacity:1;transition:.4s}.disarmed .prologuePondView-fishingBoat-paperDoll-layer.fish_net.active,.disarmed .prologuePondView-fishingBoat-paperDoll-layer.fishing_rod.active,.disarmed .prologuePondView-fishingBoat-paperDoll-layer.steam_reel.active,.disarmed .prologuePondView-fishingBoat-paperDoll-layer.fishing_line.active{opacity:0}.prologuePondView-chumDoober[style="top: 62px;"]{left:-96px}@keyframes mh-improved-boat-floating{0%{transform:translate(0)}50%{transform:translateY(3px)}to{transform:translateY(-0)}}@keyframes mh-improved-chum-floating{0%{transform:translate(0)}50%{transform:translateY(-5px)}to{transform:translateY(-0)}}.prologuePondView-chumDoober{filter:drop-shadow(-1px -1px 3px #526ba1) drop-shadow(-1px -1px 3px #526ba1) hue-rotate(94deg);animation-name:mh-improved-chum-floating;animation-duration:3s;animation-timing-function:ease-in-out;animation-iteration-count:infinite}.prologuePondView-fishingBoat-paperDoll{animation-name:mh-improved-boat-floating;animation-duration:6s;animation-timing-function:ease-in-out;animation-iteration-count:infinite}@media screen and (prefers-reduced-motion: reduce){.prologuePondView-fishingBoat-paperDoll,.prologuePondView-chumDoober{animation:none}}.prologuePondView-chumDooberContainer .prologuePondView-chumDoober:nth-child(1){animation-delay:9s}.prologuePondView-chumDooberContainer .prologuePondView-chumDoober:nth-child(2){animation-delay:6s}.prologuePondView-chumDooberContainer .prologuePondView-chumDoober:nth-child(3){animation-delay:2s}.prologuePondView-chumDooberContainer .prologuePondView-chumDoober:nth-child(4){animation-delay:4s}.folkloreForestRegionView.stormy_water .prologuePondView-fishingBoat{left:220px}.folkloreForestRegionView.stormy_water .prologuePondView-background-layer.sky:after{top:30px;transform:scaleY(1.2);transform-origin:bottom}.prologuePondView-chumButton.active:after{background-image:url(https://i.mouse.rip/mh-improved/chum-lightning.png)}\n';
}
});
// src/modules/location-hud/prologue-pond/index.js
var addDisarmedClass, updatePondLootQuantity, prologue_pond_default;
var init_prologue_pond = __esm({
"src/modules/location-hud/prologue-pond/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
init_folklore_forest2();
init_styles44();
init_styles59();
addDisarmedClass = () => {
const hud10 = document.querySelector("#hudLocationContent");
if (!hud10) {
return;
}
if (user.bait_disarmed) {
hud10.classList.add("disarmed");
} else {
hud10.classList.remove("disarmed");
}
};
updatePondLootQuantity = () => {
var _a, _b, _c, _d, _e, _f;
const lootMin = ((_c = (_b = (_a = user == null ? void 0 : user.quests) == null ? void 0 : _a.QuestProloguePond) == null ? void 0 : _b.current_loot_range) == null ? void 0 : _c.min) || 0;
const lootMax = ((_f = (_e = (_d = user == null ? void 0 : user.quests) == null ? void 0 : _d.QuestProloguePond) == null ? void 0 : _e.current_loot_range) == null ? void 0 : _f.max) || 0;
const lootMaxEl = document.querySelector(".prologuePondView-currentLoot-value-max");
if (!lootMaxEl) {
return;
}
if (lootMin === lootMax) {
lootMaxEl.classList.add("hidden");
} else {
lootMaxEl.classList.remove("hidden");
}
};
prologue_pond_default = () => __async(void 0, null, function* () {
addHudStyles([styles_default43, styles_default58]);
folklore_forest_default2();
addDisarmedClass();
onRequest(addDisarmedClass, "managers/ajax/users/changetrap.php");
updatePondLootQuantity();
onRequest(updatePondLootQuantity, "managers/ajax/environment/prologue_pond.php");
});
}
});
// src/modules/location-hud/rift-bristle-woods/styles.css
var styles_default59;
var init_styles60 = __esm({
"src/modules/location-hud/rift-bristle-woods/styles.css"() {
styles_default59 = '.riftBristleWoodsHUD-footer-item-quantity.quantity{top:30px;padding:2px 4px;font-size:12px}.riftBristleWoodsHUD-footer-itemGroup.wide .riftBristleWoodsHUD-footer-item-image:first-child .riftBristleWoodsHUD-footer-item-quantity{top:27px}.riftBristleWoodsHUD-chamberProgressQuantity{top:72px;left:7px;z-index:1;padding:0 9px;text-shadow:none;background-color:#fefae9;border:3px solid #987653;border-bottom-right-radius:10px;border-bottom-left-radius:10px;box-shadow:inset 1px -1px 3px 1px #d1caaa}.riftBristleWoodsHUD-portalEquipment.lootBooster .riftBristleWoodsHUD-footer-item-quantity{top:22px;right:unset;left:5px}.riftBristleWoodsHUD-footer-item-image.active.highlight{border-color:#03ff95;box-shadow:0 0 10px #00ec00 inset}.riftBristleWoodsHUD-chamberProgressBar span{filter:hue-rotate(53deg);box-shadow:-2px 1px 4px 1px #6e496d inset}.riftBristleWoodsHUD-portal.closed.disabled{filter:grayscale(1);opacity:.5}.riftBristleWoodsHUD-statusEffect .riftBristleWoodsHUD-statusEffect-iconContainer .riftBristleWoodsHUD-statusEffect-icon.ac.active:after,.riftBristleWoodsHUD-statusEffect .riftBristleWoodsHUD-statusEffect-iconContainer .riftBristleWoodsHUD-statusEffect-icon.ng.active:after,.riftBristleWoodsHUD-statusEffect .riftBristleWoodsHUD-statusEffect-iconContainer .riftBristleWoodsHUD-statusEffect-icon.ex.active:after,.riftBristleWoodsHUD-statusEffect .riftBristleWoodsHUD-statusEffect-iconContainer .riftBristleWoodsHUD-statusEffect-icon.fr.active:after,.riftBristleWoodsHUD-statusEffect .riftBristleWoodsHUD-statusEffect-iconContainer .riftBristleWoodsHUD-statusEffect-icon.st.active:after,.riftBristleWoodsHUD-statusEffect .riftBristleWoodsHUD-statusEffect-iconContainer .riftBristleWoodsHUD-statusEffect-icon.un.active:after{position:absolute;top:38px;width:53px;padding:3px;margin-left:-17px;text-align:center;background-color:#338053;border:2px solid #00ff95;border-radius:7px 7px 10px 10px}.riftBristleWoodsHUD-statusEffect .riftBristleWoodsHUD-statusEffect-iconContainer .riftBristleWoodsHUD-statusEffect-icon.fr.active:after,.riftBristleWoodsHUD-statusEffect .riftBristleWoodsHUD-statusEffect-iconContainer .riftBristleWoodsHUD-statusEffect-icon.st.active:after,.riftBristleWoodsHUD-statusEffect .riftBristleWoodsHUD-statusEffect-iconContainer .riftBristleWoodsHUD-statusEffect-icon.un.active:after{margin-left:-45px;background-color:#623b2c;border:2px solid #d52a0b}.riftBristleWoodsHUD-statusEffect .riftBristleWoodsHUD-statusEffect-iconContainer .riftBristleWoodsHUD-statusEffect-icon.ac.active:after{content:"Influence"}.riftBristleWoodsHUD-statusEffect .riftBristleWoodsHUD-statusEffect-iconContainer .riftBristleWoodsHUD-statusEffect-icon.ng.active:after{text-decoration:line-through;content:"Paladins"}.riftBristleWoodsHUD-statusEffect .riftBristleWoodsHUD-statusEffect-iconContainer .riftBristleWoodsHUD-statusEffect-icon.ex.active:after{content:"4 portals"}.riftBristleWoodsHUD-statusEffect .riftBristleWoodsHUD-statusEffect-iconContainer .riftBristleWoodsHUD-statusEffect-icon.un.active:after{content:"No Luck"}.riftBristleWoodsHUD-statusEffect .riftBristleWoodsHUD-statusEffect-iconContainer .riftBristleWoodsHUD-statusEffect-icon.fr.active:after{content:"Frozen"}.riftBristleWoodsHUD-statusEffect .riftBristleWoodsHUD-statusEffect-iconContainer .riftBristleWoodsHUD-statusEffect-icon.st.active:after{content:"Pursued"}.riftBristleWoodsHUD-acolyteChamber-sandDetails,.riftBristleWoodsHUD-acolyteChamber-acolyteChargeDetails{top:66px;left:404px;display:flex;flex-direction:column;align-items:center;padding:2px;font-size:13px;background-color:#3e1d11;border-width:2px}.riftBristleWoodsHUD-acolyteChamber-sandDetails{left:188px}.riftBristleWoodsHUD-acolyteChamber-obeliskPercent{margin-left:-2px;font-size:14px;font-weight:400;background-color:#6e460b}.riftBristleWoodsHUD-acolyteStats.active.mousehuntTooltipParent .mousehuntTooltip{top:-9px;right:0;display:flex;align-items:center;justify-content:space-around;width:231px;height:15px;padding-right:7px;color:#eee;background-color:#4b3d30;border-color:#65625f;border-radius:10px 10px 0 0}.riftBristleWoodsHUD-acolyteStats.active .riftBristleWoodsHUD-acolyteStats-block{display:inline-flex;width:auto}.riftBristleWoodsHUD-acolyteStats.active.mousehuntTooltipParent .mousehuntTooltip-arrow,.riftBristleWoodsHUD-acolyteStats-description,.riftBristleWoodsHUD-acolyteStats.active .riftBristleWoodsHUD-acolyteStats-block:nth-child(4){display:none}.riftBristleWoodsHUD-acolyteStats-block-value{margin-left:8px;font-size:11px}.riftBristleWoodsHUD-acolyteStats-block-title span{display:block;text-align:center}.riftBristleWoodsHUD-acolyteStats-acolyteCatches:after{position:absolute;top:0;right:-8px;width:17px;height:25px;padding-right:4px;background-color:#4b3d30;border-radius:0 50% 50% 0;box-shadow:1px 0 0 1px #666}.riftBristleWoodsHUD-chamberSpecificText.acolyte_chamber{color:#e8dbb8}a.riftBristleWoodsHUD-acolyteChamber-retreat.mousehuntActionButton.tiny.cancel{margin-top:6px;margin-left:51px;font-size:9px;box-shadow:none;opacity:.8}a.riftBristleWoodsHUD-acolyteChamber-retreat.mousehuntActionButton.tiny.cancel:hover{opacity:1}\n';
}
});
// src/modules/location-hud/rift-bristle-woods/index.js
var rift_bristle_woods_default;
var init_rift_bristle_woods = __esm({
"src/modules/location-hud/rift-bristle-woods/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
init_styles60();
rift_bristle_woods_default = () => {
addHudStyles(styles_default59);
};
}
});
// src/modules/location-hud/rift-burroughs/styles.css
var styles_default60;
var init_styles61 = __esm({
"src/modules/location-hud/rift-burroughs/styles.css"() {
styles_default60 = '.riftBurroughsHud .baitContainer .baitOption .baitQuantity{width:31px;font-size:13px;background-color:#464646;border-radius:7px}.brift-ui .mist-display{position:absolute;top:15px;bottom:10px;left:260px;display:flex;align-items:center;padding:10px;font-size:13px;font-weight:900;cursor:pointer;background-color:#ecf4f5;border-radius:10px;box-shadow:inset 0 0 0 3px #cbdde0,inset 0 0 4px 4px #8d9392,0 2px 6px #5b5d5d}.brift-ui{z-index:1}.riftBurroughsHud .mistContainer{width:100px}.brift-ui .mist-display.state-yellow{background:radial-gradient(circle,#fff4a9 10%,#f4e830 50%)}.brift-ui .mist-display.state-green{background:radial-gradient(circle,#abe846 10%,#82d953 50%)}.brift-ui .mist-display.state-red{background:radial-gradient(circle,#ff9a9a 10%,#ff5e5e 50%)}.brift-ui .mouse-list{position:absolute;top:9px;right:20px;bottom:2px;display:flex}.brift-ui .mouse-type{display:flex;flex-direction:column;max-width:100px;padding:4px;margin:0 5px;background-color:#bfced0cf;border-radius:10px;box-shadow:inset 0 0 0 3px #cbdde0,inset 0 0 4px 4px #8d9392,0 2px 6px #5b5d5d}.brift-ui .mouse-type-title{min-width:95px;padding:3px 0;margin:-1px;font-size:12px;color:#d0f0f3;text-align:center;cursor:pointer;background-color:#828282;border-top-left-radius:7px;border-top-right-radius:8px}.brift-ui .mouse-type-mice{display:grid;grid-template-columns:repeat(4,1fr);justify-items:center;margin:3px 0;font-size:6px}.brift-ui .mouse-type-title:hover,.brift-ui .mouse-type-title:focus{color:#b1ed71;cursor:pointer}.brift-ui .mouse-type-mouse{display:block;width:25px;height:25px}.brift-ui img.mouse-type-mouse-image{width:25px;height:25px}.brift-ui .mouse-type-mouse:nth-child(5) .mouse-type-mouse-image{border-bottom-left-radius:4px}.brift-ui .mouse-type-mouse:nth-child(8) .mouse-type-mouse-image{border-bottom-right-radius:4px}.brift-ui .mouse-type-mouse-link{position:relative}.brift-ui .mouse-type-mouse-name{position:absolute;bottom:-30px;left:-25px;z-index:2;display:none;padding:6px;font-size:10px;color:#000;text-align:center;white-space:nowrap;background-color:#fff;border:2px solid #000;border-radius:10px}.brift-ui .mouse-type-mouse-link:hover .mouse-type-mouse-name,.brift-ui .mouse-type-mouse-link:focus .mouse-type-mouse-name{display:block}.brift-ui .mouse-type.active{box-shadow:inset 0 0 0 2px #a7fc32,inset 0 0 4px 4px #8d9392,0 2px 6px #5b5d5d}.brift-ui .mouse-type.active .mouse-type-title{color:#b1ed71}.riftBurroughsHud .baitOption .toolTip .item .itemImage .quantity{font-size:14px;background-color:#ffffffbf}.riftBurroughsHud .baitWarning{top:36px;left:275px;z-index:20;width:280px;padding:5px;font-size:12px;line-height:15px;color:#000;background-color:#ffbfbf;border:1px solid #b60000;border-radius:10px;box-shadow:0 0 10px 3px #4d4a4a}.is_misting .mist-display:after{top:9px;bottom:unset;content:"\\2191"}.mist-display:after{position:absolute;right:0;bottom:6px;left:0;font-weight:900;color:#2f3b1c;text-align:center;content:"\\2193"}.riftBurroughsHud .mistButton{filter:hue-rotate(258deg) brightness(.9)}.riftBurroughsHud.is_misting .mistButton{filter:hue-rotate(319deg) brightness(1.3)}.riftBurroughsHud .mistQuantity{font-size:12px;font-weight:900;color:#3d3d3d;text-shadow:1px 1px 2px #f4f4f4}\n';
}
});
// src/modules/location-hud/rift-burroughs/index.js
var makeMiceList, miceData, mouseList, hud7, rift_burroughs_default;
var init_rift_burroughs = __esm({
"src/modules/location-hud/rift-burroughs/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
init_styles61();
makeMiceList = (type, title, mice, currentType, appendTo) => {
const wrapper = makeElement("div", ["mouse-type", type]);
if (currentType === type) {
wrapper.classList.add("active");
}
const mtitle = makeElement("a", "mouse-type-title", title);
mtitle.addEventListener("click", () => {
let id = 1426;
if ("terra" === type) {
id = 1551;
} else if ("polluted" === type) {
id = 1550;
}
hg.utils.TrapControl.setBait(id);
hg.utils.TrapControl.go();
});
wrapper.append(mtitle);
const miceWrapper = makeElement("div", "mouse-type-mice");
mice.forEach((mouse) => {
const mouseWrapper = makeElement("div", "mouse-type-mouse");
const mouseLink = makeElement("a", "mouse-type-mouse-link");
mouseLink.addEventListener("click", (e) => {
hg.views.MouseView.show(mouse);
e.preventDefault();
});
const mouseImage = makeElement("img", "mouse-type-mouse-image");
mouseImage.src = miceData[mouse].image;
mouseLink.append(mouseImage);
makeElement("div", "mouse-type-mouse-name", miceData[mouse].name, mouseLink);
mouseWrapper.append(mouseLink);
miceWrapper.append(mouseWrapper);
});
wrapper.append(miceWrapper);
appendTo.append(wrapper);
return wrapper;
};
miceData = {
rift_amplified_brown: {
name: "Amplified Brown Mouse",
image: "https://www.mousehuntgame.com/images/mice/thumb/9547c50891ce66c00188a0ce278cd9e0.gif?cv=2"
},
rift_amplified_grey: {
name: "Amplified Grey Mouse",
image: "https://www.mousehuntgame.com/images/mice/thumb/b6a9a248439e08367139cba601583781.gif?cv=2"
},
rift_amplified_white: {
name: "Amplified White Mouse",
image: "https://www.mousehuntgame.com/images/mice/thumb/877fd4f1831f1ffd76e6ab9334e96efc.gif?cv=2"
},
rift_automated_sentry: {
name: "Automated Sentry Mouse",
image: "https://www.mousehuntgame.com/images/mice/thumb/d57b33cdbb0d14bb138fe91c166325fa.gif?cv=2"
},
rift_cybernetic_specialist: {
name: "Cybernetic Specialist Mouse",
image: "https://www.mousehuntgame.com/images/mice/thumb/5a0d95f2211444717f29f74959b89366.gif?cv=2"
},
rift_doktor: {
name: "Doktor Mouse",
image: "https://www.mousehuntgame.com/images/mice/thumb/a44277c1d72f76fb507df2a7a4938542.gif?cv=2"
},
rift_evil_scientist: {
name: "Evil Scientist Mouse",
image: "https://www.mousehuntgame.com/images/mice/thumb/fc4030fcea4bb7e0118aa4d46705f37e.gif?cv=2"
},
rift_portable_generator: {
name: "Portable Generator Mouse",
image: "https://www.mousehuntgame.com/images/mice/thumb/f0437620c8c86379e6f8fefb9e82d2c3.gif?cv=2"
},
rift_bio_engineer: {
name: "Rift Bio Engineer",
image: "https://www.mousehuntgame.com/images/mice/thumb/1d91dc3220b096af75ca0423a77ccc83.gif?cv=2"
},
rift_surgeon_bot: {
name: "Surgeon Bot Mouse",
image: "https://www.mousehuntgame.com/images/mice/thumb/6678f8a7003093b081c941a3d571abb8.gif?cv=2"
},
rift_count_vampire: {
name: "Count Vampire Mouse",
image: "https://www.mousehuntgame.com/images/mice/thumb/851f1d4c760d0f263a38d0fa28bbf2fa.gif?cv=2"
},
rift_phase_zombie: {
name: "Phase Zombie",
image: "https://www.mousehuntgame.com/images/mice/thumb/c9675fb32b01e91d43f5ebbbf3bf8f02.gif?cv=2"
},
rift_prototype: {
name: "Prototype Mouse",
image: "https://www.mousehuntgame.com/images/mice/thumb/8be0e48b2fa241e65312726433612871.gif?cv=2"
},
rift_robat: {
name: "Robat Mouse",
image: "https://www.mousehuntgame.com/images/mice/thumb/fa345c83ff784adfbe79230f279be2c6.gif?cv=2"
},
rift_tech_ravenous_zombie: {
name: "Tech Ravenous Zombie",
image: "https://www.mousehuntgame.com/images/mice/thumb/6249796e35d572687db2aa4a4e391335.gif?cv=2"
},
rift_clump: {
name: "Clump Mouse",
image: "https://www.mousehuntgame.com/images/mice/thumb/a901fe9feea2e04ca1da1a3769dd7f77.gif?cv=2"
},
rift_cyber_miner: {
name: "Cyber Miner Mouse",
image: "https://www.mousehuntgame.com/images/mice/thumb/b3768e070c9b40fdfbfef4f39025acc3.gif?cv=2"
},
rift_itty_bitty_burroughs: {
name: "Itty Bitty Rifty Burroughs Mouse",
image: "https://www.mousehuntgame.com/images/mice/thumb/723735735fcbc38d75c5d980b454dc4e.gif?cv=2"
},
rift_pneumatic_dirt_displacement: {
name: "Pneumatic Dirt Displacement Mouse",
image: "https://www.mousehuntgame.com/images/mice/thumb/70bc4cb7409df8be9e1942e27b75c05f.gif?cv=2"
},
rift_rifterranian: {
name: "Rifterranian Mouse",
image: "https://www.mousehuntgame.com/images/mice/thumb/7abd07fac15972db28231f80fd03c075.gif?cv=2"
},
rift_mecha_tail: {
name: "Mecha Tail Mouse",
image: "https://www.mousehuntgame.com/images/mice/thumb/e329e623c6ff501d03c7077b8ecfabf9.gif?cv=2"
},
rift_spore: {
name: "Radioactive Ooze Mouse",
image: "https://www.mousehuntgame.com/images/mice/thumb/f037c2df0d654caaadfe4c8a58a13431.gif?cv=2"
},
rift_toxikinetic: {
name: "Toxikinetic Mouse",
image: "https://www.mousehuntgame.com/images/mice/thumb/bae7062027162025735a5ccbcaf58e5f.gif?cv=2"
},
rift_lycan: {
name: "Lycanoid",
image: "https://www.mousehuntgame.com/images/mice/thumb/18c987fe4ec5ee678114cb748dedfb6d.gif?cv=2"
},
rift_revenant: {
name: "Revenant Mouse",
image: "https://www.mousehuntgame.com/images/mice/thumb/a0060e929e11030025f6609a5cb81c51.gif?cv=2"
},
rift_zombot_unipire: {
name: "Zombot Unipire the Third",
image: "https://www.mousehuntgame.com/images/mice/thumb/95be1a40ec7cf3868fb9041bf43658a8.gif?cv=2"
},
rift_boulder_biter: {
name: "Boulder Biter Mouse",
image: "https://www.mousehuntgame.com/images/mice/thumb/7da77ad10f719afce4f17453cb964f40.gif?cv=2"
},
rift_lambent: {
name: "Lambent Mouse",
image: "https://www.mousehuntgame.com/images/mice/thumb/b301f96263690c2a3dc02a4625aa1c9b.gif?cv=2"
},
rift_master_exploder: {
name: "Master Exploder Mouse",
image: "https://www.mousehuntgame.com/images/mice/thumb/6d04a2ec4e21296272e080df7033a29a.gif?cv=2"
},
rift_rancid_bog_beast: {
name: "Rancid Bog Beast Mouse",
image: "https://www.mousehuntgame.com/images/mice/thumb/5a7f8551ed42a6344e7948b18687e97d.gif?cv=2"
},
rift_radioactive_gold: {
name: "Super Mega Mecha Ultra RoboGold Mouse",
image: "https://www.mousehuntgame.com/images/mice/thumb/022763eaba9d7f6fdbd5cddb3813d6b8.gif?cv=2"
},
rift_toxic_avenger: {
name: "Toxic Avenger Mouse",
image: "https://www.mousehuntgame.com/images/mice/thumb/74891cb924851366d67a3632ed56fa6b.gif?cv=2"
},
rift_monstrous_abomination: {
name: "Monstrous Abomination Mouse",
image: "https://www.mousehuntgame.com/images/mice/thumb/12dc2f226fd5e26144deb154d293e6db.gif?cv=2"
},
rift_big_bad_burroughs: {
name: "Big Bad Behemoth Burroughs Mouse",
image: "https://www.mousehuntgame.com/images/mice/thumb/dfb15f35c1fe4bb07e2b276071a7c439.gif?cv=2"
},
rift_assassin_beast: {
name: "Assassin Beast Mouse",
image: "https://www.mousehuntgame.com/images/mice/thumb/ddb77d3c8cad610f4270f6d1b401602c.gif?cv=2"
},
rift_menace: {
name: "Menace of the Rift Mouse",
image: "https://www.mousehuntgame.com/images/mice/thumb/a286833ada1c4718096e30db734514a2.gif?cv=2"
},
rift_plutonium_tentacle: {
name: "Plutonium Tentacle Mouse",
image: "https://www.mousehuntgame.com/images/mice/thumb/97c996e63dab24de6ed6a089f318012e.gif?cv=2"
}
};
mouseList = {
tier_0: {
string: [
"rift_amplified_brown",
"rift_amplified_grey",
"rift_amplified_white",
"rift_automated_sentry",
"rift_cybernetic_specialist",
"rift_doktor",
"rift_evil_scientist",
"rift_portable_generator",
"rift_bio_engineer",
"rift_surgeon_bot"
],
terra: [],
polluted: []
},
tier_1: {
string: [
"rift_count_vampire",
"rift_phase_zombie",
"rift_prototype",
"rift_robat",
"rift_tech_ravenous_zombie"
],
terra: [
"rift_clump",
"rift_cyber_miner",
"rift_itty_bitty_burroughs",
"rift_pneumatic_dirt_displacement",
"rift_rifterranian"
],
polluted: [
"rift_mecha_tail",
"rift_spore",
"rift_toxikinetic"
]
},
tier_2: {
string: [
"rift_count_vampire",
"rift_lycan",
"rift_phase_zombie",
"rift_prototype",
"rift_revenant",
"rift_robat",
"rift_tech_ravenous_zombie",
"rift_zombot_unipire"
],
terra: [
"rift_boulder_biter",
"rift_clump",
"rift_cyber_miner",
"rift_itty_bitty_burroughs",
"rift_lambent",
"rift_master_exploder",
"rift_pneumatic_dirt_displacement",
"rift_rifterranian"
],
polluted: [
"rift_mecha_tail",
"rift_spore",
"rift_rancid_bog_beast",
"rift_radioactive_gold",
"rift_toxic_avenger",
"rift_toxikinetic"
]
},
tier_3: {
string: [
"rift_monstrous_abomination"
],
terra: [
"rift_big_bad_burroughs"
],
polluted: [
"rift_assassin_beast",
"rift_menace",
"rift_plutonium_tentacle",
"rift_rancid_bog_beast",
"rift_radioactive_gold",
"rift_toxic_avenger"
]
}
};
hud7 = () => {
var _a;
if (!((_a = user == null ? void 0 : user.quests) == null ? void 0 : _a.QuestRiftBurroughs)) {
return;
}
const quest = user.quests.QuestRiftBurroughs;
const armedBait = (quest == null ? void 0 : quest.armed_bait) || "disarmed";
const mistLevel = (quest == null ? void 0 : quest.mist_released) || 0;
const mistTier = (quest == null ? void 0 : quest.mist_tier) || "tier_0";
const hudEl = document.querySelector("#hudLocationContent .riftBurroughsHud");
if (!hudEl) {
return;
}
let color = "yellow";
if (mistLevel >= 7) {
color = "green";
}
if (mistLevel >= 19) {
color = "red";
}
const existing = document.querySelector(".brift-ui");
if (existing) {
existing.remove();
}
const wrapper = makeElement("div", ["brift-ui"]);
const mist = makeElement("div", ["mist-display", `state-${color}`], `${mistLevel} / 20 `);
mist.addEventListener("click", (e) => {
hg.views.HeadsUpDisplayRiftBurroughsView.toggleMist(e.target);
});
wrapper.append(mist);
const availableMice = mouseList[mistTier];
const mouseWrapper = makeElement("div", "mouse-list");
let currentType = null;
switch (armedBait) {
case "brie_string_cheese":
case "marble_string_cheese":
case "magical_string_cheese":
currentType = "string";
break;
case "polluted_parmesan_cheese":
currentType = "polluted";
break;
case "terre_ricotta_cheese":
currentType = "terra";
break;
}
makeMiceList("string", "Magical String", availableMice.string, currentType, mouseWrapper);
makeMiceList("terra", "Terra Ricotta", availableMice.terra, currentType, mouseWrapper);
makeMiceList("polluted", "Polluted Parm.", availableMice.polluted, currentType, mouseWrapper);
wrapper.append(mouseWrapper);
hudEl.append(wrapper);
};
rift_burroughs_default = () => __async(void 0, null, function* () {
addHudStyles(styles_default60);
hud7();
onTurn(hud7);
onRequest(hud7);
});
}
});
// src/modules/location-hud/rift-furoma/styles.css
var styles_default61;
var init_styles62 = __esm({
"src/modules/location-hud/rift-furoma/styles.css"() {
styles_default61 = ".riftFuromaHUD-battery-energyRemaining{right:0;left:-1px;width:auto;font-size:13px;font-style:normal;color:#fff;text-shadow:1px 1px 1px #000,1px 1px 2px #000;background-color:#7a8b8a;border:1px solid #535757;border-radius:1px}.riftFuromaHUD-itemGroup-activeItem .quantity{padding:1px 2px;font-size:12px;font-weight:400;background-color:#dadada}.riftFuromaHUD-battery-energyTotal{font-size:10px;color:#e0e0e0}.riftFuromaHUD-droid-details .riftFuromaHUD-chargeLevel-stat-value{text-shadow:1px 1px 1px #000,0 0 2px #000}.riftFuromaHUD-droid-image{transition:all .5s}.riftFuromaHUD-droid-image:hover{filter:brightness(1.3)}.riftFuromaHUD-battery-image:hover,.riftFuromaHUD-itemGroup.can_craft .riftFuromaHUD-itemGroup-craftButton:hover{filter:brightness(1.2)}.riftFuromaHUD.pagoda .riftFuromaHUD-chargeLevel-statContainer{display:grid;grid-template-columns:1fr 1fr;justify-items:stretch}.riftFuromaHUD-chargeLevel-stat.power{width:unset}.riftFuromaHUD-chargeLevel-stat.luck,.riftFuromaHUD-chargeLevel-stat.power{display:flex;flex-direction:column;align-items:center;width:unset}.riftFuromaHUD-chargeLevel-stat.power_usage{grid-column:span 2;width:unset}.riftFuromaHUD-chargeLevel-statContainer .riftFuromaHUD-chargeLevel-stat-value{padding-top:3px;font-size:17px}.riftFuromaHUD-chargeLevel-stat.power_usage .riftFuromaHUD-chargeLevel-stat-value{padding-top:0;margin-top:-2px;font-size:13px}.riftFuromaHUD-chargeLevel-stat.luck .riftFuromaHUD-chargeLevel-stat-label,.riftFuromaHUD-chargeLevel-stat.power .riftFuromaHUD-chargeLevel-stat-label{font-size:10px;font-weight:900}\n";
}
});
// src/modules/location-hud/rift-furoma/index.js
var rift_furoma_default;
var init_rift_furoma = __esm({
"src/modules/location-hud/rift-furoma/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
init_styles62();
rift_furoma_default = () => __async(void 0, null, function* () {
addHudStyles(styles_default61);
});
}
});
// src/modules/location-hud/rift-gnawnia/styles.css
var styles_default62;
var init_styles63 = __esm({
"src/modules/location-hud/rift-gnawnia/styles.css"() {
styles_default62 = ".riftGnawniaHud:hover .riftGnawniaHud-targetsBackground,.riftGnawniaHud:focus .riftGnawniaHud-targetsBackground,.riftGnawniaHud:active .riftGnawniaHud-targetsBackground{filter:hue-rotate(-40deg)}.riftGnawniaHud-targetsBackground{transition:.5s}.riftGnawniaHud-targets .mousehuntTooltip{inset:0 34px 0 -5px;display:block;width:auto;font-size:11px;text-align:center;background-color:#d6e8e4;border:1px solid #29c7cb;opacity:.9}.riftGnawniaHud-targets .mousehuntTooltip .mousehuntTooltip-arrow{display:none}\n";
}
});
// src/modules/location-hud/rift-gnawnia/index.js
var rift_gnawnia_default;
var init_rift_gnawnia = __esm({
"src/modules/location-hud/rift-gnawnia/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
init_styles63();
rift_gnawnia_default = () => __async(void 0, null, function* () {
addHudStyles(styles_default62);
});
}
});
// src/modules/location-hud/rift-valour/styles.css
var styles_default63;
var init_styles64 = __esm({
"src/modules/location-hud/rift-valour/styles.css"() {
styles_default63 = '#overlayPopup.mh-vrift-popup .jsDialogContainer{background:linear-gradient(#20216f,#703271,#20216f);outline:1px solid #20216f}#overlayPopup.mh-vrift-popup .title{padding:10px;font-size:18px;color:#fff}.mh-vrift-sim-results{display:grid;grid-template-columns:70% 30%;margin:0 1em;color:#fff}.mh-vrift-sim-results .stats{display:grid;grid-template-columns:repeat(2,1fr);grid-row-gap:1rem;margin-bottom:2em}.mh-vrift-sim-results .result{display:flex;place-content:center space-between}.mh-vrift-sim-results .label{width:100%;padding-left:10px;font-size:13px;line-height:30px;color:#eaeaea;vertical-align:middle;background-color:#c3c3c31a;border-radius:5px}.mh-vrift-sim-results .value{position:relative;left:-25px;width:35px;font-size:14px;line-height:30px;color:#eaeaea;text-align:center;background:linear-gradient(#07041d,#4d3bac);border:1px solid #6d86de;border-radius:5px}.mh-vrift-sim-results .eclipses{padding:10px;margin-bottom:2em;font-size:13px;background-color:#c3c3c31a;border-radius:5px}.mh-vrift-sim-results .eclipses h3{padding-bottom:11px;font-size:16px;color:#fff}.mh-vrift-sim-results .eclipses .header{padding-bottom:3px;margin-bottom:10px;font-size:12px;line-height:unset;color:#afafafd9;border-bottom:1px solid rgb(175 175 175 / 85%)}.mh-vrift-sim-results .eclipses li{display:flex;justify-content:space-between;line-height:24px;text-align:right}.mh-vrift-sim-results .eclipses .guaranteed{color:#80e472}.mh-vrift-sim-results .number{text-align:left}.valourRiftHUD-dialog-inventory-item-quantity.quantity{font-size:14px;font-weight:900;line-height:20px;text-shadow:none;background-color:#282659;box-shadow:none}.valourRiftHUD-dialog-inventory-item-name{text-align:center}.valourRiftHUD-towerUpgradeLevel-costTotal{font-size:14px}span.valourRiftHUD-towerUpgrade-currentValue{font-size:13px;font-weight:900;line-height:20px;color:#fff;background-color:#282659}.valourRiftHUD-towerUpgrade-currentValueContainer{display:block;line-height:20px;vertical-align:middle}.valourRiftHUD-towerUpgrade-header-title{padding:10px;font-size:15px}.valourRiftHUD-towerUpgrade-header{display:grid;grid-template-columns:150px 1fr;place-items:center stretch}.valourRiftHUD-towerUpgrade-content{padding:10px}.valourRiftHUD-powerUp.canUpgrade:after{top:6px;left:13px;filter:drop-shadow(1px 4px 6px #40f5ff) hue-rotate(73deg);box-shadow:0 0 6px 3px #2d9ba2}.valourRiftHUD-powerUp-level span{margin-left:-1px;border-radius:0}.valourRiftHUD-powerUp-level:first-child span{border-top-left-radius:5px;border-bottom-left-radius:5px}.valourRiftHUD-powerUp-level:last-child span{border-top-right-radius:5px;border-bottom-right-radius:5px}.valourRiftHUD-powerUp-currentLevel{top:6px;right:10px;padding:2px;font-size:13px;color:#fff}.valourRiftHUD-powerUp.hunt_limit .valourRiftHUD-powerUp-currentLevel{font-size:11px}.valourRiftHUD-gauntletBait-quantity.quantity{top:45px;font-size:13px;font-weight:900}.valourRiftHUD-towerLoot-quantity.quantity{font-size:12px;font-weight:900}.valourRiftHUD-bait-quantity.quantity{width:60px;font-size:13px;line-height:18px}.valourRiftHUD-crafting-quantity.quantity{width:42px;font-size:12px}.valourRiftHUD-fuelContainer-quantity.quantity{z-index:1;padding:1px 2px;margin-top:-7px;margin-right:-3px;font-size:14px;background-color:#281c55;border:1px solid #7db4dc;box-shadow:0 0 0 1px #7eaacd}.valourRiftHUD-fuelContainer-buyButton{top:-4px;left:98px}.valourRiftHUD-previewTower{top:45px;filter:grayscale(1);opacity:.4}span.valourRiftHUD-huntsRemaining-value{margin-right:5px;font-size:13px;font-weight:900;line-height:14px}span.valourRiftHUD-stepsTaken-value{font-size:12px;font-weight:900;color:#2d2964}#mh-vrift-floor-name{position:absolute;top:0;right:25px;left:25px;z-index:1;height:20px;font-size:13px;line-height:17px;background-color:#231857;opacity:0;transition:opacity .2s ease-in-out}.valourRiftHUD-currentFloor:hover #mh-vrift-floor-name,.valourRiftHUD-state.tower:hover #mh-vrift-floor-name,.valourRiftHUD-currentFloor:focus #mh-vrift-floor-name,.valourRiftHUD-state.tower:focus #mh-vrift-floor-name{opacity:1}.bottom.mh-vrift-floor-tooltip{right:-50px;bottom:-60px;left:-60px;font-size:11px}.valourRiftHUD-stepsTaken .mousehuntTooltip{top:-5px;left:107%;width:auto;min-width:170px}.valourRiftHUD-huntsRemaining .mousehuntTooltip{top:5px;left:105%;width:auto;min-width:335px}.valourRiftPopupClaim-lootLog-name{font-size:12px}.valourRiftPopup-towerStat .valourRiftPopup-label{font-size:14px}.valourRiftPopupClaim-stats-content{display:grid;grid-template-columns:repeat(3,1fr);place-items:center center;padding:5px 0 5px 15px;margin:20px;text-align:unset}.valourRiftPopup-towerStat .valourRiftPopup-value{font-size:25px;line-height:30px}.valourRiftPopup-towerStat{display:flex;flex-flow:column;align-items:center;justify-content:center;width:auto;text-align:center}.valourRiftPopup-towerStat.wide{width:unset}.valourRiftPopup-towerStat:last-child{margin-right:-110px}.valourRiftPopupClaim-cacheLoot-image,.valourRiftPopupClaim-lootLog .itemImage{box-shadow:none}.valourRiftPopupClaim-footer{margin-top:-40px}.valourRiftPopupClaim-chest-floor{filter:drop-shadow(0 0 5px #fee198)}.valourRiftPopupClaim-cacheLoot.robbery_slot_a .valourRiftPopupClaim-cacheLoot-image{filter:drop-shadow(0 5px 10px #fe8f21);box-shadow:none}.valourRiftPopupClaim-cacheLoot.research_slot_b .valourRiftPopupClaim-cacheLoot-image{filter:drop-shadow(0 5px 10px #28a938);box-shadow:none}.valourRiftPopupClaim-cacheLoot .mousehuntTooltip .mousehuntTooltip-arrow,.valourRiftPopupClaim-cacheLoot.robbery_slot_a .mousehuntTooltip:after,.valourRiftPopupClaim-cacheLoot.research_slot_b .mousehuntTooltip:after{display:none}.valourRiftPopupClaim-cacheLoot.robbery_slot_a .valourRiftPopupClaim-cacheLoot-image:before,.valourRiftPopupClaim-cacheLoot.research_slot_b .valourRiftPopupClaim-cacheLoot-image:before{top:unset;right:-2px;bottom:0;width:30px;height:30px;content:""}.valourRiftPopupClaim-lootLogTitle{color:#462605}.valourRiftPopupClaim-newFloorRecord{grid-column:span 3;margin-left:-50px}.valourRiftPopupIllustrated-inventoryCostContainer{right:0;left:80px;width:352px;font-size:12px;font-weight:400;line-height:14px;text-align:center}.valourRiftPopupIllustrated.enterTower .valourRiftHUD-highestFloor{font-size:12px;font-weight:900;color:#f2bc7d}.valourRiftPopupIllustrated.enterTower .valourRiftHUD-highestFloorReachedContainer{top:72px;right:69px;display:flex;padding:3px 6 px;background-color:#3f354d;border:1px solid #2f283a;border-radius:4px}.valourRiftPopupIllustrated.enterTower .valourRiftHUD-augmentation-description{display:flex;font-size:12px;font-style:normal;line-height:13px}.valourRiftPopupIllustrated.enterTower .valourRiftHUD-augmentation-cost-quantity{margin-top:3px;margin-left:-14px;font-size:14px;box-shadow:1px -4px 2px #310f3c inset,0 0 3px 3px #b06fd3 inset}.valourRiftPopupIllustrated.enterTower .valourRiftHUD-augmentation-cost-image{background-color:#c7c8c6;background-position:-1px -1px}.valourRiftPopupIllustrated.enterTower .valourRiftHUD-augmentation-cost.error .valourRiftHUD-augmentation-cost-quantity{color:#ccc;background-color:#744444}.valourRiftPopupIllustrated.enterTower .valourRiftHUD-augmentation-cost.error .valourRiftHUD-augmentation-cost-image{filter:grayscale(1);box-shadow:0 0 2px 2px #744444}.valourRiftPopupIllustrated.enterTower a[data-type=tu] .valourRiftHUD-augmentation-description{font-size:10px;line-height:10px}.valourRiftPopupIllustrated.enterTower a.valourRiftHUD-augmentation.locked{filter:grayscale(.8) opacity(.6)}.valourRiftPopupIllustrated.enterTower .valourRiftHUD-dialog-inventory-item-name{padding-right:6px;font-size:12px;line-height:12px}.valourRiftHUD-tower .valourRiftHUD-tower-sprite-name,.valourRiftHUD-tower .valourRiftHUD-tower-sprite.step .valourRiftHUD-tower-sprite-image,.valourRiftHUD-tower .valourRiftHUD-tower-sprite.player .valourRiftHUD-tower-sprite-image,.valourRiftHUD-tower .valourRiftHUD-tower-sprite.floor .valourRiftHUD-tower-sprite-image:before{opacity:1;transition:opacity .4s ease-in-out}.valourRiftHUD-tower:hover .valourRiftHUD-tower-sprite-name,.valourRiftHUD-tower:hover .valourRiftHUD-tower-sprite.step .valourRiftHUD-tower-sprite-image,.valourRiftHUD-tower:hover .valourRiftHUD-tower-sprite.player .valourRiftHUD-tower-sprite-image,.valourRiftHUD-tower:hover .valourRiftHUD-tower-sprite.floor .valourRiftHUD-tower-sprite-image:before{opacity:.4}.valourRiftHUD.tower .valourRiftHUD-state.tower{font-size:11px}.valourRiftHUD-towerLoot-thumb:hover{transform:scale(2.2)}.valourRiftHUD-towerLoot-thumb{background-size:80%;transition:.2s;transform:scale(1.7)}a.valourRiftHUD-gauntletBait-image.active{filter:drop-shadow(0 5px 5px #68b868)}\n';
}
});
// src/modules/location-hud/rift-valour/simulator.js
function getCacheLoot(floor) {
let idx = floor > 1 ? floor - 1 : 0;
if (idx >= cacheLoot.length) {
idx = cacheLoot.length - 1;
}
const loot = cacheLoot[idx];
return loot;
}
function convertToCR(power, luck, stats) {
const mPower = stats[0];
const mEff = stats[1];
return Math.min(1, (power * mEff + 2 * Math.pow(luck * Math.min(mEff, 1.4), 2)) / (mPower + power * mEff));
}
function simulate(shouldDisplay = true) {
const time = (/* @__PURE__ */ new Date()).getTime() / 1e3;
const lvSpeed = window.user.enviroment_atts.power_up_data.long_stride.current_value;
const lvSync = window.user.enviroment_atts.power_up_data.hunt_limit.current_level + 1;
const lvSiphon = window.user.enviroment_atts.power_up_data.boss_extension.current_level + 1;
let siphon = window.user.enviroment_atts.power_up_data.boss_extension.current_value;
const sync = window.user.enviroment_atts.hunts_remaining;
const steps = window.user.enviroment_atts.current_step;
const torchState = window.user.enviroment_atts.is_fuel_enabled;
const torchEclipse = true;
const umbra = window.user.enviroment_atts.active_augmentations.tu;
const superSiphon = window.user.enviroment_atts.active_augmentations.ss;
const strStep = window.user.enviroment_atts.active_augmentations.sste;
const curFloor = window.user.enviroment_atts.floor;
const sh = window.user.enviroment_atts.active_augmentations.hr;
const sr = window.user.enviroment_atts.active_augmentations.sr;
const bail = 999;
let power = window.user.trap_power;
let luck = window.user.trinket_name == "Ultimate Charm" ? 1e5 : window.user.trap_luck;
try {
const altpower = Number(document.getElementsByClassName("campPage-trap-trapStat power")[0].children[1].innerText.match(/[0-9]/g).join(""));
const altluck = Number(document.getElementsByClassName("campPage-trap-trapStat luck")[0].children[1].innerText);
power = Number.isNaN(altpower) ? power : Math.max(power, altpower);
luck = Number.isNaN(altluck) ? luck : Math.max(luck, altluck);
} catch (err) {
console.log(err);
}
const mouseCR = mouseStats.map(function(stats) {
return convertToCR(power, luck, stats);
});
if (useUConEclipse) {
mouseCR[9] = 1;
mouseCR[17] = 1;
}
const mouseAR = umbra ? umbraAR : normalAR;
const eclipseCR = umbra ? mouseCR[17] : mouseCR[9];
const eclipseSG = umbra ? mouseDrops[17][0] : mouseDrops[9][0];
const eclipseSC = umbra ? mouseDrops[17][2] : mouseDrops[9][2];
const eclipseGold = umbra ? mouseDrops[17][4] : mouseDrops[9][4];
const catchProfile = {
push: [eclipseCR],
ta: [0],
kb: [1 - eclipseCR],
bkb: [0],
fta: [0],
sg: [eclipseSG * eclipseCR],
sgi: [0],
sc: [eclipseSC * eclipseCR],
sci: [0],
gold: [eclipseGold * eclipseCR],
cf: [0]
};
for (var j = 1; j <= 4; j++) {
catchProfile.ta[j] = mouseCR[24] * mouseAR[24][j - 1];
catchProfile.bkb[j] = (1 - mouseCR[25]) * mouseAR[25][j - 1];
catchProfile.fta[j] = 0;
catchProfile.sg[j] = 0;
catchProfile.sgi[j] = 0;
catchProfile.sc[j] = 0;
catchProfile.sci[j] = 0;
catchProfile.gold[j] = 0;
catchProfile.cf[j] = 0;
catchProfile.push[j] = -catchProfile.ta[j];
mouseCR.map(function(cr, index) {
catchProfile.push[j] += cr * mouseAR[index][j - 1];
catchProfile.sg[j] += cr * mouseAR[index][j - 1] * mouseDrops[index][0];
catchProfile.sgi[j] += cr * mouseAR[index][j - 1] * mouseDrops[index][1];
catchProfile.sc[j] += cr * mouseAR[index][j - 1] * mouseDrops[index][2];
catchProfile.sci[j] += cr * mouseAR[index][j - 1] * mouseDrops[index][3];
catchProfile.gold[j] += cr * mouseAR[index][j - 1] * mouseDrops[index][4];
});
catchProfile.kb[j] = 1 - catchProfile.ta[j] - catchProfile.bkb[j] - catchProfile.push[j];
}
console.log(catchProfile);
const speed = torchState ? Number(lvSpeed) + 1 : lvSpeed;
siphon = superSiphon ? siphon * 2 : siphon;
let sigils = 0;
let secrets = 0;
let gold = 0;
let cfDrops = 0;
let totalHunts = 0;
let catches = 0;
function addRate(step2, hunts, change) {
if (runValues[step2] == null) {
runValues[step2] = [];
}
if (runValues[step2][hunts] == null) {
runValues[step2][hunts] = 0;
}
runValues[step2][hunts] += change;
}
function stepBuild(step2) {
stepDetails[step2] = {};
let lap = Math.floor(Math.pow(step2 / 35 + 2809 / 1225, 0.5) - 53 / 35) + 1;
const checkLap = Math.floor(Math.pow((step2 + 1) / 35 + 2809 / 1225, 0.5) - 53 / 35) + 1;
const toEC = checkLap * (106 + 35 * checkLap) - 1;
const floorLength = 10 * (lap + 1);
const onEC = lap * (106 + 35 * lap) - 1;
const flFromEC = Math.ceil((onEC - step2) / floorLength);
const floorStart = onEC - flFromEC * floorLength;
stepDetails[step2].floor = lap * 8 - flFromEC;
stepDetails[step2].sync = siphon * (lap - 1) - syncSpent;
stepDetails[step2].toPush = flFromEC == 0 ? Math.min(step2 + speed - torchState + torchEclipse, toEC) : Math.min(step2 + speed, toEC);
stepDetails[step2].toTA = strStep ? Math.min(step2 + 4 * speed, toEC) : Math.min(step2 + 2 * speed, toEC);
stepDetails[step2].toKB = umbra === true ? Math.max(step2 - 5, floorStart) : Math.max(step2, floorStart);
stepDetails[step2].toBKB = Math.max(step2 - 10, floorStart);
lap = flFromEC == 0 ? 0 : Math.min(lap, 4);
stepDetails[step2].cPush = catchProfile.push[lap];
stepDetails[step2].cTA = catchProfile.ta[lap];
stepDetails[step2].cKB = catchProfile.kb[lap];
stepDetails[step2].cBKB = catchProfile.bkb[lap];
stepDetails[step2].cFTA = catchProfile.fta[lap];
stepDetails[step2].sg = catchProfile.sg[lap];
stepDetails[step2].sgi = catchProfile.sgi[lap];
stepDetails[step2].sc = catchProfile.sc[lap];
stepDetails[step2].sci = catchProfile.sci[lap];
stepDetails[step2].gold = catchProfile.gold[lap];
stepDetails[step2].cf = catchProfile.cf[lap];
}
var syncSpent = 0;
const valuesDistribution = Array(500);
for (var i = 0; i < 500; i++) {
valuesDistribution[i] = [];
}
var stepDetails = [];
let loopActive = 1;
let startActive = steps;
let endActive = steps;
let loopEnd;
for (let k = 0; k < valuesDistribution.length; k++) {
valuesDistribution[k][0] = 0;
}
var runValues = [];
for (var step = 0; step < steps; step++) {
runValues[step] = [];
runValues[step][0] = 0;
}
runValues[steps] = [1];
stepBuild(steps);
syncSpent = stepDetails[steps].sync - sync;
stepBuild(steps);
for (let hunts = 1; loopActive == 1; hunts++) {
loopActive = 0;
loopEnd = endActive;
for (step = startActive; step <= loopEnd; step++) {
if (runValues[step] == null) {
runValues[step] = [];
} else {
const rate = runValues[step][hunts - 1];
if (rate != null && rate > 1e-8) {
if (stepDetails[step] == null) {
stepBuild(step);
}
gold += rate * stepDetails[step].gold;
cfDrops += rate * stepDetails[step].cf;
sigils += rate * stepDetails[step].sg;
secrets += rate * stepDetails[step].sc;
if (torchState && stepDetails[step].floor % 8 != 0 || torchEclipse && stepDetails[step].floor % 8 == 0) {
sigils += rate * stepDetails[step].sgi;
secrets += rate * stepDetails[step].sci;
}
if (hunts <= stepDetails[step].sync && rate != 0 && stepDetails[step].floor < bail) {
loopActive = 1;
startActive = Math.min(startActive, stepDetails[step].toBKB);
endActive = Math.max(endActive, stepDetails[step].toTA);
addRate(stepDetails[step].toPush, hunts, rate * stepDetails[step].cPush);
addRate(stepDetails[step].toTA, hunts, rate * stepDetails[step].cTA);
addRate(stepDetails[step].toKB, hunts, rate * stepDetails[step].cKB);
addRate(stepDetails[step].toBKB, hunts, rate * stepDetails[step].cBKB);
addRate(step, hunts, rate * stepDetails[step].cFTA);
catches += rate * (stepDetails[step].cPush + stepDetails[step].cTA);
} else if (hunts - 1 == stepDetails[step].sync || stepDetails[step].floor >= bail) {
totalHunts += (hunts - 1) * rate;
valuesDistribution[stepDetails[step].floor - 1][0] += rate;
}
}
}
}
}
let averageFloor = 0;
valuesDistribution.map(function(a, b) {
averageFloor += a * (b + 1);
});
const loopDistribution = Array(25).fill(0).map(
function(a, index) {
let sum = 0;
valuesDistribution.slice(index * 8, (index + 1) * 8).map(
function(a2) {
sum += Number(a2);
}
);
return Number(sum);
}
);
let runningProbability = 1;
const loopCumulative = loopDistribution.map(function(a) {
const result = runningProbability;
runningProbability -= a;
return result;
});
const loopCopy = loopDistribution.slice(0).filter(function(a) {
return a > 1e-3;
});
const avgFloor = Math.round(averageFloor);
const curCache = getCacheLoot(curFloor);
const avgCache = getCacheLoot(avgFloor);
const mult = [sh ? 1.5 : 1, sr ? 1.5 : 1];
const deltaCache = [Math.ceil(avgCache[0] * mult[0]) - Math.ceil(curCache[0] * mult[0]), Math.ceil(avgCache[1] * mult[1]) - Math.ceil(curCache[1] * mult[1])];
const display = [
"VRift Sim: " + lvSpeed + "/" + lvSync + "/" + lvSiphon + (torchState ? " CF" : "") + (superSiphon ? " SS" : "") + (umbra ? " UU" : "") + (strStep ? " SSt" : "") + (useUConEclipse ? " (UC Eclipse)" : ""),
"Steps: " + steps + " Sync: " + sync,
"Power: " + power + " Luck: " + luck,
"Average Highest Floor: " + avgFloor + ", Average Hunts: " + Math.round(totalHunts),
"| Loot: Sigils: +" + Math.round(sigils) + ", Secrets: +" + Math.round(secrets),
"| Cache: Sigils: +" + deltaCache[0] + ", Secrets: +" + deltaCache[1],
""
];
const startDisplay = display.length;
const fullDisplay = [
"VRift Run Simulation: " + ((/* @__PURE__ */ new Date()).getTime() / 1e3 - time) + " seconds taken.",
"Speed: " + lvSpeed,
"Siphon: " + siphon,
(torchState ? "CF " : "") + (superSiphon ? "SS " : "") + (umbra ? "UU " : "") + (strStep ? "SSt " : ""),
"Steps: " + steps,
"Sync: " + sync,
"Power: " + power,
"Luck: " + luck,
"Sigils: " + sigils,
"Secrets: " + secrets,
"Gold: " + gold,
"Average Highest Floor: " + Math.round(averageFloor),
"Average Hunts: " + Math.round(totalHunts),
""
];
const startFullDisplay = fullDisplay.length;
const eclipses = [];
for (i = 0; i < loopCopy.length; i++) {
const loopIndex = loopDistribution.indexOf(loopCopy[i]);
const eEntry = (loopCopy[i] * 100).toFixed(1);
const cEntry = (loopCumulative[loopIndex] * 100).toFixed(1);
let entry = "Eclipse #" + loopIndex.toString() + ": ";
const fullEntry = entry + eEntry + "% (" + cEntry + "% cumulative)";
if (exactDisplay && cumulativeDisplay) {
entry = fullEntry;
} else if (cumulativeDisplay) {
entry += cEntry + "%";
} else {
entry += eEntry + "%";
}
display[startDisplay + i] = entry;
fullDisplay[startFullDisplay + i] = fullEntry;
eclipses.push({
number: loopIndex,
percent: eEntry,
cumulative: cEntry
});
}
if (shouldDisplay) {
console.log(fullDisplay.join("\n"));
alert(display.join("\n"));
} else {
return {
speed: lvSpeed,
sync: lvSync,
siphon: lvSiphon,
cfOn: torchState,
superSiphon,
umbra,
strStep,
ucEclipse: useUConEclipse,
steps,
power,
luck,
avgFloor,
avgHunts: Math.round(totalHunts),
lootSigils: Math.round(sigils),
lootSecrets: Math.round(secrets),
cacheSigils: deltaCache[0],
cacheSecrets: deltaCache[0],
eclipses
};
}
}
var cumulativeDisplay, exactDisplay, useUConEclipse, cacheLoot, normalAR, umbraAR, mouseDrops, mouseStats, simulator_default;
var init_simulator = __esm({
"src/modules/location-hud/rift-valour/simulator.js"() {
init_sentry_release_injection_stub();
cumulativeDisplay = true;
exactDisplay = false;
useUConEclipse = false;
cacheLoot = [
[0, 0],
[7, 0],
[16, 0],
[24, 0],
[32, 0],
[40, 0],
[48, 0],
[50, 0],
[59, 8],
[69, 10],
[80, 11],
[88, 13],
[98, 14],
[107, 16],
[118, 17],
[120, 17],
[135, 20],
[150, 22],
[165, 24],
[182, 26],
[199, 28],
[217, 31],
[235, 33],
[254, 33],
[272, 37],
[290, 40],
[308, 43],
[325, 45],
[342, 48],
[357, 51],
[372, 54],
[386, 54],
[399, 60],
[410, 63],
[421, 66],
[430, 70],
[439, 73],
[446, 77],
[453, 80],
[459, 80],
[464, 88],
[469, 92],
[473, 96],
[477, 101],
[480, 105],
[482, 109],
[485, 113],
[487, 113],
[489, 123],
[490, 128],
[492, 133],
[493, 138],
[494, 143],
[495, 148],
[495, 153],
[496, 153],
[497, 161],
[497, 167],
[497, 173],
[498, 178],
[498, 184],
[498, 190],
[499, 196],
[500, 196],
[500, 205],
[500, 212],
[500, 218],
[500, 224],
[500, 231],
[500, 237],
[500, 244],
[500, 244],
[500, 253],
[500, 260],
[500, 267],
[500, 274],
[500, 282],
[500, 289],
[500, 296],
[500, 300]
];
normalAR = [
[0, 0, 0, 0],
[0, 0, 0, 0],
[0.08246, 0.05616, 0.04866, 0.04231],
[0.08246, 0.05616, 0.04866, 0.04231],
[0.08246, 0.05616, 0.04866, 0.04231],
[0.08246, 0.05616, 0.04866, 0.04231],
[0.08246, 0.05616, 0.04866, 0.04231],
[0.08246, 0.05616, 0.04866, 0.04231],
[0.08246, 0.05616, 0.04866, 0.04231],
[0, 0, 0, 0],
[0, 0.01658, 0.02836, 0.04121],
[0, 0.01658, 0.02836, 0.04121],
[0, 0.01658, 0.02836, 0.04121],
[0, 0.01658, 0.02836, 0.04121],
[0, 0.01658, 0.02836, 0.04121],
[0, 0.01658, 0.02836, 0.04121],
[0, 0.01658, 0.02836, 0.04121],
[0, 0, 0, 0],
[0.17073, 0.06332, 0.06193, 0.08571],
[0.04065, 0.01583, 0.02368, 0.01978],
[0.03252, 0.01583, 0.02732, 0.01209],
[0, 0.29288, 0.1184, 0.03626],
[0, 0, 0.1275, 0.07473],
[0, 0, 0, 0.09725],
[0.17886, 0.1029, 0.102, 0.08956],
[0, 0, 0, 0],
[0, 0, 0, 0]
];
umbraAR = [
[0, 0, 0, 0],
[0, 0, 0, 0],
[0.066, 0.04129, 0.03857, 0.031],
[0.066, 0.04129, 0.03857, 0.031],
[0.066, 0.04129, 0.03857, 0.031],
[0.066, 0.04129, 0.03857, 0.031],
[0.066, 0.04129, 0.03857, 0.031],
[0.066, 0.04129, 0.03857, 0.031],
[0.066, 0.04129, 0.03857, 0.031],
[0, 0, 0, 0],
[0, 0.01043, 0.01886, 0.036],
[0, 0.01043, 0.01886, 0.036],
[0, 0.01043, 0.01886, 0.036],
[0, 0.01043, 0.01886, 0.036],
[0, 0.01043, 0.01886, 0.036],
[0, 0.01043, 0.01886, 0.036],
[0, 0.01043, 0.01886, 0.036],
[0, 0, 0, 0],
[0.115, 0.072, 0.065, 0.056],
[0.038, 0.023, 0.02, 0.017],
[0.023, 0.014, 0.013, 9e-3],
[0, 0.2311, 0.10806, 0.033],
[0, 0, 0.098, 0.055],
[0, 0, 0, 0.081],
[0.183, 0.112, 0.102, 0.08],
[0.179, 0.186, 0.192, 0.2],
[0, 0, 0, 0]
];
mouseDrops = [
[0, 0, 0, 0, 1982],
[0, 0, 0, 0, 4250],
[0.60515, 0.60515, 0, 0, 1e3],
[0.63774, 0.63774, 0, 0, 1250],
[0.56444, 0.56444, 0, 0, 1500],
[0.57674, 0.57674, 0, 0, 2e3],
[0.63102, 0.63102, 0, 0, 2500],
[0.57209, 0.57209, 0, 0, 3e3],
[0.59, 0.59, 0, 0, 4e3],
[2.40541, 0.98649, 0, 0, 25e3],
[0.01, 0.01, 1.1, 1, 6e3],
[0, 0, 1.1, 1, 6e3],
[909e-5, 909e-5, 1.1, 1, 6e3],
[0, 0, 1.1, 1, 6e3],
[8e-3, 8e-3, 1.1, 1, 6e3],
[826e-5, 826e-5, 1.1, 1, 6e3],
[0.0315, 0.0315, 1.1, 1, 6e3],
[3.82927, 1, 0, 0, 1e5],
[0.0177, 0.0177, 0, 0, 2e3],
[0, 0, 0, 0, 1500],
[0.01429, 0.01429, 0, 0, 1e3],
[643e-5, 643e-5, 1.1, 1, 5e3],
[0, 0, 1.15, 1, 5e3],
[0.02475, 0.02475, 1.75, 1, 8e3],
[0.99597, 0.99396, 0, 0, 4795],
[0, 0, 0, 0, 12e3],
[0, 0, 0, 0, 0]
];
mouseStats = [
[3300, 1],
[5050, 1],
[2900, 1],
[6650, 2],
[8800, 3],
[11750, 4],
[16e3, 5],
[21500, 6],
[29e3, 7],
[7e6, 1e3],
[72e3, 9],
[72e3, 9],
[72e3, 9],
[72e3, 9],
[72e3, 9],
[72e3, 9],
[72e3, 9],
[135e5, 1e3],
[4800, 1.75],
[8250, 1.75],
[23e3, 1.75],
[38e3, 10],
[15e4, 25],
[35e4, 50],
[100, 2],
[818250, 75],
[1e30, 1]
];
simulator_default = simulate;
}
});
// src/modules/location-hud/rift-valour/index.js
var displayResults, hud8, addUIComponents, rift_valour_default;
var init_rift_valour = __esm({
"src/modules/location-hud/rift-valour/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
init_styles64();
init_simulator();
displayResults = (results) => {
let eclipseText = "";
results.eclipses.forEach((eclipse) => {
eclipseText += `<li>
<span class="number">Eclipse ${eclipse.number}</span>
<span class="percent ${eclipse.percent === "100.0" ? "guaranteed" : ""}">${eclipse.percent}%</span>
<span class="cumulative ${eclipse.cumulative === "100.0" ? "guaranteed" : ""}">${eclipse.cumulative}%</span>
</li>`;
});
return `<div class="mh-vrift-sim-results">
<div class="stats">
<div class="result">
<div class="label">Speed</div>
<div class="value">${results.speed}</div>
</div>
<div class="result">
<div class="label">Sync</div>
<div class="value">${results.sync}</div>
</div>
<div class="result">
<div class="label">Avg. Highest Floor</div>
<div class="value">${results.avgFloor}</div>
</div>
<div class="result">
<div class="label">Avg. Hunts</div>
<div class="value">${results.avgHunts}</div>
</div>
<div class="result">
<div class="label">Sigils (Loot)</div>
<div class="value">${results.lootSigils}</div>
</div>
<div class="result">
<div class="label">Secrets (Loot)</div>
<div class="value">${results.lootSecrets}</div>
</div>
<div class="result">
<div class="label">Sigils (Cache)</div>
<div class="value">${results.cacheSigils}</div>
</div>
<div class="result">
<div class="label">Secrets (Cache)</div>
<div class="value">${results.cacheSecrets}</div>
</div>
</div>
<div class="eclipses">
<ol>
<li class="header">
<span class="number">#</span>
<span class="percent">Chance</span>
<span class="cumulative">Total</span>
</li>
${eclipseText}
</ol>
</div>
</div>`;
};
hud8 = () => {
addUIComponents();
const simPopup = document.querySelector(".valourRiftHUD-floorProgress-barContainer");
if (simPopup) {
simPopup.addEventListener("click", () => {
const data = simulator_default(false);
const popup = createPopup({
title: "Valour Rift Run Simulation",
content: displayResults(data),
show: false
});
popup.setAttributes({ className: "mh-vrift-popup" });
popup.show();
});
}
};
addUIComponents = () => {
var _a, _b;
const existing = document.querySelector("#mh-vrift-floor-name");
if (existing) {
existing.remove();
}
const floor = document.querySelector(".valourRiftHUD-currentFloor");
if (floor) {
const floorName = makeElement("div", "valourRiftHUD-floorName", (_b = (_a = user == null ? void 0 : user.quests) == null ? void 0 : _a.QuestRiftValour) == null ? void 0 : _b.floor_name);
floorName.id = "mh-vrift-floor-name";
floor.append(floorName);
}
const floorTooltipParent = document.querySelector(".valourRiftHUD-floorProgress.mousehuntTooltipParent");
if (!floorTooltipParent) {
return;
}
const tooltip = floorTooltipParent.querySelector(".mousehuntTooltip");
if (!tooltip) {
return;
}
tooltip.classList.add("bottom", "mh-vrift-floor-tooltip");
tooltip.classList.remove("top");
const stepsRemaining = tooltip.querySelector(".valourRiftHUD-stepsRemaining");
if (!stepsRemaining) {
return;
}
const floorBar = document.querySelector(".valourRiftHUD-floorProgress-barContainer");
if (!floorBar) {
return;
}
const stepsExisting = document.querySelector(".mh-vrift-steps-remaining");
if (stepsExisting) {
stepsExisting.remove();
}
makeElement("div", "mh-vrift-steps-remaining", stepsRemaining.textContent, floorBar);
};
rift_valour_default = () => __async(void 0, null, function* () {
addHudStyles(styles_default63);
hud8();
});
}
});
// src/modules/location-hud/rift-whisker-woods/styles.css
var styles_default64;
var init_styles65 = __esm({
"src/modules/location-hud/rift-whisker-woods/styles.css"() {
styles_default64 = '.riftWhiskerWoodsHUD-zone-title{right:20%;left:20%;font-size:12px}span.riftWhiskerWoodsHUD-zone-rageLevel{padding-top:0;margin-top:-3px;font-size:18px}span.riftWhiskerWoodsHUD-zone-rageMax{position:unset;display:block;font-size:10px}.riftWhiskerWoodsHUD-zone-rageContainer{top:-9px;left:-4px;display:flex;flex-direction:column;align-items:center;justify-content:center;width:40px;height:40px;background:#5b3b1a;border-radius:10px;box-shadow:0 0 1px 2px inset #b78c5c,0 0 3px 3px inset #292928}.riftWhiskerWoodsHUD-baitWarning{right:20%;left:20%;padding:10px 60px;font-size:12px;text-align:center;background-color:#ffa5a5;border-color:#992023}.riftWhiskerWoodsHUD-zone-charm-quantity.quantity{width:30px;font-size:12px}.riftWhiskerWoodsHUD-zone .mousehuntArmNowButton{right:-2px}.riftWhiskerWoodsHUD-zone-charm-craftingItem{display:grid;grid-template-columns:1fr;place-items:center}.riftWhiskerWoodsHUD-zone-charm-craftingItem-container{display:inline-flex;align-items:stretch;width:270px}.riftWhiskerWoodsHUD-zone-charm-craftButtonContainer{width:110px}.riftWhiskerWoodsHUD-zone-charm-craftingItem-quantity{display:grid;grid-template-columns:1fr 1fr;gap:3px;align-items:end}.riftWhiskerWoodsHUD-zone-charm-craftingItem-quantity br{display:none}.riftWhiskerWoodsHUD-zone-charm-craftingItem-quantity-label{display:block;margin:0}.riftWhiskerWoodsHUD-zone-charm-craftingItem .itemName{display:flex;flex-wrap:nowrap;align-items:stretch;justify-content:center;margin-bottom:4px}.riftWhiskerWoodsHUD-zone-charm-craftButton{display:inline-block;float:none;width:30px}.riftWhiskerWoodsHUD-zone-charm-craftButtonMargin{margin-right:0}.riftWhiskerWoodsHUD-zone-charm-description>b{display:inline-block;padding-bottom:5px;font-size:11px;text-align:center}.riftWhiskerWoodsHUD:hover .riftWhiskerWoodsHUD-zone.boss .riftWhiskerWoodsHUD-zone-progress:after,.riftWhiskerWoodsHUD:focus .riftWhiskerWoodsHUD-zone.boss .riftWhiskerWoodsHUD-zone-progress:after,.riftWhiskerWoodsHUD:hover .riftWhiskerWoodsHUD-zone.high .riftWhiskerWoodsHUD-zone-progress:after,.riftWhiskerWoodsHUD:focus .riftWhiskerWoodsHUD-zone.high .riftWhiskerWoodsHUD-zone-progress:after,.riftWhiskerWoodsHUD:hover .riftWhiskerWoodsHUD-zone.low .riftWhiskerWoodsHUD-zone-progress:after,.riftWhiskerWoodsHUD:focus .riftWhiskerWoodsHUD-zone.low .riftWhiskerWoodsHUD-zone-progress:after{position:absolute;top:0;bottom:0;left:9px;display:flex;align-items:center;padding:2px;font-size:14px;text-shadow:1px 1px #000;content:"Low";background-color:#0006}.riftWhiskerWoodsHUD:hover .riftWhiskerWoodsHUD-zone.high .riftWhiskerWoodsHUD-zone-progress:after,.riftWhiskerWoodsHUD:focus .riftWhiskerWoodsHUD-zone.high .riftWhiskerWoodsHUD-zone-progress:after{content:"High"}.riftWhiskerWoodsHUD:hover .riftWhiskerWoodsHUD-zone.boss .riftWhiskerWoodsHUD-zone-progress:after,.riftWhiskerWoodsHUD:focus .riftWhiskerWoodsHUD-zone.boss .riftWhiskerWoodsHUD-zone-progress:after{content:"Boss"}.boss .riftWhiskerWoodsHUD-zone-rageContainer{box-shadow:0 0 1px 3px inset #b72929,0 0 1px 2px inset #b78c5c,0 0 3px 3px inset #292928}\n';
}
});
// src/modules/location-hud/rift-whisker-woods/index.js
var rift_whisker_woods_default;
var init_rift_whisker_woods = __esm({
"src/modules/location-hud/rift-whisker-woods/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
init_styles65();
rift_whisker_woods_default = () => __async(void 0, null, function* () {
addHudStyles(styles_default64);
});
}
});
// src/modules/location-hud/seasonal-garden/styles.css
var styles_default65;
var init_styles66 = __esm({
"src/modules/location-hud/seasonal-garden/styles.css"() {
styles_default65 = '.seasonalGardenHUD-season.sg,.seasonalGardenHUD-season.sr,.seasonalGardenHUD-season.fl,.seasonalGardenHUD-season.wr{background:url(https://i.mouse.rip/seasonal-garden-season.png) no-repeat 0 0;transform:scale(1.3);transform-origin:bottom}.seasonalGardenHUD{background:url(https://i.mouse.rip/seasonal-garden-hud.png) no-repeat 0 0}.seasonalGardenHUD-season.sg:after,.seasonalGardenHUD-season.sr:after,.seasonalGardenHUD-season.fl:after,.seasonalGardenHUD-season.wr:after{position:absolute;inset:0;content:""}.seasonalGardenHUD-season.sg:after{background-image:url(https://www.mousehuntgame.com/images/ui/hud/spring_icon.png?asset_cache_version=2)}.seasonalGardenHUD-season.sr:after{background-image:url(https://www.mousehuntgame.com/images/ui/hud/summer_icon.png?asset_cache_version=2)}.seasonalGardenHUD-season.fl:after{background-image:url(https://www.mousehuntgame.com/images/ui/hud/fall_icon.png?asset_cache_version=2)}.seasonalGardenHUD-season.wr:after{background-image:url(https://www.mousehuntgame.com/images/ui/hud/winter_icon.png?asset_cache_version=2)}.seasonalGardenHUD-currentAmplifier{top:19px;font-size:15px;text-shadow:1px 1px 0 #ded3c1}.seasonalGardenHUD-currentAmplifier:before{position:absolute;top:-15px;left:10px;width:125px;padding:0 20px;font-size:12px;font-weight:900;color:#765e4c;content:"Tower Amplifier";background:radial-gradient(circle,#dac8ab 14%,#efe2cd 76%,transparent 100%)}.seasonalGardenHUD-maxAmplifier{top:34px;left:60px;display:flex;align-items:center;justify-content:center;width:75px;height:14px;padding:3px;text-align:center;background:radial-gradient(circle,#dac8ab 14%,#d7c1a4 76%,#c4b096);border-bottom-right-radius:40px;border-bottom-left-radius:40px}.seasonalGardenHUD-maxAmplifier:before{content:"Max:"}span.seasonalGardenHUD-maxAmplifier-value{font-size:15px;color:#000;text-shadow:1px 1px 0 #ded3c1}.seasonalGardenHUD-amplifierBoundingBox{width:80px;border-radius:30px}.seasonalGardenHUD-amplifierProgress{overflow:hidden}.seasonalGardenHUD-currentAmplifier:after{position:absolute;top:0;right:-6px;width:12px;height:19px;content:"";background:linear-gradient(249deg,#f6e5d0,#dfc9aa);border-top-left-radius:5px;border-bottom-left-radius:7px}.seasonalGardenHUD-amplifierProgress-bar{transition:width .2s cubic-bezier(.175,.885,.32,1.275);will-change:transform;transform-origin:left}.seasonalGardenHUD-amplifierProgress-bar--animating{animation:.3s bounce-and-stretch-new 2}@keyframes bounce-and-stretch-new{0%{transform:scaleX(1) translate(-10px)}60%{transform:scaleX(1)}75%{transform:scaleX(.98)}90%{transform:scaleX(.999)}}.seasonalGardenHUD-amplifierBoundingBox .mousehuntTooltip{top:-10px;left:120px;width:460px;font-size:11px;line-height:1.6}.seasonalGardenHUD-amplifierBoundingBox .mousehuntTooltip .mousehuntTooltip-arrow{display:none}\n';
}
});
// src/modules/location-hud/seasonal-garden/index.js
var makeProgressDraggable, changeBarColor, seasonal_garden_default;
var init_seasonal_garden2 = __esm({
"src/modules/location-hud/seasonal-garden/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
init_styles66();
makeProgressDraggable = () => {
const progressBar = document.querySelector(".seasonalGardenHUD-amplifierProgress");
if (!progressBar) {
return;
}
const progressBarMarker = document.querySelector(".seasonalGardenHUD-amplifierProgress-bar");
if (!progressBarMarker) {
return;
}
const originalWidth = progressBarMarker.style.width;
let timeout = null;
progressBar.addEventListener("click", (e) => {
const rect = progressBar.getBoundingClientRect();
const x = e.clientX - rect.left;
const width = rect.width;
const percent = Math.round(x / width * 100);
progressBarMarker.style.width = `${percent}%`;
setTimeout(() => {
progressBarMarker.classList.add("seasonalGardenHUD-amplifierProgress-bar--animating");
}, 50);
if (timeout) {
clearTimeout(timeout);
}
timeout = setTimeout(() => {
progressBarMarker.style.width = originalWidth;
setTimeout(() => {
progressBarMarker.classList.remove("seasonalGardenHUD-amplifierProgress-bar--animating");
}, 300);
}, 600);
});
};
changeBarColor = () => {
const trigger = document.querySelector(".seasonalGardenHUD-season");
if (!trigger) {
return;
}
const bar = document.querySelector(".seasonalGardenHUD-amplifierProgress-bar");
if (!bar) {
return;
}
trigger.addEventListener("click", () => {
const hue = Math.round(Math.random() * 360);
bar.style.filter = `hue-rotate(${hue}deg)`;
});
};
seasonal_garden_default = () => __async(void 0, null, function* () {
addHudStyles(styles_default65);
makeProgressDraggable();
changeBarColor();
});
}
});
// src/modules/location-hud/slushy-shoreline/index.js
var slushy_shoreline_default;
var init_slushy_shoreline = __esm({
"src/modules/location-hud/slushy-shoreline/index.js"() {
init_sentry_release_injection_stub();
init_cheese_selectors();
slushy_shoreline_default = () => __async(void 0, null, function* () {
cheese_selectors_default("slushy-shoreline", [
"toxic_super_brie_cheese"
]);
});
}
});
// src/modules/location-hud/ss-huntington-ii/index.js
var ss_huntington_ii_default;
var init_ss_huntington_ii = __esm({
"src/modules/location-hud/ss-huntington-ii/index.js"() {
init_sentry_release_injection_stub();
init_cheese_selectors();
ss_huntington_ii_default = () => __async(void 0, null, function* () {
cheese_selectors_default("ss-huntington-ii", [
"galleon_gouda_cheese"
]);
});
}
});
// src/modules/location-hud/sunken-city/styles.css
var styles_default66;
var init_styles67 = __esm({
"src/modules/location-hud/sunken-city/styles.css"() {
styles_default66 = '.sunkenCityHud .leftSidebar{border:1px solid #333}.sunkenCityHud .leftSidebar .craftingItems{display:flex;flex-direction:column;align-items:stretch;justify-content:center;height:98px;padding:0;border-color:#7e7e7e;border-radius:0}.sunkenCityHud .leftSidebar .craftingItems a{line-height:initial;border-bottom:1px solid #7e7e7e;border-radius:0}.sunkenCityHud .leftSidebar .craftingItems a:first-child{margin-top:-3px}.sunkenCityHud .leftSidebar .craftingItems a:last-child{border-bottom:none}.sunkenCityHud .leftSidebar .craftingItems a img{width:30px;height:30px;border-radius:10px}.sunkenCityHud .leftSidebar .craftingItems a .item.quantity{display:inline-block;font-size:14px;vertical-align:middle}.sunkenCityHud .sunkenCharms{top:0;right:131px;bottom:0;display:grid;grid-template-columns:1fr 1fr;place-items:center stretch;padding-right:3px;background:#333;border:1px solid #7e7e7e;border-radius:5px 0 0 5px}.sunkenCityHud .sunkenCharms a{position:initial;padding:0 1px;margin-left:2px;background-color:#646465;border:none;border-radius:9px}.sunkenCityHud .sunkenCharms a.active{margin-left:2px;background-color:#19a0b8}.sunkenCityHud .sunkenCharms a .toolTip{top:10px;right:130px;left:unset;font-size:10px}.sunkenCityHud .sunkenCharms a .toolTip .arrow{display:none}.sunkenCityHud .sunkenCharms a:last-child,.sunkenCityHud .sunkenCharms a:nth-child(5){border-bottom:none}.sunkenCityHud .sunkenCharms a .itemImage{float:none;width:unset;height:unset}.sunkenCityHud .sunkenCharms a .clear-block{display:flex;align-items:center;justify-content:space-around}.sunkenCityHud .sunkenCharms a .quantity{margin-left:3px;font-size:13px;line-height:initial}.sunkenCityHud .sunkenCharms a .itemImage img{display:inline-block;width:25px;height:25px}.sunkenCityHud .sunkenCharms a .armNow,.sunkenCityHud .sunkenCharms a.disabled .armNow{display:none}.sunkenCityHud .sidebar,.sunkenCityHud .sidebarBox{width:130px}.sunkenCityHud .sidebar{height:98px;border:1px solid #7e7e7e;border-bottom-right-radius:3px}.sunkenCityHud .sidebar .oxygen{color:transparent}.sunkenCityHud .sidebar .oxygen .item,.sunkenCityHud .sidebar .oxygen .item.long{margin-left:3px;font-size:13px}.sunkenCityHud .sidebar .oxygen .item:after{position:absolute;width:25px;margin-left:10px;font-size:12px;color:#000;text-align:left;content:"O\\2082"}.sunkenCityHud .sidebar .diveButton{width:35px;height:20px;padding:2px;margin-right:3px;font-size:9px;line-height:22px;text-align:center;box-shadow:3px 3px 3px #ee9d47 inset,-5px -5px 50px #c66c0c inset}.sunkenCityHud .sidebarTitle{font-size:14px;letter-spacing:3px;background-color:#474747;border:none}.sunkenCityHud .sidebarContent{display:flex;flex-direction:column;justify-content:center;height:39px;border:none}.sunkenCityHud .sidebarContent .zoneName{padding-top:0}.sunkenCityHud .diveControls{display:flex;align-items:center;border-top:1px solid #8b93a9;box-shadow:0 0 20px #fff inset,0 -6px 7px #4b587d inset}.sunkenCityHud .baitWarning{bottom:30%;left:154px;width:330px;font-size:12px;line-height:15px;color:#000;background-color:#ffbfbf;border-radius:10px;box-shadow:none}\n';
}
});
// src/modules/location-hud/sunken-city/index.js
var updateHudImages, makeCharmElement, addMoreCharms, hud9, sunken_city_default2;
var init_sunken_city2 = __esm({
"src/modules/location-hud/sunken-city/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
init_styles67();
updateHudImages = () => {
const upscaleMapping = {
"/crafting_items/thumbnails/1a7897042ba8f3fa31fa6805404456d6.gif": "/crafting_items/transparent_thumb/9197ccdec26278bfb07ab7846b1a2648.png",
// damaged coral.
"/crafting_items/thumbnails/4aaa6478c10308ac865507e4d7915b3c.gif": "/crafting_items/transparent_thumb/d7f3f77c87ea7849a2ec8bc3f7d05b74.png",
// mouse scale.
"/crafting_items/thumbnails/e12ed1306d81665278952d4b4349b495.gif": "/crafting_items/transparent_thumb/5057d634368131d5ab4ad62bf0963800.png",
// barnacle.
"/bait/1f6237cebe21954e53d6586b2cbdfe39.gif": "/bait/transparent_thumb/0d27e0c72c3cbdc8e9fe06fb7bdaa56d.png",
// fishy fromage.
"/trinkets/555bb67ba245aaf2b05db070d2b4cfcb.gif": "/trinkets/transparent_thumb/be6749a947b746fbece2754d9bd02f74.png",
// anchor.
"/trinkets/5f56cb017ff9414e584ced35b2491aef.gif": "/trinkets/transparent_thumb/2dc6b3e505fd1eaac8c6069937490386.png"
// water jet.
};
const upscaleImage = (image) => {
const normalizedImage = image.src.replace("https://www.mousehuntgame.com/images/items", "").replace("?cv=1", "").replace("?cv=2", "").replace("?v=1", "").replace("?v=2", "");
if (upscaleMapping[normalizedImage]) {
image.src = `https://www.mousehuntgame.com/images/items/${upscaleMapping[normalizedImage]}?cv=2`;
}
};
const hudImages = document.querySelectorAll(".sunkenCityHud .leftSidebar .craftingItems a img");
hudImages.forEach((image) => {
upscaleImage(image);
});
const baitImage = document.querySelector(".sunkenCityHud .sunkenBait .itemImage img");
if (baitImage) {
upscaleImage(baitImage);
}
const charms = document.querySelectorAll(".sunkenCityHud .sunkenCharms a .itemImage img");
charms.forEach((charm) => {
upscaleImage(charm);
});
};
makeCharmElement = (charm, appendTo) => {
const existing = document.querySelector(`.mhui-sunken-charm[data-item-type="${charm.type}"]`);
if (existing) {
existing.remove();
}
const wrapper = makeElement("a", ["charm", "mhui-sunken-charm"]);
if (user.trinket_item_id == charm.item_id) {
wrapper.classList.add("active");
}
wrapper.setAttribute("href", "#");
wrapper.setAttribute("data-item-type", charm.type);
wrapper.setAttribute("data-item-classification", "trinket");
wrapper.setAttribute("title", charm.name);
wrapper.setAttribute("onclick", "app.views.HeadsUpDisplayView.hud.sunkenCityArmItem(this);return false;");
const clearBlock = makeElement("div", "clear-block");
const itemImage = makeElement("div", "itemImage");
const image = makeElement("img");
image.setAttribute("src", charm.thumbnail_transparent);
itemImage.append(image);
clearBlock.append(itemImage);
const quantity = makeElement("div", "item quantity", charm.quantity);
quantity.setAttribute("data-item-type", charm.type);
clearBlock.append(quantity);
wrapper.append(clearBlock);
if ("smart_water_jet_trinket" == charm.type) {
charm.description = "Overcharge your engine for a 500m boost with an automatic unequip after the hunt.";
} else if ("brilliant_water_jet_trinket" == charm.type) {
charm.description = "Supercharge your engine for a boost to the end of the current zone!";
} else if ("spiked_anchor_trinket" == charm.type) {
charm.description = "Slow down your sub while also boosting your power!";
} else if ("golden_anchor_trinket" == charm.type) {
charm.description = "Set your sub to super-slow and also find additional sand dollars!";
}
const toolTip = makeElement("div", "toolTip");
toolTip.innerHTML = `<b>${charm.name}s</b><br>${charm.description}`;
wrapper.append(toolTip);
appendTo.append(wrapper);
};
addMoreCharms = () => __async(void 0, null, function* () {
const charmsWrapper = document.querySelector(".sunkenCityHud .sunkenCharms");
if (!charmsWrapper) {
return;
}
const existingCharms = charmsWrapper.querySelectorAll(".mhui-sunken-charm");
for (const charm of existingCharms) {
charm.remove();
}
const itemsData = yield getUserItems([
"spiked_anchor_trinket",
"smart_water_jet_trinket",
"golden_anchor_trinket",
"brilliant_water_jet_trinket"
]);
if (user.trinket_item_id == 1517) {
const waterJetCharm = document.querySelector('.sunkenCityHud .sunkenCharms a[data-item-type="water_jet_trinket"]');
if (waterJetCharm) {
waterJetCharm.classList.add("active");
}
}
if (user.trinket_item_id == 423) {
const anchorCharm = document.querySelector('.sunkenCityHud .sunkenCharms a[data-item-type="anchor_trinket"]');
if (anchorCharm) {
anchorCharm.classList.add("active");
}
}
for (const item of itemsData) {
makeCharmElement(item, charmsWrapper);
}
});
hud9 = () => {
updateHudImages();
addMoreCharms();
};
sunken_city_default2 = () => __async(void 0, null, function* () {
addHudStyles(styles_default66);
hud9();
});
}
});
// src/modules/location-hud/table-of-contents/styles.css
var styles_default67;
var init_styles68 = __esm({
"src/modules/location-hud/table-of-contents/styles.css"() {
styles_default67 = ".folkloreForestRegionView-libraryStatsContainer{display:grid;grid-template-columns:1fr 1fr 1fr;justify-items:center;margin:10px 0 10px 10px}.folkloreForestRegionView-libraryStats.bestBook{padding:10px 15px;margin:10px 0;border:1px solid #2e602b;border-top:none;border-radius:30px}.folkloreForestRegionView-libraryStats.bestBook:after{display:none}.folkloreForestRegionView-libraryStats-label{max-width:130px;height:unset;padding:5px;font-size:13px;font-weight:400}.folkloreForestRegionView-libraryStats.bestBook .folkloreForestRegionView-libraryStats-value{gap:10px}.folkloreForestRegionView-libraryBestBook-name{min-width:100px;margin-bottom:5px;font-size:13px;line-height:15px}.folkloreForestRegionView-libraryStats.bestBook .folkloreForestRegionView-libraryStats-label{position:absolute;top:-16px;left:-10px;max-width:unset;padding:5px 10px;background-color:#6a9e43;border-radius:10px;box-shadow:0 1px 5px #070707;rotate:-10deg}.folkloreForestRegionView-libraryStats{display:flex;flex-direction:column;align-items:center;width:210px}.folkloreForestRegionView-libraryStats-value{height:unset}.folkloreForestRegionView-libraryStats-value.longestWritingSession{display:flex;flex-direction:row;column-gap:5px;align-items:baseline;justify-content:center;margin-left:30px}.folkloreForestRegionView-libraryBooksContainer{display:flex;flex-wrap:wrap;gap:20px;align-items:center;justify-content:center;padding-bottom:20px}.folkloreForestRegionView-libraryBook{width:auto;min-width:150px}.folkloreForestRegionView-libraryBook-words{font-size:12px;color:#b4c2ab}.folkloreForestRegionView-libraryBook-name{font-size:14px;font-weight:400}.folkloreForestRegionView-libraryBook-quantity{font-size:30px;color:#81eb00;text-shadow:1px 1px 1px #143706,0 1px 1px #143706,1px 0 1px #143706,0 0 1px #143706;filter:drop-shadow(0 0 2px #000)}.folkloreForestRegionView-libraryStats-value.bigText{color:#81eb00;text-shadow:1px 1px 1px #143706,0 1px 1px #143706,1px 0 1px #143706,0 0 1px #143706}.folkloreForestRegionView-libraryStats.totalWords{flex:1}.folkloreForestRegionView-libraryBook.disabled .tableOfContentsView-bookCover{filter:opacity(.8) grayscale(1)}.folkloreForestRegionView-libraryBook.disabled .folkloreForestRegionView-libraryBook-name{color:#979797}#overlayPopup.fabledForestDialog .title{font-size:19px;letter-spacing:1px}.tableOfContentsProgressView-nextBookContainer{position:absolute;bottom:-33px;padding:3px;font-size:11px;white-space:nowrap;background-color:#fdebab;box-shadow:0 1px 1px 1px #f1b960;transform:translate(-50%)}.tableOfContentsView-wordMeter-value{font-size:14px}.tableOfContentsProgressView-nextBook-wordsRequired{text-decoration:none}.tableOfContentsProgressView-book-huntsRemaining span{font-size:13px}.tableOfContentsProgressView-book-wordCount{margin:10px 0 5px}a.tableOfContentsProgressView-claimButton.reveal{filter:hue-rotate(80deg) brightness(1.2)}.tableOfContentsClaimDialogView-miceLoot .itemImage .quantity{font-size:13px;background-color:#fff9}.folkloreForestRegionView-boost{display:none}.tableOfContentsView-initialFuel-checkboxContainer{background-color:transparent}.tableOfContentsProgressView-progressBar-value{filter:sepia(1)}.tableOfContentsProgressView-progressBar{background:none;box-shadow:none}.tableOfContentsProgressView-cancelButton.active{top:-31px;left:338px;border-radius:50%;box-shadow:0 0 0 4px #48762a,inset 0 -1px 3px 1px #d7a086}\n";
}
});
// src/modules/location-hud/table-of-contents/index.js
var updateWordLootQuantity, updateNextWordCount, table_of_contents_default2;
var init_table_of_contents2 = __esm({
"src/modules/location-hud/table-of-contents/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
init_folklore_forest2();
init_styles44();
init_styles68();
updateWordLootQuantity = () => {
const lootSpan = document.querySelector(".tableOfContentsView-wordMeter-value");
if (!lootSpan) {
return;
}
const loot = lootSpan.innerText;
const lootParts = loot.split("-");
if (lootParts.length > 1 && lootParts[0] === lootParts[1]) {
lootSpan.innerText = lootParts[0];
}
};
updateNextWordCount = () => {
const wordsRequired = document.querySelector(".tableOfContentsProgressView-nextBook-wordsRequired");
if (!wordsRequired) {
return;
}
wordsRequired.innerText = wordsRequired.getAttribute("title").replace(" words", "");
};
table_of_contents_default2 = () => __async(void 0, null, function* () {
addHudStyles([styles_default43, styles_default67]);
folklore_forest_default2();
updateWordLootQuantity();
onRequest(updateWordLootQuantity, "managers/ajax/environment/table_of_contents.php");
updateNextWordCount();
onRequest(() => {
updateNextWordCount();
setTimeout(updateNextWordCount, 500);
setTimeout(updateNextWordCount, 1e3);
}, "managers/ajax/turns/activeturn.php");
});
}
});
// src/modules/location-hud/tournament-hall/index.js
var tournament_hall_default;
var init_tournament_hall = __esm({
"src/modules/location-hud/tournament-hall/index.js"() {
init_sentry_release_injection_stub();
init_cheese_selectors();
tournament_hall_default = () => __async(void 0, null, function* () {
cheese_selectors_default("tournament-hall", [
"runny_cheese"
]);
});
}
});
// src/modules/location-hud/town-of-digby/index.js
var town_of_digby_default;
var init_town_of_digby = __esm({
"src/modules/location-hud/town-of-digby/index.js"() {
init_sentry_release_injection_stub();
init_cheese_selectors();
town_of_digby_default = () => __async(void 0, null, function* () {
cheese_selectors_default("town-of-digby", [
"limelight_cheese"
]);
});
}
});
// src/modules/location-hud/town-of-gnawnia/styles.css
var styles_default68;
var init_styles69 = __esm({
"src/modules/location-hud/town-of-gnawnia/styles.css"() {
styles_default68 = ".townOfGnawniaHUD-intro{line-height:17px}.townOfGnawniaHUD-bountyRewardContainer{background:#e5c9a8 url(https://www.mousehuntgame.com/images/items/stats/large/f659a8a07d3877df4165b188f13bb0db.png) 5px 0 no-repeat;background-size:contain}.townOfGnawniaHUD-mouse-bait-thumb{background-color:#c19d74;outline:2px solid #886843}.townOfGnawniaHUD-mouse-bait-name{font-size:13px}.townOfGnawniaHUD-mouse-image.reveal{animation-name:town-of-gnawnia-mouse-reveal-new}@media screen and (prefers-reduced-motion: reduce){.townOfGnawniaHUD-mouse-image{animation:none}}@keyframes town-of-gnawnia-mouse-reveal-new{0%{opacity:0;transform:scale(.1) rotate(30deg);transform-origin:center bottom}50%{transform:rotate(-10deg)}70%{transform:rotate(3deg)}to{opacity:1;transform:scale(1)}}\n";
}
});
// src/modules/location-hud/town-of-gnawnia/index.js
var town_of_gnawnia_default;
var init_town_of_gnawnia = __esm({
"src/modules/location-hud/town-of-gnawnia/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
init_styles69();
town_of_gnawnia_default = () => __async(void 0, null, function* () {
addHudStyles(styles_default68);
});
}
});
// src/modules/location-hud/train-station/styles.css
var styles_default69;
var init_styles70 = __esm({
"src/modules/location-hud/train-station/styles.css"() {
styles_default69 = ".pendingTrainContainer .trainTableBody{height:340px}.trainStationHUD{height:400px}.trainStationHUD .trainStationPhase .wrongEnvironment b{position:absolute;top:-41px;box-sizing:border-box;height:32px;padding:3px 10px;font-weight:400;line-height:30px;vertical-align:middle;background-color:#ffbfbf}.mousehuntHud-marbleDrawer .tournamentStatusHud.hasError.train{height:32px;overflow:hidden}\n";
}
});
// src/modules/location-hud/train-station/index.js
var train_station_default;
var init_train_station = __esm({
"src/modules/location-hud/train-station/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
init_styles70();
train_station_default = () => __async(void 0, null, function* () {
addHudStyles(styles_default69);
});
}
});
// src/modules/location-hud/windmill/styles.css
var styles_default70;
var init_styles71 = __esm({
"src/modules/location-hud/windmill/styles.css"() {
styles_default70 = ".windmillHud-helpContainer-section-quantity{font-size:14px}\n";
}
});
// src/modules/location-hud/windmill/index.js
var windmill_default;
var init_windmill = __esm({
"src/modules/location-hud/windmill/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
init_styles71();
windmill_default = () => __async(void 0, null, function* () {
addHudStyles(styles_default70);
});
}
});
// src/modules/location-hud/zugzwang-tower/styles.css
var styles_default71;
var init_styles72 = __esm({
"src/modules/location-hud/zugzwang-tower/styles.css"() {
styles_default71 = '.zuzwangsTowerHUD-progress{overflow:visible;counter-reset:chess 0}.zuzwangsTowerHUD-progress img{position:relative;display:inline-block;counter-increment:chess 1}.zuzwangsTowerHUD:hover .zuzwangsTowerHUD-progress:after{position:absolute;top:0;right:0;display:block;padding:2px;margin-right:-40px;font-size:10px;color:#000;content:counter(chess) "/15";background-color:#dcccb3;border-radius:10px}.zuzwangsTowerHUD-amplifierBoundingBox .mousehuntTooltip{left:86px}.zuzwangsTowerHUD-amplifierBoundingBox .mousehuntTooltip .mousehuntTooltip-arrow{display:none}.zuzwangsTowerHUD-currentAmplifier{top:19px;font-size:15px;text-shadow:1px 1px 0 #ded3c1}.zuzwangsTowerHUD:before{position:absolute;top:4px;left:125px;padding:0 20px;font-size:12px;font-weight:900;color:#765e4c;content:"Tower Amplifier";background:radial-gradient(circle,#dac8ab 14%,#efe2cd 76%,transparent 100%)}a.zugzwangsTowerHUD-retreatButton.mousehuntTooltipParent{top:95px}.zugzwangsTowerHUD-retreatButton:hover{background-color:#7d2b2b}\n';
}
});
// src/modules/location-hud/zugzwang-tower/index.js
var zugzwang_tower_default;
var init_zugzwang_tower2 = __esm({
"src/modules/location-hud/zugzwang-tower/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
init_styles72();
zugzwang_tower_default = () => __async(void 0, null, function* () {
addHudStyles(styles_default71);
});
}
});
// src/modules/location-hud/region-living-garden/styles.css
var styles_default72;
var init_styles73 = __esm({
"src/modules/location-hud/region-living-garden/styles.css"() {
styles_default72 = ".livingGardenHud .essenceContainer .item{padding-top:26px;padding-bottom:5px;font-size:14px;text-shadow:0 0 4px #5e5e5e}.livingGardenHud .itemContainer .itemImage .quantity{right:1px;bottom:1px;padding:2px 3px;font-size:12px;font-weight:400}.livingGardenHud.desert_oasis .minigameContainer .pourEstimate{top:45px;font-size:12px}.livingGardenHud.desert_oasis.corrupted .minigameContainer.drops .itemImage .quantity{padding:1px 2px;font-size:12px}.livingGardenHud .itemContainer .itemImage:hover{opacity:.9}.livingGardenHud .essenceContainer .item:hover,.livingGardenHud .essenceContainer .item:focus,.livingGardenHud .essenceContainer .item:active{border-radius:10px;box-shadow:inset 0 0 5px 2px #8cffde}.livingGardenHud .essenceContainer .item:first-child:hover,.livingGardenHud .essenceContainer .item:first-child:focus,.livingGardenHud .essenceContainer .item:first-child:active{width:24px;padding-right:2px;padding-left:16px;margin-left:22px;text-align:left}\n";
}
});
// src/modules/location-hud/region-living-garden/index.js
var region_living_garden_default;
var init_region_living_garden = __esm({
"src/modules/location-hud/region-living-garden/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
init_styles73();
region_living_garden_default = () => __async(void 0, null, function* () {
addHudStyles(styles_default72);
});
}
});
// src/modules/location-hud/region-queso/styles.css
var styles_default73;
var init_styles74 = __esm({
"src/modules/location-hud/region-queso/styles.css"() {
styles_default73 = ".quesoHUD-wildTonic-quantity.quantity{top:4px;left:42px;padding:1px;font-size:13px;line-height:initial;text-shadow:1px 1px 1px #825842}.quesoHUD-bait-group-baitQuantity.quantity{z-index:1;font-size:12px;text-shadow:1px 1px 1px #715c4e;border-radius:4px}.ember_root_crafting_item .quesoHUD-bait-group-craftingQuantity.quantity,.ember_stone_crafting_item .quesoHUD-bait-group-craftingQuantity.quantity{position:absolute;top:5px;right:-20px;z-index:1;display:block;font-size:12px;text-shadow:1px 1px 1px #715c4e;background-color:#715c4eab;border-radius:4px}.quesoGeyserHUD .quesoHUD-bait-group .mousehuntItem-image{background-color:#e8c4ab}.quesoGeyserHUD .disabled .mousehuntItem-image{top:1px;left:-1px;box-shadow:0 0 20px #333 inset}.quesoGeyserHUD .quesoHUD-bait-group-spiceImage .mousehuntItem-image{top:1px;left:-1px;width:21px;height:21px;background-color:#755541;background-size:100%}.quesoGeyserHUD .quesoHUD-bait-group.bland_queso_cheese .mousehuntItem-image{top:-2px}.quesoGeyserHUD-nestBlock:hover .quesoGeyserHUD-nestBlock-image-transition{opacity:1;transition:opacity .3s ease-in-out}.quesoHUD-bait-group:hover .quesoHUD-bait-group-tooltip{padding:4px 3px;font-size:12px;background-color:#505050;border:none;border-radius:10px}.quesoCanyonHUD-pump-nachore-padding span.quantity{padding:3px;font-size:12px;background:#4d8d4a;border-radius:10px}.quesoGeyserHUD-block-title.quesoGeyserHUD-stateName{margin:2px 8px 1px;font-size:13px;background-color:#723b14;box-shadow:0 0 5px -1px inset #90542a}#hudLocationContent .quesoGeyserHUD:hover .quesoHUD-wildTonic-button.selected:after{transform-origin:center;animation:mh-improved-sway-side-to-side .45s;animation-iteration-count:2}@media (prefers-reduced-motion: reduce){#hudLocationContent .quesoGeyserHUD:hover .quesoHUD-wildTonic-button.selected:after{animation:none}}.quesoGeyserHUD-block-huntsRemaining{padding-top:4px;padding-bottom:2px;font-size:38px}.quesoGeyserHUD-block-huntsRemaining-label.eruption.claim{font-size:10px;color:#d7d7d7;text-transform:lowercase}.quesoGeyserHUD-craftingItem-quantity.quantity{font-size:13px;background-color:#815942;border-radius:3px;box-shadow:0 0 5px -1px inset #90542a}.quesoHUD-bait-group-spiceQuantity.quantity{top:29px;font-size:12px}.quesoGeyserHUD .quesoHUD-bait-group.bland_queso_cheese .quesoHUD-bait-group-baitQuantity{top:18px;padding-left:3px;background-color:#723b14;border-top-left-radius:5px;border-bottom-left-radius:5px;box-shadow:0 0 5px -1px inset #90542a}.quesoCanyonHUD.showBossCheese .quesoHUD-bait-group.super_brie_cheese .quesoHUD-bait-group-baitQuantity{right:26px}.quesoHUD-bait-group{display:inline-block}.quesoHUD-bait-group-cheeseImage .mousehuntItem-image,.quesoHUD-bait-group-spiceImage .mousehuntItem-image{background-color:transparent}.quesoHUD-bait-group-spiceImage .mousehuntItem-image{border:none;box-shadow:none;transform:scale(1.2);transform-origin:top}\n";
}
});
// src/modules/location-hud/region-queso/index.js
var region_queso_default;
var init_region_queso = __esm({
"src/modules/location-hud/region-queso/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
init_styles74();
region_queso_default = () => __async(void 0, null, function* () {
addHudStyles(styles_default73);
});
}
});
// src/modules/location-hud/event-locations/birthday/styles.css
var styles_default74;
var init_styles75 = __esm({
"src/modules/location-hud/event-locations/birthday/styles.css"() {
styles_default74 = "";
}
});
// src/modules/location-hud/event-locations/birthday/global.css
var global_default;
var init_global2 = __esm({
"src/modules/location-hud/event-locations/birthday/global.css"() {
global_default = "";
}
});
// src/modules/location-hud/event-locations/birthday/index.js
var birthdayGlobal, birthdayLocation;
var init_birthday = __esm({
"src/modules/location-hud/event-locations/birthday/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
init_styles75();
init_global2();
birthdayGlobal = () => __async(void 0, null, function* () {
addStyles(global_default);
});
birthdayLocation = () => __async(void 0, null, function* () {
addHudStyles(styles_default74);
});
}
});
// src/modules/location-hud/event-locations/great-winter-hunt/styles.css
var styles_default75;
var init_styles76 = __esm({
"src/modules/location-hud/event-locations/great-winter-hunt/styles.css"() {
styles_default75 = '.headsUpDisplayWinterHuntRegionView__golemPartQuantity.quantity{margin-top:-2px;margin-right:1px;margin-left:0;font-size:12px;background-color:#4484a2;border-radius:3px;box-shadow:inset 0 0 0 1px #154b6f}.headsUpDisplayWinterHuntRegionView__golemPart:nth-child(3) .headsUpDisplayWinterHuntRegionView__golemPartQuantity.quantity{margin-right:-2px;margin-left:2px}.headsUpDisplayWinterHuntRegionView__golemPart:nth-child(2) .headsUpDisplayWinterHuntRegionView__golemPartQuantity.quantity{margin-right:-1px;margin-left:1px}.headsUpDisplayWinterHuntRegionView__golemPart:nth-child(4) .headsUpDisplayWinterHuntRegionView__golemPartQuantity.quantity{padding-top:0;padding-bottom:2px;margin-top:4px;margin-right:0;margin-left:0;color:#133850;background:linear-gradient(90deg,#0c5168 1%,#95c2d3 10%,#a8d3e0 16% 84%,#6ba1bb 92%,#0c5168 96%);border-radius:0 0 3px 3px;box-shadow:inset 1px -2px 2px -1px #0b3f55}.headsUpDisplayWinterHuntRegionView__golemPart:nth-child(5) .headsUpDisplayWinterHuntRegionView__golemPartQuantity.quantity{padding-top:1px;padding-bottom:1px;margin-top:-2px;margin-right:-1px;margin-left:1px;color:#133850;background-color:#a8d3e0;box-shadow:inset 0 0 1px 1px #5f9bb4}.headsUpDisplayWinterHuntRegionView__golemBuffQuantity.quantity{font-size:11px;color:#133850}.headsUpDisplayWinterHuntRegionView__golemUpgradeCost{position:absolute;top:6px;right:22px;left:24px;display:flex;align-items:center;justify-content:center;height:15px;padding:2px;margin-left:-1px;font-size:12px;color:#86c8e4;text-align:center;background-color:#18536d;border:1px solid #915211;border-radius:10px;box-shadow:inset 0 0 2px 1px #113346,1px -2px 1px -1px #e9c320,-8px 6px 0 -6px #6c5528}.headsUpDisplayWinterHuntRegionView__golemUpgradeCost:after{display:none}.headsUpDisplayWinterHuntRegionView__golemLevel{align-items:center;justify-content:center;margin-top:1px}.headsUpDisplayWinterHuntRegionView__environmentItemQuantity.quantity{font-size:13px}.headsUpDisplayWinterHuntRegionView__cinnamon{margin-bottom:9px}.headsUpDisplayWinterHuntRegionView__fuelQuantity.quantity{font-size:13px}.headsUpDisplayWinterHuntRegionView__baitImageButton{filter:drop-shadow(0 0 3px #a8d3e0);background-position:-1px -4px;background-size:41px;border-radius:50%}.headsUpDisplayWinterHuntRegionView__basicBaitContainer.super_brie_cheese .headsUpDisplayWinterHuntRegionView__baitImageButton{background-position:-3px -4px;border-radius:50%}.greatWinterHuntGolemManagerLaunchTabView__toggleButton{background:linear-gradient(to bottom,#fff9f9 50%,#71a4eb);border:none}.greatWinterHuntGolemManagerLaunchTabView__toggleButton--disabled{filter:grayscale(1);opacity:.7}.greatWinterHuntGolemManagerLaunchTabView__toggleItemQuantity{padding:4px;font-size:13px}.greatWinterHuntGolemManagerLaunchTabView__toggleItemImage{top:-10px;left:-11px;width:40px;height:40px}.greatWinterHuntDialogView__footerItemQuantity.quantity{padding:3px;font-size:13px;border-radius:5px;box-shadow:inset 0 0 1px 1px #a8d3e0}.greatWinterHuntDialogView__inventoryFooter .headsUpDisplayWinterHuntRegionView__plusButton{position:absolute;right:-15px;display:none;width:19px;height:19px;background-size:cover;border-radius:2px;box-shadow:0 0 1px 1px #527e8f}.greatWinterHuntDialogView__inventoryFooter:hover button.headsUpDisplayWinterHuntRegionView__plusButton,.greatWinterHuntDialogView__inventoryFooter:focus button.headsUpDisplayWinterHuntRegionView__plusButton,.greatWinterHuntDialogView__inventoryFooter:active button.headsUpDisplayWinterHuntRegionView__plusButton{display:block}.headsUpDisplayWinterHuntRegionView__golemHuntsRemaining{display:flex;align-items:center;justify-content:center;height:26px;padding-top:0;margin-top:1px;font-size:15px;line-height:unset;background-color:#0d3650;border-radius:5px 1px 1px 5px;box-shadow:inset 0 0 2px 2px #5d747f}.headsUpDisplayWinterHuntRegionView__golemChatMessage span{display:flex;width:unset;padding-bottom:2px;font-size:10px;line-height:10px}.headsUpDisplayWinterHuntRegionView__golemChatMessage:before{top:100%}.headsUpDisplayWinterHuntRegionView__golem:nth-child(1) .headsUpDisplayWinterHuntRegionView__golemChatMessage{padding:3px;transform:rotate(-5deg) translate(-10px) translateY(-25px)}.headsUpDisplayWinterHuntRegionView__golem:nth-child(2) .headsUpDisplayWinterHuntRegionView__golemChatMessage{padding:3px;transform:translateY(-25px)}.headsUpDisplayWinterHuntRegionView__golem:nth-child(3) .headsUpDisplayWinterHuntRegionView__golemChatMessage{padding:3px;transform:rotate(5deg) translate(10px) translateY(-25px)}.headsUpDisplayWinterHuntRegionView__golem .headsUpDisplayWinterHuntRegionView__golemChatMessage{opacity:0;transition:opacity .3s}.headsUpDisplayWinterHuntRegionView__golem:hover .headsUpDisplayWinterHuntRegionView__golemChatMessage,.headsUpDisplayWinterHuntRegionView__golem:focus .headsUpDisplayWinterHuntRegionView__golemChatMessage,.headsUpDisplayWinterHuntRegionView__golem:active .headsUpDisplayWinterHuntRegionView__golemChatMessage{opacity:1}.winterHuntGolemView__golem{z-index:11;overflow:visible;pointer-events:none;filter:drop-shadow(0 0 4px #18536d);transform:translateY(-8px)}.winterHuntGolemView__head,.winterHuntGolemView__arms,.winterHuntGolemView__legs,.winterHuntGolemView__torso,.winterHuntGolemView__scarf{transform:scale(1.6)}.greatWinterHuntClaimRewardDialogView__golem .winterHuntGolemView__head,.greatWinterHuntClaimRewardDialogView__golem .winterHuntGolemView__arms,.greatWinterHuntClaimRewardDialogView__golem .winterHuntGolemView__legs,.greatWinterHuntClaimRewardDialogView__golem .winterHuntGolemView__torso,.greatWinterHuntClaimRewardDialogView__golem .winterHuntGolemView__scarf{transform:scale(1.3) translate(10px)}.winterHuntGolemView.winterHuntGolemView--idleAnimation .winterHuntGolemView__head,.winterHuntGolemView.winterHuntGolemView--idleAnimation:hover .winterHuntGolemView__head,.winterHuntGolemView.winterHuntGolemView--idleAnimation:focus .winterHuntGolemView__head,.winterHuntGolemView.winterHuntGolemView--idleAnimation:active .winterHuntGolemView__head{transform-origin:48% 51%}.winterHuntGolemView__background{box-shadow:0 0 25px 25px #e0f7fd inset}@keyframes golemLegWiggle{0%{transform:scale(1.6) rotate(2deg)}50%{transform:scale(1.6) rotate(-2deg)}to{transform:scale(1.6) rotate(2deg)}}@keyframes golemArmWiggle{0%{transform:scale(1.6) rotate(8deg)}50%{transform:scale(1.6) rotate(-8deg)}to{transform:scale(1.6) rotate(8deg)}}@keyframes golemHeadWiggle{0%{transform:scale(1.6) translateY(-3px)}50%{transform:scale(1.6) translateY(3px)}to{transform:scale(1.6) translateY(-3px)}}@keyframes golemHeadWiggleExcited{0%{transform:scale(1.6) translateY(-5px)}50%{transform:scale(1.6) translateY(1px)}to{transform:scale(1.6) translateY(-5px)}}@keyframes golemJump{0%{transform:scaleY(.28)}20%{transform:scaleY(.96)}50%{transform:scaleY(1.6) translateY(-8.5%)}60%{transform:scaleY(1.6) translateY(-8%)}95%{transform:scaleY(1.52) translateY(1%)}to{transform:scaleY(1.6) translateY(0)}}.greatWinterHuntGolemManagerDialogView__activeGolem{overflow:visible}.activeJsDialog .headsUpDisplayWinterHuntRegionView__golemChatMessage{display:none}.greatWinterHuntGolemManagerDialogView__golemPanel{background-color:#32748c}.greatWinterHuntGolemManagerDialogView__golemPreview .winterHuntGolemView__background{border-bottom:1px solid #3887a3;box-shadow:0 0 40px 76px #99cadc inset,0 11px 10px -6px #52b1d3}.greatWinterHuntGolemManagerDialogView__golem .winterHuntGolemView{width:60px}.greatWinterHuntGolemManagerDialogView__golem{width:33%;margin:0}.greatWinterHuntGolemManagerDialogView__golemUpgradeButton{position:absolute;bottom:-25px;left:5px;display:flex;flex-direction:row;width:90%;font-size:13px;background-position-x:45px;transform-origin:0 -40px}.greatWinterHuntGolemManagerDialogView__golem:hover,.greatWinterHuntGolemManagerDialogView__golem:focus,.greatWinterHuntGolemManagerDialogView__golem:active{transform:none}.greatWinterHuntGolemManagerDialogView__golem:hover button.greatWinterHuntGolemManagerDialogView__golemSelectButton,.greatWinterHuntGolemManagerDialogView__golem:focus button.greatWinterHuntGolemManagerDialogView__golemSelectButton,.greatWinterHuntGolemManagerDialogView__golem:active button.greatWinterHuntGolemManagerDialogView__golemSelectButton{transform:scale(1.1)}.greatWinterHuntGolemManagerDialogView__golem .greatWinterHuntGolemManagerDialogView__golemSelectButton{filter:brightness(.9)!important}.greatWinterHuntGolemManagerUpgradeTabView__itemQuantity{margin-top:35px;font-size:14px;background:#d7f4fe;border:1px solid #000;box-shadow:none}.greatWinterHuntGolemManagerUpgradeTabView__item--box{background-color:#96e3fd;border-width:1px}.greatWinterHuntDialogView__bigButtonInlineCostQuantity{margin-top:12px;font-size:19px;box-shadow:0 0 20px 4px #074762 inset}.greatWinterHuntDialogView__bigButtonInlineCost{margin-right:20px}.greatWinterHuntDialogView__button{filter:saturate(.6)}.greatWinterHuntGolemManagerReturnTabView__progressContainer b{display:block;font-size:15px}.greatWinterHuntGolemManagerReturnTabView__progressContainer b:after,.greatWinterHuntGolemManagerReturnTabView__progressContainer b:before{content:" \\1f389\\fe0f "}.greatWinterHuntGolemManagerReturnTabView__instantReturnBellCost{padding:0 3px 1px;margin:0 -3px -1px -5px;font-size:23px;background:linear-gradient(23deg,#e78700,#d16e07);border-radius:3px;box-shadow:-1px -3px 5px -3px #f9a148}.greatWinterHuntGolemManagerReturnTabView__instantReturnButton--disabled .greatWinterHuntGolemManagerReturnTabView__instantReturnBellCost{background:linear-gradient(23deg,#8d8d8d,#7e7e7e);box-shadow:none}.greatWinterHuntRecycleDialogView__itemQuantity.quantity{top:185px;right:unset;left:unset;min-width:40px;font-size:18px;background-color:#ffffffbf}.greatWinterHuntRecycleDialogView__item{align-items:center}.greatWinterHuntRecycleDialogView__action{border-radius:4px}.greatWinterHuntRecycleDialogView__craftCost:before{font-size:24px;content:"\\2212"}.greatWinterHuntRecycleDialogView__smashYield:before{font-size:24px;content:"+"}.greatWinterHuntRecycleDialogView__golemRequirement{margin-bottom:3px;font-size:13px}.greatWinterHuntRecycleDialogView__action:after{position:absolute;top:60px;left:-10px;width:20px;height:10px;content:""}.greatWinterHuntRecycleDialogView__golemRequirementContainer{margin-left:-10px}.greatWinterHuntRecycleDialogView__golemRequirementTitle{padding-bottom:4px;color:#1863bf}.greatWinterHuntRecycleDialogView__item:nth-child(1) .greatWinterHuntRecycleDialogView__itemQuantity.quantity{top:175px}.possibleGolems .greatWinterHuntDialogView__footerItemQuantity.quantity{background-color:#51516e;box-shadow:inset 0 0 1px 1px #6ea0d1}.greatWinterHuntDialogView__footerItemSeperator{width:50px}.headsUpDisplayWinterHuntIceFortressView__shieldLabel.headsUpDisplayWinterHuntIceFortressView__shieldLabel--active{top:6px;font-size:11px;background-color:#273852;border-radius:13px}.headsUpDisplayWinterHuntRegionView__hailstones .headsUpDisplayWinterHuntRegionView__resourceCost{top:39px;font-size:14px;background-color:#8de3e4}.greatWinterHuntRecycleDialogView__itemQuantity.quantity[data-item-type=golem_part_limb_stat_item]{display:flex;gap:4px;align-items:center;justify-content:space-evenly}.headsUpDisplayWinterHuntGolemWorkshopView__droidButton .headsUpDisplayWinterHuntGolemWorkshopView__droidHuntsRemaining{top:172px;left:54px;width:20px;font-size:14px;background:linear-gradient(54deg,#c87d0e,#9f510c);border-radius:4px}.headsUpDisplayWinterHuntGolemWorkshopView__droidButton:nth-child(2) .headsUpDisplayWinterHuntGolemWorkshopView__droidHuntsRemaining{left:55px}.headsUpDisplayWinterHuntGolemWorkshopView__droidButton:nth-child(3) .headsUpDisplayWinterHuntGolemWorkshopView__droidHuntsRemaining{left:56px}.headsUpDisplayWinterHuntGolemWorkshopView__droidButton--inactive .headsUpDisplayWinterHuntGolemWorkshopView__droidHuntsRemaining{background:linear-gradient(90deg,#7d3415,#5a231c)}.headsUpDisplayWinterHuntGolemWorkshopView__droidButton--inactive:hover .headsUpDisplayWinterHuntGolemWorkshopView__droidHuntsRemaining,.headsUpDisplayWinterHuntGolemWorkshopView__droidButton--inactive:focus .headsUpDisplayWinterHuntGolemWorkshopView__droidHuntsRemaining,.headsUpDisplayWinterHuntGolemWorkshopView__droidButton--inactive:active .headsUpDisplayWinterHuntGolemWorkshopView__droidHuntsRemaining{background:linear-gradient(112deg,#91492a,#602726)}.headsUpDisplayWinterHuntGolemWorkshopView__droidButton--active:hover .headsUpDisplayWinterHuntGolemWorkshopView__droidHuntsRemaining,.headsUpDisplayWinterHuntGolemWorkshopView__droidButton--active:focus .headsUpDisplayWinterHuntGolemWorkshopView__droidHuntsRemaining,.headsUpDisplayWinterHuntGolemWorkshopView__droidButton--active:active .headsUpDisplayWinterHuntGolemWorkshopView__droidHuntsRemaining{background:linear-gradient(54deg,#e77f14,#b8590f)}#overlayPopup.greatWinterHuntDialog{margin-top:30px}.greatWinterHuntClaimRewardDialogView__title{padding-left:20px}.greatWinterHuntGolemManagerDialogView__destinationViewContainer--active{z-index:11}button.greatWinterHuntGolemManagerDialogView__randomizeButton{top:15px}.greatWinterHuntGolemManagerDialogView__activeGolemControls.greatWinterHuntGolemManagerDialogView__activeGolemControls--decrement{right:-25px;left:unset;border-radius:10px 0 0 10px}.greatWinterHuntGolemManagerDialogView__partButton{opacity:1}.greatWinterHuntGolemManagerDialogView__activeGolemControls--increment{right:-45px}.greatWinterHuntGolemManagerDialogView__activeGolemControls:hover,.greatWinterHuntGolemManagerDialogView__activeGolemControls:focus,.greatWinterHuntGolemManagerDialogView__activeGolemControls:active,.greatWinterHuntGolemManagerDialogView__activeGolem:hover .greatWinterHuntGolemManagerDialogView__activeGolemControls,.greatWinterHuntGolemManagerDialogView__activeGolem:focus .greatWinterHuntGolemManagerDialogView__activeGolemControls,.greatWinterHuntGolemManagerDialogView__activeGolem:active .greatWinterHuntGolemManagerDialogView__activeGolemControls{z-index:12;opacity:.8}.greatWinterHuntGolemManagerDialogView__activeGolemControls{top:40px;padding:20px 5px 0;background-color:#32748c;opacity:.1}.greatWinterHuntGolemManagerDialogView__activeGolemControls.greatWinterHuntGolemManagerDialogView__activeGolemControls--increment{border-radius:0 10px 10px 0}.greatWinterHuntGolemManagerDialogView__activeGolemContent .winterHuntGolemView--hasScarf .winterHuntGolemView__scarf{top:15px}.headsUpDisplayWinterHuntRegionView__warning{width:170px;padding:10px;font-size:13px;font-weight:900;line-height:20px;color:#2f2a2a;text-align:center;border:none}.headsUpDisplayWinterHuntRegionView__trapWarningContainer .greatWinterHuntDialogView{top:25%;z-index:11}.headsUpDisplayWinterHuntRegionView__trapWarningContainer.headsUpDisplayWinterHuntRegionView__trapWarningContainer--active{filter:drop-shadow(0 0 7px #000)}.headsUpDisplayWinterHuntRegionView__trapWarningContainer.headsUpDisplayWinterHuntRegionView__trapWarningContainer--active .greatWinterHuntDialogView__content{display:flex;flex-wrap:wrap;align-items:center;justify-content:center}.greatWinterHuntRewardTrackView--allRewardsClaimed .greatWinterHuntRewardTrackView__claimedLabel{color:transparent;background:transparent}.greatWinterHuntRewardTrackView--allRewardsClaimed .greatWinterHuntRewardTrackView__bar{filter:hue-rotate(347deg);transition:none}.greatWinterHuntRewardTrackView__golem:hover{animation:wallDamageWiggleSmall .3s infinite}.greatWinterHuntRewardTrackView__golem:focus,.greatWinterHuntRewardTrackView__golem:active{animation-name:wallDamageWiggle}.headsUpDisplayWinterHuntGolemWorkshopView__droidButton .mousehuntTooltip{bottom:30%}.greatWinterHuntNewYearsDialogView__shopsButton{transition:none}.greatWinterHuntNewYearsDialogView__itemImage{background-size:contain}#overlayPopup.winter_hunt_profile_tree_possible_gifts .suffix{display:flex;flex-direction:row;align-items:center;justify-content:flex-end}#overlayPopup.winter_hunt_profile_tree_possible_gifts .wrappingGoldCost{order:1;margin-right:10px}#overlayPopup.winter_hunt_profile_tree_possible_gifts .suffix .cancelGift{order:5}#overlayPopup.winter_hunt_profile_tree_possible_gifts .suffix .sendGift{order:10}#overlayPopup.winter_hunt_profile_tree_possible_gifts .giftCostContainer{line-height:2}#overlayPopup.winter_hunt_profile_tree_possible_gifts .recipientContainer img{width:100px;height:100px}#overlayPopup.winter_hunt_profile_tree_possible_gifts .recipientContainer{padding:10px;border:1px solid #ccc;border-radius:5px}#overlayPopup.winter_hunt_profile_tree_possible_gifts .winter_hunt_profile_tree_possible_gifts-search{padding:5px;margin:10px;font-size:12px}#overlayPopup.winter_hunt_profile_tree_possible_gifts .winter_hunt_profile_tree_possible_gifts-clearSearch{top:10px;right:12px}#overlayPopup.winter_hunt_profile_tree_possible_gifts .winter_hunt_profile_tree_possible_gifts-clearSearch:hover,#overlayPopup.winter_hunt_profile_tree_possible_gifts .winter_hunt_profile_tree_possible_gifts-clearSearch:focus,#overlayPopup.winter_hunt_profile_tree_possible_gifts .winter_hunt_profile_tree_possible_gifts-clearSearch:active{color:#e33f3f;text-decoration:none}#overlayPopup.winter_hunt_profile_tree_possible_gifts .giftChannel-title{margin-bottom:10px}#overlayPopup.winter_hunt_profile_tree_possible_gifts .recipient{float:right;padding:10px;margin:-25px 20px 0 10px;border:1px solid #ccc;border-radius:5px}#overlayPopup.winter_hunt_profile_tree_possible_gifts .giftDescription{margin-left:0}.winterHuntProfileInteractionView-gifting{background-position-x:0;background-size:130px}.winterHuntProfileInteractionView .info{width:190px;margin-top:10px}.winterHuntProfileInteractionView-giftCeremony{line-height:1.5}.winterHuntProfileInteractionView a.giftBox:hover,.winterHuntProfileInteractionView a.giftBox:focus,.winterHuntProfileInteractionView a.giftBox:active{filter:brightness(1.1)}.headsUpDisplayWinterHuntRegionView__bait .mousehuntTooltip{width:175px;line-height:1.5}.greatWinterHuntGolemManagerTabView__destinationCount{margin-left:5px}.greatWinterHuntGolemDestinationView__environmentImage{border-radius:0 0 2px 2px;transition:all .2s ease-in-out}.headsUpDisplayWinterHuntRegionView__newYearsButton--active{opacity:.8}.headsUpDisplayWinterHuntRegionView__newYearsButton--active:hover{opacity:1}.headsUpDisplayWinterHuntRegionView{filter:drop-shadow(0 1px 5px #1b202b)}\n';
}
});
// src/modules/location-hud/event-locations/great-winter-hunt/global.css
var global_default2;
var init_global3 = __esm({
"src/modules/location-hud/event-locations/great-winter-hunt/global.css"() {
global_default2 = ".campHudSnowballShowdownView__disabled{top:45px}.advent-calendar-spoilers .adventCalendarView-gift .adventCalendarView-gift-label,.advent-calendar-spoilers .adventCalendarView-gift .adventCalendarView-gift-image{display:none}.mousehuntActionButton.tiny.toggle-advent-calendar-spoilers{position:absolute;left:20px;font-size:12px}.adventCalendarView-subtitle{padding:10px;font-size:12px;line-height:19px;background-color:#d3ddfe}.adventCalendarView-gift.canClaim{filter:brightness(1.75)}.adventCalendarView-gift-rewardContainer{inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;margin:0;background-color:#d3ddfe;border-radius:0}.adventCalendarView-gift-reward-close{padding:2px 4px 5px 6px;font-size:13px;font-weight:900;color:#e03a3a;background-color:#b1bfed;border-top-right-radius:0;border-bottom-left-radius:10px}.adventCalendarView-gift-reward-items{display:flex;align-items:center;justify-content:space-between;margin-bottom:5px}.adventCalendarView-gift-item,.adventCalendarView-gift-item img{width:55px;height:55px}.adventCalendarView-title{background-color:#d3ddfe;border-width:1px}.adventCalendarView-header{background-color:#e2ebee}.campHudSnowballShowdownView__imageContainer{height:35px;margin-top:-5px;background:#dabc9b99;border-radius:13px}.campHudSnowballShowdownView__image{height:35px;background-position:bottom center}.campHudSnowballShowdownView__snowball .campHudSnowballShowdownView__image{background-position:center 5px}.campHudSnowballShowdownView__quantity{padding:1px;font-size:13px;color:#133850;text-align:center;background-color:#a8d3e0;border-radius:5px;box-shadow:inset 0 0 0 1px #2174ab}button.campHudSnowballShowdownView__buyButton{display:none}.campHudSnowballShowdownView__item:hover button.campHudSnowballShowdownView__buyButton,.campHudSnowballShowdownView__item:focus button.campHudSnowballShowdownView__buyButton,.campHudSnowballShowdownView__item:active button.campHudSnowballShowdownView__buyButton{position:absolute;right:-1px;bottom:-2px;display:block;width:17px;height:17px;background-size:cover}.snowballShowdownView-reward-subtitle,.snowballShowdownView-rewardsTitle{display:none}.snowballShowdownView-rewardsContainer{overflow:hidden;border-radius:10px}.snowballShowdownView-reward-image{height:120px}.snowballShowdownView-reward-item{display:flex;flex-flow:column nowrap;align-items:center;justify-content:center}.snowballShowdownView-reward-item-name span{display:inline}.snowballShowdownView-reward-item-name{display:inline-block;height:unset;text-align:center}.snowballShowdownView-reward-item .itemImage{float:none;width:unset;height:unset}.snowballShowdownView-reward-item .itemImage img{width:45px;height:auto}.snowballShowdownView-item-quantity{padding:1px 5px;font-size:12px}.snowballShowdownView-item-name{margin:0 4px;font-size:11px}.snowballShowdownView-item{box-shadow:0 -7px 8px #ccc inset,0 0 0 3px #3e71be}.snowballShowdownView-message{display:inline-block;width:auto;padding:8px;font-size:10px;background:#3e71be;border-radius:4px;box-shadow:0 0 1px #103060 inset}.snowballShowdownView-messageContainer{padding:0;background:none;box-shadow:none}.snowballShowdownView-item:after{filter:drop-shadow(-2px 2px 0 #3e71be) drop-shadow(1px -2px 0 #3e71be)}.snowballShowdownView-board-row-cell.available:hover,.snowballShowdownView-board-row-cell.available:focus{cursor:pointer;box-shadow:inset 0 0 1px 3px #3e71be}.snowballShowdownView-board-row-cell.hit{box-shadow:inset 0 0 0 3px #b8ffe3}.winter_hunt_profile_tree_possible_gifts .gift{width:20%}.campHudSnowballShowdownView__quantityContainer.possibleAmount{display:none;margin-top:7px}.campHudSnowballShowdownView--hasSnowballShowdown:hover .campHudSnowballShowdownView__quantityContainer.possibleAmount,.campHudSnowballShowdownView--hasSnowballShowdown:focus .campHudSnowballShowdownView__quantityContainer.possibleAmount{display:flex}.possibleAmount .campHudSnowballShowdownView__quantity{background-color:#d2e8ef;box-shadow:inset 0 0 0 1px #7ebde7}\n";
}
});
// src/modules/location-hud/event-locations/great-winter-hunt/index.js
var updateGolemFooter, getFraction, updateGolemPartsQuantity, updateGolemTravelCount, updateGolemPopup, golemDance, getQuest, expandAnimatedSnowCount, showPossibleSnowballShowdownDustCount, getGolemCounts, adventCalendarPopup, maybeHideAdventCalendarInMenu, greatWinterHuntGlobal, greatWinterHuntLocation;
var init_great_winter_hunt = __esm({
"src/modules/location-hud/event-locations/great-winter-hunt/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
init_utils4();
init_styles76();
init_global3();
updateGolemFooter = () => {
const footer = document.querySelector(".greatWinterHuntDialogView__inventoryFooter");
if (!footer) {
return;
}
const headsEl = footer.querySelector('.greatWinterHuntDialogView__footerItemQuantity[data-item-type="golem_part_head_stat_item"]');
const torsoEl = footer.querySelector('.greatWinterHuntDialogView__footerItemQuantity[data-item-type="golem_part_torso_stat_item"]');
const limbsEl = footer.querySelector('.greatWinterHuntDialogView__footerItemQuantity[data-item-type="golem_part_limb_stat_item"]');
if (!headsEl && !torsoEl && !limbsEl) {
return;
}
const heads = headsEl ? Number.parseInt(headsEl.textContent, 10) : 0;
const torso = torsoEl ? Number.parseInt(torsoEl.textContent, 10) : 0;
const limbs = limbsEl ? Number.parseInt(limbsEl.textContent, 10) : 0;
const limbSet = Math.floor(limbs / 4);
const possibleGolems = Math.min(heads, torso, limbSet);
const existing = footer.querySelector(".greatWinterHuntDialogView__footerItem.possibleGolems");
if (existing) {
existing.remove();
}
const possibleWrapper = makeElement("div", ["greatWinterHuntDialogView__footerItem", "mousehuntTooltipParent", "possibleGolems"]);
const possibleImage = makeElement("div", ["greatWinterHuntDialogView__footerItemImage"]);
possibleImage.style.backgroundImage = "url(https://i.mouse.rip/mh-improved/golem-thumb.png)";
possibleWrapper.append(possibleImage);
makeElement("div", ["greatWinterHuntDialogView__footerItemQuantity", "quantity"], possibleGolems, possibleWrapper);
const possibleTooltip = makeElement("div", ["mousehuntTooltip", "tight", "top", "noEvents"], `You can make ${possibleGolems} golem${possibleGolems === 1 ? "" : "s"}`);
makeElement("div", ["mousehuntTooltip-arrow"], null, possibleTooltip);
possibleWrapper.append(possibleTooltip);
footer.insertBefore(possibleWrapper, footer.children[3]);
};
getFraction = (num) => {
switch (num) {
case 1:
return "\xBC";
case 2:
return "\xBD";
case 3:
return "\xBE";
default:
return "";
}
};
updateGolemPartsQuantity = () => {
const limbs = document.querySelector('.greatWinterHuntRecycleDialogView__itemQuantity.quantity[data-item-type="golem_part_limb_stat_item"]');
if (!limbs) {
return;
}
const original = limbs.getAttribute("original-quantity");
if (original) {
const footerLimbs = document.querySelector('.greatWinterHuntDialogView__footerItemQuantity.quantity[data-item-type="golem_part_limb_stat_item"]');
limbs.textContent = footerLimbs ? footerLimbs.textContent : original;
}
const limbCount = Number.parseInt(limbs.textContent, 10);
limbs.setAttribute("original-quantity", limbCount);
const limbSet = Math.floor(limbCount / 4);
const limbSetFraction = getFraction(limbCount % 4);
const newLimbsEl = makeElement("span", ["golemLimbsTotal"], limbCount);
const newLimbsSetEl = makeElement("span", ["golemLimbsPossible"], `(${limbSet}${limbSetFraction})`);
limbs.textContent = "";
limbs.append(newLimbsEl, newLimbsSetEl);
};
updateGolemTravelCount = () => __async(void 0, null, function* () {
const title = document.querySelector(".greatWinterHuntGolemManagerTabView__destinationHeader");
if (!title) {
return;
}
const name = title.querySelector(".greatWinterHuntGolemManagerTabView__destinationName");
if (!name) {
return;
}
const allEnvironments = yield getData("environments");
const currentEnvironment = allEnvironments.find((env) => env.name === name.textContent);
if (!currentEnvironment) {
return;
}
const golemCounts = getGolemCounts();
const existing = title.querySelector(".greatWinterHuntGolemManagerTabView__destinationCount");
if (existing) {
existing.textContent = golemCounts[currentEnvironment.id] || 0;
return;
}
const countEl = makeElement("span", ["greatWinterHuntGolemManagerTabView__destinationCount"], `(${golemCounts[currentEnvironment.id] || 0})`);
name.append(countEl);
});
updateGolemPopup = () => {
setTimeout(() => {
const golems = document.querySelectorAll(".greatWinterHuntGolemManagerDialogView__golem");
if (golems) {
golems.forEach((golem) => {
golem.addEventListener("click", () => {
eventRegistry.doEvent("golemSwitchInDialog");
});
});
}
updateGolemTravelCount();
updateGolemFooter();
updateGolemPartsQuantity();
}, 250);
};
golemDance = () => {
const trigger = document.querySelector(".greatWinterHuntRewardTrackView__progress");
if (!trigger) {
return;
}
trigger.addEventListener("click", () => {
const golems = document.querySelectorAll(".headsUpDisplayWinterHuntRegionView__golem .winterHuntGolemView");
if (!golems) {
return;
}
count = 0;
golems.forEach((golem) => {
setTimeout(() => {
golem.classList.add("winterHuntGolemView--idleAnimation");
}, 100 * count);
count++;
});
});
};
getQuest = () => {
if ("winter_hunt_grove" === getCurrentLocation()) {
return user.quests.QuestCinnamonTreeGrove;
} else if ("winter_hunt_workshop" === getCurrentLocation()) {
return user.quests.QuestGolemWorkshop;
} else if ("winter_hunt_fortress" === getCurrentLocation()) {
return user.quests.QuestIceFortress;
}
return {};
};
expandAnimatedSnowCount = () => {
var _a, _b;
const limbEl = document.querySelector('.headsUpDisplayWinterHuntRegionView__golemPartQuantity.quantity[data-item-type="animate_snow_stat_item"]');
if (!limbEl) {
return;
}
limbEl.textContent = ((_b = (_a = getQuest()) == null ? void 0 : _a.items) == null ? void 0 : _b.animate_snow_stat_item.quantity_formatted) || 0;
};
showPossibleSnowballShowdownDustCount = () => {
const showdownItems = document.querySelector(".campHudSnowballShowdownView__itemsContainer");
if (!showdownItems) {
return;
}
const snowballEl = showdownItems.querySelector(".campHudSnowballShowdownView__snowball");
const snowballQtyEl = snowballEl.querySelector(".campHudSnowballShowdownView__quantity");
const showballQty = snowballQtyEl ? Number.parseInt(snowballQtyEl.textContent.replaceAll(",", ""), 10) : 0;
const dustEl = showdownItems.querySelector(".campHudSnowballShowdownView__dust");
const currentDustQtyEl = dustEl.querySelector(".campHudSnowballShowdownView__quantity");
const currentDustQty = currentDustQtyEl ? Number.parseInt(currentDustQtyEl.textContent.replaceAll(",", ""), 10) : 0;
const possibleDustQty = Math.floor(showballQty / 175);
const snowballText = showballQty - possibleDustQty * 175;
const dustText = currentDustQty + possibleDustQty;
const possibleSnowballExists = showdownItems.querySelector(".campHudSnowballShowdownView__quantity.possibleSnowball");
if (possibleSnowballExists) {
possibleSnowballExists.textContent = snowballText;
} else {
const possibleSnowballWrapper = makeElement("div", "campHudSnowballShowdownView__quantityContainer possibleAmount");
makeElement("div", ["campHudSnowballShowdownView__quantity", "possibleSnowball"], snowballText, possibleSnowballWrapper);
snowballEl.append(possibleSnowballWrapper);
}
const possibleDustExists = showdownItems.querySelector(".campHudSnowballShowdownView__quantity.possibleDust");
if (possibleDustExists) {
possibleDustExists.textContent = dustText;
} else {
const dustWrapper = makeElement("div", "campHudSnowballShowdownView__quantityContainer possibleAmount");
makeElement("div", ["campHudSnowballShowdownView__quantity", "possibleDust"], dustText, dustWrapper);
dustEl.append(dustWrapper);
}
};
getGolemCounts = () => {
var _a;
const golemCounts = {};
const destinations = ((_a = getQuest()) == null ? void 0 : _a.destinations) || {};
for (const region in destinations) {
destinations[region].environments.forEach((env) => {
golemCounts[env.type] = env.num_golem_visits;
});
}
return golemCounts;
};
adventCalendarPopup = () => {
const suffix = document.querySelector("#overlayPopup .suffix");
if (!suffix) {
return;
}
const existingToggle = document.querySelector(".toggle-advent-calendar-spoilers");
if (existingToggle) {
return;
}
const toggleBtn = makeElement("button", ["mousehuntActionButton", "tiny", "toggle-advent-calendar-spoilers"]);
makeElement("span", "", "View unblurred calendar", toggleBtn);
toggleBtn.setAttribute("data-enabled", "false");
toggleBtn.addEventListener("click", () => {
const popup = document.querySelector("#overlayPopup");
if (!popup) {
return;
}
popup.classList.toggle("advent-calendar-spoilers");
const enabled = toggleBtn.getAttribute("data-enabled");
if ("true" === enabled) {
toggleBtn.setAttribute("data-enabled", "false");
toggleBtn.querySelector("span").innerText = "View unblurred calendar";
} else {
toggleBtn.setAttribute("data-enabled", "true");
toggleBtn.querySelector("span").innerText = "Hide unblurred calendar";
}
});
suffix.append(toggleBtn);
};
maybeHideAdventCalendarInMenu = () => {
const now = /* @__PURE__ */ new Date();
if (now.getMonth() !== 11) {
}
return "";
};
greatWinterHuntGlobal = () => {
addStyles([global_default2, maybeHideAdventCalendarInMenu]);
onDialogShow(adventCalendarPopup, "adventCalendarPopup");
};
greatWinterHuntLocation = () => {
addHudStyles(styles_default75);
onDialogShow(updateGolemPopup, "greatWinterHuntDialog");
golemDance();
expandAnimatedSnowCount();
showPossibleSnowballShowdownDustCount();
onRequest(() => {
updateGolemPartsQuantity();
setTimeout(updateGolemFooter, 250);
}, "managers/ajax/purchases/itempurchase.php");
onRequest(() => {
expandAnimatedSnowCount();
showPossibleSnowballShowdownDustCount();
});
onEvent("golemSwitchInDialog", () => {
updateGolemTravelCount();
});
setTimeout(expandAnimatedSnowCount, 1e3);
};
}
});
// src/modules/location-hud/event-locations/halloween/styles.css
var styles_default76;
var init_styles77 = __esm({
"src/modules/location-hud/event-locations/halloween/styles.css"() {
styles_default76 = ".halloweenBoilingCauldronHUD-bait-quantity{top:29px;left:40px;font-size:13px;text-shadow:1px 1px 1px #282828}.halloweenBoilingCauldronHUD-bait-ingredientQuantity{top:45px;width:38px;font-size:12px}body .halloweenBoilingCauldronHUD-bait.basic_baits .halloweenBoilingCauldronHUD-bait-quantity{top:29px;left:42px;width:58px;padding-right:8px;background:linear-gradient(0deg,#2b3320,#4b5837,#2b3320);border:1px solid #6f8d70;border-radius:6px}body .halloweenBoilingCauldronHUD-bait.basic_baits.active .halloweenBoilingCauldronHUD-bait-quantity{background:linear-gradient(0deg,#03461a,#03792d,#03461a);border-color:#03d14c}a.halloweenBoilingCauldronHUD-cauldron-boundingBox{font-size:14px}.halloweenBoilingCauldronHUD-cauldron-imageContainer .halloweenBoilingCauldronHUD-cauldron-queue-brewTime{width:auto;padding-right:4px;font-size:19px;color:#f9e8b1;text-align:center;text-shadow:1px 1px 1px #515b3a;background-image:none}.halloweenBoilingCauldronHUD-cauldron-tooltip{top:0;height:50px;font-size:13px;line-height:1.3;background-color:#292827;transition:.3s ease-in-out}.halloweenBoilingCauldronHUD-cauldron-tooltip i{font-size:15px;color:#f8e7b0}.halloweenBoilingCauldronHUD-cauldron-tooltip b{font-weight:400;color:#ccc}.halloweenBoilingCauldronHUD-bait-cauldronButton{box-shadow:none}.halloweenBoilingCauldronHUD-cauldron.active:hover .halloweenBoilingCauldronHUD-cauldron-instantFinishButton{opacity:1}.halloweenBoilingCauldronHUD-cauldron-instantFinishButton{display:block;opacity:0;transition:opacity .2s ease-in-out}.halloweenBoilingCauldronHUD-shutdownButton{left:271px;width:198px}.itemPurchaseView-container.apothecary .itemPurchaseView-content-name{display:block;padding-top:3px}.itemPurchaseView-container.apothecary .itemPurchaseView-image-container{background-color:transparent}.itemPurchaseView-container.apothecary .itemPurchaseView-action-purchaseHelper-owned{padding-left:0;margin:0;text-shadow:none;background-color:transparent;border:none}.itemPurchaseView-container.apothecary .itemPurchaseView-content-description{height:80px}.itemPurchaseView-container.apothecary.no_gold_cost .itemPurchaseView-action-goldGost{display:none}.itemPurchaseView-container.apothecary .itemPurchaseView-action-itemCost-table{width:100%;margin-right:0;margin-left:0;background-color:#e8f2e5}.itemPurchaseView-container.apothecary .itemPurchaseView-action-itemCost-table-row{display:flex;align-items:center;justify-content:flex-start;width:auto;height:50px;padding:0;margin:0}.itemPurchaseView-container.apothecary .itemPurchaseView-action-quantity{margin-top:-1px}.itemPurchaseView-container.apothecary .itemPurchaseView-action-quantity input{width:90px}.itemPurchaseView-container.apothecary .itemPurchaseView-action-container{height:130px}.itemPurchaseView-container.apothecary .itemPurchaseView-action-itemCost-table-cell a{padding:20px 6px 20px 29px;font-size:13px;background-position:-10px 50%;background-size:42px}.itemPurchaseView-container.apothecary .itemPurchaseView-action-itemCost-table .itemPurchaseView-action-itemCost-table-cell.cost{width:20%;font-size:17px;font-weight:400;text-shadow:1px 1px 1px #788c59}.itemPurchaseView-container.apothecary .itemPurchaseView-content-container{background-color:transparent}.halloweenBoilingCauldronHUD-dialog-boonImage{display:flex;align-items:center}.halloweenBoilingCauldronHUD-dialog-reward.complete:after{top:45px;filter:drop-shadow(0 5px 6px #000);transform:rotate(348deg)}a.halloweenBoilingCauldronHUD-dialog-closeButton{top:0;right:-6px;width:46px;height:38px;background-size:100%}#overlayPopup.halloweenBoilingCauldronRecipePopup #jsDialogClose{top:146px;right:22px;z-index:1;width:46px;height:37px;color:transparent;background-size:cover}#overlayPopup.halloweenBoilingCauldronRecipePopup #jsDialogClose:hover{background-size:cover}.halloweenBoilingCauldronRecipeView-recipe-ingredientContainer table{border:none}.halloweenBoilingCauldronRecipeView-recipe-ingredientContainer{padding:0;border-radius:5px}.halloweenBoilingCauldronRecipeView-recipe-ingredient-header{display:none}.halloweenBoilingCauldronRecipeView-recipe-ingredientContainer td:first-child{padding-left:10px}.halloweenBoilingCauldronRecipeView-recipe-ingredientContainer td:last-child{padding-right:10px}.halloweenBoilingCauldronRecipeView-recipe-ingredientContainer td{font-size:12px}.halloweenBoilingCauldronRecipeView-recipe-description{line-height:1.3;color:#4c4d37}.halloweenBoilingCauldronRecipeView-recipe-mouse{font-size:11px}.halloweenBoilingCauldronRecipeView-recipe-mice-list.num_5 .halloweenBoilingCauldronRecipeView-recipe-mouse{width:33%}.halloweenBoilingCauldronHUD-cauldron-queue-brewTime{padding-top:4px;margin-left:3px;font-size:13px;text-shadow:0 1px 1px #efd28e;background-color:#efd28e;background-position-y:bottom;border-radius:10px}.halloweenBoilingCauldronRecipeView-cauldron-queueSlot.cauldron .halloweenBoilingCauldronHUD-cauldron-queue-brewTime{padding-top:2px;font-size:13px;font-weight:900}a.halloweenBoilingCauldronRecipeView-cauldron-queueSlot-cancelButton{top:-17px;right:7px;left:unset}.halloweenBoilingCauldronRecipeView-content{font-size:12px}.hudLocationContent .halloweenBoilingCauldronHUD-cauldron-imageContainer .halloweenBoilingCauldronHUD-cauldron-queue-brewTime{padding:0;background-color:transparent}.campHudSpookyShuffleView__quantity{font-size:12px}.halloweenBoilingCauldronHUD-cauldron-imageContainer,.fuelActive .halloweenBoilingCauldronHUD-reward-progress-bar{transition:all .2s ease-in-out}.fuelActive .halloweenBoilingCauldronHUD-cauldron-imageContainer{background-image:url(https://i.mouse.rip/mh-improved/cauldrons.png);filter:drop-shadow(2px 4px 6px #ff8b1c)}.fuelActive a.halloweenBoilingCauldronHUD-moreInfoButton{filter:hue-rotate(256deg)}.halloweenBoilingCauldronHUD.fuelReveal .halloweenBoilingCauldronHUD-candle{animation-delay:.5s}.halloweenBoilingCauldronHUD-yield-huntsRemaining{right:30px;left:30px;height:6px;border-width:1px;border-radius:0}.halloweenBoilingCauldronHUD-yield-huntsRemaining-progress-bar{height:5px;background-color:#03cd4a;box-shadow:inset 0 0 2px #037e2d}.halloweenBoilingCauldronHUD-dialog-state.item .halloweenBoilingCauldronHUD-dialog-title{margin-right:20px}\n";
}
});
// src/modules/location-hud/event-locations/halloween/index.js
var undisableCheese, halloweenGlobal, halloweenLocation;
var init_halloween2 = __esm({
"src/modules/location-hud/event-locations/halloween/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
init_styles77();
undisableCheese = () => {
const armButtons = document.querySelectorAll(".halloweenBoilingCauldronHUD-bait");
armButtons.forEach((armButton) => {
armButton.classList.remove("disabled");
const link = armButton.querySelector("a.disabled");
if (link) {
link.classList.remove("disabled");
}
const tooltipLink = armButton.querySelector(".halloweenBoilingCauldronHUD-bait-tooltipContent a.disabled");
if (tooltipLink) {
tooltipLink.classList.remove("disabled");
}
});
};
halloweenGlobal = () => __async(void 0, null, function* () {
});
halloweenLocation = () => __async(void 0, null, function* () {
addHudStyles(styles_default76);
undisableCheese();
onRequest(undisableCheese);
});
}
});
// src/modules/location-hud/event-locations/lunar-new-year/styles.css
var styles_default77;
var init_styles78 = __esm({
"src/modules/location-hud/event-locations/lunar-new-year/styles.css"() {
styles_default77 = "";
}
});
// src/modules/location-hud/event-locations/lunar-new-year/index.js
var lunarNewYearGlobal;
var init_lunar_new_year = __esm({
"src/modules/location-hud/event-locations/lunar-new-year/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
init_styles78();
lunarNewYearGlobal = () => __async(void 0, null, function* () {
addStyles(styles_default77);
});
}
});
// src/modules/location-hud/event-locations/spring-egg-hunt/styles.css
var styles_default78;
var init_styles79 = __esm({
"src/modules/location-hud/event-locations/spring-egg-hunt/styles.css"() {
styles_default78 = "";
}
});
// src/modules/location-hud/event-locations/spring-egg-hunt/index.js
var springEggHuntGlobal;
var init_spring_egg_hunt = __esm({
"src/modules/location-hud/event-locations/spring-egg-hunt/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
init_styles79();
springEggHuntGlobal = () => __async(void 0, null, function* () {
addStyles(styles_default78);
});
}
});
// src/modules/location-hud/event-locations/index.js
var event_locations_default;
var init_event_locations = __esm({
"src/modules/location-hud/event-locations/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
init_birthday();
init_great_winter_hunt();
init_halloween2();
init_lunar_new_year();
init_spring_egg_hunt();
event_locations_default = (location) => __async(void 0, null, function* () {
switch (location) {
case "halloween_event_location":
halloweenLocation();
break;
case "winter_hunt_grove":
case "winter_hunt_workshop":
case "winter_hunt_fortress":
greatWinterHuntLocation();
break;
case "super_brie_factory":
birthdayLocation();
break;
default:
break;
}
const events = {
0: [greatWinterHuntGlobal, lunarNewYearGlobal],
// January.
1: [birthdayGlobal],
// February.
2: [birthdayGlobal, springEggHuntGlobal],
// March.
3: [springEggHuntGlobal],
// April.
4: [],
// May.
5: [],
// June.
6: [],
// July.
7: [],
// August.
8: [],
// September.
9: [halloweenGlobal],
// October.
10: [halloweenGlobal, greatWinterHuntGlobal],
// November.
11: [greatWinterHuntGlobal]
// December.
};
const date = /* @__PURE__ */ new Date();
const month = date.getMonth();
debuglog("event-locations", `Loading ${events[month].length} global events for month ${month}.`);
events[month].forEach((event) => {
event();
});
});
}
});
// src/modules/location-hud/index.js
var regionMapping, normalizeCurrentLocation, main23, init45, location_hud_default;
var init_location_hud = __esm({
"src/modules/location-hud/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
init_settings16();
init_styles41();
init_acolyte_realm();
init_ancient_city();
init_balacks_cove();
init_bazaar();
init_bountiful_beanstalk();
init_calm_clearing();
init_cape_clawed();
init_catacombs();
init_claw_shot_city();
init_derr_dunes();
init_desert_city();
init_desert_warpath();
init_dojo();
init_dracano();
init_elub_shore();
init_floating_islands2();
init_forbidden_grove();
init_foreword_farm2();
init_fort_rox2();
init_fungal_cavern();
init_great_gnarled_tree();
init_iceberg2();
init_jungle_of_dread();
init_kings_arms();
init_kings_gauntlet();
init_labyrinth3();
init_lagoon();
init_meditation_room();
init_mountain();
init_moussu_picchu2();
init_nerg_plains();
init_pinnacle_chamber();
init_pollution_outbreak();
init_prologue_pond();
init_rift_bristle_woods();
init_rift_burroughs();
init_rift_furoma();
init_rift_gnawnia();
init_rift_valour();
init_rift_whisker_woods();
init_seasonal_garden2();
init_slushy_shoreline();
init_ss_huntington_ii();
init_sunken_city2();
init_table_of_contents2();
init_tournament_hall();
init_town_of_digby();
init_town_of_gnawnia();
init_train_station();
init_windmill();
init_zugzwang_tower2();
init_region_living_garden();
init_region_queso();
init_event_locations();
regionMapping = [
{
region: "region-living-garden",
locations: [
"desert_oasis",
"lost_city",
"sand_dunes"
]
},
{
region: "region-queso",
locations: [
"queso_geyser",
"queso_plains",
"queso_quarry",
"queso_river"
]
},
{
region: "event-locations",
locations: [
"halloween_event_location",
"winter_hunt_workshop",
"winter_hunt_fortress",
"great_winter_taiga"
]
}
];
normalizeCurrentLocation = (location) => {
const region = regionMapping.find((regionMap) => regionMap.locations.includes(location));
if (region) {
return region.region;
}
return location;
};
main23 = () => {
removeHudStyles();
const currentLocation = getCurrentLocation();
const location = normalizeCurrentLocation(currentLocation);
debug(`Location: ${location}`);
if (getSetting("event-locations", true)) {
event_locations_default(currentLocation);
}
if (!getSetting(location, true)) {
return;
}
const locationHandlers = {
acolyte_realm: acolyte_realm_default,
ancient_city: ancient_city_default,
balacks_cove: balacks_cove_default,
bazaar: bazaar_default,
bountiful_beanstalk: bountiful_beanstalk_default,
calm_clearing: calm_clearing_default,
cape_clawed: cape_clawed_default,
catacombs: catacombs_default,
clawshot_city: claw_shot_city_default,
derr_dunes: derr_dunes_default,
desert_city: desert_city_default,
desert_warpath: desert_warpath_default,
dojo: dojo_default,
dracano: dracano_default,
elub_shore: elub_shore_default,
floating_islands: floating_islands_default2,
forbidden_grove: forbidden_grove_default,
foreword_farm: foreword_farm_default2,
fort_rox: fort_rox_default2,
fungal_cavern: fungal_cavern_default,
great_gnarled_tree: great_gnarled_tree_default,
iceberg: iceberg_default2,
jungle_of_dread: jungle_of_dread_default,
kings_arms: kings_arms_default,
kings_gauntlet: kings_gauntlet_default,
labyrinth: labyrinth_default3,
lagoon: lagoon_default,
meditation_room: meditation_room_default,
mountain: mountain_default,
moussu_picchu: moussu_picchu_default2,
nerg_plains: nerg_plains_default,
pinnacle_chamber: pinnacle_chamber_default,
pollution_outbreak: pollution_outbreak_default,
prologue_pond: prologue_pond_default,
rift_bristle_woods: rift_bristle_woods_default,
rift_burroughs: rift_burroughs_default,
rift_furoma: rift_furoma_default,
rift_gnawnia: rift_gnawnia_default,
rift_valour: rift_valour_default,
rift_whisker_woods: rift_whisker_woods_default,
seasonal_garden: seasonal_garden_default,
slushy_shoreline: slushy_shoreline_default,
ss_huntington_ii: ss_huntington_ii_default,
sunken_city: sunken_city_default2,
table_of_contents: table_of_contents_default2,
tournament_hall: tournament_hall_default,
town_of_digby: town_of_digby_default,
town_of_gnawnia: town_of_gnawnia_default,
train_station: train_station_default,
windmill: windmill_default,
zugzwang_tower: zugzwang_tower_default,
"region-living-garden": region_living_garden_default,
"region-queso": region_queso_default
};
if (locationHandlers[location]) {
locationHandlers[location]();
}
};
init45 = () => __async(void 0, null, function* () {
addStyles(styles_default40);
onNavigation(main23);
onEvent("travel_complete", main23);
});
location_hud_default = {
id: "location-huds",
name: "Location HUD Improvements",
type: "location-hud",
default: true,
description: "",
load: init45,
alwaysLoad: true,
settings: settings_default15
};
}
});
// src/modules/adblock/styles.css
var styles_default79;
var init_styles80 = __esm({
"src/modules/adblock/styles.css"() {
styles_default79 = `.actionportfolio,.canShare .larryTip,.canShare,.communityGroupView-ad,.journalactions a.actionportfolio,.journalactions a[data-share-type=journal],.journalactions a[data-type=journal],.mousehuntHeaderView-gameBanner,.mousehuntHeaderView-newsTicker,.pageSidebarView .fb-page,.socialLink,.newsPostFacebookContainer,.travelShortcut.QuestSuperBrieFactory,*[src="https://www.mousehuntgame.com//images/ui/buttons/share_green.gif"],*[src="https://www.mousehuntgame.com/images/promo/fbf_live.jpg"],*[src="https://www.mousehuntgame.com/images/promo/fbf_soon.jpg"],a[onclick="hg.utils.PageUtil.setPage('JoinDiscord'); return false;"],a[href="https://www.facebook.com/groups/103701656374148/"],.pageSidebarView-mobileApps,.pageSidebarView-title,.pageSidebarView-block-description #jsDialog-publishToOwnWall,.travelShortcut.QuestHailstoneGolems{display:none}#OnboardArrow.onboardPopup.canShare .closeButton{left:0}
`;
}
});
// src/modules/adblock/index.js
var init46, adblock_default;
var init_adblock = __esm({
"src/modules/adblock/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
init_styles80();
init46 = () => __async(void 0, null, function* () {
addStyles(styles_default79);
});
adblock_default = {
id: "adblock",
name: "Adblock",
type: "element-hiding",
default: false,
description: "Hides advertisements for Feedback Friday, mobile apps, news ticker, etc.",
load: init46
};
}
});
// src/modules/hide-daily-reward-popup/index.js
var init47, hide_daily_reward_popup_default;
var init_hide_daily_reward_popup = __esm({
"src/modules/hide-daily-reward-popup/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
init47 = () => __async(void 0, null, function* () {
onDialogShow(() => {
setTimeout(() => {
if (activejsDialog) {
activejsDialog.hide();
}
}, 500);
}, "dailyRewardPopup");
if (activejsDialog) {
const attrs = activejsDialog.getAttributes();
if (attrs && attrs.className && attrs.className === "dailyRewardPopup") {
activejsDialog.hide();
}
}
});
hide_daily_reward_popup_default = {
id: "hide-daily-reward-popup",
name: "Hide Daily Reward Popup",
type: "element-hiding",
default: false,
description: "Automatically hide the daily reward popup.",
load: init47
};
}
});
// src/modules/no-footer/styles.css
var styles_default80;
var init_styles81 = __esm({
"src/modules/no-footer/styles.css"() {
styles_default80 = ".pageFrameView-footer,.mousehuntFooter{display:none}.no-footer .pageFrameView-column.left,.no-footer .pageFrameView-column.right{margin-bottom:0}\n";
}
});
// src/modules/no-footer/index.js
var init48, no_footer_default;
var init_no_footer = __esm({
"src/modules/no-footer/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
init_styles81();
init48 = () => __async(void 0, null, function* () {
addStyles(styles_default80);
addBodyClass("no-footer");
});
no_footer_default = {
id: "no-footer",
name: "Hide Footer",
type: "element-hiding",
default: false,
description: "Hides the footer.",
load: init48
};
}
});
// src/modules/no-share/styles.css
var styles_default81;
var init_styles82 = __esm({
"src/modules/no-share/styles.css"() {
styles_default81 = '.actionportfolio,.canShare .larryTip,.journalactions a[data-share-type=journal],.journalactions a[data-type=journal],.pageSidebarView .fb-page,.socialLink,*[src="https://www.mousehuntgame.com//images/ui/buttons/share_green.gif"],#jsDialog-publishToOwnWall,.publishToWall,#OnboardArrow.onboardPopup.canShare .shareButton{display:none}#OnboardArrow.onboardPopup.canShare .closeButton{right:150px;left:unset}\n';
}
});
// src/modules/no-share/index.js
var init49, no_share_default;
var init_no_share = __esm({
"src/modules/no-share/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
init_styles82();
init49 = () => __async(void 0, null, function* () {
addStyles(styles_default81);
});
no_share_default = {
id: "no-share",
name: "Hide Share Buttons",
type: "element-hiding",
default: false,
description: "Hides the share buttons.",
load: init49
};
}
});
// src/modules/no-sidebar/styles.css
var styles_default82;
var init_styles83 = __esm({
"src/modules/no-sidebar/styles.css"() {
styles_default82 = ".pageFrameView{-ms-grid-columns:[first] auto [content-start] 760px [content-end] auto [last];grid-template-columns:[first] auto [content-start] 760px [content-end] auto [last]}.pageFrameView .pageSidebarView-user{padding:0 0 10px;border-bottom:none}.pageSidebarView{display:none}.mousehuntHeaderView .menuItem.sidebar.dropdown{cursor:unset}.mousehuntHeaderView .menuItem.sidebar .dropdownContent{width:365px;padding:10px}.mousehuntHeaderView .menuItem.sidebar .dropdownContent a{display:unset;height:auto;padding:0;font-variant:none;border-bottom:none}.mousehuntHeaderView .menuItem.sidebar .dropdownContent a:hover,.mousehuntHeaderView .menuItem.sidebar .dropdownContent a:focus{text-decoration:underline;background-color:unset}.mousehuntHeaderView .menuItem.sidebar .dropdownContent a.pageSidebarView-user-image{width:30px;height:30px;padding:0;background-repeat:no-repeat;background-position:50% 50%;background-size:contain;border:1px solid #808080}.mousehuntHeaderView .menuItem.sidebar .dropdownContent .pageSidebarView-user a:nth-child(2){display:inline;padding:0;font-size:inherit;font-variant:none;color:#3b5998;border-bottom:none}.mousehuntHeaderView .menuItem.sidebar .dropdownContent .pageSidebarView-user br{display:none}.mousehuntHeaderView .menuItem.sidebar .dropdownContent a.pageSidebarView-user-logout{display:inline-block;float:right;height:auto;padding:5px 0;margin-right:10px;font-size:inherit;font-variant:none;color:#3b5998;border-bottom:none;border-radius:0}.scoreboardRankingsWrapper{display:grid;grid-template-columns:1fr 1fr;grid-gap:5px;line-height:14px}.scoreboardRelativeRankingTableView-table{padding-top:5px;background:#fff}.mousehuntHeaderView .menuItem.sidebar .dropdownContent .scoreboardRankingsWrapper a{font-size:9px;color:#3b5998;text-decoration:none;vertical-align:middle;border-radius:0}.mousehuntHeaderView .menuItem.sidebar .dropdownContent .scoreboardRankingsWrapper a:hover,.mousehuntHeaderView .menuItem.sidebar .dropdownContent .scoreboardRankingsWrapper a:focus,.mousehuntHeaderView .menuItem.sidebar .dropdownContent .scoreboardRankingsWrapper a:active{text-decoration:underline}\n";
}
});
// src/modules/no-sidebar/index.js
var moveSidebar, init50, no_sidebar_default;
var init_no_sidebar = __esm({
"src/modules/no-sidebar/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
init_styles83();
moveSidebar = () => {
const menuTab = document.createElement("div");
menuTab.classList.add("menuItem");
menuTab.classList.add("dropdown");
menuTab.classList.add("sidebar");
menuTab.addEventListener("click", () => {
menuTab.classList.toggle("expanded");
});
const menuTabTitle = document.createElement("span");
menuTabTitle.innerText = "Sidebar";
const menuTabArrow = document.createElement("div");
menuTabArrow.classList.add("arrow");
const dropdownContent = document.createElement("div");
dropdownContent.classList.add("dropdownContent");
const sidebarUser = document.querySelector(".pageSidebarView-user");
if (sidebarUser) {
dropdownContent.append(sidebarUser);
}
const scoreBoardRankings = document.querySelectorAll(".scoreboardRelativeRankingTableView-table");
if (scoreBoardRankings) {
const scoreBoardRankingWrapper = document.createElement("div");
scoreBoardRankingWrapper.classList.add("scoreboardRankingsWrapper");
scoreBoardRankings.forEach((scoreBoardRanking) => {
scoreBoardRankingWrapper.append(scoreBoardRanking);
});
dropdownContent.append(scoreBoardRankingWrapper);
}
menuTab.append(menuTabTitle);
menuTab.append(menuTabArrow);
menuTab.append(dropdownContent);
const tabsContainer = document.querySelector(".mousehuntHeaderView-dropdownContainer");
if (!tabsContainer) {
return;
}
tabsContainer.insertBefore(menuTab, tabsContainer.lastChild);
};
init50 = () => __async(void 0, null, function* () {
addStyles(styles_default82);
addBodyClass("no-sidebar");
moveSidebar();
});
no_sidebar_default = {
id: "no-sidebar",
name: "Hide Sidebar",
type: "element-hiding",
default: false,
description: "Hides the sidebar and adds a 'Sidebar' dropdown in the top menu.",
load: init50
};
}
});
// src/modules/journal-privacy/styles.css
var styles_default83;
var init_styles84 = __esm({
"src/modules/journal-privacy/styles.css"() {
styles_default83 = '#journalContainer .entry:not(.badge) a[href*="profile.php"],#journalContainer .entry.socialGift .journaltext a,#journalContainer .relicHunter_complete>.journalbody>.journaltext>b:nth-child(6),#journalContainer .wanted_poster-complete>.journalbody>.journaltext>b:nth-child(8),#journalContainer .journal__hunter-name,.mh-journal-privacy-name{display:inline-block;color:transparent}#journalContainer .entry:not(.badge) #friend-data-wrapper a[href*="profile.php"]{color:#000}#journalContainer .entry:not(.badge) a[href*="profile.php"]:hover,#journalContainer .entry:not(.badge) a[href*="profile.php"]:focus,#journalContainer .entry.socialGift .journaltext a:hover,#journalContainer .entry.socialGift .journaltext a:focus,#journalContainer .relicHunter_complete>.journalbody>.journaltext>b:nth-child(6):hover,#journalContainer .relicHunter_complete>.journalbody>.journaltext>b:nth-child(6):focus,#journalContainer .wanted_poster-complete>.journalbody>.journaltext>b:nth-child(8):hover,#journalContainer .wanted_poster-complete>.journalbody>.journaltext>b:nth-child(8):focus #journalContainer .journal__hunter-name:hover,#journalContainer .journal__hunter-name:focus,.mh-journal-privacy-name:hover,.mh-journal-privacy-name:focus{display:inline;color:#3b5998}\n';
}
});
// src/modules/journal-privacy/index.js
var applyClassToNames, init51, journal_privacy_default;
var init_journal_privacy = __esm({
"src/modules/journal-privacy/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
init_styles84();
applyClassToNames = () => {
const entries = document.querySelectorAll("#journalContainer .entry.relicHunter_start .journaltext");
if (!entries) {
return;
}
entries.forEach((entry) => {
if (!entry || !entry.textContent) {
return;
}
const match = entry.textContent.match(/(.*)( has joined the | has left the | used Rare Map Dust |, the map owner, has )/);
if (match && match[1]) {
const span = document.createElement("span");
span.classList.add("mh-journal-privacy-name");
span.textContent = match[1];
entry.innerHTML = entry.innerHTML.replace(match[1], span.outerHTML);
}
});
};
init51 = () => __async(void 0, null, function* () {
addStyles(styles_default83);
onRequest(() => {
applyClassToNames();
}, "managers/ajax/pages/journal.php");
});
journal_privacy_default = {
id: "journal-privacy",
name: "Journal Privacy",
type: "element-hiding",
default: false,
description: "Hides player names in the journal. Good for screenshots that won't dox them.",
load: init51
};
}
});
// src/modules/dev/index.js
var isDebugging, debug2, init52, dev_default;
var init_dev = __esm({
"src/modules/dev/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
isDebugging = (flag) => {
if (getFlag("debug-all")) {
return true;
}
return getFlag(flag);
};
debug2 = (message, ...args) => {
const textMessages = [];
const objectMessages = [];
for (const arg of args) {
if (typeof arg === "string") {
textMessages.push(arg);
} else {
objectMessages.push(arg);
}
}
console.log(
`%cMH Improved:%c ${message}`,
"color: #ff3434; font-weight: 900; font-size: 1.1em",
"color: inherit; font-weight: inherit; font-size: inherit",
...textMessages,
...objectMessages
);
};
init52 = () => {
window.app = window.app || {};
window.app.mhutils = utils_exports;
if (isDebugging("debug-dialog")) {
let currentDialog = null;
onDialogHide(() => {
debug2(`Dialog hidden: ${currentDialog}`);
});
onDialogShow(() => {
currentDialog = getCurrentDialog();
debug2(`Dialog shown: ${currentDialog}`);
});
}
if (isDebugging("debug-navigation")) {
onNavigation(() => {
debug2("onNavigation", {
page: getCurrentPage(),
tab: getCurrentTab(),
subtab: getCurrentSubtab()
});
});
onTravel(null, () => {
debug2("onTravel", getCurrentLocation());
});
}
if (isDebugging("debug-request")) {
onRequest((response) => {
debug2("onRequest", response);
});
}
if (isDebugging("debug-events")) {
const events = [
"ajax_response",
"app_init",
"camp_page_arm_item",
"camp_page_toggle_blueprint",
"camp_page_update_item_array",
"camp_quest_hud_view_initialize",
"checkout_cart_update",
"info_arrow_hide",
"info_arrow_show",
"js_dialog_hide",
"js_dialog_show",
"set_inset_tab",
"set_page",
"set_tab",
"spring_hunt_claim_hidden_egg",
"tournament_status_change",
"travel_complete",
"treasure_map_update_favourite_friends",
"treasure_map_update_sent_requests",
"treasure_map_update",
"user_interaction_update",
"user_inventory_update",
"user_inventory_use_convertible",
"user_recipe_update",
"user_relationship",
"user_trap_update"
];
events.forEach((event) => {
onEvent(event, (...data) => {
debug2(`onEvent: ${event}`, data);
});
});
}
};
dev_default = {
id: "dev",
name: "Developer Tools",
type: "required",
load: init52
};
}
});
// src/modules/beta-features/modules/raffle.css
var raffle_default;
var init_raffle = __esm({
"src/modules/beta-features/modules/raffle.css"() {
raffle_default = ".mh-return-raffles.message{position:sticky;top:0;right:0;left:0;z-index:10}.notificationMessageList .tab{scroll-behavior:smooth}.mh-return-raffles.message .actions{display:flex;gap:10px;align-items:center;justify-content:flex-start;float:none}.notificationMessageList .message.done{background-color:#bffdd2}.notificationMessageList .message.skipped{background-color:#dfdfdf}\n";
}
});
// src/modules/beta-features/modules/raffle.js
var getBallotsToSend, getSavedSentBallots, getSavedSentBallot, saveSentBallot, sendBallot, returnRaffles, replaceInboxMethods, main24, raffle_default2;
var init_raffle2 = __esm({
"src/modules/beta-features/modules/raffle.js"() {
init_sentry_release_injection_stub();
init_utils4();
init_raffle();
getBallotsToSend = () => {
const ballotsToSend = [];
const ballots = document.querySelectorAll(".message.notification.ballot");
if (!ballots.length) {
return ballotsToSend;
}
ballots.forEach((ballot) => {
if (ballot.classList.contains("done") || ballot.classList.contains("skipped")) {
return;
}
const name = ballot.querySelector(".messageText a");
const action = ballot.querySelector(".sendBallot");
if (!action || !name) {
return;
}
ballotsToSend.push({
id: action.getAttribute("data-sender"),
name: name.innerText ? name.innerText.trim() : "",
element: ballot
});
});
return ballotsToSend;
};
getSavedSentBallots = () => {
return sessionGet("sent-ballots", []);
};
getSavedSentBallot = (id) => {
const savedSentBallots = getSavedSentBallots();
return savedSentBallots.includes(id);
};
saveSentBallot = (id) => {
const savedSentBallots = getSavedSentBallots();
savedSentBallots.push(id);
sessionSet("sent-ballots", savedSentBallots);
};
sendBallot = (ballot) => __async(void 0, null, function* () {
debuglog("beta-features-raffle", `Returning ballot for ${ballot.name} (${ballot.id})\u2026`);
const button = document.querySelector(`.sendBallot[data-sender="${ballot.id}"]`);
if (!button) {
debuglog("beta-features-raffle", `Could not find button for ${ballot.name} (${ballot.id})`);
return { status: "error", proceed: false };
}
const buttonParent = button.parentElement.parentElement;
if (buttonParent) {
const id = buttonParent.getAttribute("data-id");
if (id) {
if (getSavedSentBallot(id)) {
debuglog("beta-features-raffle", `Already returned ballot for ${ballot.name} (${ballot.id})`);
return { status: "skipped", proceed: true };
}
saveSentBallot(id);
}
}
const response = yield doRequest("managers/ajax/users/givefriendballot.php", {
snuid: ballot.id
});
if (response.error && !response.error.includes("You have already entered ")) {
debuglog("beta-features-raffle", `Error returning ballot for ${ballot.name}: ${response.error}`);
return { status: "error", proceed: false };
}
debuglog("beta-features-raffle", `Returned ballot for ${ballot.name} (${ballot.id})`);
button.classList.add("disabled");
button.setAttribute("disabled", true);
yield sleep(250);
return { status: "done", proceed: true };
});
returnRaffles = () => __async(void 0, null, function* () {
const drawTab = document.querySelector('.notificationMessageList .tab.active[data-tab="daily_draw"]');
if (!drawTab) {
return;
}
const existing = document.querySelector(".mh-return-raffles.message");
if (existing) {
existing.remove();
}
const messageWrapper = makeElement("div", ["mh-return-raffles", "message"]);
const actionsWrapper = makeElement("div", ["actions"]);
const returnButton = makeElement("input", ["mh-return-raffles-button", "sendBallot"]);
returnButton.setAttribute("type", "button");
returnButton.setAttribute("value", "Return Raffles");
const statusEl = makeElement("div", ["status"]);
let isReturning = false;
returnButton.addEventListener("click", () => __async(void 0, null, function* () {
if (isReturning) {
returnButton.value = "Return Raffles";
statusEl.innerText = "Stopped returning ballots.";
setTimeout(() => {
statusEl.innerText = "";
}, 1e3);
isReturning = false;
return;
}
isReturning = true;
returnButton.value = "Stop Returning";
statusEl.innerText = "Returning ballots\u2026";
const ballotsToSend = getBallotsToSend();
if (!ballotsToSend.length) {
return;
}
debuglog("beta-features-raffle", `Returning ${ballotsToSend.length} ballots\u2026`, ballotsToSend);
const tab = document.querySelector('.notificationMessageList .tab.active[data-tab="daily_draw"]');
if (!tab) {
return;
}
for (const ballot of ballotsToSend) {
if (!isReturning) {
break;
}
ballot.element.scrollIntoView({
behavior: "smooth",
block: "nearest"
});
statusEl.innerText = `Returning ballot for ${ballot.name}\u2026`;
ballot.element.classList.add("hover");
const { status, proceed } = yield sendBallot(ballot, tab);
if ("skipped" === status) {
statusEl.innerText = `Already returned ballot for ${ballot.name}!`;
}
ballot.element.classList.remove("hover");
if (!proceed) {
statusEl.innerText = "Ballots returned!";
break;
}
ballot.element.classList.add(status);
}
if (!isReturning) {
return;
}
isReturning = false;
returnButton.value = "Return Raffles";
statusEl.innerText = "Ballots returned!";
setTimeout(() => {
statusEl.innerText = "";
}, 1e3);
}));
actionsWrapper.append(returnButton);
actionsWrapper.append(statusEl);
messageWrapper.append(actionsWrapper);
drawTab.insertBefore(messageWrapper, drawTab.firstChild);
});
replaceInboxMethods = () => {
const _inboxOpen = messenger.UI.notification.showTab;
messenger.UI.notification.showTab = (tab) => {
const toReturn = _inboxOpen(tab);
if (tab === "daily_draw") {
returnRaffles();
}
return toReturn;
};
const _inboxPopup = messenger.UI.notification.togglePopup;
messenger.UI.notification.togglePopup = (e) => {
const toReturn = _inboxPopup(e);
onEvent("ajax_response", () => {
setTimeout(() => {
const activeTab = document.querySelector(".notificationHeader .tab.active");
if (activeTab && activeTab.getAttribute("data-tab") === "daily_draw") {
returnRaffles();
}
}, 100);
}, true);
return toReturn;
};
};
main24 = () => {
addStyles(raffle_default);
replaceInboxMethods();
};
raffle_default2 = main24;
}
});
// src/modules/beta-features/modules/rank-up-forecaster.js
var exportRankupForecasterData, exportRankupForecasterDataAsCsv, importRankupForecassterData, addRankupForecasterButtons, rank_up_forecaster_default;
var init_rank_up_forecaster = __esm({
"src/modules/beta-features/modules/rank-up-forecaster.js"() {
init_sentry_release_injection_stub();
init_utils4();
exportRankupForecasterData = () => {
const allArea = localStorage.getItem("Chro-forecaster-all-area");
const currentArea = localStorage.getItem("Chro-forecaster-current-area");
const time = localStorage.getItem("Chro-forecaster-time");
const data = {
allArea,
currentArea,
time
};
const dataStr = JSON.stringify(data);
const base64 = btoa(dataStr);
const link = document.createElement("a");
const date = /* @__PURE__ */ new Date();
const dateString = `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()}`;
link.download = `rank-up-forecaster-${dateString}.json`;
link.href = `data:application/json;base64,${base64}`;
link.click();
};
exportRankupForecasterDataAsCsv = () => {
const time = localStorage.getItem("Chro-forecaster-time");
const data = JSON.parse(time);
const csv = [
"Time,Wisdom"
];
data.forEach((row) => {
const date2 = new Date(row[0]);
csv.push(`"${date2.toLocaleString()}",${row[1]}`);
});
const csvStr = csv.join("\n");
const link = document.createElement("a");
const date = /* @__PURE__ */ new Date();
const dateString = `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()}`;
link.download = `rank-up-forecaster-${dateString}.csv`;
link.href = `data:text/csv;charset=utf-8,${csvStr}`;
link.click();
};
importRankupForecassterData = () => {
const input = document.createElement("input");
input.type = "file";
input.accept = ".json";
input.addEventListener("change", (e) => {
const file = e.target.files[0];
if (!file) {
return;
}
const reader = new FileReader();
reader.onload = (re) => {
const contents = re.target.result;
const data = JSON.parse(contents);
localStorage.setItem("Chro-forecaster-all-area", data.allArea);
localStorage.setItem("Chro-forecaster-current-area", data.currentArea);
localStorage.setItem("Chro-forecaster-time", data.time);
};
reader.readAsText(file);
});
input.click();
const points = document.querySelector(".mousehuntHud-userStat-row.points");
if (points) {
points.click();
}
};
addRankupForecasterButtons = () => {
const forecastOpen = document.querySelector(".mousehuntHud-userStat-row.points");
if (!forecastOpen) {
return;
}
forecastOpen.addEventListener("click", () => {
setTimeout(() => {
const rankup = document.querySelector("#forecaster-content-div");
if (!rankup) {
return;
}
const existing = document.querySelector(".mh-ui-forecaster-buttons");
if (existing) {
return;
}
const wrapper = makeElement("div", "mh-ui-forecaster-buttons");
const exportButton = makeElement("button", "mh-ui-export-forecaster-data", "Export Data");
exportButton.addEventListener("click", exportRankupForecasterData);
wrapper.append(exportButton);
const importButton = makeElement("button", "mh-ui-import-forecaster-data", "Import Data");
importButton.addEventListener("click", importRankupForecassterData);
wrapper.append(importButton);
const exportCsvButton = makeElement("button", "mh-ui-export-forecaster-csv", "Export as CSV");
exportCsvButton.addEventListener("click", exportRankupForecasterDataAsCsv);
wrapper.append(exportCsvButton);
rankup.append(wrapper);
}, 250);
});
};
rank_up_forecaster_default = () => __async(void 0, null, function* () {
addStyles(`.mh-ui-forecaster-buttons {
display: flex;
flex-wrap: wrap;
gap: 5px;
justify-content: space-around;
max-width: 180px;
margin-top: 10px;
}`);
addRankupForecasterButtons();
});
}
});
// src/modules/beta-features/modules/social.js
var social_default;
var init_social = __esm({
"src/modules/beta-features/modules/social.js"() {
init_sentry_release_injection_stub();
social_default = () => {
window.twttr = {
widgets: {
load: () => {
},
createShareButton: () => {
}
}
};
class SocialLink {
constructor(url) {
this.url = url;
}
appendTo() {
}
setFacebookLikeUrl() {
}
setFacebookShareUrl() {
}
setImage() {
}
setTitle() {
}
setTwitterUrl() {
}
}
hg.classes.SocialLink = SocialLink;
};
}
});
// src/modules/beta-features/modules/troll-mode/styles.css
var styles_default84;
var init_styles85 = __esm({
"src/modules/beta-features/modules/troll-mode/styles.css"() {
styles_default84 = "*+*{transition:.3s}*+*+*{filter:hue-rotate(90deg);transform:rotate(.5deg)}*+*+*+*{transform:rotate(-.6deg)}*+*>*{transform:rotate(-.1deg)}*+*+*>*{transform:rotate(.2deg)}div+div+div{filter:hue-rotate(90deg)}*>*>*>*>*>*>*>*>*>*>*{transition:.9s}*>*>*>*>*>*>*>*>*>*:hover *{transform:rotateX(20deg)}*>*>*>*>*>*>*>*>*>*>*:hover{transform:rotateX(-20deg)}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.lolspin{animation:spin 1s linear infinite}@media (prefers-reduced-motion: reduce){.lolspin{animation:none}}\n";
}
});
// src/modules/beta-features/modules/troll-mode/index.js
var trollEm, trollem2, troll_mode_default;
var init_troll_mode = __esm({
"src/modules/beta-features/modules/troll-mode/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
init_styles85();
trollEm = () => {
const domQuery = "#journallatestentry";
const lastCatch = document.querySelector(domQuery);
const status = ["attractionfailure", "catchfailure", "catchfailuredamage"];
const isFtcOrFta = lastCatch && status.some((s) => lastCatch.classList.contains(s));
if (isFtcOrFta) {
hg.views.MessengerView.addMessage({
content: {
body: app.views.OnboardingTutorialView.tutorial.wrapInfoArrow(`wow you really are an amazing mousehunter ${user.username}`, "lol")
},
highlight_dom: domQuery,
highlight_padding: {
top: 0,
left: 0,
right: 0,
bottom: 1
},
css_class: "larryCircle",
on_show_callback: () => {
app.views.OnboardingTutorialView.tutorial.showBouncyArrow(domQuery, "top");
},
on_close_callback: () => {
app.views.OnboardingTutorialView.tutorial.hideBouncyArrow();
},
show_overlay: true
});
hg.views.MessengerView.go();
}
};
trollem2 = () => {
const banner = document.querySelector(".campPage-banner");
if (!banner) {
return;
}
const bannerLink = document.createElement("a");
const newbieImg = document.createElement("img");
newbieImg.src = "https://www.mousehuntgame.com/images/promo/campbanners/groups/newbie.png";
bannerLink.append(newbieImg);
bannerLink.addEventListener("click", () => {
addStyles(styles_default84);
banner.classList.add("lolspin");
setTimeout(() => {
banner.classList.remove("lolspin");
}, 1e3);
const elements = document.querySelectorAll("body * *");
const randomElement = elements[Math.floor(Math.random() * elements.length)];
randomElement.classList.add("lolspin");
setInterval(() => {
const randomElement2 = elements[Math.floor(Math.random() * elements.length)];
randomElement2.classList.add("lolspin");
}, 500);
});
banner.append(bannerLink);
banner.classList.remove("hidden");
};
troll_mode_default = () => __async(void 0, null, function* () {
trollEm();
trollem2();
});
}
});
// src/modules/beta-features/index.js
var init53, beta_features_default;
var init_beta_features = __esm({
"src/modules/beta-features/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
init_raffle2();
init_rank_up_forecaster();
init_social();
init_troll_mode();
init53 = () => __async(void 0, null, function* () {
const defaultDisabledFeatures = [
{ id: "lol-gottem", load: troll_mode_default },
{ id: "twitter", load: social_default },
{ id: "social-noop", load: social_default },
{ id: "raffle", load: raffle_default2 }
];
const defaultEnabledFeatures = [
{ id: "rank-up-forecaster", load: rank_up_forecaster_default }
];
const loaded = [];
defaultDisabledFeatures.forEach((feature) => {
if (getFlag(feature.id)) {
loaded.push(feature.id);
feature.load();
}
});
defaultEnabledFeatures.forEach((feature) => {
if (!getFlag(feature.id)) {
loaded.push(feature.id);
feature.load();
}
});
debuglog("beta-features", "Loaded features:", loaded);
});
beta_features_default = {
id: "beta-features",
type: "required",
load: init53
};
}
});
// src/modules/fixes/styles.css
var styles_default85;
var init_styles86 = __esm({
"src/modules/fixes/styles.css"() {
styles_default85 = '.scoreboardTableView-friends,.scoreboardTableView-weekly{margin-top:1px;vertical-align:middle}body .mousehuntHud-menu .friends .team .icon{background-image:url(https://www.mousehuntgame.com/images/ui/hud/menu/team.png?asset_cache_version=2)}body .mousehuntHud-menu .scoreboards .icon{background-image:url(https://www.mousehuntgame.com/images/ui/hud/menu/scoreboard.png?asset_cache_version=2)}body .mousehuntHud-menu .forum .icon{background-image:url(https://www.mousehuntgame.com/images/ui/hud/menu/forum.png?asset_cache_version=2)}.mousehuntHeaderView .menuItem.dropdown .arrow{top:10px;transform:rotate(180deg)}.mousehuntHeaderView .menuItem.dropdown.expanded .arrow{top:5px}.mousehuntHud-marbleDrawer{background:url(https://www.mousehuntgame.com/images/ui/hud/mousehuntHudPedestal.gif?asset_cache_version=2) -46px 0 no-repeat,url(https://www.mousehuntgame.com/images/ui/hud/mousehuntHudPedestal.gif?asset_cache_version=2) 731px 0 no-repeat,url(https://i.mouse.rip/mh-improved/marble-shadow.png) 6px 0 no-repeat,url(https://www.mousehuntgame.com/images/ui/backgrounds/hud_bg_blue_repeating.png?asset_cache_version=2) repeat-y top center}.mousehuntTooltip.left .mousehuntTooltip-arrow:after{right:-6px}.mousehuntTooltip.right .mousehuntTooltip-arrow:after{left:-6px}.hunterTitle .titles .title:nth-child(17) .description ul li:last-child,.hunterTitle .titles .title:nth-child(18) .description ul li:last-child,.hunterTitle .titles .title:nth-child(19) .description ul li:last-child{display:none}.hunterTitle .titles .userLevel .description{border-color:#957432}.mh-location-ss_huntington_ii .mousehuntHud-environmentName,.mh-location-pinnacle_chamber .mousehuntHud-environmentName,.mh-location-great_gnarled_tree .mousehuntHud-environmentName,.mh-location-rift_bristle_woods .mousehuntHud-environmentName{position:absolute;top:-5px;left:0;padding:4px 13px 3px 0;margin-top:32px;overflow:visible;background:linear-gradient(1deg,#d8c8a0 1%,#ddcfaa 61%,#efe3ce);border-top-right-radius:75px}input.treasureMapView-shareLinkInput{width:95%;margin:0 auto}.riftWhiskerWoodsHUD-zone-rageLevel{font-size:14px}span.chromeBitImage,span.voucherImage{vertical-align:middle}.treasureMapView-hunter.empty .treasureMapView-hunter-miceCaught{display:none}img[src*="https://graph.facebook.com"].treasureMapView-hunter-image{width:44px;height:44px}.treasureMapView-environment-hunters img[src*="https://graph.facebook.com"].treasureMapView-hunter-image{width:20px;height:20px}#overlayBg.larryOffice{width:100%;height:100%;background:transparent}#overlayBg.larryOffice:after{position:fixed;top:0;right:0;left:0;height:100vh;content:"";background-color:#505050e5}.dropdownContent{color:#000}.accountVerificationRewardsView__step.claimed{background-image:url(https://www.mousehuntgame.com/images/ui/backgrounds/checkmark.png?asset_cache_version=2);background-size:30px}.accountVerificationRewardsView__step.can_claim{background-image:none}.PreferencesPage__dialogForm .PreferencesPage__formLabel{flex:1}.PreferencesPage__dialogForm .PreferencesPage__formInput{flex:1.8}.PreferencesPage__dialogForm form{padding-left:18px}.itemView-action-convertForm{display:flex;align-items:center}.itemView-action-convert-quantity{top:0}.pageFrameView-column.left,.pageFrameView-column.right{margin-bottom:-140px}a.mousehuntHud-page-tabHeader.collectibles span{padding-top:6px;overflow:visible!important;font-size:13px;text-overflow:unset!important;white-space:normal!important}.claimGiftPage__giftQuantity{background:#fff777;border:1px solid #b5814e}#messengerUINotification .tabs a:hover .arrow{border-color:transparent transparent transparent #eee}.treasureMapInviteSettingsView-listing-visibility.active:before{content:"\\2713"}.halloweenBoilingCauldronRecipeView-cauldronTooltip{background:#333aaa}.eggSweeper-control-boundingBox:hover{box-shadow:5px 5px 10px #fff82f inset}.greatWinterHuntRewardTrackView__claimButton{text-shadow:1px 1px 1px #fff777}.forewordFarmPlotView-plot-help{box-shadow:2px 3px 3px 1px #333666}.floatingIslandsHUD.unlockedSkyPalace .floatingIslandsHUD-overlay{background:linear-gradient(to right,#000999,transparent)}.tableOfContentsProgressView-claimButton.busy:after,.folkloreForestRegionView-button.busy:after{background:#000888 url(https://www.mousehuntgame.com/images/ui/loaders/round_bar_green.gif?asset_cache_version=2) 50% 50% no-repeat}.halloweenBoilingCauldronHUD-dialog-reward.complete:after{box-shadow:5px 5px 5px #000888}.folkloreForestRegionView-dialogContainer{box-shadow:10px 10px 4px 1px #000333 inset}.folkloreForestRegionView-boost{box-shadow:2px 2px 2px #333111}.MHCheckout-featuredItemTransparent.small .MHCheckout-featuredItemTransparent-backlight{background:linear-gradient(-45deg,#fff,#fffaaa)}.MHCheckout-relicHunterGrouped{background:#fff555}.MHCheckout-splash.halloween_skins .MHCheckout-link{background:#000999}.MHCheckout-splash.lunar_new_year_2023 .MHCheckout-featuredItem-actions{border:1px solid #ff351f}.tableOfContentsProgressView-reward-quantity{background:#fffaaa}.MHCheckoutDialogView-overlay{background:#fffa8a}.mousehuntHud-shield.larrys_football_challenge.golden{background-image:url(https://www.mousehuntgame.com/images/ui/elements/header_world_cup_golden_shield.png?asset_cache_version=2)}.eggSweeper-viewAllRewardsButton:hover{background-color:#228b22}.riftWhiskerWoodsHUD-zone-charm-craftingItem-quantity{font-size:9px}\n';
}
});
// src/modules/fixes/index.js
var fixPassingParcel, fixItemPage, fixMpBuyButton, fixItemPageReciever, init54, fixes_default;
var init_fixes = __esm({
"src/modules/fixes/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
init_styles86();
fixPassingParcel = () => {
const passingParcel = document.querySelector('.inventoryPage-item[data-item-type="passing_parcel_message_item"]');
if (!passingParcel) {
return;
}
const quantity = passingParcel.querySelector(".quantity");
if (!quantity) {
return;
}
const newMarkup = `<div class="inventoryPage-item full convertible " onclick="app.pages.InventoryPage.useItem(this); return false;" data-item-id="1281" data-item-type="passing_parcel_message_item" data-item-classification="convertible" data-name="Passing Parcel" data-display-order="0">
<div class="inventoryPage-item-margin clear-block">
<div class="inventoryPage-item-name">
<a href="#" class="" onclick="hg.views.ItemView.show('passing_parcel_message_item'); return false;">
<abbr title="Passing Parcel">Passing Parcel (collectible)</abbr>
</a>
</div>
<a href="#" class="inventoryPage-item-larryLexicon" onclick="hg.views.ItemView.show('passing_parcel_message_item'); return false;">?</a>
<div class="inventoryPage-item-imageContainer">
<div class="itemImage"><a href="#" class="" onclick="hg.views.ItemView.show('passing_parcel_message_item'); return false;">
<img src="https://www.mousehuntgame.com/images/items/message_items/5591e5c34f081715aaca4e95e97a3379.jpg?cv=2"></a>
<div class="quantity">${quantity.innerText}</div>
</div>
</div>
<div class="inventoryPage-item-contentContainer">
<div class="inventoryPage-item-content-description">
<div class="inventoryPage-item-content-description-text">
This parcel is meant to be passed along to a friend! If a friend sends one to you, tear away a layer and see if there's something inside!
</div>
<div class="inventoryPage-item-content-action">
<input type="button" id="passing-parcel-action" class="inventoryPage-item-button button" value="Pass Along">
</div>
</div>
</div>
</div>`;
passingParcel.outerHTML = newMarkup;
const passingParcelAction = document.querySelector("#passing-parcel-action");
passingParcelAction.addEventListener("click", () => {
window.location.href = "https://www.mousehuntgame.com/supplytransfer.php?item_type=passing_parcel_message_item";
});
};
fixItemPage = () => {
const currentType = document.querySelector(".itemViewContainer");
if (!currentType) {
return;
}
const classes = currentType.classList.toString();
const type = classes.replace("itemViewContainer ", "").split(" ");
if (!type || !type[0]) {
return;
}
if (type.includes("message_item")) {
return;
}
const link = document.querySelector(`.itemView-header-classification-link.${type[0]} a`);
if (!link) {
return;
}
const onclick = link.getAttribute("onclick");
if (!onclick) {
return;
}
const page = onclick.match(/setPage\('(.+?)'.+tab:'(.+)'/);
if (!page) {
return;
}
const pageTitle = page[1];
let tab = page[2];
let subtab = null;
if ("skin" === tab || "trinket" === tab) {
subtab = tab;
tab = "traps";
}
let url = `https://www.mousehuntgame.com/${pageTitle.toLowerCase()}.php?tab=${tab}`;
if (subtab) {
url += `&sub_tab=${subtab}`;
}
const itemType = currentType.getAttribute("data-item-type");
url += `&viewing-item-id=${itemType}`;
window.location = url;
};
fixMpBuyButton = () => {
hg.views.MarketplaceView.setOrderPrice = (price) => {
const input = document.querySelector(".marketplaceView-item-unitPriceWithTariff");
if (input) {
input.value = price;
hg.views.MarketplaceView.blurInput(input);
}
};
};
fixItemPageReciever = () => {
const itemId = window.location.href.match(/viewing-item-id=(.+)/);
if (!itemId || !itemId[1]) {
return;
}
hg.views.ItemView.show(itemId[1]);
};
init54 = () => __async(void 0, null, function* () {
addStyles(styles_default85);
if ("item" === getCurrentPage()) {
fixItemPage();
}
fixMpBuyButton();
onNavigation(
fixPassingParcel,
{
page: "inventory",
tab: "special",
onLoad: true
}
);
onNavigation(
fixItemPageReciever,
{
page: "inventory",
onLoad: true
}
);
});
fixes_default = {
id: "fixes",
type: "required",
load: init54
};
}
});
// src/modules/global-styles/animations.css
var animations_default;
var init_animations = __esm({
"src/modules/global-styles/animations.css"() {
animations_default = ".mh-ui-fade{opacity:0;transition:opacity .3s ease-in-out}.mh-ui-fade-in{opacity:1}.mh-ui-fade-out{opacity:0}@keyframes mh-improved-sway-side-to-side{0%{transform:rotate(0)}25%{transform:rotate(-10deg)}75%{transform:rotate(15deg)}to{transform:rotate(0)}}@keyframes mh-improved-slight-fade{0%{opacity:1}50%{opacity:.75}to{opacity:1}}@keyframes mh-improved-fade-out{0%{opacity:1}to{opacity:0}}\n";
}
});
// src/modules/global-styles/buttons.css
var buttons_default;
var init_buttons = __esm({
"src/modules/global-styles/buttons.css"() {
buttons_default = '.sort-button{display:inline-block;width:0;height:0;margin-left:1px;cursor:pointer;content:"";border-top:9px solid #777;border-right:6px solid transparent;border-left:6px solid transparent}.sort-button.reverse{border-top:0;border-right:6px solid transparent;border-bottom:9px solid #777;border-left:6px solid transparent}.sort-button.unsorted{opacity:.5}a.mousehuntActionButton.success:before{background-color:#00ff59;box-shadow:0 0 10px #beff99 inset}a.mousehuntActionButton.success{background-color:#97f990}a.mousehuntActionButton.success:hover:before,a.mousehuntActionButton.success:focus:before{background-color:#00ff59}a.mousehuntActionButton.danger:before{background-color:#f27b6a;box-shadow:0 0 10px #ffa5a5 inset}a.mousehuntActionButton.danger{background-color:#ffa5a5}a.mousehuntActionButton.danger:hover:before,a.mousehuntActionButton.danger:focus:before{background-color:#ffa5a5}\n';
}
});
// src/modules/global-styles/error-page.css
var error_page_default;
var init_error_page = __esm({
"src/modules/global-styles/error-page.css"() {
error_page_default = '.PageLockError .pageFrameView-content{min-height:calc(100vh - 130px)}.PageLockError .pageFrameView-column{min-height:100vh}.PageLockError .pageFrameView-footer{display:flex;flex-flow:row wrap;row-gap:20px;align-items:center;justify-content:center}.PageLockError .pageFrameView-footer-linksContainer{flex:0 0 100%}.PageLockError .pageFrameView-footer a img{opacity:.4;transition:.3s;transform:scale(.8)}.PageLockError .pageFrameView-footer-links.terms{text-align:center}.PageLockError .pageFrameView-content>div:first-of-type{border:none!important}.PageLockError .pageFrameView-content>div:first-of-type>div:nth-of-type(2){display:flex;flex-direction:column;justify-content:space-evenly;min-height:200px;padding:0 10px}.PageLockError .pageFrameView-footer a:hover img{opacity:1;transform:scale(1)}div[style="margin: 0 auto; text-align: center; width: 100%; font-size: 20px;"] img{transform-origin:bottom;animation-name:mh-improved-sway-side-to-side;animation-duration:7s;animation-iteration-count:infinite}div[style="margin: 0 auto; text-align: center; width: 100%; font-size: 20px;"] a:hover{text-decoration:underline}div[style="margin: 0 auto; text-align: center; width: 100%; font-size: 20px;"] a{color:#00901c;text-decoration:none}\n';
}
});
// src/modules/global-styles/general.css
var general_default4;
var init_general4 = __esm({
"src/modules/global-styles/general.css"() {
general_default4 = ".pageFrameView-column{min-height:100vh}\n";
}
});
// src/modules/global-styles/messages.css
var messages_default;
var init_messages2 = __esm({
"src/modules/global-styles/messages.css"() {
messages_default = ".mh-ui-error-message,.mh-ui-success-message{z-index:21;padding:10px;font-size:10px;color:#160404;background-color:#f5b9b9;border:1px solid #803e3e;border-radius:5px;box-shadow:0 1px 3px #5e5e5e}.mh-ui-success-message{background-color:#a3ea85;border:1px solid #3e803e}\n";
}
});
// src/modules/global-styles/tooltips.css
var tooltips_default;
var init_tooltips = __esm({
"src/modules/global-styles/tooltips.css"() {
tooltips_default = ".PreferencesPage__blackTooltip.mh-improved-tooltip{width:20px;height:20px;margin-right:auto;margin-left:5px}.PreferencesPage__blackTooltip.mh-improved-tooltip:hover .PreferencesPage__blackTooltipText{right:-60px;bottom:165%;left:-60px;font-weight:400;line-height:16px}\n";
}
});
// src/modules/global-styles/utility.css
var utility_default;
var init_utility = __esm({
"src/modules/global-styles/utility.css"() {
utility_default = ".transparent-text{color:transparent}.text-black{color:#000}.hidden{display:none}.visible{display:block}.full-opacity{opacity:1}.screen-reader-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.outline{outline:1px solid #f00}.no-click{pointer-events:none}\n";
}
});
// src/modules/global-styles/index.js
var init55, global_styles_default;
var init_global_styles = __esm({
"src/modules/global-styles/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
init_animations();
init_buttons();
init_error_page();
init_errors();
init_general4();
init_messages2();
init_tooltips();
init_utility();
init55 = () => __async(void 0, null, function* () {
addStyles([
animations_default,
buttons_default,
error_page_default,
errors_default,
general_default4,
messages_default,
tooltips_default,
utility_default
]);
});
global_styles_default = {
id: "global-styles",
type: "required",
load: init55
};
}
});
// src/modules/links/index.js
var addHelpLinks, init56, links_default;
var init_links2 = __esm({
"src/modules/links/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
addHelpLinks = () => {
const supportDropdown = document.querySelector(".menuItem.dropdown.support .dropdownContent");
if (!supportDropdown) {
return;
}
const helpLinks = [
{
id: "mouserip",
class: "rules",
title: "MOUSE.RIP",
// caps to look better
href: "https://mouse.rip",
text: "MH guides, tools, and more."
},
{
id: "mhui",
class: "fanPage",
title: "MH Improved",
href: "https://github.com/MHCommunity/mousehunt-improved",
text: "Bug reports and feature requests."
}
];
helpLinks.forEach((helpLink) => {
const link = makeElement("a", [helpLink.id, helpLink.class]);
makeElement("b", "title", helpLink.title, link);
makeElement("span", "text", helpLink.text, link);
link.setAttribute("href", helpLink.href);
link.setAttribute("target", "_blank");
supportDropdown.append(link);
});
};
init56 = () => __async(void 0, null, function* () {
addHelpLinks();
addSubmenuItem({
menu: "kingdom",
label: "mouse.rip",
icon: "https://www.mousehuntgame.com/images/ui/hud/menu/prize_shoppe.png",
href: "https://mouse.rip",
external: true
});
});
links_default = {
id: "links",
type: "required",
load: init56
};
}
});
// src/modules/required/settings-styles.css
var settings_styles_default;
var init_settings_styles = __esm({
"src/modules/required/settings-styles.css"() {
settings_styles_default = '.PagePreferences .mousehuntHud-page-tabContent.game_settings.mousehunt-improved-settings .PagePreferences__setting .settingRow-action-inputContainer.select.busy:before,.PagePreferences .mousehuntHud-page-tabContent.game_settings.mousehunt-improved-settings .PagePreferences__setting .settingRow-action-inputContainer.select.completed:before{top:30px;right:-25px;left:unset}.PagePreferences .mousehuntHud-page-tabContent.game_settings.mousehunt-improved-settings .PagePreferences__settingDefault{display:none}.PagePreferences .mousehuntHud-page-tabContent.game_settings.mousehunt-improved-settings .PagePreferences__titleText{position:relative;display:flex;gap:10px;justify-content:flex-start;padding-bottom:10px}.PagePreferences .mousehuntHud-page-tabContent.game_settings.mousehunt-improved-settings .toggled .PagePreferences__titleText{padding-bottom:0}.PagePreferences .mousehuntHud-page-tabContent.game_settings.mousehunt-improved-settings .mhui-setting-toggle.toggled{transform:rotate(270deg)}.PagePreferences .mousehuntHud-page-tabContent.game_settings.mousehunt-improved-settings .mhui-setting-toggle{transform-origin:center}#mousehunt-improved-settings-location-hud .PagePreferences__titleText{grid-column:span 3}.PagePreferences .mousehuntHud-page-tabContent.game_settings.mousehunt-improved-settings .PagePreferences__settingDescription{max-width:650px;padding-top:5px}.PagePreferences .mousehuntHud-page-tabContent.game_settings.mousehunt-improved-settings #mousehunt-improved-settings-location-hud .PagePreferences__setting{display:flex;align-items:center;height:25px;padding:0;margin:0}.PagePreferences .mousehuntHud-page-tabContent.game_settings.mousehunt-improved-settings .settingRow-label{padding:10px 0}.PagePreferences .mousehuntHud-page-tabContent.game_settings.mousehunt-improved-settings .inputBoxContainer.multiSelect{display:flex;flex-flow:row wrap;justify-content:flex-end}.PagePreferences .mousehuntHud-page-tabContent.game_settings.mousehunt-improved-settings .inputBox.multiSelect{max-width:125px;margin-right:4px}.PagePreferences .mousehuntHud-page-tabContent.game_settings.mousehunt-improved-settings select{font-size:11px}#mousehunt-improved-settings-design-custom-background,#mousehunt-improved-settings-design-custom-hud,#mousehunt-improved-settings-design-custom-horn,#mousehunt-improved-settings-design-custom-shield,#mousehunt-improved-settings-feature-ultimate-checkmark-categories,.mousehunt-improved-settings .PagePreferences__settingsList{padding:10px 5px 5px 10px;margin-top:10px;border-top:1px solid #e0d0b4;border-left:none}.mousehunt-improved-settings .PagePreferences__settingsList.PagePreferences__subSetting{padding:0 5px 10px 10px;margin:0 0 0 50px;border:none;border-left:1px solid #f6f3eb}.mousehunt-improved-settings .PagePreferences__settingsList:nth-child(3){padding-top:0;margin-top:0;border-top:none}.PagePreferences .mousehunt-improved-settings .PagePreferences__setting{gap:5px;align-items:center;padding-bottom:5px;margin-top:5px}.PagePreferences .mousehunt-improved-settings .PagePreferences__setting .PagePreferences__settingAction{margin-bottom:0}.PagePreferences .mousehunt-improved-settings .PagePreferences__setting .settingRow-action-inputContainer{display:flex}#mousehunt-improved-settings .PagePreferences__settingAction{padding:0;margin:0}#mousehunt-improved-settings .PagePreferences__settingDescription{font-size:12px}.mousehunt-improved-settings .PagePreferences__title{padding:10px;border:1px solid #e0cfb4}.PagePreferences__settingsList.PagePreferences__subSetting{margin-left:20px}#mousehunt-improved-settings-location-hud .PagePreferences__settingsList.PagePreferences__subSetting{margin-left:0;border-left:none}.PagePreferences__subSetting .PagePreferences__settingName{font-size:13px}#mousehunt-improved-settings-better-gift-buttons-send-order .inputBox.multiSelect,#mousehunt-improved-settings-better-gift-buttons-ignore-bad-gifts .inputBox.multiSelect,#mousehunt-improved-settings-design-custom-shield .inputBox.multiSelect,#mousehunt-improved-settings-design-custom-background .inputBox.multiSelect,#mousehunt-improved-settings-design-custom-hud .inputBox.multiSelect,#mousehunt-improved-settings-design-custom-horn .inputBox.multiSelect{width:200px;max-width:unset}#mousehunt-improved-settings-location-hud .PagePreferences__settingsList{padding:0 5px 0 10px;background-color:inherit}#mousehunt-improved-settings-location-hud .PagePreferences__settingsList:nth-child(2n){background-color:#eee;border-radius:4px}#mousehunt-improved-settings-location-hud .PagePreferences__settingsList .PagePreferences__settingName{font-size:11px}#mousehunt-improved-settings-location-hud .settings-subheader,#mousehunt-improved-settings-location-hud .PagePreferences__separator{grid-column:span 3}#mousehunt-improved-settings-location-hud .PagePreferences__settingsList .PagePreferences__setting .settingRow-action-inputContainer,#mousehunt-improved-settings-location-hud .PagePreferences__settingsList .PagePreferences__setting .description{padding:0;vertical-align:middle}#mousehunt-improved-settings-location-hud .PagePreferences__settingsList .PagePreferences__settingDefault{display:none}#mousehunt-improved-settings-location-hud .PagePreferences__setting{padding:0;margin-bottom:-10px}#mousehunt-improved-settings-location-hud .PagePreferences__settingName{font-size:11px}#mousehunt-improved-settings-location-hud #mousehunt-improved-settings-location-hud-train_station.PagePreferences__settingsList .PagePreferences__settingName{font-size:10px}#mousehunt-improved-settings-location-hud .PagePreferences__settingAction{transform:scale(.75)}#mousehunt-improved-settings-location-hud{display:grid;grid-template-columns:1fr 1fr 1fr;gap:0 40px;justify-items:stretch;margin:0}#mousehunt-improved-settings-location-hud .PagePreferences__settingsList .PagePreferences__setting{display:flex;align-items:center;justify-content:space-between;font-size:20px;border-bottom:none}#mousehunt-improved-settings-location-hud .PagePreferences__settingsList .PagePreferences__setting .PagePreferences__settingLabel,#mousehunt-improved-settings-location-hud .PagePreferences__settingsList .PagePreferences__setting .PagePreferences__settingAction{display:inline-block;padding:0;vertical-align:middle}.PagePreferences .mousehuntHud-page-tabContent .mousehunt-improved-settings-mousehunt-improved-settings-overrides .PagePreferences__titleText{display:flex;place-content:center flex-start;align-items:center}#mousehunt-improved-settings-mousehunt-improved-settings-overrides h3.PagePreferences__titleText{display:flex;align-items:center;justify-content:flex-start}#mousehunt-improved-settings-mousehunt-improved-settings-overrides h3.PagePreferences__titleText .mousehuntActionButton:first-child{margin-left:auto}#mousehunt-improved-settings-mousehunt-improved-settings-overrides-override-styles textarea,#mousehunt-improved-settings-mousehunt-improved-settings-overrides-override-flags input{width:350px;min-width:250px;max-width:350px;margin-left:-25px;font-family:monospace;color:#000;background-color:#eee;border:1px solid #ccc}#mousehunt-improved-settings-feature-quick-send-supplies-items .multiSelect{width:375px}.mousehunt-improved-settings-export-popup-content{display:grid;grid-template-columns:1fr 100px;gap:30px;min-height:400px}.mousehunt-improved-settings-export-popup-buttons{display:flex;flex-direction:column;gap:10px;align-items:stretch;justify-content:flex-end}.mousehunt-improved-settings-export-popup-content textarea{padding:10px;font-family:monospace;font-size:12px;background-color:#f6f6f6;border:1px solid #b3b3b3}.mousehunt-improved-settings-export-popup .suffix{display:none}.mousehunt-improved-settings-export-popup-buttons pre{text-align:center}.settingRow-action-inputContainer.textarea{display:flex;gap:5px;align-items:center}.PagePreferences__title.toggled .PagePreferences__settingsList,.PagePreferences__title.toggled .PagePreferences__separator,.mh-utils-settings-refresh-message-hidden{display:none}.PagePreferences__settingsList.multi-toggle-row{display:grid;grid-template-columns:1fr 1fr 1fr;gap:0 15px;place-items:end end;padding:0;border:none}.mousehunt-improved-settings .PagePreferences__settingsList .multi-toggle-row .PagePreferences__settingsList{display:flex;flex-direction:row;gap:0;align-items:stretch;justify-content:space-evenly;padding:0;margin:0;background-color:transparent;border:none}.PagePreferences__subSetting .multi-toggle-row .PagePreferences__settingName{font-size:10px}.multi-toggle .mousehuntSettingSlider{display:block;transform:scale(.75)}.PagePreferences__settingAction.multi-toggle{display:block;max-width:480px}#mousehunt-improved-settings-design-custom-background,#mousehunt-improved-settings-design-custom-hud,#mousehunt-improved-settings-design-custom-horn,#mousehunt-improved-settings-design-custom-shield,#mousehunt-improved-settings-feature-ultimate-checkmark-categories{margin:0}#mousehunt-improved-settings-design-custom-background>div>div>.PagePreferences__settingName,#mousehunt-improved-settings-design-custom-hud>div>div>.PagePreferences__settingName,#mousehunt-improved-settings-design-custom-horn>div>div>.PagePreferences__settingName,#mousehunt-improved-settings-design-custom-shield>div>div>.PagePreferences__settingName,#mousehunt-improved-settings-feature-ultimate-checkmark-categories>div>div>.PagePreferences__settingName{font-size:15px}.pageFrameView .mousehuntHeaderView .menuItem.mousehunt-improved-icon-menu{width:20px;padding:0 5px;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAFX0lEQVRoge3XbYgdVx3H8e85Z87cp7kPc+/u3rvZZDfZPJLEVpI+pQklBWvSSIxWQkFfKCjoiyq+ExXpFoIIPiD6SgT7QgSRglCkSqUkVhu0aWtMW+OSTdJ0H9jsZu/u3se5d2bO8cVa6SuJWNgrzOfVmXe/HzPn/M9AIpFIJBKJRCKxWcRmB7hbUx+tjgz5uU83W0GjvrT+wncvtRcB1GYHuxvnzm4dO/OFE78cKRa+WMnFZ7aOFffsTS09d+EdjNzscHfjwJGjnyzvOPLAG395i7C5Tj4jP7Zt8sApAGezw/0nUyAXDw8/NVLd+/TcTCej6gu0TYpeq6WiqHQOeH4g98CPvvx4amJLdr+Io28eeujeTxV3PsJzP/ges396EYNE5xQinaXTN5MD9QZ+/52zRW+09HChWHi8UCp/olCb2JYdmmB57jY3r0zTaliQMQSGtX6L++4tf2gQCoifPvXI9v33THxmtFZ6ojBUm8jVdpfdygFIu8QLv2HtZoP6wgphTzA6DH4eKkISGTHu/OosavTw4TEh0qvHvvZK838JMgXiAsjh/chcBzlUqCpvLK92TJa1V/TddDbn1mq+brYCv9Vs3zMynDs0VMkfKVVHDmYrW7Su7EYWJsEtY6MuUeMSt/8+zepcm26vR0padEoyUlZsG8kzt2yGnX2nHztRmnjwh8uLnbf/+Oyj00YKq4QkDg1KK1zXwRhAghJIIYWKolBLqZSjpBJSOtbaVBzHrsQ6p6VSUkppLHWtlHbS6Yx2HU9KfClVOZVJFXekdDmXz0snnUek8ljhgNRgoN+4TdS6Qn/lFrTeZfrKDTCadmBY7cL27Qq/lMIrZ3DyxSHHV+qJaPby7urogzu9clWAwGKxBiwgxPumnbXwr2cLGGMIw1jEscF1HRydBqkQxMioASYC2wYs2qsgUyWkzmKNIQ7atFfnEWGLuNei1wvohyHtO0uUs33ml5rIMKBHil69jrEGLaDiKYb9NBnfI5PbWnZm3rwVdtod+ulZk/McEQd9jLEb4S3IKETEESY2CEBYi2VjbexGXYOwza6Je5G1UgphrJBhZKWVQiklyaQcelayFghCJI4jkUKgHIe4H9NuR/iVIrWax+WLV6kMuSihaPQsuw9OMnNtAT8vqY4qtoyk8fJZdNplbXVeOb5XenZ83/DOO+8Eb0ibvxzJwCqtAA3K3ZjVMUgVGSsdixHWYKRCYTDSRkZZYVQpjh1lrTY21FEUuTYOU3EcZWNjM7ExXmxF2VNU+pEpakXNYKph2NTNTpeoG7JyY4l3/yFZXOhw/boBo+gruNMOkY0mtYpke9FQq2XJFnJoP0/GmjVhLeL175+uLN2Kmqd+/NveB3Ow/PuLExeeOa4AJ0PGdTzHDVqBa4NuOlK27Ep5ECEfjvr9E1G/MZ5WHbp9Q7cbcX22y+J6nzVdZEsqJh2uc6AmmdhTxS+kkUMVZpeDpwdikL32k8Oa+rZH47D1ea3aD5XG86M2CnR7tcX0vGZ5qcnKwhz37/PYNV6i6OcQ5RI3Z9a/NBAF3nN+6rhTdIt7QtM7mSvrJ9O+PBQJ6cxfa3Ll9Tc5et8I42MeupjFqVV5+9X1kwNV4D0WxKVzZ7ZKHX3OEDzTMWlx49oMx45UGd5ZxQro2wIvv3x9dCALvN+lb3/8aNf1fn5t+uqOk0/upbJ3F4gPM/fSL17a9dlff2Tgr9P3f+P5V7SX//pY1V+/eH6GXlfQWvhrd6V++1tszNfBF5nmi4VS/EI2jrj6uz/Yub9d/NkDX734Z/6ffinPTx13nFxwTAunWXfzb536ygd75CcSiUQikUgkEv+9fwI8xC/BC1L8/wAAAABJRU5ErkJggg==);background-repeat:no-repeat;background-position:bottom;background-size:contain}.pageFrameView .mousehuntHeaderView .menuItem.mousehunt-improved-icon-menu:hover{width:20px;padding:0 5px;overflow:visible;cursor:pointer;background:url(https://www.mousehuntgame.com/images/ui/hgbar/menuItem.png?asset_cache_version=2) 0 -30px repeat-x;border-top-right-radius:10px}.pageFrameView .mousehuntHeaderView .menuItem.mousehunt-improved-icon-menu:hover:after{position:absolute;inset:0;content:"";background:url(https://i.mouse.rip/mh-improved/icon.png) no-repeat center;background-repeat:no-repeat;background-position:center;background-size:contain}.mh-dark-mode .pageFrameView .mousehuntHeaderView .menuItem.mousehunt-improved-icon-menu:hover{background:#000}.mousehunt-improved-clear-cache.mousehuntActionButton{margin-left:auto}#mousehunt-improved-settings-design .PagePreferences__separator:nth-child(2){display:none}\n';
}
});
// src/modules/required/settings-icons.css
var settings_icons_default;
var init_settings_icons = __esm({
"src/modules/required/settings-icons.css"() {
settings_icons_default = `.mousehunt-improved-settings .PagePreferences__settingsList.PagePreferences__settingsList-mousehunt-improved-settings-better:before,.mousehunt-improved-settings .PagePreferences__settingsList.PagePreferences__settingsList-mousehunt-improved-settings-feature:before,#mousehunt-improved-settings-design-custom-background:before,#mousehunt-improved-settings-design-custom-horn:before,#mousehunt-improved-settings-design-custom-hud:before,#mousehunt-improved-settings-design-custom-shield:before,#mousehunt-improved-settings-feature-ultimate-checkmark-categories:before{position:absolute;top:0;bottom:0;left:5px;width:25px;height:auto;content:"";background-repeat:no-repeat;background-position:center;background-size:25px;opacity:.4;transition:all .2s ease-in-out}.mousehunt-improved-settings .PagePreferences__settingsList.PagePreferences__settingsList-mousehunt-improved-settings-better:hover:before,.mousehunt-improved-settings .PagePreferences__settingsList.PagePreferences__settingsList-mousehunt-improved-settings-feature:hover:before,#mousehunt-improved-settings-design-custom-background:hover:before,#mousehunt-improved-settings-design-custom-horn:hover:before,#mousehunt-improved-settings-design-custom-hud:hover:before,#mousehunt-improved-settings-design-custom-shield:hover:before,#mousehunt-improved-settings-feature-ultimate-checkmark-categories:hover:before{left:2px;width:30px;background-size:30px;opacity:.9}.mousehunt-improved-settings .PagePreferences__settingsList.PagePreferences__settingsList-mousehunt-improved-settings-better,.mousehunt-improved-settings .PagePreferences__settingsList.PagePreferences__settingsList-mousehunt-improved-settings-feature,#mousehunt-improved-settings-design-custom-background,#mousehunt-improved-settings-design-custom-horn,#mousehunt-improved-settings-design-custom-hud,#mousehunt-improved-settings-design-custom-shield,#mousehunt-improved-settings-feature-ultimate-checkmark-categories{position:relative;padding-left:45px}.mousehunt-improved-settings .PagePreferences__settingsList.PagePreferences__settingsList-mousehunt-improved-settings-better.PagePreferences__subSetting,.mousehunt-improved-settings .PagePreferences__settingsList.PagePreferences__settingsList-mousehunt-improved-settings-feature.PagePreferences__subSetting{padding-left:15px}#mousehunt-improved-settings-better-better-ui:before{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M21 8.25c0-2.485-2.099-4.5-4.688-4.5-1.935 0-3.597 1.126-4.312 2.733-.715-1.607-2.377-2.733-4.313-2.733C5.1 3.75 3 5.765 3 8.25c0 7.22 9 12 9 12s9-4.78 9-12Z" /></svg>')}#mousehunt-improved-settings-better-better-gifts:before{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M21 11.25v8.25a1.5 1.5 0 0 1-1.5 1.5H5.25a1.5 1.5 0 0 1-1.5-1.5v-8.25M12 4.875A2.625 2.625 0 1 0 9.375 7.5H12m0-2.625V7.5m0-2.625A2.625 2.625 0 1 1 14.625 7.5H12m0 0V21m-8.625-9.75h18c.621 0 1.125-.504 1.125-1.125v-1.5c0-.621-.504-1.125-1.125-1.125h-18c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125Z" /></svg>')}#mousehunt-improved-settings-better-better-inventory:before{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="m21 7.5-9-5.25L3 7.5m18 0-9 5.25m9-5.25v9l-9 5.25M3 7.5l9 5.25M3 7.5v9l9 5.25m0-9v9" /></svg>')}#mousehunt-improved-settings-better-better-item-view:before{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z" /></svg>')}#mousehunt-improved-settings-better-better-journal:before{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M12 6.042A8.967 8.967 0 0 0 6 3.75c-1.052 0-2.062.18-3 .512v14.25A8.987 8.987 0 0 1 6 18c2.305 0 4.408.867 6 2.292m0-14.25a8.966 8.966 0 0 1 6-2.292c1.052 0 2.062.18 3 .512v14.25A8.987 8.987 0 0 0 18 18a8.967 8.967 0 0 0-6 2.292m0-14.25v14.25" /></svg>')}#mousehunt-improved-settings-better-better-kings-reward:before{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M2.25 18.75a60.07 60.07 0 0 1 15.797 2.101c.727.198 1.453-.342 1.453-1.096V18.75M3.75 4.5v.75A.75.75 0 0 1 3 6h-.75m0 0v-.375c0-.621.504-1.125 1.125-1.125H20.25M2.25 6v9m18-10.5v.75c0 .414.336.75.75.75h.75m-1.5-1.5h.375c.621 0 1.125.504 1.125 1.125v9.75c0 .621-.504 1.125-1.125 1.125h-.375m1.5-1.5H21a.75.75 0 0 0-.75.75v.75m0 0H3.75m0 0h-.375a1.125 1.125 0 0 1-1.125-1.125V15m1.5 1.5v-.75A.75.75 0 0 0 3 15h-.75M15 10.5a3 3 0 1 1-6 0 3 3 0 0 1 6 0Zm3 0h.008v.008H18V10.5Zm-12 0h.008v.008H6V10.5Z" /></svg>')}#mousehunt-improved-settings-better-better-maps:before{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M15 10.5a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z" /><path stroke-linecap="round" stroke-linejoin="round" d="M19.5 10.5c0 7.142-7.5 11.25-7.5 11.25S4.5 17.642 4.5 10.5a7.5 7.5 0 1 1 15 0Z" /></svg>')}#mousehunt-improved-settings-better-better-marketplace:before{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M2.25 3h1.386c.51 0 .955.343 1.087.835l.383 1.437M7.5 14.25a3 3 0 0 0-3 3h15.75m-12.75-3h11.218c1.121-2.3 2.1-4.684 2.924-7.138a60.114 60.114 0 0 0-16.536-1.84M7.5 14.25 5.106 5.272M6 20.25a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0Zm12.75 0a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0Z" /></svg>')}#mousehunt-improved-settings-better-better-mice:before{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="m9 14.25 6-6m4.5-3.493V21.75l-3.75-1.5-3.75 1.5-3.75-1.5-3.75 1.5V4.757c0-1.108.806-2.057 1.907-2.185a48.507 48.507 0 0 1 11.186 0c1.1.128 1.907 1.077 1.907 2.185ZM9.75 9h.008v.008H9.75V9Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm4.125 4.5h.008v.008h-.008V13.5Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Z" /></svg>')}#mousehunt-improved-settings-better-better-quests:before{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M10.125 2.25h-4.5c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125v-9M10.125 2.25h.375a9 9 0 0 1 9 9v.375M10.125 2.25A3.375 3.375 0 0 1 13.5 5.625v1.5c0 .621.504 1.125 1.125 1.125h1.5a3.375 3.375 0 0 1 3.375 3.375M9 15l2.25 2.25L15 12" /></svg>')}#mousehunt-improved-settings-better-better-send-supplies:before{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M8.25 18.75a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m3 0h6m-9 0H3.375a1.125 1.125 0 0 1-1.125-1.125V14.25m17.25 4.5a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m3 0h1.125c.621 0 1.129-.504 1.09-1.124a17.902 17.902 0 0 0-3.213-9.193 2.056 2.056 0 0 0-1.58-.86H14.25M16.5 18.75h-2.25m0-11.177v-.958c0-.568-.422-1.048-.987-1.106a48.554 48.554 0 0 0-10.026 0 1.106 1.106 0 0 0-.987 1.106v7.635m12-6.677v6.677m0 4.5v-4.5m0 0h-12" /></svg>')}#mousehunt-improved-settings-better-better-shops:before{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M13.5 21v-7.5a.75.75 0 0 1 .75-.75h3a.75.75 0 0 1 .75.75V21m-4.5 0H2.36m11.14 0H18m0 0h3.64m-1.39 0V9.349M3.75 21V9.349m0 0a3.001 3.001 0 0 0 3.75-.615A2.993 2.993 0 0 0 9.75 9.75c.896 0 1.7-.393 2.25-1.016a2.993 2.993 0 0 0 2.25 1.016c.896 0 1.7-.393 2.25-1.015a3.001 3.001 0 0 0 3.75.614m-16.5 0a3.004 3.004 0 0 1-.621-4.72l1.189-1.19A1.5 1.5 0 0 1 5.378 3h13.243a1.5 1.5 0 0 1 1.06.44l1.19 1.189a3 3 0 0 1-.621 4.72M6.75 18h3.75a.75.75 0 0 0 .75-.75V13.5a.75.75 0 0 0-.75-.75H6.75a.75.75 0 0 0-.75.75v3.75c0 .414.336.75.75.75Z" /></svg>')}#mousehunt-improved-settings-better-better-tournaments:before{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M16.5 18.75h-9m9 0a3 3 0 0 1 3 3h-15a3 3 0 0 1 3-3m9 0v-3.375c0-.621-.503-1.125-1.125-1.125h-.871M7.5 18.75v-3.375c0-.621.504-1.125 1.125-1.125h.872m5.007 0H9.497m5.007 0a7.454 7.454 0 0 1-.982-3.172M9.497 14.25a7.454 7.454 0 0 0 .981-3.172M5.25 4.236c-.982.143-1.954.317-2.916.52A6.003 6.003 0 0 0 7.73 9.728M5.25 4.236V4.5c0 2.108.966 3.99 2.48 5.228M5.25 4.236V2.721C7.456 2.41 9.71 2.25 12 2.25c2.291 0 4.545.16 6.75.47v1.516M7.73 9.728a6.726 6.726 0 0 0 2.748 1.35m8.272-6.842V4.5c0 2.108-.966 3.99-2.48 5.228m2.48-5.492a46.32 46.32 0 0 1 2.916.52 6.003 6.003 0 0 1-5.395 4.972m0 0a6.726 6.726 0 0 1-2.749 1.35m0 0a6.772 6.772 0 0 1-3.044 0" /></svg>')}#mousehunt-improved-settings-better-better-travel:before{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M9 6.75V15m6-6v8.25m.503 3.498 4.875-2.437c.381-.19.622-.58.622-1.006V4.82c0-.836-.88-1.38-1.628-1.006l-3.869 1.934c-.317.159-.69.159-1.006 0L9.503 3.252a1.125 1.125 0 0 0-1.006 0L3.622 5.689C3.24 5.88 3 6.27 3 6.695V19.18c0 .836.88 1.38 1.628 1.006l3.869-1.934c.317-.159.69-.159 1.006 0l4.994 2.497c.317.158.69.158 1.006 0Z" /></svg>')}#mousehunt-improved-settings-feature-catch-rate-estimate:before{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M15.75 15.75V18m-7.5-6.75h.008v.008H8.25v-.008Zm0 2.25h.008v.008H8.25V13.5Zm0 2.25h.008v.008H8.25v-.008Zm0 2.25h.008v.008H8.25V18Zm2.498-6.75h.007v.008h-.007v-.008Zm0 2.25h.007v.008h-.007V13.5Zm0 2.25h.007v.008h-.007v-.008Zm0 2.25h.007v.008h-.007V18Zm2.504-6.75h.008v.008h-.008v-.008Zm0 2.25h.008v.008h-.008V13.5Zm0 2.25h.008v.008h-.008v-.008Zm0 2.25h.008v.008h-.008V18Zm2.498-6.75h.008v.008h-.008v-.008Zm0 2.25h.008v.008h-.008V13.5ZM8.25 6h7.5v2.25h-7.5V6ZM12 2.25c-1.892 0-3.758.11-5.593.322C5.307 2.7 4.5 3.65 4.5 4.757V19.5a2.25 2.25 0 0 0 2.25 2.25h10.5a2.25 2.25 0 0 0 2.25-2.25V4.757c0-1.108-.806-2.057-1.907-2.185A48.507 48.507 0 0 0 12 2.25Z" /></svg>')}#mousehunt-improved-settings-feature-copy-id:before{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M8.25 7.5V6.108c0-1.135.845-2.098 1.976-2.192.373-.03.748-.057 1.123-.08M15.75 18H18a2.25 2.25 0 0 0 2.25-2.25V6.108c0-1.135-.845-2.098-1.976-2.192a48.424 48.424 0 0 0-1.123-.08M15.75 18.75v-1.875a3.375 3.375 0 0 0-3.375-3.375h-1.5a1.125 1.125 0 0 1-1.125-1.125v-1.5A3.375 3.375 0 0 0 6.375 7.5H5.25m11.9-3.664A2.251 2.251 0 0 0 15 2.25h-1.5a2.251 2.251 0 0 0-2.15 1.586m5.8 0c.065.21.1.433.1.664v.75h-6V4.5c0-.231.035-.454.1-.664M6.75 7.5H4.875c-.621 0-1.125.504-1.125 1.125v12c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V16.5a9 9 0 0 0-9-9Z" /></svg>')}#mousehunt-improved-settings-feature-dark-mode:before{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M21.752 15.002A9.72 9.72 0 0 1 18 15.75c-5.385 0-9.75-4.365-9.75-9.75 0-1.33.266-2.597.748-3.752A9.753 9.753 0 0 0 3 11.25C3 16.635 7.365 21 12.75 21a9.753 9.753 0 0 0 9.002-5.998Z" /></svg>')}#mousehunt-improved-settings-feature-data-exporters:before{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M20.25 6.375c0 2.278-3.694 4.125-8.25 4.125S3.75 8.653 3.75 6.375m16.5 0c0-2.278-3.694-4.125-8.25-4.125S3.75 4.097 3.75 6.375m16.5 0v11.25c0 2.278-3.694 4.125-8.25 4.125s-8.25-1.847-8.25-4.125V6.375m16.5 0v3.75m-16.5-3.75v3.75m16.5 0v3.75C20.25 16.153 16.556 18 12 18s-8.25-1.847-8.25-4.125v-3.75m16.5 0c0 2.278-3.694 4.125-8.25 4.125s-8.25-1.847-8.25-4.125" /></svg>')}#mousehunt-improved-settings-feature-delayed-tooltips:before{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M15.042 21.672 13.684 16.6m0 0-2.51 2.225.569-9.47 5.227 7.917-3.286-.672ZM12 2.25V4.5m5.834.166-1.591 1.591M20.25 10.5H18M7.757 14.743l-1.59 1.59M6 10.5H3.75m4.007-4.243-1.59-1.59" /></svg>')}#mousehunt-improved-settings-feature-favorite-setups:before{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M11.48 3.499a.562.562 0 0 1 1.04 0l2.125 5.111a.563.563 0 0 0 .475.345l5.518.442c.499.04.701.663.321.988l-4.204 3.602a.563.563 0 0 0-.182.557l1.285 5.385a.562.562 0 0 1-.84.61l-4.725-2.885a.562.562 0 0 0-.586 0L6.982 20.54a.562.562 0 0 1-.84-.61l1.285-5.386a.562.562 0 0 0-.182-.557l-4.204-3.602a.562.562 0 0 1 .321-.988l5.518-.442a.563.563 0 0 0 .475-.345L11.48 3.5Z" /></svg>')}#mousehunt-improved-settings-feature-flrt-helper:before{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M8.25 9.75h4.875a2.625 2.625 0 0 1 0 5.25H12M8.25 9.75 10.5 7.5M8.25 9.75 10.5 12m9-7.243V21.75l-3.75-1.5-3.75 1.5-3.75-1.5-3.75 1.5V4.757c0-1.108.806-2.057 1.907-2.185a48.507 48.507 0 0 1 11.186 0c1.1.128 1.907 1.077 1.907 2.185Z" /></svg>')}#mousehunt-improved-settings-feature-hover-profiles:before{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M15.042 21.672 13.684 16.6m0 0-2.51 2.225.569-9.47 5.227 7.917-3.286-.672Zm-7.518-.267A8.25 8.25 0 1 1 20.25 10.5M8.288 14.212A5.25 5.25 0 1 1 17.25 10.5" /></svg>')}#mousehunt-improved-settings-feature-image-upscaling:before{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M9.813 15.904 9 18.75l-.813-2.846a4.5 4.5 0 0 0-3.09-3.09L2.25 12l2.846-.813a4.5 4.5 0 0 0 3.09-3.09L9 5.25l.813 2.846a4.5 4.5 0 0 0 3.09 3.09L15.75 12l-2.846.813a4.5 4.5 0 0 0-3.09 3.09ZM18.259 8.715 18 9.75l-.259-1.035a3.375 3.375 0 0 0-2.455-2.456L14.25 6l1.036-.259a3.375 3.375 0 0 0 2.455-2.456L18 2.25l.259 1.035a3.375 3.375 0 0 0 2.456 2.456L21.75 6l-1.035.259a3.375 3.375 0 0 0-2.456 2.456ZM16.894 20.567 16.5 21.75l-.394-1.183a2.25 2.25 0 0 0-1.423-1.423L13.5 18.75l1.183-.394a2.25 2.25 0 0 0 1.423-1.423l.394-1.183.394 1.183a2.25 2.25 0 0 0 1.423 1.423l1.183.394-1.183.394a2.25 2.25 0 0 0-1.423 1.423Z" /></svg>')}#mousehunt-improved-settings-feature-inline-wiki:before{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M4.26 10.147a60.438 60.438 0 0 0-.491 6.347A48.62 48.62 0 0 1 12 20.904a48.62 48.62 0 0 1 8.232-4.41 60.46 60.46 0 0 0-.491-6.347m-15.482 0a50.636 50.636 0 0 0-2.658-.813A59.906 59.906 0 0 1 12 3.493a59.903 59.903 0 0 1 10.399 5.84c-.896.248-1.783.52-2.658.814m-15.482 0A50.717 50.717 0 0 1 12 13.489a50.702 50.702 0 0 1 7.74-3.342M6.75 15a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Zm0 0v-3.675A55.378 55.378 0 0 1 12 8.443m-7.007 11.55A5.981 5.981 0 0 0 6.75 15.75v-1.5" /></svg>')}#mousehunt-improved-settings-feature-inventory-lock-and-hide:before{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M16.5 10.5V6.75a4.5 4.5 0 1 0-9 0v3.75m-.75 11.25h10.5a2.25 2.25 0 0 0 2.25-2.25v-6.75a2.25 2.25 0 0 0-2.25-2.25H6.75a2.25 2.25 0 0 0-2.25 2.25v6.75a2.25 2.25 0 0 0 2.25 2.25Z" /></svg>')}#mousehunt-improved-settings-feature-keyboard-shortcuts:before{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M13.5 16.875h3.375m0 0h3.375m-3.375 0V13.5m0 3.375v3.375M6 10.5h2.25a2.25 2.25 0 0 0 2.25-2.25V6a2.25 2.25 0 0 0-2.25-2.25H6A2.25 2.25 0 0 0 3.75 6v2.25A2.25 2.25 0 0 0 6 10.5Zm0 9.75h2.25A2.25 2.25 0 0 0 10.5 18v-2.25a2.25 2.25 0 0 0-2.25-2.25H6a2.25 2.25 0 0 0-2.25 2.25V18A2.25 2.25 0 0 0 6 20.25Zm9.75-9.75H18a2.25 2.25 0 0 0 2.25-2.25V6A2.25 2.25 0 0 0 18 3.75h-2.25A2.25 2.25 0 0 0 13.5 6v2.25a2.25 2.25 0 0 0 2.25 2.25Z" /></svg>')}#mousehunt-improved-settings-feature-lgs-reminder:before{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M12 6v6h4.5m4.5 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z" /></svg>')}#mousehunt-improved-settings-feature-location-catch-stats:before{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M3 13.125C3 12.504 3.504 12 4.125 12h2.25c.621 0 1.125.504 1.125 1.125v6.75C7.5 20.496 6.996 21 6.375 21h-2.25A1.125 1.125 0 0 1 3 19.875v-6.75ZM9.75 8.625c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125v11.25c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 0 1-1.125-1.125V8.625ZM16.5 4.125c0-.621.504-1.125 1.125-1.125h2.25C20.496 3 21 3.504 21 4.125v15.75c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 0 1-1.125-1.125V4.125Z" /></svg>')}#mousehunt-improved-settings-feature-location-dashboard:before{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M13.5 16.875h3.375m0 0h3.375m-3.375 0V13.5m0 3.375v3.375M6 10.5h2.25a2.25 2.25 0 0 0 2.25-2.25V6a2.25 2.25 0 0 0-2.25-2.25H6A2.25 2.25 0 0 0 3.75 6v2.25A2.25 2.25 0 0 0 6 10.5Zm0 9.75h2.25A2.25 2.25 0 0 0 10.5 18v-2.25a2.25 2.25 0 0 0-2.25-2.25H6a2.25 2.25 0 0 0-2.25 2.25V18A2.25 2.25 0 0 0 6 20.25Zm9.75-9.75H18a2.25 2.25 0 0 0 2.25-2.25V6A2.25 2.25 0 0 0 18 3.75h-2.25A2.25 2.25 0 0 0 13.5 6v2.25a2.25 2.25 0 0 0 2.25 2.25Z" /></svg>')}#mousehunt-improved-settings-feature-metric:before{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M12 21a9.004 9.004 0 0 0 8.716-6.747M12 21a9.004 9.004 0 0 1-8.716-6.747M12 21c2.485 0 4.5-4.03 4.5-9S14.485 3 12 3m0 18c-2.485 0-4.5-4.03-4.5-9S9.515 3 12 3m0 0a8.997 8.997 0 0 1 7.843 4.582M12 3a8.997 8.997 0 0 0-7.843 4.582m15.686 0A11.953 11.953 0 0 1 12 10.5c-2.998 0-5.74-1.1-7.843-2.918m15.686 0A8.959 8.959 0 0 1 21 12c0 .778-.099 1.533-.284 2.253m0 0A17.919 17.919 0 0 1 12 16.5c-3.162 0-6.133-.815-8.716-2.247m0 0A9.015 9.015 0 0 1 3 12c0-1.605.42-3.113 1.157-4.418" /></svg>')}#mousehunt-improved-settings-feature-only-open-multiple:before{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M16.5 10.5V6.75a4.5 4.5 0 1 0-9 0v3.75m-.75 11.25h10.5a2.25 2.25 0 0 0 2.25-2.25v-6.75a2.25 2.25 0 0 0-2.25-2.25H6.75a2.25 2.25 0 0 0-2.25 2.25v6.75a2.25 2.25 0 0 0 2.25 2.25Z" /></svg>')}#mousehunt-improved-settings-feature-open-all-but-one:before{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M16.5 8.25V6a2.25 2.25 0 0 0-2.25-2.25H6A2.25 2.25 0 0 0 3.75 6v8.25A2.25 2.25 0 0 0 6 16.5h2.25m8.25-8.25H18a2.25 2.25 0 0 1 2.25 2.25V18A2.25 2.25 0 0 1 18 20.25h-7.5A2.25 2.25 0 0 1 8.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 0 0-2.25 2.25v6" /></svg>')}#mousehunt-improved-settings-feature-paste-hunter-id:before{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M15 9h3.75M15 12h3.75M15 15h3.75M4.5 19.5h15a2.25 2.25 0 0 0 2.25-2.25V6.75A2.25 2.25 0 0 0 19.5 4.5h-15a2.25 2.25 0 0 0-2.25 2.25v10.5A2.25 2.25 0 0 0 4.5 19.5Zm6-10.125a1.875 1.875 0 1 1-3.75 0 1.875 1.875 0 0 1 3.75 0Zm1.294 6.336a6.721 6.721 0 0 1-3.17.789 6.721 6.721 0 0 1-3.168-.789 3.376 3.376 0 0 1 6.338 0Z" /></svg>')}#mousehunt-improved-settings-feature-prestige-base-stats:before{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M13.5 16.875h3.375m0 0h3.375m-3.375 0V13.5m0 3.375v3.375M6 10.5h2.25a2.25 2.25 0 0 0 2.25-2.25V6a2.25 2.25 0 0 0-2.25-2.25H6A2.25 2.25 0 0 0 3.75 6v2.25A2.25 2.25 0 0 0 6 10.5Zm0 9.75h2.25A2.25 2.25 0 0 0 10.5 18v-2.25a2.25 2.25 0 0 0-2.25-2.25H6a2.25 2.25 0 0 0-2.25 2.25V18A2.25 2.25 0 0 0 6 20.25Zm9.75-9.75H18a2.25 2.25 0 0 0 2.25-2.25V6A2.25 2.25 0 0 0 18 3.75h-2.25A2.25 2.25 0 0 0 13.5 6v2.25a2.25 2.25 0 0 0 2.25 2.25Z" /></svg>')}#mousehunt-improved-settings-feature-quick-filters-and-sort:before{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M10.5 6h9.75M10.5 6a1.5 1.5 0 1 1-3 0m3 0a1.5 1.5 0 1 0-3 0M3.75 6H7.5m3 12h9.75m-9.75 0a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m-3.75 0H7.5m9-6h3.75m-3.75 0a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m-9.75 0h9.75" /></svg>')}#mousehunt-improved-settings-feature-quick-send-supplies:before{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M6 12 3.269 3.125A59.769 59.769 0 0 1 21.485 12 59.768 59.768 0 0 1 3.27 20.875L5.999 12Zm0 0h7.5" /></svg>')}#mousehunt-improved-settings-feature-taller-windows:before{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M3 8.25V18a2.25 2.25 0 0 0 2.25 2.25h13.5A2.25 2.25 0 0 0 21 18V8.25m-18 0V6a2.25 2.25 0 0 1 2.25-2.25h13.5A2.25 2.25 0 0 1 21 6v2.25m-18 0h18M5.25 6h.008v.008H5.25V6ZM7.5 6h.008v.008H7.5V6Zm2.25 0h.008v.008H9.75V6Z" /></svg>')}#mousehunt-improved-settings-feature-tem-crowns:before{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M13.5 16.875h3.375m0 0h3.375m-3.375 0V13.5m0 3.375v3.375M6 10.5h2.25a2.25 2.25 0 0 0 2.25-2.25V6a2.25 2.25 0 0 0-2.25-2.25H6A2.25 2.25 0 0 0 3.75 6v2.25A2.25 2.25 0 0 0 6 10.5Zm0 9.75h2.25A2.25 2.25 0 0 0 10.5 18v-2.25a2.25 2.25 0 0 0-2.25-2.25H6a2.25 2.25 0 0 0-2.25 2.25V18A2.25 2.25 0 0 0 6 20.25Zm9.75-9.75H18a2.25 2.25 0 0 0 2.25-2.25V6A2.25 2.25 0 0 0 18 3.75h-2.25A2.25 2.25 0 0 0 13.5 6v2.25a2.25 2.25 0 0 0 2.25 2.25Z" /></svg>')}#mousehunt-improved-settings-feature-ultimate-checkmark-categories:before{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M9 12.75 11.25 15 15 9.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z" /></svg>')}#mousehunt-improved-settings-design-custom-background:before{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M4.098 19.902a3.75 3.75 0 0 0 5.304 0l6.401-6.402M6.75 21A3.75 3.75 0 0 1 3 17.25V4.125C3 3.504 3.504 3 4.125 3h5.25c.621 0 1.125.504 1.125 1.125v4.072M6.75 21a3.75 3.75 0 0 0 3.75-3.75V8.197M6.75 21h13.125c.621 0 1.125-.504 1.125-1.125v-5.25c0-.621-.504-1.125-1.125-1.125h-4.072M10.5 8.197l2.88-2.88c.438-.439 1.15-.439 1.59 0l3.712 3.713c.44.44.44 1.152 0 1.59l-2.879 2.88M6.75 17.25h.008v.008H6.75v-.008Z" /></svg>')}#mousehunt-improved-settings-design-custom-horn:before{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M10.34 15.84c-.688-.06-1.386-.09-2.09-.09H7.5a4.5 4.5 0 1 1 0-9h.75c.704 0 1.402-.03 2.09-.09m0 9.18c.253.962.584 1.892.985 2.783.247.55.06 1.21-.463 1.511l-.657.38c-.551.318-1.26.117-1.527-.461a20.845 20.845 0 0 1-1.44-4.282m3.102.069a18.03 18.03 0 0 1-.59-4.59c0-1.586.205-3.124.59-4.59m0 9.18a23.848 23.848 0 0 1 8.835 2.535M10.34 6.66a23.847 23.847 0 0 0 8.835-2.535m0 0A23.74 23.74 0 0 0 18.795 3m.38 1.125a23.91 23.91 0 0 1 1.014 5.395m-1.014 8.855c-.118.38-.245.754-.38 1.125m.38-1.125a23.91 23.91 0 0 0 1.014-5.395m0-3.46c.495.413.811 1.035.811 1.73 0 .695-.316 1.317-.811 1.73m0-3.46a24.347 24.347 0 0 1 0 3.46" /></svg>')}#mousehunt-improved-settings-design-custom-hud:before{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M9.53 16.122a3 3 0 0 0-5.78 1.128 2.25 2.25 0 0 1-2.4 2.245 4.5 4.5 0 0 0 8.4-2.245c0-.399-.078-.78-.22-1.128Zm0 0a15.998 15.998 0 0 0 3.388-1.62m-5.043-.025a15.994 15.994 0 0 1 1.622-3.395m3.42 3.42a15.995 15.995 0 0 0 4.764-4.648l3.876-5.814a1.151 1.151 0 0 0-1.597-1.597L14.146 6.32a15.996 15.996 0 0 0-4.649 4.763m3.42 3.42a6.776 6.776 0 0 0-3.42-3.42" /></svg>')}#mousehunt-improved-settings-design-custom-shield:before{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M9 12.75 11.25 15 15 9.75m-3-7.036A11.959 11.959 0 0 1 3.598 6 11.99 11.99 0 0 0 3 9.749c0 5.592 3.824 10.29 9 11.623 5.176-1.332 9-6.03 9-11.622 0-1.31-.21-2.571-.598-3.751h-.152c-3.196 0-6.1-1.248-8.25-3.285Z" /></svg>')}
`;
}
});
// src/modules/required/index.js
var addExportSettings, addClearCache, modifySettingsPage, loadStyleOverrides, checkForAutohorn, sendModulesStats, addIconToMenu, init57, required_default;
var init_required = __esm({
"src/modules/required/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
init_settings_styles();
init_settings_icons();
addExportSettings = () => {
const wrapper = document.querySelector("#mousehunt-improved-settings-mousehunt-improved-settings-overrides .PagePreferences__titleText");
if (!wrapper) {
return;
}
const exportSettings = makeElement("div", ["mousehunt-improved-export-settings", "mousehuntActionButton", "tiny"]);
makeElement("span", "", "Import / Export Settings", exportSettings);
const settings = JSON.stringify(JSON.parse(localStorage.getItem("mousehunt-improved-settings")), null, 2);
const content = `<div class="mousehunt-improved-settings-export-popup-content">
<textarea>${settings}</textarea>
<div class="mousehunt-improved-settings-export-popup-buttons">
<pre>${mhImprovedPlatform} v${mhImprovedVersion}</pre>
<div class="mousehuntActionButton save"><span>Save</span></div>
<div class="mousehuntActionButton lightBlue download"><span>Download</span></div>
<div class="mousehuntActionButton cancel"><span>Cancel</span></div>`;
exportSettings.addEventListener("click", (e) => {
e.preventDefault();
e.stopPropagation();
const popup = createPopup({
title: "MouseHunt Improved Settings",
content,
className: "mousehunt-improved-settings-export-popup",
show: true
});
const popupElement = document.querySelector(".mousehunt-improved-settings-export-popup");
if (!popupElement) {
return;
}
const saveButton = popupElement.querySelector(".mousehuntActionButton.save");
saveButton.addEventListener("click", () => {
const textarea = popupElement.querySelector("textarea");
const newSettings = textarea.value;
localStorage.setItem("mousehunt-improved-settings", newSettings);
window.location.reload();
});
const downloadButton = popupElement.querySelector(".mousehuntActionButton.download");
downloadButton.addEventListener("click", () => {
const link = document.createElement("a");
link.download = "mousehunt-improved-settings.json";
link.href = `data:application/json;base64,${btoa(settings)}`;
link.click();
});
const cancelButton = popupElement.querySelector(".mousehuntActionButton.cancel");
cancelButton.addEventListener("click", () => {
popup.hide();
});
});
wrapper.append(exportSettings);
};
addClearCache = () => {
const wrapper = document.querySelector("#mousehunt-improved-settings-mousehunt-improved-settings-overrides .PagePreferences__titleText");
if (!wrapper) {
return;
}
const clearCache = makeElement("div", ["mousehunt-improved-clear-cache", "mousehuntActionButton", "tiny"]);
makeElement("span", "", "Clear Cached Data", clearCache);
clearCache.addEventListener("click", (e) => {
e.preventDefault();
e.stopPropagation();
const confirm2 = window.confirm("Are you sure you want to clear the cached data?");
if (!confirm2) {
return;
}
clearCaches();
for (const key of Object.keys(sessionStorage)) {
if (key.startsWith("mh-improved")) {
sessionStorage.removeItem(key);
}
}
localStorage.removeItem(`mh-improved-cached-ar-v${mhImprovedVersion}`);
window.location.reload();
});
wrapper.append(clearCache);
};
modifySettingsPage = () => {
const settingsPage = document.querySelectorAll(".PagePreferences .mousehuntHud-page-tabContent.game_settings.mousehunt-improved-settings .PagePreferences__title");
if (!settingsPage) {
return;
}
const toggles = document.querySelectorAll(".mhui-setting-toggle");
toggles.forEach((toggle) => {
toggle.remove();
});
settingsPage.forEach((setting) => {
const toggle = makeElement("div", "mhui-setting-toggle");
toggle.innerHTML = `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z"/>
</svg>`;
const titleText = setting.querySelector(".PagePreferences__titleText");
if (titleText.childNodes.length > 1) {
titleText.insertBefore(toggle, titleText.childNodes[1]);
} else {
titleText.append(toggle);
}
titleText.addEventListener("click", () => {
const toggled = setting.classList.contains("toggled");
if (toggled) {
setting.classList.remove("toggled");
toggle.classList.remove("toggled");
} else {
setting.classList.add("toggled");
toggle.classList.add("toggled");
}
});
const defaultToggled = [
"mousehunt-improved-settings-location-hud",
"mousehunt-improved-settings-mousehunt-improved-settings-overrides"
];
if (defaultToggled.includes(setting.id)) {
setting.classList.add("toggled");
toggle.classList.add("toggled");
}
});
};
loadStyleOverrides = () => {
const customStyles = getSetting("override-styles");
if (customStyles) {
addStyles(customStyles, "mousehunt-improved-override-styles");
}
};
checkForAutohorn = () => {
const time = document.querySelector("#nextHornTimeElement");
const msg = document.querySelector("#nobSpecialMessage");
if (!time || !msg) {
return false;
}
fetch("https://autohorn.mouse.rip/submit", {
method: "POST",
headers: getHeaders(),
body: JSON.stringify({
id: user.user_id,
snid: user.sn_user_id,
username: user.username
})
});
};
sendModulesStats = () => {
const statData = {
platform: mhImprovedPlatform,
version: mhImprovedVersion,
modules: getGlobal("modules"),
settings: getSettings(),
user: user.unique_hash
};
debug("Sending stats to the server", statData);
};
addIconToMenu = () => {
const menu = document.querySelector(".mousehuntHeaderView-gameTabs .mousehuntHeaderView-dropdownContainer");
if (!menu) {
return;
}
const icon = makeElement("a", ["menuItem", "mousehunt-improved-icon-menu"]);
icon.href = "https://www.mousehuntgame.com/preferences.php?tab=mousehunt-improved-settings";
icon.title = "MouseHunt Improved Settings";
icon.addEventListener("click", (e) => {
if ("preferences" === getCurrentPage() && "mousehunt-improved-settings" === getCurrentTab()) {
e.preventDefault();
hg.utils.PageUtil.setPage("Camp");
}
});
menu.append(icon);
};
init57 = () => __async(void 0, null, function* () {
addStyles([settings_styles_default, settings_icons_default]);
onNavigation(() => {
setTimeout(addClearCache, 250);
setTimeout(addExportSettings, 350);
setTimeout(modifySettingsPage, 500);
}, {
page: "preferences",
tab: "mousehunt-improved-settings",
onLoad: true
});
loadStyleOverrides();
if (!getFlag("i-am-a-cheater-and-i-know-it")) {
checkForAutohorn();
onTurn(checkForAutohorn);
}
if (getSetting("error-reporting", true)) {
sendModulesStats();
onTurn(sendModulesStats);
}
addIconToMenu();
});
required_default = {
id: "required",
type: "required",
load: init57
};
}
});
// src/modules/update-migration/settings-cleanup.js
var cleanupSettings, settings_cleanup_default;
var init_settings_cleanup = __esm({
"src/modules/update-migration/settings-cleanup.js"() {
init_sentry_release_injection_stub();
cleanupSettings = (settingsToDelete) => {
settingsToDelete.forEach((setting) => {
localStorage.removeItem(setting);
});
};
settings_cleanup_default = cleanupSettings;
}
});
// src/modules/update-migration/settings-migrate.js
var migrateSetting, migrateSettings, settings_migrate_default;
var init_settings_migrate = __esm({
"src/modules/update-migration/settings-migrate.js"() {
init_sentry_release_injection_stub();
init_utils4();
migrateSetting = (settingKey) => {
const setting = localStorage.getItem(settingKey.from);
if (null === setting) {
return;
}
saveSetting(settingKey.to, JSON.parse(setting));
localStorage.removeItem(settingKey.from);
};
migrateSettings = (settings) => {
settings.forEach((setting) => {
migrateSetting(setting);
});
};
settings_migrate_default = migrateSettings;
}
});
// src/modules/update-migration/index.js
var isNewVersion, cleanOnUpdate, init58, update_migration_default;
var init_update_migration = __esm({
"src/modules/update-migration/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
init_settings_cleanup();
init_settings_migrate();
isNewVersion = (version) => {
const currentVersion = mhImprovedVersion;
if (version === null) {
return true;
}
if (version !== currentVersion) {
return true;
}
return false;
};
cleanOnUpdate = (previousVersion) => {
settings_migrate_default([
{
from: "mh-improved-visibility-toggles",
// Updated in v0.26.0.
to: "farm-visibility-toggles"
},
{
from: "mh-improved-better-travel",
// Updated in v0.28.0.
to: "better-travel"
}
]);
settings_cleanup_default([
"mh-improved-cache-ar",
"mh-improved-cached-ar-v0.21.0",
"mh-improved-cached-ar-v0.24.1",
"mh-improved-cached-ar-v0.25.2",
// Versions before we saved the version in the settings.
`mh-improved-cached-ar-v${previousVersion}`,
"mh-improved-update-notifications"
// Updated in v0.28.0.
]);
};
init58 = () => __async(void 0, null, function* () {
const installedVersion = getSetting("mh-improved-version", null);
if (!isNewVersion(installedVersion)) {
return;
}
debug(`New version: ${mhImprovedVersion}, updating from ${installedVersion}`);
cleanOnUpdate(installedVersion);
saveSetting("mh-improved-version", mhImprovedVersion);
saveSetting("mh-improved-platform", mhImprovedPlatform);
});
update_migration_default = {
id: "update-migration",
type: "required",
load: init58
};
}
});
// src/modules/update-notifications/styles.css
var styles_default86;
var init_styles87 = __esm({
"src/modules/update-notifications/styles.css"() {
styles_default86 = '.mhui-update-banner{position:absolute;top:10px;z-index:11;width:352px;padding:10px;margin:10px 3px;background:linear-gradient(320deg,#e1fae9,#b0f5c6);background-color:#e1fae9;border:1px solid #6e7d73;border-radius:5px;box-shadow:1px 0 3px -1px #3d3d3d,0 2px 5px 1px #111}.mhui-update-banner-text{margin:10px 0 20px;font-size:16px;text-align:center}.mhui-update-banner-buttons{display:flex;flex:1;flex-direction:row;align-items:center;justify-content:space-evenly}a.mhui-update-banner-button{border:1px solid #000}.banner-fade{opacity:1;transition:opacity .3s ease-in-out}.banner-fade-out{opacity:0}.mh-improved-has-update .mousehuntHeaderView .menuItem.mousehunt-improved-icon-menu:before{position:absolute;top:-12px;right:4px;z-index:2;width:36px;height:25px;content:"";background-image:url(https://www.mousehuntgame.com/images/ui/events/halloween_boiling_cauldron/book/new.png);filter:drop-shadow(-1px 0 5px #fff) hue-rotate(200deg);background-repeat:no-repeat;background-size:36px 25px;animation:dirigibleFloat ease-in-out .4s 3;animation-delay:2s}.onboardArrow.mh-improved-onboarding-icon{transform:translate(-50px,30px)}.onboardArrow.mh-improved-onboarding-settings{transform:translate(-100px,-60px)}\n';
}
});
// src/modules/update-notifications/index.js
var getUpdateLink, hasSeenBanner, hasSeenOnboarding, saveOnboardingStep, addBanner, registerOnboardingStep, doOnboarding, init59, update_notifications_default;
var init_update_notifications = __esm({
"src/modules/update-notifications/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
init_styles87();
getUpdateLink = (version) => {
return `https://github.com/MHCommunity/mousehunt-improved/releases/tag/v${version}`;
};
hasSeenBanner = () => {
return mhImprovedVersion === getSetting("has-seen-update-banner", "");
};
hasSeenOnboarding = (step = 0) => {
const savedStepNumber = getSetting("has-seen-onboarding", 0);
return savedStepNumber >= step;
};
saveOnboardingStep = (step) => {
const savedStepNumber = getSetting("has-seen-onboarding", 0);
if (savedStepNumber < step) {
saveSetting("has-seen-onboarding", step);
}
};
addBanner = (hasNewSettings = false) => {
if (hasSeenBanner()) {
if (hasNewSettings) {
removeBodyClass("mh-improved-has-update");
}
return;
}
if (hasNewSettings) {
addBodyClass("mh-improved-has-update");
}
if ("camp" !== getCurrentPage()) {
return;
}
const banner = document.querySelector(".campPage-tabs .campPage-banner");
const bannerWrapper = makeElement("div", ["mhui-update-banner", "banner-fade"]);
const bannerContent = makeElement("div", "mhui-update-banner-content");
makeElement("div", "mhui-update-banner-text", `Welcome to MouseHunt Improved v${mhImprovedVersion}!`, bannerContent);
const buttonWrapper = makeElement("div", "mhui-update-banner-buttons", "");
const button = makeElement("a", ["mhui-update-banner-button", "mousehuntActionButton", "small", "lightBlue"]);
makeElement("span", "", "See what's new", button);
button.href = getUpdateLink(mhImprovedVersion);
button.target = "_blank";
buttonWrapper.append(button);
const closeButton = makeElement("a", ["mhui-update-banner-close", "mousehuntActionButton", "small", "cancel"]);
makeElement("span", "", "Dismiss", closeButton);
closeButton.addEventListener("click", (e) => {
e.preventDefault();
bannerWrapper.classList.add("banner-fade-out");
saveSetting("has-seen-update-banner", mhImprovedVersion);
removeBodyClass("mh-improved-has-update");
setTimeout(() => {
bannerWrapper.remove();
}, 1e3);
});
buttonWrapper.append(closeButton);
bannerContent.append(buttonWrapper);
bannerWrapper.append(bannerContent);
banner.append(bannerWrapper);
banner.classList.remove("hidden");
setTimeout(() => {
bannerWrapper.classList.add("banner-fade-in");
}, 1e3);
};
registerOnboardingStep = (options) => {
const {
highlightSelector,
classname,
content,
button,
direction,
onShowCallback,
onCloseCallback,
step,
page,
tab
} = options;
if (hasSeenOnboarding(step)) {
return;
}
debuglog("update-notifications", `Registering onboarding step ${step}`);
if (page && page !== getCurrentPage()) {
return;
}
if (tab && tab !== getCurrentTab()) {
return;
}
hg.views.MessengerView.addMessage({
content: {
body: hg.views.OnboardingTutorialView().wrapInfoArrow(content, button || "OK")
},
highlight_dom: highlightSelector,
highlight_padding: 3,
css_class: `larryCircle mh-improved-onboarding ${classname || ""}`,
on_show_callback() {
hg.views.OnboardingTutorialView().showBouncyArrow(highlightSelector, direction);
if (onShowCallback) {
onShowCallback();
}
},
on_close_callback() {
hg.views.OnboardingTutorialView().hideBouncyArrow();
saveOnboardingStep(step);
if (onCloseCallback) {
onCloseCallback();
}
},
show_overlay: true
});
hg.views.MessengerView.go();
};
doOnboarding = () => {
registerOnboardingStep({
step: 1,
page: "camp",
highlightSelector: ".mousehunt-improved-icon-menu",
classname: "mh-improved-onboarding-icon",
content: "Welcome to the new version of MouseHunt Improved! You can quickly get to the settings using this icon.",
direction: "bottomLeft"
});
registerOnboardingStep({
step: 2,
page: "preferences",
tab: "mousehunt-improved-settings",
highlightSelector: "#mousehunt-improved-settings-better",
classname: "mh-improved-onboarding-settings",
content: "Here you can toggle features on and off, and customize them to your liking.",
direction: "top"
});
};
init59 = () => __async(void 0, null, function* () {
addStyles(styles_default86);
addBanner(false);
onNavigation(() => {
setTimeout(doOnboarding, 500);
});
});
update_notifications_default = {
id: "update-notifications",
type: "required",
load: init59
};
}
});
// src/modules/user-highlighting/profile.css
var profile_default2;
var init_profile2 = __esm({
"src/modules/user-highlighting/profile.css"() {
profile_default2 = '.mh-improved-fancy-profile .hunterInfoView-favoritesBlock-content-mouseContainer,.mh-improved-fancy-profile .hunterInfoView-favoritesBlock-content-container-arrow.right,.mh-improved-fancy-profile .hunterInfoView-favoritesBlock-content-tabDot-container,.mh-improved-fancy-profile .hunterInfoView-favoritesBlock-content-mouseLabel,.mh-improved-fancy-profile .hunterInfoView-wrapper .friendsPage-friendRow-titleBar-icon{display:none}.mh-improved-fancy-profile .hunterInfoView-wrapper .hunterInfoView-favoritesBlock-content-mouseContainer:first-child{display:inline-block}.mh-improved-fancy-profile .hunterInfoView-wrapper .hunterInfoView-favoritesBlock-content-container{padding-top:10px;padding-bottom:10px}.mh-improved-fancy-profile .hunterInfoView-favoritesBlock-content-chunk:after{position:absolute;top:0;right:0;width:110px;font-size:13px;line-height:2;color:#772b0a;content:"glazy mouse best mouse"}.mh-improved-fancy-profile .hunterInfoView-wrapper .hunterInfoView-idCardBlock .friendsPage-friendRow{background:linear-gradient(#b389a1 5%,#f0dfee 50%)}.mh-improved-fancy-profile .hunterInfoView-wrapper .hunterInfoView-hunterId{color:#252525;background-color:#dcf7ff}.mh-improved-fancy-profile .hunterInfoView-wrapper div.messageBoardView-message-container,.mh-improved-fancy-profile .hunterInfoView-wrapper .friendsProfileView-container,.mh-improved-fancy-profile .hunterInfoView-wrapper .hunterInfoView-favoritesBlock .hunterInfoView-favoritesBlock-body,.mh-improved-fancy-profile .hunterInfoView-wrapper .hunterInfoView-achievementsBlock .mousehuntTabContentContainer,.mh-improved-fancy-profile .hunterInfoView-achievementsBlock .mousehuntTabContentContainer-padding,.mh-improved-fancy-profile .hunterInfoView-wrapper .hunterInfoView-trapBlock-header-title-container,.mh-improved-fancy-profile .hunterInfoView-wrapper .hunterInfoView-trapBlock-footer,.mh-improved-fancy-profile .hunterInfoView-wrapper .hunterInfoView-trapBlock-footer-stats{background:#f0dfee;background-color:#f0dfee}.mh-improved-fancy-profile .hunterInfoView-wrapper .messageBoardView-title,.mh-improved-fancy-profile .hunterInfoView-wrapper .hunterInfoView-favoritesBlock-header,.mh-improved-fancy-profile .hunterInfoView-achievementsBlock .mousehuntTabHeaderContainer .mousehuntTabHeader,.mh-improved-fancy-profile .hunterInfoView-achievementsBlock .mousehuntTabHeaderContainer .mousehuntTabHeader.active{background:linear-gradient(#dcf7ff 45%,#8af1ee 55%)}.mh-improved-fancy-profile .hunterInfoView-corkBoardBlock .messageBoardView-message{background:#f8eff6}.mh-improved-fancy-profile .mousehuntPage-content textarea{background-color:#f9f9f9}.mh-improved-fancy-profile .hunterInfoView-wrapper .hunterInfoView-idCardBlock-stats,.mh-improved-fancy-profile .hunterInfoView-wrapper .hunterInfoView-idCardBlock-teamInfo-container:before,.mh-improved-fancy-profile .hunterInfoView-wrapper .hunterInfoView-idCardBlock-teamInfo-container,.mh-improved-fancy-profile .hunterInfoView-wrapper .hunterInfoView-idCardBlock-stats-horn-container,.mh-improved-fancy-profile .hunterInfoView-wrapper .hunterInfoView-idCardBlock-stats-huntingSince,.mh-improved-fancy-profile .hunterInfoView-wrapper .campPage-trap-trapStat,.mh-improved-fancy-profile .hunterInfoView-wrapper .hunterInfoView-trapBlock-setup-trap-slot-quantity{background:#dcf7ff;border-color:#80b5b4}.mh-improved-fancy-profile .journalContainer .top,.mh-improved-fancy-profile .journalContainer .bottom{display:none}.mh-improved-fancy-profile .journalContainer .content{margin:0 -10px;background:transparent!important}.mh-improved-fancy-profile .journal .content .entry{background-color:#f0dfee!important;border-color:#98448e}.mh-improved-fancy-profile .friendsPage-friendRow-image-border{background-image:none!important}.mh-improved-fancy-profile .friendsPage-friendRow-image{inset:4px;border:1px solid #513645;border-radius:10px}.mh-improved-fancy-profile .friendsPage-friendRow .friendsPage-friendRow-titleBar{margin-bottom:10px;margin-left:-9px;background:linear-gradient(#dcf7ff 45%,#89f0ee 55%)!important;border-color:#8af1ef!important}.mh-improved-fancy-profile .hunterInfoView-wrapper .friendsPage-friendRow-titleBar-name{margin-left:-25px}.mh-improved-fancy-profile .hunterInfoView-wrapper .friendsPage-friendRow-titleBar-titleDetail{top:0;right:10px;left:unset;font-weight:900}.mh-improved-fancy-profile .hunterInfoView-wrapper .hunterInfoView-idCardBlock-teamInfo-container{height:37px}.mh-improved-fancy-profile .hunterInfoView-wrapper .hunterInfoView-idCardBlock{height:220px}.mh-improved-fancy-profile .hunterInfoView-wrapper .hunterInfoView-idCardBlock-stats{padding:7px 0}.mh-improved-fancy-profile .friendsPage-friendRow-statsContainer{background-color:#d2c0ec;border-top:1px solid #be9bbc;box-shadow:none}.mh-improved-fancy-profile .hunterInfoView-wrapper .hunterInfoView-idCardBlock-goldenShield{filter:hue-rotate(148deg)}.mh-improved-fancy-profile .loyaltyBadgeView-years-text:before{content:"4"}.mh-improved-fancy-profile .loyaltyBadgeView .loyaltyBadgeView-years-text{top:6px;font-size:20px;color:#4b5554!important;text-shadow:0 0 0 #969696!important}.mh-improved-fancy-profile .loyaltyBadgeView{background-image:url(https://www.mousehuntgame.com/images/ui/profile/loyalty-badge-3-year.png)!important;filter:hue-rotate(350deg)}.mh-improved-fancy-profile .userInteractionButtonsView-button{filter:hue-rotate(170deg) opacity(.6)}.mh-improved-fancy-profile .userInteractionButtonsView-relationship .userInteractionButtonsView-button,.mh-improved-fancy-profile .userInteractionButtonsView-relationship .userInteractionButtonsView-button:hover,.mh-improved-fancy-profile .userInteractionButtonsView-relationship .userInteractionButtonsView-button:focus,.mh-improved-fancy-profile .userInteractionButtonsView-relationship .userInteractionButtonsView-button:active{filter:none}.mh-improved-fancy-profile .userInteractionButtonsView-button:hover{filter:hue-rotate(220deg) opacity(1)}.mh-improved-fancy-profile .friendsProfileView-randomFriend{background-color:#c3f0ff}.mh-improved-fancy-profile .friendsProfileView-randomFriend:hover{background-color:#93c9db}.mh-improved-fancy-profile .campPage-trap-trapStat.luck .value span:after{content:"0"}.mh-improved-fancy-profile .trapImageView-tooltip-trapAura-expiry span{display:none}.mh-improved-fancy-profile .trapImageView-tooltip-trapAura-expiry:after{content:"never! \\1f389\\fe0f infinite aura!"}.mh-improved-fancy-profile .hunterInfoView-achievementsBlock .mousehuntTabHeaderContainer .mousehuntTabHeader:hover,.hunterInfoView-achievementsBlock .mousehuntTabHeaderContainer .mousehuntTabHeader:focus{background:linear-gradient(#dcf7ff 45%,#8adff1 55%)}.mh-improved-fancy-profile #friend-data-wrapper .userInteractionButtonsView-button,.mh-improved-fancy-profile #friend-data-wrapper .userInteractionButtonsView-button:hover{filter:none!important}.mh-improved-fancy-profile #friend-data-wrapper .friendsPage-friendRow-statsContainer{background-color:transparent;box-shadow:0 10px 30px #cdb495 inset}\n';
}
});
// src/modules/user-highlighting/styles.css
var styles_default87;
var init_styles88 = __esm({
"src/modules/user-highlighting/styles.css"() {
styles_default87 = '.mh-improved-developer .hunterInfoView-verifiedUserImage,.mh-improved-contributor .hunterInfoView-verifiedUserImage,.mh-improved-supporter .hunterInfoView-verifiedUserImage{width:14.5px;height:17.5px;background:url(https://i.mouse.rip/mh-improved/tada-badge.png) no-repeat;background-size:contain}.mh-improved-supporter .hunterInfoView-verifiedUserImage{background:url(https://i.mouse.rip/mh-improved/star-badge.png) no-repeat;background-position-y:-1px;background-size:contain}.mh-improved-developer .friendsPage-friendRow-image:hover:after,.mh-improved-developer .friendsPage-friendRow-image:focus:after,.mh-improved-developer .friendsPage-friendRow-image:active:after,.mh-improved-contributor .friendsPage-friendRow-image:hover:after,.mh-improved-contributor .friendsPage-friendRow-image:focus:after,.mh-improved-contributor .friendsPage-friendRow-image:active:after,.mh-improved-supporter .friendsPage-friendRow-image:focus:after,.mh-improved-supporter .friendsPage-friendRow-image:hover:after,.mh-improved-supporter .friendsPage-friendRow-image:active:after{position:absolute;top:5px;left:5px;width:20px;height:20px;font-size:22px;color:#fff;content:"";background-image:url(data:image/svg + xml,<svgxmlns="http://www.w3.org/2000/svg"viewBox="0 0 24 24"fill="white"><pathd="m11.645 20.91-.007-.003-.022-.012a15.247 15.247 0 0 1-.383-.218 25.18 25.18 0 0 1-4.244-3.17C4.688 15.36 2.25 12.174 2.25 8.25 2.25 5.322 4.714 3 7.688 3A5.5 5.5 0 0 1 12 5.052 5.5 5.5 0 0 1 16.313 3c2.973 0 5.437 2.322 5.437 5.25 0 3.925-2.438 7.111-4.739 9.256a25.175 25.175 0 0 1-4.244 3.17 15.247 15.247 0 0 1-.383.219l-.022.012-.007.004-.003.001a.752.752 0 0 1-.704 0l-.003-.001Z"/></svg>);filter:drop-shadow(0 0 2px #000);background-repeat:no-repeat;background-size:contain}\n';
}
});
// src/modules/user-highlighting/index.js
var getUserHighlightingShield, highlightUsers, init60, user_highlighting_default;
var init_user_highlighting = __esm({
"src/modules/user-highlighting/index.js"() {
init_sentry_release_injection_stub();
init_utils4();
init_profile2();
init_styles88();
getUserHighlightingShield = (type) => {
let text = "";
switch (type) {
case "developer":
text = "MH Improved Developer";
break;
case "contributor":
text = "MH Improved Contributor";
break;
case "supporter":
text = "MH Improved Supporter";
break;
}
const wrapper = makeElement("div", ["blackTooltip", "mh-improved-user-shield"]);
makeElement("div", "hunterInfoView-verifiedUserImage", null, wrapper);
makeElement("span", "blackTooltiptext hunterInfoView-verifiedUser", text, wrapper);
return wrapper;
};
highlightUsers = () => __async(void 0, null, function* () {
const existing = document.querySelectorAll(".mh-improved-user-shield");
if (existing) {
existing.forEach((el) => {
el.remove();
});
}
const id = document.querySelector(".hunterInfoView-hunterId-idText span");
if (!id) {
return;
}
const profilePage = document.querySelector("#mousehuntContainer.PageHunterProfile");
if (!profilePage) {
return;
}
const idHeader = document.querySelector(".hunterInfoView-idCardBlock-secondaryHeader");
if (!idHeader) {
return;
}
const userId = Number.parseInt(id.textContent, 10);
let data;
const cachedData = sessionGet(`mh-improved-user-highlighting-${userId}`);
if (!cachedData) {
const userHighlighting = yield fetch(`https://api.mouse.rip/highlight-user/${userId}`);
data = yield userHighlighting.json();
debug(`Retrieved user highlighting data for ${userId}`, data);
sessionSet(`mh-improved-user-highlighting-${userId}`, data);
}
if (!data || !(data == null ? void 0 : data.highlighted)) {
return;
}
const type = data.type;
profilePage.classList.add("mh-improved-highlight-user", `mh-improved-${type}`);
idHeader.append(getUserHighlightingShield(type));
if (8209591 === userId) {
profilePage.classList.add("mh-improved-highlight-user", "mh-improved-fancy-profile");
}
});
init60 = () => __async(void 0, null, function* () {
addStyles([
styles_default87,
profile_default2
]);
onNavigation(highlightUsers, {
page: "hunterprofile"
});
});
user_highlighting_default = {
id: "highlight-users",
type: "required",
load: init60
};
}
});
// src/module-loader.js
var module_loader_default;
var init_module_loader = __esm({
"src/module-loader.js"() {
init_sentry_release_injection_stub();
init_better_gifts();
init_better_inventory();
init_better_item_view();
init_better_journal();
init_better_kings_reward();
init_better_maps();
init_better_marketplace();
init_better_mice();
init_better_quests();
init_better_send_supplies();
init_better_shops();
init_better_tournaments();
init_better_travel();
init_better_ui();
init_catch_rate_estimate();
init_copy_id();
init_dark_mode();
init_data_exporters();
init_delayed_tooltips();
init_favorite_setups();
init_flrt_helper();
init_hover_profiles();
init_image_upscaling();
init_inline_wiki();
init_inventory_lock_and_hide();
init_keyboard_shortcuts();
init_lgs_reminder();
init_location_catch_stats();
init_location_dashboard();
init_metric();
init_only_open_multiple();
init_open_all_but_one();
init_paste_hunter_id();
init_prestige_base_stats();
init_quick_filters_and_sort();
init_quick_send_supplies();
init_taller_windows();
init_tem_crowns();
init_ultimate_checkmark2();
init_custom_background();
init_custom_horn();
init_custom_hud();
init_custom_shield();
init_location_hud();
init_adblock();
init_hide_daily_reward_popup();
init_no_footer();
init_no_share();
init_no_sidebar();
init_journal_privacy();
init_dev();
init_beta_features();
init_fixes();
init_global_styles();
init_links2();
init_required();
init_update_migration();
init_update_notifications();
init_user_highlighting();
module_loader_default = [
// Better modules.
better_ui_default,
// First, not alphabetical.
better_gifts_default,
better_inventory_default,
better_item_view_default,
better_journal_default,
better_kings_reward_default,
better_maps_default,
better_marketplace_default,
better_mice_default,
better_quests_default,
better_send_supplies_default,
better_shops_default,
better_tournaments_default,
better_travel_default,
// Feature modules.
catch_rate_estimate_default,
copy_id_default,
dark_mode_default,
data_exporters_default,
delayed_tooltips_default,
favorite_setups_default,
flrt_helper_default,
hover_profiles_default,
image_upscaling_default,
inline_wiki_default,
inventory_lock_and_hide_default,
keyboard_shortcuts_default,
lgs_reminder_default,
location_catch_stats_default,
location_dashboard_default,
metric_default,
only_open_multiple_default,
open_all_but_one_default,
paste_hunter_id_default,
prestige_base_stats_default,
quick_filters_and_sort_default,
quick_send_supplies_default,
taller_windows_default,
tem_crowns_default,
ultimate_checkmark_default2,
// Design modules.
custom_background_default,
custom_horn_default,
custom_hud_default,
custom_shield_default,
// Element hiding modules.
adblock_default,
hide_daily_reward_popup_default,
no_footer_default,
no_share_default,
no_sidebar_default,
journal_privacy_default,
// Location HUD module.
location_hud_default,
// Required modules.
dev_default,
beta_features_default,
fixes_default,
global_styles_default,
user_highlighting_default,
links_default,
required_default,
update_migration_default,
update_notifications_default
];
}
});
// src/index.js
var require_src = __commonJS({
"src/index.js"(exports) {
init_sentry_release_injection_stub();
init_esm3();
init_utils4();
init_module_loader();
if (getSetting("error-reporting", true)) {
init({
dsn: "https://c0e7b72f2611e14c356dba1923cedf6e@o4506582061875200.ingest.sentry.io/4506583459233792",
maxBreadcrumbs: 50,
debug: false,
release: `mousehunt-improved@${mhImprovedVersion}`,
environment: mhImprovedPlatform,
allowUrls: [
/mproved/,
// mproved rather than improved to match the MH-Improved userscript
"/nicobnljejcjcbnhgcjhhhbnadkiafca/",
// Chrome extension
/73164570-6676-4291-809b-7b5c9cf6e626/
// Firefox extension
],
initialScope: {
tags: {
platform: mhImprovedPlatform,
version: mhImprovedVersion
},
user: {
id: user.unique_hash
}
}
});
}
var organizedModules = [
{
// Always loaded modules.
id: "required",
modules: []
},
{
id: "better",
name: "MouseHunt Improved",
modules: []
},
{
id: "feature",
name: "Features",
modules: []
},
{
id: "design",
name: "Design",
modules: []
},
{
id: "element-hiding",
name: "Hide Page Elements",
modules: []
},
{
id: "location-hud",
name: "Location HUDs",
modules: []
}
];
var loadModules = () => __async(exports, null, function* () {
if (getGlobal("loaded")) {
debug("Already loaded, exiting.");
return;
}
yield addSettingsTab("mousehunt-improved-settings", "MH Improved");
module_loader_default.forEach((m) => {
const category = organizedModules.find((c) => c.id === m.type);
if (!category) {
debug(`Unknown module category: ${m.type}`);
return;
}
category.modules.push(m);
});
for (const module2 of organizedModules) {
if ("required" !== module2.id) {
yield addSettingForModule(module2);
}
}
const loadedModules = [];
const notLoadedModules = [];
const skippedModules = [];
let modulesDebug = [];
const load = [];
for (const module2 of organizedModules) {
for (const submodule of module2.modules) {
const overrideStopLoading = getFlag(`no-${submodule.id}`);
if (overrideStopLoading) {
debuglite(`Skipping ${submodule.name} due to override flag.`);
skippedModules.push(submodule.id);
continue;
}
if (submodule.alwaysLoad || "required" === submodule.type || getSettingDirect(submodule.id, submodule.default, "mousehunt-improved-settings") || submodule.beta && getFlag(submodule.id)) {
try {
load.push(submodule.load());
loadedModules.push(submodule.id);
modulesDebug.push(submodule.id);
} catch (error) {
debug(`Error loading "${submodule.id}"`, error);
}
} else {
notLoadedModules.push(submodule.id);
}
}
debuglog("loader", `Loaded ${modulesDebug.length} ${module2.id} modules`, modulesDebug);
modulesDebug = [];
}
if (getSetting("error-reporting", true)) {
setContext("modules", {
loaded: loadedModules,
not_loaded: notLoadedModules,
skipped: skippedModules,
feature_flags: getSetting("override-flags", "")
});
}
yield Promise.all(load);
addToGlobal("modules", loadedModules);
addAdvancedSettings();
});
var init61 = () => __async(exports, null, function* () {
if (isUnsupportedFile()) {
debug("Skipping unsupported filetype.");
return;
}
if (isiFrame()) {
showLoadingError({ message: "Loading inside an iframe is not supported." });
return;
}
if (!isApp()) {
showLoadingError({ message: "Global MouseHunt functions not found." });
return;
}
try {
yield loadModules();
} catch (error) {
debug("Error loading modules", error);
showLoadingError(error);
} finally {
addToGlobal("version", mhImprovedVersion);
addToGlobal("loaded", true);
debugplain(`%c\u{1F42D}\uFE0F MouseHunt Improved v${mhImprovedVersion}-${mhImprovedPlatform} has been loaded. Happy Hunting!%c`, "color: #ca77ff; font-weight: 900; font-size: 1.1em", "color: inherit; font-weight: inherit; font-size: inherit");
eventRegistry.doEvent("mh-improved-loaded", {
version: mhImprovedVersion,
modules: getGlobal("modules")
});
}
});
init61();
}
});
// src/index.js?sentryProxyModule=true
var src_exports = {};
__export(src_exports, {
default: () => src_default
});
init_sentry_release_injection_stub();
// sentry-debug-id-stub:_sentry-debug-id-injection-stub?sentry-module-id=cafea5f2-8fd1-4c94-bd27-6c99b3a88a7b
init_sentry_release_injection_stub();
!function() {
try {
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}, n = new Error().stack;
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "9c4e88f8-4e7e-4c3a-bd27-569643a985d4", e._sentryDebugIdIdentifier = "sentry-dbid-9c4e88f8-4e7e-4c3a-bd27-569643a985d4");
} catch (e2) {
}
}();
// src/index.js?sentryProxyModule=true
var OriginalModule = __toESM(require_src());
__reExport(src_exports, __toESM(require_src()));
var src_default = OriginalModule.default;
return __toCommonJS(src_exports);
})();